@sekyro/react 0.1.0-rc.1 → 0.1.0-rc.10

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 (53) hide show
  1. package/CHANGELOG.md +278 -0
  2. package/LICENSE +25 -16
  3. package/README.md +151 -14
  4. package/dist/chunk-2KED7D2Q.js +2 -0
  5. package/dist/chunk-3MMLW5JQ.js +2 -0
  6. package/dist/chunk-5OAGLIJS.js +2 -0
  7. package/dist/chunk-BTCCJFMS.js +2 -0
  8. package/dist/chunk-EZ5TVL6P.js +2 -0
  9. package/dist/chunk-G2GWGZYH.js +2 -0
  10. package/dist/chunk-H2KIOYQU.js +2 -0
  11. package/dist/chunk-MLGCQ74X.js +2 -0
  12. package/dist/chunk-PYAJMHZH.js +2 -0
  13. package/dist/chunk-R5W7UDFX.js +2 -0
  14. package/dist/chunk-RFCYXRRC.js +2 -0
  15. package/dist/chunk-RFJSBXAH.js +2 -0
  16. package/dist/chunk-RIE46W4P.js +2 -0
  17. package/dist/chunk-YY76AMUA.js +2 -0
  18. package/dist/chunk-ZCAZDOMD.js +2 -0
  19. package/dist/document-capture-view-BSK7QPBT.js +2 -0
  20. package/dist/eid-view-EOTE4E3T.js +2 -0
  21. package/dist/email-otp-view-TL43KM5T.js +2 -0
  22. package/dist/flow-views-5ADJL2OW.js +2 -0
  23. package/dist/fonts/Cairo-OFL.txt +93 -0
  24. package/dist/fonts/Geist-OFL.txt +93 -0
  25. package/dist/fonts/Inter-OFL.txt +93 -0
  26. package/dist/fonts/SekyroCairo-Bold.woff2 +0 -0
  27. package/dist/fonts/SekyroCairo-Regular.woff2 +0 -0
  28. package/dist/fonts/SekyroCairo-SemiBold.woff2 +0 -0
  29. package/dist/fonts/SekyroGeist-Bold.woff2 +0 -0
  30. package/dist/fonts/SekyroGeist-SemiBold.woff2 +0 -0
  31. package/dist/fonts/SekyroInter-Medium.woff2 +0 -0
  32. package/dist/fonts/SekyroInter-Regular.woff2 +0 -0
  33. package/dist/fonts/SekyroInter-SemiBold.woff2 +0 -0
  34. package/dist/index.cjs +2 -901
  35. package/dist/index.d.cts +7 -233
  36. package/dist/index.d.ts +7 -233
  37. package/dist/index.js +2 -880
  38. package/dist/overlay-de-SAZKXC6H.js +2 -0
  39. package/dist/overlay-es-H7CXA7UL.js +2 -0
  40. package/dist/overlay-pt-VW4D7A3A.js +2 -0
  41. package/dist/portrait-capture-view-YIONZJPI.js +2 -0
  42. package/dist/styles.css +287 -12
  43. package/dist/theme-DiGLpM-i.d.cts +492 -0
  44. package/dist/theme-DiGLpM-i.d.ts +492 -0
  45. package/dist/verification/index.cjs +2 -0
  46. package/dist/verification/index.d.cts +562 -0
  47. package/dist/verification/index.d.ts +562 -0
  48. package/dist/verification/index.js +2 -0
  49. package/dist/verification.css +577 -0
  50. package/package.json +26 -13
  51. package/sbom.cdx.json +153 -0
  52. package/dist/index.cjs.map +0 -1
  53. package/dist/index.js.map +0 -1
