@sekyro/react 0.1.0-rc.6 → 0.1.0-rc.8
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 +43 -0
- package/README.md +52 -29
- package/dist/{chunk-Q232JYNO.js → chunk-2CJEADGY.js} +1 -1
- package/dist/{chunk-63NUMQST.js → chunk-2PGJ7P7E.js} +1 -1
- package/dist/chunk-36RC3M4K.js +2 -0
- package/dist/{chunk-AMOZXMUP.js → chunk-4ENKV24I.js} +1 -1
- package/dist/{chunk-4INDRENU.js → chunk-5JPJXBN6.js} +1 -1
- package/dist/{chunk-ADMDZLPM.js → chunk-COU4Y3DB.js} +1 -1
- package/dist/chunk-H2KIOYQU.js +2 -0
- package/dist/{chunk-BENNJ4GV.js → chunk-LZU57LVO.js} +1 -1
- package/dist/chunk-OSS4NHIS.js +2 -0
- package/dist/chunk-PXRIFHY2.js +2 -0
- package/dist/{chunk-P2LX7BBE.js → chunk-R2D6V2R6.js} +1 -1
- package/dist/chunk-Y4PPDNQR.js +2 -0
- package/dist/chunk-ZTN4YV7S.js +2 -0
- package/dist/chunk-ZVSRJKQE.js +2 -0
- package/dist/document-capture-view-IAVBLXBO.js +2 -0
- package/dist/eid-view-FK54R7ER.js +2 -0
- package/dist/email-otp-view-ZVXSJMN5.js +2 -0
- package/dist/flow-views-5VR7NLTE.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/portrait-capture-view-FYUOQWF7.js +2 -0
- package/dist/{theme-BpOuzcWh.d.ts → theme-7Jj6eSH6.d.cts} +25 -8
- package/dist/{theme-BpOuzcWh.d.cts → theme-7Jj6eSH6.d.ts} +25 -8
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +8 -1
- package/dist/verification/index.d.ts +8 -1
- 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-3MBJZSJL.js +0 -2
- package/dist/chunk-4RUZQW5T.js +0 -2
- package/dist/chunk-65JA6YKG.js +0 -2
- package/dist/chunk-BJJZ4MO5.js +0 -2
- package/dist/chunk-BRA6F56P.js +0 -2
- package/dist/chunk-JAUZKPQO.js +0 -2
- package/dist/chunk-YUNPD6ZB.js +0 -2
- package/dist/document-capture-view-SKFDM4AQ.js +0 -2
- package/dist/eid-view-WIK6KUTY.js +0 -2
- package/dist/email-otp-view-TYSBCGUY.js +0 -2
- package/dist/flow-views-PCBR5GYS.js +0 -2
- package/dist/portrait-capture-view-HYOEOAF4.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Strings, a as SekyroLocale, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-
|
|
1
|
+
import { S as Strings, a as SekyroLocale, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-7Jj6eSH6.cjs';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -105,6 +105,7 @@ interface StepStrings {
|
|
|
105
105
|
"session.result.expired.description": string;
|
|
106
106
|
"session.result.detailsMismatch": string;
|
|
107
107
|
"session.result.deviceVelocity": string;
|
|
108
|
+
"session.result.deviceStop": string;
|
|
108
109
|
"result.referenceLabel": string;
|
|
109
110
|
"common.loading": string;
|
|
110
111
|
"common.refresh": string;
|
|
@@ -169,6 +170,8 @@ interface StepStrings {
|
|
|
169
170
|
"reasons.icao_background": string;
|
|
170
171
|
"reasons.icao_resolution": string;
|
|
171
172
|
"reasons.portrait_not_from_liveness": string;
|
|
173
|
+
"reasons.tester_document_mismatch": string;
|
|
174
|
+
"reasons.tester_phone_mismatch": string;
|
|
172
175
|
"method.national_eid": string;
|
|
173
176
|
"method.national_eidGeneric": string;
|
|
174
177
|
"consent.short": string;
|
|
@@ -177,6 +180,7 @@ interface StepStrings {
|
|
|
177
180
|
"section.contact": string;
|
|
178
181
|
"section.identity": string;
|
|
179
182
|
"section.live_photo": string;
|
|
183
|
+
"section.screening": string;
|
|
180
184
|
"handoff.copied": string;
|
|
181
185
|
"needsApp.title": string;
|
|
182
186
|
"needsApp.description": string;
|
|
@@ -318,6 +322,9 @@ interface StepStrings {
|
|
|
318
322
|
"native.scan.reading"?: string;
|
|
319
323
|
"native.scan.putDown"?: string;
|
|
320
324
|
"native.scan.retry"?: string;
|
|
325
|
+
"choice.title"?: string;
|
|
326
|
+
"choice.description"?: string;
|
|
327
|
+
"choice.switch"?: string;
|
|
321
328
|
"contact.title"?: string;
|
|
322
329
|
"contact.description"?: string;
|
|
323
330
|
"contact.phone"?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Strings, a as SekyroLocale, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-
|
|
1
|
+
import { S as Strings, a as SekyroLocale, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-7Jj6eSH6.js';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -105,6 +105,7 @@ interface StepStrings {
|
|
|
105
105
|
"session.result.expired.description": string;
|
|
106
106
|
"session.result.detailsMismatch": string;
|
|
107
107
|
"session.result.deviceVelocity": string;
|
|
108
|
+
"session.result.deviceStop": string;
|
|
108
109
|
"result.referenceLabel": string;
|
|
109
110
|
"common.loading": string;
|
|
110
111
|
"common.refresh": string;
|
|
@@ -169,6 +170,8 @@ interface StepStrings {
|
|
|
169
170
|
"reasons.icao_background": string;
|
|
170
171
|
"reasons.icao_resolution": string;
|
|
171
172
|
"reasons.portrait_not_from_liveness": string;
|
|
173
|
+
"reasons.tester_document_mismatch": string;
|
|
174
|
+
"reasons.tester_phone_mismatch": string;
|
|
172
175
|
"method.national_eid": string;
|
|
173
176
|
"method.national_eidGeneric": string;
|
|
174
177
|
"consent.short": string;
|
|
@@ -177,6 +180,7 @@ interface StepStrings {
|
|
|
177
180
|
"section.contact": string;
|
|
178
181
|
"section.identity": string;
|
|
179
182
|
"section.live_photo": string;
|
|
183
|
+
"section.screening": string;
|
|
180
184
|
"handoff.copied": string;
|
|
181
185
|
"needsApp.title": string;
|
|
182
186
|
"needsApp.description": string;
|
|
@@ -318,6 +322,9 @@ interface StepStrings {
|
|
|
318
322
|
"native.scan.reading"?: string;
|
|
319
323
|
"native.scan.putDown"?: string;
|
|
320
324
|
"native.scan.retry"?: string;
|
|
325
|
+
"choice.title"?: string;
|
|
326
|
+
"choice.description"?: string;
|
|
327
|
+
"choice.switch"?: string;
|
|
321
328
|
"contact.title"?: string;
|
|
322
329
|
"contact.description"?: string;
|
|
323
330
|
"contact.phone"?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as re,d as se,e as ie}from"../chunk-ADMDZLPM.js";import{a as We}from"../chunk-AMOZXMUP.js";import{a as Ye}from"../chunk-4INDRENU.js";import{a as Qe}from"../chunk-JAUZKPQO.js";import{a as Ue,c as Ke,f as ze}from"../chunk-BRA6F56P.js";import{a as q}from"../chunk-P2LX7BBE.js";import{a as Nt,b as Ct,c as wt,d as Pt,e as _t,f as ee,g as N}from"../chunk-BJJZ4MO5.js";import{b as $e}from"../chunk-65JA6YKG.js";import{a as Je}from"../chunk-3MBJZSJL.js";import{a as z}from"../chunk-Q232JYNO.js";import{a as $,b as U,c as ae,d as qe,g as Ge}from"../chunk-63NUMQST.js";import{a as w,b as le}from"../chunk-BENNJ4GV.js";import{a as i,b as v,h as Oe,i as He,k as ue,l as ne}from"../chunk-4RUZQW5T.js";import{useEffect as xt,useState as Xe}from"react";function me(e){let[t,o]=Xe(()=>e?.currentStep?.()??null),[s,a]=Xe(null);return xt(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let r=!0,n=e.on("step",l=>{r&&o(l)});return e.run().then(l=>{r&&o(c=>c??l)},l=>{r&&a(l)}),()=>{r=!1,n()}},[e]),{step:t,error:s}}i(me,"useVerificationStep");import{useEffect as It,useId as Et,useRef as Vt,useState as pe}from"react";import{Fragment as je,jsx as g,jsxs as M}from"react/jsx-runtime";var Ze=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"),Tt=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Lt=["whatsapp","sms"],Rt=new Set(["otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited"]),W="+222";function At(e){let t=e.replace(/[\s-]/g,""),o=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(o)?`+${o}`:null}i(At,"normalizedPhone");function Dt({id:e,label:t,value:o,onChange:s,placeholder:a}){let r=o.startsWith("+")&&!o.startsWith(W),n=r?o:o.slice(o.startsWith(W)?W.length:0).trim(),l=Vt(null);return It(()=>{let c=setTimeout(()=>l.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(c)},[]),M("div",{className:"sekyro-field",children:[g("label",{className:"sekyro-label",htmlFor:e,children:t}),M("div",{className:"sekyro-phone",dir:"ltr",children:[r?null:M("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[g("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:"🇲🇷"}),W]}),g("input",{ref:l,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...r?{}:{"aria-describedby":`${e}-dial`},placeholder:a,value:n,onChange:c=>{let d=c.target.value.replace(/[^\d +]/g,"");s(d.startsWith("+")?d:W+d.replace(/\D/g,""))}})]})]})}i(Dt,"PhoneField");function fe({step:e,locale:t,strings:o,className:s,defaultPhone:a=W,onError:r}){let n=N(t,o),{t:l}=n,[c,d]=pe(a),[y,S]=pe(""),[m,k]=pe(!1),[h,V]=pe(null),P=e.phase==="verify",T=Ye(P),R=Et(),b=i(async _=>{k(!0),V(null);try{await _()}catch(L){V(q(L,n.strings)),r?.(L)}finally{k(!1)}},"run"),u=Lt.filter(_=>(e.channels??[]).includes(_)),f=At(c),x=!e.needsPhone||f!==null,C=i((_,L=!1)=>{b(()=>e.send({...e.needsPhone&&(!L||c!==a)?{phone:f??c}:{},..._!==void 0?{channel:_}:{}}))},"send"),De=i(_=>{b(()=>e.verify(_))},"submitCode"),Be=i(_=>{_.preventDefault(),P?De(y):u.length<=1&&x&&C(u[0])},"onSubmit"),Me=Ze(e.codeExpiresAt,T),j=Ze(e.resendAvailableAt,T),oe=P&&e.codeExpiresAt!==void 0&&Me===0,de=i(_=>l(_==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[ht,bt]=l("otp.sentTo",{channel:de(e.channel)}).split("{number}"),vt=e.reason==="otp_mismatch"?M(w,{tone:"danger",children:[g("span",{children:l("otp.reason_otp_mismatch")}),g("span",{children:le(n,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Rt.has(e.reason)?g(w,{tone:"warning",children:g("span",{children:l(`otp.reason_${e.reason}`)})}):null,Fe=M(je,{children:[vt,h!==null?g(w,{tone:"danger",children:g("span",{children:l(h)})}):null]});if(P){let _=u.length===0;return M("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":R,onSubmit:Be,noValidate:!0,children:[g($,{id:R,title:l("otp.verifyTitle"),lead:M(je,{children:[ht,g("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),bt]})}),Fe,M("div",{className:"sekyro-field",children:[g("label",{className:"sekyro-label",htmlFor:`${R}-code`,children:l("otp.codeLabel")}),g(We,{id:`${R}-code`,value:y,invalid:e.reason==="otp_mismatch",onChange:L=>{S(L),L.length===6&&y.length!==6&&!m&&!e.attemptsExhausted&&De(L)}}),g("span",{className:`sekyro-help sekyro-otp-expiry${oe?" is-danger":""}`,"aria-hidden":!oe||void 0,children:oe?l("otp.expired"):l("otp.expiresIn",{time:Tt(Me)})})]}),g("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:oe?l("otp.expired"):""}),M(U,{children:[g(v,{type:"submit",full:!0,disabled:m||y.length!==6||e.attemptsExhausted,"aria-busy":m||void 0,children:l("otp.verify")}),_?g("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:m||j>0,onClick:()=>C(void 0,!0),children:j>0?l("otp.resendIn",{seconds:j}):l("otp.resend")}):j>0?g("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:j})}):g("div",{className:"sekyro-resend-row",children:u.map(L=>g("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:m,onClick:()=>C(L,!0),children:l("otp.resendBy",{channel:de(L)})},L))})]})]})}return M("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":R,onSubmit:Be,noValidate:!0,children:[g($,{id:R,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Fe,e.needsPhone?g(Dt,{id:`${R}-phone`,label:l("otp.phoneLabel"),value:c,onChange:d,placeholder:l("otp.phonePlaceholder").replace(W,"").trim()}):g("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),g(U,{children:u.length>0?M("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[g("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),u.map((_,L)=>g(v,{kind:L===0?"primary":"ghost",full:!0,disabled:m||!x,"aria-busy":L===0&&m||void 0,onClick:()=>C(_),children:l("otp.sendBy",{channel:de(_)})},_))]}):g(v,{type:"submit",full:!0,disabled:m||!x,"aria-busy":m||void 0,children:l("otp.send")})})]})}i(fe,"PhoneOtpStep");import{lazy as Mt,Suspense as Ft,useMemo as Ot,useState as Ht}from"react";import{Component as Bt}from"react";var ye=class ye extends Bt{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(ye,"LoadBoundary");var O=ye;import{jsx as G,jsxs as Ut}from"react/jsx-runtime";var $t={load:i(()=>import("../email-otp-view-TYSBCGUY.js"),"load")};function ke({locale:e,strings:t,...o}){let s=N(e,t),[a,r]=Ht(0),n=Ot(()=>Mt(()=>$t.load().then(c=>({default:c.EmailOtpView}))),[a]),l=Ut(w,{tone:"danger",children:[G("span",{children:s.t("errors.network_error")}),G(v,{kind:"ghost",onClick:()=>r(c=>c+1),children:s.t("common.retry")})]});return G(O,{fallback:l,children:G(Ft,{fallback:G("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:G(n,{...o,i18n:s})})},a)}i(ke,"EmailOtpStep");import{lazy as Kt,Suspense as zt,useMemo as Wt,useState as qt}from"react";import{jsx as Y,jsxs as Yt}from"react/jsx-runtime";var Gt={load:i(()=>import("../eid-view-WIK6KUTY.js"),"load")};function Se({locale:e,strings:t,...o}){let s=N(e,t),[a,r]=qt(0),n=Wt(()=>Kt(()=>Gt.load().then(c=>({default:c.EidView}))),[a]),l=Yt(w,{tone:"danger",children:[Y("span",{children:s.t("errors.network_error")}),Y(v,{kind:"ghost",onClick:()=>r(c=>c+1),children:s.t("common.retry")})]});return Y(O,{fallback:l,children:Y(zt,{fallback:Y("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Y(n,{...o,i18n:s})})},a)}i(Se,"EidStep");import{useMemo as et,useState as tt}from"react";import{lazy as Qt,Suspense as Jt,useMemo as Xt,useState as Zt}from"react";import{jsx as Q,jsxs as eo}from"react/jsx-runtime";var jt={load:i(()=>import("../flow-views-PCBR5GYS.js"),"load")};function F({view:e,i18n:t,quiet:o,...s}){let[a,r]=Zt(0),n=Xt(()=>Qt(()=>jt.load().then(c=>({default:c[e]}))),[e,a]),l=eo(w,{tone:"danger",children:[Q("span",{children:t.t("errors.network_error")}),Q(v,{kind:"ghost",onClick:()=>r(c=>c+1),children:t.t("common.retry")})]});return Q(O,{fallback:l,children:Q(Jt,{fallback:o===!0?null:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:Q(n,{...s,i18n:t})})},a)}i(F,"Flow");import{jsx as ge,jsxs as to}from"react/jsx-runtime";function he({step:e,locale:t,strings:o,className:s,onError:a}){let r=N(t,o),[n,l]=tt(!1),[c,d]=tt(!1),y=et(()=>e.options.filter(h=>h!=="document_chip"),[e.options]),S=e.nationalEid?.providerName,m=S?r.t("method.national_eid",{provider:S}):r.t("method.national_eidGeneric"),k=et(()=>h=>r.strings[h]??"",[r]);return to("div",{className:s,children:[ge($e,{value:k,children:ge(Ke,{choice:{available:!0,selected:null,options:y},busy:n,failed:c,focus:!0,eidLabel:m,onSelect:h=>{l(!0),d(!1),e.select(h).then(()=>l(!1),V=>{l(!1),d(!0),a?.(V)})}})}),e.nationalEid?.afterPass==="continue"&&y.includes("national_eid")?ge(F,{view:"EidContinueHint",i18n:r,provider:S,quiet:!0}):null]})}i(he,"MethodChoice");import{isValidNni as oo,normalizeNni as ot}from"@sekyro/web";import{useId as no,useState as be}from"react";import{Fragment as ro,jsx as I,jsxs as J}from"react/jsx-runtime";function ve({step:e,locale:t,strings:o,className:s,onError:a}){let r=N(t,o),{t:n}=r,[l,c]=be(""),[d,y]=be(!1),[S,m]=be(null),k=no(),h=e.attemptsExhausted,V=i(async x=>{y(!0),m(null);try{await x()}catch(C){m(q(C,r.strings)),a?.(C)}finally{y(!1)}},"run"),P=i(x=>{if(x.preventDefault(),e.source!=="typed"){V(()=>e.confirm());return}let C=ot(l);if(!/^\d{10}$/.test(C))return m("population.invalid");if(!oo(C))return m("population.reason_nni_invalid");V(()=>e.submitNni(C))},"onSubmit"),T=le(r,e.attemptsRemaining,h),R=J(ro,{children:[e.reason==="registry_unavailable"?J(w,{tone:"warning",children:[I("span",{children:n("population.reason_registry_unavailable")}),I("span",{children:T})]}):null,e.reason==="nni_not_found"&&e.canUseDocument?J(w,{tone:"warning",children:[I("span",{children:n("population.reason_nni_not_found_or_document")}),I("span",{children:T}),I(v,{kind:"ghost",disabled:d,onClick:()=>{V(()=>e.useDocument())},children:n("population.useDocument")})]}):null,e.reason==="nni_not_found"&&!e.canUseDocument||e.reason==="nni_invalid"?J(w,{tone:"danger",children:[I("span",{children:n(e.reason==="nni_not_found"?"population.reason_nni_not_found":"population.reason_nni_invalid")}),I("span",{children:T})]}):null,h&&e.reason===void 0?I(w,{tone:"danger",children:I("span",{children:T})}):null,S!==null?I(w,{tone:"danger",children:I("span",{children:n(S)})}):null]}),[b,u,f]=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 J("form",{className:`sekyro-step${s?` ${s}`:""}`,"aria-labelledby":k,onSubmit:P,noValidate:!0,children:[I($,{id:k,title:n(b),lead:n(u)}),R,e.source==="typed"?J("div",{className:"sekyro-field",children:[I("label",{className:"sekyro-label",htmlFor:`${k}-nni`,children:n("population.label")}),I("input",{id:`${k}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:n("population.placeholder"),value:l,"aria-describedby":`${k}-nni-help`,"aria-invalid":S==="population.invalid"||S==="population.reason_nni_invalid"||void 0,onChange:x=>{m(null),c(ot(x.target.value).replace(/\D/g,"").slice(0,10))}}),I("span",{id:`${k}-nni-help`,className:"sekyro-help",children:n("population.helper")})]}):null,I(U,{children:h?null:I(v,{type:"submit",full:!0,disabled:d,"aria-busy":d||void 0,children:n(f)})})]})}i(ve,"NniEntry");import{acceptedIssuers as co,acceptedTypesFor as uo,warmDocumentCapture as mo}from"@sekyro/web";import{lazy as fo,Suspense as yo,useEffect as ko,useMemo as So,useState as at}from"react";import{acceptedIssuers as so,acceptedTypesFor as Ne}from"@sekyro/web";import{useEffect as nt,useId as io,useMemo as rt,useState as Ce}from"react";import{jsx as E,jsxs as X}from"react/jsx-runtime";var st=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),ao=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),lo=220;function po(e,t){let o=null;try{o=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(r=>({code:r,name:o?.of(r)??r})),a=new Intl.Collator(e);return s.sort((r,n)=>r.code==="MR"?-1:n.code==="MR"?1:a.compare(r.name,n.name))}i(po,"countryNames");function it({step:e,i18n:t,issuer:o,onPicked:s}){let{t:a,locale:r}=t,n=rt(()=>so(e.documents),[e.documents]),l=rt(()=>po(r,n),[r,n]),c=n.length===1?n[0]:null,[d,y]=Ce(o??c),[S,m]=Ce(""),[k,h]=Ce(null),V=io(),P=c===null?[]:Ne(e.documents,c),T=c!==null&&P.length===1?P[0]:null;nt(()=>{c!==null&&T!==null&&e.selectDocument(c,T)},[c,T]);let R=i((f,x)=>{e.selectDocument(f,x),s?.()},"pick"),b=i(f=>{let x=Ne(e.documents,f);x.length===1?R(f,x[0]):y(f)},"chooseIssuer");if(nt(()=>{if(k===null||d===null)return;let f=setTimeout(()=>R(d,k),lo);return()=>clearTimeout(f)},[k]),T!==null)return null;if(d===null){let f=st(S.trim()),x=f===""?l:l.filter(C=>st(C.name).includes(f)||C.code.toLowerCase()===f);return X("section",{className:"sekyro-step",children:[E($,{title:a("doc.countryTitle"),lead:a("doc.pickDescription")}),X("div",{className:"sekyro-field",children:[E("label",{className:"sekyro-label",htmlFor:V,children:a("doc.countryLabel")}),E("input",{id:V,type:"search",className:"sekyro-input",placeholder:a("doc.countrySearch"),value:S,onChange:C=>m(C.target.value)})]}),x.length===0?E("p",{className:"sekyro-text-muted",children:a("doc.noCountryMatch")}):E("ul",{className:"sekyro-rows",children:x.map(C=>E("li",{children:X("button",{type:"button",className:"sekyro-row-btn",onClick:()=>b(C.code),children:[E("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:ao(C.code)}),C.name]})},C.code))}),E(U,{children:null})]})}let u=Ne(e.documents,d);return X("section",{className:"sekyro-step",children:[E($,{title:a("doc.pickTitle"),lead:a("native.doc.holdIt")}),E("div",{className:"sekyro-choices",children:u.map(f=>X("button",{type:"button",className:"sekyro-card","aria-pressed":k===f,disabled:k!==null&&k!==f,onClick:()=>h(f),children:[E(z,{name:f==="passport"?"passport":"card"}),X("span",{className:"sekyro-card__body",children:[E("span",{className:"sekyro-card__title",children:a(`doc.type.${f}`)}),E("span",{className:"sekyro-card__sub",children:a(`doc.sub.${f}`)})]}),E("span",{className:"sekyro-radio","aria-hidden":"true"})]},f))}),n.length>1?E("button",{type:"button",className:"sekyro-link",onClick:()=>{y(null),h(null)},children:a("native.doc.changeCountry")}):null,E(U,{children:null})]})}i(it,"DocumentPicker");import{jsx as K,jsxs as ho}from"react/jsx-runtime";var go={load:i(()=>import("../document-capture-view-SKFDM4AQ.js"),"load")};function we({step:e,locale:t,strings:o,className:s,liveMrz:a}){let r=N(t,o),[n,l]=at(0),[c,d]=at(null),y=co(e.documents).length>1,S=e.issuer!==null&&uo(e.documents,e.issuer).length>1,m=So(()=>fo(()=>go.load().then(h=>({default:h.DocumentCaptureView}))),[n]);ko(()=>{mo()},[]);let k=ho(w,{tone:"danger",children:[K("span",{children:r.t("errors.network_error")}),K(v,{kind:"ghost",onClick:()=>l(h=>h+1),children:r.t("doc.retryCamera")})]});return K("div",{className:s,children:e.documentType===null||e.issuer===null||c!==null?K(it,{step:e,i18n:r,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>d(null)}):K(O,{fallback:k,children:K(yo,{fallback:K("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:K(m,{step:e,i18n:r,...a!==void 0?{liveMrz:a}:{},...y?{onChangeCountry:i(()=>d("country"),"onChangeCountry")}:{},...S?{onChangeDocument:i(()=>d("document"),"onChangeDocument")}:{}})})},n)})}i(we,"DocumentCapture");import{warmPortraitCapture as bo}from"@sekyro/web";import{Component as vo,lazy as No,Suspense as Co,useEffect as wo,useMemo as Po,useState as _o}from"react";import{jsx as A,jsxs as _e}from"react/jsx-runtime";var xo={load:i(()=>import("../portrait-capture-view-HYOEOAF4.js"),"load")},Ie=class Ie extends vo{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Ie,"LoadBoundary");var Pe=Ie;function Io({step:e,i18n:t}){let{t:o}=t,s=ne();return _e("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[A("h2",{ref:s,tabIndex:-1,className:"sekyro-text-body",children:o(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?A("p",{className:"sekyro-text-muted",children:o("portrait.reviewDescription")}):null,e.uploadFailed?_e(w,{tone:"danger",children:[A("span",{children:o("portrait.uploadFailed")}),A(v,{kind:"ghost",onClick:()=>{e.resubmit()},children:o("portrait.sendAgain")})]}):A("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:o("portrait.matching")})]})}i(Io,"MatchPhase");function xe({step:e,locale:t,strings:o,className:s,assetBaseUrl:a}){let r=N(t,o),[n,l]=_o(0),c=Po(()=>No(()=>xo.load().then(y=>({default:y.PortraitCaptureView}))),[n]);if(wo(()=>{e.phase==="capture"&&bo()},[e.phase]),e.phase==="match")return A("div",{className:s,children:A(Io,{step:e,i18n:r})});let d=_e(w,{tone:"danger",children:[A("span",{children:r.t("errors.network_error")}),A(v,{kind:"ghost",onClick:()=>l(y=>y+1),children:r.t("portrait.retryCamera")})]});return A("div",{className:s,children:A(Pe,{fallback:d,children:A(Co,{fallback:A("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:A(c,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{}})})},n)})}i(xe,"PortraitCapture");import{useCallback as Te,useEffect as kt,useId as zo,useRef as Le,useState as ce}from"react";var D={light:{brand:"#0d3b66",brandFg:"#ffffff",fg:"#13141f",fgMuted:"#4e5270",bg:"#f6f7fb",surface:"#ffffff",ring:"#0d3b66",danger:"#ca0f07",success:"#007a5e",warning:"#735003"},dark:{brand:"#6ea2d3",brandFg:"#051a2e",fg:"#f6f7fb",fgMuted:"#cbcedc",bg:"#13141f",surface:"#1d1e2c",ring:"#6ea2d3",danger:"#ff7c7c",success:"#00c897",warning:"#ffd98a"},roles:{light:{brandSoft:"#eaf2fa",line:"#cbcedc",lineSubtle:"#e2e4ee",lineStrong:"#8c91a9",sunken:"#eeeff5",fgSubtle:"#686d8a"},dark:{brandSoft:"#092b4b",line:"#4e5270",lineSubtle:"#2b2d40",lineStrong:"#686d8a",sunken:"#0b0c14",fgSubtle:"#8c91a9"}},stage:"#051a2e",stageAccent:"#69dfef",radius:"10px",radiusLg:"16px",font:'"Sekyro Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif',fontDisplay:'"Sekyro Geist", Geist, "Sekyro Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif',fontArabic:'"Sekyro Cairo", Cairo, "Sekyro Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif'};import{useId as Eo,useState as Vo}from"react";import{jsx as Ee,jsxs as lt}from"react/jsx-runtime";var To=["intro","data","processing","sharing","retention"];function pt({i18n:e}){let{t}=e,[o,s]=Vo(!1),a=Eo(),[r,n=""]=t("consent.short").split("{terms}");return lt("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[lt("p",{className:"sekyro-text-muted",children:[r,Ee("button",{type:"button",className:"sekyro-link","aria-expanded":o,"aria-controls":a,onClick:()=>s(l=>!l),children:t("consent.termsLink")}),n]}),Ee("div",{id:a,hidden:!o,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:To.map(l=>Ee("p",{children:t(`consent.terms.${l}`)},l))})]})}i(pt,"ConsentNotice");function ct(e){let t=e.trim().split(/\s+/).filter(s=>s!=="");return(t.length>=2?[t[0],t[1]].map(s=>Array.from(s??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(ct,"initials");import{useSyncExternalStore as Lo}from"react";var ut=i(e=>({colors:{...e?D.dark:D.light},radius:D.radiusLg,fontFamily:D.font}),"brandTheme"),Ur=ut(!1);function mt(e,t,o){let s=re(e);if(o&&s.colors!==void 0){let{brand:a,brandFg:r}=s.colors;a!==void 0&&Bo(a,D.dark.bg)>=3?s.colors={brand:a,ring:a,...r!==void 0?{brandFg:r}:{}}:delete s.colors}return se(ut(o),s,t)}i(mt,"verificationTheme");function ft(e){let t=Lo(Do,Ao,()=>!1);return e==="dark"||e==="system"&&t}i(ft,"useDarkScheme");var Ro="(prefers-color-scheme: dark)",yt=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Ro):null,"media"),Ao=i(()=>yt()?.matches??!1,"prefersDark");function Do(e){let t=yt();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(Do,"subscribe");function Bo(e,t){let[o,s]=[dt(e),dt(t)];return(Math.max(o,s)+.05)/(Math.min(o,s)+.05)}i(Bo,"contrast");function dt(e){let t=[1,3,5].map(o=>{let s=Number.parseInt(e.slice(o,o+2),16)/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(dt,"luminance");import{useEffect as Mo,useId as Fo,useState as Oo}from"react";import{jsx as B,jsxs as te}from"react/jsx-runtime";var Ho=new Set(["document_nni_mismatch","name_mismatch","birth_date_mismatch"]),$o={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 Uo({outcome:e}){return te("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[B("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),B("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),B("path",{className:"sekyro-outcome__glyph",d:$o[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(Uo,"OutcomeMark");function Ko({label:e,id:t,copied:o}){let[s,a]=Oo(!1);return Mo(()=>{if(!s)return;let r=setTimeout(()=>a(!1),1600);return()=>clearTimeout(r)},[s]),te("button",{type:"button",className:`sekyro-reference${s?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[B("span",{"aria-live":"polite",children:s?o:e}),B("bdi",{dir:"ltr",children:t}),B(z,{name:"copy"})]})}i(Ko,"ReferenceLine");function Ve({step:e,locale:t,strings:o,className:s,onClose:a}){let r=N(t,o),{t:n}=r,l=Fo(),c=ne(),d=e.context.orgName,y=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",S;switch(e.display){case"policy_stop":{let m=e.failureReason??"";if(Ho.has(m))S=n("session.result.detailsMismatch",{org:d});else if(m==="device_velocity_exceeded")S=n("session.result.deviceVelocity",{org:d});else{let k=Oe(m);S=k!==null?n(k,{org:d}):n("session.result.rejected.description")}break}case"cooldown":{let m=He(r.locale,e.retryAfter);S=m!==null?n(m.key,{time:m.time}):n("reasons.device_cooldown");break}case"platform_unsupported":S=n("result.platform_unsupported");break;case"attempts_exhausted":S=n("common.noAttemptsLeft");break;default:S=d!==""?n(`native.result.${y}`,{org:d}):n(`session.result.${y}.description`)}return te("section",{className:`sekyro-result${s?` ${s}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[te("div",{className:"sekyro-result__body",children:[B(Uo,{outcome:e.display==="cooldown"?"review":y}),te("div",{className:"sekyro-heading",children:[B("h2",{id:l,ref:c,tabIndex:-1,className:"sekyro-text-body",children:n(`session.result.${y}.title`)}),B("p",{className:"sekyro-text-muted",children:S})]}),B(Ko,{label:n("result.referenceLabel"),id:e.context.sessionId,copied:n("native.result.copied")})]}),a!==void 0?B("div",{className:"sekyro-actions",children:B(v,{full:!0,onClick:a,children:d!==""?n("native.result.back",{org:d}):n("native.close")})}):null]})}i(Ve,"VerificationResultScreen");import{Fragment as St,jsx as p,jsxs as H}from"react/jsx-runtime";function Wo(e,t){let o=t?D.dark:D.light,s=t?D.roles.dark:D.roles.light,a=e.colors??{},r={},n=a.fg===o.fg&&a.surface===o.surface;return a.brand===o.brand&&a.surface===o.surface&&(r["--sekyro-color-brand-soft"]=s.brandSoft),n&&(r["--sekyro-color-line"]=s.line,r["--sekyro-color-line-subtle"]=s.lineSubtle,r["--sekyro-color-line-strong"]=s.lineStrong,r["--sekyro-color-sunken"]=s.sunken),a.fgMuted===o.fgMuted&&a.surface===o.surface&&(r["--sekyro-color-fg-subtle"]=s.fgSubtle),e.fontFamily===D.font&&(r["--sekyro-font-display"]=D.fontDisplay),r}i(Wo,"flowRoles");function Re(e){let{verification:t,locale:o,strings:s,onStep:a,onResult:r}=e,{step:n,error:l}=me(t);kt(()=>{n!==null&&a?.(n)},[n,a]),kt(()=>r===void 0?void 0:t.on("result",r),[t,r]);let c=ft(e.colorScheme??"light"),d=mt(n?.context.branding,e.theme,c),[y,S]=ce(!1),m=`sekyro-verification${c?" sekyro-verification--dark":""}${y?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,k=Le(e.onClose);k.current=e.onClose;let h=Le(n);h.current=n;let V=Te(()=>{let P=h.current;k.current?.(P?.kind==="result"?{reason:"finished",result:P.result}:{reason:"cancelled"})},[]);return p(ie,{theme:d,className:m,children:p(ee,{locale:o,...s!==void 0?{strings:s}:{},children:p("div",{dir:e.dir??(o==="ar"?"rtl":"ltr"),lang:o,className:"sekyro-flow",style:Wo(d,c),children:p(qe.Provider,{value:S,children:p(ae.Provider,{value:e.onClose!==void 0?V:void 0,children:p(qo,{...e,step:n,error:l,immersive:y})})})})})})}i(Re,"SekyroVerification");function qo(e){let{step:t,error:o,slots:s,immersive:a}=e,r=N(),{t:n}=r,[l,c]=ce(!1),[d,y]=ce(0),S=Te((u,f)=>p(Qe,{start:u,context:f}),[]),m=Le(""),k=e.livenessProps?.slots?.stageOverlay,h=Te(u=>(u.guidance!==""&&!u.coached&&(m.current=u.guidance),p(Je,{testId:"sekyro-capture-stage",video:p("video",{ref:u.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:u.guidance!==""?u.guidance:m.current,note:u.note,busy:u.settled,progress:u.phase==="seeking"||u.phase==="aligning"?u.progress:1,still:u.still,live:u.live,closeLabel:n("native.close"),overlay:k?.(u.videoRef),...u.settled?{}:{onClose:i(()=>y(f=>f+1),"onClose")}})),[n,k]),V=zo();if(o!==null)return p(ue,{tone:"danger",children:p("span",{children:n(q(o,r.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n("common.loading")});let{context:P}=t,T=i(u=>{c(!0),u().finally(()=>c(!1))},"refresh"),R=s?.header??p(Yo,{context:P,headerId:V,end:s?.headerEnd}),b;switch(t.kind){case"phone_otp":b=p(fe,{step:t});break;case"email_otp":b=p(ke,{step:t});break;case"method":b=p(he,{step:t});break;case"registry":b=p(ve,{step:t});break;case"document":b=p(we,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let u=e.livenessProps?.slots?.intro,f={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:u??S},...d>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,...e.dir!==void 0?{dir:e.dir}:{},strings:r.strings,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{},...e.voice!==void 0?{voice:e.voice}:{},...e.onLivenessCaptured!==void 0?{onCaptured:e.onLivenessCaptured}:{}};b=p(Ue.Provider,{value:h,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(F,{view:"LivePhotoLiveness",i18n:r,step:t,livenessProps:f,sekyroIntro:u===void 0},d):p(ze,{...f},d)});break}case"portrait":b=H(St,{children:[t.retakeOnly?p(F,{view:"PortraitRetakeNotice",i18n:r,quiet:!0}):null,p(xe,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":b=p(F,{view:"ContactChoiceView",i18n:r,step:t});break;case"identity_summary":b=p(F,{view:"IdentitySummaryView",i18n:r,step:t});break;case"mobile_required":b=e.handoffUrl!==void 0?p(F,{view:"HandoffView",i18n:r,url:e.handoffUrl,refresh:t.refresh}):H(ue,{tone:"info",children:[p("strong",{children:n("handoff.title")}),p("span",{children:n("reasons.mobile_required")}),p(v,{kind:"ghost",disabled:l,onClick:()=>T(t.refresh),children:n("common.refresh")})]});break;case"processing":b=H("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[p("h2",{className:"sekyro-text-body",children:n("session.processing.title")}),p("p",{className:"sekyro-text-muted",children:n("session.processing.description")}),t.stalled?p(v,{kind:"ghost",disabled:l,onClick:()=>T(t.refresh),children:n("common.refresh")}):null]});break;case"eid":b=p(Se,{step:t});break;case"unsupported":{let u=t.reason==="platform_unsupported";b=H("section",{className:"sekyro-stack sekyro-stack--1",children:[p("h2",{className:"sekyro-text-body",children:n(u?"needsApp.title":"unsupported.title")}),p("p",{children:u?P.orgName!==""?n("needsApp.description",{org:P.orgName}):n("needsApp.descriptionNoOrg"):n("unsupported.description",{org:P.orgName})})]});break}case"result":b=s?.result?.(t)??p(Go,{step:t});break;default:{let u=t;b=null}}return H(St,{children:[a?null:R,!a&&t.kind!=="result"&&P.sections.length>1?p(Qo,{sections:P.sections,current:t.section,i18n:r}):null,!a&&!P.consentRecorded&&t.kind!=="result"?p(pt,{i18n:r}):null,p(Ge,{pageKey:t.key,children:b}),!a&&(t.kind==="phone_otp"||t.kind==="email_otp")&&t.canSwitch?p(F,{view:"ContactSwitch",i18n:r,step:t,quiet:!0},t.key):null,a?null:s?.footer!==void 0?s.footer:H("p",{className:"sekyro-footer",children:[p(z,{name:"lock"}),n("shell.verifiedBy")]})]})}i(qo,"Body");function Go({step:e}){return p(ae.Consumer,{children:t=>p(Ve,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Go,"ResultPage");function Yo({context:e,headerId:t,end:o}){let{t:s}=N(),[a,r]=ce(!1),n=a?void 0:e.branding?.logoUrl,l=e.orgName!==""?e.orgName:s(e.returning?"returning.title":"session.title");return H("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[H("div",{className:"sekyro-org",children:[p("span",{className:"sekyro-org__tile","aria-hidden":"true",children:n!==void 0?p("img",{className:"sekyro-org__logo",src:n,alt:"",onError:()=>r(!0)}):ct(e.orgName)}),H("div",{className:"sekyro-org__text",children:[p("h1",{id:t,className:"sekyro-org__name",children:l}),p("p",{className:"sekyro-org__sub",children:s("shell.subtitle")})]}),o!=null?p("div",{className:"sekyro-org__end",children:o}):null,p(ae.Consumer,{children:c=>c!==void 0?p("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":s("native.close"),onClick:c,children:p(z,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:s("returning.description")}):null]})}i(Yo,"OrgHeader");function Qo({sections:e,current:t,i18n:o}){let s=t===null?-1:e.indexOf(t);return p("ol",{className:"sekyro-progress__bars","aria-label":o.t("session.progressLabel"),children:e.map((a,r)=>p("li",{className:`sekyro-progress__bar${r<s?" is-done":r===s?" is-current":""}`,...r===s?{"aria-current":"step"}:{},children:p("span",{className:"sekyro-visually-hidden",children:o.strings[`section.${a}`]??a})},a))})}i(Qo,"SectionProgress");import{useEffect as Xo,useState as gt}from"react";var Jo=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Ae(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return Jo.test(t)}i(Ae,"isInAppBrowser");import{jsx as Z}from"react/jsx-runtime";function Zo(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(Zo,"pageUrl");function jo({hostedUrl:e,inAppBrowser:t,...o}){let[s,a]=gt(t===!0);Xo(()=>{t===void 0&&Ae()&&a(!0)},[t]);let[r,n]=gt(!1),l=o.handoffUrl??e??Zo();return s&&!r?Z(ie,{theme:se(re(void 0),o.theme),...o.className!==void 0?{className:o.className}:{},children:Z(ee,{locale:o.locale,...o.strings!==void 0?{strings:o.strings}:{},children:Z("div",{dir:o.dir??(o.locale==="ar"?"rtl":"ltr"),lang:o.locale,className:"sekyro-stack sekyro-stack--4",children:Z(en,{url:l,onContinue:()=>n(!0)})})})}):Z(Re,{...o,...l!==""?{handoffUrl:l}:{}})}i(jo,"SekyroFlow");function en({url:e,onContinue:t}){let o=N();return Z(F,{view:"InAppBrowserPrompt",i18n:o,url:e,onContinue:t})}i(en,"Prompt");export{we as DocumentCapture,Se as EidStep,ke as EmailOtpStep,he as MethodChoice,ve as NniEntry,fe as PhoneOtpStep,xe as PortraitCapture,jo as SekyroFlow,Re as SekyroVerification,ee as StepI18nProvider,Ve as VerificationResultScreen,Nt as arSteps,Ct as enSteps,Pt as formatTemplate,wt as frSteps,Ae as isInAppBrowser,_t as resolveSekyroStrings,N as useStepI18n,me as useVerificationStep};
|
|
2
|
+
import{c as ie,d as ae,e as le}from"../chunk-COU4Y3DB.js";import{a as qe}from"../chunk-4ENKV24I.js";import{a as Qe}from"../chunk-5JPJXBN6.js";import{a as Je,b as Xe,c as Ze,d as je}from"../chunk-OSS4NHIS.js";import{a as Ue,b as ze,d as Ke,g as We}from"../chunk-ZVSRJKQE.js";import{a as G}from"../chunk-R2D6V2R6.js";import{a as wt,b as Pt,c as xt,d as _t,e as It,f as te,g as b}from"../chunk-Y4PPDNQR.js";import{a as et}from"../chunk-ZTN4YV7S.js";import{b as $e}from"../chunk-36RC3M4K.js";import{a as $}from"../chunk-2CJEADGY.js";import{a as z,b as K,c as ce,d as Ge,g as Ye}from"../chunk-2PGJ7P7E.js";import{a as v,b as pe}from"../chunk-LZU57LVO.js";import{a as i,b as g,h as Oe,i as He,n as me,o as se}from"../chunk-PXRIFHY2.js";import{useEffect as Et,useState as tt}from"react";function fe(e){let[t,n]=tt(()=>e?.currentStep?.()??null),[s,l]=tt(null);return Et(()=>{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 r=!0,o=e.on("step",a=>{r&&n(a)});return e.run().then(a=>{r&&n(p=>p??a)},a=>{r&&l(a)}),()=>{r=!1,o()}},[e]),{step:t,error:s}}i(fe,"useVerificationStep");import{useEffect as Vt,useId as Lt,useRef as Tt,useState as de}from"react";import{Fragment as nt,jsx as S,jsxs as F}from"react/jsx-runtime";var ot=i((e,t)=>{if(e===void 0)return 0;let n=Date.parse(e)-t;return Number.isFinite(n)?Math.max(0,Math.ceil(n/1e3)):0},"secondsUntil"),Rt=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),At=["whatsapp","sms"],Mt=new Set(["otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited"]),q="+222";function Dt(e){let t=e.replace(/[\s-]/g,""),n=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(n)?`+${n}`:null}i(Dt,"normalizedPhone");function Bt({id:e,label:t,value:n,onChange:s,placeholder:l}){let r=n.startsWith("+")&&!n.startsWith(q),o=r?n:n.slice(n.startsWith(q)?q.length:0).trim(),a=Tt(null);return Vt(()=>{let p=setTimeout(()=>a.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(p)},[]),F("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:e,children:t}),F("div",{className:"sekyro-phone",dir:"ltr",children:[r?null:F("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[S("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:"🇲🇷"}),q]}),S("input",{ref:a,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...r?{}:{"aria-describedby":`${e}-dial`},placeholder:l,value:o,onChange:p=>{let m=p.target.value.replace(/[^\d +]/g,"");s(m.startsWith("+")?m:q+m.replace(/\D/g,""))}})]})]})}i(Bt,"PhoneField");function ye({step:e,locale:t,strings:n,className:s,defaultPhone:l=q,onError:r}){let o=b(t,n),{t:a}=o,[p,m]=de(l),[k,y]=de(""),[f,h]=de(!1),[w,E]=de(null),V=e.phase==="verify",L=Qe(V),N=Lt(),H=i(async P=>{h(!0),E(null);try{await P()}catch(I){E(G(I,o.strings)),r?.(I)}finally{h(!1)}},"run"),M=At.filter(P=>(e.channels??[]).includes(P)),u=Dt(p),C=!e.needsPhone||u!==null,d=i((P,I=!1)=>{H(()=>e.send({...e.needsPhone&&(!I||p!==l)?{phone:u??p}:{},...P!==void 0?{channel:P}:{}}))},"send"),D=i(P=>{H(()=>e.verify(P))},"submitCode"),De=i(P=>{P.preventDefault(),V?D(k):M.length<=1&&C&&d(M[0])},"onSubmit"),Be=ot(e.codeExpiresAt,L),ee=ot(e.resendAvailableAt,L),re=V&&e.codeExpiresAt!==void 0&&Be===0,ue=i(P=>a(P==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[vt,Nt]=a("otp.sentTo",{channel:ue(e.channel)}).split("{number}"),Ct=e.reason==="otp_mismatch"?F(v,{tone:"danger",children:[S("span",{children:a("otp.reason_otp_mismatch")}),S("span",{children:pe(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Mt.has(e.reason)?S(v,{tone:"warning",children:S("span",{children:a(`otp.reason_${e.reason}`)})}):null,Fe=F(nt,{children:[Ct,w!==null?S(v,{tone:"danger",children:S("span",{children:a(w)})}):null]});if(V){let P=M.length===0;return F("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":N,onSubmit:De,noValidate:!0,children:[S(z,{id:N,title:a("otp.verifyTitle"),lead:F(nt,{children:[vt,S("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),Nt]})}),Fe,F("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:`${N}-code`,children:a("otp.codeLabel")}),S(qe,{id:`${N}-code`,value:k,invalid:e.reason==="otp_mismatch",onChange:I=>{y(I),I.length===6&&k.length!==6&&!f&&!e.attemptsExhausted&&D(I)}}),S("span",{className:`sekyro-help sekyro-otp-expiry${re?" is-danger":""}`,"aria-hidden":!re||void 0,children:re?a("otp.expired"):a("otp.expiresIn",{time:Rt(Be)})})]}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:re?a("otp.expired"):""}),F(K,{children:[S(g,{type:"submit",full:!0,disabled:f||k.length!==6||e.attemptsExhausted,"aria-busy":f||void 0,children:a("otp.verify")}),P?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:f||ee>0,onClick:()=>d(void 0,!0),children:ee>0?a("otp.resendIn",{seconds:ee}):a("otp.resend")}):ee>0?S("p",{className:"sekyro-resend is-waiting",children:a("otp.resendIn",{seconds:ee})}):S("div",{className:"sekyro-resend-row",children:M.map(I=>S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:f,onClick:()=>d(I,!0),children:a("otp.resendBy",{channel:ue(I)})},I))})]})]})}return F("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":N,onSubmit:De,noValidate:!0,children:[S(z,{id:N,title:a("otp.sendTitle"),lead:a("otp.sendDescription")}),Fe,e.needsPhone?S(Bt,{id:`${N}-phone`,label:a("otp.phoneLabel"),value:p,onChange:m,placeholder:a("otp.phonePlaceholder").replace(q,"").trim()}):S("p",{className:"sekyro-text-muted",children:a("otp.prefilledNotice")}),S(K,{children:M.length>0?F("div",{className:"sekyro-actions__group",role:"group","aria-label":a("otp.chooseChannel"),children:[S("p",{className:"sekyro-label","aria-hidden":"true",children:a("otp.chooseChannel")}),M.map((P,I)=>S(g,{kind:I===0?"primary":"ghost",full:!0,disabled:f||!C,"aria-busy":I===0&&f||void 0,onClick:()=>d(P),children:a("otp.sendBy",{channel:ue(P)})},P))]}):S(g,{type:"submit",full:!0,disabled:f||!C,"aria-busy":f||void 0,children:a("otp.send")})})]})}i(ye,"PhoneOtpStep");import{lazy as Ot,Suspense as Ht,useMemo as $t,useState as Ut}from"react";import{Component as Ft}from"react";var ke=class ke extends Ft{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(ke,"LoadBoundary");var O=ke;import{jsx as Y,jsxs as Kt}from"react/jsx-runtime";var zt={load:i(()=>import("../email-otp-view-ZVXSJMN5.js"),"load")};function he({locale:e,strings:t,...n}){let s=b(e,t),[l,r]=Ut(0),o=$t(()=>Ot(()=>zt.load().then(p=>({default:p.EmailOtpView}))),[l]),a=Kt(v,{tone:"danger",children:[Y("span",{children:s.t("errors.network_error")}),Y(g,{kind:"ghost",onClick:()=>r(p=>p+1),children:s.t("common.retry")})]});return Y(O,{fallback:a,children:Y(Ht,{fallback:Y("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Y(o,{...n,i18n:s})})},l)}i(he,"EmailOtpStep");import{lazy as Wt,Suspense as qt,useMemo as Gt,useState as Yt}from"react";import{jsx as Q,jsxs as Jt}from"react/jsx-runtime";var Qt={load:i(()=>import("../eid-view-FK54R7ER.js"),"load")};function Se({locale:e,strings:t,...n}){let s=b(e,t),[l,r]=Yt(0),o=Gt(()=>Wt(()=>Qt.load().then(p=>({default:p.EidView}))),[l]),a=Jt(v,{tone:"danger",children:[Q("span",{children:s.t("errors.network_error")}),Q(g,{kind:"ghost",onClick:()=>r(p=>p+1),children:s.t("common.retry")})]});return Q(O,{fallback:a,children:Q(qt,{fallback:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Q(o,{...n,i18n:s})})},l)}i(Se,"EidStep");import{useMemo as no}from"react";import{lazy as Xt,Suspense as Zt,useMemo as jt,useState as eo}from"react";import{jsx as J,jsxs as oo}from"react/jsx-runtime";var to={load:i(()=>import("../flow-views-5VR7NLTE.js"),"load")};function R({view:e,i18n:t,quiet:n,...s}){let[l,r]=eo(0),o=jt(()=>Xt(()=>to.load().then(p=>({default:p[e]}))),[e,l]),a=oo(v,{tone:"danger",children:[J("span",{children:t.t("errors.network_error")}),J(g,{kind:"ghost",onClick:()=>r(p=>p+1),children:t.t("common.retry")})]});return J(O,{fallback:a,children:J(Zt,{fallback:n===!0?null:J("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:J(o,{...s,i18n:t})})},l)}i(R,"Flow");import{jsx as ge,jsxs as ro}from"react/jsx-runtime";function be({step:e,locale:t,strings:n,className:s,onError:l}){let r=b(t,n),{busy:o,error:a,run:p}=Ze(r,l),m=no(()=>e.choice.options.flatMap(y=>{let f=Xe(y,r),h=Je[y.service];return f===null?[]:[{id:y.id,label:f,glyph:h&&ge($,{name:h})}]}),[e.choice.options,r]),k=e.choice.options.find(y=>y.service==="national_eid");return ro("div",{className:s,children:[ge(Ke,{title:r.t("method.title"),description:r.t("method.description"),options:m,busy:o,error:a,focus:!0,testId:"sekyro-method",onChoose:y=>p(()=>e.choose(y))}),k?.nationalEid?.afterPass==="continue"?ge(R,{view:"EidContinueHint",i18n:r,provider:k.nationalEid.providerName,quiet:!0}):null]})}i(be,"MethodChoice");import{isValidNni as so,normalizeNni as rt}from"@sekyro/web";import{useId as io,useState as ve}from"react";import{Fragment as ao,jsx as x,jsxs as X}from"react/jsx-runtime";function Ne({step:e,locale:t,strings:n,className:s,onError:l}){let r=b(t,n),{t:o}=r,[a,p]=ve(""),[m,k]=ve(!1),[y,f]=ve(null),h=io(),w=e.attemptsExhausted,E=i(async C=>{k(!0),f(null);try{await C()}catch(d){f(G(d,r.strings)),l?.(d)}finally{k(!1)}},"run"),V=i(C=>{if(C.preventDefault(),e.source!=="typed"){E(()=>e.confirm());return}let d=rt(a);if(!/^\d{10}$/.test(d))return f("population.invalid");if(!so(d))return f("population.reason_nni_invalid");E(()=>e.submitNni(d))},"onSubmit"),L=pe(r,e.attemptsRemaining,w),N=X(ao,{children:[e.reason==="registry_unavailable"?X(v,{tone:"warning",children:[x("span",{children:o("population.reason_registry_unavailable")}),x("span",{children:L})]}):null,e.reason==="nni_not_found"&&e.canUseDocument?X(v,{tone:"warning",children:[x("span",{children:o("population.reason_nni_not_found_or_document")}),x("span",{children:L}),x(g,{kind:"ghost",disabled:m,onClick:()=>{E(()=>e.useDocument())},children:o("population.useDocument")})]}):null,e.reason==="nni_not_found"&&!e.canUseDocument||e.reason==="nni_invalid"?X(v,{tone:"danger",children:[x("span",{children:o(e.reason==="nni_not_found"?"population.reason_nni_not_found":"population.reason_nni_invalid")}),x("span",{children:L})]}):null,w&&e.reason===void 0?x(v,{tone:"danger",children:x("span",{children:L})}):null,y!==null?x(v,{tone:"danger",children:x("span",{children:o(y)})}):null]}),[H,M,u]=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 X("form",{className:`sekyro-step${s?` ${s}`:""}`,"aria-labelledby":h,onSubmit:V,noValidate:!0,children:[x(z,{id:h,title:o(H),lead:o(M)}),N,e.source==="typed"?X("div",{className:"sekyro-field",children:[x("label",{className:"sekyro-label",htmlFor:`${h}-nni`,children:o("population.label")}),x("input",{id:`${h}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:a,"aria-describedby":`${h}-nni-help`,"aria-invalid":y==="population.invalid"||y==="population.reason_nni_invalid"||void 0,onChange:C=>{f(null),p(rt(C.target.value).replace(/\D/g,"").slice(0,10))}}),x("span",{id:`${h}-nni-help`,className:"sekyro-help",children:o("population.helper")})]}):null,x(K,{children:w?null:x(g,{type:"submit",full:!0,disabled:m,"aria-busy":m||void 0,children:o(u)})})]})}i(Ne,"NniEntry");import{acceptedIssuers as fo,acceptedTypesFor as yo,warmDocumentCapture as ko}from"@sekyro/web";import{lazy as ho,Suspense as So,useEffect as go,useMemo as bo,useState as ct}from"react";import{acceptedIssuers as lo,acceptedTypesFor as Ce}from"@sekyro/web";import{useEffect as st,useId as co,useMemo as it,useState as we}from"react";import{jsx as _,jsxs as Z}from"react/jsx-runtime";var at=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),po=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),uo=220;function mo(e,t){let n=null;try{n=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(r=>({code:r,name:n?.of(r)??r})),l=new Intl.Collator(e);return s.sort((r,o)=>r.code==="MR"?-1:o.code==="MR"?1:l.compare(r.name,o.name))}i(mo,"countryNames");function lt({step:e,i18n:t,issuer:n,onPicked:s}){let{t:l,locale:r}=t,o=it(()=>lo(e.documents),[e.documents]),a=it(()=>mo(r,o),[r,o]),p=o.length===1?o[0]:null,[m,k]=we(n??p),[y,f]=we(""),[h,w]=we(null),E=co(),V=p===null?[]:Ce(e.documents,p),L=p!==null&&V.length===1?V[0]:null;st(()=>{p!==null&&L!==null&&e.selectDocument(p,L)},[p,L]);let N=i((u,C)=>{e.selectDocument(u,C),s?.()},"pick"),H=i(u=>{let C=Ce(e.documents,u);C.length===1?N(u,C[0]):k(u)},"chooseIssuer");if(st(()=>{if(h===null||m===null)return;let u=setTimeout(()=>N(m,h),uo);return()=>clearTimeout(u)},[h]),L!==null)return null;if(m===null){let u=at(y.trim()),C=u===""?a:a.filter(d=>at(d.name).includes(u)||d.code.toLowerCase()===u);return Z("section",{className:"sekyro-step",children:[_(z,{title:l("doc.countryTitle"),lead:l("doc.pickDescription")}),Z("div",{className:"sekyro-field",children:[_("label",{className:"sekyro-label",htmlFor:E,children:l("doc.countryLabel")}),_("input",{id:E,type:"search",className:"sekyro-input",placeholder:l("doc.countrySearch"),value:y,onChange:d=>f(d.target.value)})]}),C.length===0?_("p",{className:"sekyro-text-muted",children:l("doc.noCountryMatch")}):_("ul",{className:"sekyro-rows",children:C.map(d=>_("li",{children:Z("button",{type:"button",className:"sekyro-row-btn",onClick:()=>H(d.code),children:[_("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:po(d.code)}),d.name]})},d.code))}),_(K,{children:null})]})}let M=Ce(e.documents,m);return Z("section",{className:"sekyro-step",children:[_(z,{title:l("doc.pickTitle"),lead:l("native.doc.holdIt")}),_("div",{className:"sekyro-choices",children:M.map(u=>Z("button",{type:"button",className:"sekyro-card","aria-pressed":h===u,disabled:h!==null&&h!==u,onClick:()=>w(u),children:[_($,{name:u==="passport"?"passport":"card"}),Z("span",{className:"sekyro-card__body",children:[_("span",{className:"sekyro-card__title",children:l(`doc.type.${u}`)}),_("span",{className:"sekyro-card__sub",children:l(`doc.sub.${u}`)})]}),_("span",{className:"sekyro-radio","aria-hidden":"true"})]},u))}),o.length>1?_("button",{type:"button",className:"sekyro-link",onClick:()=>{k(null),w(null)},children:l("native.doc.changeCountry")}):null,_(K,{children:null})]})}i(lt,"DocumentPicker");import{jsx as W,jsxs as No}from"react/jsx-runtime";var vo={load:i(()=>import("../document-capture-view-IAVBLXBO.js"),"load")};function Pe({step:e,locale:t,strings:n,className:s,liveMrz:l}){let r=b(t,n),[o,a]=ct(0),[p,m]=ct(null),k=fo(e.documents).length>1,y=e.issuer!==null&&yo(e.documents,e.issuer).length>1,f=bo(()=>ho(()=>vo.load().then(w=>({default:w.DocumentCaptureView}))),[o]);go(()=>{ko()},[]);let h=No(v,{tone:"danger",children:[W("span",{children:r.t("errors.network_error")}),W(g,{kind:"ghost",onClick:()=>a(w=>w+1),children:r.t("doc.retryCamera")})]});return W("div",{className:s,children:e.documentType===null||e.issuer===null||p!==null?W(lt,{step:e,i18n:r,...p==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>m(null)}):W(O,{fallback:h,children:W(So,{fallback:W("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:W(f,{step:e,i18n:r,liveMrz:l,...k?{onChangeCountry:i(()=>m("country"),"onChangeCountry")}:{},...y?{onChangeDocument:i(()=>m("document"),"onChangeDocument")}:{}})})},o)})}i(Pe,"DocumentCapture");import{warmPortraitCapture as Co}from"@sekyro/web";import{Component as wo,lazy as Po,Suspense as xo,useEffect as _o,useMemo as Io,useState as Eo}from"react";import{jsx as T,jsxs as _e}from"react/jsx-runtime";var Vo={load:i(()=>import("../portrait-capture-view-FYUOQWF7.js"),"load")},Ee=class Ee extends wo{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 xe=Ee;function Lo({step:e,i18n:t}){let{t:n}=t,s=se();return _e("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[T("h2",{ref:s,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?T("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?_e(v,{tone:"danger",children:[T("span",{children:n("portrait.uploadFailed")}),T(g,{kind:"ghost",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):T("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Lo,"MatchPhase");function Ie({step:e,locale:t,strings:n,className:s,assetBaseUrl:l}){let r=b(t,n),[o,a]=Eo(0),p=Io(()=>Po(()=>Vo.load().then(k=>({default:k.PortraitCaptureView}))),[o]);if(_o(()=>{e.phase==="capture"&&Co()},[e.phase]),e.phase==="match")return T("div",{className:s,children:T(Lo,{step:e,i18n:r})});let m=_e(v,{tone:"danger",children:[T("span",{children:r.t("errors.network_error")}),T(g,{kind:"ghost",onClick:()=>a(k=>k+1),children:r.t("portrait.retryCamera")})]});return T("div",{className:s,children:T(xe,{fallback:m,children:T(xo,{fallback:T("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:T(p,{step:e,i18n:r,...l!==void 0?{assetBaseUrl:l}:{}})})},o)})}i(Ie,"PortraitCapture");import{useCallback as Te,useEffect as St,useId as Go,useRef as Re,useState as ne}from"react";var A={light:{brand:"#0d3b66",brandFg:"#ffffff",fg:"#13141f",fgMuted:"#4e5270",bg:"#f6f7fb",surface:"#ffffff",ring:"#0d3b66",danger:"#ca0f07",success:"#007a5e",warning:"#735003"},dark:{brand:"#6ea2d3",brandFg:"#051a2e",fg:"#f6f7fb",fgMuted:"#cbcedc",bg:"#13141f",surface:"#1d1e2c",ring:"#6ea2d3",danger:"#ff7c7c",success:"#00c897",warning:"#ffd98a"},roles:{light:{brandSoft:"#eaf2fa",line:"#cbcedc",lineSubtle:"#e2e4ee",lineStrong:"#8c91a9",sunken:"#eeeff5",fgSubtle:"#686d8a"},dark:{brandSoft:"#092b4b",line:"#4e5270",lineSubtle:"#2b2d40",lineStrong:"#686d8a",sunken:"#0b0c14",fgSubtle:"#8c91a9"}},stage:"#051a2e",stageAccent:"#69dfef",radius:"10px",radiusLg:"16px",font:'"Sekyro Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif',fontDisplay:'"Sekyro Geist", Geist, "Sekyro Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif',fontArabic:'"Sekyro Cairo", Cairo, "Sekyro Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif'};import{useId as To,useState as Ro}from"react";import{jsx as Ve,jsxs as pt}from"react/jsx-runtime";var Ao=["intro","data","processing","sharing","retention"];function dt({i18n:e}){let{t}=e,[n,s]=Ro(!1),l=To(),[r,o=""]=t("consent.short").split("{terms}");return pt("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[pt("p",{className:"sekyro-text-muted",children:[r,Ve("button",{type:"button",className:"sekyro-link","aria-expanded":n,"aria-controls":l,onClick:()=>s(a=>!a),children:t("consent.termsLink")}),o]}),Ve("div",{id:l,hidden:!n,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:Ao.map(a=>Ve("p",{children:t(`consent.terms.${a}`)},a))})]})}i(dt,"ConsentNotice");function ut(e){let t=e.trim().split(/\s+/).filter(s=>s!=="");return(t.length>=2?[t[0],t[1]].map(s=>Array.from(s??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(ut,"initials");import{useSyncExternalStore as Mo}from"react";var ft=i(e=>({colors:{...e?A.dark:A.light},radius:A.radiusLg,fontFamily:A.font}),"brandTheme"),qr=ft(!1);function yt(e,t,n){let s=ie(e);if(n&&s.colors!==void 0){let{brand:l,brandFg:r}=s.colors;l!==void 0&&Oo(l,A.dark.bg)>=3?s.colors={brand:l,ring:l,...r!==void 0?{brandFg:r}:{}}:delete s.colors}return ae(ft(n),s,t)}i(yt,"verificationTheme");function kt(e){let t=Mo(Fo,Bo,()=>!1);return e==="dark"||e==="system"&&t}i(kt,"useDarkScheme");var Do="(prefers-color-scheme: dark)",ht=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Do):null,"media"),Bo=i(()=>ht()?.matches??!1,"prefersDark");function Fo(e){let t=ht();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(Fo,"subscribe");function Oo(e,t){let[n,s]=[mt(e),mt(t)];return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}i(Oo,"contrast");function mt(e){let t=[1,3,5].map(n=>{let s=Number.parseInt(e.slice(n,n+2),16)/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(mt,"luminance");import{useEffect as Ho,useId as $o,useState as Uo}from"react";import{jsx as B,jsxs as oe}from"react/jsx-runtime";var zo=new Set(["document_nni_mismatch","name_mismatch","birth_date_mismatch"]),Ko={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 Wo({outcome:e}){return oe("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[B("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),B("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),B("path",{className:"sekyro-outcome__glyph",d:Ko[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(Wo,"OutcomeMark");function qo({label:e,id:t,copied:n}){let[s,l]=Uo(!1);return Ho(()=>{if(!s)return;let r=setTimeout(()=>l(!1),1600);return()=>clearTimeout(r)},[s]),oe("button",{type:"button",className:`sekyro-reference${s?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>l(!0),()=>{})},children:[B("span",{"aria-live":"polite",children:s?n:e}),B("bdi",{dir:"ltr",children:t}),B($,{name:"copy"})]})}i(qo,"ReferenceLine");function Le({step:e,locale:t,strings:n,className:s,onClose:l}){let r=b(t,n),{t:o}=r,a=$o(),p=se(),m=e.context.orgName,k=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",y;switch(e.display){case"policy_stop":{let f=e.failureReason??"";if(zo.has(f))y=o("session.result.detailsMismatch",{org:m});else if(f==="device_velocity_exceeded")y=o("session.result.deviceVelocity",{org:m});else if(f==="capture_tampered")y=o("session.result.deviceStop");else{let h=Oe(f);y=h!==null?o(h,{org:m}):o("session.result.rejected.description")}break}case"cooldown":{let f=He(r.locale,e.retryAfter);y=f!==null?o(f.key,{time:f.time}):o("reasons.device_cooldown");break}case"platform_unsupported":y=o("result.platform_unsupported");break;case"attempts_exhausted":y=o("common.noAttemptsLeft");break;default:y=m!==""?o(`native.result.${k}`,{org:m}):o(`session.result.${k}.description`)}return oe("section",{className:`sekyro-result${s?` ${s}`:""}`,"aria-labelledby":a,"data-testid":"sekyro-result",children:[oe("div",{className:"sekyro-result__body",children:[B(Wo,{outcome:e.display==="cooldown"?"review":k}),oe("div",{className:"sekyro-heading",children:[B("h2",{id:a,ref:p,tabIndex:-1,className:"sekyro-text-body",children:o(`session.result.${k}.title`)}),B("p",{className:"sekyro-text-muted",children:y})]}),B(qo,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),l!==void 0?B("div",{className:"sekyro-actions",children:B(g,{full:!0,onClick:l,children:m!==""?o("native.result.back",{org:m}):o("native.close")})}):null]})}i(Le,"VerificationResultScreen");import{Fragment as gt,jsx as c,jsxs as U}from"react/jsx-runtime";function Yo(e,t){let n=t?A.dark:A.light,s=t?A.roles.dark:A.roles.light,l=e.colors??{},r={},o=l.fg===n.fg&&l.surface===n.surface;return l.brand===n.brand&&l.surface===n.surface&&(r["--sekyro-color-brand-soft"]=s.brandSoft),o&&(r["--sekyro-color-line"]=s.line,r["--sekyro-color-line-subtle"]=s.lineSubtle,r["--sekyro-color-line-strong"]=s.lineStrong,r["--sekyro-color-sunken"]=s.sunken),l.fgMuted===n.fgMuted&&l.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=s.fgSubtle),e.fontFamily===A.font&&(r["--sekyro-font-display"]=A.fontDisplay),r}i(Yo,"flowRoles");function Ae(e){let{verification:t,locale:n,strings:s,onStep:l,onResult:r}=e,{step:o,error:a}=fe(t);St(()=>{o!==null&&l?.(o)},[o,l]),St(()=>r===void 0?void 0:t.on("result",r),[t,r]);let p=kt(e.colorScheme??"light"),m=yt(o?.context.branding,e.theme,p),[k,y]=ne(!1),f=`sekyro-verification${p?" sekyro-verification--dark":""}${k?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,h=Re(e.onClose);h.current=e.onClose;let w=Re(o);w.current=o;let E=Te(()=>{let V=w.current;h.current?.(V?.kind==="result"?{reason:"finished",result:V.result}:{reason:"cancelled"})},[]);return c(le,{theme:m,className:f,children:c(te,{locale:n,...s!==void 0?{strings:s}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Yo(m,p),children:c(Ge.Provider,{value:y,children:c(ce.Provider,{value:e.onClose!==void 0?E:void 0,children:c(Qo,{...e,step:o,error:a,immersive:k})})})})})})}i(Ae,"SekyroVerification");function Qo(e){let{step:t,error:n,slots:s,immersive:l}=e,r=b(),{t:o}=r,[a,p]=ne(!1),[m,k]=ne(0),[y,f]=ne(null),h=Te((d,D)=>c(je,{start:d,context:D,extra:D.canChooseFacing&&c(ze,{value:D.facing,onChange:D.setFacing})}),[]),w=Re(""),E=e.livenessProps?.slots?.stageOverlay,V=Te(d=>(d.guidance!==""&&!d.coached&&(w.current=d.guidance),c(et,{testId:"sekyro-capture-stage",video:c("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:w.current,note:d.note,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:E?.(d.videoRef),...d.settled?{}:{onClose:i(()=>k(D=>D+1),"onClose")},end:d.switchCamera&&c("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":o("capture.switchCamera"),children:c($e,{})})})),[o,E]),L=Go();if(n!==null)return c(me,{tone:"danger",children:c("span",{children:o(G(n,r.strings))})});if(t===null)return c("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o("common.loading")});let{context:N}=t,H=i(d=>{p(!0),d().finally(()=>p(!1))},"refresh"),M=s?.header??c(Xo,{context:N,headerId:L,end:s?.headerEnd}),u,C=y===t.key&&t.context.switchable!==void 0;if(C)u=c(R,{view:"LaneChoiceView",i18n:r,step:t,onClose:()=>f(null)});else switch(t.kind){case"phone_otp":u=c(ye,{step:t});break;case"email_otp":u=c(he,{step:t});break;case"method":u=c(be,{step:t});break;case"registry":u=c(Ne,{step:t});break;case"document":u=c(Pe,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,D={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??h},...m>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:r.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};u=c(Ue.Provider,{value:V,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(R,{view:"LivePhotoLiveness",i18n:r,step:t,livenessProps:D,sekyroIntro:d===void 0},m):c(We,{...D},m)});break}case"portrait":u=U(gt,{children:[t.retakeOnly?c(R,{view:"PortraitRetakeNotice",i18n:r,quiet:!0}):null,c(Ie,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":u=c(R,{view:"ContactChoiceView",i18n:r,step:t});break;case"choice":u=c(R,{view:"GenericChoiceView",i18n:r,step:t});break;case"identity_summary":u=c(R,{view:"IdentitySummaryView",i18n:r,step:t});break;case"mobile_required":u=e.handoffUrl!==void 0?c(R,{view:"HandoffView",i18n:r,url:e.handoffUrl,refresh:t.refresh}):U(me,{tone:"info",children:[c("strong",{children:o("handoff.title")}),c("span",{children:o("reasons.mobile_required")}),c(g,{kind:"ghost",disabled:a,onClick:()=>H(t.refresh),children:o("common.refresh")})]});break;case"processing":u=U("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[c("h2",{className:"sekyro-text-body",children:o("session.processing.title")}),c("p",{className:"sekyro-text-muted",children:o("session.processing.description")}),t.stalled?c(g,{kind:"ghost",disabled:a,onClick:()=>H(t.refresh),children:o("common.refresh")}):null]});break;case"eid":u=c(Se,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";u=U("section",{className:"sekyro-stack sekyro-stack--1",children:[c("h2",{className:"sekyro-text-body",children:o(d?"needsApp.title":"unsupported.title")}),c("p",{children:d?N.orgName!==""?o("needsApp.description",{org:N.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:N.orgName})})]});break}case"result":u=s?.result?.(t)??c(Jo,{step:t});break;default:{let d=t;u=null}}return U(gt,{children:[l?null:M,!l&&t.kind!=="result"&&N.sections.length>1?c(Zo,{context:N,current:t.section,i18n:r}):null,!l&&!N.consentRecorded&&t.kind!=="result"?c(dt,{i18n:r}):null,c(Ye,{pageKey:t.key,children:u}),!l&&!C&&t.kind!=="result"&&t.context.switchable!==void 0?c(R,{view:"LaneSwitch",i18n:r,step:t,onOpen:()=>f(t.key),quiet:!0},t.key):null,l?null:s?.footer!==void 0?s.footer:U("p",{className:"sekyro-footer",children:[c($,{name:"lock"}),o("shell.verifiedBy")]})]})}i(Qo,"Body");function Jo({step:e}){return c(ce.Consumer,{children:t=>c(Le,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Jo,"ResultPage");function Xo({context:e,headerId:t,end:n}){let{t:s}=b(),[l,r]=ne(!1),o=l?void 0:e.branding?.logoUrl,a=e.orgName!==""?e.orgName:s(e.returning?"returning.title":"session.title");return U("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[U("div",{className:"sekyro-org",children:[c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:o!==void 0?c("img",{className:"sekyro-org__logo",src:o,alt:"",onError:()=>r(!0)}):ut(e.orgName)}),U("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:a}),c("p",{className:"sekyro-org__sub",children:s("shell.subtitle")})]}),n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(ce.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":s("native.close"),onClick:p,children:c($,{name:"close"})}):null})]}),e.returning?c("p",{className:"sekyro-text-muted",children:s("returning.description")}):null]})}i(Xo,"OrgHeader");function Zo({context:e,current:t,i18n:n}){let s=t===null?-1:e.sections.indexOf(t),l=e.progress,r=l!==void 0&&l.length===e.sections.length?l:e.sections.map((o,a)=>({id:o,state:a<s?"done":a===s?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:r.map(({id:o,state:a})=>c("li",{className:`sekyro-progress__bar${a==="done"?" is-done":a==="current"?" is-current":""}`,...a==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(Zo,"SectionProgress");import{useEffect as en,useState as bt}from"react";var jo=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Me(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return jo.test(t)}i(Me,"isInAppBrowser");import{jsx as j}from"react/jsx-runtime";function tn(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(tn,"pageUrl");function on({hostedUrl:e,inAppBrowser:t,...n}){let[s,l]=bt(t===!0);en(()=>{t===void 0&&Me()&&l(!0)},[t]);let[r,o]=bt(!1),a=n.handoffUrl??e??tn();return s&&!r?j(le,{theme:ae(ie(void 0),n.theme),...n.className!==void 0?{className:n.className}:{},children:j(te,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:j("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-stack sekyro-stack--4",children:j(nn,{url:a,onContinue:()=>o(!0)})})})}):j(Ae,{...n,...a!==""?{handoffUrl:a}:{}})}i(on,"SekyroFlow");function nn({url:e,onContinue:t}){let n=b();return j(R,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(nn,"Prompt");export{Pe as DocumentCapture,Se as EidStep,he as EmailOtpStep,be as MethodChoice,Ne as NniEntry,ye as PhoneOtpStep,Ie as PortraitCapture,on as SekyroFlow,Ae as SekyroVerification,te as StepI18nProvider,Le as VerificationResultScreen,wt as arSteps,Pt as enSteps,_t as formatTemplate,xt as frSteps,Me as isInAppBrowser,It as resolveSekyroStrings,b as useStepI18n,fe as useVerificationStep};
|
package/dist/verification.css
CHANGED
|
@@ -293,6 +293,7 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
293
293
|
.sekyro-card[aria-pressed="true"] > .sekyro-glyph { color: var(--sekyro-color-brand); }
|
|
294
294
|
.sekyro-card[aria-pressed="true"] .sekyro-radio { border-color: var(--sekyro-color-brand); }
|
|
295
295
|
.sekyro-card[aria-pressed="true"] .sekyro-radio::after { transform: scale(1); opacity: 1; }
|
|
296
|
+
@media (prefers-reduced-motion: reduce) { .sekyro-card, .sekyro-radio::after { transition: none; } }
|
|
296
297
|
.sekyro-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--sekyro-color-line-subtle); border-radius: var(--sekyro-radius); overflow: hidden; }
|
|
297
298
|
.sekyro-rows > li + li { border-block-start: 1px solid var(--sekyro-color-line-subtle); }
|
|
298
299
|
.sekyro-row-btn {
|
|
@@ -484,6 +485,8 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
484
485
|
|
|
485
486
|
/* ── The face camera (face-camera.tsx): the oval cut from the ink, its ring of ticks and the running light ── */
|
|
486
487
|
.sekyro-fc-video { transform: scaleX(-1); }
|
|
488
|
+
/* The back camera (assisted capture) is not a selfie: no mirror. */
|
|
489
|
+
.sekyro-fc-video.is-rear { transform: none; }
|
|
487
490
|
.sekyro-fc-still { animation: sekyro-fade 250ms ease-out both; }
|
|
488
491
|
.sekyro-fc-scrim { fill: var(--sekyro-color-stage); fill-opacity: 0.82; }
|
|
489
492
|
.sekyro-fc-rim { fill: none; stroke: color-mix(in srgb, var(--sekyro-color-on-stage) 35%, transparent); stroke-width: 1.5; }
|
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.8",
|
|
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.10 || ^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.8",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.8",
|
|
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.8?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.8"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-3MBJZSJL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as C}from"./chunk-Q232JYNO.js";import{e as S,f as I}from"./chunk-63NUMQST.js";import{a as m}from"./chunk-4RUZQW5T.js";import{useLayoutEffect as L,useRef as P,useState as z}from"react";import{jsx as s,jsxs as y}from"react/jsx-runtime";var x=72;function F(n,r){let t=n*.72,o=t*1.32;return{cx:n/2,cy:(r-o)/2.1+o/2,a:t/2,b:o/2}}m(F,"faceOval");function H({cx:n,cy:r,a:t,b:o}){return Array.from({length:x},(M,f)=>{let p=-Math.PI/2+f/x*2*Math.PI,c=Math.cos(p),d=Math.sin(p),h=n+t*c,k=r+o*d,v=Math.hypot(o*c,t*d),u=o*c/v,a=t*d/v,l=m(e=>Math.round(e*10)/10,"r");return`M${l(h+u*16)} ${l(k+a*16)}L${l(h+u*28)} ${l(k+a*28)}`})}m(H,"ticks");function E({video:n,instruction:r,note:t,busy:o,progress:M,still:f,overlay:p,onClose:c,closeLabel:d,live:h=!0,children:k,testId:v}){S(h);let u=P(null),[a,l]=z({w:0,h:0});L(()=>{let b=u.current;if(b===null)return;let R=m(()=>l({w:b.clientWidth,h:b.clientHeight}),"measure");if(R(),typeof ResizeObserver>"u")return;let O=new ResizeObserver(R);return O.observe(b),()=>O.disconnect()},[]);let e=F(a.w,a.h),$=a.w>0?H(e):[],N=Math.round(Math.min(1,Math.max(0,M))*x),w=e.cy-e.b,i=Math.max(e.a,e.b)+40,g=70*Math.PI/180;return s("section",{className:"sekyro-lm sekyro-fc","aria-label":r,"data-testid":v,children:y("div",{ref:u,className:"sekyro-lm-stage",children:[n,f?s("img",{className:"sekyro-lm-video sekyro-fc-still",src:f,alt:""}):null,p,a.w>0?y("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${a.w} ${a.h}`,"aria-hidden":"true",focusable:"false",children:[y("defs",{children:[y("linearGradient",{id:"sekyro-fc-fade",gradientUnits:"userSpaceOnUse",x1:e.cx-i*Math.sin(g),y1:e.cy,x2:e.cx,y2:e.cy,children:[s("stop",{offset:"0",className:"sekyro-fc-fade",stopOpacity:"0"}),s("stop",{offset:"1",className:"sekyro-fc-fade"})]}),s("mask",{id:"sekyro-fc-light",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:a.w,height:a.h,children:s("path",{className:"sekyro-fc-sweep",style:{transformOrigin:`${e.cx}px ${e.cy}px`},d:`M${e.cx} ${e.cy}L${e.cx-i*Math.sin(g)} ${e.cy-i*Math.cos(g)}A${i} ${i} 0 0 1 ${e.cx} ${e.cy-i}Z`,fill:"url(#sekyro-fc-fade)"})})]}),s("path",{className:"sekyro-fc-scrim",fillRule:"evenodd",d:`M0 0H${a.w}V${a.h}H0Z M${e.cx-e.a} ${e.cy}a${e.a} ${e.b} 0 1 0 ${2*e.a} 0a${e.a} ${e.b} 0 1 0 ${-2*e.a} 0Z`}),s("ellipse",{className:"sekyro-fc-rim",cx:e.cx,cy:e.cy,rx:e.a,ry:e.b}),s("path",{className:"sekyro-fc-ticks",d:$.join("")}),N>0?s("path",{className:"sekyro-fc-ticks is-done",d:$.slice(0,N).join("")}):null,N<x?s("path",{className:"sekyro-fc-ticks is-light",d:$.join(""),mask:"url(#sekyro-fc-light)"}):null]}):null,s("div",{className:"sekyro-lm-instruction sekyro-fc-instruction",style:{insetBlockStart:w-80},children:s("div",{role:"status","aria-live":"polite",children:s(I,{swapKey:r,className:"sekyro-lm-line",children:r})})}),t?y("p",{className:"sekyro-lm-under sekyro-lm-note",style:{insetBlockStart:w+2*e.b+48},children:[o?s("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}):null,s("span",{children:t})]}):null,y("div",{className:"sekyro-lm-controls",children:[s("div",{className:"sekyro-lm-bar",children:c!==void 0?s("button",{type:"button",className:"sekyro-glass","aria-label":d,onClick:c,children:s(C,{name:"close"})}):null}),k]})]})})}m(E,"FaceCamera");export{E as a};
|
package/dist/chunk-4RUZQW5T.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var p=Object.defineProperty;var r=(e,t)=>p(e,"name",{value:t,configurable:!0});import{forwardRef as l}from"react";import{jsx as d}from"react/jsx-runtime";var y=l(r(function({kind:t="primary",full:a=!1,className:n,type:o,...s},c){let i=["sekyro-btn",`sekyro-btn--${t}`];return a&&i.push("sekyro-btn--full"),n!==void 0&&i.push(n),d("button",{ref:c,type:o??"button",className:i.join(" "),...s})},"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","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 the NNI","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.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.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.","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 national 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","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.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 m={"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":"أمسك الهاتف بثبات","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.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد — أُحيل تحققك إلى مراجعة بشرية","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":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","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":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف — اطلب رابطًا جديدًا من الجهة الطالبة","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.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك — قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز — ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه — تحقق من اتصالك ثم أعد المحاولة"};var h={"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","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 le NNI","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.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.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.","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 (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","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.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"};function L(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";default:{let t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}r(L,"hintStringKey");function N(e){return`fcv2.err.${e}`}r(N,"captureErrorStringKey");function S(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":return"errors.nni_unbound";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${e}`;return Object.hasOwn(u,t)?t:null}}}r(S,"reasonStringKey");function q(e,t,a=new Date){if(t===void 0)return null;let n=new Date(t),o=n.getTime()-a.getTime();if(!Number.isFinite(o)||o<=0)return null;if(o<36e5){let i=Math.max(1,Math.ceil(o/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(i,"minute")}}let s=n.toDateString()===a.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...s?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(n)}}r(q,"retryAfterTime");function R(e,t,a){let n=new Intl.PluralRules(t).select(a);return((n==="other"?void 0:e[`capture.attemptsRemaining.${n}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(a))}r(R,"attemptsRemainingText");import{useCallback as g}from"react";function D(){return g(e=>{e?.focus()},[])}r(D,"useFocusOnMount");import{jsx as f}from"react/jsx-runtime";function O({tone:e,role:t,children:a,testId:n}){return f("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":n,children:a})}r(O,"Notice");export{r as a,y as b,u as c,m as d,h as e,L as f,N as g,S as h,q as i,R as j,O as k,D as l};
|
package/dist/chunk-65JA6YKG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as r,c as n,d as c,e as g}from"./chunk-4RUZQW5T.js";import{createContext as y,useContext as f}from"react";var p={ar:c,fr:g,en:n};function x(t,e){let o=p[t];if(e===void 0)return o;let s={...o};for(let i of Object.keys(e)){let a=e[i];typeof a=="string"&&(s[i]=a)}return s}r(x,"resolveStrings");var S=y(t=>n[t]??""),k=S.Provider;function m(){return f(S)}r(m,"useStrings");export{x as a,k as b,m as c};
|