@sekyro/react 0.1.0-rc.14 → 0.1.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +2 -4
- package/dist/chunk-5TOBG5R2.js +2 -0
- package/dist/chunk-7MMT5M4E.js +2 -0
- package/dist/{chunk-TS3UFW5B.js → chunk-FNBG3472.js} +1 -1
- package/dist/chunk-GGTRTUW3.js +2 -0
- package/dist/{chunk-TLHEN5T3.js → chunk-IT66PZDO.js} +1 -1
- package/dist/chunk-IUQTOOBI.js +2 -0
- package/dist/{chunk-JCCXPYU4.js → chunk-KHBM3P4C.js} +1 -1
- package/dist/{chunk-6EP4O2CE.js → chunk-NXVTUTKS.js} +1 -1
- package/dist/{chunk-Z43XZ75N.js → chunk-OUG465K6.js} +1 -1
- package/dist/{chunk-AIBCIUYT.js → chunk-XDPCJAYO.js} +1 -1
- package/dist/document-capture-view-PUGWMQAP.js +2 -0
- package/dist/{eid-view-BKKVB5QT.js → eid-view-IMKKBPQV.js} +1 -1
- package/dist/{email-otp-view-56JMHX3M.js → email-otp-view-YLMRRLC3.js} +1 -1
- package/dist/flow-views-HFQJ45NS.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/overlay-de-ZICWH4MW.js +2 -0
- package/dist/overlay-es-2ETCIRV4.js +2 -0
- package/dist/overlay-pt-2DX57E2U.js +2 -0
- package/dist/{portrait-capture-view-JYTBBXFU.js → portrait-capture-view-M5OLPMMO.js} +1 -1
- package/dist/{theme-qTwMxyZM.d.ts → theme-DuvMUYA9.d.cts} +8 -2
- package/dist/{theme-qTwMxyZM.d.cts → theme-DuvMUYA9.d.ts} +8 -2
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +15 -4
- package/dist/verification/index.d.ts +15 -4
- package/dist/verification/index.js +1 -1
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-IJE64ZEN.js +0 -2
- package/dist/chunk-UFAOAYQY.js +0 -2
- package/dist/chunk-VKSX4KC3.js +0 -2
- package/dist/document-capture-view-6NADWNPQ.js +0 -2
- package/dist/flow-views-7FMODRP7.js +0 -2
- package/dist/overlay-de-PSIG4NLI.js +0 -2
- package/dist/overlay-es-36OOIBXG.js +0 -2
- package/dist/overlay-pt-NWIPFF4D.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-
|
|
2
|
-
export { k as StringKey, A as retakeHintStringKey } from '../theme-
|
|
1
|
+
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-DuvMUYA9.cjs';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-DuvMUYA9.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -93,6 +93,9 @@ interface StepStrings {
|
|
|
93
93
|
"doc.cameraBlockedHint": string;
|
|
94
94
|
"doc.retryCamera": string;
|
|
95
95
|
"doc.holdUpright": string;
|
|
96
|
+
"doc.ageStepUp": string;
|
|
97
|
+
"reasons.underage_estimated": string;
|
|
98
|
+
"reasons.starter_credit_claimed": string;
|
|
96
99
|
"dcv2.sensing": string;
|
|
97
100
|
"dcv2.too_far": string;
|
|
98
101
|
"dcv2.too_close": string;
|
|
@@ -113,6 +116,8 @@ interface StepStrings {
|
|
|
113
116
|
"handoff.title": string;
|
|
114
117
|
"session.processing.age_estimation.title": string;
|
|
115
118
|
"session.processing.age_estimation.description": string;
|
|
119
|
+
"session.processing.aml_screening.title": string;
|
|
120
|
+
"session.processing.aml_screening.description": string;
|
|
116
121
|
"session.result.approved.title": string;
|
|
117
122
|
"session.result.approved.description": string;
|
|
118
123
|
"session.result.review.title": string;
|
|
@@ -407,7 +412,7 @@ interface StepStrings {
|
|
|
407
412
|
}
|
|
408
413
|
|
|
409
414
|
/**
|
|
410
|
-
* Loads the copy of
|
|
415
|
+
* Loads the copy of an overlay locale (es, pt, de); resolves at once for ar/fr/en. The components load it by
|
|
411
416
|
* themselves (they render once it is there); call it ahead to have the copy ready on the first render. A failed
|
|
412
417
|
* download leaves the locale on English.
|
|
413
418
|
*/
|
|
@@ -493,10 +498,16 @@ declare function DocumentCapture({ step, locale, strings, className, liveMrz, }:
|
|
|
493
498
|
liveMrz?: DocumentLiveMrzOptions;
|
|
494
499
|
}): react.JSX.Element;
|
|
495
500
|
|
|
496
|
-
declare function PortraitCapture({ step, locale, strings, className, assetBaseUrl, }: StepComponentProps & {
|
|
501
|
+
declare function PortraitCapture({ step, locale, strings, className, assetBaseUrl, verification, }: StepComponentProps & {
|
|
497
502
|
step: PortraitStepHandle;
|
|
498
503
|
/** Self-hosted MediaPipe assets (wasm fileset + `face_landmarker.task`); default `/models-v3`. */
|
|
499
504
|
assetBaseUrl?: string;
|
|
505
|
+
/**
|
|
506
|
+
* The session's verification: under capture mode `choice` (design 2026-11-04 §4.5) the person picks who films
|
|
507
|
+
* before the camera opens, when the portrait is the first camera step (a pick made at the liveness step holds).
|
|
508
|
+
* Without it the camera follows the step handle (`self` until a pick).
|
|
509
|
+
*/
|
|
510
|
+
verification?: Verification;
|
|
500
511
|
}): react.JSX.Element;
|
|
501
512
|
|
|
502
513
|
/** `system` follows the device (prefers-color-scheme). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-
|
|
2
|
-
export { k as StringKey, A as retakeHintStringKey } from '../theme-
|
|
1
|
+
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-DuvMUYA9.js';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-DuvMUYA9.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -93,6 +93,9 @@ interface StepStrings {
|
|
|
93
93
|
"doc.cameraBlockedHint": string;
|
|
94
94
|
"doc.retryCamera": string;
|
|
95
95
|
"doc.holdUpright": string;
|
|
96
|
+
"doc.ageStepUp": string;
|
|
97
|
+
"reasons.underage_estimated": string;
|
|
98
|
+
"reasons.starter_credit_claimed": string;
|
|
96
99
|
"dcv2.sensing": string;
|
|
97
100
|
"dcv2.too_far": string;
|
|
98
101
|
"dcv2.too_close": string;
|
|
@@ -113,6 +116,8 @@ interface StepStrings {
|
|
|
113
116
|
"handoff.title": string;
|
|
114
117
|
"session.processing.age_estimation.title": string;
|
|
115
118
|
"session.processing.age_estimation.description": string;
|
|
119
|
+
"session.processing.aml_screening.title": string;
|
|
120
|
+
"session.processing.aml_screening.description": string;
|
|
116
121
|
"session.result.approved.title": string;
|
|
117
122
|
"session.result.approved.description": string;
|
|
118
123
|
"session.result.review.title": string;
|
|
@@ -407,7 +412,7 @@ interface StepStrings {
|
|
|
407
412
|
}
|
|
408
413
|
|
|
409
414
|
/**
|
|
410
|
-
* Loads the copy of
|
|
415
|
+
* Loads the copy of an overlay locale (es, pt, de); resolves at once for ar/fr/en. The components load it by
|
|
411
416
|
* themselves (they render once it is there); call it ahead to have the copy ready on the first render. A failed
|
|
412
417
|
* download leaves the locale on English.
|
|
413
418
|
*/
|
|
@@ -493,10 +498,16 @@ declare function DocumentCapture({ step, locale, strings, className, liveMrz, }:
|
|
|
493
498
|
liveMrz?: DocumentLiveMrzOptions;
|
|
494
499
|
}): react.JSX.Element;
|
|
495
500
|
|
|
496
|
-
declare function PortraitCapture({ step, locale, strings, className, assetBaseUrl, }: StepComponentProps & {
|
|
501
|
+
declare function PortraitCapture({ step, locale, strings, className, assetBaseUrl, verification, }: StepComponentProps & {
|
|
497
502
|
step: PortraitStepHandle;
|
|
498
503
|
/** Self-hosted MediaPipe assets (wasm fileset + `face_landmarker.task`); default `/models-v3`. */
|
|
499
504
|
assetBaseUrl?: string;
|
|
505
|
+
/**
|
|
506
|
+
* The session's verification: under capture mode `choice` (design 2026-11-04 §4.5) the person picks who films
|
|
507
|
+
* before the camera opens, when the portrait is the first camera step (a pick made at the liveness step holds).
|
|
508
|
+
* Without it the camera follows the step handle (`self` until a pick).
|
|
509
|
+
*/
|
|
510
|
+
verification?: Verification;
|
|
500
511
|
}): react.JSX.Element;
|
|
501
512
|
|
|
502
513
|
/** `system` follows the device (prefers-color-scheme). */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as zt}from"../chunk-Z43XZ75N.js";import{a as L,d as Ot,e as Ce,f as Le,g as Vt,h as Dt}from"../chunk-TLHEN5T3.js";import{a as Bt}from"../chunk-EZ5TVL6P.js";import{a as $t}from"../chunk-YY76AMUA.js";import{a as Ut,b as Kt,c as Gt,d as Wt}from"../chunk-TS3UFW5B.js";import{a as q}from"../chunk-PYAJMHZH.js";import{b as Mt,c as Rt,e as At,h as Lt}from"../chunk-UFAOAYQY.js";import{b as Tt}from"../chunk-JCCXPYU4.js";import{a as oe,b as ne,c as Oe,d as Ft,g as Ht}from"../chunk-6EP4O2CE.js";import{a as ce}from"../chunk-VRDPGOXM.js";import{a as Oo,b as Vo,c as Do,d as Bo,e as Fo,f as Ne,g as x}from"../chunk-VKSX4KC3.js";import{a as I,b as Ve}from"../chunk-AIBCIUYT.js";import{a as N,c as _t,i as Ao,k as Lo,l as xt,m as It,n as Et,t as Ae,u as le}from"../chunk-IJE64ZEN.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as Ho,useState as Yt}from"react";function Ge(e){let[t,o]=Yt(()=>e?.currentStep?.()??null),[n,a]=Yt(null);return Ho(()=>{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 i=!0,r=e.on("step",l=>{i&&o(l)});return e.run().then(l=>{i&&o(c=>c??l)},l=>{i&&a(l)}),()=>{i=!1,r()}},[e]),{step:t,error:n}}s(Ge,"useVerificationStep");import{useEffect as eo,useId as Ko,useMemo as Go,useRef as to,useState as ie}from"react";var $o="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",Zt;function qt(e){return Zt??(Zt=new Map($o.split(" ").map(t=>{let[o,n]=t.slice(2).split("/");return[t.slice(0,2),[o,n]]}))),Zt.get(e.toUpperCase())}s(qt,"entryOf");function Jt(e){return qt(e)?.[0]}s(Jt,"dialCodeOf");function Qt(e){return qt(e)?.[1]}s(Qt,"nationalPrefixOf");import{normalizeNni as Uo}from"@sekyro/web";function De(e){let t=Uo(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(De,"digitsOf");var We=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function ze(e,t){let o="",n=0;for(let a of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])n<e.length&&(o+=(n>0?" ":"")+e.slice(n,n+a)),n+=a;return o+e.slice(n)}s(ze,"groupDigits");function Xt(e,t){let o=0;for(let n=t;n>0&&o<e.length;o+=1)e[o]!==" "&&(n-=1);return o}s(Xt,"caretAfter");var Ye=s((e,t)=>t.find(o=>e.startsWith(o.dial)),"countryOfNumber"),jt=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as io,jsx as g,jsxs as B}from"react/jsx-runtime";var oo=s((e,t)=>{if(e===void 0)return 0;let o=Date.parse(e)-t;return Number.isFinite(o)?Math.max(0,Math.ceil(o/1e3)):0},"secondsUntil"),Wo=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),zo=["whatsapp","sms"],Yo=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_number_invalid","otp_number_not_mobile"]);function no(e){let t=De(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(no,"normalizedPhone");var Zo=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function qo(e){let t=[];for(let o of e.phoneCountries??["MR"]){let n=e.phoneRules?.find(i=>i.code===o),a=n?.dial??Jt(o);a!==void 0&&!t.some(i=>i.code===o)&&t.push({code:o,dial:`+${a}`,...n!==void 0?{rule:n}:{}})}return t}s(qo,"phoneCountriesOf");function Jo(e,t){if(t===null||!e.startsWith(t.dial))return no(e);let o=e.slice(t.dial.length).replace(/\D/g,""),n=Qt(t.code);return n!==void 0&&o.startsWith(n)&&(o=o.slice(n.length)),no(t.dial+o)}s(Jo,"e164Of");var ro=s((e,t)=>(Ye(e,t)??t[0])?.code??null,"countryFor");function Qo(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return o=>`${t?.of(o.code)??o.code} (${o.dial})`}s(Qo,"countryLabels");var so="other";function Ze({step:e,locale:t,strings:o,className:n,defaultPhone:a,onError:i}){let r=x(t,o),{t:l}=r,c=Go(()=>qo(e),[e.phoneCountries,e.phoneRules]),f=a??c[0]?.dial??"",[k,y]=ie(()=>ro(f,c)),S=c.map(d=>d.code).join(",");eo(()=>{if(k===null||!c.some(d=>d.code===k)){let d=ro(f,c);y(d);let h=E.current,te=c.find(Y=>Y.code===d)?.dial;te!==void 0&&D(Y=>h!==null&&Y.startsWith(h.dial)?te+Y.slice(h.dial.length):Y.startsWith("+")?Y:te)}},[S,f]);let m=c.find(d=>d.code===k)??null,E=to(m);m!==null&&(E.current=m);let[P,D]=ie(f),[w,T]=ie(!1),[K,G]=ie(!1),[b,O]=ie(""),[C,W]=ie(!1),[F,H]=ie(null),J=e.phase==="verify",Ie=$t(J),v=Ko(),he=to(null);eo(()=>{let d=setTimeout(()=>he.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(d)},[J]);let u=s(async d=>{W(!0),H(null);try{await d()}catch(h){H(ce(h,r.strings)),i?.(h)}finally{W(!1)}},"run"),_=zo.filter(d=>(e.channels??[]).includes(d)),Q=e.phoneInternational===!0,ge=w||m===null,X=ge||P.startsWith("+")&&!P.startsWith(m.dial),se=X?void 0:m.rule,yt=X?P:P.replace(m.dial,"").replace(/\D/g,""),j=se?We(yt,se):yt,ht=X&&!ge&&!Q&&e.phoneRules?.length&&!c.some(d=>d.dial.startsWith(P)),He=ht?null:se?se.lengths.includes(j.length)?m.dial+j:null:ge&&!P.startsWith("+")?null:Jo(P,w?null:m),Ee=!e.needsPhone||He!==null,Te=s((d,h=!1)=>{u(()=>e.send({...e.needsPhone&&(!h||P!==f)?{phone:He??P}:{},...d!==void 0?{channel:d}:{}}))},"send"),gt=s(d=>{u(()=>e.verify(d))},"submitCode"),St=s(d=>{d.preventDefault(),J?gt(b):_.length<=1&&Ee&&Te(_[0])},"onSubmit"),Eo=s(d=>{let h=d.target,te=d.nativeEvent.inputType,Y=Math.max(0,h.value.lastIndexOf("+")),ae=De(h.value.slice(Y)),ke=Ye(ae,c),be=De(h.value.slice(Y,h.selectionStart)).length,Ue=ae,Nt=ae;if(G(!1),!ke&&(ge||ae.startsWith("+")))Q&&T(!0);else{let ve=ke??m,Z=ke?ae.slice(ke.dial.length):ae;if(y(ve.code),T(!1),Z===j&&te?.startsWith("delete")&&(te.endsWith("Forward")||(be-=1),Z=Z.slice(0,be)+Z.slice(be+1)),ve.rule){let Ke=We(Z,ve.rule),wt=Z.length-Ke.length;be-=wt,Z=wt>0&&!ke&&j.length===Ke.length?j:Ke}Nt=ve.dial+Z,Ue=ze(Z,ve.rule)}D(Nt),h.value=Ue;let Pt=Xt(Ue,be);h.setSelectionRange(Pt,Pt)},"onNumber"),Me=ht?l("otp.reason_otp_destination_not_allowed"):K&&se?l("otp.phoneLengthError",{digits:jt(se,l("otp.or"))}):"",kt=c.length>1||Q,ee=`${v}-phone`,bt=oo(e.codeExpiresAt,Ie),Se=oo(e.resendAvailableAt,Ie),Re=J&&e.codeExpiresAt!==void 0&&bt===0,$e=s(d=>l(d==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[To,Mo]=l("otp.sentTo",{channel:$e(e.channel)}).split("{number}"),Ro=e.reason==="otp_mismatch"?B(I,{tone:"danger",children:[g("span",{children:l("otp.reason_otp_mismatch")}),g("span",{children:Ve(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Yo.has(e.reason)?g(I,{tone:"warning",children:g("span",{children:l(`otp.reason_${e.reason}`)})}):null,vt=B(io,{children:[Ro,F!==null?g(I,{tone:"danger",children:g("span",{children:l(F)})}):null]});if(J){let d=_.length===0;return B("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":v,onSubmit:St,noValidate:!0,children:[g(oe,{id:v,title:l("otp.verifyTitle"),lead:B(io,{children:[To,g("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),Mo]})}),vt,B("div",{className:"sekyro-field",children:[g("label",{className:"sekyro-label",htmlFor:`${v}-code`,children:l("otp.codeLabel")}),g(Bt,{id:`${v}-code`,value:b,invalid:e.reason==="otp_mismatch",onChange:h=>{O(h),h.length===6&&b.length!==6&&!C&&!e.attemptsExhausted&>(h)}}),g("span",{className:`sekyro-help sekyro-otp-expiry${Re?" is-danger":""}`,"aria-hidden":!Re||void 0,children:Re?l("otp.expired"):l("otp.expiresIn",{time:Wo(bt)})})]}),g("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:Re?l("otp.expired"):""}),B(ne,{children:[g(N,{type:"submit",full:!0,disabled:C||b.length!==6||e.attemptsExhausted,"aria-busy":C||void 0,children:l("otp.verify")}),d?g("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:C||Se>0,onClick:()=>Te(void 0,!0),children:Se>0?l("otp.resendIn",{seconds:Se}):l("otp.resend")}):Se>0?g("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Se})}):g("div",{className:"sekyro-resend-row",children:_.map(h=>g("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:C,onClick:()=>Te(h,!0),children:l("otp.resendBy",{channel:$e(h)})},h))})]})]})}let Ct=Qo(r.locale);return B("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":v,onSubmit:St,noValidate:!0,children:[g(oe,{id:v,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),vt,e.needsPhone?B("div",{className:"sekyro-field",children:[g("label",{className:"sekyro-label",htmlFor:ee,children:l("otp.phoneLabel")}),B("div",{className:"sekyro-phone",dir:"ltr",children:[m===null||X&&!w?null:B("div",{className:"sekyro-phone__lead",children:[kt?B("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${l("otp.countryLabel")}: ${w?l("otp.otherCountry"):Ct(m)}`,value:w?so:m.code,onChange:d=>{G(!1);let h=c.find(te=>te.code===d.target.value);T(h===void 0),h!==void 0&&y(h.code),D(h===void 0?"":h.dial+(X?"":j))},children:[c.map(d=>g("option",{value:d.code,children:Ct(d)},d.code)),Q?g("option",{value:so,children:l("otp.otherCountry")}):null]}):null,B("span",{className:"sekyro-phone__dial",id:`${ee}-dial`,"aria-hidden":kt||void 0,children:[g("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:w?"🌐":Zo(m.code)}),w?null:m.dial]})]}),g("input",{ref:he,id:ee,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${X?"":`${ee}-dial ${ee}-hint `}${Me?`${ee}-error`:""}`.trim()||void 0,"aria-invalid":!!Me||void 0,placeholder:ge?"+":void 0,value:X?P:ze(j,se),onChange:Eo,onKeyDown:d=>{d.key==="Enter"&&!Ee&&G(!0)},onBlur:d=>{d.relatedTarget?.tagName!=="SELECT"&&G(j!==""&&He===null)}})]}),X?null:g("span",{className:"sekyro-help",id:`${ee}-hint`,children:l("otp.phonePlaceholderGeneric")}),Me?g("span",{className:"sekyro-help is-danger",id:`${ee}-error`,role:"alert",children:Me}):null]}):g("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),g(ne,{children:_.length>0?B("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[g("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),_.map((d,h)=>g(N,{kind:h===0?"primary":"ghost",full:!0,disabled:C||!Ee,"aria-busy":h===0&&C||void 0,onClick:()=>Te(d),children:l("otp.sendBy",{channel:$e(d)})},d))]}):g(N,{type:"submit",full:!0,disabled:C||!Ee,"aria-busy":C||void 0,children:l("otp.send")})})]})}s(Ze,"PhoneOtpStep");import{lazy as jo,Suspense as en,useMemo as tn,useState as on}from"react";import{Component as Xo}from"react";var qe=class qe 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}};s(qe,"LoadBoundary");var z=qe;import{jsx as pe,jsxs as rn}from"react/jsx-runtime";var nn={load:s(()=>import("../email-otp-view-56JMHX3M.js"),"load")};function Je({locale:e,strings:t,...o}){let n=x(e,t),[a,i]=on(0),r=tn(()=>jo(()=>nn.load().then(c=>({default:c.EmailOtpView}))),[a]),l=rn(I,{tone:"danger",children:[pe("span",{children:n.t("errors.network_error")}),pe(N,{kind:"ghost",onClick:()=>i(c=>c+1),children:n.t("common.retry")})]});return pe(z,{fallback:l,children:pe(en,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:pe(r,{...o,i18n:n})})},a)}s(Je,"EmailOtpStep");import{lazy as sn,Suspense as an,useMemo as ln,useState as cn}from"react";import{jsx as ue,jsxs as un}from"react/jsx-runtime";var pn={load:s(()=>import("../eid-view-BKKVB5QT.js"),"load")};function Qe({locale:e,strings:t,...o}){let n=x(e,t),[a,i]=cn(0),r=ln(()=>sn(()=>pn.load().then(c=>({default:c.EidView}))),[a]),l=un(I,{tone:"danger",children:[ue("span",{children:n.t("errors.network_error")}),ue(N,{kind:"ghost",onClick:()=>i(c=>c+1),children:n.t("common.retry")})]});return ue(z,{fallback:l,children:ue(an,{fallback:ue("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:ue(r,{...o,i18n:n})})},a)}s(Qe,"EidStep");import{useMemo as Sn}from"react";import{lazy as dn,Suspense as mn,useMemo as fn,useState as yn}from"react";import{jsx as de,jsxs as gn}from"react/jsx-runtime";var hn={load:s(()=>import("../flow-views-7FMODRP7.js"),"load")};function M({view:e,i18n:t,quiet:o,...n}){let[a,i]=yn(0),r=fn(()=>dn(()=>hn.load().then(c=>({default:c[e]}))),[e,a]),l=gn(I,{tone:"danger",children:[de("span",{children:t.t("errors.network_error")}),de(N,{kind:"ghost",onClick:()=>i(c=>c+1),children:t.t("common.retry")})]});return de(z,{fallback:l,children:de(mn,{fallback:o===!0?null:de("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:de(r,{...n,i18n:t})})},a)}s(M,"Flow");import{jsx as Xe,jsxs as kn}from"react/jsx-runtime";function je({step:e,locale:t,strings:o,className:n,onError:a}){let i=x(t,o),{busy:r,error:l,run:c}=Gt(i,a),f=Sn(()=>e.choice.options.flatMap(y=>{let S=Kt(y,i),m=Ut[y.service];return S===null?[]:[{id:y.id,label:S,glyph:m&&Xe(q,{name:m})}]}),[e.choice.options,i]),k=e.choice.options.find(y=>y.service==="national_eid");return kn("div",{className:n,children:[Xe(At,{title:i.t("method.title"),description:i.t("method.description"),options:f,busy:r,error:l,focus:!0,testId:"sekyro-method",onChoose:y=>c(()=>e.choose(y))}),k?.nationalEid?.afterPass==="continue"?Xe(M,{view:"EidContinueHint",i18n:i,provider:k.nationalEid.providerName,quiet:!0}):null]})}s(je,"MethodChoice");import{isValidNni as bn,normalizeNni as ao}from"@sekyro/web";import{useId as vn,useState as et}from"react";import{Fragment as wn,jsx as R,jsxs as me}from"react/jsx-runtime";var Cn=new Set(["nni_not_found","registry_record_not_found"]),Nn=new Set(["nni_invalid","id_number_invalid"]);function Be({step:e,locale:t,strings:o,className:n,onError:a}){let i=x(t,o),{t:r}=i,[l,c]=et(""),[f,k]=et(!1),[y,S]=et(null),m=vn(),E=e.attemptsExhausted,P=s(async W=>{k(!0),S(null);try{await W()}catch(F){S(ce(F,i.strings)),a?.(F)}finally{k(!1)}},"run"),D=s(W=>{if(W.preventDefault(),e.source!=="typed"){P(()=>e.confirm());return}let F=ao(l);if(!/^\d{10}$/.test(F))return S("population.invalid");if(!bn(F))return S("population.reason_id_number_invalid");P(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(F):e.submitNni(F))},"onSubmit"),w=Ve(i,e.attemptsRemaining,E),T=e.reason!==void 0&&Cn.has(e.reason),K=e.reason!==void 0&&Nn.has(e.reason),G=me(wn,{children:[e.reason==="registry_unavailable"?me(I,{tone:"warning",children:[R("span",{children:r("population.reason_registry_unavailable")}),R("span",{children:w})]}):null,T&&e.canUseDocument?me(I,{tone:"warning",children:[R("span",{children:r("population.reason_registry_record_not_found_or_document")}),R("span",{children:w}),R(N,{kind:"ghost",disabled:f,onClick:()=>{P(()=>e.useDocument())},children:r("population.useDocument")})]}):null,T&&!e.canUseDocument||K?me(I,{tone:"danger",children:[R("span",{children:r(T?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),R("span",{children:w})]}):null,E&&e.reason===void 0?R(I,{tone:"danger",children:R("span",{children:w})}):null,y!==null?R(I,{tone:"danger",children:R("span",{children:r(y)})}):null]}),[b,O,C]=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 me("form",{className:`sekyro-step${n?` ${n}`:""}`,"aria-labelledby":m,onSubmit:D,noValidate:!0,children:[R(oe,{id:m,title:r(b),lead:r(O)}),G,e.source==="typed"?me("div",{className:"sekyro-field",children:[R("label",{className:"sekyro-label",htmlFor:`${m}-id-number`,children:r("population.label")}),R("input",{id:`${m}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:l,"aria-describedby":`${m}-id-number-help`,"aria-invalid":y==="population.invalid"||y==="population.reason_id_number_invalid"||void 0,onChange:W=>{S(null),c(ao(W.target.value).replace(/\D/g,"").slice(0,10))}}),R("span",{id:`${m}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,R(ne,{children:E?null:R(N,{type:"submit",full:!0,disabled:f,"aria-busy":f||void 0,children:r(C)})})]})}s(Be,"IdNumberEntry");function Pn(e){return Be(e)}s(Pn,"NniEntry");import{acceptedIssuers as Mn,acceptedTypesFor as Rn,warmDocumentCapture as An}from"@sekyro/web";import{lazy as Ln,Suspense as On,useEffect as Vn,useMemo as Dn,useState as mo}from"react";import{acceptedIssuers as _n,acceptedTypesFor as tt}from"@sekyro/web";import{useEffect as lo,useId as xn,useMemo as co,useState as ot}from"react";import{jsx as A,jsxs as fe}from"react/jsx-runtime";var po=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),In=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),En=220;function Tn(e,t,o=[]){let n=null;try{n=new Intl.DisplayNames([e],{type:"region"})}catch{}let a=t.map(l=>({code:l,name:n?.of(l)??l})),i=new Intl.Collator(e),r=s(l=>{let c=o.indexOf(l);return c<0?o.length:c},"rank");return a.sort((l,c)=>r(l.code)-r(c.code)||i.compare(l.name,c.name))}s(Tn,"countryNames");function uo({step:e,i18n:t,issuer:o,onPicked:n}){let{t:a,locale:i}=t,r=co(()=>_n(e.documents),[e.documents]),l=co(()=>Tn(i,r,Object.keys(e.documents.byIssuer??{})),[i,r,e.documents]),c=r.length===1?r[0]:null,[f,k]=ot(o??c),[y,S]=ot(""),[m,E]=ot(null),P=xn(),D=c===null?[]:tt(e.documents,c),w=c!==null&&D.length===1?D[0]:null;lo(()=>{c!==null&&w!==null&&e.selectDocument(c,w)},[c,w]);let T=s((b,O)=>{e.selectDocument(b,O),n?.()},"pick"),K=s(b=>{let O=tt(e.documents,b);O.length===1?T(b,O[0]):k(b)},"chooseIssuer");if(lo(()=>{if(m===null||f===null)return;let b=setTimeout(()=>T(f,m),En);return()=>clearTimeout(b)},[m]),w!==null)return null;if(f===null){let b=po(y.trim()),O=b===""?l:l.filter(C=>po(C.name).includes(b)||C.code.toLowerCase()===b);return fe("section",{className:"sekyro-step",children:[A(oe,{title:a("doc.countryTitle"),lead:a("doc.pickDescription")}),fe("div",{className:"sekyro-field",children:[A("label",{className:"sekyro-label",htmlFor:P,children:a("doc.countryLabel")}),A("input",{id:P,type:"search",className:"sekyro-input",placeholder:a("doc.countrySearch"),value:y,onChange:C=>S(C.target.value)})]}),O.length===0?A("p",{className:"sekyro-text-muted",children:a("doc.noCountryMatch")}):A("ul",{className:"sekyro-rows",children:O.map(C=>A("li",{children:fe("button",{type:"button",className:"sekyro-row-btn",onClick:()=>K(C.code),children:[A("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:In(C.code)}),C.name]})},C.code))}),A(ne,{children:null})]})}let G=tt(e.documents,f);return fe("section",{className:"sekyro-step",children:[A(oe,{title:a("doc.pickTitle"),lead:a("native.doc.holdIt")}),A("div",{className:"sekyro-choices",children:G.map(b=>fe("button",{type:"button",className:"sekyro-card","aria-pressed":m===b,disabled:m!==null&&m!==b,onClick:()=>E(b),children:[A(q,{name:b==="passport"?"passport":"card"}),fe("span",{className:"sekyro-card__body",children:[A("span",{className:"sekyro-card__title",children:a(`doc.type.${b}`)}),A("span",{className:"sekyro-card__sub",children:a(`doc.sub.${b}`)})]}),A("span",{className:"sekyro-radio","aria-hidden":"true"})]},b))}),r.length>1?A("button",{type:"button",className:"sekyro-link",onClick:()=>{k(null),E(null)},children:a("native.doc.changeCountry")}):null,A(ne,{children:null})]})}s(uo,"DocumentPicker");import{jsx as re,jsxs as Fn}from"react/jsx-runtime";var Bn={load:s(()=>import("../document-capture-view-6NADWNPQ.js"),"load")};function nt({step:e,locale:t,strings:o,className:n,liveMrz:a}){let i=x(t,o),[r,l]=mo(0),[c,f]=mo(null),k=Mn(e.documents).length>1,y=e.issuer!==null&&Rn(e.documents,e.issuer).length>1,S=Dn(()=>Ln(()=>Bn.load().then(E=>({default:E.DocumentCaptureView}))),[r]);Vn(()=>{An()},[]);let m=Fn(I,{tone:"danger",children:[re("span",{children:i.t("errors.network_error")}),re(N,{kind:"ghost",onClick:()=>l(E=>E+1),children:i.t("doc.retryCamera")})]});return re("div",{className:n,children:e.documentType===null||e.issuer===null||c!==null?re(uo,{step:e,i18n:i,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>f(null)}):re(z,{fallback:m,children:re(On,{fallback:re("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:re(S,{step:e,i18n:i,liveMrz:a,...k?{onChangeCountry:s(()=>f("country"),"onChangeCountry")}:{},...y?{onChangeDocument:s(()=>f("document"),"onChangeDocument")}:{}})})},r)})}s(nt,"DocumentCapture");import{warmPortraitCapture as Hn}from"@sekyro/web";import{Component as $n,lazy as Un,Suspense as Kn,useEffect as Gn,useMemo as Wn,useState as zn}from"react";import{jsx as V,jsxs as st}from"react/jsx-runtime";var Yn={load:s(()=>import("../portrait-capture-view-JYTBBXFU.js"),"load")},at=class at extends $n{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(at,"LoadBoundary");var rt=at;function Zn({step:e,i18n:t}){let{t:o}=t,n=le();return st("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[V("h2",{ref:n,tabIndex:-1,className:"sekyro-text-body",children:o(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?V("p",{className:"sekyro-text-muted",children:o("portrait.reviewDescription")}):null,e.uploadFailed?st(I,{tone:"danger",children:[V("span",{children:o("portrait.uploadFailed")}),V(N,{kind:"ghost",onClick:()=>{e.resubmit()},children:o("portrait.sendAgain")})]}):V("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:o("portrait.matching")})]})}s(Zn,"MatchPhase");function it({step:e,locale:t,strings:o,className:n,assetBaseUrl:a}){let i=x(t,o),[r,l]=zn(0),c=Wn(()=>Un(()=>Yn.load().then(k=>({default:k.PortraitCaptureView}))),[r]);if(Gn(()=>{e.phase==="capture"&&Hn()},[e.phase]),e.phase==="match")return V("div",{className:n,children:V(Zn,{step:e,i18n:i})});let f=st(I,{tone:"danger",children:[V("span",{children:i.t("errors.network_error")}),V(N,{kind:"ghost",onClick:()=>l(k=>k+1),children:i.t("portrait.retryCamera")})]});return V("div",{className:n,children:V(rt,{fallback:f,children:V(Kn,{fallback:V("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:V(c,{step:e,i18n:i,...a!==void 0?{assetBaseUrl:a}:{}})})},r)})}s(it,"PortraitCapture");import{cameraUnavailableCauseOf as dr}from"@sekyro/web";import{useCallback as _e,useEffect as xo,useId as mr,useRef as dt,useState as xe}from"react";var Pe={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},qn=["danger","success","warning","info"];function lt(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(lt,"channel");function fo(e){let t=lt(parseInt(e.slice(1,3),16)),o=lt(parseInt(e.slice(3,5),16)),n=lt(parseInt(e.slice(5,7),16));return .2126*t+.7152*o+.0722*n}s(fo,"luminance");function Jn(e,t){let o=fo(e),n=fo(t),a=Math.max(o,n),i=Math.min(o,n);return(a+.05)/(i+.05)}s(Jn,"contrastRatio");function yo(e,t){return Math.min(...qn.map(o=>Jn(Pe[e][o].fg,t)))}s(yo,"worstAgainst");function ho(e,t,o){return Math.min(yo(e,t),yo(e,o))}s(ho,"worstStatusContrast");function go(e,t){return ho("light",e,t)>=ho("dark",e,t)?"light":"dark"}s(go,"statusSchemeFor");import{useId as Qn,useState as Xn}from"react";import{jsx as Fe,jsxs as So}from"react/jsx-runtime";var jn=["intro","data","processing","sharing","retention"];function ko({i18n:e,purpose:t="identity"}){let{t:o}=e,[n,a]=Xn(!1),i=Qn(),[r,l=""]=o("consent.short").split("{terms}");return So("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[So("p",{className:"sekyro-text-muted",children:[r,Fe("button",{type:"button",className:"sekyro-link","aria-expanded":n,"aria-controls":i,onClick:()=>a(c=>!c),children:o("consent.termsLink")}),l]}),Fe("div",{id:i,hidden:!n,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:t==="human"?Fe(M,{view:"HumanConsentTerms",i18n:e,quiet:!0}):jn.map(c=>Fe("p",{children:o(`consent.terms.${c}`)},c))})]})}s(ko,"ConsentNotice");function bo(e){let t=e.trim().split(/\s+/).filter(n=>n!=="");return(t.length>=2?[t[0],t[1]].map(n=>Array.from(n??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(bo,"initials");import{useSyncExternalStore as er}from"react";var No=s(e=>({colors:{...e?L.dark:L.light},radius:L.radiusLg,fontFamily:L.font}),"brandTheme"),Pi=No(!1),vo=/^#[0-9a-f]{6}$/i;function ct(e,t,o){if(t)return null;let n=Ce(e).colors,a=o?.colors?.bg??n?.bg,i=o?.colors?.surface??n?.surface;return a===void 0&&i===void 0||a!==void 0&&!vo.test(a)||i!==void 0&&!vo.test(i)?null:go(a??L.light.bg,i??L.light.surface)}s(ct,"partnerStatusScheme");function Po(e,t,o){let n=Ce(e);if(o&&n.colors!==void 0){let{brand:a,brandFg:i}=n.colors;a!==void 0&&rr(a,L.dark.bg)>=3?n.colors={brand:a,ring:a,...i!==void 0?{brandFg:i}:{}}:delete n.colors}if(ct(e,o,t)==="dark"){let a=Pe.dark;n.colors={...n.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return Le(No(o),n,Ot(t))}s(Po,"verificationTheme");function wo(e){let t=er(nr,or,()=>!1);return e==="dark"||e==="system"&&t}s(wo,"useDarkScheme");var tr="(prefers-color-scheme: dark)",_o=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(tr):null,"media"),or=s(()=>_o()?.matches??!1,"prefersDark");function nr(e){let t=_o();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(nr,"subscribe");function rr(e,t){let[o,n]=[Co(e),Co(t)];return(Math.max(o,n)+.05)/(Math.min(o,n)+.05)}s(rr,"contrast");function Co(e){let t=[1,3,5].map(o=>{let n=Number.parseInt(e.slice(o,o+2),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(Co,"luminance");import{useEffect as sr,useId as ir,useState as ar}from"react";import{jsx as $,jsxs as we}from"react/jsx-runtime";var lr=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),cr={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 pr({outcome:e}){return we("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[$("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),$("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),$("path",{className:"sekyro-outcome__glyph",d:cr[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}s(pr,"OutcomeMark");function ur({label:e,id:t,copied:o}){let[n,a]=ar(!1);return sr(()=>{if(!n)return;let i=setTimeout(()=>a(!1),1600);return()=>clearTimeout(i)},[n]),we("button",{type:"button",className:`sekyro-reference${n?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[$("span",{"aria-live":"polite",children:n?o:e}),$("bdi",{dir:"ltr",children:t}),$(q,{name:"copy"})]})}s(ur,"ReferenceLine");function pt({step:e,locale:t,strings:o,className:n,onClose:a}){let i=x(t,o),{t:r}=i,l=ir(),c=le(),f=e.context.orgName,k=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",y;switch(e.display){case"policy_stop":{let S=e.failureReason??"";if(lr.has(_t(S)))y=r("session.result.detailsMismatch",{org:f});else if(S==="device_velocity_exceeded")y=r("session.result.deviceVelocity",{org:f});else if(S==="capture_tampered")y=r("session.result.deviceStop");else if(S==="camera_unavailable")y=r("reasons.camera_unavailable",{org:f});else{let m=It(S);y=m!==null?r(m,{org:f}):r("session.result.rejected.description")}break}case"cooldown":{let S=Et(i.locale,e.retryAfter);y=S!==null?r(S.key,{time:S.time}):r("reasons.device_cooldown");break}case"platform_unsupported":y=r("result.platform_unsupported");break;case"attempts_exhausted":y=r("common.noAttemptsLeft");break;default:y=f!==""?r(`native.result.${k}`,{org:f}):r(`session.result.${k}.description`)}return we("section",{className:`sekyro-result${n?` ${n}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[we("div",{className:"sekyro-result__body",children:[$(pr,{outcome:e.display==="cooldown"?"review":k}),we("div",{className:"sekyro-heading",children:[$("h2",{id:l,ref:c,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${k}.title`)}),$("p",{className:"sekyro-text-muted",children:y})]}),$(ur,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),a!==void 0?$("div",{className:"sekyro-actions",children:$(N,{full:!0,onClick:a,children:f!==""?r("native.result.back",{org:f}):r("native.close")})}):null]})}s(pt,"VerificationResultScreen");import{Fragment as ut,jsx as p,jsxs as U}from"react/jsx-runtime";function fr(e,t,o){let n=t?L.dark:L.light,a=t?L.roles.dark:L.roles.light,i=e.colors??{},r={},l=i.fg===n.fg&&i.surface===n.surface;if(i.brand===n.brand&&i.surface===n.surface&&(r["--sekyro-color-brand-soft"]=a.brandSoft),l&&(r["--sekyro-color-line"]=a.line,r["--sekyro-color-line-subtle"]=a.lineSubtle,r["--sekyro-color-line-strong"]=a.lineStrong,r["--sekyro-color-sunken"]=a.sunken),i.fgMuted===n.fgMuted&&i.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===L.font&&(r["--sekyro-font-display"]=L.fontDisplay),o!==null){let c=Pe[o];r["--sekyro-color-danger-soft"]=c.danger.soft,r["--sekyro-color-success-soft"]=c.success.soft,r["--sekyro-color-warning-soft"]=c.warning.soft}return r}s(fr,"flowRoles");function mt(e){let{verification:t,locale:o,strings:n,onStep:a,onResult:i}=e,{step:r,error:l}=Ge(t);xo(()=>{r!==null&&a?.(r)},[r,a]),xo(()=>i===void 0?void 0:t.on("result",i),[t,i]);let c=wo(e.colorScheme??"light"),f=r?.context.branding,k=Po(f,e.theme,c),[y,S]=xe(!1),m=`sekyro-verification${c?" sekyro-verification--dark":""}${y?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,E=dt(e.onClose);E.current=e.onClose;let P=dt(r);P.current=r;let D=_e(()=>{let w=P.current;E.current?.(w?.kind==="result"?{reason:"finished",result:w.result}:{reason:"cancelled"})},[]);return p(Dt,{theme:k,className:m,children:p(Ne,{locale:o,...n!==void 0?{strings:n}:{},children:p("div",{dir:e.dir??(o==="ar"?"rtl":"ltr"),lang:o,className:"sekyro-flow",style:fr(k,c,ct(f,c,e.theme)),children:p(Ft.Provider,{value:S,children:p(Oe.Provider,{value:e.onClose!==void 0?D:void 0,children:p(gr,{...e,step:r,error:l,immersive:y})})})})})})}s(mt,"SekyroVerification");function yr(e,t){if(t===void 0)return null;let o=e,n=o[`session.processing.${t}.title`],a=o[`session.processing.${t}.description`];return typeof n=="string"&&n!==""&&typeof a=="string"&&a!==""?{title:n,description:a}:null}s(yr,"processingCopyOf");function hr({error:e,retry:t}){let{t:o}=x(),n=le();return U(Ae,{tone:"danger",testId:"sekyro-error-notice",children:[p("span",{children:o(xt(e.kind))}),e.retryable?p(N,{ref:n,kind:"ghost",className:"sekyro-btn--start",onClick:t,children:o("common.retry")}):null]})}s(hr,"CameraErrorNotice");function gr(e){let{step:t,error:o,slots:n,immersive:a}=e,i=x(),{t:r}=i,[l,c]=xe(!1),[f,k]=xe(0),[y,S]=xe(null),m=t?.context.purpose??"identity",E=e.verification,P=m==="human"||t?.context.cameraUnavailableHandled===!0,D=E.reportCameraUnavailable!==void 0&&P?u=>E.reportCameraUnavailable?.(u)??Promise.resolve():void 0,w=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,T=e.handoffUrl,K=_e((u,_)=>D===void 0?void 0:p(M,{view:"NoCameraView",i18n:i,quiet:!0,cause:_,onRetry:u,...w?{onContinue:D}:{},...T!==void 0?{handoffUrl:T}:{}}),[i,E,P,w,T]),G=_e((u,_)=>p(Wt,{start:u,context:_,human:m==="human",extra:_.canChooseFacing&&p(Rt,{value:_.facing,onChange:_.setFacing}),notice:_.permissionSettled&&_.permission==="denied"?K(u,"denied"):void 0}),[m,K]),b=_e((u,_)=>{let Q=dr(u.kind);return(Q!==void 0?K(_,Q):void 0)??U(ut,{children:[p(hr,{error:u,retry:_}),Q!==void 0&&T!==void 0?p(M,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:T}):null]})},[K,T,i]),O=dt(""),C=e.livenessProps?.slots?.stageOverlay,W=_e(u=>(u.guidance!==""&&!u.coached&&(O.current=u.guidance),p(zt,{testId:"sekyro-capture-stage",video:p("video",{ref:u.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:u.guidance!==""?u.guidance:O.current,note:u.note,busy:u.settled,progress:u.phase==="seeking"||u.phase==="aligning"?u.progress:1,still:u.still,live:u.live,closeLabel:r("native.close"),overlay:C?.(u.videoRef),ramp:u.ramp?.colour??null,...u.settled?{}:{onClose:s(()=>k(_=>_+1),"onClose")},end:u.switchCamera&&p("button",{type:"button",className:"sekyro-glass",onClick:u.switchCamera,"aria-label":r("capture.switchCamera"),children:p(Tt,{})})})),[r,C]),F=mr();if(o!==null)return p(Ae,{tone:"danger",children:p("span",{children:r(ce(o,i.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r("common.loading")});let{context:H}=t,J=s(u=>{c(!0),u().finally(()=>c(!1))},"refresh"),Ie=n?.header??p(kr,{context:H,headerId:F,end:n?.headerEnd}),v,he=y===t.key&&t.context.switchable!==void 0;if(he)v=p(M,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>S(null)});else switch(t.kind){case"phone_otp":v=p(Ze,{step:t});break;case"email_otp":v=p(Je,{step:t});break;case"method":v=p(je,{step:t});break;case"registry":v=p(Be,{step:t});break;case"document":v=p(nt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let u=e.livenessProps?.slots?.intro,_={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:u??G,...u===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:b}:{}},...f>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};v=p(Mt.Provider,{value:W,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(M,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:_,sekyroIntro:u===void 0},f):p(Lt,{..._},f)});break}case"portrait":v=U(ut,{children:[t.retakeOnly?p(M,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,p(it,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":v=p(M,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":v=p(M,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":v=p(M,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":v=e.handoffUrl!==void 0?p(M,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh}):U(Ae,{tone:"info",children:[p("strong",{children:r("handoff.title")}),p("span",{children:r("reasons.mobile_required")}),p(N,{kind:"ghost",disabled:l,onClick:()=>J(t.refresh),children:r("common.refresh")})]});break;case"processing":{let u=yr(i.strings,t.service);v=U("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[p("h2",{className:"sekyro-text-body",children:u?.title??r("session.processing.title")}),p("p",{className:"sekyro-text-muted",children:u?.description??r("session.processing.description")}),t.stalled?p(N,{kind:"ghost",disabled:l,onClick:()=>J(t.refresh),children:r("common.refresh")}):null]});break}case"eid":v=p(Qe,{step:t});break;case"unsupported":{let u=t.reason==="platform_unsupported";v=U("section",{className:"sekyro-stack sekyro-stack--1",children:[p("h2",{className:"sekyro-text-body",children:r(u?"needsApp.title":"unsupported.title")}),p("p",{children:u?H.orgName!==""?r("needsApp.description",{org:H.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:H.orgName})})]});break}case"result":v=n?.result?.(t)??p(Sr,{step:t});break;default:{let u=t;v=null}}return U(ut,{children:[a?null:Ie,!a&&t.kind!=="result"&&H.sections.length>1?p(br,{context:H,current:t.section,i18n:i}):null,!a&&!H.consentRecorded&&t.kind!=="result"?p(ko,{i18n:i,purpose:H.purpose}):null,p(Ht,{pageKey:t.key,children:v}),!a&&!he&&t.kind!=="result"&&t.context.switchable!==void 0?p(M,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>S(t.key),quiet:!0},t.key):null,a?null:n?.footer!==void 0?n.footer:H.branding?.hideAttribution===!0?null:U("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[p(q,{name:"lock"}),r("shell.verifiedBy")]})]})}s(gr,"Body");function Sr({step:e}){return p(Oe.Consumer,{children:t=>p(pt,{step:e,...t!==void 0?{onClose:t}:{}})})}s(Sr,"ResultPage");function kr({context:e,headerId:t,end:o}){let{t:n}=x(),[a,i]=xe(!1),r=a?void 0:e.branding?.logoUrl,l=e.orgName!==""?e.orgName:n(e.returning?"returning.title":"session.title");return U("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[U("div",{className:"sekyro-org",children:[p("span",{className:"sekyro-org__tile","aria-hidden":"true",children:r!==void 0?p("img",{className:"sekyro-org__logo",src:r,alt:"",onError:()=>i(!0)}):bo(e.orgName)}),U("div",{className:"sekyro-org__text",children:[p("h1",{id:t,className:"sekyro-org__name",children:l}),p("p",{className:"sekyro-org__sub",children:n(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),o!=null?p("div",{className:"sekyro-org__end",children:o}):null,p(Oe.Consumer,{children:c=>c!==void 0?p("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":n("native.close"),onClick:c,children:p(q,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:n("returning.description")}):null]})}s(kr,"OrgHeader");function br({context:e,current:t,i18n:o}){let n=t===null?-1:e.sections.indexOf(t),a=e.progress,i=a!==void 0&&a.length===e.sections.length?a:e.sections.map((r,l)=>({id:r,state:l<n?"done":l===n?"current":"upcoming"}));return p("ol",{className:"sekyro-progress__bars","aria-label":o.t("session.progressLabel"),children:i.map(({id:r,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:o.strings[`section.${r}`]??r})},r))})}s(br,"SectionProgress");import{useEffect as Cr,useState as Io}from"react";var vr=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function ft(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return vr.test(t)}s(ft,"isInAppBrowser");import{jsx as ye}from"react/jsx-runtime";function Nr(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(Nr,"pageUrl");function Pr({hostedUrl:e,inAppBrowser:t,...o}){let[n,a]=Io(t===!0);Cr(()=>{t===void 0&&ft()&&a(!0)},[t]);let[i,r]=Io(!1),l=o.handoffUrl??e??Nr();return n&&!i?ye(Vt,{theme:Le(Ce(void 0),o.theme),...o.className!==void 0?{className:o.className}:{},children:ye(Ne,{locale:o.locale,...o.strings!==void 0?{strings:o.strings}:{},children:ye("div",{dir:o.dir??(o.locale==="ar"?"rtl":"ltr"),lang:o.locale,className:"sekyro-stack sekyro-stack--4",children:ye(wr,{url:l,onContinue:()=>r(!0)})})})}):ye(mt,{...o,...l!==""?{handoffUrl:l}:{}})}s(Pr,"SekyroFlow");function wr({url:e,onContinue:t}){let o=x();return ye(M,{view:"InAppBrowserPrompt",i18n:o,url:e,onContinue:t})}s(wr,"Prompt");export{nt as DocumentCapture,Qe as EidStep,Je as EmailOtpStep,Be as IdNumberEntry,je as MethodChoice,Pn as NniEntry,Ze as PhoneOtpStep,it as PortraitCapture,Pr as SekyroFlow,mt as SekyroVerification,Ne as StepI18nProvider,pt as VerificationResultScreen,Oo as arSteps,Vo as enSteps,Bo as formatTemplate,Do as frSteps,ft as isInAppBrowser,Ao as loadSekyroLocale,Fo as resolveSekyroStrings,Lo as retakeHintStringKey,x as useStepI18n,Ge as useVerificationStep};
|
|
2
|
+
import{a as Qt}from"../chunk-OUG465K6.js";import{a as B,d as Ht,e as Ce,f as Le,g as Ut,h as $t}from"../chunk-IT66PZDO.js";import{a as Kt}from"../chunk-EZ5TVL6P.js";import{a as zt}from"../chunk-YY76AMUA.js";import{a as Yt,b as Zt,c as qt,d as Jt}from"../chunk-FNBG3472.js";import{a as q}from"../chunk-PYAJMHZH.js";import{b as Lt,c as Ot,d as Vt,f as Dt,g as Bt,j as Ft}from"../chunk-5TOBG5R2.js";import{a as At}from"../chunk-7MMT5M4E.js";import{b as Rt}from"../chunk-KHBM3P4C.js";import{a as oe,b as ne,c as Oe,d as Gt,g as Wt}from"../chunk-NXVTUTKS.js";import{a as ce}from"../chunk-VRDPGOXM.js";import{a as Ho,b as Uo,c as $o,d as Ko,e as Go,f as Ne,g as _}from"../chunk-GGTRTUW3.js";import{a as T,b as Ve}from"../chunk-XDPCJAYO.js";import{a as P,c as xt,i as Bo,k as Fo,l as It,m as Et,n as Tt,r as Mt,t as Ae,u as le}from"../chunk-IUQTOOBI.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as Wo,useState as Xt}from"react";function Ge(e){let[t,n]=Xt(()=>e?.currentStep?.()??null),[o,l]=Xt(null);return Wo(()=>{if(e===void 0)return;if(typeof e.run!="function"){l(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let i=!0,r=e.on("step",a=>{i&&n(a)});return e.run().then(a=>{i&&n(c=>c??a)},a=>{i&&l(a)}),()=>{i=!1,r()}},[e]),{step:t,error:o}}s(Ge,"useVerificationStep");import{useEffect as so,useId as Zo,useMemo as qo,useRef as io,useState as ie}from"react";var zo="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",jt;function eo(e){return jt??(jt=new Map(zo.split(" ").map(t=>{let[n,o]=t.slice(2).split("/");return[t.slice(0,2),[n,o]]}))),jt.get(e.toUpperCase())}s(eo,"entryOf");function to(e){return eo(e)?.[0]}s(to,"dialCodeOf");function oo(e){return eo(e)?.[1]}s(oo,"nationalPrefixOf");import{normalizeNni as Yo}from"@sekyro/web";function De(e){let t=Yo(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(De,"digitsOf");var We=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function ze(e,t){let n="",o=0;for(let l of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])o<e.length&&(n+=(o>0?" ":"")+e.slice(o,o+l)),o+=l;return n+e.slice(o)}s(ze,"groupDigits");function no(e,t){let n=0;for(let o=t;o>0&&n<e.length;n+=1)e[n]!==" "&&(o-=1);return n}s(no,"caretAfter");var Ye=s((e,t)=>t.find(n=>e.startsWith(n.dial)),"countryOfNumber"),ro=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as uo,jsx as k,jsxs as F}from"react/jsx-runtime";var ao=s((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"),Jo=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Qo=["whatsapp","sms"],Xo=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_number_invalid","otp_number_not_mobile"]);function lo(e){let t=De(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(lo,"normalizedPhone");var jo=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function en(e){let t=[];for(let n of e.phoneCountries??["MR"]){let o=e.phoneRules?.find(i=>i.code===n),l=o?.dial??to(n);l!==void 0&&!t.some(i=>i.code===n)&&t.push({code:n,dial:`+${l}`,...o!==void 0?{rule:o}:{}})}return t}s(en,"phoneCountriesOf");function tn(e,t){if(t===null||!e.startsWith(t.dial))return lo(e);let n=e.slice(t.dial.length).replace(/\D/g,""),o=oo(t.code);return o!==void 0&&n.startsWith(o)&&(n=n.slice(o.length)),lo(t.dial+n)}s(tn,"e164Of");var co=s((e,t)=>(Ye(e,t)??t[0])?.code??null,"countryFor");function on(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return n=>`${t?.of(n.code)??n.code} (${n.dial})`}s(on,"countryLabels");var po="other";function Ze({step:e,locale:t,strings:n,className:o,defaultPhone:l,onError:i}){let r=_(t,n),{t:a}=r,c=qo(()=>en(e),[e.phoneCountries,e.phoneRules]),f=l??c[0]?.dial??"",[S,y]=ie(()=>co(f,c)),g=c.map(m=>m.code).join(",");so(()=>{if(S===null||!c.some(m=>m.code===S)){let m=co(f,c);y(m);let h=x.current,te=c.find(Y=>Y.code===m)?.dial;te!==void 0&&O(Y=>h!==null&&Y.startsWith(h.dial)?te+Y.slice(h.dial.length):Y.startsWith("+")?Y:te)}},[g,f]);let u=c.find(m=>m.code===S)??null,x=io(u);u!==null&&(x.current=u);let[b,O]=ie(f),[I,v]=ie(!1),[D,G]=ie(!1),[W,C]=ie(""),[E,M]=ie(!1),[H,U]=ie(null),J=e.phase==="verify",Ie=zt(J),N=Zo(),ge=io(null);so(()=>{let m=setTimeout(()=>ge.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(m)},[J]);let d=s(async m=>{M(!0),U(null);try{await m()}catch(h){U(ce(h,r.strings)),i?.(h)}finally{M(!1)}},"run"),w=Qo.filter(m=>(e.channels??[]).includes(m)),Q=e.phoneInternational===!0,he=I||u===null,X=he||b.startsWith("+")&&!b.startsWith(u.dial),se=X?void 0:u.rule,gt=X?b:b.replace(u.dial,"").replace(/\D/g,""),j=se?We(gt,se):gt,ht=X&&!he&&!Q&&e.phoneRules?.length&&!c.some(m=>m.dial.startsWith(b)),He=ht?null:se?se.lengths.includes(j.length)?u.dial+j:null:he&&!b.startsWith("+")?null:tn(b,I?null:u),Ee=!e.needsPhone||He!==null,Te=s((m,h=!1)=>{d(()=>e.send({...e.needsPhone&&(!h||b!==f)?{phone:He??b}:{},...m!==void 0?{channel:m}:{}}))},"send"),St=s(m=>{d(()=>e.verify(m))},"submitCode"),kt=s(m=>{m.preventDefault(),J?St(W):w.length<=1&&Ee&&Te(w[0])},"onSubmit"),Lo=s(m=>{let h=m.target,te=m.nativeEvent.inputType,Y=Math.max(0,h.value.lastIndexOf("+")),ae=De(h.value.slice(Y)),ke=Ye(ae,c),be=De(h.value.slice(Y,h.selectionStart)).length,$e=ae,Pt=ae;if(G(!1),!ke&&(he||ae.startsWith("+")))Q&&v(!0);else{let ve=ke??u,Z=ke?ae.slice(ke.dial.length):ae;if(y(ve.code),v(!1),Z===j&&te?.startsWith("delete")&&(te.endsWith("Forward")||(be-=1),Z=Z.slice(0,be)+Z.slice(be+1)),ve.rule){let Ke=We(Z,ve.rule),_t=Z.length-Ke.length;be-=_t,Z=_t>0&&!ke&&j.length===Ke.length?j:Ke}Pt=ve.dial+Z,$e=ze(Z,ve.rule)}O(Pt),h.value=$e;let wt=no($e,be);h.setSelectionRange(wt,wt)},"onNumber"),Me=ht?a("otp.reason_otp_destination_not_allowed"):D&&se?a("otp.phoneLengthError",{digits:ro(se,a("otp.or"))}):"",bt=c.length>1||Q,ee=`${N}-phone`,vt=ao(e.codeExpiresAt,Ie),Se=ao(e.resendAvailableAt,Ie),Re=J&&e.codeExpiresAt!==void 0&&vt===0,Ue=s(m=>a(m==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[Oo,Vo]=a("otp.sentTo",{channel:Ue(e.channel)}).split("{number}"),Do=e.reason==="otp_mismatch"?F(T,{tone:"danger",children:[k("span",{children:a("otp.reason_otp_mismatch")}),k("span",{children:Ve(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Xo.has(e.reason)?k(T,{tone:"warning",children:k("span",{children:a(`otp.reason_${e.reason}`)})}):null,Ct=F(uo,{children:[Do,H!==null?k(T,{tone:"danger",children:k("span",{children:a(H)})}):null]});if(J){let m=w.length===0;return F("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":N,onSubmit:kt,noValidate:!0,children:[k(oe,{id:N,title:a("otp.verifyTitle"),lead:F(uo,{children:[Oo,k("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),Vo]})}),Ct,F("div",{className:"sekyro-field",children:[k("label",{className:"sekyro-label",htmlFor:`${N}-code`,children:a("otp.codeLabel")}),k(Kt,{id:`${N}-code`,value:W,invalid:e.reason==="otp_mismatch",onChange:h=>{C(h),h.length===6&&W.length!==6&&!E&&!e.attemptsExhausted&&St(h)}}),k("span",{className:`sekyro-help sekyro-otp-expiry${Re?" is-danger":""}`,"aria-hidden":!Re||void 0,children:Re?a("otp.expired"):a("otp.expiresIn",{time:Jo(vt)})})]}),k("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:Re?a("otp.expired"):""}),F(ne,{children:[k(P,{type:"submit",full:!0,disabled:E||W.length!==6||e.attemptsExhausted,"aria-busy":E||void 0,children:a("otp.verify")}),m?k("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:E||Se>0,onClick:()=>Te(void 0,!0),children:Se>0?a("otp.resendIn",{seconds:Se}):a("otp.resend")}):Se>0?k("p",{className:"sekyro-resend is-waiting",children:a("otp.resendIn",{seconds:Se})}):k("div",{className:"sekyro-resend-row",children:w.map(h=>k("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:E,onClick:()=>Te(h,!0),children:a("otp.resendBy",{channel:Ue(h)})},h))})]})]})}let Nt=on(r.locale);return F("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":N,onSubmit:kt,noValidate:!0,children:[k(oe,{id:N,title:a("otp.sendTitle"),lead:a("otp.sendDescription")}),Ct,e.needsPhone?F("div",{className:"sekyro-field",children:[k("label",{className:"sekyro-label",htmlFor:ee,children:a("otp.phoneLabel")}),F("div",{className:"sekyro-phone",dir:"ltr",children:[u===null||X&&!I?null:F("div",{className:"sekyro-phone__lead",children:[bt?F("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${a("otp.countryLabel")}: ${I?a("otp.otherCountry"):Nt(u)}`,value:I?po:u.code,onChange:m=>{G(!1);let h=c.find(te=>te.code===m.target.value);v(h===void 0),h!==void 0&&y(h.code),O(h===void 0?"":h.dial+(X?"":j))},children:[c.map(m=>k("option",{value:m.code,children:Nt(m)},m.code)),Q?k("option",{value:po,children:a("otp.otherCountry")}):null]}):null,F("span",{className:"sekyro-phone__dial",id:`${ee}-dial`,"aria-hidden":bt||void 0,children:[k("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:I?"🌐":jo(u.code)}),I?null:u.dial]})]}),k("input",{ref:ge,id:ee,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${X?"":`${ee}-dial ${ee}-hint `}${Me?`${ee}-error`:""}`.trim()||void 0,"aria-invalid":!!Me||void 0,placeholder:he?"+":void 0,value:X?b:ze(j,se),onChange:Lo,onKeyDown:m=>{m.key==="Enter"&&!Ee&&G(!0)},onBlur:m=>{m.relatedTarget?.tagName!=="SELECT"&&G(j!==""&&He===null)}})]}),X?null:k("span",{className:"sekyro-help",id:`${ee}-hint`,children:a("otp.phonePlaceholderGeneric")}),Me?k("span",{className:"sekyro-help is-danger",id:`${ee}-error`,role:"alert",children:Me}):null]}):k("p",{className:"sekyro-text-muted",children:a("otp.prefilledNotice")}),k(ne,{children:w.length>0?F("div",{className:"sekyro-actions__group",role:"group","aria-label":a("otp.chooseChannel"),children:[k("p",{className:"sekyro-label","aria-hidden":"true",children:a("otp.chooseChannel")}),w.map((m,h)=>k(P,{kind:h===0?"primary":"ghost",full:!0,disabled:E||!Ee,"aria-busy":h===0&&E||void 0,onClick:()=>Te(m),children:a("otp.sendBy",{channel:Ue(m)})},m))]}):k(P,{type:"submit",full:!0,disabled:E||!Ee,"aria-busy":E||void 0,children:a("otp.send")})})]})}s(Ze,"PhoneOtpStep");import{lazy as rn,Suspense as sn,useMemo as an,useState as ln}from"react";import{Component as nn}from"react";var qe=class qe extends nn{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(qe,"LoadBoundary");var z=qe;import{jsx as pe,jsxs as pn}from"react/jsx-runtime";var cn={load:s(()=>import("../email-otp-view-YLMRRLC3.js"),"load")};function Je({locale:e,strings:t,...n}){let o=_(e,t),[l,i]=ln(0),r=an(()=>rn(()=>cn.load().then(c=>({default:c.EmailOtpView}))),[l]),a=pn(T,{tone:"danger",children:[pe("span",{children:o.t("errors.network_error")}),pe(P,{kind:"ghost",onClick:()=>i(c=>c+1),children:o.t("common.retry")})]});return pe(z,{fallback:a,children:pe(sn,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:pe(r,{...n,i18n:o})})},l)}s(Je,"EmailOtpStep");import{lazy as un,Suspense as dn,useMemo as mn,useState as fn}from"react";import{jsx as ue,jsxs as gn}from"react/jsx-runtime";var yn={load:s(()=>import("../eid-view-IMKKBPQV.js"),"load")};function Qe({locale:e,strings:t,...n}){let o=_(e,t),[l,i]=fn(0),r=mn(()=>un(()=>yn.load().then(c=>({default:c.EidView}))),[l]),a=gn(T,{tone:"danger",children:[ue("span",{children:o.t("errors.network_error")}),ue(P,{kind:"ghost",onClick:()=>i(c=>c+1),children:o.t("common.retry")})]});return ue(z,{fallback:a,children:ue(dn,{fallback:ue("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:ue(r,{...n,i18n:o})})},l)}s(Qe,"EidStep");import{useMemo as Nn}from"react";import{lazy as hn,Suspense as Sn,useMemo as kn,useState as bn}from"react";import{jsx as de,jsxs as Cn}from"react/jsx-runtime";var vn={load:s(()=>import("../flow-views-HFQJ45NS.js"),"load")};function A({view:e,i18n:t,quiet:n,...o}){let[l,i]=bn(0),r=kn(()=>hn(()=>vn.load().then(c=>({default:c[e]}))),[e,l]),a=Cn(T,{tone:"danger",children:[de("span",{children:t.t("errors.network_error")}),de(P,{kind:"ghost",onClick:()=>i(c=>c+1),children:t.t("common.retry")})]});return de(z,{fallback:a,children:de(Sn,{fallback:n===!0?null:de("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:de(r,{...o,i18n:t})})},l)}s(A,"Flow");import{jsx as Xe,jsxs as Pn}from"react/jsx-runtime";function je({step:e,locale:t,strings:n,className:o,onError:l}){let i=_(t,n),{busy:r,error:a,run:c}=qt(i,l),f=Nn(()=>e.choice.options.flatMap(y=>{let g=Zt(y,i),u=Yt[y.service];return g===null?[]:[{id:y.id,label:g,glyph:u&&Xe(q,{name:u})}]}),[e.choice.options,i]),S=e.choice.options.find(y=>y.service==="national_eid");return Pn("div",{className:o,children:[Xe(Dt,{title:i.t("method.title"),description:i.t("method.description"),options:f,busy:r,error:a,focus:!0,testId:"sekyro-method",onChoose:y=>c(()=>e.choose(y))}),S?.nationalEid?.afterPass==="continue"?Xe(A,{view:"EidContinueHint",i18n:i,provider:S.nationalEid.providerName,quiet:!0}):null]})}s(je,"MethodChoice");import{isValidNni as wn,normalizeNni as mo}from"@sekyro/web";import{useId as _n,useState as et}from"react";import{Fragment as Tn,jsx as L,jsxs as me}from"react/jsx-runtime";var xn=new Set(["nni_not_found","registry_record_not_found"]),In=new Set(["nni_invalid","id_number_invalid"]);function Be({step:e,locale:t,strings:n,className:o,onError:l}){let i=_(t,n),{t:r}=i,[a,c]=et(""),[f,S]=et(!1),[y,g]=et(null),u=_n(),x=e.attemptsExhausted,b=s(async M=>{S(!0),g(null);try{await M()}catch(H){g(ce(H,i.strings)),l?.(H)}finally{S(!1)}},"run"),O=s(M=>{if(M.preventDefault(),e.source!=="typed"){b(()=>e.confirm());return}let H=mo(a);if(!/^\d{10}$/.test(H))return g("population.invalid");if(!wn(H))return g("population.reason_id_number_invalid");b(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(H):e.submitNni(H))},"onSubmit"),I=Ve(i,e.attemptsRemaining,x),v=e.reason!==void 0&&xn.has(e.reason),D=e.reason!==void 0&&In.has(e.reason),G=me(Tn,{children:[e.reason==="registry_unavailable"?me(T,{tone:"warning",children:[L("span",{children:r("population.reason_registry_unavailable")}),L("span",{children:I})]}):null,v&&e.canUseDocument?me(T,{tone:"warning",children:[L("span",{children:r("population.reason_registry_record_not_found_or_document")}),L("span",{children:I}),L(P,{kind:"ghost",disabled:f,onClick:()=>{b(()=>e.useDocument())},children:r("population.useDocument")})]}):null,v&&!e.canUseDocument||D?me(T,{tone:"danger",children:[L("span",{children:r(v?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),L("span",{children:I})]}):null,x&&e.reason===void 0?L(T,{tone:"danger",children:L("span",{children:I})}):null,y!==null?L(T,{tone:"danger",children:L("span",{children:r(y)})}):null]}),[W,C,E]=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 me("form",{className:`sekyro-step${o?` ${o}`:""}`,"aria-labelledby":u,onSubmit:O,noValidate:!0,children:[L(oe,{id:u,title:r(W),lead:r(C)}),G,e.source==="typed"?me("div",{className:"sekyro-field",children:[L("label",{className:"sekyro-label",htmlFor:`${u}-id-number`,children:r("population.label")}),L("input",{id:`${u}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:a,"aria-describedby":`${u}-id-number-help`,"aria-invalid":y==="population.invalid"||y==="population.reason_id_number_invalid"||void 0,onChange:M=>{g(null),c(mo(M.target.value).replace(/\D/g,"").slice(0,10))}}),L("span",{id:`${u}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,L(ne,{children:x?null:L(P,{type:"submit",full:!0,disabled:f,"aria-busy":f||void 0,children:r(E)})})]})}s(Be,"IdNumberEntry");function En(e){return Be(e)}s(En,"NniEntry");import{acceptedIssuers as Vn,acceptedTypesFor as So,warmDocumentCapture as Dn}from"@sekyro/web";import{lazy as Bn,Suspense as Fn,useEffect as Hn,useMemo as Un,useState as nt}from"react";import{acceptedIssuers as Mn,acceptedTypesFor as tt}from"@sekyro/web";import{useEffect as fo,useId as Rn,useMemo as yo,useState as ot}from"react";import{jsx as V,jsxs as fe}from"react/jsx-runtime";var go=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),An=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),Ln=220;function On(e,t,n=[]){let o=null;try{o=new Intl.DisplayNames([e],{type:"region"})}catch{}let l=t.map(a=>({code:a,name:o?.of(a)??a})),i=new Intl.Collator(e),r=s(a=>{let c=n.indexOf(a);return c<0?n.length:c},"rank");return l.sort((a,c)=>r(a.code)-r(c.code)||i.compare(a.name,c.name))}s(On,"countryNames");function ho({step:e,i18n:t,issuer:n,onPicked:o,ageStepUp:l=!1}){let{t:i,locale:r}=t,a=yo(()=>Mn(e.documents),[e.documents]),c=yo(()=>On(r,a,Object.keys(e.documents.byIssuer??{})),[r,a,e.documents]),f=a.length===1?a[0]:null,[S,y]=ot(n??f),[g,u]=ot(""),[x,b]=ot(null),O=Rn(),I=f===null?[]:tt(e.documents,f),v=f!==null&&I.length===1?I[0]:null;fo(()=>{f!==null&&v!==null&&e.selectDocument(f,v)},[f,v]);let D=s((C,E)=>{e.selectDocument(C,E),o?.()},"pick"),G=s(C=>{let E=tt(e.documents,C);E.length===1?D(C,E[0]):y(C)},"chooseIssuer");if(fo(()=>{if(x===null||S===null)return;let C=setTimeout(()=>D(S,x),Ln);return()=>clearTimeout(C)},[x]),v!==null)return null;if(S===null){let C=go(g.trim()),E=C===""?c:c.filter(M=>go(M.name).includes(C)||M.code.toLowerCase()===C);return fe("section",{className:"sekyro-step",children:[V(oe,{title:i("doc.countryTitle"),lead:i(l?"doc.ageStepUp":"doc.pickDescription")}),fe("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:O,children:i("doc.countryLabel")}),V("input",{id:O,type:"search",className:"sekyro-input",placeholder:i("doc.countrySearch"),value:g,onChange:M=>u(M.target.value)})]}),E.length===0?V("p",{className:"sekyro-text-muted",children:i("doc.noCountryMatch")}):V("ul",{className:"sekyro-rows",children:E.map(M=>V("li",{children:fe("button",{type:"button",className:"sekyro-row-btn",onClick:()=>G(M.code),children:[V("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:An(M.code)}),M.name]})},M.code))}),V(ne,{children:null})]})}let W=tt(e.documents,S);return fe("section",{className:"sekyro-step",children:[V(oe,{title:i("doc.pickTitle"),lead:i(l&&f!==null?"doc.ageStepUp":"native.doc.holdIt")}),V("div",{className:"sekyro-choices",children:W.map(C=>fe("button",{type:"button",className:"sekyro-card","aria-pressed":x===C,disabled:x!==null&&x!==C,onClick:()=>b(C),children:[V(q,{name:C==="passport"?"passport":"card"}),fe("span",{className:"sekyro-card__body",children:[V("span",{className:"sekyro-card__title",children:i(`doc.type.${C}`)}),V("span",{className:"sekyro-card__sub",children:i(`doc.sub.${C}`)})]}),V("span",{className:"sekyro-radio","aria-hidden":"true"})]},C))}),a.length>1?V("button",{type:"button",className:"sekyro-link",onClick:()=>{y(null),b(null)},children:i("native.doc.changeCountry")}):null,V(ne,{children:null})]})}s(ho,"DocumentPicker");import{jsx as re,jsxs as Kn}from"react/jsx-runtime";var $n={load:s(()=>import("../document-capture-view-PUGWMQAP.js"),"load")};function rt({step:e,locale:t,strings:n,className:o,liveMrz:l}){let i=_(t,n),[r,a]=nt(0),[c,f]=nt(null),S=Vn(e.documents),y=S.length>1,g=e.issuer!==null&&So(e.documents,e.issuer).length>1,u=e.documentType===null||e.issuer===null||c!==null,x=S.length===1&&So(e.documents,S[0]).length===1,[b]=nt(()=>u&&!x),O=e.ageStepUp===!0,I=Un(()=>Bn(()=>$n.load().then(D=>({default:D.DocumentCaptureView}))),[r]);Hn(()=>{Dn()},[]);let v=Kn(T,{tone:"danger",children:[re("span",{children:i.t("errors.network_error")}),re(P,{kind:"ghost",onClick:()=>a(D=>D+1),children:i.t("doc.retryCamera")})]});return re("div",{className:o,children:u?re(ho,{step:e,i18n:i,ageStepUp:O&&c===null&&b,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>f(null)}):re(z,{fallback:v,children:re(Fn,{fallback:re("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:re(I,{step:e,i18n:i,ageLead:O&&!b,liveMrz:l,...y?{onChangeCountry:s(()=>f("country"),"onChangeCountry")}:{},...g?{onChangeDocument:s(()=>f("document"),"onChangeDocument")}:{}})})},r)})}s(rt,"DocumentCapture");import{warmPortraitCapture as Gn}from"@sekyro/web";import{Component as Wn,lazy as zn,Suspense as Yn,useEffect as Zn,useMemo as qn,useState as Jn}from"react";import{jsx as R,jsxs as it}from"react/jsx-runtime";var Qn={load:s(()=>import("../portrait-capture-view-M5OLPMMO.js"),"load")},lt=class lt extends Wn{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(lt,"LoadBoundary");var st=lt;function Xn({step:e,i18n:t}){let{t:n}=t,o=le();return it("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[R("h2",{ref:o,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?R("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?it(T,{tone:"danger",children:[R("span",{children:n("portrait.uploadFailed")}),R(P,{kind:"ghost",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):R("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}s(Xn,"MatchPhase");function at({step:e,locale:t,strings:n,className:o,assetBaseUrl:l,verification:i}){let r=_(t,n),a=Bt(i),[c,f]=Jn(0),S=qn(()=>zn(()=>Qn.load().then(u=>({default:u.PortraitCaptureView}))),[c]);if(Zn(()=>{e.phase==="capture"&&Gn()},[e.phase]),e.phase==="match")return R("div",{className:o,children:R(Xn,{step:e,i18n:r})});let y=R("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")});if(!a.settled)return R("div",{className:o,children:y});if(a.session==="choice"&&a.choice===null)return R("div",{className:o,children:R(Mt,{value:u=>r.t(u),children:R(Ot,{onChoose:a.choose})})});let g=it(T,{tone:"danger",children:[R("span",{children:r.t("errors.network_error")}),R(P,{kind:"ghost",onClick:()=>f(u=>u+1),children:r.t("portrait.retryCamera")})]});return R("div",{className:o,children:R(st,{fallback:g,children:R(Yn,{fallback:y,children:R(S,{step:e,i18n:r,...l!==void 0?{assetBaseUrl:l}:{}})})},c)})}s(at,"PortraitCapture");import{cameraUnavailableCauseOf as gr}from"@sekyro/web";import{useCallback as _e,useEffect as Ro,useId as hr,useMemo as Sr,useRef as mt,useState as xe}from"react";var Pe={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},jn=["danger","success","warning","info"];function ct(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(ct,"channel");function ko(e){let t=ct(parseInt(e.slice(1,3),16)),n=ct(parseInt(e.slice(3,5),16)),o=ct(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*o}s(ko,"luminance");function er(e,t){let n=ko(e),o=ko(t),l=Math.max(n,o),i=Math.min(n,o);return(l+.05)/(i+.05)}s(er,"contrastRatio");function bo(e,t){return Math.min(...jn.map(n=>er(Pe[e][n].fg,t)))}s(bo,"worstAgainst");function vo(e,t,n){return Math.min(bo(e,t),bo(e,n))}s(vo,"worstStatusContrast");function Co(e,t){return vo("light",e,t)>=vo("dark",e,t)?"light":"dark"}s(Co,"statusSchemeFor");import{useId as tr,useState as or}from"react";import{jsx as Fe,jsxs as No}from"react/jsx-runtime";var nr=["intro","data","processing","sharing","retention"];function Po({i18n:e,purpose:t="identity"}){let{t:n}=e,[o,l]=or(!1),i=tr(),[r,a=""]=n("consent.short").split("{terms}");return No("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[No("p",{className:"sekyro-text-muted",children:[r,Fe("button",{type:"button",className:"sekyro-link","aria-expanded":o,"aria-controls":i,onClick:()=>l(c=>!c),children:n("consent.termsLink")}),a]}),Fe("div",{id:i,hidden:!o,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:t==="human"?Fe(A,{view:"HumanConsentTerms",i18n:e,quiet:!0}):nr.map(c=>Fe("p",{children:n(`consent.terms.${c}`)},c))})]})}s(Po,"ConsentNotice");function wo(e){let t=e.trim().split(/\s+/).filter(o=>o!=="");return(t.length>=2?[t[0],t[1]].map(o=>Array.from(o??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(wo,"initials");import{useSyncExternalStore as rr}from"react";var Io=s(e=>({colors:{...e?B.dark:B.light},radius:B.radiusLg,fontFamily:B.font}),"brandTheme"),Ri=Io(!1),_o=/^#[0-9a-f]{6}$/i;function pt(e,t,n){if(t)return null;let o=Ce(e).colors,l=n?.colors?.bg??o?.bg,i=n?.colors?.surface??o?.surface;return l===void 0&&i===void 0||l!==void 0&&!_o.test(l)||i!==void 0&&!_o.test(i)?null:Co(l??B.light.bg,i??B.light.surface)}s(pt,"partnerStatusScheme");function Eo(e,t,n){let o=Ce(e);if(n&&o.colors!==void 0){let{brand:l,brandFg:i}=o.colors;l!==void 0&&lr(l,B.dark.bg)>=3?o.colors={brand:l,ring:l,...i!==void 0?{brandFg:i}:{}}:delete o.colors}if(pt(e,n,t)==="dark"){let l=Pe.dark;o.colors={...o.colors,danger:l.danger.base,success:l.success.base,warning:l.warning.fg}}return Le(Io(n),o,Ht(t))}s(Eo,"verificationTheme");function To(e){let t=rr(ar,ir,()=>!1);return e==="dark"||e==="system"&&t}s(To,"useDarkScheme");var sr="(prefers-color-scheme: dark)",Mo=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(sr):null,"media"),ir=s(()=>Mo()?.matches??!1,"prefersDark");function ar(e){let t=Mo();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(ar,"subscribe");function lr(e,t){let[n,o]=[xo(e),xo(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}s(lr,"contrast");function xo(e){let t=[1,3,5].map(n=>{let o=Number.parseInt(e.slice(n,n+2),16)/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(xo,"luminance");import{useEffect as cr,useId as pr,useState as ur}from"react";import{jsx as $,jsxs as we}from"react/jsx-runtime";var dr=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),mr={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 fr({outcome:e}){return we("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[$("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),$("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),$("path",{className:"sekyro-outcome__glyph",d:mr[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}s(fr,"OutcomeMark");function yr({label:e,id:t,copied:n}){let[o,l]=ur(!1);return cr(()=>{if(!o)return;let i=setTimeout(()=>l(!1),1600);return()=>clearTimeout(i)},[o]),we("button",{type:"button",className:`sekyro-reference${o?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>l(!0),()=>{})},children:[$("span",{"aria-live":"polite",children:o?n:e}),$("bdi",{dir:"ltr",children:t}),$(q,{name:"copy"})]})}s(yr,"ReferenceLine");function ut({step:e,locale:t,strings:n,className:o,onClose:l}){let i=_(t,n),{t:r}=i,a=pr(),c=le(),f=e.context.orgName,S=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",y;switch(e.display){case"policy_stop":{let g=e.failureReason??"";if(dr.has(xt(g)))y=r("session.result.detailsMismatch",{org:f});else if(g==="device_velocity_exceeded")y=r("session.result.deviceVelocity",{org:f});else if(g==="capture_tampered")y=r("session.result.deviceStop");else if(g==="camera_unavailable")y=r("reasons.camera_unavailable",{org:f});else if(g==="underage_estimated")y=r("reasons.underage_estimated");else if(g==="starter_credit_claimed")y=r("reasons.starter_credit_claimed");else{let u=Et(g);y=u!==null?r(u,{org:f}):r("session.result.rejected.description")}break}case"cooldown":{let g=Tt(i.locale,e.retryAfter);y=g!==null?r(g.key,{time:g.time}):r("reasons.device_cooldown");break}case"platform_unsupported":y=r("result.platform_unsupported");break;case"attempts_exhausted":y=r("common.noAttemptsLeft");break;default:y=f!==""?r(`native.result.${S}`,{org:f}):r(`session.result.${S}.description`)}return we("section",{className:`sekyro-result${o?` ${o}`:""}`,"aria-labelledby":a,"data-testid":"sekyro-result",children:[we("div",{className:"sekyro-result__body",children:[$(fr,{outcome:e.display==="cooldown"?"review":S}),we("div",{className:"sekyro-heading",children:[$("h2",{id:a,ref:c,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${S}.title`)}),$("p",{className:"sekyro-text-muted",children:y})]}),$(yr,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),l!==void 0?$("div",{className:"sekyro-actions",children:$(P,{full:!0,onClick:l,children:f!==""?r("native.result.back",{org:f}):r("native.close")})}):null]})}s(ut,"VerificationResultScreen");import{Fragment as dt,jsx as p,jsxs as K}from"react/jsx-runtime";function kr(e,t,n){let o=t?B.dark:B.light,l=t?B.roles.dark:B.roles.light,i=e.colors??{},r={},a=i.fg===o.fg&&i.surface===o.surface;if(i.brand===o.brand&&i.surface===o.surface&&(r["--sekyro-color-brand-soft"]=l.brandSoft),a&&(r["--sekyro-color-line"]=l.line,r["--sekyro-color-line-subtle"]=l.lineSubtle,r["--sekyro-color-line-strong"]=l.lineStrong,r["--sekyro-color-sunken"]=l.sunken),i.fgMuted===o.fgMuted&&i.surface===o.surface&&(r["--sekyro-color-fg-subtle"]=l.fgSubtle),e.fontFamily===B.font&&(r["--sekyro-font-display"]=B.fontDisplay),n!==null){let c=Pe[n];r["--sekyro-color-danger-soft"]=c.danger.soft,r["--sekyro-color-success-soft"]=c.success.soft,r["--sekyro-color-warning-soft"]=c.warning.soft}return r}s(kr,"flowRoles");function ft(e){let{verification:t,locale:n,strings:o,onStep:l,onResult:i}=e,{step:r,error:a}=Ge(t);Ro(()=>{r!==null&&l?.(r)},[r,l]),Ro(()=>i===void 0?void 0:t.on("result",i),[t,i]);let c=To(e.colorScheme??"light"),f=r?.context.branding,S=Eo(f,e.theme,c),[y,g]=xe(!1),u=`sekyro-verification${c?" sekyro-verification--dark":""}${y?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,x=mt(e.onClose);x.current=e.onClose;let b=mt(r);b.current=r;let O=_e(()=>{let v=b.current;x.current?.(v?.kind==="result"?{reason:"finished",result:v.result}:{reason:"cancelled"})},[]),I=Sr(()=>t.reportCaptureIssue===void 0?null:v=>t.reportCaptureIssue?.(v),[t]);return p($t,{theme:S,className:u,children:p(Ne,{locale:n,...o!==void 0?{strings:o}:{},children:p("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:kr(S,c,pt(f,c,e.theme)),children:p(Gt.Provider,{value:g,children:p(Oe.Provider,{value:e.onClose!==void 0?O:void 0,children:p(At.Provider,{value:I,children:p(Cr,{...e,step:r,error:a,immersive:y})})})})})})})}s(ft,"SekyroVerification");function br(e,t){if(t===void 0)return null;let n=e,o=n[`session.processing.${t}.title`],l=n[`session.processing.${t}.description`];return typeof o=="string"&&o!==""&&typeof l=="string"&&l!==""?{title:o,description:l}:null}s(br,"processingCopyOf");function vr({error:e,retry:t}){let{t:n}=_(),o=le();return K(Ae,{tone:"danger",testId:"sekyro-error-notice",children:[p("span",{children:n(It(e.kind))}),e.retryable?p(P,{ref:o,kind:"ghost",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}s(vr,"CameraErrorNotice");function Cr(e){let{step:t,error:n,slots:o,immersive:l}=e,i=_(),{t:r}=i,[a,c]=xe(!1),[f,S]=xe(0),[y,g]=xe(null),u=t?.context.purpose??"identity",x=e.verification,b=u==="human"||t?.context.cameraUnavailableHandled===!0,O=x.reportCameraUnavailable!==void 0&&b?d=>x.reportCameraUnavailable?.(d)??Promise.resolve():void 0,I=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,v=e.handoffUrl,D=_e((d,w)=>O===void 0?void 0:p(A,{view:"NoCameraView",i18n:i,quiet:!0,cause:w,onRetry:d,...I?{onContinue:O}:{},...v!==void 0?{handoffUrl:v}:{}}),[i,x,b,I,v]),G=_e((d,w)=>p(Jt,{start:d,context:w,human:u==="human",extra:w.canChooseFacing&&p(Vt,{value:w.facing,onChange:w.setFacing}),notice:w.permissionSettled&&w.permission==="denied"?D(d,"denied"):void 0}),[u,D]),W=_e((d,w)=>{let Q=gr(d.kind);return(Q!==void 0?D(w,Q):void 0)??K(dt,{children:[p(vr,{error:d,retry:w}),Q!==void 0&&v!==void 0?p(A,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:v}):null]})},[D,v,i]),C=mt(""),E=e.livenessProps?.slots?.stageOverlay,M=_e(d=>(d.guidance!==""&&!d.coached&&(C.current=d.guidance),p(Qt,{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:C.current,note:d.note,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:r("native.close"),overlay:E?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:s(()=>S(w=>w+1),"onClose")},end:d.switchCamera&&p("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":r("capture.switchCamera"),children:p(Rt,{})})})),[r,E]),H=hr();if(n!==null)return p(Ae,{tone:"danger",children:p("span",{children:r(ce(n,i.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r("common.loading")});let{context:U}=t,J=s(d=>{c(!0),d().finally(()=>c(!1))},"refresh"),Ie=o?.header??p(Pr,{context:U,headerId:H,end:o?.headerEnd}),N,ge=y===t.key&&t.context.switchable!==void 0;if(ge)N=p(A,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>g(null)});else switch(t.kind){case"phone_otp":N=p(Ze,{step:t});break;case"email_otp":N=p(Je,{step:t});break;case"method":N=p(je,{step:t});break;case"registry":N=p(Be,{step:t});break;case"document":N=p(rt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,w={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??G,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:W}:{}},...f>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};N=p(Lt.Provider,{value:M,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(A,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:w,sekyroIntro:d===void 0},f):p(Ft,{...w},f)});break}case"portrait":N=K(dt,{children:[t.retakeOnly?p(A,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,p(at,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":N=p(A,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":N=p(A,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":N=p(A,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":N=e.handoffUrl!==void 0?p(A,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh}):K(Ae,{tone:"info",children:[p("strong",{children:r("handoff.title")}),p("span",{children:r("reasons.mobile_required")}),p(P,{kind:"ghost",disabled:a,onClick:()=>J(t.refresh),children:r("common.refresh")})]});break;case"processing":{let d=br(i.strings,t.service);N=K("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[p("h2",{className:"sekyro-text-body",children:d?.title??r("session.processing.title")}),p("p",{className:"sekyro-text-muted",children:d?.description??r("session.processing.description")}),t.stalled?p(P,{kind:"ghost",disabled:a,onClick:()=>J(t.refresh),children:r("common.refresh")}):null]});break}case"eid":N=p(Qe,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";N=K("section",{className:"sekyro-stack sekyro-stack--1",children:[p("h2",{className:"sekyro-text-body",children:r(d?"needsApp.title":"unsupported.title")}),p("p",{children:d?U.orgName!==""?r("needsApp.description",{org:U.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:U.orgName})})]});break}case"result":N=o?.result?.(t)??p(Nr,{step:t});break;default:{let d=t;N=null}}return K(dt,{children:[l?null:Ie,!l&&t.kind!=="result"&&U.sections.length>1?p(wr,{context:U,current:t.section,i18n:i}):null,!l&&!U.consentRecorded&&t.kind!=="result"?p(Po,{i18n:i,purpose:U.purpose}):null,p(Wt,{pageKey:t.key,children:N}),!l&&!ge&&t.kind!=="result"&&t.context.switchable!==void 0?p(A,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>g(t.key),quiet:!0},t.key):null,l?null:o?.footer!==void 0?o.footer:U.branding?.hideAttribution===!0?null:K("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[p(q,{name:"lock"}),r("shell.verifiedBy")]})]})}s(Cr,"Body");function Nr({step:e}){return p(Oe.Consumer,{children:t=>p(ut,{step:e,...t!==void 0?{onClose:t}:{}})})}s(Nr,"ResultPage");function Pr({context:e,headerId:t,end:n}){let{t:o}=_(),[l,i]=xe(!1),r=l?void 0:e.branding?.logoUrl,a=e.orgName!==""?e.orgName:o(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:r!==void 0?p("img",{className:"sekyro-org__logo",src:r,alt:"",onError:()=>i(!0)}):wo(e.orgName)}),K("div",{className:"sekyro-org__text",children:[p("h1",{id:t,className:"sekyro-org__name",children:a}),p("p",{className:"sekyro-org__sub",children:o(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),n!=null?p("div",{className:"sekyro-org__end",children:n}):null,p(Oe.Consumer,{children:c=>c!==void 0?p("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":o("native.close"),onClick:c,children:p(q,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:o("returning.description")}):null]})}s(Pr,"OrgHeader");function wr({context:e,current:t,i18n:n}){let o=t===null?-1:e.sections.indexOf(t),l=e.progress,i=l!==void 0&&l.length===e.sections.length?l:e.sections.map((r,a)=>({id:r,state:a<o?"done":a===o?"current":"upcoming"}));return p("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:i.map(({id:r,state:a})=>p("li",{className:`sekyro-progress__bar${a==="done"?" is-done":a==="current"?" is-current":""}`,...a==="current"?{"aria-current":"step"}:{},children:p("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${r}`]??r})},r))})}s(wr,"SectionProgress");import{useEffect as xr,useState as Ao}from"react";var _r=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function yt(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return _r.test(t)}s(yt,"isInAppBrowser");import{jsx as ye}from"react/jsx-runtime";function Ir(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(Ir,"pageUrl");function Er({hostedUrl:e,inAppBrowser:t,...n}){let[o,l]=Ao(t===!0);xr(()=>{t===void 0&&yt()&&l(!0)},[t]);let[i,r]=Ao(!1),a=n.handoffUrl??e??Ir();return o&&!i?ye(Ut,{theme:Le(Ce(void 0),n.theme),...n.className!==void 0?{className:n.className}:{},children:ye(Ne,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:ye("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-stack sekyro-stack--4",children:ye(Tr,{url:a,onContinue:()=>r(!0)})})})}):ye(ft,{...n,...a!==""?{handoffUrl:a}:{}})}s(Er,"SekyroFlow");function Tr({url:e,onContinue:t}){let n=_();return ye(A,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}s(Tr,"Prompt");export{rt as DocumentCapture,Qe as EidStep,Je as EmailOtpStep,Be as IdNumberEntry,je as MethodChoice,En as NniEntry,Ze as PhoneOtpStep,at as PortraitCapture,Er as SekyroFlow,ft as SekyroVerification,Ne as StepI18nProvider,ut as VerificationResultScreen,Ho as arSteps,Uo as enSteps,Ko as formatTemplate,$o as frSteps,yt as isInAppBrowser,Bo as loadSekyroLocale,Go as resolveSekyroStrings,Fo as retakeHintStringKey,_ as useStepI18n,Ge as useVerificationStep};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/react",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.16",
|
|
4
4
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"strings:steps": "node scripts/gen-step-strings.mjs"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
77
|
+
"@sekyro/web": "^0.1.0-rc.19 || ^0.2.0-rc.0",
|
|
78
78
|
"react": ">=18.2",
|
|
79
79
|
"react-dom": ">=18.2"
|
|
80
80
|
},
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "react",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/react@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.16",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.16",
|
|
102
102
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.16?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"components": [],
|
|
148
148
|
"dependencies": [
|
|
149
149
|
{
|
|
150
|
-
"ref": "@sekyro/react@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/react@0.1.0-rc.16"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-IJE64ZEN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as r}from"./chunk-2KED7D2Q.js";import{forwardRef as k}from"react";import{jsx as T}from"react/jsx-runtime";var A=k(r(function({kind:t="primary",full:n=!1,className:a,type:o,...i},s){let c=["sekyro-btn",`sekyro-btn--${t}`];return n&&c.push("sekyro-btn--full"),a!==void 0&&c.push(a),T("button",{ref:s,type:o??"button",className:c.join(" "),...i})},"Button"));var u={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture…","capture.checking":"We're checking your identity…","capture.checkingHint":"This usually takes a few seconds. Keep this page open","capture.securityNote":"Your images are encrypted and used only for this verification","capture.cameraOff":"Camera off","capture.previewAlt":"Preview of the captured image of your face","capture.retryCoaching.title":"That attempt didn't work. A few adjustments will help:","capture.retryCoaching.light":"Find good lighting, with the light on your face and not behind you","capture.retryCoaching.eyeLevel":"Hold your phone at eye level","capture.retryCoaching.head":"Look straight at the camera and keep your head upright","capture.attemptsRemaining.one":"{count} attempt remaining","capture.attemptsRemaining.other":"{count} attempts remaining","common.retry":"Try again","fcv2.err.permission":"Allow camera access in your browser settings (the camera icon in the address bar), then try again","fcv2.err.notfound":"No camera detected. Connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera. Close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS). Reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format. Open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable. Try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face. Hold the phone in front of you","fcv3.come_closer":"Bring the phone a little closer","fcv3.move_back":"Move the phone a little farther away","fcv3.center_face":"Center your face in the circle","fcv3.straighten":"Hold your head straight","fcv3.more_light":"Find a brighter spot. Light your face","fcv3.too_bright":"Too much light. Move out of direct light","fcv3.hold_still":"Perfect, hold still","fcv3.steady_camera":"Hold the phone steady","fcv3.hold_upright":"Hold the phone upright","reasons.no_face":"No face could be detected during the check","reasons.media_unreadable":"The submitted capture could not be read","reasons.clip_too_short":"The capture was too short","reasons.spoof_detected":"The liveness check could not confirm a live person in front of the camera","reasons.review_band":"The automatic check was not conclusive, so it was sent to human review","reasons.nni_not_found":"The national identification number was not found in the civil registry","reasons.nni_invalid":"The national identification number is not a valid 10-digit NNI","reasons.registry_unavailable":"The civil registry could not be reached to confirm your number","reasons.result_from_cache":"The registry check was confirmed from a recent copy of the registry","reasons.no_face_source":"No face could be detected in the selfie photo","reasons.no_face_reference":"No reference photo was available to compare your selfie against. The requester needs to resolve this, so retaking your selfie will not help","reasons.low_quality_reference":"The reference photo on file was not clear enough to compare against","reasons.below_threshold":"The selfie did not match the photo on the identity document closely enough","reasons.side_missing":"One side of the identity document was not submitted","reasons.mrz_checksum_failed":"The machine-readable zone of the document could not be validated","reasons.unreadable":"The document photo was not clear enough to read","reasons.expired_document":"The identity document has expired","reasons.authenticity_review":"The document was sent to human review to confirm its authenticity","reasons.registry_mismatch":"The document's details did not match the civil registry. A reviewer will check","reasons.document_nni_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.id_number_invalid":"The ID number is not valid","reasons.registry_record_not_found":"No record was found in the registry for this ID number","reasons.document_id_number_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.otp_mismatch":"The verification code did not match the one we sent","reasons.otp_expired":"The verification code expired before it was entered","reasons.otp_send_failed":"We could not send a verification code to your phone","reasons.uncalibrated_capture_channel":"Desktop/webcam captures are not yet auto-decided, so your verification went to human review","reasons.capture_back_camera":"Use the front camera. Hold the phone in front of your face and try again","reasons.capture_not_upright":"Hold your phone upright, not sideways, and try again","reasons.location_not_allowed":"Verification isn't available in your region.","reasons.anonymizer_blocked":"Turn off your VPN or proxy, then open the link again.","reasons.nationality_not_allowed":"This service can't verify this document. Contact the organization for other options.","reasons.document_type_not_accepted":"This type of document isn't accepted. Choose another document.","reasons.underage":"You don't meet the minimum age for this service.","reasons.age_unverifiable":"We couldn't read your date of birth. Take a clearer photo of your document.","reasons.nationality_unreadable":"We couldn't read your nationality. Take a clearer photo of your document.","reasons.name_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.birth_date_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.nationality_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.document_number_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.liveness_inconclusive":"Let's try again: face a light source and hold still.","reasons.match_inconclusive":"We couldn't confirm it's you. Try again in good light, without glasses.","hints.appearance":"Let's try again: face a light source and hold still.","hints.motion":"Hold still and keep the phone steady, then try again.","hints.lighting":"Face a window or a lamp so your face is well lit, then try again.","hints.framing":"Move closer so your face fills the frame, then try again.","reasons.subject_revoked":"The identity on file for this check is no longer available. The requester needs to run a full verification, so retrying will not help","reasons.probe_not_from_liveness":"Keep your face in the frame the whole time, then try again.","reasons.document_authenticity":"Use the original card, not a photo or a copy, and avoid reflections.","reasons.mobile_required":"Continue on your phone to take the selfie.","reasons.capture_tampered":"We couldn't verify this capture. Use your phone's built-in camera, without screen recording or camera apps.","reasons.device_velocity_exceeded":"This device can't be used for another verification right now. Contact the organization.","reasons.device_cooldown":"Too many attempts. Try again later.","cooldown.retryIn":"Too many attempts. Try again {time}.","cooldown.retryAt":"Too many attempts. Try again after {time}.","capture.busy":"Our service is busy. Trying again…","errors.inference_unavailable":"Try again in a moment.","method.title":"How do you want to verify?","method.description":"Choose one option to continue","returning.title":"Confirm it's you","returning.description":"You verified your identity before. One short face capture confirms it's still you.","method.national_number":"Enter my Mauritanian national ID number (NNI)","method.document_photo":"Photo of my document","errors.method_required":"Choose how you want to verify, then continue","errors.attestation_invalid":"We could not confirm this browser session is genuine. Reload the page and try again","errors.network_error":"We could not reach the verification service. Check your internet connection and try again","errors.session_expired":"This verification session has expired. Ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number. Ask the requester for a new link","errors.id_number_unbound":"This link was created without your ID number. Ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source and avoid strong light behind you","capture.tips.uncover":"Uncover your face: no glasses, mask or hand in front of it","capture.tips.eyeLevel":"Hold your phone at eye level","capture.tips.straight":"Look straight at the camera and keep still","capture.tips.summary":"Stand in a well-lit area. Uncover your face: no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera. Choose Allow","capture.permission.denied":"Camera access is blocked. Allow it in your browser settings (the camera icon in the address bar), then reload this page","capture.permission.unknown":"We'll ask to use your camera when you start","capture.cameraLabel":"Camera","capture.facing.user":"Front camera","capture.facing.environment":"Back camera","capture.assisted.title":"Capture the person's face","capture.assisted.lead":"Point the back camera at the person's face and hold the phone upright. The voice guidance speaks to the person being filmed.","capture.assisted.stage":"Point the camera at the person's face","capture.voiceGuidance":"Voice guidance","capture.preparing.hint":"Setting up on-device face detection. This can take a moment on a slow connection","capture.ready":"Ready. Start when you are","fcv2.err.models":"The face-detection models could not be loaded. Check your connection and try again"};var d={"capture.start":"تشغيل الكاميرا","capture.recordAgain":"ابدأ محاولة جديدة","capture.switchCamera":"تبديل الكاميرا","capture.preparing.title":"جارٍ تجهيز الالتقاط الآمن…","capture.checking":"نتحقق من هويتك…","capture.checkingHint":"يستغرق هذا عادةً بضع ثوانٍ. أبقِ هذه الصفحة مفتوحة","capture.securityNote":"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق","capture.cameraOff":"الكاميرا مطفأة","capture.previewAlt":"معاينة الصورة الملتقطة لوجهك","capture.retryCoaching.title":"لم تنجح هذه المحاولة. بعض التعديلات ستساعد:","capture.retryCoaching.light":"اختر مكانًا جيد الإضاءة، بحيث يكون الضوء على وجهك لا خلفك","capture.retryCoaching.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.retryCoaching.head":"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا","capture.attemptsRemaining.zero":"لم تتبقَّ أي محاولة","capture.attemptsRemaining.one":"تبقّت محاولة واحدة","capture.attemptsRemaining.two":"تبقّت محاولتان","capture.attemptsRemaining.few":"تبقّت {count} محاولات","capture.attemptsRemaining.many":"تبقّت {count} محاولة","capture.attemptsRemaining.other":"تبقّت {count} محاولة","common.retry":"أعد المحاولة","fcv2.err.permission":"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة","fcv2.err.notfound":"لم يتم العثور على كاميرا. وصِّل كاميرا أو فعِّلها ثم أعد المحاولة","fcv2.err.inuse":"تطبيق آخر يستخدم الكاميرا. أغلقه ثم أعد المحاولة","fcv2.err.insecure":"تتطلب الكاميرا اتصالًا آمنًا (HTTPS). افتح هذه الصفحة عبر HTTPS","fcv2.err.unsupported":"متصفحك لا يستطيع الالتقاط بصيغة مدعومة. افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري","fcv2.err.generic":"الكاميرا غير متاحة. أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة","fcv3.no_face":"لا نرى وجهك. أمسك الهاتف أمامك","fcv3.come_closer":"قرّب الهاتف قليلًا","fcv3.move_back":"أبعد الهاتف قليلًا","fcv3.center_face":"ضع وجهك في منتصف الدائرة","fcv3.straighten":"أبقِ رأسك مستقيمًا","fcv3.more_light":"انتقل إلى مكان أكثر إضاءة. أضئ وجهك","fcv3.too_bright":"الإضاءة قوية جدًا. تجنّب الضوء المباشر على وجهك","fcv3.hold_still":"ممتاز، لا تتحرك","fcv3.steady_camera":"أمسك الهاتف بثبات","fcv3.hold_upright":"أمسك الهاتف بشكل عمودي","reasons.no_face":"تعذّر اكتشاف أي وجه أثناء التحقق","reasons.media_unreadable":"تعذّرت قراءة اللقطة المُرسلة","reasons.clip_too_short":"كانت اللقطة أقصر من اللازم","reasons.spoof_detected":"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا","reasons.review_band":"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية","reasons.nni_not_found":"لم يُعثر على الرقم الوطني في سجل الحالة المدنية","reasons.nni_invalid":"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام","reasons.registry_unavailable":"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد رقمك","reasons.result_from_cache":"أُكِّد فحص السجل استنادًا إلى نسخة حديثة من السجل","reasons.no_face_source":"تعذّر اكتشاف وجه في الصورة الذاتية","reasons.no_face_reference":"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها. على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي","reasons.low_quality_reference":"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة","reasons.below_threshold":"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية","reasons.side_missing":"أحد وجهي وثيقة الهوية لم يُرسل","reasons.mrz_checksum_failed":"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة","reasons.unreadable":"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة","reasons.expired_document":"انتهت صلاحية وثيقة الهوية","reasons.authenticity_review":"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها","reasons.registry_mismatch":"بيانات الوثيقة لا تطابق السجل المدني. سيتحقق منها مراجع","reasons.document_nni_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.id_number_invalid":"رقم الهوية غير صالح","reasons.registry_record_not_found":"لم يُعثر على أي سجل لرقم الهوية هذا في السجل","reasons.document_id_number_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد، لذا أُحيل تحققك إلى مراجعة بشرية","reasons.capture_back_camera":"استخدم الكاميرا الأمامية. أمسك الهاتف أمام وجهك وحاول مرة أخرى","reasons.capture_not_upright":"أمسك هاتفك بشكل عمودي وليس أفقيًا، ثم حاول مرة أخرى","reasons.location_not_allowed":"التحقق غير متاح في منطقتك.","reasons.anonymizer_blocked":"أوقف تشغيل VPN أو الوكيل ثم افتح الرابط مجددًا.","reasons.nationality_not_allowed":"لا يمكن لهذه الخدمة التحقق من هذه الوثيقة. تواصل مع الجهة لمعرفة الخيارات الأخرى.","reasons.document_type_not_accepted":"هذا النوع من الوثائق غير مقبول. اختر وثيقة أخرى.","reasons.underage":"لا تستوفي الحد الأدنى للسن لهذه الخدمة.","reasons.age_unverifiable":"تعذّرت قراءة تاريخ ميلادك. التقط صورة أوضح لوثيقتك.","reasons.nationality_unreadable":"تعذّرت قراءة جنسيتك. التقط صورة أوضح لوثيقتك.","reasons.name_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.birth_date_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.nationality_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.document_number_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.liveness_inconclusive":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","reasons.match_inconclusive":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","hints.appearance":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","hints.motion":"ابقَ ثابتًا وأمسك الهاتف بثبات، ثم حاول مجددًا.","hints.lighting":"اجعل وجهك مقابل نافذة أو مصباح حتى يكون مضاءً جيدًا، ثم حاول مجددًا.","hints.framing":"اقترب أكثر حتى يملأ وجهك الإطار، ثم حاول مجددًا.","reasons.subject_revoked":"لم تعد الهوية المحفوظة لهذا التحقق متاحة. على الجهة الطالبة إجراء تحقق كامل، وإعادة المحاولة لن تُجدي","reasons.probe_not_from_liveness":"أبقِ وجهك داخل الإطار طوال الوقت، ثم حاول مجددًا.","reasons.document_authenticity":"استخدم البطاقة الأصلية، لا صورة لها ولا نسخة منها، وتجنّب الانعكاسات.","reasons.mobile_required":"تابع على هاتفك لالتقاط صورة لوجهك.","reasons.capture_tampered":"تعذّر التحقق من هذا الالتقاط. استخدم الكاميرا المدمجة في هاتفك، دون تسجيل الشاشة أو تطبيقات الكاميرا.","reasons.device_velocity_exceeded":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع الجهة.","reasons.device_cooldown":"محاولات كثيرة. حاول مجددًا لاحقًا.","cooldown.retryIn":"محاولات كثيرة. حاول مجددًا {time}.","cooldown.retryAt":"محاولات كثيرة. حاول مجددًا بعد {time}.","capture.busy":"خدمتنا مشغولة حاليًا. نعيد المحاولة…","errors.inference_unavailable":"حاول مجددًا بعد لحظات.","method.title":"كيف تريد التحقق من هويتك؟","method.description":"اختر إحدى الطريقتين للمتابعة","returning.title":"أكّد أنك أنت","returning.description":"سبق أن تحقّقت من هويتك. التقاط قصير لوجهك يكفي لتأكيد أنك أنت.","method.national_number":"إدخال الرقم الوطني للتعريف الموريتاني (NNI)","method.document_photo":"تصوير وثيقتي","errors.method_required":"اختر طريقة التحقق، ثم تابع","errors.attestation_invalid":"تعذّر التأكد من سلامة جلسة المتصفح. أعد تحميل الصفحة وحاول مجددًا","errors.network_error":"تعذّر الوصول إلى خدمة التحقق. تحقق من اتصالك بالإنترنت وأعد المحاولة","errors.session_expired":"انتهت صلاحية جلسة التحقق هذه. اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا","errors.nni_unbound":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف. اطلب رابطًا جديدًا من الجهة الطالبة","errors.id_number_unbound":"أُنشئ هذا الرابط دون رقم هويتك. اطلب رابطًا جديدًا من الجهة الطالبة","capture.tips.title":"لتحقق ناجح:","capture.tips.light":"اجعل الضوء أمام وجهك وتجنّب الإضاءة القوية خلفك","capture.tips.uncover":"اكشف وجهك: بلا نظارات أو كمامة أو يد أمامه","capture.tips.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.tips.straight":"انظر مباشرة إلى الكاميرا وابقَ ثابتًا","capture.tips.summary":"اختر مكانًا جيد الإضاءة. اكشف وجهك: بلا نظارات أو كمامة. بعد تشغيل الكاميرا، أمسك هاتفك بمستوى العينين، وانظر مباشرة إلى الكاميرا وابقَ ثابتًا.","capture.tips.listen":"استمع إلى التعليمات","capture.tips.stop":"إيقاف","capture.permission.granted":"تم السماح بالوصول إلى الكاميرا","capture.permission.prompt":"سيطلب متصفحك استخدام الكاميرا. اختر «السماح»","capture.permission.denied":"الوصول إلى الكاميرا محظور. اسمح به من إعدادات المتصفح (رمز الكاميرا في شريط العنوان)، ثم أعد تحميل الصفحة","capture.permission.unknown":"سنطلب استخدام الكاميرا عند البدء","capture.cameraLabel":"الكاميرا","capture.facing.user":"الكاميرا الأمامية","capture.facing.environment":"الكاميرا الخلفية","capture.assisted.title":"صوّر وجه الشخص","capture.assisted.lead":"وجّه الكاميرا الخلفية نحو وجه الشخص وأمسك الهاتف بشكل عمودي. الإرشادات الصوتية تخاطب الشخص الذي تصوّره.","capture.assisted.stage":"وجّه الكاميرا نحو وجه الشخص","capture.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك. قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز. ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه. تحقق من اتصالك ثم أعد المحاولة"};var p={"capture.start":"Démarrer la caméra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de caméra","capture.preparing.title":"Préparation de la capture sécurisée…","capture.checking":"Nous vérifions votre identité…","capture.checkingHint":"Cela prend généralement quelques secondes. Gardez cette page ouverte","capture.securityNote":"Vos images sont chiffrées et utilisées uniquement pour cette vérification","capture.cameraOff":"Caméra éteinte","capture.previewAlt":"Aperçu de l’image capturée de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti. Quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien éclairé, avec la lumière sur le visage et non derrière vous","capture.retryCoaching.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la caméra, la tête bien droite","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"Réessayer","fcv2.err.permission":"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez","fcv2.err.notfound":"Aucune caméra détectée. Branchez ou activez une caméra, puis réessayez","fcv2.err.inuse":"La caméra est utilisée par une autre application. Fermez-la, puis réessayez","fcv2.err.insecure":"La caméra nécessite une connexion sécurisée (HTTPS). Rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible. Ouvrez cette page dans un navigateur récent comme Chrome ou Safari","fcv2.err.generic":"Caméra indisponible. Réessayez, ou contactez le support si le problème persiste","fcv3.no_face":"Nous ne voyons pas votre visage. Tenez le téléphone devant vous","fcv3.come_closer":"Rapprochez un peu le téléphone","fcv3.move_back":"Éloignez un peu le téléphone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la tête droite","fcv3.more_light":"Cherchez un endroit plus lumineux. Éclairez votre visage","fcv3.too_bright":"Trop de lumière. Évitez la lumière directe sur le visage","fcv3.hold_still":"Parfait, ne bougez plus","fcv3.steady_camera":"Tenez le téléphone stable","fcv3.hold_upright":"Tenez le téléphone à la verticale","reasons.no_face":"Aucun visage n’a pu être détecté pendant la vérification","reasons.media_unreadable":"La capture envoyée n’a pas pu être lue","reasons.clip_too_short":"La capture était trop courte","reasons.spoof_detected":"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra","reasons.review_band":"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain","reasons.nni_not_found":"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil","reasons.nni_invalid":"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres","reasons.registry_unavailable":"Le registre d'état civil n'a pas pu être joint pour confirmer votre numéro","reasons.result_from_cache":"Le contrôle du registre a été confirmé à partir d'une copie récente du registre","reasons.no_face_source":"Aucun visage n'a pu être détecté sur la photo selfie","reasons.no_face_reference":"Aucune photo de référence n'était disponible pour comparer votre selfie. C'est au demandeur de le résoudre : reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de référence enregistrée n'était pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité","reasons.side_missing":"Un côté de la pièce d'identité n'a pas été envoyé","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu être validée","reasons.unreadable":"La photo du document n'était pas assez nette pour être lue","reasons.expired_document":"La pièce d'identité a expiré","reasons.authenticity_review":"Le document a été transmis à un examen humain pour confirmer son authenticité","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil. Un examinateur va vérifier","reasons.document_nni_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.id_number_invalid":"Le numéro d'identité n'est pas valide","reasons.registry_record_not_found":"Aucun dossier n'a été trouvé dans le registre pour ce numéro d'identité","reasons.document_id_number_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.otp_mismatch":"Le code de vérification ne correspond pas à celui que nous avons envoyé","reasons.otp_expired":"Le code de vérification a expiré avant d'être saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de vérification à votre téléphone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore décidées automatiquement, votre vérification part donc en revue humaine","reasons.capture_back_camera":"Utilisez la caméra avant. Tenez le téléphone devant votre visage et réessayez","reasons.capture_not_upright":"Tenez votre téléphone à la verticale, pas à l'horizontale, et réessayez","reasons.location_not_allowed":"La vérification n'est pas disponible dans votre région.","reasons.anonymizer_blocked":"Désactivez votre VPN ou proxy, puis rouvrez le lien.","reasons.nationality_not_allowed":"Ce service ne peut pas vérifier ce document. Contactez l'organisation pour d'autres options.","reasons.document_type_not_accepted":"Ce type de document n'est pas accepté. Choisissez un autre document.","reasons.underage":"Vous n'avez pas l'âge minimum requis pour ce service.","reasons.age_unverifiable":"Nous n'avons pas pu lire votre date de naissance. Prenez une photo plus nette de votre document.","reasons.nationality_unreadable":"Nous n'avons pas pu lire votre nationalité. Prenez une photo plus nette de votre document.","reasons.name_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.birth_date_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.nationality_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.document_number_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.liveness_inconclusive":"Réessayons : placez-vous face à une source de lumière et restez immobile.","reasons.match_inconclusive":"Nous n'avons pas pu confirmer qu'il s'agit bien de vous. Réessayez dans un endroit bien éclairé, sans lunettes.","hints.appearance":"Réessayons : placez-vous face à une source de lumière et restez immobile.","hints.motion":"Restez immobile et tenez le téléphone bien stable, puis réessayez.","hints.lighting":"Placez-vous face à une fenêtre ou une lampe pour que votre visage soit bien éclairé, puis réessayez.","hints.framing":"Rapprochez-vous pour que votre visage remplisse le cadre, puis réessayez.","reasons.subject_revoked":"L'identité enregistrée pour cette vérification n'est plus disponible. Le demandeur doit lancer une vérification complète : réessayer n'y changera rien","reasons.probe_not_from_liveness":"Gardez votre visage dans le cadre tout du long, puis réessayez.","reasons.document_authenticity":"Utilisez la carte originale, pas une photo ni une copie, et évitez les reflets.","reasons.mobile_required":"Continuez sur votre téléphone pour prendre le selfie.","reasons.capture_tampered":"Nous n'avons pas pu vérifier cette capture. Utilisez l'appareil photo intégré de votre téléphone, sans enregistrement d'écran ni application de caméra.","reasons.device_velocity_exceeded":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez l'organisation.","reasons.device_cooldown":"Trop de tentatives. Réessayez plus tard.","cooldown.retryIn":"Trop de tentatives. Réessayez {time}.","cooldown.retryAt":"Trop de tentatives. Réessayez à partir de {time}.","capture.busy":"Notre service est très sollicité. Nouvel essai en cours…","errors.inference_unavailable":"Réessayez dans un instant.","method.title":"Comment souhaitez-vous vérifier votre identité ?","method.description":"Choisissez une option pour continuer","returning.title":"Confirmez qu'il s'agit bien de vous","returning.description":"Vous avez déjà vérifié votre identité. Une courte capture du visage confirme qu'il s'agit toujours de vous.","method.national_number":"Saisir mon numéro national d'identification mauritanien (NNI)","method.document_photo":"Photographier mon document","errors.method_required":"Choisissez comment vérifier votre identité, puis continuez","errors.attestation_invalid":"Nous n'avons pas pu confirmer l'authenticité de cette session de navigateur. Rechargez la page et réessayez","errors.network_error":"Nous n'avons pas pu joindre le service de vérification. Vérifiez votre connexion internet et réessayez","errors.session_expired":"Cette session de vérification a expiré. Demandez un nouveau lien à l'organisme qui vous a envoyé ici","errors.nni_unbound":"Ce lien a été créé sans votre numéro national d'identification. Demandez un nouveau lien à l'organisme demandeur","errors.id_number_unbound":"Ce lien a été créé sans votre numéro d'identité. Demandez un nouveau lien à l'organisme demandeur","capture.tips.title":"Pour une vérification réussie :","capture.tips.light":"Placez-vous face à la lumière et évitez une forte lumière derrière vous","capture.tips.uncover":"Dégagez votre visage : ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.tips.straight":"Regardez droit vers la caméra et restez immobile","capture.tips.summary":"Placez-vous dans une zone bien éclairée. Dégagez votre visage : ni lunettes, ni masque. Une fois la caméra démarrée, tenez votre téléphone à hauteur des yeux, regardez droit vers la caméra et restez immobile.","capture.tips.listen":"Écouter les instructions","capture.tips.stop":"Arrêter","capture.permission.granted":"Accès à la caméra autorisé","capture.permission.prompt":"Votre navigateur va demander l’accès à la caméra. Choisissez « Autoriser »","capture.permission.denied":"L’accès à la caméra est bloqué. Autorisez-le dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l’accès à la caméra au démarrage","capture.cameraLabel":"Caméra","capture.facing.user":"Caméra avant","capture.facing.environment":"Caméra arrière","capture.assisted.title":"Filmez le visage de la personne","capture.assisted.lead":"Pointez la caméra arrière vers le visage de la personne et tenez le téléphone à la verticale. Le guidage vocal s'adresse à la personne filmée.","capture.assisted.stage":"Pointez la caméra vers le visage de la personne","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la détection du visage sur l’appareil. Cela peut prendre un instant sur une connexion lente","capture.ready":"Prêt. Commencez quand vous voulez","fcv2.err.models":"Impossible de charger les modèles de détection du visage. Vérifiez votre connexion puis réessayez"};var l={},m=r(e=>e==="es"||e==="pt"||e==="de","isOverlayLocale");function h(e){return m(e)?"en":e}r(h,"baseLocale");function f(e){return m(e)?l[e]:void 0}r(f,"overlayOf");function g(e){return m(e)&&l[e]===void 0}r(g,"overlayPending");function _(e){return g(e)?(e==="es"?import("./overlay-es-36OOIBXG.js"):e==="pt"?import("./overlay-pt-NWIPFF4D.js"):import("./overlay-de-PSIG4NLI.js")).then(n=>{l[e]=n.overlay},()=>{l[e]={}}):Promise.resolve()}r(_,"loadSekyroLocale");var v=Object.freeze({"reasons.id_number_invalid":"reasons.nni_invalid","reasons.registry_record_not_found":"reasons.nni_not_found","reasons.document_id_number_mismatch":"reasons.document_nni_mismatch","errors.id_number_unbound":"errors.nni_unbound","population.reason_id_number_invalid":"population.reason_nni_invalid","population.reason_registry_record_not_found":"population.reason_nni_not_found","population.reason_registry_record_not_found_or_document":"population.reason_nni_not_found_or_document","summary.id_number":"summary.nni"}),C=new Map(Object.entries(v).filter(([e])=>e.startsWith("reasons.")).map(([e,t])=>[t.slice(8),e.slice(8)]));function y(e){return C.get(e)??e}r(y,"genericReason");function b(e,t){let n=e,a=t;for(let[o,i]of Object.entries(v)){let s=a[o],c=a[i];typeof s!="string"&&typeof c=="string"?n[o]=c:typeof c!="string"&&typeof s=="string"&&(n[i]=s)}}r(b,"aliasRenamedKeys");function W(e){switch(e){case"center":return"fcv3.center_face";case"closer":return"fcv3.come_closer";case"farther":return"fcv3.move_back";case"light":return"fcv3.more_light";case"still":case"hold":return"fcv3.hold_still";case"upright":return"fcv3.hold_upright";default:{let t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}r(W,"hintStringKey");function G(e){let t=`hints.${e}`;return Object.hasOwn(u,t)?t:null}r(G,"retakeHintStringKey");function $(e){return`fcv2.err.${e}`}r($,"captureErrorStringKey");function Y(e){switch(e){case"no_recorder":return"fcv2.err.unsupported";case"attestation":return"errors.attestation_invalid";case"network":return"errors.network_error";case"nni_unbound":case"id_number_unbound":return"errors.id_number_unbound";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${y(e)}`;return Object.hasOwn(u,t)?t:null}}}r(Y,"reasonStringKey");function Q(e,t,n=new Date){if(t===void 0)return null;let a=new Date(t),o=a.getTime()-n.getTime();if(!Number.isFinite(o)||o<=0)return null;if(o<36e5){let c=Math.max(1,Math.ceil(o/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(c,"minute")}}let i=a.toDateString()===n.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...i?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(a)}}r(Q,"retryAfterTime");function J(e,t,n){let a=new Intl.PluralRules(t).select(n);return((a==="other"?void 0:e[`capture.attemptsRemaining.${a}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(n))}r(J,"attemptsRemainingText");import{createContext as L,useContext as S,useEffect as x,useState as R}from"react";var w={ar:d,fr:p,en:u};function ie(e,t){let n=f(e),a=n===void 0?w[h(e)]:{...w.en,...n};if(t===void 0)return a;let o={...a};for(let i of Object.keys(t)){let s=t[i];typeof s=="string"&&(o[i]=s)}return b(o,t),o}r(ie,"resolveStrings");function se(e){let[,t]=R(0),n=g(e);return x(()=>{if(!n)return;let a=!0;return _(e).then(()=>a&&t(o=>o+1)),()=>{a=!1}},[e,n]),!n}r(se,"useLocaleReady");var z=L(e=>u[e]??""),ce=z.Provider;function ue(){return S(z)}r(ue,"useStrings");import{useCallback as N}from"react";function me(){return N(e=>{e?.focus()},[])}r(me,"useFocusOnMount");import{jsx as q}from"react/jsx-runtime";function fe({tone:e,role:t,children:n,testId:a}){return q("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":a,children:n})}r(fe,"Notice");export{A as a,u as b,y as c,b as d,d as e,p as f,h as g,f as h,_ as i,W as j,G as k,$ as l,Y as m,Q as n,J as o,ie as p,se as q,ce as r,ue as s,fe as t,me as u};
|