@@ -0,0 +1,562 @@
1
+ import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-DiGLpM-i.js';
2
+ export { k as StringKey, A as retakeHintStringKey } from '../theme-DiGLpM-i.js';
3
+ import * as react from 'react';
4
+ import { ReactNode } from 'react';
5
+ import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
6
+
7
+ /** Copy of the `@sekyro/react/verification` steps (hosted catalog paths; the optional keys load with their step). */
8
+ interface StepStrings {
9
+ "session.title": string;
10
+ "session.requestedBy": string;
11
+ "returning.requestedBy": string;
12
+ "consent.notice": string;
13
+ "consent.details": string;
14
+ "consent.terms.intro": string;
15
+ "consent.terms.data": string;
16
+ "consent.terms.processing": string;
17
+ "consent.terms.sharing": string;
18
+ "consent.terms.retention": string;
19
+ "reasons.camera_unavailable": string;
20
+ "otp.sendTitle": string;
21
+ "otp.sendDescription": string;
22
+ "otp.prefilledNotice": string;
23
+ "otp.phoneLabel": string;
24
+ "otp.phoneHelper": string;
25
+ "otp.phonePlaceholder": string;
26
+ "otp.send": string;
27
+ "otp.channelSms": string;
28
+ "otp.channelWhatsapp": string;
29
+ "otp.verifyTitle": string;
30
+ "otp.verifyDescription": string;
31
+ "otp.sentTo": string;
32
+ "otp.codeLabel": string;
33
+ "otp.codeHelper": string;
34
+ "otp.verify": string;
35
+ "otp.resend": string;
36
+ "otp.resendIn": string;
37
+ "otp.expiresIn": string;
38
+ "otp.expired": string;
39
+ "otp.reason_otp_mismatch": string;
40
+ "otp.reason_otp_expired": string;
41
+ "otp.reason_otp_send_failed": string;
42
+ "otp.chooseChannel": string;
43
+ "otp.sendBy": string;
44
+ "otp.resendBy": string;
45
+ "otp.reason_otp_channel_unavailable": string;
46
+ "otp.reason_otp_destination_not_allowed": string;
47
+ "otp.reason_otp_destination_unknown": string;
48
+ "otp.reason_otp_rate_limited": string;
49
+ "otp.reason_otp_daily_cap_reached": string;
50
+ "otp.reason_payment_method_required": string;
51
+ "otp.reason_spend_cap_reached": string;
52
+ "session.steps.population.title": string;
53
+ "session.steps.population.description": string;
54
+ "population.label": string;
55
+ "population.helper": string;
56
+ "population.placeholder": string;
57
+ "population.submit": string;
58
+ "population.invalid": string;
59
+ "population.reason_registry_unavailable": string;
60
+ "population.reason_nni_not_found": string;
61
+ "population.reason_nni_invalid": string;
62
+ "population.bound.description": string;
63
+ "population.bound.confirm": string;
64
+ "population.reason_nni_not_found_or_document": string;
65
+ "population.useDocument": string;
66
+ "population.fromDocument.title": string;
67
+ "population.fromDocument.description": string;
68
+ "population.fromDocument.continue": string;
69
+ "session.steps.doc.titleRecto": string;
70
+ "session.steps.doc.titleVerso": string;
71
+ "session.steps.doc.description": string;
72
+ "doc.pickTitle": string;
73
+ "doc.pickDescription": string;
74
+ "doc.pickLabel": string;
75
+ "doc.startScan": string;
76
+ "doc.titlePassport": string;
77
+ "doc.reason_side_missing": string;
78
+ "doc.reason_unreadable": string;
79
+ "doc.process_failed": string;
80
+ "doc.uploading": string;
81
+ "doc.cameraBlocked": string;
82
+ "doc.cameraBlockedHint": string;
83
+ "doc.retryCamera": string;
84
+ "doc.holdUpright": string;
85
+ "dcv2.sensing": string;
86
+ "dcv2.too_far": string;
87
+ "dcv2.too_close": string;
88
+ "dcv2.edge_clipped": string;
89
+ "dcv2.wrong_shape": string;
90
+ "dcv2.tilted": string;
91
+ "dcv2.too_dark": string;
92
+ "dcv2.too_bright": string;
93
+ "dcv2.blurry": string;
94
+ "dcv2.focus_far": string;
95
+ "dcv2.glare": string;
96
+ "dcv2.hold_still": string;
97
+ "dcv2.processing": string;
98
+ "dcv2.side_captured": string;
99
+ "dcv2.captured": string;
100
+ "session.processing.title": string;
101
+ "session.processing.description": string;
102
+ "handoff.title": string;
103
+ "session.processing.age_estimation.title": string;
104
+ "session.processing.age_estimation.description": string;
105
+ "session.result.approved.title": string;
106
+ "session.result.approved.description": string;
107
+ "session.result.review.title": string;
108
+ "session.result.review.description": string;
109
+ "session.result.rejected.title": string;
110
+ "session.result.rejected.description": string;
111
+ "session.result.expired.title": string;
112
+ "session.result.expired.description": string;
113
+ "session.result.detailsMismatch": string;
114
+ "session.result.deviceVelocity": string;
115
+ "session.result.deviceStop": string;
116
+ "result.referenceLabel": string;
117
+ "common.loading": string;
118
+ "common.refresh": string;
119
+ "common.noAttemptsLeft": string;
120
+ "session.steps.portrait.title": string;
121
+ "session.steps.portrait.description": string;
122
+ "portrait.coach.no_face": string;
123
+ "portrait.coach.multiple_faces": string;
124
+ "portrait.coach.center": string;
125
+ "portrait.coach.too_close": string;
126
+ "portrait.coach.pose": string;
127
+ "portrait.coach.eyes": string;
128
+ "portrait.coach.mouth": string;
129
+ "portrait.coach.glare": string;
130
+ "portrait.coach.lighting": string;
131
+ "portrait.coach.lighting_side": string;
132
+ "portrait.coach.background": string;
133
+ "portrait.coach.resolution": string;
134
+ "portrait.coach.hold_still": string;
135
+ "portrait.coach.hold": string;
136
+ "portrait.criteria.face": string;
137
+ "portrait.criteria.framing": string;
138
+ "portrait.criteria.pose": string;
139
+ "portrait.criteria.eyes": string;
140
+ "portrait.criteria.mouth": string;
141
+ "portrait.criteria.glare": string;
142
+ "portrait.criteria.lighting": string;
143
+ "portrait.criteria.background": string;
144
+ "portrait.criteria.resolution": string;
145
+ "portrait.criteria.sharpness": string;
146
+ "portrait.report.pose": string;
147
+ "portrait.report.eyes": string;
148
+ "portrait.report.mouth": string;
149
+ "portrait.report.occlusion": string;
150
+ "portrait.report.glare": string;
151
+ "portrait.report.lighting": string;
152
+ "portrait.report.background": string;
153
+ "portrait.report.resolution": string;
154
+ "portrait.checksLabel": string;
155
+ "portrait.met": string;
156
+ "portrait.notMet": string;
157
+ "portrait.starting": string;
158
+ "portrait.taken": string;
159
+ "portrait.uploading": string;
160
+ "portrait.checking": string;
161
+ "portrait.retryTitle": string;
162
+ "portrait.reportTitle": string;
163
+ "portrait.retake": string;
164
+ "portrait.uploadFailed": string;
165
+ "portrait.sendAgain": string;
166
+ "portrait.matching": string;
167
+ "portrait.reviewTitle": string;
168
+ "portrait.reviewDescription": string;
169
+ "portrait.cameraBlocked": string;
170
+ "portrait.cameraBlockedHint": string;
171
+ "portrait.retryCamera": string;
172
+ "reasons.icao_pose": string;
173
+ "reasons.icao_eyes": string;
174
+ "reasons.icao_mouth": string;
175
+ "reasons.icao_occlusion": string;
176
+ "reasons.icao_lighting": string;
177
+ "reasons.icao_background": string;
178
+ "reasons.icao_resolution": string;
179
+ "reasons.portrait_not_from_liveness": string;
180
+ "reasons.tester_document_mismatch": string;
181
+ "reasons.tester_phone_mismatch": string;
182
+ "method.national_eid": string;
183
+ "method.national_eidGeneric": string;
184
+ "consent.short": string;
185
+ "consent.termsLink": string;
186
+ "session.progressLabel": string;
187
+ "section.contact": string;
188
+ "section.identity": string;
189
+ "section.live_photo": string;
190
+ "section.screening": string;
191
+ "handoff.copied": string;
192
+ "needsApp.title": string;
193
+ "needsApp.description": string;
194
+ "needsApp.descriptionNoOrg": string;
195
+ "population.recheck.title": string;
196
+ "population.recheck.description": string;
197
+ "otp.phoneInvalid": string;
198
+ "otp.codeInvalid": string;
199
+ "doc.countryTitle": string;
200
+ "doc.countryLabel": string;
201
+ "doc.countrySearch": string;
202
+ "doc.noCountryMatch": string;
203
+ "doc.type.carte_identite": string;
204
+ "doc.type.residence_permit": string;
205
+ "doc.type.passport": string;
206
+ "doc.showSide": string;
207
+ "doc.showPage": string;
208
+ "doc.flip": string;
209
+ "doc.sameFace": string;
210
+ "doc.reaskRecto": string;
211
+ "doc.reread": string;
212
+ "doc.photoTaken": string;
213
+ "doc.frontCaptured": string;
214
+ "doc.backCaptured": string;
215
+ "doc.pageCaptured": string;
216
+ "doc.progressFront": string;
217
+ "doc.progressBack": string;
218
+ "doc.progressPage": string;
219
+ "doc.shutter": string;
220
+ "doc.torchOn": string;
221
+ "doc.torchOff": string;
222
+ "result.platform_unsupported": string;
223
+ "unsupported.title": string;
224
+ "unsupported.description": string;
225
+ "shell.subtitle": string;
226
+ "shell.subtitleHuman": string;
227
+ "shell.verifiedBy": string;
228
+ "doc.sub.carte_identite": string;
229
+ "doc.sub.residence_permit": string;
230
+ "doc.sub.passport": string;
231
+ "native.close": string;
232
+ "native.face.introTitle": string;
233
+ "native.face.introLead": string;
234
+ "native.face.humanIntroTitle": string;
235
+ "native.face.humanIntroLead": string;
236
+ "native.doc.holdIt": string;
237
+ "native.doc.changeCountry": string;
238
+ "native.result.approved": string;
239
+ "native.result.review": string;
240
+ "native.result.rejected": string;
241
+ "native.result.expired": string;
242
+ "native.result.copied": string;
243
+ "native.result.back": string;
244
+ "emailOtp.reason_otp_daily_cap_reached"?: string;
245
+ "emailOtp.sendTitle"?: string;
246
+ "emailOtp.sendDescription"?: string;
247
+ "emailOtp.prefilledNotice"?: string;
248
+ "emailOtp.emailLabel"?: string;
249
+ "emailOtp.emailHelper"?: string;
250
+ "emailOtp.emailPlaceholder"?: string;
251
+ "emailOtp.emailInvalid"?: string;
252
+ "emailOtp.send"?: string;
253
+ "emailOtp.verifyTitle"?: string;
254
+ "emailOtp.verifyDescription"?: string;
255
+ "emailOtp.sentTo"?: string;
256
+ "emailOtp.codeLabel"?: string;
257
+ "emailOtp.codeHelper"?: string;
258
+ "emailOtp.verify"?: string;
259
+ "emailOtp.resend"?: string;
260
+ "emailOtp.resendIn"?: string;
261
+ "emailOtp.expiresIn"?: string;
262
+ "emailOtp.expired"?: string;
263
+ "emailOtp.reason_otp_mismatch"?: string;
264
+ "emailOtp.reason_otp_expired"?: string;
265
+ "emailOtp.reason_otp_send_failed"?: string;
266
+ "emailOtp.reason_otp_rate_limited"?: string;
267
+ "emailOtp.reason_email_invalid"?: string;
268
+ "emailOtp.reason_email_disposable"?: string;
269
+ "eid.identifierTitle"?: string;
270
+ "eid.identifierTitleGeneric"?: string;
271
+ "eid.identifierDescription"?: string;
272
+ "eid.identifierDescriptionGeneric"?: string;
273
+ "eid.boundDescription"?: string;
274
+ "eid.boundDescriptionGeneric"?: string;
275
+ "eid.start"?: string;
276
+ "eid.codeTitle"?: string;
277
+ "eid.codeTitleGeneric"?: string;
278
+ "eid.codeHelp"?: string;
279
+ "eid.codeHelpGeneric"?: string;
280
+ "eid.codeLabel"?: string;
281
+ "eid.verify"?: string;
282
+ "eid.resend"?: string;
283
+ "eid.resendIn"?: string;
284
+ "eid.noResendsLeft"?: string;
285
+ "eid.expiresIn"?: string;
286
+ "eid.expired"?: string;
287
+ "eid.useCamera"?: string;
288
+ "reasons.eid_identifier_invalid"?: string;
289
+ "reasons.eid_code_invalid"?: string;
290
+ "reasons.eid_code_expired"?: string;
291
+ "reasons.eid_locked"?: string;
292
+ "reasons.eid_not_enrolled"?: string;
293
+ "reasons.eid_unavailable"?: string;
294
+ "reasons.eid_resend_too_soon"?: string;
295
+ "reasons.eid_resend_limit"?: string;
296
+ "eid.continueHint"?: string;
297
+ "eid.continueHintGeneric"?: string;
298
+ "eid.resendsRemaining.zero"?: string;
299
+ "eid.resendsRemaining.one"?: string;
300
+ "eid.resendsRemaining.two"?: string;
301
+ "eid.resendsRemaining.few"?: string;
302
+ "eid.resendsRemaining.many"?: string;
303
+ "eid.resendsRemaining.other"?: string;
304
+ "eid.codeAttemptsRemaining.zero"?: string;
305
+ "eid.codeAttemptsRemaining.one"?: string;
306
+ "eid.codeAttemptsRemaining.two"?: string;
307
+ "eid.codeAttemptsRemaining.few"?: string;
308
+ "eid.codeAttemptsRemaining.many"?: string;
309
+ "eid.codeAttemptsRemaining.other"?: string;
310
+ "dcv3.mrz.searching"?: string;
311
+ "dcv3.mrz.showMrzSide"?: string;
312
+ "dcv3.mrz.reading"?: string;
313
+ "dcv3.mrz.moveCloser"?: string;
314
+ "dcv3.mrz.turnSideways"?: string;
315
+ "dcv3.mrz.glare"?: string;
316
+ "dcv3.mrz.holdStill"?: string;
317
+ "dcv3.mrz.valid"?: string;
318
+ "dcv3.mrz.looksLikePassport"?: string;
319
+ "dcv3.mrz.looksLikeCard"?: string;
320
+ "native.doc.introTitle"?: string;
321
+ "native.doc.introLead"?: string;
322
+ "native.doc.tip.flat"?: string;
323
+ "native.doc.tip.glare"?: string;
324
+ "native.doc.tip.frame"?: string;
325
+ "native.doc.openCamera"?: string;
326
+ "native.doc.changeDocument"?: string;
327
+ "native.scan.closer"?: string;
328
+ "native.scan.farther"?: string;
329
+ "native.scan.glare"?: string;
330
+ "native.scan.dark"?: string;
331
+ "native.scan.blurry"?: string;
332
+ "native.scan.holdStill"?: string;
333
+ "native.scan.reading"?: string;
334
+ "native.scan.putDown"?: string;
335
+ "native.scan.retry"?: string;
336
+ "consent.human.terms.intro"?: string;
337
+ "consent.human.terms.data"?: string;
338
+ "consent.human.terms.processing"?: string;
339
+ "consent.human.terms.sharing"?: string;
340
+ "consent.human.terms.retention"?: string;
341
+ "capture.noCamera.title"?: string;
342
+ "capture.noCamera.body"?: string;
343
+ "capture.noCamera.continue"?: string;
344
+ "capture.noCamera.deniedTitle"?: string;
345
+ "capture.noCamera.deniedBody"?: string;
346
+ "choice.title"?: string;
347
+ "choice.description"?: string;
348
+ "choice.switch"?: string;
349
+ "contact.title"?: string;
350
+ "contact.description"?: string;
351
+ "contact.phone"?: string;
352
+ "contact.email"?: string;
353
+ "contact.switch"?: string;
354
+ "summary.title"?: string;
355
+ "summary.description"?: string;
356
+ "summary.fullName"?: string;
357
+ "summary.birthDate"?: string;
358
+ "summary.nationality"?: string;
359
+ "summary.documentType"?: string;
360
+ "summary.documentNumber"?: string;
361
+ "summary.nni"?: string;
362
+ "summary.expiryDate"?: string;
363
+ "summary.portraitAlt"?: string;
364
+ "summary.source.registry"?: string;
365
+ "summary.source.document"?: string;
366
+ "summary.source.chip"?: string;
367
+ "summary.name"?: string;
368
+ "summary.birthYear"?: string;
369
+ "summary.confirm"?: string;
370
+ "summary.retakeDocument"?: string;
371
+ "summary.retakeNationalNumber"?: string;
372
+ "summary.noRetake"?: string;
373
+ "capture.tipsIcao.title"?: string;
374
+ "capture.tipsIcao.glasses"?: string;
375
+ "capture.tipsIcao.headwear"?: string;
376
+ "capture.tipsIcao.expression"?: string;
377
+ "capture.tipsIcao.faceCamera"?: string;
378
+ "capture.tipsIcao.background"?: string;
379
+ "capture.tipsIcao.lighting"?: string;
380
+ "capture.tipsIcao.hair"?: string;
381
+ "capture.tipsIcao.summary"?: string;
382
+ "portrait.retakeOnly"?: string;
383
+ "portrait.keepCamera"?: string;
384
+ "handoff.description"?: string;
385
+ "handoff.qrAlt"?: string;
386
+ "handoff.copyLink"?: string;
387
+ "handoff.copyFailed"?: string;
388
+ "handoff.waiting"?: string;
389
+ "inApp.title"?: string;
390
+ "inApp.description"?: string;
391
+ "inApp.copyLink"?: string;
392
+ "inApp.copied"?: string;
393
+ "inApp.copyFailed"?: string;
394
+ "inApp.continueAnyway"?: string;
395
+ }
396
+
397
+ /**
398
+ * Loads the copy of a Human-only locale (es, pt, de); resolves at once for ar/fr/en. The components load it by
399
+ * themselves (they render once it is there); call it ahead to have the copy ready on the first render. A failed
400
+ * download leaves the locale on English.
401
+ */
402
+ declare function loadSekyroLocale(locale: SekyroLocale): Promise<void>;
403
+
404
+ declare const arSteps: StepStrings;
405
+
406
+ declare const enSteps: StepStrings;
407
+
408
+ declare const frSteps: StepStrings;
409
+
410
+ type SekyroStrings = Strings & StepStrings;
411
+ type SekyroStringKey = keyof SekyroStrings;
412
+ type StepTranslate = (key: SekyroStringKey, vars?: Record<string, string | number>) => string;
413
+ declare function formatTemplate(template: string, vars?: Record<string, string | number>): string;
414
+ /** 0.1 built-ins → step built-ins → (es/pt/de) the locale's loaded overlay → overrides. */
415
+ declare function resolveSekyroStrings(locale: SekyroLocale, overrides?: Partial<SekyroStrings>): SekyroStrings;
416
+ interface StepI18n {
417
+ locale: SekyroLocale;
418
+ strings: SekyroStrings;
419
+ t: StepTranslate;
420
+ }
421
+ /** es/pt/de: renders once the locale's overlay is loaded (no English flash). */
422
+ declare function StepI18nProvider({ locale, strings, children }: {
423
+ locale: SekyroLocale;
424
+ strings?: Partial<SekyroStrings>;
425
+ children: ReactNode;
426
+ }): react.JSX.Element | null;
427
+ /** Props win over the surrounding provider; default English. */
428
+ declare function useStepI18n(locale?: SekyroLocale, strings?: Partial<SekyroStrings>): StepI18n;
429
+
430
+ /** Runs the verification's plan runner and returns the current step. */
431
+ declare function useVerificationStep(verification: Verification | undefined): {
432
+ step: VerificationStep | null;
433
+ error: unknown;
434
+ };
435
+
436
+ /** Props shared by every step component. */
437
+ interface StepComponentProps {
438
+ /** Default: the surrounding <SekyroVerification>'s locale, else `en`. */
439
+ locale?: SekyroLocale;
440
+ strings?: Partial<SekyroStrings>;
441
+ className?: string;
442
+ /** Every failed action (local validation and API errors) — for host telemetry. */
443
+ onError?: (error: unknown) => void;
444
+ }
445
+
446
+ interface PhoneOtpStepProps extends StepComponentProps {
447
+ step: PhoneOtpStepHandle;
448
+ /** Initial value of the number field (default `+222`). */
449
+ defaultPhone?: string;
450
+ }
451
+ declare function PhoneOtpStep({ step, locale, strings, className, defaultPhone, onError }: PhoneOtpStepProps): react.JSX.Element;
452
+
453
+ interface EmailOtpStepProps extends StepComponentProps {
454
+ step: EmailOtpStepHandle;
455
+ /** Initial value of the address field (default empty). */
456
+ defaultEmail?: string;
457
+ }
458
+ declare function EmailOtpStep({ locale, strings, ...props }: EmailOtpStepProps): react.JSX.Element;
459
+
460
+ interface EidStepProps extends StepComponentProps {
461
+ step: EidStepHandle;
462
+ }
463
+ declare function EidStep({ locale, strings, ...props }: EidStepProps): react.JSX.Element;
464
+
465
+ declare function MethodChoice({ step, locale, strings, className, onError }: StepComponentProps & {
466
+ step: MethodStepHandle;
467
+ }): react.JSX.Element;
468
+
469
+ declare function NniEntry({ step, locale, strings, className, onError }: StepComponentProps & {
470
+ step: RegistryStepHandle;
471
+ }): react.JSX.Element;
472
+
473
+ declare function DocumentCapture({ step, locale, strings, className, liveMrz, }: StepComponentProps & {
474
+ step: DocumentStepHandle;
475
+ /** Web live MRZ (on-device MRZ read on MRZ faces; obeys the session's server tuning). */
476
+ liveMrz?: DocumentLiveMrzOptions;
477
+ }): react.JSX.Element;
478
+
479
+ declare function PortraitCapture({ step, locale, strings, className, assetBaseUrl, }: StepComponentProps & {
480
+ step: PortraitStepHandle;
481
+ /** Self-hosted MediaPipe assets (wasm fileset + `face_landmarker.task`); default `/models-v3`. */
482
+ assetBaseUrl?: string;
483
+ }): react.JSX.Element;
484
+
485
+ /** `system` follows the device (prefers-color-scheme). */
486
+ type SekyroColorScheme = "light" | "dark" | "system";
487
+
488
+ /** What {@link SekyroVerificationProps.onClose} reports. */
489
+ interface SekyroCloseEvent {
490
+ /**
491
+ * `finished`: the person is done (the result's "Back to <partner>" button, or the close button on the result page);
492
+ * `cancelled`: they closed the flow before its result.
493
+ */
494
+ reason: "finished" | "cancelled";
495
+ /** The verdict shown on the result page (`finished` only). Display only: read the real outcome on your server. */
496
+ result?: VerificationResult;
497
+ }
498
+ interface SekyroVerificationProps {
499
+ verification: Verification;
500
+ locale: SekyroLocale;
501
+ dir?: "ltr" | "rtl";
502
+ strings?: Partial<SekyroStrings>;
503
+ /** Runtime theme — wins over the session's branding (SDK spec §6.4). */
504
+ theme?: SekyroTheme;
505
+ /** Light (default: the component sits in your page), dark, or the device's setting. */
506
+ colorScheme?: SekyroColorScheme;
507
+ assetBaseUrl?: string;
508
+ /**
509
+ * Web live MRZ for the document step: `workerUrl` (where your bundler serves `@sekyro/web/core/ocr/worker`),
510
+ * `assetBaseUrl` (self-hosted OCR assets) or `mode: "off"`. The session's server tuning decides when it runs.
511
+ */
512
+ documentLiveMrz?: DocumentLiveMrzOptions;
513
+ voice?: false | VoiceOptions;
514
+ livenessProps?: Omit<LivenessCaptureProps, "verification" | "locale" | "dir" | "strings" | "assetBaseUrl" | "voice" | "onCaptured" | "onResult">;
515
+ /**
516
+ * `header` and `footer` replace the partner header and the "Verified by Sekyro AI" link (`footer: null` hides it;
517
+ * the link also hides when the org hides the attribution, `branding.hideAttribution`);
518
+ * `headerEnd` sits at the inline end of the partner header (a language menu), before the close button.
519
+ */
520
+ slots?: {
521
+ header?: ReactNode;
522
+ headerEnd?: ReactNode;
523
+ footer?: ReactNode;
524
+ result?: (step: ResultStepHandle) => ReactNode;
525
+ };
526
+ onStep?: (step: VerificationStep) => void;
527
+ onResult?: (result: VerificationResult) => void;
528
+ /**
529
+ * The person closes the flow: the header's close button, or the result's "Back to <partner>" button (as on the native
530
+ * SDKs). Take them back to your page. Without it, neither button is shown.
531
+ */
532
+ onClose?: (event: SekyroCloseEvent) => void;
533
+ /** Fires before the liveness upload (SDK spec §7.5 shadow hook). */
534
+ onLivenessCaptured?: (artifacts: CapturedArtifacts) => void;
535
+ /**
536
+ * The link a desktop shows as a QR code when the live photo needs a phone
537
+ * (the session's `hosted_url`); absent = a "continue on your phone" notice.
538
+ * `<SekyroFlow>` defaults it to this page's address.
539
+ */
540
+ handoffUrl?: string;
541
+ className?: string;
542
+ }
543
+ declare function SekyroVerification(props: SekyroVerificationProps): react.JSX.Element;
544
+
545
+ interface SekyroFlowProps extends SekyroVerificationProps {
546
+ /** The session's `hosted_url` (create result): the QR code and the "open in your browser" link. Default: this page's address. */
547
+ hostedUrl?: string;
548
+ /** Override the in-app browser detection (tests / hosts that know better). */
549
+ inAppBrowser?: boolean;
550
+ }
551
+ declare function SekyroFlow({ hostedUrl, inAppBrowser, ...props }: SekyroFlowProps): react.JSX.Element;
552
+
553
+ /** The page runs inside an app's WebView (WhatsApp, Instagram, Facebook, TikTok, Snapchat, LINE, LinkedIn, WeChat, an Android WebView…). */
554
+ declare function isInAppBrowser(userAgent?: string): boolean;
555
+
556
+ declare function VerificationResultScreen({ step, locale, strings, className, onClose, }: StepComponentProps & {
557
+ step: ResultStepHandle;
558
+ /** Shows the primary action, "Back to <partner>" ("Close" without a partner name), as on the native SDKs. */
559
+ onClose?: () => void;
560
+ }): react.JSX.Element;
561
+
562
+ export { DocumentCapture, EidStep, type EidStepProps, EmailOtpStep, type EmailOtpStepProps, MethodChoice, NniEntry, PhoneOtpStep, type PhoneOtpStepProps, PortraitCapture, type SekyroCloseEvent, type SekyroColorScheme, SekyroFlow, type SekyroFlowProps, SekyroLocale, type SekyroStringKey, type SekyroStrings, SekyroVerification, type SekyroVerificationProps, type StepComponentProps, type StepI18n, StepI18nProvider, type StepStrings, type StepTranslate, Strings, VerificationResultScreen, arSteps, enSteps, formatTemplate, frSteps, isInAppBrowser, loadSekyroLocale, resolveSekyroStrings, useStepI18n, useVerificationStep };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as st}from"../chunk-R5W7UDFX.js";import{a as B,d as ye,e as ke,f as he}from"../chunk-ZCAZDOMD.js";import{a as Xe}from"../chunk-EZ5TVL6P.js";import{a as et}from"../chunk-YY76AMUA.js";import{a as tt,b as ot,c as nt,d as rt}from"../chunk-3MMLW5JQ.js";import{a as q}from"../chunk-PYAJMHZH.js";import{a as Ye,b as Ge,d as Qe,g as Je}from"../chunk-5OAGLIJS.js";import{b as We}from"../chunk-MLGCQ74X.js";import{a as Y,b as G,c as ge,d as Ze,g as je}from"../chunk-RFJSBXAH.js";import{a as ee}from"../chunk-RFCYXRRC.js";import{a as xt,b as It,c as Et,d as Vt,e as Lt,f as ae,g as v}from"../chunk-G2GWGZYH.js";import{a as N,b as Se}from"../chunk-BTCCJFMS.js";import{a as b,g as Pt,i as _t,j as Ke,k as ze,l as qe,r as fe,s as j}from"../chunk-RIE46W4P.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as Tt,useState as it}from"react";function Ce(e){let[t,n]=it(()=>e?.currentStep?.()??null),[s,a]=it(null);return Tt(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let r=!0,o=e.on("step",l=>{r&&n(l)});return e.run().then(l=>{r&&n(c=>c??l)},l=>{r&&a(l)}),()=>{r=!1,o()}},[e]),{step:t,error:s}}i(Ce,"useVerificationStep");import{useEffect as Rt,useId as Mt,useRef as Dt,useState as be}from"react";import{Fragment as lt,jsx as h,jsxs as U}from"react/jsx-runtime";var at=i((e,t)=>{if(e===void 0)return 0;let n=Date.parse(e)-t;return Number.isFinite(n)?Math.max(0,Math.ceil(n/1e3)):0},"secondsUntil"),At=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Bt=["whatsapp","sms"],Ot=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited"]),J="+222";function Ft(e){let t=e.replace(/[\s-]/g,""),n=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(n)?`+${n}`:null}i(Ft,"normalizedPhone");function Ht({id:e,label:t,value:n,onChange:s,placeholder:a}){let r=n.startsWith("+")&&!n.startsWith(J),o=r?n:n.slice(n.startsWith(J)?J.length:0).trim(),l=Dt(null);return Rt(()=>{let c=setTimeout(()=>l.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(c)},[]),U("div",{className:"sekyro-field",children:[h("label",{className:"sekyro-label",htmlFor:e,children:t}),U("div",{className:"sekyro-phone",dir:"ltr",children:[r?null:U("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[h("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:"🇲🇷"}),J]}),h("input",{ref:l,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...r?{}:{"aria-describedby":`${e}-dial`},placeholder:a,value:o,onChange:c=>{let u=c.target.value.replace(/[^\d +]/g,"");s(u.startsWith("+")?u:J+u.replace(/\D/g,""))}})]})]})}i(Ht,"PhoneField");function Ne({step:e,locale:t,strings:n,className:s,defaultPhone:a=J,onError:r}){let o=v(t,n),{t:l}=o,[c,u]=be(a),[k,f]=be(""),[m,y]=be(!1),[w,D]=be(null),T=e.phase==="verify",R=et(T),_=Mt(),$=i(async I=>{y(!0),D(null);try{await I()}catch(M){D(ee(M,o.strings)),r?.(M)}finally{y(!1)}},"run"),O=Bt.filter(I=>(e.channels??[]).includes(I)),g=Ft(c),P=!e.needsPhone||g!==null,S=i((I,M=!1)=>{$(()=>e.send({...e.needsPhone&&(!M||c!==a)?{phone:g??c}:{},...I!==void 0?{channel:I}:{}}))},"send"),de=i(I=>{$(()=>e.verify(I))},"submitCode"),ue=i(I=>{I.preventDefault(),T?de(k):O.length<=1&&P&&S(O[0])},"onSubmit"),F=at(e.codeExpiresAt,R),W=at(e.resendAvailableAt,R),X=T&&e.codeExpiresAt!==void 0&&F===0,C=i(I=>l(I==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[me,d]=l("otp.sentTo",{channel:C(e.channel)}).split("{number}"),x=e.reason==="otp_mismatch"?U(N,{tone:"danger",children:[h("span",{children:l("otp.reason_otp_mismatch")}),h("span",{children:Se(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Ot.has(e.reason)?h(N,{tone:"warning",children:h("span",{children:l(`otp.reason_${e.reason}`)})}):null,Z=U(lt,{children:[x,w!==null?h(N,{tone:"danger",children:h("span",{children:l(w)})}):null]});if(T){let I=O.length===0;return U("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":_,onSubmit:ue,noValidate:!0,children:[h(Y,{id:_,title:l("otp.verifyTitle"),lead:U(lt,{children:[me,h("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),d]})}),Z,U("div",{className:"sekyro-field",children:[h("label",{className:"sekyro-label",htmlFor:`${_}-code`,children:l("otp.codeLabel")}),h(Xe,{id:`${_}-code`,value:k,invalid:e.reason==="otp_mismatch",onChange:M=>{f(M),M.length===6&&k.length!==6&&!m&&!e.attemptsExhausted&&de(M)}}),h("span",{className:`sekyro-help sekyro-otp-expiry${X?" is-danger":""}`,"aria-hidden":!X||void 0,children:X?l("otp.expired"):l("otp.expiresIn",{time:At(F)})})]}),h("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:X?l("otp.expired"):""}),U(G,{children:[h(b,{type:"submit",full:!0,disabled:m||k.length!==6||e.attemptsExhausted,"aria-busy":m||void 0,children:l("otp.verify")}),I?h("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:m||W>0,onClick:()=>S(void 0,!0),children:W>0?l("otp.resendIn",{seconds:W}):l("otp.resend")}):W>0?h("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:W})}):h("div",{className:"sekyro-resend-row",children:O.map(M=>h("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:m,onClick:()=>S(M,!0),children:l("otp.resendBy",{channel:C(M)})},M))})]})]})}return U("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":_,onSubmit:ue,noValidate:!0,children:[h(Y,{id:_,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Z,e.needsPhone?h(Ht,{id:`${_}-phone`,label:l("otp.phoneLabel"),value:c,onChange:u,placeholder:l("otp.phonePlaceholder").replace(J,"").trim()}):h("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),h(G,{children:O.length>0?U("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[h("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),O.map((I,M)=>h(b,{kind:M===0?"primary":"ghost",full:!0,disabled:m||!P,"aria-busy":M===0&&m||void 0,onClick:()=>S(I),children:l("otp.sendBy",{channel:C(I)})},I))]}):h(b,{type:"submit",full:!0,disabled:m||!P,"aria-busy":m||void 0,children:l("otp.send")})})]})}i(Ne,"PhoneOtpStep");import{lazy as Ut,Suspense as Kt,useMemo as zt,useState as qt}from"react";import{Component as $t}from"react";var we=class we extends $t{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(we,"LoadBoundary");var z=we;import{jsx as te,jsxs as Yt}from"react/jsx-runtime";var Wt={load:i(()=>import("../email-otp-view-TL43KM5T.js"),"load")};function Pe({locale:e,strings:t,...n}){let s=v(e,t),[a,r]=qt(0),o=zt(()=>Ut(()=>Wt.load().then(c=>({default:c.EmailOtpView}))),[a]),l=Yt(N,{tone:"danger",children:[te("span",{children:s.t("errors.network_error")}),te(b,{kind:"ghost",onClick:()=>r(c=>c+1),children:s.t("common.retry")})]});return te(z,{fallback:l,children:te(Kt,{fallback:te("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:te(o,{...n,i18n:s})})},a)}i(Pe,"EmailOtpStep");import{lazy as Gt,Suspense as Qt,useMemo as Jt,useState as Xt}from"react";import{jsx as oe,jsxs as jt}from"react/jsx-runtime";var Zt={load:i(()=>import("../eid-view-EOTE4E3T.js"),"load")};function _e({locale:e,strings:t,...n}){let s=v(e,t),[a,r]=Xt(0),o=Jt(()=>Gt(()=>Zt.load().then(c=>({default:c.EidView}))),[a]),l=jt(N,{tone:"danger",children:[oe("span",{children:s.t("errors.network_error")}),oe(b,{kind:"ghost",onClick:()=>r(c=>c+1),children:s.t("common.retry")})]});return oe(z,{fallback:l,children:oe(Qt,{fallback:oe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:oe(o,{...n,i18n:s})})},a)}i(_e,"EidStep");import{useMemo as io}from"react";import{lazy as eo,Suspense as to,useMemo as oo,useState as no}from"react";import{jsx as ne,jsxs as so}from"react/jsx-runtime";var ro={load:i(()=>import("../flow-views-5ADJL2OW.js"),"load")};function E({view:e,i18n:t,quiet:n,...s}){let[a,r]=no(0),o=oo(()=>eo(()=>ro.load().then(c=>({default:c[e]}))),[e,a]),l=so(N,{tone:"danger",children:[ne("span",{children:t.t("errors.network_error")}),ne(b,{kind:"ghost",onClick:()=>r(c=>c+1),children:t.t("common.retry")})]});return ne(z,{fallback:l,children:ne(to,{fallback:n===!0?null:ne("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:ne(o,{...s,i18n:t})})},a)}i(E,"Flow");import{jsx as xe,jsxs as ao}from"react/jsx-runtime";function Ie({step:e,locale:t,strings:n,className:s,onError:a}){let r=v(t,n),{busy:o,error:l,run:c}=nt(r,a),u=io(()=>e.choice.options.flatMap(f=>{let m=ot(f,r),y=tt[f.service];return m===null?[]:[{id:f.id,label:m,glyph:y&&xe(q,{name:y})}]}),[e.choice.options,r]),k=e.choice.options.find(f=>f.service==="national_eid");return ao("div",{className:s,children:[xe(Qe,{title:r.t("method.title"),description:r.t("method.description"),options:u,busy:o,error:l,focus:!0,testId:"sekyro-method",onChoose:f=>c(()=>e.choose(f))}),k?.nationalEid?.afterPass==="continue"?xe(E,{view:"EidContinueHint",i18n:r,provider:k.nationalEid.providerName,quiet:!0}):null]})}i(Ie,"MethodChoice");import{isValidNni as lo,normalizeNni as pt}from"@sekyro/web";import{useId as po,useState as Ee}from"react";import{Fragment as co,jsx as V,jsxs as re}from"react/jsx-runtime";function Ve({step:e,locale:t,strings:n,className:s,onError:a}){let r=v(t,n),{t:o}=r,[l,c]=Ee(""),[u,k]=Ee(!1),[f,m]=Ee(null),y=po(),w=e.attemptsExhausted,D=i(async P=>{k(!0),m(null);try{await P()}catch(S){m(ee(S,r.strings)),a?.(S)}finally{k(!1)}},"run"),T=i(P=>{if(P.preventDefault(),e.source!=="typed"){D(()=>e.confirm());return}let S=pt(l);if(!/^\d{10}$/.test(S))return m("population.invalid");if(!lo(S))return m("population.reason_nni_invalid");D(()=>e.submitNni(S))},"onSubmit"),R=Se(r,e.attemptsRemaining,w),_=re(co,{children:[e.reason==="registry_unavailable"?re(N,{tone:"warning",children:[V("span",{children:o("population.reason_registry_unavailable")}),V("span",{children:R})]}):null,e.reason==="nni_not_found"&&e.canUseDocument?re(N,{tone:"warning",children:[V("span",{children:o("population.reason_nni_not_found_or_document")}),V("span",{children:R}),V(b,{kind:"ghost",disabled:u,onClick:()=>{D(()=>e.useDocument())},children:o("population.useDocument")})]}):null,e.reason==="nni_not_found"&&!e.canUseDocument||e.reason==="nni_invalid"?re(N,{tone:"danger",children:[V("span",{children:o(e.reason==="nni_not_found"?"population.reason_nni_not_found":"population.reason_nni_invalid")}),V("span",{children:R})]}):null,w&&e.reason===void 0?V(N,{tone:"danger",children:V("span",{children:R})}):null,f!==null?V(N,{tone:"danger",children:V("span",{children:o(f)})}):null]}),[$,O,g]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return re("form",{className:`sekyro-step${s?` ${s}`:""}`,"aria-labelledby":y,onSubmit:T,noValidate:!0,children:[V(Y,{id:y,title:o($),lead:o(O)}),_,e.source==="typed"?re("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:`${y}-nni`,children:o("population.label")}),V("input",{id:`${y}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:l,"aria-describedby":`${y}-nni-help`,"aria-invalid":f==="population.invalid"||f==="population.reason_nni_invalid"||void 0,onChange:P=>{m(null),c(pt(P.target.value).replace(/\D/g,"").slice(0,10))}}),V("span",{id:`${y}-nni-help`,className:"sekyro-help",children:o("population.helper")})]}):null,V(G,{children:w?null:V(b,{type:"submit",full:!0,disabled:u,"aria-busy":u||void 0,children:o(g)})})]})}i(Ve,"NniEntry");import{acceptedIssuers as ho,acceptedTypesFor as go,warmDocumentCapture as So}from"@sekyro/web";import{lazy as bo,Suspense as vo,useEffect as Co,useMemo as No,useState as ft}from"react";import{acceptedIssuers as uo,acceptedTypesFor as Le}from"@sekyro/web";import{useEffect as ct,useId as mo,useMemo as dt,useState as Te}from"react";import{jsx as L,jsxs as se}from"react/jsx-runtime";var ut=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),fo=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),yo=220;function ko(e,t){let n=null;try{n=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(r=>({code:r,name:n?.of(r)??r})),a=new Intl.Collator(e);return s.sort((r,o)=>r.code==="MR"?-1:o.code==="MR"?1:a.compare(r.name,o.name))}i(ko,"countryNames");function mt({step:e,i18n:t,issuer:n,onPicked:s}){let{t:a,locale:r}=t,o=dt(()=>uo(e.documents),[e.documents]),l=dt(()=>ko(r,o),[r,o]),c=o.length===1?o[0]:null,[u,k]=Te(n??c),[f,m]=Te(""),[y,w]=Te(null),D=mo(),T=c===null?[]:Le(e.documents,c),R=c!==null&&T.length===1?T[0]:null;ct(()=>{c!==null&&R!==null&&e.selectDocument(c,R)},[c,R]);let _=i((g,P)=>{e.selectDocument(g,P),s?.()},"pick"),$=i(g=>{let P=Le(e.documents,g);P.length===1?_(g,P[0]):k(g)},"chooseIssuer");if(ct(()=>{if(y===null||u===null)return;let g=setTimeout(()=>_(u,y),yo);return()=>clearTimeout(g)},[y]),R!==null)return null;if(u===null){let g=ut(f.trim()),P=g===""?l:l.filter(S=>ut(S.name).includes(g)||S.code.toLowerCase()===g);return se("section",{className:"sekyro-step",children:[L(Y,{title:a("doc.countryTitle"),lead:a("doc.pickDescription")}),se("div",{className:"sekyro-field",children:[L("label",{className:"sekyro-label",htmlFor:D,children:a("doc.countryLabel")}),L("input",{id:D,type:"search",className:"sekyro-input",placeholder:a("doc.countrySearch"),value:f,onChange:S=>m(S.target.value)})]}),P.length===0?L("p",{className:"sekyro-text-muted",children:a("doc.noCountryMatch")}):L("ul",{className:"sekyro-rows",children:P.map(S=>L("li",{children:se("button",{type:"button",className:"sekyro-row-btn",onClick:()=>$(S.code),children:[L("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:fo(S.code)}),S.name]})},S.code))}),L(G,{children:null})]})}let O=Le(e.documents,u);return se("section",{className:"sekyro-step",children:[L(Y,{title:a("doc.pickTitle"),lead:a("native.doc.holdIt")}),L("div",{className:"sekyro-choices",children:O.map(g=>se("button",{type:"button",className:"sekyro-card","aria-pressed":y===g,disabled:y!==null&&y!==g,onClick:()=>w(g),children:[L(q,{name:g==="passport"?"passport":"card"}),se("span",{className:"sekyro-card__body",children:[L("span",{className:"sekyro-card__title",children:a(`doc.type.${g}`)}),L("span",{className:"sekyro-card__sub",children:a(`doc.sub.${g}`)})]}),L("span",{className:"sekyro-radio","aria-hidden":"true"})]},g))}),o.length>1?L("button",{type:"button",className:"sekyro-link",onClick:()=>{k(null),w(null)},children:a("native.doc.changeCountry")}):null,L(G,{children:null})]})}i(mt,"DocumentPicker");import{jsx as Q,jsxs as Po}from"react/jsx-runtime";var wo={load:i(()=>import("../document-capture-view-BSK7QPBT.js"),"load")};function Re({step:e,locale:t,strings:n,className:s,liveMrz:a}){let r=v(t,n),[o,l]=ft(0),[c,u]=ft(null),k=ho(e.documents).length>1,f=e.issuer!==null&&go(e.documents,e.issuer).length>1,m=No(()=>bo(()=>wo.load().then(w=>({default:w.DocumentCaptureView}))),[o]);Co(()=>{So()},[]);let y=Po(N,{tone:"danger",children:[Q("span",{children:r.t("errors.network_error")}),Q(b,{kind:"ghost",onClick:()=>l(w=>w+1),children:r.t("doc.retryCamera")})]});return Q("div",{className:s,children:e.documentType===null||e.issuer===null||c!==null?Q(mt,{step:e,i18n:r,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>u(null)}):Q(z,{fallback:y,children:Q(vo,{fallback:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:Q(m,{step:e,i18n:r,liveMrz:a,...k?{onChangeCountry:i(()=>u("country"),"onChangeCountry")}:{},...f?{onChangeDocument:i(()=>u("document"),"onChangeDocument")}:{}})})},o)})}i(Re,"DocumentCapture");import{warmPortraitCapture as _o}from"@sekyro/web";import{Component as xo,lazy as Io,Suspense as Eo,useEffect as Vo,useMemo as Lo,useState as To}from"react";import{jsx as A,jsxs as De}from"react/jsx-runtime";var Ro={load:i(()=>import("../portrait-capture-view-YIONZJPI.js"),"load")},Be=class Be extends xo{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Be,"LoadBoundary");var Me=Be;function Mo({step:e,i18n:t}){let{t:n}=t,s=j();return De("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[A("h2",{ref:s,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?A("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?De(N,{tone:"danger",children:[A("span",{children:n("portrait.uploadFailed")}),A(b,{kind:"ghost",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):A("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Mo,"MatchPhase");function Ae({step:e,locale:t,strings:n,className:s,assetBaseUrl:a}){let r=v(t,n),[o,l]=To(0),c=Lo(()=>Io(()=>Ro.load().then(k=>({default:k.PortraitCaptureView}))),[o]);if(Vo(()=>{e.phase==="capture"&&_o()},[e.phase]),e.phase==="match")return A("div",{className:s,children:A(Mo,{step:e,i18n:r})});let u=De(N,{tone:"danger",children:[A("span",{children:r.t("errors.network_error")}),A(b,{kind:"ghost",onClick:()=>l(k=>k+1),children:r.t("portrait.retryCamera")})]});return A("div",{className:s,children:A(Me,{fallback:u,children:A(Eo,{fallback:A("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:A(c,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{}})})},o)})}i(Ae,"PortraitCapture");import{cameraUnavailableCauseOf as Jo}from"@sekyro/web";import{useCallback as pe,useEffect as Nt,useId as Xo,useRef as He,useState as ce}from"react";import{useId as Do,useState as Ao}from"react";import{jsx as ve,jsxs as yt}from"react/jsx-runtime";var Bo=["intro","data","processing","sharing","retention"];function kt({i18n:e,purpose:t="identity"}){let{t:n}=e,[s,a]=Ao(!1),r=Do(),[o,l=""]=n("consent.short").split("{terms}");return yt("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[yt("p",{className:"sekyro-text-muted",children:[o,ve("button",{type:"button",className:"sekyro-link","aria-expanded":s,"aria-controls":r,onClick:()=>a(c=>!c),children:n("consent.termsLink")}),l]}),ve("div",{id:r,hidden:!s,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:t==="human"?ve(E,{view:"HumanConsentTerms",i18n:e,quiet:!0}):Bo.map(c=>ve("p",{children:n(`consent.terms.${c}`)},c))})]})}i(kt,"ConsentNotice");function ht(e){let t=e.trim().split(/\s+/).filter(s=>s!=="");return(t.length>=2?[t[0],t[1]].map(s=>Array.from(s??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(ht,"initials");import{useSyncExternalStore as Oo}from"react";var St=i(e=>({colors:{...e?B.dark:B.light},radius:B.radiusLg,fontFamily:B.font}),"brandTheme"),Zr=St(!1);function bt(e,t,n){let s=ye(e);if(n&&s.colors!==void 0){let{brand:a,brandFg:r}=s.colors;a!==void 0&&Uo(a,B.dark.bg)>=3?s.colors={brand:a,ring:a,...r!==void 0?{brandFg:r}:{}}:delete s.colors}return ke(St(n),s,t)}i(bt,"verificationTheme");function vt(e){let t=Oo($o,Ho,()=>!1);return e==="dark"||e==="system"&&t}i(vt,"useDarkScheme");var Fo="(prefers-color-scheme: dark)",Ct=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Fo):null,"media"),Ho=i(()=>Ct()?.matches??!1,"prefersDark");function $o(e){let t=Ct();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i($o,"subscribe");function Uo(e,t){let[n,s]=[gt(e),gt(t)];return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}i(Uo,"contrast");function gt(e){let t=[1,3,5].map(n=>{let s=Number.parseInt(e.slice(n,n+2),16)/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(gt,"luminance");import{useEffect as Ko,useId as zo,useState as qo}from"react";import{jsx as H,jsxs as le}from"react/jsx-runtime";var Wo=new Set(["document_nni_mismatch","name_mismatch","birth_date_mismatch"]),Yo={approved:"M6.5 12.5l3.6 3.6 7.4-8.2",review:"M12 7v5l3.2 2",expired:"M8 5h8M8 19h8M9 5c0 4 6 5 6 7s-6 3-6 7M15 5c0 4-6 5-6 7s6 3 6 7",rejected:"M8 8l8 8M16 8l-8 8"};function Go({outcome:e}){return le("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[H("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),H("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),H("path",{className:"sekyro-outcome__glyph",d:Yo[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(Go,"OutcomeMark");function Qo({label:e,id:t,copied:n}){let[s,a]=qo(!1);return Ko(()=>{if(!s)return;let r=setTimeout(()=>a(!1),1600);return()=>clearTimeout(r)},[s]),le("button",{type:"button",className:`sekyro-reference${s?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[H("span",{"aria-live":"polite",children:s?n:e}),H("bdi",{dir:"ltr",children:t}),H(q,{name:"copy"})]})}i(Qo,"ReferenceLine");function Oe({step:e,locale:t,strings:n,className:s,onClose:a}){let r=v(t,n),{t:o}=r,l=zo(),c=j(),u=e.context.orgName,k=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",f;switch(e.display){case"policy_stop":{let m=e.failureReason??"";if(Wo.has(m))f=o("session.result.detailsMismatch",{org:u});else if(m==="device_velocity_exceeded")f=o("session.result.deviceVelocity",{org:u});else if(m==="capture_tampered")f=o("session.result.deviceStop");else if(m==="camera_unavailable")f=o("reasons.camera_unavailable",{org:u});else{let y=ze(m);f=y!==null?o(y,{org:u}):o("session.result.rejected.description")}break}case"cooldown":{let m=qe(r.locale,e.retryAfter);f=m!==null?o(m.key,{time:m.time}):o("reasons.device_cooldown");break}case"platform_unsupported":f=o("result.platform_unsupported");break;case"attempts_exhausted":f=o("common.noAttemptsLeft");break;default:f=u!==""?o(`native.result.${k}`,{org:u}):o(`session.result.${k}.description`)}return le("section",{className:`sekyro-result${s?` ${s}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[le("div",{className:"sekyro-result__body",children:[H(Go,{outcome:e.display==="cooldown"?"review":k}),le("div",{className:"sekyro-heading",children:[H("h2",{id:l,ref:c,tabIndex:-1,className:"sekyro-text-body",children:o(`session.result.${k}.title`)}),H("p",{className:"sekyro-text-muted",children:f})]}),H(Qo,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),a!==void 0?H("div",{className:"sekyro-actions",children:H(b,{full:!0,onClick:a,children:u!==""?o("native.result.back",{org:u}):o("native.close")})}):null]})}i(Oe,"VerificationResultScreen");import{Fragment as Fe,jsx as p,jsxs as K}from"react/jsx-runtime";function Zo(e,t){let n=t?B.dark:B.light,s=t?B.roles.dark:B.roles.light,a=e.colors??{},r={},o=a.fg===n.fg&&a.surface===n.surface;return a.brand===n.brand&&a.surface===n.surface&&(r["--sekyro-color-brand-soft"]=s.brandSoft),o&&(r["--sekyro-color-line"]=s.line,r["--sekyro-color-line-subtle"]=s.lineSubtle,r["--sekyro-color-line-strong"]=s.lineStrong,r["--sekyro-color-sunken"]=s.sunken),a.fgMuted===n.fgMuted&&a.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=s.fgSubtle),e.fontFamily===B.font&&(r["--sekyro-font-display"]=B.fontDisplay),r}i(Zo,"flowRoles");function $e(e){let{verification:t,locale:n,strings:s,onStep:a,onResult:r}=e,{step:o,error:l}=Ce(t);Nt(()=>{o!==null&&a?.(o)},[o,a]),Nt(()=>r===void 0?void 0:t.on("result",r),[t,r]);let c=vt(e.colorScheme??"light"),u=bt(o?.context.branding,e.theme,c),[k,f]=ce(!1),m=`sekyro-verification${c?" sekyro-verification--dark":""}${k?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,y=He(e.onClose);y.current=e.onClose;let w=He(o);w.current=o;let D=pe(()=>{let T=w.current;y.current?.(T?.kind==="result"?{reason:"finished",result:T.result}:{reason:"cancelled"})},[]);return p(he,{theme:u,className:m,children:p(ae,{locale:n,...s!==void 0?{strings:s}:{},children:p("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Zo(u,c),children:p(Ze.Provider,{value:f,children:p(ge.Provider,{value:e.onClose!==void 0?D:void 0,children:p(tn,{...e,step:o,error:l,immersive:k})})})})})})}i($e,"SekyroVerification");function jo(e,t){if(t===void 0)return null;let n=e,s=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof s=="string"&&s!==""&&typeof a=="string"&&a!==""?{title:s,description:a}:null}i(jo,"processingCopyOf");function en({error:e,retry:t}){let{t:n}=v(),s=j();return K(fe,{tone:"danger",testId:"sekyro-error-notice",children:[p("span",{children:n(Ke(e.kind))}),e.retryable?p(b,{ref:s,kind:"ghost",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}i(en,"CameraErrorNotice");function tn(e){let{step:t,error:n,slots:s,immersive:a}=e,r=v(),{t:o}=r,[l,c]=ce(!1),[u,k]=ce(0),[f,m]=ce(null),y=t?.context.purpose??"identity",w=e.verification,D=y==="human"||t?.context.cameraUnavailableHandled===!0,T=w.reportCameraUnavailable!==void 0&&D?d=>w.reportCameraUnavailable?.(d)??Promise.resolve():void 0,R=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,_=e.handoffUrl,$=pe((d,x)=>T===void 0?void 0:p(E,{view:"NoCameraView",i18n:r,quiet:!0,cause:x,onRetry:d,...R?{onContinue:T}:{},..._!==void 0?{handoffUrl:_}:{}}),[r,w,D,R,_]),O=pe((d,x)=>p(rt,{start:d,context:x,human:y==="human",extra:x.canChooseFacing&&p(Ge,{value:x.facing,onChange:x.setFacing}),notice:x.permissionSettled&&x.permission==="denied"?$(d,"denied"):void 0}),[y,$]),g=pe((d,x)=>{let Z=Jo(d.kind);return(Z!==void 0?$(x,Z):void 0)??K(Fe,{children:[p(en,{error:d,retry:x}),Z!==void 0&&_!==void 0?p(E,{view:"DesktopHandoffView",i18n:r,quiet:!0,url:_}):null]})},[$,_,r]),P=He(""),S=e.livenessProps?.slots?.stageOverlay,de=pe(d=>(d.guidance!==""&&!d.coached&&(P.current=d.guidance),p(st,{testId:"sekyro-capture-stage",video:p("video",{ref:d.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:d.guidance!==""?d.guidance:P.current,note:d.note,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:S?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>k(x=>x+1),"onClose")},end:d.switchCamera&&p("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":o("capture.switchCamera"),children:p(We,{})})})),[o,S]),ue=Xo();if(n!==null)return p(fe,{tone:"danger",children:p("span",{children:o(ee(n,r.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o("common.loading")});let{context:F}=t,W=i(d=>{c(!0),d().finally(()=>c(!1))},"refresh"),X=s?.header??p(nn,{context:F,headerId:ue,end:s?.headerEnd}),C,me=f===t.key&&t.context.switchable!==void 0;if(me)C=p(E,{view:"LaneChoiceView",i18n:r,step:t,onClose:()=>m(null)});else switch(t.kind){case"phone_otp":C=p(Ne,{step:t});break;case"email_otp":C=p(Pe,{step:t});break;case"method":C=p(Ie,{step:t});break;case"registry":C=p(Ve,{step:t});break;case"document":C=p(Re,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,x={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??O,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:g}:{}},...u>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:r.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};C=p(Ye.Provider,{value:de,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(E,{view:"LivePhotoLiveness",i18n:r,step:t,livenessProps:x,sekyroIntro:d===void 0},u):p(Je,{...x},u)});break}case"portrait":C=K(Fe,{children:[t.retakeOnly?p(E,{view:"PortraitRetakeNotice",i18n:r,quiet:!0}):null,p(Ae,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":C=p(E,{view:"ContactChoiceView",i18n:r,step:t});break;case"choice":C=p(E,{view:"GenericChoiceView",i18n:r,step:t});break;case"identity_summary":C=p(E,{view:"IdentitySummaryView",i18n:r,step:t});break;case"mobile_required":C=e.handoffUrl!==void 0?p(E,{view:"HandoffView",i18n:r,url:e.handoffUrl,refresh:t.refresh}):K(fe,{tone:"info",children:[p("strong",{children:o("handoff.title")}),p("span",{children:o("reasons.mobile_required")}),p(b,{kind:"ghost",disabled:l,onClick:()=>W(t.refresh),children:o("common.refresh")})]});break;case"processing":{let d=jo(r.strings,t.service);C=K("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[p("h2",{className:"sekyro-text-body",children:d?.title??o("session.processing.title")}),p("p",{className:"sekyro-text-muted",children:d?.description??o("session.processing.description")}),t.stalled?p(b,{kind:"ghost",disabled:l,onClick:()=>W(t.refresh),children:o("common.refresh")}):null]});break}case"eid":C=p(_e,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";C=K("section",{className:"sekyro-stack sekyro-stack--1",children:[p("h2",{className:"sekyro-text-body",children:o(d?"needsApp.title":"unsupported.title")}),p("p",{children:d?F.orgName!==""?o("needsApp.description",{org:F.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:F.orgName})})]});break}case"result":C=s?.result?.(t)??p(on,{step:t});break;default:{let d=t;C=null}}return K(Fe,{children:[a?null:X,!a&&t.kind!=="result"&&F.sections.length>1?p(rn,{context:F,current:t.section,i18n:r}):null,!a&&!F.consentRecorded&&t.kind!=="result"?p(kt,{i18n:r,purpose:F.purpose}):null,p(je,{pageKey:t.key,children:C}),!a&&!me&&t.kind!=="result"&&t.context.switchable!==void 0?p(E,{view:"LaneSwitch",i18n:r,step:t,onOpen:()=>m(t.key),quiet:!0},t.key):null,a?null:s?.footer!==void 0?s.footer:F.branding?.hideAttribution===!0?null:K("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[p(q,{name:"lock"}),o("shell.verifiedBy")]})]})}i(tn,"Body");function on({step:e}){return p(ge.Consumer,{children:t=>p(Oe,{step:e,...t!==void 0?{onClose:t}:{}})})}i(on,"ResultPage");function nn({context:e,headerId:t,end:n}){let{t:s}=v(),[a,r]=ce(!1),o=a?void 0:e.branding?.logoUrl,l=e.orgName!==""?e.orgName:s(e.returning?"returning.title":"session.title");return K("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[K("div",{className:"sekyro-org",children:[p("span",{className:"sekyro-org__tile","aria-hidden":"true",children:o!==void 0?p("img",{className:"sekyro-org__logo",src:o,alt:"",onError:()=>r(!0)}):ht(e.orgName)}),K("div",{className:"sekyro-org__text",children:[p("h1",{id:t,className:"sekyro-org__name",children:l}),p("p",{className:"sekyro-org__sub",children:s(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),n!=null?p("div",{className:"sekyro-org__end",children:n}):null,p(ge.Consumer,{children:c=>c!==void 0?p("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":s("native.close"),onClick:c,children:p(q,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:s("returning.description")}):null]})}i(nn,"OrgHeader");function rn({context:e,current:t,i18n:n}){let s=t===null?-1:e.sections.indexOf(t),a=e.progress,r=a!==void 0&&a.length===e.sections.length?a:e.sections.map((o,l)=>({id:o,state:l<s?"done":l===s?"current":"upcoming"}));return p("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:r.map(({id:o,state:l})=>p("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:p("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(rn,"SectionProgress");import{useEffect as an,useState as wt}from"react";var sn=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Ue(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return sn.test(t)}i(Ue,"isInAppBrowser");import{jsx as ie}from"react/jsx-runtime";function ln(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(ln,"pageUrl");function pn({hostedUrl:e,inAppBrowser:t,...n}){let[s,a]=wt(t===!0);an(()=>{t===void 0&&Ue()&&a(!0)},[t]);let[r,o]=wt(!1),l=n.handoffUrl??e??ln();return s&&!r?ie(he,{theme:ke(ye(void 0),n.theme),...n.className!==void 0?{className:n.className}:{},children:ie(ae,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:ie("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-stack sekyro-stack--4",children:ie(cn,{url:l,onContinue:()=>o(!0)})})})}):ie($e,{...n,...l!==""?{handoffUrl:l}:{}})}i(pn,"SekyroFlow");function cn({url:e,onContinue:t}){let n=v();return ie(E,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(cn,"Prompt");export{Re as DocumentCapture,_e as EidStep,Pe as EmailOtpStep,Ie as MethodChoice,Ve as NniEntry,Ne as PhoneOtpStep,Ae as PortraitCapture,pn as SekyroFlow,$e as SekyroVerification,ae as StepI18nProvider,Oe as VerificationResultScreen,xt as arSteps,It as enSteps,Vt as formatTemplate,Et as frSteps,Ue as isInAppBrowser,Pt as loadSekyroLocale,Lt as resolveSekyroStrings,_t as retakeHintStringKey,v as useStepI18n,Ce as useVerificationStep};