@sekyro/react 0.1.0-rc.11 → 0.1.0-rc.13
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 +20 -0
- package/README.md +5 -0
- package/dist/chunk-34326C2I.js +2 -0
- package/dist/{chunk-JNAKE3DW.js → chunk-4ZN7GIYK.js} +1 -1
- package/dist/{chunk-D5WF4UNP.js → chunk-IDZNOWTO.js} +1 -1
- package/dist/{chunk-MXPLBQHW.js → chunk-K7YYCJUR.js} +1 -1
- package/dist/{chunk-5XYKAT3V.js → chunk-LNZR3RXG.js} +1 -1
- package/dist/{chunk-746GPDBD.js → chunk-PTPTDOWD.js} +1 -1
- package/dist/chunk-WAVBS3GL.js +2 -0
- package/dist/chunk-Y37ZXFOA.js +2 -0
- package/dist/{chunk-63LPCEVJ.js → chunk-Z5UFPMM6.js} +1 -1
- package/dist/document-capture-view-LR4OLZPG.js +2 -0
- package/dist/{eid-view-74CN2XAY.js → eid-view-OZETO2IS.js} +1 -1
- package/dist/{email-otp-view-DE624TXY.js → email-otp-view-2I346KUZ.js} +1 -1
- package/dist/{flow-views-CO5TQYTP.js → flow-views-KKP7HKFG.js} +1 -1
- 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-UWA5CZLC.js → overlay-de-UTUY4YEE.js} +1 -1
- package/dist/{overlay-es-VCSJQ4KN.js → overlay-es-XQFAQT24.js} +1 -1
- package/dist/{overlay-pt-NQMWHKF5.js → overlay-pt-2YEUC3J2.js} +1 -1
- package/dist/{portrait-capture-view-Y5W776HP.js → portrait-capture-view-TNKPPDYM.js} +1 -1
- package/dist/{theme-DqD8Nyoq.d.cts → theme-qTwMxyZM.d.cts} +23 -4
- package/dist/{theme-DqD8Nyoq.d.ts → theme-qTwMxyZM.d.ts} +23 -4
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +3 -2
- package/dist/verification/index.d.ts +3 -2
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +3 -0
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-ECWKDUB5.js +0 -2
- package/dist/chunk-PCNVEJSW.js +0 -2
- package/dist/chunk-ZCAZDOMD.js +0 -2
- package/dist/document-capture-view-E2USDGQJ.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-qTwMxyZM.cjs';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-qTwMxyZM.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';
|
|
@@ -49,6 +49,7 @@ interface StepStrings {
|
|
|
49
49
|
"otp.reason_otp_daily_cap_reached": string;
|
|
50
50
|
"otp.reason_payment_method_required": string;
|
|
51
51
|
"otp.reason_spend_cap_reached": string;
|
|
52
|
+
"otp.reason_insufficient_balance": string;
|
|
52
53
|
"session.steps.population.title": string;
|
|
53
54
|
"session.steps.population.description": string;
|
|
54
55
|
"population.label": string;
|
|
@@ -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-qTwMxyZM.js';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-qTwMxyZM.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';
|
|
@@ -49,6 +49,7 @@ interface StepStrings {
|
|
|
49
49
|
"otp.reason_otp_daily_cap_reached": string;
|
|
50
50
|
"otp.reason_payment_method_required": string;
|
|
51
51
|
"otp.reason_spend_cap_reached": string;
|
|
52
|
+
"otp.reason_insufficient_balance": string;
|
|
52
53
|
"session.steps.population.title": string;
|
|
53
54
|
"session.steps.population.description": string;
|
|
54
55
|
"population.label": string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as dt}from"../chunk-JNAKE3DW.js";import{a as F,d as ke,e as Se,f as be}from"../chunk-ZCAZDOMD.js";import{a as nt}from"../chunk-EZ5TVL6P.js";import{a as it}from"../chunk-YY76AMUA.js";import{a as at,b as lt,c as ct,d as pt}from"../chunk-D5WF4UNP.js";import{a as z}from"../chunk-PYAJMHZH.js";import{a as je,b as et,d as tt,g as ot}from"../chunk-63LPCEVJ.js";import{b as Xe}from"../chunk-5XYKAT3V.js";import{a as q,b as J,c as ve,d as rt,g as st}from"../chunk-746GPDBD.js";import{a as oe}from"../chunk-VRDPGOXM.js";import{a as Wt,b as Yt,c as zt,d as Zt,e as qt,f as pe,g as P}from"../chunk-PCNVEJSW.js";import{a as _,b as Ce}from"../chunk-MXPLBQHW.js";import{a as C,c as Ze,i as $t,k as Gt,l as qe,m as Je,n as Qe,t as ge,u as te}from"../chunk-ECWKDUB5.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as Jt,useState as ut}from"react";function xe(e){let[t,o]=ut(()=>e?.currentStep?.()??null),[n,l]=ut(null);return Jt(()=>{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 s=!0,r=e.on("step",a=>{s&&o(a)});return e.run().then(a=>{s&&o(c=>c??a)},a=>{s&&l(a)}),()=>{s=!1,r()}},[e]),{step:t,error:n}}i(xe,"useVerificationStep");import{useEffect as vt,useId as Xt,useMemo as Ct,useRef as Nt,useState as de}from"react";var Qt="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",mt;function ft(e){return mt??(mt=new Map(Qt.split(" ").map(t=>{let[o,n]=t.slice(2).split("/");return[t.slice(0,2),[o,n]]}))),mt.get(e.toUpperCase())}i(ft,"entryOf");function yt(e){return ft(e)?.[0]}i(yt,"dialCodeOf");function ht(e){return ft(e)?.[1]}i(ht,"nationalPrefixOf");import{Fragment as bt,jsx as k,jsxs as U}from"react/jsx-runtime";var gt=i((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"),jt=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),eo=["whatsapp","sms"],to=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited"]);function kt(e){let t=e.replace(/[\s-]/g,""),o=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(o)?`+${o}`:null}i(kt,"normalizedPhone");var oo=i(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function no(e){let t=[];for(let o of e.phoneCountries??["MR"]){let n=yt(o);n!==void 0&&!t.some(l=>l.code===o)&&t.push({code:o,dial:`+${n}`})}return t}i(no,"phoneCountriesOf");function ro(e,t){if(t===null||!e.startsWith(t.dial))return kt(e);let o=e.slice(t.dial.length).replace(/\D/g,""),n=ht(t.code);return n!==void 0&&o.startsWith(n)&&(o=o.slice(n.length)),kt(t.dial+o)}i(ro,"e164Of");function St(e,t){return t.filter(n=>e.startsWith(n.dial)).sort((n,l)=>l.dial.length-n.dial.length)[0]?.code??t[0]?.code??null}i(St,"countryFor");function so(e,t){let o=null;try{o=new Intl.DisplayNames([e],{type:"region"})}catch{}return new Map(t.map(n=>[n,o?.of(n)??n]))}i(so,"countryLabels");function io({id:e,label:t,value:o,onChange:n,placeholder:l,countries:s,country:r,onCountry:a,locale:c,countryLabel:u}){let f=s.find(g=>g.code===r)?.dial??null,m=f===null||o.startsWith("+")&&!o.startsWith(f),h=m?o:o.slice(o.startsWith(f)?f.length:0).trim(),y=Ct(()=>so(c,s.map(g=>g.code)),[c,s]),N=Nt(null);vt(()=>{let g=setTimeout(()=>N.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(g)},[]);let x=U("div",{className:"sekyro-phone",dir:"ltr",children:[m||r===null?null:U("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[k("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:oo(r)}),f]}),k("input",{ref:N,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...m?{}:{"aria-describedby":`${e}-dial`},placeholder:f===null?"+":l,value:h,onChange:g=>{let v=g.target.value.replace(/[^\d +]/g,"");n(v.startsWith("+")||f===null?v:f+v.replace(/\D/g,""))}})]});return U("div",{className:"sekyro-field",children:[k("label",{className:"sekyro-label",htmlFor:e,children:t}),s.length>1?U("div",{className:"sekyro-phone-row",children:[k("select",{className:"sekyro-phone__country","aria-label":u,value:r??"",onChange:g=>{let v=s.find(L=>L.code===g.target.value);v!==void 0&&(a(v.code),n(m&&o.startsWith("+")?o:v.dial+h.replace(/\D/g,"")))},children:s.map(g=>k("option",{value:g.code,children:`${y.get(g.code)??g.code} (${g.dial})`},g.code))}),x]}):x]})}i(io,"PhoneField");function Ie({step:e,locale:t,strings:o,className:n,defaultPhone:l,onError:s}){let r=P(t,o),{t:a}=r,c=Ct(()=>no(e),[e.phoneCountries]),u=l??c[0]?.dial??"",[f,m]=de(()=>St(u,c)),h=c.map(S=>S.code).join(",");vt(()=>{if(f===null||!c.some(S=>S.code===f)){let S=St(u,c);m(S);let M=N.current,_e=c.find(ee=>ee.code===S)?.dial;_e!==void 0&&g(ee=>M!==null&&ee.startsWith(M.dial)?_e+ee.slice(M.dial.length):ee.startsWith("+")?ee:_e)}},[h,u]);let y=c.find(S=>S.code===f)??null,N=Nt(y);y!==null&&(N.current=y);let[x,g]=de(u),[v,L]=de(""),[T,Z]=de(!1),[b,B]=de(null),I=e.phase==="verify",G=it(I),A=Xt(),H=i(async S=>{Z(!0),B(null);try{await S()}catch(M){B(oe(M,r.strings)),s?.(M)}finally{Z(!1)}},"run"),Y=eo.filter(S=>(e.channels??[]).includes(S)),ye=c.length===0&&!x.trim().startsWith("+")?null:ro(x,y),w=!e.needsPhone||ye!==null,X=i((S,M=!1)=>{H(()=>e.send({...e.needsPhone&&(!M||x!==u)?{phone:ye??x}:{},...S!==void 0?{channel:S}:{}}))},"send"),d=i(S=>{H(()=>e.verify(S))},"submitCode"),E=i(S=>{S.preventDefault(),I?d(v):Y.length<=1&&w&&X(Y[0])},"onSubmit"),j=gt(e.codeExpiresAt,G),ce=gt(e.resendAvailableAt,G),he=I&&e.codeExpiresAt!==void 0&&j===0,we=i(S=>a(S==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[Ht,Ut]=a("otp.sentTo",{channel:we(e.channel)}).split("{number}"),Kt=e.reason==="otp_mismatch"?U(_,{tone:"danger",children:[k("span",{children:a("otp.reason_otp_mismatch")}),k("span",{children:Ce(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&to.has(e.reason)?k(_,{tone:"warning",children:k("span",{children:a(`otp.reason_${e.reason}`)})}):null,ze=U(bt,{children:[Kt,b!==null?k(_,{tone:"danger",children:k("span",{children:a(b)})}):null]});if(I){let S=Y.length===0;return U("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":A,onSubmit:E,noValidate:!0,children:[k(q,{id:A,title:a("otp.verifyTitle"),lead:U(bt,{children:[Ht,k("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),Ut]})}),ze,U("div",{className:"sekyro-field",children:[k("label",{className:"sekyro-label",htmlFor:`${A}-code`,children:a("otp.codeLabel")}),k(nt,{id:`${A}-code`,value:v,invalid:e.reason==="otp_mismatch",onChange:M=>{L(M),M.length===6&&v.length!==6&&!T&&!e.attemptsExhausted&&d(M)}}),k("span",{className:`sekyro-help sekyro-otp-expiry${he?" is-danger":""}`,"aria-hidden":!he||void 0,children:he?a("otp.expired"):a("otp.expiresIn",{time:jt(j)})})]}),k("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:he?a("otp.expired"):""}),U(J,{children:[k(C,{type:"submit",full:!0,disabled:T||v.length!==6||e.attemptsExhausted,"aria-busy":T||void 0,children:a("otp.verify")}),S?k("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:T||ce>0,onClick:()=>X(void 0,!0),children:ce>0?a("otp.resendIn",{seconds:ce}):a("otp.resend")}):ce>0?k("p",{className:"sekyro-resend is-waiting",children:a("otp.resendIn",{seconds:ce})}):k("div",{className:"sekyro-resend-row",children:Y.map(M=>k("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:T,onClick:()=>X(M,!0),children:a("otp.resendBy",{channel:we(M)})},M))})]})]})}return U("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":A,onSubmit:E,noValidate:!0,children:[k(q,{id:A,title:a("otp.sendTitle"),lead:a("otp.sendDescription")}),ze,e.needsPhone?k(io,{id:`${A}-phone`,label:a("otp.phoneLabel"),value:x,onChange:g,placeholder:a(f==="MR"?"otp.phonePlaceholder":"otp.phonePlaceholderGeneric"),countries:c,country:f,onCountry:m,locale:r.locale,countryLabel:a("otp.countryLabel")}):k("p",{className:"sekyro-text-muted",children:a("otp.prefilledNotice")}),k(J,{children:Y.length>0?U("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")}),Y.map((S,M)=>k(C,{kind:M===0?"primary":"ghost",full:!0,disabled:T||!w,"aria-busy":M===0&&T||void 0,onClick:()=>X(S),children:a("otp.sendBy",{channel:we(S)})},S))]}):k(C,{type:"submit",full:!0,disabled:T||!w,"aria-busy":T||void 0,children:a("otp.send")})})]})}i(Ie,"PhoneOtpStep");import{lazy as lo,Suspense as co,useMemo as po,useState as uo}from"react";import{Component as ao}from"react";var Ee=class Ee extends ao{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Ee,"LoadBoundary");var W=Ee;import{jsx as ne,jsxs as fo}from"react/jsx-runtime";var mo={load:i(()=>import("../email-otp-view-DE624TXY.js"),"load")};function Me({locale:e,strings:t,...o}){let n=P(e,t),[l,s]=uo(0),r=po(()=>lo(()=>mo.load().then(c=>({default:c.EmailOtpView}))),[l]),a=fo(_,{tone:"danger",children:[ne("span",{children:n.t("errors.network_error")}),ne(C,{kind:"ghost",onClick:()=>s(c=>c+1),children:n.t("common.retry")})]});return ne(W,{fallback:a,children:ne(co,{fallback:ne("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:ne(r,{...o,i18n:n})})},l)}i(Me,"EmailOtpStep");import{lazy as yo,Suspense as ho,useMemo as go,useState as ko}from"react";import{jsx as re,jsxs as bo}from"react/jsx-runtime";var So={load:i(()=>import("../eid-view-74CN2XAY.js"),"load")};function Te({locale:e,strings:t,...o}){let n=P(e,t),[l,s]=ko(0),r=go(()=>yo(()=>So.load().then(c=>({default:c.EidView}))),[l]),a=bo(_,{tone:"danger",children:[re("span",{children:n.t("errors.network_error")}),re(C,{kind:"ghost",onClick:()=>s(c=>c+1),children:n.t("common.retry")})]});return re(W,{fallback:a,children:re(ho,{fallback:re("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:re(r,{...o,i18n:n})})},l)}i(Te,"EidStep");import{useMemo as xo}from"react";import{lazy as vo,Suspense as Co,useMemo as No,useState as Po}from"react";import{jsx as se,jsxs as _o}from"react/jsx-runtime";var wo={load:i(()=>import("../flow-views-CO5TQYTP.js"),"load")};function V({view:e,i18n:t,quiet:o,...n}){let[l,s]=Po(0),r=No(()=>vo(()=>wo.load().then(c=>({default:c[e]}))),[e,l]),a=_o(_,{tone:"danger",children:[se("span",{children:t.t("errors.network_error")}),se(C,{kind:"ghost",onClick:()=>s(c=>c+1),children:t.t("common.retry")})]});return se(W,{fallback:a,children:se(Co,{fallback:o===!0?null:se("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:se(r,{...n,i18n:t})})},l)}i(V,"Flow");import{jsx as Le,jsxs as Io}from"react/jsx-runtime";function Ae({step:e,locale:t,strings:o,className:n,onError:l}){let s=P(t,o),{busy:r,error:a,run:c}=ct(s,l),u=xo(()=>e.choice.options.flatMap(m=>{let h=lt(m,s),y=at[m.service];return h===null?[]:[{id:m.id,label:h,glyph:y&&Le(z,{name:y})}]}),[e.choice.options,s]),f=e.choice.options.find(m=>m.service==="national_eid");return Io("div",{className:n,children:[Le(tt,{title:s.t("method.title"),description:s.t("method.description"),options:u,busy:r,error:a,focus:!0,testId:"sekyro-method",onChoose:m=>c(()=>e.choose(m))}),f?.nationalEid?.afterPass==="continue"?Le(V,{view:"EidContinueHint",i18n:s,provider:f.nationalEid.providerName,quiet:!0}):null]})}i(Ae,"MethodChoice");import{isValidNni as Eo,normalizeNni as Pt}from"@sekyro/web";import{useId as Mo,useState as Ve}from"react";import{Fragment as Vo,jsx as R,jsxs as ie}from"react/jsx-runtime";var To=new Set(["nni_not_found","registry_record_not_found"]),Lo=new Set(["nni_invalid","id_number_invalid"]);function Ne({step:e,locale:t,strings:o,className:n,onError:l}){let s=P(t,o),{t:r}=s,[a,c]=Ve(""),[u,f]=Ve(!1),[m,h]=Ve(null),y=Mo(),N=e.attemptsExhausted,x=i(async G=>{f(!0),h(null);try{await G()}catch(A){h(oe(A,s.strings)),l?.(A)}finally{f(!1)}},"run"),g=i(G=>{if(G.preventDefault(),e.source!=="typed"){x(()=>e.confirm());return}let A=Pt(a);if(!/^\d{10}$/.test(A))return h("population.invalid");if(!Eo(A))return h("population.reason_id_number_invalid");x(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(A):e.submitNni(A))},"onSubmit"),v=Ce(s,e.attemptsRemaining,N),L=e.reason!==void 0&&To.has(e.reason),T=e.reason!==void 0&&Lo.has(e.reason),Z=ie(Vo,{children:[e.reason==="registry_unavailable"?ie(_,{tone:"warning",children:[R("span",{children:r("population.reason_registry_unavailable")}),R("span",{children:v})]}):null,L&&e.canUseDocument?ie(_,{tone:"warning",children:[R("span",{children:r("population.reason_registry_record_not_found_or_document")}),R("span",{children:v}),R(C,{kind:"ghost",disabled:u,onClick:()=>{x(()=>e.useDocument())},children:r("population.useDocument")})]}):null,L&&!e.canUseDocument||T?ie(_,{tone:"danger",children:[R("span",{children:r(L?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),R("span",{children:v})]}):null,N&&e.reason===void 0?R(_,{tone:"danger",children:R("span",{children:v})}):null,m!==null?R(_,{tone:"danger",children:R("span",{children:r(m)})}):null]}),[b,B,I]=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 ie("form",{className:`sekyro-step${n?` ${n}`:""}`,"aria-labelledby":y,onSubmit:g,noValidate:!0,children:[R(q,{id:y,title:r(b),lead:r(B)}),Z,e.source==="typed"?ie("div",{className:"sekyro-field",children:[R("label",{className:"sekyro-label",htmlFor:`${y}-id-number`,children:r("population.label")}),R("input",{id:`${y}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:a,"aria-describedby":`${y}-id-number-help`,"aria-invalid":m==="population.invalid"||m==="population.reason_id_number_invalid"||void 0,onChange:G=>{h(null),c(Pt(G.target.value).replace(/\D/g,"").slice(0,10))}}),R("span",{id:`${y}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,R(J,{children:N?null:R(C,{type:"submit",full:!0,disabled:u,"aria-busy":u||void 0,children:r(I)})})]})}i(Ne,"IdNumberEntry");function Ao(e){return Ne(e)}i(Ao,"NniEntry");import{acceptedIssuers as Ho,acceptedTypesFor as Uo,warmDocumentCapture as Ko}from"@sekyro/web";import{lazy as $o,Suspense as Go,useEffect as Wo,useMemo as Yo,useState as Et}from"react";import{acceptedIssuers as Ro,acceptedTypesFor as Re}from"@sekyro/web";import{useEffect as wt,useId as Oo,useMemo as _t,useState as Oe}from"react";import{jsx as O,jsxs as ae}from"react/jsx-runtime";var xt=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),Bo=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),Do=220;function Fo(e,t,o=[]){let n=null;try{n=new Intl.DisplayNames([e],{type:"region"})}catch{}let l=t.map(a=>({code:a,name:n?.of(a)??a})),s=new Intl.Collator(e),r=i(a=>{let c=o.indexOf(a);return c<0?o.length:c},"rank");return l.sort((a,c)=>r(a.code)-r(c.code)||s.compare(a.name,c.name))}i(Fo,"countryNames");function It({step:e,i18n:t,issuer:o,onPicked:n}){let{t:l,locale:s}=t,r=_t(()=>Ro(e.documents),[e.documents]),a=_t(()=>Fo(s,r,Object.keys(e.documents.byIssuer??{})),[s,r,e.documents]),c=r.length===1?r[0]:null,[u,f]=Oe(o??c),[m,h]=Oe(""),[y,N]=Oe(null),x=Oo(),g=c===null?[]:Re(e.documents,c),v=c!==null&&g.length===1?g[0]:null;wt(()=>{c!==null&&v!==null&&e.selectDocument(c,v)},[c,v]);let L=i((b,B)=>{e.selectDocument(b,B),n?.()},"pick"),T=i(b=>{let B=Re(e.documents,b);B.length===1?L(b,B[0]):f(b)},"chooseIssuer");if(wt(()=>{if(y===null||u===null)return;let b=setTimeout(()=>L(u,y),Do);return()=>clearTimeout(b)},[y]),v!==null)return null;if(u===null){let b=xt(m.trim()),B=b===""?a:a.filter(I=>xt(I.name).includes(b)||I.code.toLowerCase()===b);return ae("section",{className:"sekyro-step",children:[O(q,{title:l("doc.countryTitle"),lead:l("doc.pickDescription")}),ae("div",{className:"sekyro-field",children:[O("label",{className:"sekyro-label",htmlFor:x,children:l("doc.countryLabel")}),O("input",{id:x,type:"search",className:"sekyro-input",placeholder:l("doc.countrySearch"),value:m,onChange:I=>h(I.target.value)})]}),B.length===0?O("p",{className:"sekyro-text-muted",children:l("doc.noCountryMatch")}):O("ul",{className:"sekyro-rows",children:B.map(I=>O("li",{children:ae("button",{type:"button",className:"sekyro-row-btn",onClick:()=>T(I.code),children:[O("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:Bo(I.code)}),I.name]})},I.code))}),O(J,{children:null})]})}let Z=Re(e.documents,u);return ae("section",{className:"sekyro-step",children:[O(q,{title:l("doc.pickTitle"),lead:l("native.doc.holdIt")}),O("div",{className:"sekyro-choices",children:Z.map(b=>ae("button",{type:"button",className:"sekyro-card","aria-pressed":y===b,disabled:y!==null&&y!==b,onClick:()=>N(b),children:[O(z,{name:b==="passport"?"passport":"card"}),ae("span",{className:"sekyro-card__body",children:[O("span",{className:"sekyro-card__title",children:l(`doc.type.${b}`)}),O("span",{className:"sekyro-card__sub",children:l(`doc.sub.${b}`)})]}),O("span",{className:"sekyro-radio","aria-hidden":"true"})]},b))}),r.length>1?O("button",{type:"button",className:"sekyro-link",onClick:()=>{f(null),N(null)},children:l("native.doc.changeCountry")}):null,O(J,{children:null})]})}i(It,"DocumentPicker");import{jsx as Q,jsxs as Zo}from"react/jsx-runtime";var zo={load:i(()=>import("../document-capture-view-E2USDGQJ.js"),"load")};function Be({step:e,locale:t,strings:o,className:n,liveMrz:l}){let s=P(t,o),[r,a]=Et(0),[c,u]=Et(null),f=Ho(e.documents).length>1,m=e.issuer!==null&&Uo(e.documents,e.issuer).length>1,h=Yo(()=>$o(()=>zo.load().then(N=>({default:N.DocumentCaptureView}))),[r]);Wo(()=>{Ko()},[]);let y=Zo(_,{tone:"danger",children:[Q("span",{children:s.t("errors.network_error")}),Q(C,{kind:"ghost",onClick:()=>a(N=>N+1),children:s.t("doc.retryCamera")})]});return Q("div",{className:n,children:e.documentType===null||e.issuer===null||c!==null?Q(It,{step:e,i18n:s,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>u(null)}):Q(W,{fallback:y,children:Q(Go,{fallback:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Q(h,{step:e,i18n:s,liveMrz:l,...f?{onChangeCountry:i(()=>u("country"),"onChangeCountry")}:{},...m?{onChangeDocument:i(()=>u("document"),"onChangeDocument")}:{}})})},r)})}i(Be,"DocumentCapture");import{warmPortraitCapture as qo}from"@sekyro/web";import{Component as Jo,lazy as Qo,Suspense as Xo,useEffect as jo,useMemo as en,useState as tn}from"react";import{jsx as D,jsxs as Fe}from"react/jsx-runtime";var on={load:i(()=>import("../portrait-capture-view-Y5W776HP.js"),"load")},Ue=class Ue extends Jo{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Ue,"LoadBoundary");var De=Ue;function nn({step:e,i18n:t}){let{t:o}=t,n=te();return Fe("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[D("h2",{ref:n,tabIndex:-1,className:"sekyro-text-body",children:o(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?D("p",{className:"sekyro-text-muted",children:o("portrait.reviewDescription")}):null,e.uploadFailed?Fe(_,{tone:"danger",children:[D("span",{children:o("portrait.uploadFailed")}),D(C,{kind:"ghost",onClick:()=>{e.resubmit()},children:o("portrait.sendAgain")})]}):D("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:o("portrait.matching")})]})}i(nn,"MatchPhase");function He({step:e,locale:t,strings:o,className:n,assetBaseUrl:l}){let s=P(t,o),[r,a]=tn(0),c=en(()=>Qo(()=>on.load().then(f=>({default:f.PortraitCaptureView}))),[r]);if(jo(()=>{e.phase==="capture"&&qo()},[e.phase]),e.phase==="match")return D("div",{className:n,children:D(nn,{step:e,i18n:s})});let u=Fe(_,{tone:"danger",children:[D("span",{children:s.t("errors.network_error")}),D(C,{kind:"ghost",onClick:()=>a(f=>f+1),children:s.t("portrait.retryCamera")})]});return D("div",{className:n,children:D(De,{fallback:u,children:D(Xo,{fallback:D("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:D(c,{step:e,i18n:s,...l!==void 0?{assetBaseUrl:l}:{}})})},r)})}i(He,"PortraitCapture");import{cameraUnavailableCauseOf as bn}from"@sekyro/web";import{useCallback as me,useEffect as Dt,useId as vn,useRef as Ge,useState as fe}from"react";import{useId as rn,useState as sn}from"react";import{jsx as Pe,jsxs as Mt}from"react/jsx-runtime";var an=["intro","data","processing","sharing","retention"];function Tt({i18n:e,purpose:t="identity"}){let{t:o}=e,[n,l]=sn(!1),s=rn(),[r,a=""]=o("consent.short").split("{terms}");return Mt("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[Mt("p",{className:"sekyro-text-muted",children:[r,Pe("button",{type:"button",className:"sekyro-link","aria-expanded":n,"aria-controls":s,onClick:()=>l(c=>!c),children:o("consent.termsLink")}),a]}),Pe("div",{id:s,hidden:!n,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:t==="human"?Pe(V,{view:"HumanConsentTerms",i18n:e,quiet:!0}):an.map(c=>Pe("p",{children:o(`consent.terms.${c}`)},c))})]})}i(Tt,"ConsentNotice");function Lt(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()}i(Lt,"initials");import{useSyncExternalStore as ln}from"react";var Vt=i(e=>({colors:{...e?F.dark:F.light},radius:F.radiusLg,fontFamily:F.font}),"brandTheme"),_s=Vt(!1);function Rt(e,t,o){let n=ke(e);if(o&&n.colors!==void 0){let{brand:l,brandFg:s}=n.colors;l!==void 0&&un(l,F.dark.bg)>=3?n.colors={brand:l,ring:l,...s!==void 0?{brandFg:s}:{}}:delete n.colors}return Se(Vt(o),n,t)}i(Rt,"verificationTheme");function Ot(e){let t=ln(dn,pn,()=>!1);return e==="dark"||e==="system"&&t}i(Ot,"useDarkScheme");var cn="(prefers-color-scheme: dark)",Bt=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(cn):null,"media"),pn=i(()=>Bt()?.matches??!1,"prefersDark");function dn(e){let t=Bt();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(dn,"subscribe");function un(e,t){let[o,n]=[At(e),At(t)];return(Math.max(o,n)+.05)/(Math.min(o,n)+.05)}i(un,"contrast");function At(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)}i(At,"luminance");import{useEffect as mn,useId as fn,useState as yn}from"react";import{jsx as K,jsxs as ue}from"react/jsx-runtime";var hn=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),gn={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 kn({outcome:e}){return ue("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[K("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),K("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),K("path",{className:"sekyro-outcome__glyph",d:gn[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(kn,"OutcomeMark");function Sn({label:e,id:t,copied:o}){let[n,l]=yn(!1);return mn(()=>{if(!n)return;let s=setTimeout(()=>l(!1),1600);return()=>clearTimeout(s)},[n]),ue("button",{type:"button",className:`sekyro-reference${n?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>l(!0),()=>{})},children:[K("span",{"aria-live":"polite",children:n?o:e}),K("bdi",{dir:"ltr",children:t}),K(z,{name:"copy"})]})}i(Sn,"ReferenceLine");function Ke({step:e,locale:t,strings:o,className:n,onClose:l}){let s=P(t,o),{t:r}=s,a=fn(),c=te(),u=e.context.orgName,f=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",m;switch(e.display){case"policy_stop":{let h=e.failureReason??"";if(hn.has(Ze(h)))m=r("session.result.detailsMismatch",{org:u});else if(h==="device_velocity_exceeded")m=r("session.result.deviceVelocity",{org:u});else if(h==="capture_tampered")m=r("session.result.deviceStop");else if(h==="camera_unavailable")m=r("reasons.camera_unavailable",{org:u});else{let y=Je(h);m=y!==null?r(y,{org:u}):r("session.result.rejected.description")}break}case"cooldown":{let h=Qe(s.locale,e.retryAfter);m=h!==null?r(h.key,{time:h.time}):r("reasons.device_cooldown");break}case"platform_unsupported":m=r("result.platform_unsupported");break;case"attempts_exhausted":m=r("common.noAttemptsLeft");break;default:m=u!==""?r(`native.result.${f}`,{org:u}):r(`session.result.${f}.description`)}return ue("section",{className:`sekyro-result${n?` ${n}`:""}`,"aria-labelledby":a,"data-testid":"sekyro-result",children:[ue("div",{className:"sekyro-result__body",children:[K(kn,{outcome:e.display==="cooldown"?"review":f}),ue("div",{className:"sekyro-heading",children:[K("h2",{id:a,ref:c,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${f}.title`)}),K("p",{className:"sekyro-text-muted",children:m})]}),K(Sn,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),l!==void 0?K("div",{className:"sekyro-actions",children:K(C,{full:!0,onClick:l,children:u!==""?r("native.result.back",{org:u}):r("native.close")})}):null]})}i(Ke,"VerificationResultScreen");import{Fragment as $e,jsx as p,jsxs as $}from"react/jsx-runtime";function Cn(e,t){let o=t?F.dark:F.light,n=t?F.roles.dark:F.roles.light,l=e.colors??{},s={},r=l.fg===o.fg&&l.surface===o.surface;return l.brand===o.brand&&l.surface===o.surface&&(s["--sekyro-color-brand-soft"]=n.brandSoft),r&&(s["--sekyro-color-line"]=n.line,s["--sekyro-color-line-subtle"]=n.lineSubtle,s["--sekyro-color-line-strong"]=n.lineStrong,s["--sekyro-color-sunken"]=n.sunken),l.fgMuted===o.fgMuted&&l.surface===o.surface&&(s["--sekyro-color-fg-subtle"]=n.fgSubtle),e.fontFamily===F.font&&(s["--sekyro-font-display"]=F.fontDisplay),s}i(Cn,"flowRoles");function We(e){let{verification:t,locale:o,strings:n,onStep:l,onResult:s}=e,{step:r,error:a}=xe(t);Dt(()=>{r!==null&&l?.(r)},[r,l]),Dt(()=>s===void 0?void 0:t.on("result",s),[t,s]);let c=Ot(e.colorScheme??"light"),u=Rt(r?.context.branding,e.theme,c),[f,m]=fe(!1),h=`sekyro-verification${c?" sekyro-verification--dark":""}${f?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,y=Ge(e.onClose);y.current=e.onClose;let N=Ge(r);N.current=r;let x=me(()=>{let g=N.current;y.current?.(g?.kind==="result"?{reason:"finished",result:g.result}:{reason:"cancelled"})},[]);return p(be,{theme:u,className:h,children:p(pe,{locale:o,...n!==void 0?{strings:n}:{},children:p("div",{dir:e.dir??(o==="ar"?"rtl":"ltr"),lang:o,className:"sekyro-flow",style:Cn(u,c),children:p(rt.Provider,{value:m,children:p(ve.Provider,{value:e.onClose!==void 0?x:void 0,children:p(wn,{...e,step:r,error:a,immersive:f})})})})})})}i(We,"SekyroVerification");function Nn(e,t){if(t===void 0)return null;let o=e,n=o[`session.processing.${t}.title`],l=o[`session.processing.${t}.description`];return typeof n=="string"&&n!==""&&typeof l=="string"&&l!==""?{title:n,description:l}:null}i(Nn,"processingCopyOf");function Pn({error:e,retry:t}){let{t:o}=P(),n=te();return $(ge,{tone:"danger",testId:"sekyro-error-notice",children:[p("span",{children:o(qe(e.kind))}),e.retryable?p(C,{ref:n,kind:"ghost",className:"sekyro-btn--start",onClick:t,children:o("common.retry")}):null]})}i(Pn,"CameraErrorNotice");function wn(e){let{step:t,error:o,slots:n,immersive:l}=e,s=P(),{t:r}=s,[a,c]=fe(!1),[u,f]=fe(0),[m,h]=fe(null),y=t?.context.purpose??"identity",N=e.verification,x=y==="human"||t?.context.cameraUnavailableHandled===!0,g=N.reportCameraUnavailable!==void 0&&x?d=>N.reportCameraUnavailable?.(d)??Promise.resolve():void 0,v=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,L=e.handoffUrl,T=me((d,E)=>g===void 0?void 0:p(V,{view:"NoCameraView",i18n:s,quiet:!0,cause:E,onRetry:d,...v?{onContinue:g}:{},...L!==void 0?{handoffUrl:L}:{}}),[s,N,x,v,L]),Z=me((d,E)=>p(pt,{start:d,context:E,human:y==="human",extra:E.canChooseFacing&&p(et,{value:E.facing,onChange:E.setFacing}),notice:E.permissionSettled&&E.permission==="denied"?T(d,"denied"):void 0}),[y,T]),b=me((d,E)=>{let j=bn(d.kind);return(j!==void 0?T(E,j):void 0)??$($e,{children:[p(Pn,{error:d,retry:E}),j!==void 0&&L!==void 0?p(V,{view:"DesktopHandoffView",i18n:s,quiet:!0,url:L}):null]})},[T,L,s]),B=Ge(""),I=e.livenessProps?.slots?.stageOverlay,G=me(d=>(d.guidance!==""&&!d.coached&&(B.current=d.guidance),p(dt,{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:B.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:I?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>f(E=>E+1),"onClose")},end:d.switchCamera&&p("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":r("capture.switchCamera"),children:p(Xe,{})})})),[r,I]),A=vn();if(o!==null)return p(ge,{tone:"danger",children:p("span",{children:r(oe(o,s.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r("common.loading")});let{context:H}=t,Y=i(d=>{c(!0),d().finally(()=>c(!1))},"refresh"),ye=n?.header??p(xn,{context:H,headerId:A,end:n?.headerEnd}),w,X=m===t.key&&t.context.switchable!==void 0;if(X)w=p(V,{view:"LaneChoiceView",i18n:s,step:t,onClose:()=>h(null)});else switch(t.kind){case"phone_otp":w=p(Ie,{step:t});break;case"email_otp":w=p(Me,{step:t});break;case"method":w=p(Ae,{step:t});break;case"registry":w=p(Ne,{step:t});break;case"document":w=p(Be,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,E={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??Z,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:b}:{}},...u>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};w=p(je.Provider,{value:G,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(V,{view:"LivePhotoLiveness",i18n:s,step:t,livenessProps:E,sekyroIntro:d===void 0},u):p(ot,{...E},u)});break}case"portrait":w=$($e,{children:[t.retakeOnly?p(V,{view:"PortraitRetakeNotice",i18n:s,quiet:!0}):null,p(He,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":w=p(V,{view:"ContactChoiceView",i18n:s,step:t});break;case"choice":w=p(V,{view:"GenericChoiceView",i18n:s,step:t});break;case"identity_summary":w=p(V,{view:"IdentitySummaryView",i18n:s,step:t});break;case"mobile_required":w=e.handoffUrl!==void 0?p(V,{view:"HandoffView",i18n:s,url:e.handoffUrl,refresh:t.refresh}):$(ge,{tone:"info",children:[p("strong",{children:r("handoff.title")}),p("span",{children:r("reasons.mobile_required")}),p(C,{kind:"ghost",disabled:a,onClick:()=>Y(t.refresh),children:r("common.refresh")})]});break;case"processing":{let d=Nn(s.strings,t.service);w=$("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(C,{kind:"ghost",disabled:a,onClick:()=>Y(t.refresh),children:r("common.refresh")}):null]});break}case"eid":w=p(Te,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";w=$("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?H.orgName!==""?r("needsApp.description",{org:H.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:H.orgName})})]});break}case"result":w=n?.result?.(t)??p(_n,{step:t});break;default:{let d=t;w=null}}return $($e,{children:[l?null:ye,!l&&t.kind!=="result"&&H.sections.length>1?p(In,{context:H,current:t.section,i18n:s}):null,!l&&!H.consentRecorded&&t.kind!=="result"?p(Tt,{i18n:s,purpose:H.purpose}):null,p(st,{pageKey:t.key,children:w}),!l&&!X&&t.kind!=="result"&&t.context.switchable!==void 0?p(V,{view:"LaneSwitch",i18n:s,step:t,onOpen:()=>h(t.key),quiet:!0},t.key):null,l?null:n?.footer!==void 0?n.footer:H.branding?.hideAttribution===!0?null:$("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[p(z,{name:"lock"}),r("shell.verifiedBy")]})]})}i(wn,"Body");function _n({step:e}){return p(ve.Consumer,{children:t=>p(Ke,{step:e,...t!==void 0?{onClose:t}:{}})})}i(_n,"ResultPage");function xn({context:e,headerId:t,end:o}){let{t:n}=P(),[l,s]=fe(!1),r=l?void 0:e.branding?.logoUrl,a=e.orgName!==""?e.orgName:n(e.returning?"returning.title":"session.title");return $("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[$("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:()=>s(!0)}):Lt(e.orgName)}),$("div",{className:"sekyro-org__text",children:[p("h1",{id:t,className:"sekyro-org__name",children:a}),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(ve.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(z,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:n("returning.description")}):null]})}i(xn,"OrgHeader");function In({context:e,current:t,i18n:o}){let n=t===null?-1:e.sections.indexOf(t),l=e.progress,s=l!==void 0&&l.length===e.sections.length?l:e.sections.map((r,a)=>({id:r,state:a<n?"done":a===n?"current":"upcoming"}));return p("ol",{className:"sekyro-progress__bars","aria-label":o.t("session.progressLabel"),children:s.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:o.strings[`section.${r}`]??r})},r))})}i(In,"SectionProgress");import{useEffect as Mn,useState as Ft}from"react";var En=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Ye(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return En.test(t)}i(Ye,"isInAppBrowser");import{jsx as le}from"react/jsx-runtime";function Tn(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(Tn,"pageUrl");function Ln({hostedUrl:e,inAppBrowser:t,...o}){let[n,l]=Ft(t===!0);Mn(()=>{t===void 0&&Ye()&&l(!0)},[t]);let[s,r]=Ft(!1),a=o.handoffUrl??e??Tn();return n&&!s?le(be,{theme:Se(ke(void 0),o.theme),...o.className!==void 0?{className:o.className}:{},children:le(pe,{locale:o.locale,...o.strings!==void 0?{strings:o.strings}:{},children:le("div",{dir:o.dir??(o.locale==="ar"?"rtl":"ltr"),lang:o.locale,className:"sekyro-stack sekyro-stack--4",children:le(An,{url:a,onContinue:()=>r(!0)})})})}):le(We,{...o,...a!==""?{handoffUrl:a}:{}})}i(Ln,"SekyroFlow");function An({url:e,onContinue:t}){let o=P();return le(V,{view:"InAppBrowserPrompt",i18n:o,url:e,onContinue:t})}i(An,"Prompt");export{Be as DocumentCapture,Te as EidStep,Me as EmailOtpStep,Ne as IdNumberEntry,Ae as MethodChoice,Ao as NniEntry,Ie as PhoneOtpStep,He as PortraitCapture,Ln as SekyroFlow,We as SekyroVerification,pe as StepI18nProvider,Ke as VerificationResultScreen,Wt as arSteps,Yt as enSteps,Zt as formatTemplate,zt as frSteps,Ye as isInAppBrowser,$t as loadSekyroLocale,qt as resolveSekyroStrings,Gt as retakeHintStringKey,P as useStepI18n,xe as useVerificationStep};
|
|
2
|
+
import{a as gt}from"../chunk-4ZN7GIYK.js";import{a as D,d as st,e as pe,f as be,g as it,h as at}from"../chunk-Y37ZXFOA.js";import{a as lt}from"../chunk-EZ5TVL6P.js";import{a as dt}from"../chunk-YY76AMUA.js";import{a as ut,b as mt,c as ft,d as yt}from"../chunk-IDZNOWTO.js";import{a as z}from"../chunk-PYAJMHZH.js";import{b as tt,c as ot,e as nt,h as rt}from"../chunk-Z5UFPMM6.js";import{b as et}from"../chunk-LNZR3RXG.js";import{a as q,b as J,c as ve,d as ct,g as pt}from"../chunk-PTPTDOWD.js";import{a as oe}from"../chunk-VRDPGOXM.js";import{a as to,b as oo,c as no,d as ro,e as so,f as de,g as w}from"../chunk-WAVBS3GL.js";import{a as x,b as Ce}from"../chunk-K7YYCJUR.js";import{a as C,c as Je,i as jt,k as eo,l as Qe,m as Xe,n as je,t as ke,u as te}from"../chunk-34326C2I.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as io,useState as ht}from"react";function xe(e){let[t,o]=ht(()=>e?.currentStep?.()??null),[n,a]=ht(null);return io(()=>{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 s=!0,r=e.on("step",l=>{s&&o(l)});return e.run().then(l=>{s&&o(c=>c??l)},l=>{s&&a(l)}),()=>{s=!1,r()}},[e]),{step:t,error:n}}i(xe,"useVerificationStep");import{useEffect as _t,useId as lo,useMemo as xt,useRef as It,useState as ue}from"react";var ao="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",St;function kt(e){return St??(St=new Map(ao.split(" ").map(t=>{let[o,n]=t.slice(2).split("/");return[t.slice(0,2),[o,n]]}))),St.get(e.toUpperCase())}i(kt,"entryOf");function bt(e){return kt(e)?.[0]}i(bt,"dialCodeOf");function vt(e){return kt(e)?.[1]}i(vt,"nationalPrefixOf");import{Fragment as Pt,jsx as h,jsxs as U}from"react/jsx-runtime";var Ct=i((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"),co=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),po=["whatsapp","sms"],uo=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"]);function Nt(e){let t=e.replace(/[\s-]/g,""),o=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(o)?`+${o}`:null}i(Nt,"normalizedPhone");var mo=i(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function fo(e){let t=[];for(let o of e.phoneCountries??["MR"]){let n=bt(o);n!==void 0&&!t.some(a=>a.code===o)&&t.push({code:o,dial:`+${n}`})}return t}i(fo,"phoneCountriesOf");function yo(e,t){if(t===null||!e.startsWith(t.dial))return Nt(e);let o=e.slice(t.dial.length).replace(/\D/g,""),n=vt(t.code);return n!==void 0&&o.startsWith(n)&&(o=o.slice(n.length)),Nt(t.dial+o)}i(yo,"e164Of");function wt(e,t){return t.filter(n=>e.startsWith(n.dial)).sort((n,a)=>a.dial.length-n.dial.length)[0]?.code??t[0]?.code??null}i(wt,"countryFor");function go(e,t){let o=null;try{o=new Intl.DisplayNames([e],{type:"region"})}catch{}return new Map(t.map(n=>[n,o?.of(n)??n]))}i(go,"countryLabels");function ho({id:e,label:t,value:o,onChange:n,placeholder:a,countries:s,country:r,onCountry:l,locale:c,countryLabel:m}){let f=s.find(S=>S.code===r)?.dial??null,u=f===null||o.startsWith("+")&&!o.startsWith(f),g=u?o:o.slice(o.startsWith(f)?f.length:0).trim(),y=xt(()=>go(c,s.map(S=>S.code)),[c,s]),N=It(null);_t(()=>{let S=setTimeout(()=>N.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(S)},[]);let _=U("div",{className:"sekyro-phone",dir:"ltr",children:[u||r===null?null:U("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[h("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:mo(r)}),f]}),h("input",{ref:N,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...u?{}:{"aria-describedby":`${e}-dial`},placeholder:f===null?"+":a,value:g,onChange:S=>{let k=S.target.value.replace(/[^\d +]/g,"");n(k.startsWith("+")||f===null?k:f+k.replace(/\D/g,""))}})]});return U("div",{className:"sekyro-field",children:[h("label",{className:"sekyro-label",htmlFor:e,children:t}),s.length>1?U("div",{className:"sekyro-phone-row",children:[h("select",{className:"sekyro-phone__country","aria-label":m,value:r??"",onChange:S=>{let k=s.find(A=>A.code===S.target.value);k!==void 0&&(l(k.code),n(u&&o.startsWith("+")?o:k.dial+g.replace(/\D/g,"")))},children:s.map(S=>h("option",{value:S.code,children:`${y.get(S.code)??S.code} (${S.dial})`},S.code))}),_]}):_]})}i(ho,"PhoneField");function Ie({step:e,locale:t,strings:o,className:n,defaultPhone:a,onError:s}){let r=w(t,o),{t:l}=r,c=xt(()=>fo(e),[e.phoneCountries]),m=a??c[0]?.dial??"",[f,u]=ue(()=>wt(m,c)),g=c.map(b=>b.code).join(",");_t(()=>{if(f===null||!c.some(b=>b.code===f)){let b=wt(m,c);u(b);let T=N.current,_e=c.find(ee=>ee.code===b)?.dial;_e!==void 0&&S(ee=>T!==null&&ee.startsWith(T.dial)?_e+ee.slice(T.dial.length):ee.startsWith("+")?ee:_e)}},[g,m]);let y=c.find(b=>b.code===f)??null,N=It(y);y!==null&&(N.current=y);let[_,S]=ue(m),[k,A]=ue(""),[M,Z]=ue(!1),[v,B]=ue(null),I=e.phase==="verify",G=dt(I),L=lo(),H=i(async b=>{Z(!0),B(null);try{await b()}catch(T){B(oe(T,r.strings)),s?.(T)}finally{Z(!1)}},"run"),Y=po.filter(b=>(e.channels??[]).includes(b)),he=c.length===0&&!_.trim().startsWith("+")?null:yo(_,y),P=!e.needsPhone||he!==null,X=i((b,T=!1)=>{H(()=>e.send({...e.needsPhone&&(!T||_!==m)?{phone:he??_}:{},...b!==void 0?{channel:b}:{}}))},"send"),d=i(b=>{H(()=>e.verify(b))},"submitCode"),E=i(b=>{b.preventDefault(),I?d(k):Y.length<=1&&P&&X(Y[0])},"onSubmit"),j=Ct(e.codeExpiresAt,G),ce=Ct(e.resendAvailableAt,G),Se=I&&e.codeExpiresAt!==void 0&&j===0,Pe=i(b=>l(b==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[Jt,Qt]=l("otp.sentTo",{channel:Pe(e.channel)}).split("{number}"),Xt=e.reason==="otp_mismatch"?U(x,{tone:"danger",children:[h("span",{children:l("otp.reason_otp_mismatch")}),h("span",{children:Ce(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&uo.has(e.reason)?h(x,{tone:"warning",children:h("span",{children:l(`otp.reason_${e.reason}`)})}):null,qe=U(Pt,{children:[Xt,v!==null?h(x,{tone:"danger",children:h("span",{children:l(v)})}):null]});if(I){let b=Y.length===0;return U("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":L,onSubmit:E,noValidate:!0,children:[h(q,{id:L,title:l("otp.verifyTitle"),lead:U(Pt,{children:[Jt,h("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),Qt]})}),qe,U("div",{className:"sekyro-field",children:[h("label",{className:"sekyro-label",htmlFor:`${L}-code`,children:l("otp.codeLabel")}),h(lt,{id:`${L}-code`,value:k,invalid:e.reason==="otp_mismatch",onChange:T=>{A(T),T.length===6&&k.length!==6&&!M&&!e.attemptsExhausted&&d(T)}}),h("span",{className:`sekyro-help sekyro-otp-expiry${Se?" is-danger":""}`,"aria-hidden":!Se||void 0,children:Se?l("otp.expired"):l("otp.expiresIn",{time:co(j)})})]}),h("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:Se?l("otp.expired"):""}),U(J,{children:[h(C,{type:"submit",full:!0,disabled:M||k.length!==6||e.attemptsExhausted,"aria-busy":M||void 0,children:l("otp.verify")}),b?h("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:M||ce>0,onClick:()=>X(void 0,!0),children:ce>0?l("otp.resendIn",{seconds:ce}):l("otp.resend")}):ce>0?h("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:ce})}):h("div",{className:"sekyro-resend-row",children:Y.map(T=>h("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:M,onClick:()=>X(T,!0),children:l("otp.resendBy",{channel:Pe(T)})},T))})]})]})}return U("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":L,onSubmit:E,noValidate:!0,children:[h(q,{id:L,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),qe,e.needsPhone?h(ho,{id:`${L}-phone`,label:l("otp.phoneLabel"),value:_,onChange:S,placeholder:l(f==="MR"?"otp.phonePlaceholder":"otp.phonePlaceholderGeneric"),countries:c,country:f,onCountry:u,locale:r.locale,countryLabel:l("otp.countryLabel")}):h("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),h(J,{children:Y.length>0?U("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[h("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),Y.map((b,T)=>h(C,{kind:T===0?"primary":"ghost",full:!0,disabled:M||!P,"aria-busy":T===0&&M||void 0,onClick:()=>X(b),children:l("otp.sendBy",{channel:Pe(b)})},b))]}):h(C,{type:"submit",full:!0,disabled:M||!P,"aria-busy":M||void 0,children:l("otp.send")})})]})}i(Ie,"PhoneOtpStep");import{lazy as ko,Suspense as bo,useMemo as vo,useState as Co}from"react";import{Component as So}from"react";var Ee=class Ee extends So{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Ee,"LoadBoundary");var W=Ee;import{jsx as ne,jsxs as wo}from"react/jsx-runtime";var No={load:i(()=>import("../email-otp-view-2I346KUZ.js"),"load")};function Te({locale:e,strings:t,...o}){let n=w(e,t),[a,s]=Co(0),r=vo(()=>ko(()=>No.load().then(c=>({default:c.EmailOtpView}))),[a]),l=wo(x,{tone:"danger",children:[ne("span",{children:n.t("errors.network_error")}),ne(C,{kind:"ghost",onClick:()=>s(c=>c+1),children:n.t("common.retry")})]});return ne(W,{fallback:l,children:ne(bo,{fallback:ne("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:ne(r,{...o,i18n:n})})},a)}i(Te,"EmailOtpStep");import{lazy as Po,Suspense as _o,useMemo as xo,useState as Io}from"react";import{jsx as re,jsxs as To}from"react/jsx-runtime";var Eo={load:i(()=>import("../eid-view-OZETO2IS.js"),"load")};function Me({locale:e,strings:t,...o}){let n=w(e,t),[a,s]=Io(0),r=xo(()=>Po(()=>Eo.load().then(c=>({default:c.EidView}))),[a]),l=To(x,{tone:"danger",children:[re("span",{children:n.t("errors.network_error")}),re(C,{kind:"ghost",onClick:()=>s(c=>c+1),children:n.t("common.retry")})]});return re(W,{fallback:l,children:re(_o,{fallback:re("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:re(r,{...o,i18n:n})})},a)}i(Me,"EidStep");import{useMemo as Bo}from"react";import{lazy as Mo,Suspense as Ao,useMemo as Lo,useState as Ro}from"react";import{jsx as se,jsxs as Oo}from"react/jsx-runtime";var Vo={load:i(()=>import("../flow-views-KKP7HKFG.js"),"load")};function R({view:e,i18n:t,quiet:o,...n}){let[a,s]=Ro(0),r=Lo(()=>Mo(()=>Vo.load().then(c=>({default:c[e]}))),[e,a]),l=Oo(x,{tone:"danger",children:[se("span",{children:t.t("errors.network_error")}),se(C,{kind:"ghost",onClick:()=>s(c=>c+1),children:t.t("common.retry")})]});return se(W,{fallback:l,children:se(Ao,{fallback:o===!0?null:se("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:se(r,{...n,i18n:t})})},a)}i(R,"Flow");import{jsx as Ae,jsxs as Do}from"react/jsx-runtime";function Le({step:e,locale:t,strings:o,className:n,onError:a}){let s=w(t,o),{busy:r,error:l,run:c}=ft(s,a),m=Bo(()=>e.choice.options.flatMap(u=>{let g=mt(u,s),y=ut[u.service];return g===null?[]:[{id:u.id,label:g,glyph:y&&Ae(z,{name:y})}]}),[e.choice.options,s]),f=e.choice.options.find(u=>u.service==="national_eid");return Do("div",{className:n,children:[Ae(nt,{title:s.t("method.title"),description:s.t("method.description"),options:m,busy:r,error:l,focus:!0,testId:"sekyro-method",onChoose:u=>c(()=>e.choose(u))}),f?.nationalEid?.afterPass==="continue"?Ae(R,{view:"EidContinueHint",i18n:s,provider:f.nationalEid.providerName,quiet:!0}):null]})}i(Le,"MethodChoice");import{isValidNni as Fo,normalizeNni as Et}from"@sekyro/web";import{useId as Ho,useState as Re}from"react";import{Fragment as Go,jsx as V,jsxs as ie}from"react/jsx-runtime";var Uo=new Set(["nni_not_found","registry_record_not_found"]),Ko=new Set(["nni_invalid","id_number_invalid"]);function Ne({step:e,locale:t,strings:o,className:n,onError:a}){let s=w(t,o),{t:r}=s,[l,c]=Re(""),[m,f]=Re(!1),[u,g]=Re(null),y=Ho(),N=e.attemptsExhausted,_=i(async G=>{f(!0),g(null);try{await G()}catch(L){g(oe(L,s.strings)),a?.(L)}finally{f(!1)}},"run"),S=i(G=>{if(G.preventDefault(),e.source!=="typed"){_(()=>e.confirm());return}let L=Et(l);if(!/^\d{10}$/.test(L))return g("population.invalid");if(!Fo(L))return g("population.reason_id_number_invalid");_(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(L):e.submitNni(L))},"onSubmit"),k=Ce(s,e.attemptsRemaining,N),A=e.reason!==void 0&&Uo.has(e.reason),M=e.reason!==void 0&&Ko.has(e.reason),Z=ie(Go,{children:[e.reason==="registry_unavailable"?ie(x,{tone:"warning",children:[V("span",{children:r("population.reason_registry_unavailable")}),V("span",{children:k})]}):null,A&&e.canUseDocument?ie(x,{tone:"warning",children:[V("span",{children:r("population.reason_registry_record_not_found_or_document")}),V("span",{children:k}),V(C,{kind:"ghost",disabled:m,onClick:()=>{_(()=>e.useDocument())},children:r("population.useDocument")})]}):null,A&&!e.canUseDocument||M?ie(x,{tone:"danger",children:[V("span",{children:r(A?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),V("span",{children:k})]}):null,N&&e.reason===void 0?V(x,{tone:"danger",children:V("span",{children:k})}):null,u!==null?V(x,{tone:"danger",children:V("span",{children:r(u)})}):null]}),[v,B,I]=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 ie("form",{className:`sekyro-step${n?` ${n}`:""}`,"aria-labelledby":y,onSubmit:S,noValidate:!0,children:[V(q,{id:y,title:r(v),lead:r(B)}),Z,e.source==="typed"?ie("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:`${y}-id-number`,children:r("population.label")}),V("input",{id:`${y}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:l,"aria-describedby":`${y}-id-number-help`,"aria-invalid":u==="population.invalid"||u==="population.reason_id_number_invalid"||void 0,onChange:G=>{g(null),c(Et(G.target.value).replace(/\D/g,"").slice(0,10))}}),V("span",{id:`${y}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,V(J,{children:N?null:V(C,{type:"submit",full:!0,disabled:m,"aria-busy":m||void 0,children:r(I)})})]})}i(Ne,"IdNumberEntry");function $o(e){return Ne(e)}i($o,"NniEntry");import{acceptedIssuers as Jo,acceptedTypesFor as Qo,warmDocumentCapture as Xo}from"@sekyro/web";import{lazy as jo,Suspense as en,useEffect as tn,useMemo as on,useState as Rt}from"react";import{acceptedIssuers as Wo,acceptedTypesFor as Ve}from"@sekyro/web";import{useEffect as Tt,useId as Yo,useMemo as Mt,useState as Oe}from"react";import{jsx as O,jsxs as ae}from"react/jsx-runtime";var At=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),zo=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),Zo=220;function qo(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})),s=new Intl.Collator(e),r=i(l=>{let c=o.indexOf(l);return c<0?o.length:c},"rank");return a.sort((l,c)=>r(l.code)-r(c.code)||s.compare(l.name,c.name))}i(qo,"countryNames");function Lt({step:e,i18n:t,issuer:o,onPicked:n}){let{t:a,locale:s}=t,r=Mt(()=>Wo(e.documents),[e.documents]),l=Mt(()=>qo(s,r,Object.keys(e.documents.byIssuer??{})),[s,r,e.documents]),c=r.length===1?r[0]:null,[m,f]=Oe(o??c),[u,g]=Oe(""),[y,N]=Oe(null),_=Yo(),S=c===null?[]:Ve(e.documents,c),k=c!==null&&S.length===1?S[0]:null;Tt(()=>{c!==null&&k!==null&&e.selectDocument(c,k)},[c,k]);let A=i((v,B)=>{e.selectDocument(v,B),n?.()},"pick"),M=i(v=>{let B=Ve(e.documents,v);B.length===1?A(v,B[0]):f(v)},"chooseIssuer");if(Tt(()=>{if(y===null||m===null)return;let v=setTimeout(()=>A(m,y),Zo);return()=>clearTimeout(v)},[y]),k!==null)return null;if(m===null){let v=At(u.trim()),B=v===""?l:l.filter(I=>At(I.name).includes(v)||I.code.toLowerCase()===v);return ae("section",{className:"sekyro-step",children:[O(q,{title:a("doc.countryTitle"),lead:a("doc.pickDescription")}),ae("div",{className:"sekyro-field",children:[O("label",{className:"sekyro-label",htmlFor:_,children:a("doc.countryLabel")}),O("input",{id:_,type:"search",className:"sekyro-input",placeholder:a("doc.countrySearch"),value:u,onChange:I=>g(I.target.value)})]}),B.length===0?O("p",{className:"sekyro-text-muted",children:a("doc.noCountryMatch")}):O("ul",{className:"sekyro-rows",children:B.map(I=>O("li",{children:ae("button",{type:"button",className:"sekyro-row-btn",onClick:()=>M(I.code),children:[O("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:zo(I.code)}),I.name]})},I.code))}),O(J,{children:null})]})}let Z=Ve(e.documents,m);return ae("section",{className:"sekyro-step",children:[O(q,{title:a("doc.pickTitle"),lead:a("native.doc.holdIt")}),O("div",{className:"sekyro-choices",children:Z.map(v=>ae("button",{type:"button",className:"sekyro-card","aria-pressed":y===v,disabled:y!==null&&y!==v,onClick:()=>N(v),children:[O(z,{name:v==="passport"?"passport":"card"}),ae("span",{className:"sekyro-card__body",children:[O("span",{className:"sekyro-card__title",children:a(`doc.type.${v}`)}),O("span",{className:"sekyro-card__sub",children:a(`doc.sub.${v}`)})]}),O("span",{className:"sekyro-radio","aria-hidden":"true"})]},v))}),r.length>1?O("button",{type:"button",className:"sekyro-link",onClick:()=>{f(null),N(null)},children:a("native.doc.changeCountry")}):null,O(J,{children:null})]})}i(Lt,"DocumentPicker");import{jsx as Q,jsxs as rn}from"react/jsx-runtime";var nn={load:i(()=>import("../document-capture-view-LR4OLZPG.js"),"load")};function Be({step:e,locale:t,strings:o,className:n,liveMrz:a}){let s=w(t,o),[r,l]=Rt(0),[c,m]=Rt(null),f=Jo(e.documents).length>1,u=e.issuer!==null&&Qo(e.documents,e.issuer).length>1,g=on(()=>jo(()=>nn.load().then(N=>({default:N.DocumentCaptureView}))),[r]);tn(()=>{Xo()},[]);let y=rn(x,{tone:"danger",children:[Q("span",{children:s.t("errors.network_error")}),Q(C,{kind:"ghost",onClick:()=>l(N=>N+1),children:s.t("doc.retryCamera")})]});return Q("div",{className:n,children:e.documentType===null||e.issuer===null||c!==null?Q(Lt,{step:e,i18n:s,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>m(null)}):Q(W,{fallback:y,children:Q(en,{fallback:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Q(g,{step:e,i18n:s,liveMrz:a,...f?{onChangeCountry:i(()=>m("country"),"onChangeCountry")}:{},...u?{onChangeDocument:i(()=>m("document"),"onChangeDocument")}:{}})})},r)})}i(Be,"DocumentCapture");import{warmPortraitCapture as sn}from"@sekyro/web";import{Component as an,lazy as ln,Suspense as cn,useEffect as pn,useMemo as dn,useState as un}from"react";import{jsx as F,jsxs as Fe}from"react/jsx-runtime";var mn={load:i(()=>import("../portrait-capture-view-TNKPPDYM.js"),"load")},Ue=class Ue extends an{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Ue,"LoadBoundary");var De=Ue;function fn({step:e,i18n:t}){let{t:o}=t,n=te();return Fe("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[F("h2",{ref:n,tabIndex:-1,className:"sekyro-text-body",children:o(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?F("p",{className:"sekyro-text-muted",children:o("portrait.reviewDescription")}):null,e.uploadFailed?Fe(x,{tone:"danger",children:[F("span",{children:o("portrait.uploadFailed")}),F(C,{kind:"ghost",onClick:()=>{e.resubmit()},children:o("portrait.sendAgain")})]}):F("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:o("portrait.matching")})]})}i(fn,"MatchPhase");function He({step:e,locale:t,strings:o,className:n,assetBaseUrl:a}){let s=w(t,o),[r,l]=un(0),c=dn(()=>ln(()=>mn.load().then(f=>({default:f.PortraitCaptureView}))),[r]);if(pn(()=>{e.phase==="capture"&&sn()},[e.phase]),e.phase==="match")return F("div",{className:n,children:F(fn,{step:e,i18n:s})});let m=Fe(x,{tone:"danger",children:[F("span",{children:s.t("errors.network_error")}),F(C,{kind:"ghost",onClick:()=>l(f=>f+1),children:s.t("portrait.retryCamera")})]});return F("div",{className:n,children:F(De,{fallback:m,children:F(cn,{fallback:F("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:F(c,{step:e,i18n:s,...a!==void 0?{assetBaseUrl:a}:{}})})},r)})}i(He,"PortraitCapture");import{cameraUnavailableCauseOf as An}from"@sekyro/web";import{useCallback as ye,useEffect as Zt,useId as Ln,useRef as Ye,useState as ge}from"react";var me={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"}}},yn=["danger","success","warning","info"];function Ke(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}i(Ke,"channel");function Vt(e){let t=Ke(parseInt(e.slice(1,3),16)),o=Ke(parseInt(e.slice(3,5),16)),n=Ke(parseInt(e.slice(5,7),16));return .2126*t+.7152*o+.0722*n}i(Vt,"luminance");function gn(e,t){let o=Vt(e),n=Vt(t),a=Math.max(o,n),s=Math.min(o,n);return(a+.05)/(s+.05)}i(gn,"contrastRatio");function Ot(e,t){return Math.min(...yn.map(o=>gn(me[e][o].fg,t)))}i(Ot,"worstAgainst");function Bt(e,t,o){return Math.min(Ot(e,t),Ot(e,o))}i(Bt,"worstStatusContrast");function Dt(e,t){return Bt("light",e,t)>=Bt("dark",e,t)?"light":"dark"}i(Dt,"statusSchemeFor");import{useId as hn,useState as Sn}from"react";import{jsx as we,jsxs as Ft}from"react/jsx-runtime";var kn=["intro","data","processing","sharing","retention"];function Ht({i18n:e,purpose:t="identity"}){let{t:o}=e,[n,a]=Sn(!1),s=hn(),[r,l=""]=o("consent.short").split("{terms}");return Ft("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[Ft("p",{className:"sekyro-text-muted",children:[r,we("button",{type:"button",className:"sekyro-link","aria-expanded":n,"aria-controls":s,onClick:()=>a(c=>!c),children:o("consent.termsLink")}),l]}),we("div",{id:s,hidden:!n,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:t==="human"?we(R,{view:"HumanConsentTerms",i18n:e,quiet:!0}):kn.map(c=>we("p",{children:o(`consent.terms.${c}`)},c))})]})}i(Ht,"ConsentNotice");function Ut(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()}i(Ut,"initials");import{useSyncExternalStore as bn}from"react";var Gt=i(e=>({colors:{...e?D.dark:D.light},radius:D.radiusLg,fontFamily:D.font}),"brandTheme"),Us=Gt(!1),Kt=/^#[0-9a-f]{6}$/i;function $e(e,t,o){if(t)return null;let n=pe(e).colors,a=o?.colors?.bg??n?.bg,s=o?.colors?.surface??n?.surface;return a===void 0&&s===void 0||a!==void 0&&!Kt.test(a)||s!==void 0&&!Kt.test(s)?null:Dt(a??D.light.bg,s??D.light.surface)}i($e,"partnerStatusScheme");function Wt(e,t,o){let n=pe(e);if(o&&n.colors!==void 0){let{brand:a,brandFg:s}=n.colors;a!==void 0&&wn(a,D.dark.bg)>=3?n.colors={brand:a,ring:a,...s!==void 0?{brandFg:s}:{}}:delete n.colors}if($e(e,o,t)==="dark"){let a=me.dark;n.colors={...n.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return be(Gt(o),n,st(t))}i(Wt,"verificationTheme");function Yt(e){let t=bn(Nn,Cn,()=>!1);return e==="dark"||e==="system"&&t}i(Yt,"useDarkScheme");var vn="(prefers-color-scheme: dark)",zt=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(vn):null,"media"),Cn=i(()=>zt()?.matches??!1,"prefersDark");function Nn(e){let t=zt();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(Nn,"subscribe");function wn(e,t){let[o,n]=[$t(e),$t(t)];return(Math.max(o,n)+.05)/(Math.min(o,n)+.05)}i(wn,"contrast");function $t(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)}i($t,"luminance");import{useEffect as Pn,useId as _n,useState as xn}from"react";import{jsx as K,jsxs as fe}from"react/jsx-runtime";var In=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),En={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 Tn({outcome:e}){return fe("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[K("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),K("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),K("path",{className:"sekyro-outcome__glyph",d:En[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(Tn,"OutcomeMark");function Mn({label:e,id:t,copied:o}){let[n,a]=xn(!1);return Pn(()=>{if(!n)return;let s=setTimeout(()=>a(!1),1600);return()=>clearTimeout(s)},[n]),fe("button",{type:"button",className:`sekyro-reference${n?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[K("span",{"aria-live":"polite",children:n?o:e}),K("bdi",{dir:"ltr",children:t}),K(z,{name:"copy"})]})}i(Mn,"ReferenceLine");function Ge({step:e,locale:t,strings:o,className:n,onClose:a}){let s=w(t,o),{t:r}=s,l=_n(),c=te(),m=e.context.orgName,f=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",u;switch(e.display){case"policy_stop":{let g=e.failureReason??"";if(In.has(Je(g)))u=r("session.result.detailsMismatch",{org:m});else if(g==="device_velocity_exceeded")u=r("session.result.deviceVelocity",{org:m});else if(g==="capture_tampered")u=r("session.result.deviceStop");else if(g==="camera_unavailable")u=r("reasons.camera_unavailable",{org:m});else{let y=Xe(g);u=y!==null?r(y,{org:m}):r("session.result.rejected.description")}break}case"cooldown":{let g=je(s.locale,e.retryAfter);u=g!==null?r(g.key,{time:g.time}):r("reasons.device_cooldown");break}case"platform_unsupported":u=r("result.platform_unsupported");break;case"attempts_exhausted":u=r("common.noAttemptsLeft");break;default:u=m!==""?r(`native.result.${f}`,{org:m}):r(`session.result.${f}.description`)}return fe("section",{className:`sekyro-result${n?` ${n}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[fe("div",{className:"sekyro-result__body",children:[K(Tn,{outcome:e.display==="cooldown"?"review":f}),fe("div",{className:"sekyro-heading",children:[K("h2",{id:l,ref:c,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${f}.title`)}),K("p",{className:"sekyro-text-muted",children:u})]}),K(Mn,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),a!==void 0?K("div",{className:"sekyro-actions",children:K(C,{full:!0,onClick:a,children:m!==""?r("native.result.back",{org:m}):r("native.close")})}):null]})}i(Ge,"VerificationResultScreen");import{Fragment as We,jsx as p,jsxs as $}from"react/jsx-runtime";function Rn(e,t,o){let n=t?D.dark:D.light,a=t?D.roles.dark:D.roles.light,s=e.colors??{},r={},l=s.fg===n.fg&&s.surface===n.surface;if(s.brand===n.brand&&s.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),s.fgMuted===n.fgMuted&&s.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===D.font&&(r["--sekyro-font-display"]=D.fontDisplay),o!==null){let c=me[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}i(Rn,"flowRoles");function ze(e){let{verification:t,locale:o,strings:n,onStep:a,onResult:s}=e,{step:r,error:l}=xe(t);Zt(()=>{r!==null&&a?.(r)},[r,a]),Zt(()=>s===void 0?void 0:t.on("result",s),[t,s]);let c=Yt(e.colorScheme??"light"),m=r?.context.branding,f=Wt(m,e.theme,c),[u,g]=ge(!1),y=`sekyro-verification${c?" sekyro-verification--dark":""}${u?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,N=Ye(e.onClose);N.current=e.onClose;let _=Ye(r);_.current=r;let S=ye(()=>{let k=_.current;N.current?.(k?.kind==="result"?{reason:"finished",result:k.result}:{reason:"cancelled"})},[]);return p(at,{theme:f,className:y,children:p(de,{locale:o,...n!==void 0?{strings:n}:{},children:p("div",{dir:e.dir??(o==="ar"?"rtl":"ltr"),lang:o,className:"sekyro-flow",style:Rn(f,c,$e(m,c,e.theme)),children:p(ct.Provider,{value:g,children:p(ve.Provider,{value:e.onClose!==void 0?S:void 0,children:p(Bn,{...e,step:r,error:l,immersive:u})})})})})})}i(ze,"SekyroVerification");function Vn(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}i(Vn,"processingCopyOf");function On({error:e,retry:t}){let{t:o}=w(),n=te();return $(ke,{tone:"danger",testId:"sekyro-error-notice",children:[p("span",{children:o(Qe(e.kind))}),e.retryable?p(C,{ref:n,kind:"ghost",className:"sekyro-btn--start",onClick:t,children:o("common.retry")}):null]})}i(On,"CameraErrorNotice");function Bn(e){let{step:t,error:o,slots:n,immersive:a}=e,s=w(),{t:r}=s,[l,c]=ge(!1),[m,f]=ge(0),[u,g]=ge(null),y=t?.context.purpose??"identity",N=e.verification,_=y==="human"||t?.context.cameraUnavailableHandled===!0,S=N.reportCameraUnavailable!==void 0&&_?d=>N.reportCameraUnavailable?.(d)??Promise.resolve():void 0,k=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,A=e.handoffUrl,M=ye((d,E)=>S===void 0?void 0:p(R,{view:"NoCameraView",i18n:s,quiet:!0,cause:E,onRetry:d,...k?{onContinue:S}:{},...A!==void 0?{handoffUrl:A}:{}}),[s,N,_,k,A]),Z=ye((d,E)=>p(yt,{start:d,context:E,human:y==="human",extra:E.canChooseFacing&&p(ot,{value:E.facing,onChange:E.setFacing}),notice:E.permissionSettled&&E.permission==="denied"?M(d,"denied"):void 0}),[y,M]),v=ye((d,E)=>{let j=An(d.kind);return(j!==void 0?M(E,j):void 0)??$(We,{children:[p(On,{error:d,retry:E}),j!==void 0&&A!==void 0?p(R,{view:"DesktopHandoffView",i18n:s,quiet:!0,url:A}):null]})},[M,A,s]),B=Ye(""),I=e.livenessProps?.slots?.stageOverlay,G=ye(d=>(d.guidance!==""&&!d.coached&&(B.current=d.guidance),p(gt,{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:B.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:I?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>f(E=>E+1),"onClose")},end:d.switchCamera&&p("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":r("capture.switchCamera"),children:p(et,{})})})),[r,I]),L=Ln();if(o!==null)return p(ke,{tone:"danger",children:p("span",{children:r(oe(o,s.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r("common.loading")});let{context:H}=t,Y=i(d=>{c(!0),d().finally(()=>c(!1))},"refresh"),he=n?.header??p(Fn,{context:H,headerId:L,end:n?.headerEnd}),P,X=u===t.key&&t.context.switchable!==void 0;if(X)P=p(R,{view:"LaneChoiceView",i18n:s,step:t,onClose:()=>g(null)});else switch(t.kind){case"phone_otp":P=p(Ie,{step:t});break;case"email_otp":P=p(Te,{step:t});break;case"method":P=p(Le,{step:t});break;case"registry":P=p(Ne,{step:t});break;case"document":P=p(Be,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,E={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??Z,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:v}:{}},...m>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};P=p(tt.Provider,{value:G,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(R,{view:"LivePhotoLiveness",i18n:s,step:t,livenessProps:E,sekyroIntro:d===void 0},m):p(rt,{...E},m)});break}case"portrait":P=$(We,{children:[t.retakeOnly?p(R,{view:"PortraitRetakeNotice",i18n:s,quiet:!0}):null,p(He,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":P=p(R,{view:"ContactChoiceView",i18n:s,step:t});break;case"choice":P=p(R,{view:"GenericChoiceView",i18n:s,step:t});break;case"identity_summary":P=p(R,{view:"IdentitySummaryView",i18n:s,step:t});break;case"mobile_required":P=e.handoffUrl!==void 0?p(R,{view:"HandoffView",i18n:s,url:e.handoffUrl,refresh:t.refresh}):$(ke,{tone:"info",children:[p("strong",{children:r("handoff.title")}),p("span",{children:r("reasons.mobile_required")}),p(C,{kind:"ghost",disabled:l,onClick:()=>Y(t.refresh),children:r("common.refresh")})]});break;case"processing":{let d=Vn(s.strings,t.service);P=$("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(C,{kind:"ghost",disabled:l,onClick:()=>Y(t.refresh),children:r("common.refresh")}):null]});break}case"eid":P=p(Me,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";P=$("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?H.orgName!==""?r("needsApp.description",{org:H.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:H.orgName})})]});break}case"result":P=n?.result?.(t)??p(Dn,{step:t});break;default:{let d=t;P=null}}return $(We,{children:[a?null:he,!a&&t.kind!=="result"&&H.sections.length>1?p(Hn,{context:H,current:t.section,i18n:s}):null,!a&&!H.consentRecorded&&t.kind!=="result"?p(Ht,{i18n:s,purpose:H.purpose}):null,p(pt,{pageKey:t.key,children:P}),!a&&!X&&t.kind!=="result"&&t.context.switchable!==void 0?p(R,{view:"LaneSwitch",i18n:s,step:t,onOpen:()=>g(t.key),quiet:!0},t.key):null,a?null:n?.footer!==void 0?n.footer:H.branding?.hideAttribution===!0?null:$("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[p(z,{name:"lock"}),r("shell.verifiedBy")]})]})}i(Bn,"Body");function Dn({step:e}){return p(ve.Consumer,{children:t=>p(Ge,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Dn,"ResultPage");function Fn({context:e,headerId:t,end:o}){let{t:n}=w(),[a,s]=ge(!1),r=a?void 0:e.branding?.logoUrl,l=e.orgName!==""?e.orgName:n(e.returning?"returning.title":"session.title");return $("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[$("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:()=>s(!0)}):Ut(e.orgName)}),$("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(ve.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(z,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:n("returning.description")}):null]})}i(Fn,"OrgHeader");function Hn({context:e,current:t,i18n:o}){let n=t===null?-1:e.sections.indexOf(t),a=e.progress,s=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:s.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))})}i(Hn,"SectionProgress");import{useEffect as Kn,useState as qt}from"react";var Un=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Ze(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return Un.test(t)}i(Ze,"isInAppBrowser");import{jsx as le}from"react/jsx-runtime";function $n(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i($n,"pageUrl");function Gn({hostedUrl:e,inAppBrowser:t,...o}){let[n,a]=qt(t===!0);Kn(()=>{t===void 0&&Ze()&&a(!0)},[t]);let[s,r]=qt(!1),l=o.handoffUrl??e??$n();return n&&!s?le(it,{theme:be(pe(void 0),o.theme),...o.className!==void 0?{className:o.className}:{},children:le(de,{locale:o.locale,...o.strings!==void 0?{strings:o.strings}:{},children:le("div",{dir:o.dir??(o.locale==="ar"?"rtl":"ltr"),lang:o.locale,className:"sekyro-stack sekyro-stack--4",children:le(Wn,{url:l,onContinue:()=>r(!0)})})})}):le(ze,{...o,...l!==""?{handoffUrl:l}:{}})}i(Gn,"SekyroFlow");function Wn({url:e,onContinue:t}){let o=w();return le(R,{view:"InAppBrowserPrompt",i18n:o,url:e,onContinue:t})}i(Wn,"Prompt");export{Be as DocumentCapture,Me as EidStep,Te as EmailOtpStep,Ne as IdNumberEntry,Le as MethodChoice,$o as NniEntry,Ie as PhoneOtpStep,He as PortraitCapture,Gn as SekyroFlow,ze as SekyroVerification,de as StepI18nProvider,Ge as VerificationResultScreen,to as arSteps,oo as enSteps,ro as formatTemplate,no as frSteps,Ze as isInAppBrowser,jt as loadSekyroLocale,so as resolveSekyroStrings,eo as retakeHintStringKey,w as useStepI18n,xe as useVerificationStep};
|
package/dist/verification.css
CHANGED
|
@@ -213,6 +213,9 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
213
213
|
|
|
214
214
|
/* Notices: soft tinted blocks, no heavy border. */
|
|
215
215
|
.sekyro-root .sekyro-notice { border-color: transparent; border-radius: var(--sekyro-radius); font: var(--sekyro-type-flow-label) var(--sekyro-font); }
|
|
216
|
+
/* On a partner page the notices sit on the chosen standard status set's soft surface (set by the flow); else today's tint. */
|
|
217
|
+
.sekyro-root .sekyro-notice--warning { background: var(--sekyro-color-warning-soft, color-mix(in srgb, var(--sekyro-color-warning) 10%, var(--sekyro-color-surface))); }
|
|
218
|
+
.sekyro-root .sekyro-notice--danger { background: var(--sekyro-color-danger-soft, color-mix(in srgb, var(--sekyro-color-danger) 8%, var(--sekyro-color-surface))); }
|
|
216
219
|
|
|
217
220
|
/* ── Fields: white with a hairline; a 2px ring on focus (red with an error) ── */
|
|
218
221
|
.sekyro-root .sekyro-label { font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-fg-muted); }
|
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.13",
|
|
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.15 || ^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.13",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.13",
|
|
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.13?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.13"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-ECWKDUB5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as r}from"./chunk-2KED7D2Q.js";import{forwardRef as z}from"react";import{jsx as T}from"react/jsx-runtime";var A=z(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 — light on your face, 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 — 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 — 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é — lumière sur le visage, pas 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 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 — é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-VCSJQ4KN.js"):e==="pt"?import("./overlay-pt-NQMWHKF5.js"):import("./overlay-de-UWA5CZLC.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 J(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(J,"retryAfterTime");function Q(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(Q,"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 k=L(e=>u[e]??""),ce=k.Provider;function ue(){return S(k)}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,J as n,Q as o,ie as p,se as q,ce as r,ue as s,fe as t,me as u};
|