@sekyro/react 0.1.0-rc.20 → 0.1.0-rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +7 -0
  3. package/dist/{chunk-FQDXB2B2.js → chunk-2I4BU32X.js} +1 -1
  4. package/dist/{chunk-B4OAK5EF.js → chunk-5CLPIFBP.js} +1 -1
  5. package/dist/{chunk-A4ZCLFYN.js → chunk-5RQLU3VM.js} +1 -1
  6. package/dist/{chunk-RO2EITOC.js → chunk-D65O3EVR.js} +1 -1
  7. package/dist/{chunk-WL77LOB3.js → chunk-E4OK3CB5.js} +1 -1
  8. package/dist/{chunk-VIJSKEOY.js → chunk-EGCGC7NK.js} +1 -1
  9. package/dist/{chunk-IAZ5UH2B.js → chunk-FTKNXQTF.js} +1 -1
  10. package/dist/{chunk-HRNF3WQA.js → chunk-MH5E5KTI.js} +1 -1
  11. package/dist/{chunk-AYFSJOAV.js → chunk-SDO324RU.js} +1 -1
  12. package/dist/{chunk-4X65DTPB.js → chunk-WPSVDW2G.js} +1 -1
  13. package/dist/{chunk-EDIXRMTS.js → chunk-XQNZJ3J3.js} +1 -1
  14. package/dist/{chunk-RKO3RGGA.js → chunk-ZLA6BTHU.js} +1 -1
  15. package/dist/{document-capture-view-GLJFNXMU.js → document-capture-view-GZX5JJ7N.js} +1 -1
  16. package/dist/{eid-view-UDHNSVSK.js → eid-view-ERVRHLLD.js} +1 -1
  17. package/dist/{email-otp-view-E64VQ4LK.js → email-otp-view-B7UQ5CHL.js} +1 -1
  18. package/dist/{flow-views-WOIS3NTS.js → flow-views-IGQ5MYS2.js} +1 -1
  19. package/dist/index.d.cts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +1 -1
  22. package/dist/{portrait-capture-view-OF6YACVY.js → portrait-capture-view-TMHG2UX2.js} +1 -1
  23. package/dist/portrait-review-view-XUWQ5LIN.js +2 -0
  24. package/dist/{theme-YmIQ6Ux1.d.ts → theme-quu7XV_Y.d.cts} +3 -1
  25. package/dist/{theme-YmIQ6Ux1.d.cts → theme-quu7XV_Y.d.ts} +3 -1
  26. package/dist/verification/index.d.cts +2 -2
  27. package/dist/verification/index.d.ts +2 -2
  28. package/dist/verification/index.js +1 -1
  29. package/package.json +2 -2
  30. package/sbom.cdx.json +4 -4
  31. package/dist/portrait-review-view-YPIJQTA7.js +0 -2
  32. /package/dist/{chunk-6QYD5HOU.js → chunk-BGAPVTOP.js} +0 -0
@@ -219,7 +219,9 @@ declare function captureErrorStringKey(kind: CaptureErrorKind): StringKey;
219
219
  /**
220
220
  * Result reason → copy key. SDK-side failure reasons map onto the existing
221
221
  * error copy (`no_recorder` is the browser's missing recorder = unsupported;
222
- * `attestation` / `network` reuse the hosted error copy); backend reasons use
222
+ * `attestation` / `network` reuse the hosted error copy, whatever the result's
223
+ * `attestationError`: a blocked security check frame and a refused token read the
224
+ * same to the person); backend reasons use
223
225
  * `reasons.*`. Returns `null` for a reason without built-in copy.
224
226
  */
225
227
  declare function reasonStringKey(reason: ReasonCode): StringKey | null;
@@ -219,7 +219,9 @@ declare function captureErrorStringKey(kind: CaptureErrorKind): StringKey;
219
219
  /**
220
220
  * Result reason → copy key. SDK-side failure reasons map onto the existing
221
221
  * error copy (`no_recorder` is the browser's missing recorder = unsupported;
222
- * `attestation` / `network` reuse the hosted error copy); backend reasons use
222
+ * `attestation` / `network` reuse the hosted error copy, whatever the result's
223
+ * `attestationError`: a blocked security check frame and a refused token read the
224
+ * same to the person); backend reasons use
223
225
  * `reasons.*`. Returns `null` for a reason without built-in copy.
224
226
  */
225
227
  declare function reasonStringKey(reason: ReasonCode): StringKey | null;
@@ -1,5 +1,5 @@
1
- import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-YmIQ6Ux1.cjs';
2
- export { k as StringKey, A as retakeHintStringKey } from '../theme-YmIQ6Ux1.cjs';
1
+ import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-quu7XV_Y.cjs';
2
+ export { k as StringKey, A as retakeHintStringKey } from '../theme-quu7XV_Y.cjs';
3
3
  import * as react from 'react';
4
4
  import { ReactNode } from 'react';
5
5
  import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
@@ -1,5 +1,5 @@
1
- import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-YmIQ6Ux1.js';
2
- export { k as StringKey, A as retakeHintStringKey } from '../theme-YmIQ6Ux1.js';
1
+ import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-quu7XV_Y.js';
2
+ export { k as StringKey, A as retakeHintStringKey } from '../theme-quu7XV_Y.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode } from 'react';
5
5
  import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a as Mn}from"../chunk-4X65DTPB.js";import{a as Pe,b as F,c as On}from"../chunk-HRNF3WQA.js";import{a as K,d as gn,e as bt,f as je,g as hn,h as kn}from"../chunk-A4ZCLFYN.js";import{a as Sn,b as bn,c as xn}from"../chunk-GUTF3SPK.js";import{a as En,b as Tn,c as In,d as Rn,e as Ln,f as Ct}from"../chunk-AYFSJOAV.js";import{a as rt}from"../chunk-RKO3RGGA.js";import{d as kt,f as fn,g as mn,j as yn}from"../chunk-VIJSKEOY.js";import{b as dn}from"../chunk-EDIXRMTS.js";import{a as pn}from"../chunk-7MMT5M4E.js";import{a as Se}from"../chunk-VRDPGOXM.js";import{a as Io,b as Ro,c as Lo,d as Oo,e as Mo,f as Ge,g as I}from"../chunk-B4OAK5EF.js";import{a as G,b as ee,c as vn,d as te,e as Cn,f as et,g as tt,h as vt,i as Nn,k as nt,l as wn,m as Pn,o as _n,p as A,q as ot}from"../chunk-RO2EITOC.js";import"../chunk-IAZ5UH2B.js";import{a as P,c as ht,j as Eo,l as To,n as ln,o as cn,p as un,r as St,s as we}from"../chunk-6QYD5HOU.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as Ao,useState as An}from"react";function Nt(e){let[t,n]=An(()=>e?.currentStep?.()??null),[o,a]=An(null);return Ao(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let i=!0,r=e.on("step",l=>{i&&n(l)});return e.run().then(l=>{i&&n(u=>u??l)},l=>{i&&a(l)}),()=>{i=!1,r()}},[e]),{step:t,error:o}}s(Nt,"useVerificationStep");import{useEffect as _t,useId as Fo,useMemo as Vo,useRef as xt,useState as ne}from"react";var Do="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",Dn;function Bn(e){return Dn??(Dn=new Map(Do.split(" ").map(t=>{let[n,o]=t.slice(2).split("/");return[t.slice(0,2),[n,o]]}))),Dn.get(e.toUpperCase())}s(Bn,"entryOf");function Fn(e){return Bn(e)?.[0]}s(Fn,"dialCodeOf");function Vn(e){return Bn(e)?.[1]}s(Vn,"nationalPrefixOf");import{normalizeNni as Bo}from"@sekyro/web";function st(e){let t=Bo(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(st,"digitsOf");var wt=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function it(e,t){let n="",o=0;for(let a of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])o<e.length&&(n+=(o>0?" ":"")+e.slice(o,o+a)),o+=a;return n+e.slice(o)}s(it,"groupDigits");function Hn(e,t){let n=0;for(let o=t;o>0&&n<e.length;n+=1)e[n]!==" "&&(o-=1);return n}s(Hn,"caretAfter");var Pt=s((e,t)=>t.find(n=>e.startsWith(n.dial)),"countryOfNumber"),Un=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as Yn,jsx as S,jsxs as U}from"react/jsx-runtime";var $n=s((e,t,n)=>{if(e===void 0)return 0;let o=Date.parse(e)-t;return Number.isFinite(o)?Math.min(n,Math.max(0,Math.ceil(o/1e3))):0},"secondsUntil"),Ho=600,Uo=30,$o=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Ko=["whatsapp","sms"],Kn=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_resend_limit","otp_number_invalid","otp_number_not_mobile"]);function Gn(e){let t=st(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(Gn,"normalizedPhone");var Go=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function Wo(e){let t=[];for(let n of e.phoneCountries??["MR"]){let o=e.phoneRules?.find(i=>i.code===n),a=o?.dial??Fn(n);a!==void 0&&!t.some(i=>i.code===n)&&t.push({code:n,dial:`+${a}`,...o!==void 0?{rule:o}:{}})}return t}s(Wo,"phoneCountriesOf");function zo(e,t){if(t===null||!e.startsWith(t.dial))return Gn(e);let n=e.slice(t.dial.length).replace(/\D/g,""),o=Vn(t.code);return o!==void 0&&n.startsWith(o)&&(n=n.slice(o.length)),Gn(t.dial+n)}s(zo,"e164Of");var Wn=s((e,t)=>(Pt(e,t)??t[0])?.code??null,"countryFor");function Yo(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return n=>`${t?.of(n.code)??n.code} (${n.dial})`}s(Yo,"countryLabels");var zn="other";function Et({step:e,locale:t,strings:n,className:o,defaultPhone:a,onError:i}){let r=I(t,n),{t:l}=r,u=Vo(()=>Wo(e),[e.phoneCountries,e.phoneRules]),p=a??u[0]?.dial??"",[m,g]=ne(()=>Wn(p,u)),b=u.map(y=>y.code).join(",");_t(()=>{if(m===null||!u.some(y=>y.code===m)){let y=Wn(p,u);g(y);let N=h.current,Z=u.find(X=>X.code===y)?.dial;Z!==void 0&&E(X=>N!==null&&X.startsWith(N.dial)?Z+X.slice(N.dial.length):X.startsWith("+")?X:Z)}},[b,p]);let d=u.find(y=>y.code===m)??null,h=xt(d);d!==null&&(h.current=d);let[v,E]=ne(p),[T,x]=ne(!1),[R,B]=ne(!1),[_,C]=ne(""),[k,M]=ne(!1),[$,be]=ne(null),[Le,Oe]=ne(null),[ve,Y]=ne(!1),[fe,Me]=ne(null),le=xt(null),me=e.phase==="verify"&&!ve,Ae=e.phase==="verify",De=xn(Ae),[Je,ft]=Sn(e.reason==="otp_mismatch",e.attemptsRemaining,()=>C("")),re=Fo(),Be=xt(null);_t(()=>{let y=setTimeout(()=>Be.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(y)},[me]);let ye=e.phase==="verify"?e.codeExpiresAt??"sent":null;_t(()=>{ye!==null&&(Y(!1),le.current!==null&&!Kn.has(e.reason??"")&&Me(le.current),le.current=null)},[ye]);let Fe=s(async y=>{M(!0),Oe(null);try{await y()}catch(N){Oe(Se(N,r.strings)),i?.(N)}finally{M(!1),be(null)}},"run"),q=Ko.filter(y=>(e.channels??[]).includes(y)),se=e.phoneInternational===!0,ce=T||d===null,D=ce||v.startsWith("+")&&!v.startsWith(d.dial),Q=D?void 0:d.rule,Qe=D?v:v.replace(d.dial,"").replace(/\D/g,""),w=Q?wt(Qe,Q):Qe,ge=D&&!ce&&!se&&e.phoneRules?.length&&!u.some(y=>y.dial.startsWith(v)),he=ge?null:Q?Q.lengths.includes(w.length)?d.dial+w:null:ce&&!v.startsWith("+")?null:zo(v,T?null:d),ue=!e.needsPhone||he!==null,ke=s((y,N=!1)=>{let Z=e.needsPhone?N?fe:{number:he??v,shown:D||d===null?he??v:`${d.dial} ${it(w,Q)}`}:null;le.current=Z,be(y??null),Fe(async()=>{try{await e.send({...Z!==null?{phone:Z.number}:{},...y!==void 0?{channel:y}:{}})}catch(X){throw le.current=null,X}})},"send"),Ce=s(y=>{Fe(()=>e.verify(y))},"submitCode"),f=s(y=>{y.preventDefault(),me?Ce(_):q.length<=1&&ue&&ke(q[0])},"onSubmit"),L=s(y=>{let N=y.target,Z=y.nativeEvent.inputType,X=Math.max(0,N.value.lastIndexOf("+")),Ne=st(N.value.slice(X)),Ue=Pt(Ne,u),$e=st(N.value.slice(X,N.selectionStart)).length,yt=Ne,rn=Ne;if(B(!1),!Ue&&(ce||Ne.startsWith("+")))se&&x(!0);else{let Ke=Ue??d,ie=Ue?Ne.slice(Ue.dial.length):Ne;if(g(Ke.code),x(!1),ie===w&&Z?.startsWith("delete")&&(Z.endsWith("Forward")||($e-=1),ie=ie.slice(0,$e)+ie.slice($e+1)),Ke.rule){let gt=wt(ie,Ke.rule),an=ie.length-gt.length;$e-=an,ie=an>0&&!Ue&&w.length===gt.length?w:gt}rn=Ke.dial+ie,yt=it(ie,Ke.rule)}E(rn),N.value=yt;let sn=Hn(yt,$e);N.setSelectionRange(sn,sn)},"onNumber"),z=ge?l("otp.reason_otp_destination_not_allowed"):R&&Q?l("otp.phoneLengthError",{digits:Un(Q,l("otp.or"))}):"",Jt=u.length>1||se,de=`${re}-phone`,mt=$n(e.codeExpiresAt,De,Ho),Ve=$n(e.resendAvailableAt,De,Uo),Xe=me&&e.codeExpiresAt!==void 0&&mt===0,Qt=e.needsPhone&&!e.attemptsExhausted,Xt=Ae&&(e.codeExpiresAt===void 0||mt>0),jt=me&&Qt?()=>Y(!0):ve&&Xt?()=>Y(!1):null;et(jt===null?null:k?()=>{}:jt);let He=s(y=>l(y==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),en=s(y=>k&&$!==null&&$===y,"busyFor"),[Po,_o]=l("otp.sentTo",{channel:He(e.channel)}).split("{number}"),tn=e.context.simulation?.otpCode,xo=e.reason==="otp_mismatch"?U(A,{tone:"danger",children:[S("span",{children:l("otp.reason_otp_mismatch")}),S("span",{children:ot(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Kn.has(e.reason)?S(A,{tone:"warning",children:S("span",{children:l(`otp.reason_${e.reason}`)})}):e.reason==="tester_phone_mismatch"?S(A,{tone:"warning",children:S("span",{children:l("reasons.tester_phone_mismatch")})}):null,nn=U(Yn,{children:[xo,Le!==null?S(A,{tone:"danger",children:S("span",{children:l(Le)})}):null]});if(me){let y=q.length===0;return U("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":re,onSubmit:f,noValidate:!0,children:[S(ee,{id:re,title:l("otp.verifyTitle"),lead:tn!==void 0?S(Pn,{template:l("sandbox.otpHint"),code:tn}):U(Yn,{children:[Po,S("bdi",{dir:"ltr",className:"sekyro-mono",children:fe?.shown??e.sentToMasked}),_o]})}),nn,U("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:`${re}-code`,children:l("otp.codeLabel")}),S(bn,{id:`${re}-code`,value:_,invalid:Je,onChange:N=>{N!==""&&ft(),C(N),N.length===6&&_.length!==6&&!k&&!e.attemptsExhausted&&Ce(N)}}),S("span",{className:`sekyro-help sekyro-otp-expiry${Xe?" is-danger":""}`,"aria-hidden":!Xe||void 0,children:Xe?l("otp.expired"):l("otp.expiresIn",{time:$o(mt)})})]}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:Xe?l("otp.expired"):""}),U(te,{children:[S(P,{type:"submit",full:!0,disabled:k||_.length!==6||e.attemptsExhausted,"aria-busy":k||void 0,children:l("otp.verify")}),U("div",{className:"sekyro-resend-row",children:[y?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k||Ve>0,onClick:()=>ke(void 0,!0),children:Ve>0?l("otp.resendIn",{seconds:Ve}):l("otp.resend")}):Ve>0?S("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Ve})}):q.map(N=>S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>ke(N,!0),children:l("otp.resendBy",{channel:He(N)})},N)),Qt?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Y(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}let on=Yo(r.locale);return U("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":re,onSubmit:f,noValidate:!0,children:[S(ee,{id:re,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),nn,e.needsPhone?U("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:de,children:l("otp.phoneLabel")}),U("div",{className:"sekyro-phone",dir:"ltr",children:[d===null||D&&!T?null:U("div",{className:"sekyro-phone__lead",children:[Jt?U("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${l("otp.countryLabel")}: ${T?l("otp.otherCountry"):on(d)}`,value:T?zn:d.code,onChange:y=>{B(!1);let N=u.find(Z=>Z.code===y.target.value);x(N===void 0),N!==void 0&&g(N.code),E(N===void 0?"":N.dial+(D?"":w))},children:[u.map(y=>S("option",{value:y.code,children:on(y)},y.code)),se?S("option",{value:zn,children:l("otp.otherCountry")}):null]}):null,U("span",{className:"sekyro-phone__dial",id:`${de}-dial`,"aria-hidden":Jt||void 0,children:[S("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:T?"🌐":Go(d.code)}),T?null:d.dial]})]}),S("input",{ref:Be,id:de,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${D?"":`${de}-dial ${de}-hint `}${z?`${de}-error`:""}`.trim()||void 0,"aria-invalid":!!z||void 0,placeholder:ce?"+":void 0,value:D?v:it(w,Q),onChange:L,onKeyDown:y=>{y.key==="Enter"&&!ue&&B(!0)},onBlur:y=>{y.relatedTarget?.tagName!=="SELECT"&&B(w!==""&&he===null)}})]}),D?null:S("span",{className:"sekyro-help",id:`${de}-hint`,children:l("otp.phonePlaceholderGeneric")}),z?S("span",{className:"sekyro-help is-danger",id:`${de}-error`,role:"alert",children:z}):null]}):S("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),U(te,{children:[q.length===1?S(P,{type:"submit",full:!0,disabled:k||!ue,"aria-busy":en(q[0])||void 0,children:l("otp.sendBy",{channel:He(q[0])})}):q.length>1?U("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[S("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),S("div",{className:"sekyro-channel-row",children:q.map(y=>U(P,{kind:"primary",disabled:k||!ue,"aria-busy":en(y)||void 0,onClick:()=>ke(y),children:[S(G,{name:y}),He(y)]},y))})]}):S(P,{type:"submit",full:!0,disabled:k||!ue,"aria-busy":k||void 0,children:l("otp.send")}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:k&&$!==null?l("otp.sending",{channel:He($)}):""}),ve&&Xt?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Y(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}s(Et,"PhoneOtpStep");import{lazy as qo,Suspense as Zo,useMemo as Jo,useState as Qo}from"react";import{jsx as _e,jsxs as jo}from"react/jsx-runtime";var Xo={load:s(()=>import("../email-otp-view-E64VQ4LK.js"),"load")};function Tt({locale:e,strings:t,...n}){let o=I(e,t),[a,i]=Qo(0),r=Jo(()=>qo(()=>Xo.load().then(u=>({default:u.EmailOtpView}))),[a]),l=jo(A,{tone:"danger",children:[_e("span",{children:o.t("errors.network_error")}),_e(P,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return _e(Pe,{fallback:l,children:_e(Zo,{fallback:_e("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:_e(r,{...n,i18n:o})})},a)}s(Tt,"EmailOtpStep");import{lazy as er,Suspense as tr,useMemo as nr,useState as or}from"react";import{jsx as xe,jsxs as sr}from"react/jsx-runtime";var rr={load:s(()=>import("../eid-view-UDHNSVSK.js"),"load")};function It({locale:e,strings:t,...n}){let o=I(e,t),[a,i]=or(0),r=nr(()=>er(()=>rr.load().then(u=>({default:u.EidView}))),[a]),l=sr(A,{tone:"danger",children:[xe("span",{children:o.t("errors.network_error")}),xe(P,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return xe(Pe,{fallback:l,children:xe(tr,{fallback:xe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:xe(r,{...n,i18n:o})})},a)}s(It,"EidStep");import{useMemo as ir}from"react";import{jsx as Rt,jsxs as ar}from"react/jsx-runtime";function Lt({step:e,locale:t,strings:n,className:o,onError:a}){let i=I(t,n),{busy:r,error:l,run:u}=In(i,a),p=ir(()=>e.choice.options.flatMap(g=>{let b=Tn(g,i),d=En[g.service];return b===null?[]:[{id:g.id,label:b,glyph:d&&Rt(G,{name:d})}]}),[e.choice.options,i]),m=e.choice.options.find(g=>g.service==="national_eid");return ar("div",{className:o,children:[Rt(fn,{title:i.t("method.heading"),description:i.t("method.description"),options:p,busy:r,error:l,focus:!0,testId:"sekyro-method",onChoose:g=>u(()=>e.choose(g))}),m?.nationalEid?.afterPass==="continue"?Rt(F,{view:"EidContinueHint",i18n:i,provider:m.nationalEid.providerName,quiet:!0}):null]})}s(Lt,"MethodChoice");import{isValidNni as lr,normalizeNni as qn}from"@sekyro/web";import{useId as cr,useState as Ot}from"react";import{Fragment as fr,jsx as V,jsxs as Ee}from"react/jsx-runtime";var ur=new Set(["nni_not_found","registry_record_not_found"]),dr=new Set(["nni_invalid","id_number_invalid"]);function at({step:e,locale:t,strings:n,className:o,onError:a}){let i=I(t,n),{t:r}=i,[l,u]=Ot(""),[p,m]=Ot(!1),[g,b]=Ot(null),d=cr(),h=e.attemptsExhausted,v=s(async M=>{m(!0),b(null);try{await M()}catch($){b(Se($,i.strings)),a?.($)}finally{m(!1)}},"run"),E=s(M=>{if(M.preventDefault(),e.source!=="typed"){v(()=>e.confirm());return}let $=qn(l);if(!/^\d{10}$/.test($))return b("population.invalid");if(!lr($))return b("population.reason_id_number_invalid");v(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber($):e.submitNni($))},"onSubmit"),T=ot(i,e.attemptsRemaining,h),x=e.reason!==void 0&&ur.has(e.reason),R=e.reason!==void 0&&dr.has(e.reason),B=Ee(fr,{children:[e.reason==="registry_unavailable"?Ee(A,{tone:"warning",children:[V("span",{children:r("population.reason_registry_unavailable")}),V("span",{children:T})]}):null,x&&e.canUseDocument?Ee(A,{tone:"warning",children:[V("span",{children:r("population.reason_registry_record_not_found_or_document")}),V("span",{children:T}),V(P,{kind:"secondary",disabled:p,onClick:()=>{v(()=>e.useDocument())},children:r("population.useDocument")})]}):null,x&&!e.canUseDocument||R?Ee(A,{tone:"danger",children:[V("span",{children:r(x?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),V("span",{children:T})]}):null,h&&e.reason===void 0?V(A,{tone:"danger",children:V("span",{children:T})}):null,g!==null?V(A,{tone:"danger",children:V("span",{children:r(g)})}):null]}),[_,C,k]=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 Ee("form",{className:`sekyro-step${o?` ${o}`:""}`,"aria-labelledby":d,onSubmit:E,noValidate:!0,children:[V(ee,{id:d,title:r(_),lead:r(C)}),B,e.source==="typed"?Ee("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:`${d}-id-number`,children:r("population.label")}),V("input",{id:`${d}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:l,"aria-describedby":`${d}-id-number-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_id_number_invalid"||void 0,onChange:M=>{b(null),u(qn(M.target.value).replace(/\D/g,"").slice(0,10))}}),V("span",{id:`${d}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,V(te,{children:h?null:V(P,{type:"submit",full:!0,disabled:p,"aria-busy":p||void 0,children:r(k)})})]})}s(at,"IdNumberEntry");function pr(e){return at(e)}s(pr,"NniEntry");import{acceptedIssuers as Sr,acceptedTypesFor as jn,warmDocumentCapture as br}from"@sekyro/web";import{lazy as vr,Suspense as Cr,useEffect as Nr,useMemo as wr,useState as Dt}from"react";import{acceptedIssuers as mr,acceptedTypesFor as Mt}from"@sekyro/web";import{useEffect as Zn,useId as yr,useMemo as Jn,useState as At}from"react";import{jsx as H,jsxs as Te}from"react/jsx-runtime";var Qn=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),gr=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),hr=220;function kr(e,t,n=[],o){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let i=t.map(u=>({code:u,name:a?.of(u)??u})),r=new Intl.Collator(e),l=s(u=>{if(u===o)return-1;let p=n.indexOf(u);return p<0?n.length:p},"rank");return i.sort((u,p)=>l(u.code)-l(p.code)||r.compare(u.name,p.name))}s(kr,"countryNames");function Xn({step:e,i18n:t,issuer:n,onPicked:o,ageStepUp:a=!1}){let{t:i,locale:r}=t,l=Jn(()=>mr(e.documents),[e.documents]),u=Jn(()=>kr(r,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[r,l,e.documents,e.detectedCountry]),p=l.length===1?l[0]:null,[m,g]=At(n??p),[b,d]=At(""),[h,v]=At(null),E=yr(),T=p===null?[]:Mt(e.documents,p),x=p!==null&&T.length===1?T[0]:null;Zn(()=>{p!==null&&x!==null&&e.selectDocument(p,x)},[p,x]);let R=s((C,k)=>{e.selectDocument(C,k),o?.()},"pick"),B=s(C=>{let k=Mt(e.documents,C);k.length===1?R(C,k[0]):g(C)},"chooseIssuer");if(Zn(()=>{if(h===null||m===null)return;let C=setTimeout(()=>R(m,h),hr);return()=>clearTimeout(C)},[h]),et(m!==null&&l.length>1&&n===void 0?()=>{g(null),v(null)}:null),x!==null)return null;if(m===null){let C=Qn(b.trim()),k=C===""?u:u.filter(M=>Qn(M.name).includes(C)||M.code.toLowerCase()===C);return Te("section",{className:"sekyro-step",children:[H(ee,{title:i("doc.countryTitle"),lead:i(a?"doc.ageStepUp":"doc.pickDescription")}),Te("div",{className:"sekyro-field",children:[H("label",{className:"sekyro-label",htmlFor:E,children:i("doc.countryLabel")}),H("input",{id:E,type:"search",className:"sekyro-input",placeholder:i("doc.countrySearch"),value:b,onChange:M=>d(M.target.value)})]}),k.length===0?H("p",{className:"sekyro-text-muted",children:i("doc.noCountryMatch")}):H("ul",{className:"sekyro-rows",children:k.map(M=>H("li",{children:Te("button",{type:"button",className:"sekyro-row-btn",onClick:()=>B(M.code),children:[H("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:gr(M.code)}),M.name]})},M.code))}),H(te,{children:null})]})}let _=Mt(e.documents,m);return Te("section",{className:"sekyro-step",children:[H(ee,{title:i("doc.pickTitle"),lead:i(a&&p!==null?"doc.ageStepUp":"native.doc.holdIt")}),H("div",{className:"sekyro-choices",children:_.map(C=>Te("button",{type:"button",className:"sekyro-card","aria-pressed":h===C,disabled:h!==null&&h!==C,onClick:()=>v(C),children:[H("span",{className:"sekyro-card__tile",children:H(G,{name:C==="passport"?"passport":"card"})}),Te("span",{className:"sekyro-card__body",children:[H("span",{className:"sekyro-card__title",children:i(`doc.type.${C}`)}),H("span",{className:"sekyro-card__sub",children:i(`doc.sub.${C}`)})]}),H("span",{className:"sekyro-radio","aria-hidden":"true"})]},C))}),l.length>1?H("button",{type:"button",className:"sekyro-link",onClick:()=>{g(null),v(null)},children:i("native.doc.changeCountry")}):null,H(te,{children:null})]})}s(Xn,"DocumentPicker");import{jsx as pe,jsxs as _r}from"react/jsx-runtime";var Pr={load:s(()=>import("../document-capture-view-GLJFNXMU.js"),"load")};function Bt({step:e,locale:t,strings:n,className:o,liveMrz:a}){let i=I(t,n),[r,l]=Dt(0),[u,p]=Dt(null),m=Sr(e.documents),g=m.length>1,b=e.issuer!==null&&jn(e.documents,e.issuer).length>1,d=e.documentType===null||e.issuer===null||u!==null,h=m.length===1&&jn(e.documents,m[0]).length===1,[v]=Dt(()=>d&&!h),E=e.ageStepUp===!0,T=wr(()=>vr(()=>Pr.load().then(R=>({default:R.DocumentCaptureView}))),[r]);Nr(()=>{br()},[]);let x=_r(A,{tone:"danger",children:[pe("span",{children:i.t("errors.network_error")}),pe(P,{kind:"secondary",onClick:()=>l(R=>R+1),children:i.t("doc.retryCamera")})]});return pe("div",{className:o,children:d?pe(Xn,{step:e,i18n:i,ageStepUp:E&&u===null&&v,...u==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>p(null)}):pe(Pe,{fallback:x,children:pe(Cr,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:pe(T,{step:e,i18n:i,ageLead:E&&!v,liveMrz:a,...g?{onChangeCountry:s(()=>p("country"),"onChangeCountry")}:{},...b?{onChangeDocument:s(()=>p("document"),"onChangeDocument")}:{}})})},r)})}s(Bt,"DocumentCapture");import{warmPortraitCapture as xr}from"@sekyro/web";import{Component as Er,lazy as eo,Suspense as to,useContext as Tr,useEffect as Ir,useMemo as no,useState as oo}from"react";import{jsx as O,jsxs as ct}from"react/jsx-runtime";var Rr={load:s(()=>import("../portrait-capture-view-OF6YACVY.js"),"load")},Lr={load:s(()=>import("../portrait-review-view-YPIJQTA7.js"),"load")},Vt=class Vt extends Er{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(Vt,"LoadBoundary");var lt=Vt;function Or({step:e,i18n:t}){let{t:n}=t,o=we();return ct("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[O("h2",{ref:o,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?O("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?ct(A,{tone:"danger",children:[O("span",{children:n("portrait.uploadFailed")}),O(P,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):O("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}s(Or,"MatchPhase");function Ft({step:e,locale:t,strings:n,className:o,assetBaseUrl:a,verification:i}){let r=I(t,n),l=mn(i),u=Tr(nt),[p,m]=oo(0),[g,b]=oo(null),d=no(()=>eo(()=>Rr.load().then(k=>({default:k.PortraitCaptureView}))),[p]),h=no(()=>eo(()=>Lr.load().then(k=>({default:k.PortraitScreens}))),[p]),v=typeof e.uploadPortrait=="function",E=v?e.photo?.source??"camera":"camera",T=v&&E!=="camera"&&e.photo?.uploadOffered===!0,x=E!=="upload",R=E==="upload"?"upload":E==="choice"?g??e.photo?.pick??"source":"camera",B=e.phase==="capture"&&e.photo?.cameraOnPhone===!0;if(Ir(()=>{e.phase==="capture"&&R==="camera"&&!B&&xr()},[e.phase,R,B]),e.phase==="match")return O("div",{className:o,children:O(Or,{step:e,i18n:r})});let _=O("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")});if(u!==null&&(u.busy||u.failed!==null)&&e.phase==="capture"&&R==="camera")return ct("section",{className:`sekyro-step${o?` ${o}`:""}`,children:[O(ee,{title:r.t("session.steps.portrait.title")}),O(te,{children:O(P,{kind:"secondary",full:!0,disabled:u.busy,onClick:u.reset,children:r.t("portrait.retryCamera")})})]});if(e.phase==="review"||R!=="camera"||B)return O("div",{className:o,children:O(lt,{fallback:O(P,{kind:"ghost",onClick:()=>m(k=>k+1),children:r.t("common.retry")}),children:O(to,{fallback:_,children:O(h,{screen:e.phase==="review"?"review":B&&R==="camera"?"phone":R==="camera"?"review":R,step:e,i18n:r,...x?{onCamera:s(()=>b("camera"),"onCamera")}:{},onUpload:()=>b("upload"),onDeclined:()=>b(null)})})},p)});if(!l.settled)return O("div",{className:o,children:_});let C=ct(A,{tone:"danger",children:[O("span",{children:r.t("errors.network_error")}),O(P,{kind:"secondary",onClick:()=>m(k=>k+1),children:r.t("portrait.retryCamera")})]});return O("div",{className:o,children:O(lt,{fallback:C,children:O(to,{fallback:_,children:O(d,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{},...T?{onUpload:s(()=>b("upload"),"onUpload")}:{}})})},p)})}s(Ft,"PortraitCapture");import{cameraUnavailableCauseOf as Xr}from"@sekyro/web";import{useCallback as oe,useContext as jr,useEffect as Ze,useId as es,useMemo as qt,useRef as ae,useState as j}from"react";var Ht={light:{lineBrand:"#0d3b66",successSoft:"#d5f0e8",successFg:"#005341",onSuccess:"#ffffff",warningSoft:"#fff7e6",warningFg:"#735003",onWarning:"#191a1b",dangerSoft:"#ffdada",dangerFg:"#ca0f07",onDanger:"#ffffff",info:"#0563d4",infoSoft:"#d3e5ff",infoFg:"#064da5",onInfo:"#ffffff"},dark:{lineBrand:"#3f80bf",successSoft:"#002c23",successFg:"#53ffd4",onSuccess:"#030303",warningSoft:"#463102",warningFg:"#ffd98a",onWarning:"#030303",dangerSoft:"#9c1008",dangerFg:"#ffbbbb",onDanger:"#030303",info:"#5da9ff",infoSoft:"#063778",infoFg:"#acd0ff",onInfo:"#030303"},sizes:{buttonHeight:"52px",controlRadius:"10px",cardRadius:"16px",fieldRadius:"10px",iconTile:"56px",iconTileRadius:"16px",headerTile:"40px",choiceTile:"40px",tileRadius:"10px",resultDisc:"64px",resultRing:"8px",progressHeight:"4px",focusRing:"2px",focusRingOffset:"2px",otpBox:"60px",choiceMinHeight:"76px",stepGap:"32px",headingGap:"12px"},motion:{page:"320ms",easeOut:"cubic-bezier(0.16, 1, 0.3, 1)"}};var We={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},Mr=["danger","success","warning","info"];function Ut(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(Ut,"channel");function ro(e){let t=Ut(parseInt(e.slice(1,3),16)),n=Ut(parseInt(e.slice(3,5),16)),o=Ut(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*o}s(ro,"luminance");function Ar(e,t){let n=ro(e),o=ro(t),a=Math.max(n,o),i=Math.min(n,o);return(a+.05)/(i+.05)}s(Ar,"contrastRatio");function so(e,t){return Math.min(...Mr.map(n=>Ar(We[e][n].fg,t)))}s(so,"worstAgainst");function io(e,t,n){return Math.min(so(e,t),so(e,n))}s(io,"worstStatusContrast");function ao(e,t){return io("light",e,t)>=io("dark",e,t)?"light":"dark"}s(ao,"statusSchemeFor");import{useRef as Fr,useState as Vr}from"react";import{useEffect as Dr,useId as Br,useRef as $t}from"react";import{jsx as Ie,jsxs as lo}from"react/jsx-runtime";function ut({open:e,title:t,closeLabel:n,onClose:o,children:a,actions:i,role:r,testId:l,returnFocus:u}){let p=$t(null),m=$t(null),g=$t(!1),b=Br();return Dr(()=>{let d=p.current;if(d!==null){if(e&&!d.open?(m.current=typeof document>"u"?null:document.activeElement,typeof d.showModal=="function"?d.showModal():d.setAttribute("open","")):!e&&d.open&&(typeof d.close=="function"?d.close():d.removeAttribute("open")),!e&&g.current){let h=u?.current??(m.current instanceof HTMLElement?m.current:null);m.current=null,h?.focus()}g.current=e}},[e,u]),Ie("dialog",{ref:p,className:"sekyro-dialog","aria-labelledby":b,...r==="alertdialog"?{role:r}:{},"data-testid":l,onCancel:d=>{d.preventDefault(),o()},onClick:d=>{d.target===d.currentTarget&&o()},children:lo("div",{className:"sekyro-dialog__panel",children:[lo("div",{className:"sekyro-dialog__head",children:[Ie("h2",{id:b,className:"sekyro-dialog__title",children:t}),n!==void 0?Ie("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:o,children:Ie(G,{name:"close"})}):null]}),a!==void 0?Ie("div",{className:"sekyro-dialog__body",children:a}):null,i!==void 0?Ie("div",{className:"sekyro-dialog__actions",children:i}):null]})})}s(ut,"FlowDialog");import{jsx as ze,jsxs as co}from"react/jsx-runtime";var Hr=["intro","data","processing","sharing","retention"];function uo({i18n:e,purpose:t="identity"}){let{t:n}=e,[o,a]=Vr(!1),i=Fr(null),[r,l=""]=n("consent.short").split("{terms}");return co("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[co("p",{className:"sekyro-consent__line",children:[r,ze("button",{ref:i,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:n("consent.termsLink")}),l]}),ze(ut,{open:o,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>a(!1),returnFocus:i,testId:"sekyro-consent-terms",children:ze("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?ze(F,{view:"HumanConsentTerms",i18n:e,quiet:!0}):Hr.map(u=>ze("p",{children:n(`consent.terms.${u}`)},u))})})]})}s(uo,"ConsentNotice");function po(e){let t=e.trim().split(/\s+/).filter(o=>o!=="");return(t.length>=2?[t[0],t[1]].map(o=>Array.from(o??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(po,"initials");import{useSyncExternalStore as Ur}from"react";var yo=s(e=>({colors:{...e?K.dark:K.light},radius:K.radius,fontFamily:K.font}),"brandTheme"),ma=yo(!1),fo=/^#[0-9a-f]{6}$/i;function Kt(e,t,n){if(t)return null;let o=bt(e).colors,a=n?.colors?.bg??o?.bg,i=n?.colors?.surface??o?.surface;return a===void 0&&i===void 0||a!==void 0&&!fo.test(a)||i!==void 0&&!fo.test(i)?null:ao(a??K.light.bg,i??K.light.surface)}s(Kt,"partnerStatusScheme");function dt(e,t,n){let o=bt(e);if(n&&o.colors!==void 0){let{brand:a,brandFg:i}=o.colors;a!==void 0&&Wr(a,K.dark.bg)>=3?o.colors={brand:a,ring:a,...i!==void 0?{brandFg:i}:{}}:delete o.colors}if(Kt(e,n,t)==="dark"){let a=We.dark;o.colors={...o.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return je(yo(n),o,gn(t))}s(dt,"verificationTheme");function pt(e){let t=Ur(Gr,Kr,()=>!1);return e==="dark"||e==="system"&&t}s(pt,"useDarkScheme");var $r="(prefers-color-scheme: dark)",go=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia($r):null,"media"),Kr=s(()=>go()?.matches??!1,"prefersDark");function Gr(e){let t=go();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(Gr,"subscribe");function Wr(e,t){let[n,o]=[mo(e),mo(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}s(Wr,"contrast");function mo(e){let t=[1,3,5].map(n=>{let o=Number.parseInt(e.slice(n,n+2),16)/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(mo,"luminance");var Gt="sekyro.testerGate";function Wt(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}s(Wt,"store");function ho(e=Date.now()){try{Wt()?.setItem(Gt,String(e))}catch{}}s(ho,"rememberTester");function ko(e=Date.now()){try{let t=Number(Wt()?.getItem(Gt)??"");return Number.isFinite(t)&&t>0&&e-t<2592e6}catch{return!1}}s(ko,"rememberedTester");function So(){try{Wt()?.removeItem(Gt)}catch{}}s(So,"forgetTester");import{useEffect as zr,useId as Yr,useState as qr}from"react";import{jsx as W,jsxs as Ye}from"react/jsx-runtime";var bo=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),Zr={review:{icon:"pending",tone:"info"},cooldown:{icon:"timer",tone:"info"},rejected:{icon:"close",tone:"neutral"},policy:{icon:"close",tone:"neutral"},inconclusive:{icon:"warning",tone:"neutral"},unavailable:{icon:"timer",tone:"neutral"},expired:{icon:"timer",tone:"neutral"}};function Jr({screen:e}){if(e==="verified")return Ye("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 80 80","aria-hidden":"true",focusable:"false",children:[W("circle",{className:"sekyro-outcome__ring",cx:"40",cy:"40",r:"40"}),W("circle",{className:"sekyro-outcome__disc",cx:"40",cy:"40",r:"32"}),W("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(22 22) scale(1.5)"})]});let{icon:t,tone:n}=Zr[e];return W("span",{className:`sekyro-tile sekyro-tile--${n} sekyro-outcome-tile`,"aria-hidden":"true","data-screen":e,children:W(G,{name:t})})}s(Jr,"OutcomeMark");function Qr({label:e,id:t,copied:n}){let[o,a]=qr(!1);return zr(()=>{if(!o)return;let i=setTimeout(()=>a(!1),1600);return()=>clearTimeout(i)},[o]),Ye("button",{type:"button",className:`sekyro-reference${o?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[W("span",{"aria-live":"polite",children:o?n:e}),W("bdi",{dir:"ltr",children:t}),W(G,{name:"copy"})]})}s(Qr,"ReferenceLine");function zt({step:e,locale:t,strings:n,className:o,onClose:a}){let i=I(t,n),{t:r}=i,l=Yr(),u=we(),p=e.context.orgName,m=e.reasonCode??"",g=e.display==="platform_unsupported"?"policy":e.display,b=s(h=>p!==""&&h!=="cooldown"?r(`native.result.${h}`,{org:p}):r(`session.result.${h}.description`),"partnerLine"),d;switch(e.display){case"rejected":d=bo.has(ht(m))?r("session.result.detailsMismatch",{org:p}):b("rejected");break;case"policy":{if(bo.has(ht(m)))d=r("session.result.detailsMismatch",{org:p});else if(m==="device_velocity_exceeded")d=r("session.result.deviceVelocity",{org:p});else if(m==="capture_tampered")d=r("session.result.deviceStop");else if(m==="camera_unavailable")d=r("reasons.camera_unavailable",{org:p});else if(m==="underage_estimated")d=r("reasons.underage_estimated");else if(m==="starter_credit_claimed")d=r("reasons.starter_credit_claimed");else if(m==="blocked_by_org")d=r("reasons.blocked_by_org");else{let h=m===""?null:cn(m);d=h!==null?r(h,{org:p}):b("policy")}break}case"cooldown":{let h=un(i.locale,e.retryAfter);d=h!==null?r(h.key,{time:h.time}):r("session.result.cooldown.description");break}case"platform_unsupported":d=r("result.platform_unsupported");break;default:d=b(g)}return Ye("section",{className:`sekyro-result${o?` ${o}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[Ye("div",{className:"sekyro-result__body",children:[W(Jr,{screen:g}),Ye("div",{className:"sekyro-heading",children:[W("h2",{id:l,ref:u,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${g}.title`)}),W("p",{className:"sekyro-text-muted",children:d})]}),W(Qr,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),a!==void 0?W("div",{className:"sekyro-actions",children:W(P,{full:!0,onClick:a,children:p!==""?r("native.result.back",{org:p}):r("native.close")})}):null]})}s(zt,"VerificationResultScreen");import{Fragment as qe,jsx as c,jsxs as J}from"react/jsx-runtime";function ts(e,t,n){let o=t?K.dark:K.light,a=t?K.roles.dark:K.roles.light,i=e.colors??{},r={},l=i.fg===o.fg&&i.surface===o.surface;i.brand===o.brand&&i.surface===o.surface&&(r["--sekyro-color-brand-soft"]=a.brandSoft),l&&(r["--sekyro-color-line"]=a.line,r["--sekyro-color-line-subtle"]=a.lineSubtle,r["--sekyro-color-line-strong"]=a.lineStrong,r["--sekyro-color-sunken"]=a.sunken),i.fgMuted===o.fgMuted&&i.surface===o.surface&&(r["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===K.font&&(r["--sekyro-font-display"]=K.fontDisplay);let u=t?Ht.dark:Ht.light;if(r["--sekyro-color-success-soft"]=u.successSoft,r["--sekyro-color-success-fg"]=u.successFg,r["--sekyro-color-on-success"]=u.onSuccess,r["--sekyro-color-warning-soft"]=u.warningSoft,r["--sekyro-color-warning-fg"]=u.warningFg,r["--sekyro-color-danger-soft"]=u.dangerSoft,r["--sekyro-color-danger-fg"]=u.dangerFg,r["--sekyro-color-on-danger"]=u.onDanger,r["--sekyro-color-info-soft"]=u.infoSoft,r["--sekyro-color-info-fg"]=u.infoFg,i.brand===o.brand&&(r["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let p=We[n];for(let m of["danger","success","warning","info"])r[`--sekyro-color-${m}-soft`]=p[m].soft,r[`--sekyro-color-${m}-fg`]=p[m].fg;r["--sekyro-color-on-success"]=p.success.on,r["--sekyro-color-on-danger"]=p.danger.on}return r}s(ts,"flowRoles");function Zt(e){let{verification:t,locale:n,strings:o,onStep:a,onResult:i}=e,{step:r,error:l}=Nt(t);Ze(()=>{r!==null&&a?.(r)},[r,a]),Ze(()=>i===void 0?void 0:t.on("result",i),[t,i]);let u=pt(e.colorScheme??"light"),p=r?.context.branding,m=dt(p,e.theme,u),[g,b]=j(!1),d=`sekyro-verification${u?" sekyro-verification--dark":""}${g?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,h=ae(e.onClose);h.current=e.onClose;let v=ae(r);v.current=r;let E=oe(()=>{let _=v.current;h.current?.(_?.kind==="result"?{reason:"finished",result:_.result}:{reason:"cancelled"})},[]),[T,x]=j(null),R=oe(()=>{let _=v.current;_!==null&&_.kind!=="result"&&_.context.consentRecorded?x("close"):E()},[E]),B=qt(()=>t.reportCaptureIssue===void 0?null:_=>t.reportCaptureIssue?.(_),[t]);return c(kn,{theme:m,className:d,children:c(Ge,{locale:n,...o!==void 0?{strings:o}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:ts(m,u,Kt(p,u,e.theme)),children:c(Nn.Provider,{value:b,children:c(vt.Provider,{value:e.onClose!==void 0?E:void 0,children:c(tt.Provider,{value:e.onClose!==void 0?R:void 0,children:J(pn.Provider,{value:B,children:[c(as,{...e,step:r,error:l,immersive:g,onLeaveAsk:()=>x("history"),onClosed:E}),c(rs,{open:T!==null,onStay:()=>{T==="history"&&Yt(),x(null)},onLeave:()=>{let _=T;x(null),_==="close"||e.onClose!==void 0?E():typeof window<"u"&&No()}})]})})})})})})})}s(Zt,"SekyroVerification");function ns(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,o=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof o=="string"&&o!==""&&typeof a=="string"&&a!==""?{title:o,description:a}:null}s(ns,"processingCopyOf");function os({error:e,retry:t}){let{t:n}=I(),o=we();return J(St,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(ln(e))}),e.retryable?c(P,{ref:o,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}s(os,"CameraErrorNotice");var vo="sekyroFlow";function Co(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[vo]===!0}s(Co,"onGuard");function Yt(){if(typeof window>"u"||Co())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[vo]:!0},"")}s(Yt,"pushGuard");function No(){window.history.back()}s(No,"leaveHistory");function rs({open:e,onStay:t,onLeave:n}){let{t:o}=I();return c(ut,{open:e,role:"alertdialog",title:o("leave.title"),onClose:t,testId:"sekyro-leave",actions:J(qe,{children:[c(P,{full:!0,onClick:t,children:o("leave.stay")}),c(P,{full:!0,kind:"danger",onClick:n,children:o("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:o("leave.body")})})}s(rs,"LeaveDialog");function ss(e,t){let[n,o]=j(!1),[a,i]=j(null),r=e===null?void 0:e.skipCapture,l=ae(r);l.current=r;let u=ae(!1),p=e?.key;Ze(()=>i(null),[p]);let m=oe(()=>{if(u.current)return;let h=l.current;h!==void 0&&(u.current=!0,o(!0),i(null),h().catch(v=>i(t.t(Se(v,t.strings)))).finally(()=>{u.current=!1,o(!1)}))},[t]),g=oe(()=>i(null),[]),b=r!==void 0,d=t.t("sandbox.skipCapture");return qt(()=>b?{label:d,busy:n,failed:a,run:m,reset:g}:null,[b,d,n,a,m,g])}s(ss,"useSkipCapture");function is({skip:e}){return J(qe,{children:[e.failed!==null?c(A,{tone:"danger",children:c("span",{children:e.failed})}):null,c(P,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}s(is,"SkipAction");function as(e){let{step:t,error:n,slots:o,immersive:a}=e,i=I(),{t:r}=i,[l,u]=j(!1),[p,m]=j([]),g=oe(f=>(m(L=>[...L,f]),()=>m(L=>L.filter(z=>z!==f))),[]),[b,d]=j(null),h=oe(f=>d(()=>f),[]),[v,E]=j(0),[T,x]=j(null),R=ss(t,i),B=t?.context.testerGate!==void 0,[_,C]=j(!1),k=ae(null);Ze(()=>{!B||k.current!==null||(k.current=ko(),k.current&&C(!0))},[B]);let M=t?.context.purpose??"identity",$=t?.context.returning===!0,be=e.verification,Le=M==="human"||t?.context.cameraUnavailableHandled===!0,Oe=be.reportCameraUnavailable!==void 0&&Le?f=>be.reportCameraUnavailable?.(f)??Promise.resolve():void 0,ve=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,Y=e.handoffUrl,fe=oe((f,L)=>Oe===void 0?void 0:c(F,{view:"NoCameraView",i18n:i,quiet:!0,cause:L,onRetry:f,...ve?{onContinue:Oe}:{},...Y!==void 0?{handoffUrl:Y}:{}}),[i,be,Le,ve,Y]),Me=qt(()=>Rn(t),[t]),le=oe((f,L)=>c(Ln,{start:f,context:L,human:M==="human",returning:$,notice:L.permissionSettled&&L.permission==="denied"?fe(f,"denied"):void 0,...Me!==void 0?{retry:Me}:{}}),[M,$,fe,Me]),me=oe((f,L)=>{let z=Xr(f.kind);return(z!==void 0?fe(L,z):void 0)??J(qe,{children:[c(os,{error:f,retry:L}),z!==void 0&&Y!==void 0?c(F,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:Y}):null]})},[fe,Y,i]),Ae=ae(""),De=e.livenessProps?.slots?.stageOverlay,Je=oe(f=>(f.guidance!==""&&!f.coached&&(Ae.current=f.guidance),c(Mn,{testId:"sekyro-capture-stage",video:c("video",{ref:f.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:f.settled?r("capture.checkingTitle"):f.guidance!==""?f.guidance:Ae.current,note:f.note,status:f.status,busy:f.settled,progress:f.phase==="seeking"||f.phase==="aligning"?f.progress:1,still:f.still,live:f.live,closeLabel:r("native.close"),overlay:De?.(f.videoRef),ramp:f.ramp?.colour??null,...f.settled?{}:{onClose:s(()=>E(L=>L+1),"onClose")},end:f.modeSwitch!=null?c(dn,{view:f.modeSwitch,className:"sekyro-glass sekyro-glass--label"}):null,children:f.settled||!f.live?null:c(wn,{onStop:()=>E(L=>L+1)})})),[r,De]),ft=es(),re=t,Be=t!==null&&T===t.key&&t.context.switchable!==void 0,ye=b??(t===null||t.kind==="result"?null:Be?()=>x(null):t.context.switchable!==void 0&&typeof re?.chooseOption=="function"?()=>x(t.key):null),Fe=ae(ye);Fe.current=ye;let q=ae(t);q.current=t;let se=ae({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});se.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let ce=e.backNavigation==="history";if(Ze(()=>{if(!ce||typeof window>"u")return;Yt();let f=s(()=>{if(Co())return;let L=q.current,z=Fe.current;z!==null?(z(),Yt()):L?.kind!=="result"&&L?.context.consentRecorded===!0?se.current.ask():se.current.hostClose?se.current.closed():No()},"onPop");return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[ce]),n!==null)return c(St,{tone:"danger",children:c("span",{children:r(Se(n,i.strings))})});if(t===null)return J("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:r("common.loading")}),c("span",{className:"sekyro-skeleton__bar is-title"}),c("span",{className:"sekyro-skeleton__bar"}),c("span",{className:"sekyro-skeleton__bar is-short"}),c("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:D}=t,Q=s(f=>{u(!0),f().finally(()=>u(!1))},"refresh"),Qe=o?.header??c(us,{context:D,headerId:ft,end:o?.headerEnd,...ye!==null?{onBack:ye}:{}}),w,ge=Be;if(_&&e.verification.testerGate!==void 0)w=c(kt.Provider,{value:Je,children:c(F,{view:"TesterGateView",i18n:i,verification:e.verification,attemptsLeft:D.testerGate?.attemptsLeft??0,livenessProps:{...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:e.livenessProps?.slots?.intro??le},locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice},onBound:()=>ho(),onDone:f=>{f&&So(),C(!1)}})});else if(ge)w=c(F,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>x(null)});else switch(t.kind){case"phone_otp":w=c(Et,{step:t});break;case"email_otp":w=c(Tt,{step:t});break;case"method":w=c(Lt,{step:t});break;case"registry":w=c(at,{step:t});break;case"document":w=c(Bt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let f=e.livenessProps?.slots?.intro,L={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:f??le,...f===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:me}:{}},...v>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};w=c(kt.Provider,{value:Je,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(F,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:L,sekyroIntro:f===void 0},v):c(yn,{...L},v)});break}case"portrait":w=J(qe,{children:[t.retakeOnly?c(F,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,c(Ft,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":w=c(F,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":w=c(F,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":w=c(F,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":{let f=t.checkType==="doc_ocr"?r("handoff.lead.document"):t.checkType==="portrait_icao"?r("handoff.lead.portrait"):void 0;w=e.handoffUrl!==void 0?c(F,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh,...f!==void 0?{lead:f}:{}}):c(rt,{tone:"brand",icon:"smartphone",title:r("handoff.title"),actions:c(P,{kind:"secondary",full:!0,disabled:l,onClick:()=>Q(t.refresh),children:r("common.refresh")}),children:c("p",{children:f??r("reasons.mobile_required")})});break}case"processing":{let f=ns(i.strings,t.service);w=c(rt,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:f?.title??r("session.processing.title"),actions:t.stalled?c(P,{kind:"secondary",full:!0,disabled:l,onClick:()=>Q(t.refresh),children:r("common.refresh")}):null,children:c("p",{children:f?.description??r("session.processing.description")})});break}case"eid":w=c(It,{step:t});break;case"unsupported":{let f=t.reason==="platform_unsupported";w=c(rt,{tone:"neutral",icon:"smartphone",title:r(f?"needsApp.title":"unsupported.title"),actions:c(ls,{org:D.orgName}),children:c("p",{children:f?D.orgName!==""?r("needsApp.description",{org:D.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:D.orgName})})});break}case"result":w=o?.result?.(t)??c(cs,{step:t});break;default:{let f=t;w=null}}let he=!a&&!D.consentRecorded&&t.kind!=="result"?c(uo,{i18n:i,purpose:D.purpose}):null,ue=R!==null&&!a&&!ge&&!_?c(is,{skip:R}):null,ke=B&&!_&&!a&&!ge&&e.verification.testerGate!==void 0?c(F,{view:"TesterGateAction",i18n:i,quiet:!0,onOpen:()=>C(!0)}):null,Ce=ue===null&&ke===null?he:J(qe,{children:[ke,ue,he]});return c(Cn.Provider,{value:h,children:c(nt.Provider,{value:R,children:c(On.Provider,{value:e.handoffUrl,children:J(vn.Provider,{value:Ce===null?null:{node:Ce,owner:p[0]??null,claim:g},children:[a?null:Qe,!a&&t.kind!=="result"&&D.sections.length>1?c(ds,{context:D,current:t.section,i18n:i}):null,c(_n,{pageKey:t.key,children:w}),!a&&!ge&&t.kind!=="result"&&t.context.switchable!==void 0?c(F,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>x(t.key),quiet:!0},t.key):null,p.length===0?Ce:null,a?null:o?.footer!==void 0?o.footer:D.branding?.hideAttribution===!0?null:J("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c(G,{name:"lock"}),r("shell.verifiedBy")]})]})})})})}s(as,"Body");function ls({org:e}){let{t}=I(),n=jr(vt);return n===void 0?null:c(P,{full:!0,onClick:n,children:e!==""?t("native.result.back",{org:e}):t("native.close")})}s(ls,"BackToOrg");function cs({step:e}){return c(tt.Consumer,{children:t=>c(zt,{step:e,...t!==void 0?{onClose:t}:{}})})}s(cs,"ResultPage");function us({context:e,headerId:t,end:n,onBack:o}){let{t:a}=I(),[i,r]=j(!1),l=i?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:J("div",{className:"sekyro-org",children:[o!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:o,"data-testid":"sekyro-back",children:c(G,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?c("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>r(!0)}):po(e.orgName)}),J("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),e.sandbox?c("span",{className:"sekyro-sandbox-badge","data-testid":"sekyro-sandbox-badge",children:a("app.sandboxBadge")}):null,n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(tt.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:p,children:c(G,{name:"close"})}):null})]})})}s(us,"OrgHeader");function ds({context:e,current:t,i18n:n}){let o=t===null?-1:e.sections.indexOf(t),a=e.progress,i=a!==void 0&&a.length===e.sections.length?a:e.sections.map((r,l)=>({id:r,state:l<o?"done":l===o?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:i.map(({id:r,state:l})=>c("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${r}`]??r})},r))})}s(ds,"SectionProgress");import{useEffect as ps,useState as wo}from"react";import{jsx as Re}from"react/jsx-runtime";function fs(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(fs,"pageUrl");function ms({hostedUrl:e,inAppBrowser:t,...n}){let[o,a]=wo(t===!0);ps(()=>{t===void 0&&Ct()&&a(!0)},[t]);let[i,r]=wo(!1),l=pt(n.colorScheme??"light"),u=n.handoffUrl??e??fs();return o&&!i?Re(hn,{theme:je(dt(void 0,void 0,l),n.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:Re(Ge,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:Re("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:Re(ys,{url:u,onContinue:()=>r(!0)})})})}):Re(Zt,{...n,...u!==""?{handoffUrl:u}:{}})}s(ms,"SekyroFlow");function ys({url:e,onContinue:t}){let n=I();return Re(F,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}s(ys,"Prompt");export{Bt as DocumentCapture,It as EidStep,Tt as EmailOtpStep,at as IdNumberEntry,Lt as MethodChoice,pr as NniEntry,Et as PhoneOtpStep,Ft as PortraitCapture,ms as SekyroFlow,Zt as SekyroVerification,Ge as StepI18nProvider,zt as VerificationResultScreen,Io as arSteps,Ro as enSteps,Oo as formatTemplate,Lo as frSteps,Ct as isInAppBrowser,Eo as loadSekyroLocale,Mo as resolveSekyroStrings,To as retakeHintStringKey,I as useStepI18n,Nt as useVerificationStep};
2
+ import{a as Mn}from"../chunk-WPSVDW2G.js";import{a as Pe,b as F,c as On}from"../chunk-MH5E5KTI.js";import{a as K,d as gn,e as bt,f as je,g as hn,h as kn}from"../chunk-5RQLU3VM.js";import{a as Sn,b as bn,c as xn}from"../chunk-GUTF3SPK.js";import{a as En,b as Tn,c as In,d as Rn,e as Ln,f as Ct}from"../chunk-SDO324RU.js";import{a as rt}from"../chunk-ZLA6BTHU.js";import{d as kt,f as fn,g as mn,j as yn}from"../chunk-EGCGC7NK.js";import{b as dn}from"../chunk-XQNZJ3J3.js";import{a as pn}from"../chunk-7MMT5M4E.js";import{a as Se}from"../chunk-VRDPGOXM.js";import{a as Io,b as Ro,c as Lo,d as Oo,e as Mo,f as Ge,g as I}from"../chunk-5CLPIFBP.js";import{a as G,b as ee,c as vn,d as te,e as Cn,f as et,g as tt,h as vt,i as Nn,k as nt,l as wn,m as Pn,o as _n,p as A,q as ot}from"../chunk-D65O3EVR.js";import"../chunk-FTKNXQTF.js";import{a as P,c as ht,j as Eo,l as To,n as ln,o as cn,p as un,r as St,s as we}from"../chunk-BGAPVTOP.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as Ao,useState as An}from"react";function Nt(e){let[t,n]=An(()=>e?.currentStep?.()??null),[o,a]=An(null);return Ao(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let i=!0,r=e.on("step",l=>{i&&n(l)});return e.run().then(l=>{i&&n(u=>u??l)},l=>{i&&a(l)}),()=>{i=!1,r()}},[e]),{step:t,error:o}}s(Nt,"useVerificationStep");import{useEffect as _t,useId as Fo,useMemo as Vo,useRef as xt,useState as ne}from"react";var Do="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",Dn;function Bn(e){return Dn??(Dn=new Map(Do.split(" ").map(t=>{let[n,o]=t.slice(2).split("/");return[t.slice(0,2),[n,o]]}))),Dn.get(e.toUpperCase())}s(Bn,"entryOf");function Fn(e){return Bn(e)?.[0]}s(Fn,"dialCodeOf");function Vn(e){return Bn(e)?.[1]}s(Vn,"nationalPrefixOf");import{normalizeNni as Bo}from"@sekyro/web";function st(e){let t=Bo(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(st,"digitsOf");var wt=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function it(e,t){let n="",o=0;for(let a of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])o<e.length&&(n+=(o>0?" ":"")+e.slice(o,o+a)),o+=a;return n+e.slice(o)}s(it,"groupDigits");function Hn(e,t){let n=0;for(let o=t;o>0&&n<e.length;n+=1)e[n]!==" "&&(o-=1);return n}s(Hn,"caretAfter");var Pt=s((e,t)=>t.find(n=>e.startsWith(n.dial)),"countryOfNumber"),Un=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as Yn,jsx as S,jsxs as U}from"react/jsx-runtime";var $n=s((e,t,n)=>{if(e===void 0)return 0;let o=Date.parse(e)-t;return Number.isFinite(o)?Math.min(n,Math.max(0,Math.ceil(o/1e3))):0},"secondsUntil"),Ho=600,Uo=30,$o=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Ko=["whatsapp","sms"],Kn=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_resend_limit","otp_number_invalid","otp_number_not_mobile"]);function Gn(e){let t=st(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(Gn,"normalizedPhone");var Go=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function Wo(e){let t=[];for(let n of e.phoneCountries??["MR"]){let o=e.phoneRules?.find(i=>i.code===n),a=o?.dial??Fn(n);a!==void 0&&!t.some(i=>i.code===n)&&t.push({code:n,dial:`+${a}`,...o!==void 0?{rule:o}:{}})}return t}s(Wo,"phoneCountriesOf");function zo(e,t){if(t===null||!e.startsWith(t.dial))return Gn(e);let n=e.slice(t.dial.length).replace(/\D/g,""),o=Vn(t.code);return o!==void 0&&n.startsWith(o)&&(n=n.slice(o.length)),Gn(t.dial+n)}s(zo,"e164Of");var Wn=s((e,t)=>(Pt(e,t)??t[0])?.code??null,"countryFor");function Yo(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return n=>`${t?.of(n.code)??n.code} (${n.dial})`}s(Yo,"countryLabels");var zn="other";function Et({step:e,locale:t,strings:n,className:o,defaultPhone:a,onError:i}){let r=I(t,n),{t:l}=r,u=Vo(()=>Wo(e),[e.phoneCountries,e.phoneRules]),p=a??u[0]?.dial??"",[m,g]=ne(()=>Wn(p,u)),b=u.map(y=>y.code).join(",");_t(()=>{if(m===null||!u.some(y=>y.code===m)){let y=Wn(p,u);g(y);let N=h.current,Z=u.find(X=>X.code===y)?.dial;Z!==void 0&&E(X=>N!==null&&X.startsWith(N.dial)?Z+X.slice(N.dial.length):X.startsWith("+")?X:Z)}},[b,p]);let d=u.find(y=>y.code===m)??null,h=xt(d);d!==null&&(h.current=d);let[v,E]=ne(p),[T,x]=ne(!1),[R,B]=ne(!1),[_,C]=ne(""),[k,M]=ne(!1),[$,be]=ne(null),[Le,Oe]=ne(null),[ve,Y]=ne(!1),[fe,Me]=ne(null),le=xt(null),me=e.phase==="verify"&&!ve,Ae=e.phase==="verify",De=xn(Ae),[Je,ft]=Sn(e.reason==="otp_mismatch",e.attemptsRemaining,()=>C("")),re=Fo(),Be=xt(null);_t(()=>{let y=setTimeout(()=>Be.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(y)},[me]);let ye=e.phase==="verify"?e.codeExpiresAt??"sent":null;_t(()=>{ye!==null&&(Y(!1),le.current!==null&&!Kn.has(e.reason??"")&&Me(le.current),le.current=null)},[ye]);let Fe=s(async y=>{M(!0),Oe(null);try{await y()}catch(N){Oe(Se(N,r.strings)),i?.(N)}finally{M(!1),be(null)}},"run"),q=Ko.filter(y=>(e.channels??[]).includes(y)),se=e.phoneInternational===!0,ce=T||d===null,D=ce||v.startsWith("+")&&!v.startsWith(d.dial),Q=D?void 0:d.rule,Qe=D?v:v.replace(d.dial,"").replace(/\D/g,""),w=Q?wt(Qe,Q):Qe,ge=D&&!ce&&!se&&e.phoneRules?.length&&!u.some(y=>y.dial.startsWith(v)),he=ge?null:Q?Q.lengths.includes(w.length)?d.dial+w:null:ce&&!v.startsWith("+")?null:zo(v,T?null:d),ue=!e.needsPhone||he!==null,ke=s((y,N=!1)=>{let Z=e.needsPhone?N?fe:{number:he??v,shown:D||d===null?he??v:`${d.dial} ${it(w,Q)}`}:null;le.current=Z,be(y??null),Fe(async()=>{try{await e.send({...Z!==null?{phone:Z.number}:{},...y!==void 0?{channel:y}:{}})}catch(X){throw le.current=null,X}})},"send"),Ce=s(y=>{Fe(()=>e.verify(y))},"submitCode"),f=s(y=>{y.preventDefault(),me?Ce(_):q.length<=1&&ue&&ke(q[0])},"onSubmit"),L=s(y=>{let N=y.target,Z=y.nativeEvent.inputType,X=Math.max(0,N.value.lastIndexOf("+")),Ne=st(N.value.slice(X)),Ue=Pt(Ne,u),$e=st(N.value.slice(X,N.selectionStart)).length,yt=Ne,rn=Ne;if(B(!1),!Ue&&(ce||Ne.startsWith("+")))se&&x(!0);else{let Ke=Ue??d,ie=Ue?Ne.slice(Ue.dial.length):Ne;if(g(Ke.code),x(!1),ie===w&&Z?.startsWith("delete")&&(Z.endsWith("Forward")||($e-=1),ie=ie.slice(0,$e)+ie.slice($e+1)),Ke.rule){let gt=wt(ie,Ke.rule),an=ie.length-gt.length;$e-=an,ie=an>0&&!Ue&&w.length===gt.length?w:gt}rn=Ke.dial+ie,yt=it(ie,Ke.rule)}E(rn),N.value=yt;let sn=Hn(yt,$e);N.setSelectionRange(sn,sn)},"onNumber"),z=ge?l("otp.reason_otp_destination_not_allowed"):R&&Q?l("otp.phoneLengthError",{digits:Un(Q,l("otp.or"))}):"",Jt=u.length>1||se,de=`${re}-phone`,mt=$n(e.codeExpiresAt,De,Ho),Ve=$n(e.resendAvailableAt,De,Uo),Xe=me&&e.codeExpiresAt!==void 0&&mt===0,Qt=e.needsPhone&&!e.attemptsExhausted,Xt=Ae&&(e.codeExpiresAt===void 0||mt>0),jt=me&&Qt?()=>Y(!0):ve&&Xt?()=>Y(!1):null;et(jt===null?null:k?()=>{}:jt);let He=s(y=>l(y==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),en=s(y=>k&&$!==null&&$===y,"busyFor"),[Po,_o]=l("otp.sentTo",{channel:He(e.channel)}).split("{number}"),tn=e.context.simulation?.otpCode,xo=e.reason==="otp_mismatch"?U(A,{tone:"danger",children:[S("span",{children:l("otp.reason_otp_mismatch")}),S("span",{children:ot(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Kn.has(e.reason)?S(A,{tone:"warning",children:S("span",{children:l(`otp.reason_${e.reason}`)})}):e.reason==="tester_phone_mismatch"?S(A,{tone:"warning",children:S("span",{children:l("reasons.tester_phone_mismatch")})}):null,nn=U(Yn,{children:[xo,Le!==null?S(A,{tone:"danger",children:S("span",{children:l(Le)})}):null]});if(me){let y=q.length===0;return U("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":re,onSubmit:f,noValidate:!0,children:[S(ee,{id:re,title:l("otp.verifyTitle"),lead:tn!==void 0?S(Pn,{template:l("sandbox.otpHint"),code:tn}):U(Yn,{children:[Po,S("bdi",{dir:"ltr",className:"sekyro-mono",children:fe?.shown??e.sentToMasked}),_o]})}),nn,U("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:`${re}-code`,children:l("otp.codeLabel")}),S(bn,{id:`${re}-code`,value:_,invalid:Je,onChange:N=>{N!==""&&ft(),C(N),N.length===6&&_.length!==6&&!k&&!e.attemptsExhausted&&Ce(N)}}),S("span",{className:`sekyro-help sekyro-otp-expiry${Xe?" is-danger":""}`,"aria-hidden":!Xe||void 0,children:Xe?l("otp.expired"):l("otp.expiresIn",{time:$o(mt)})})]}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:Xe?l("otp.expired"):""}),U(te,{children:[S(P,{type:"submit",full:!0,disabled:k||_.length!==6||e.attemptsExhausted,"aria-busy":k||void 0,children:l("otp.verify")}),U("div",{className:"sekyro-resend-row",children:[y?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k||Ve>0,onClick:()=>ke(void 0,!0),children:Ve>0?l("otp.resendIn",{seconds:Ve}):l("otp.resend")}):Ve>0?S("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Ve})}):q.map(N=>S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>ke(N,!0),children:l("otp.resendBy",{channel:He(N)})},N)),Qt?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Y(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}let on=Yo(r.locale);return U("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":re,onSubmit:f,noValidate:!0,children:[S(ee,{id:re,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),nn,e.needsPhone?U("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:de,children:l("otp.phoneLabel")}),U("div",{className:"sekyro-phone",dir:"ltr",children:[d===null||D&&!T?null:U("div",{className:"sekyro-phone__lead",children:[Jt?U("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${l("otp.countryLabel")}: ${T?l("otp.otherCountry"):on(d)}`,value:T?zn:d.code,onChange:y=>{B(!1);let N=u.find(Z=>Z.code===y.target.value);x(N===void 0),N!==void 0&&g(N.code),E(N===void 0?"":N.dial+(D?"":w))},children:[u.map(y=>S("option",{value:y.code,children:on(y)},y.code)),se?S("option",{value:zn,children:l("otp.otherCountry")}):null]}):null,U("span",{className:"sekyro-phone__dial",id:`${de}-dial`,"aria-hidden":Jt||void 0,children:[S("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:T?"🌐":Go(d.code)}),T?null:d.dial]})]}),S("input",{ref:Be,id:de,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${D?"":`${de}-dial ${de}-hint `}${z?`${de}-error`:""}`.trim()||void 0,"aria-invalid":!!z||void 0,placeholder:ce?"+":void 0,value:D?v:it(w,Q),onChange:L,onKeyDown:y=>{y.key==="Enter"&&!ue&&B(!0)},onBlur:y=>{y.relatedTarget?.tagName!=="SELECT"&&B(w!==""&&he===null)}})]}),D?null:S("span",{className:"sekyro-help",id:`${de}-hint`,children:l("otp.phonePlaceholderGeneric")}),z?S("span",{className:"sekyro-help is-danger",id:`${de}-error`,role:"alert",children:z}):null]}):S("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),U(te,{children:[q.length===1?S(P,{type:"submit",full:!0,disabled:k||!ue,"aria-busy":en(q[0])||void 0,children:l("otp.sendBy",{channel:He(q[0])})}):q.length>1?U("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[S("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),S("div",{className:"sekyro-channel-row",children:q.map(y=>U(P,{kind:"primary",disabled:k||!ue,"aria-busy":en(y)||void 0,onClick:()=>ke(y),children:[S(G,{name:y}),He(y)]},y))})]}):S(P,{type:"submit",full:!0,disabled:k||!ue,"aria-busy":k||void 0,children:l("otp.send")}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:k&&$!==null?l("otp.sending",{channel:He($)}):""}),ve&&Xt?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Y(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}s(Et,"PhoneOtpStep");import{lazy as qo,Suspense as Zo,useMemo as Jo,useState as Qo}from"react";import{jsx as _e,jsxs as jo}from"react/jsx-runtime";var Xo={load:s(()=>import("../email-otp-view-B7UQ5CHL.js"),"load")};function Tt({locale:e,strings:t,...n}){let o=I(e,t),[a,i]=Qo(0),r=Jo(()=>qo(()=>Xo.load().then(u=>({default:u.EmailOtpView}))),[a]),l=jo(A,{tone:"danger",children:[_e("span",{children:o.t("errors.network_error")}),_e(P,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return _e(Pe,{fallback:l,children:_e(Zo,{fallback:_e("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:_e(r,{...n,i18n:o})})},a)}s(Tt,"EmailOtpStep");import{lazy as er,Suspense as tr,useMemo as nr,useState as or}from"react";import{jsx as xe,jsxs as sr}from"react/jsx-runtime";var rr={load:s(()=>import("../eid-view-ERVRHLLD.js"),"load")};function It({locale:e,strings:t,...n}){let o=I(e,t),[a,i]=or(0),r=nr(()=>er(()=>rr.load().then(u=>({default:u.EidView}))),[a]),l=sr(A,{tone:"danger",children:[xe("span",{children:o.t("errors.network_error")}),xe(P,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return xe(Pe,{fallback:l,children:xe(tr,{fallback:xe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:xe(r,{...n,i18n:o})})},a)}s(It,"EidStep");import{useMemo as ir}from"react";import{jsx as Rt,jsxs as ar}from"react/jsx-runtime";function Lt({step:e,locale:t,strings:n,className:o,onError:a}){let i=I(t,n),{busy:r,error:l,run:u}=In(i,a),p=ir(()=>e.choice.options.flatMap(g=>{let b=Tn(g,i),d=En[g.service];return b===null?[]:[{id:g.id,label:b,glyph:d&&Rt(G,{name:d})}]}),[e.choice.options,i]),m=e.choice.options.find(g=>g.service==="national_eid");return ar("div",{className:o,children:[Rt(fn,{title:i.t("method.heading"),description:i.t("method.description"),options:p,busy:r,error:l,focus:!0,testId:"sekyro-method",onChoose:g=>u(()=>e.choose(g))}),m?.nationalEid?.afterPass==="continue"?Rt(F,{view:"EidContinueHint",i18n:i,provider:m.nationalEid.providerName,quiet:!0}):null]})}s(Lt,"MethodChoice");import{isValidNni as lr,normalizeNni as qn}from"@sekyro/web";import{useId as cr,useState as Ot}from"react";import{Fragment as fr,jsx as V,jsxs as Ee}from"react/jsx-runtime";var ur=new Set(["nni_not_found","registry_record_not_found"]),dr=new Set(["nni_invalid","id_number_invalid"]);function at({step:e,locale:t,strings:n,className:o,onError:a}){let i=I(t,n),{t:r}=i,[l,u]=Ot(""),[p,m]=Ot(!1),[g,b]=Ot(null),d=cr(),h=e.attemptsExhausted,v=s(async M=>{m(!0),b(null);try{await M()}catch($){b(Se($,i.strings)),a?.($)}finally{m(!1)}},"run"),E=s(M=>{if(M.preventDefault(),e.source!=="typed"){v(()=>e.confirm());return}let $=qn(l);if(!/^\d{10}$/.test($))return b("population.invalid");if(!lr($))return b("population.reason_id_number_invalid");v(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber($):e.submitNni($))},"onSubmit"),T=ot(i,e.attemptsRemaining,h),x=e.reason!==void 0&&ur.has(e.reason),R=e.reason!==void 0&&dr.has(e.reason),B=Ee(fr,{children:[e.reason==="registry_unavailable"?Ee(A,{tone:"warning",children:[V("span",{children:r("population.reason_registry_unavailable")}),V("span",{children:T})]}):null,x&&e.canUseDocument?Ee(A,{tone:"warning",children:[V("span",{children:r("population.reason_registry_record_not_found_or_document")}),V("span",{children:T}),V(P,{kind:"secondary",disabled:p,onClick:()=>{v(()=>e.useDocument())},children:r("population.useDocument")})]}):null,x&&!e.canUseDocument||R?Ee(A,{tone:"danger",children:[V("span",{children:r(x?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),V("span",{children:T})]}):null,h&&e.reason===void 0?V(A,{tone:"danger",children:V("span",{children:T})}):null,g!==null?V(A,{tone:"danger",children:V("span",{children:r(g)})}):null]}),[_,C,k]=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 Ee("form",{className:`sekyro-step${o?` ${o}`:""}`,"aria-labelledby":d,onSubmit:E,noValidate:!0,children:[V(ee,{id:d,title:r(_),lead:r(C)}),B,e.source==="typed"?Ee("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:`${d}-id-number`,children:r("population.label")}),V("input",{id:`${d}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:l,"aria-describedby":`${d}-id-number-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_id_number_invalid"||void 0,onChange:M=>{b(null),u(qn(M.target.value).replace(/\D/g,"").slice(0,10))}}),V("span",{id:`${d}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,V(te,{children:h?null:V(P,{type:"submit",full:!0,disabled:p,"aria-busy":p||void 0,children:r(k)})})]})}s(at,"IdNumberEntry");function pr(e){return at(e)}s(pr,"NniEntry");import{acceptedIssuers as Sr,acceptedTypesFor as jn,warmDocumentCapture as br}from"@sekyro/web";import{lazy as vr,Suspense as Cr,useEffect as Nr,useMemo as wr,useState as Dt}from"react";import{acceptedIssuers as mr,acceptedTypesFor as Mt}from"@sekyro/web";import{useEffect as Zn,useId as yr,useMemo as Jn,useState as At}from"react";import{jsx as H,jsxs as Te}from"react/jsx-runtime";var Qn=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),gr=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),hr=220;function kr(e,t,n=[],o){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let i=t.map(u=>({code:u,name:a?.of(u)??u})),r=new Intl.Collator(e),l=s(u=>{if(u===o)return-1;let p=n.indexOf(u);return p<0?n.length:p},"rank");return i.sort((u,p)=>l(u.code)-l(p.code)||r.compare(u.name,p.name))}s(kr,"countryNames");function Xn({step:e,i18n:t,issuer:n,onPicked:o,ageStepUp:a=!1}){let{t:i,locale:r}=t,l=Jn(()=>mr(e.documents),[e.documents]),u=Jn(()=>kr(r,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[r,l,e.documents,e.detectedCountry]),p=l.length===1?l[0]:null,[m,g]=At(n??p),[b,d]=At(""),[h,v]=At(null),E=yr(),T=p===null?[]:Mt(e.documents,p),x=p!==null&&T.length===1?T[0]:null;Zn(()=>{p!==null&&x!==null&&e.selectDocument(p,x)},[p,x]);let R=s((C,k)=>{e.selectDocument(C,k),o?.()},"pick"),B=s(C=>{let k=Mt(e.documents,C);k.length===1?R(C,k[0]):g(C)},"chooseIssuer");if(Zn(()=>{if(h===null||m===null)return;let C=setTimeout(()=>R(m,h),hr);return()=>clearTimeout(C)},[h]),et(m!==null&&l.length>1&&n===void 0?()=>{g(null),v(null)}:null),x!==null)return null;if(m===null){let C=Qn(b.trim()),k=C===""?u:u.filter(M=>Qn(M.name).includes(C)||M.code.toLowerCase()===C);return Te("section",{className:"sekyro-step",children:[H(ee,{title:i("doc.countryTitle"),lead:i(a?"doc.ageStepUp":"doc.pickDescription")}),Te("div",{className:"sekyro-field",children:[H("label",{className:"sekyro-label",htmlFor:E,children:i("doc.countryLabel")}),H("input",{id:E,type:"search",className:"sekyro-input",placeholder:i("doc.countrySearch"),value:b,onChange:M=>d(M.target.value)})]}),k.length===0?H("p",{className:"sekyro-text-muted",children:i("doc.noCountryMatch")}):H("ul",{className:"sekyro-rows",children:k.map(M=>H("li",{children:Te("button",{type:"button",className:"sekyro-row-btn",onClick:()=>B(M.code),children:[H("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:gr(M.code)}),M.name]})},M.code))}),H(te,{children:null})]})}let _=Mt(e.documents,m);return Te("section",{className:"sekyro-step",children:[H(ee,{title:i("doc.pickTitle"),lead:i(a&&p!==null?"doc.ageStepUp":"native.doc.holdIt")}),H("div",{className:"sekyro-choices",children:_.map(C=>Te("button",{type:"button",className:"sekyro-card","aria-pressed":h===C,disabled:h!==null&&h!==C,onClick:()=>v(C),children:[H("span",{className:"sekyro-card__tile",children:H(G,{name:C==="passport"?"passport":"card"})}),Te("span",{className:"sekyro-card__body",children:[H("span",{className:"sekyro-card__title",children:i(`doc.type.${C}`)}),H("span",{className:"sekyro-card__sub",children:i(`doc.sub.${C}`)})]}),H("span",{className:"sekyro-radio","aria-hidden":"true"})]},C))}),l.length>1?H("button",{type:"button",className:"sekyro-link",onClick:()=>{g(null),v(null)},children:i("native.doc.changeCountry")}):null,H(te,{children:null})]})}s(Xn,"DocumentPicker");import{jsx as pe,jsxs as _r}from"react/jsx-runtime";var Pr={load:s(()=>import("../document-capture-view-GZX5JJ7N.js"),"load")};function Bt({step:e,locale:t,strings:n,className:o,liveMrz:a}){let i=I(t,n),[r,l]=Dt(0),[u,p]=Dt(null),m=Sr(e.documents),g=m.length>1,b=e.issuer!==null&&jn(e.documents,e.issuer).length>1,d=e.documentType===null||e.issuer===null||u!==null,h=m.length===1&&jn(e.documents,m[0]).length===1,[v]=Dt(()=>d&&!h),E=e.ageStepUp===!0,T=wr(()=>vr(()=>Pr.load().then(R=>({default:R.DocumentCaptureView}))),[r]);Nr(()=>{br()},[]);let x=_r(A,{tone:"danger",children:[pe("span",{children:i.t("errors.network_error")}),pe(P,{kind:"secondary",onClick:()=>l(R=>R+1),children:i.t("doc.retryCamera")})]});return pe("div",{className:o,children:d?pe(Xn,{step:e,i18n:i,ageStepUp:E&&u===null&&v,...u==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>p(null)}):pe(Pe,{fallback:x,children:pe(Cr,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:pe(T,{step:e,i18n:i,ageLead:E&&!v,liveMrz:a,...g?{onChangeCountry:s(()=>p("country"),"onChangeCountry")}:{},...b?{onChangeDocument:s(()=>p("document"),"onChangeDocument")}:{}})})},r)})}s(Bt,"DocumentCapture");import{warmPortraitCapture as xr}from"@sekyro/web";import{Component as Er,lazy as eo,Suspense as to,useContext as Tr,useEffect as Ir,useMemo as no,useState as oo}from"react";import{jsx as O,jsxs as ct}from"react/jsx-runtime";var Rr={load:s(()=>import("../portrait-capture-view-TMHG2UX2.js"),"load")},Lr={load:s(()=>import("../portrait-review-view-XUWQ5LIN.js"),"load")},Vt=class Vt extends Er{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(Vt,"LoadBoundary");var lt=Vt;function Or({step:e,i18n:t}){let{t:n}=t,o=we();return ct("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[O("h2",{ref:o,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?O("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?ct(A,{tone:"danger",children:[O("span",{children:n("portrait.uploadFailed")}),O(P,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):O("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}s(Or,"MatchPhase");function Ft({step:e,locale:t,strings:n,className:o,assetBaseUrl:a,verification:i}){let r=I(t,n),l=mn(i),u=Tr(nt),[p,m]=oo(0),[g,b]=oo(null),d=no(()=>eo(()=>Rr.load().then(k=>({default:k.PortraitCaptureView}))),[p]),h=no(()=>eo(()=>Lr.load().then(k=>({default:k.PortraitScreens}))),[p]),v=typeof e.uploadPortrait=="function",E=v?e.photo?.source??"camera":"camera",T=v&&E!=="camera"&&e.photo?.uploadOffered===!0,x=E!=="upload",R=E==="upload"?"upload":E==="choice"?g??e.photo?.pick??"source":"camera",B=e.phase==="capture"&&e.photo?.cameraOnPhone===!0;if(Ir(()=>{e.phase==="capture"&&R==="camera"&&!B&&xr()},[e.phase,R,B]),e.phase==="match")return O("div",{className:o,children:O(Or,{step:e,i18n:r})});let _=O("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")});if(u!==null&&(u.busy||u.failed!==null)&&e.phase==="capture"&&R==="camera")return ct("section",{className:`sekyro-step${o?` ${o}`:""}`,children:[O(ee,{title:r.t("session.steps.portrait.title")}),O(te,{children:O(P,{kind:"secondary",full:!0,disabled:u.busy,onClick:u.reset,children:r.t("portrait.retryCamera")})})]});if(e.phase==="review"||R!=="camera"||B)return O("div",{className:o,children:O(lt,{fallback:O(P,{kind:"ghost",onClick:()=>m(k=>k+1),children:r.t("common.retry")}),children:O(to,{fallback:_,children:O(h,{screen:e.phase==="review"?"review":B&&R==="camera"?"phone":R==="camera"?"review":R,step:e,i18n:r,...x?{onCamera:s(()=>b("camera"),"onCamera")}:{},onUpload:()=>b("upload"),onDeclined:()=>b(null)})})},p)});if(!l.settled)return O("div",{className:o,children:_});let C=ct(A,{tone:"danger",children:[O("span",{children:r.t("errors.network_error")}),O(P,{kind:"secondary",onClick:()=>m(k=>k+1),children:r.t("portrait.retryCamera")})]});return O("div",{className:o,children:O(lt,{fallback:C,children:O(to,{fallback:_,children:O(d,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{},...T?{onUpload:s(()=>b("upload"),"onUpload")}:{}})})},p)})}s(Ft,"PortraitCapture");import{cameraUnavailableCauseOf as Xr}from"@sekyro/web";import{useCallback as oe,useContext as jr,useEffect as Ze,useId as es,useMemo as qt,useRef as ae,useState as j}from"react";var Ht={light:{lineBrand:"#0d3b66",successSoft:"#d5f0e8",successFg:"#005341",onSuccess:"#ffffff",warningSoft:"#fff7e6",warningFg:"#735003",onWarning:"#191a1b",dangerSoft:"#ffdada",dangerFg:"#ca0f07",onDanger:"#ffffff",info:"#0563d4",infoSoft:"#d3e5ff",infoFg:"#064da5",onInfo:"#ffffff"},dark:{lineBrand:"#3f80bf",successSoft:"#002c23",successFg:"#53ffd4",onSuccess:"#030303",warningSoft:"#463102",warningFg:"#ffd98a",onWarning:"#030303",dangerSoft:"#9c1008",dangerFg:"#ffbbbb",onDanger:"#030303",info:"#5da9ff",infoSoft:"#063778",infoFg:"#acd0ff",onInfo:"#030303"},sizes:{buttonHeight:"52px",controlRadius:"10px",cardRadius:"16px",fieldRadius:"10px",iconTile:"56px",iconTileRadius:"16px",headerTile:"40px",choiceTile:"40px",tileRadius:"10px",resultDisc:"64px",resultRing:"8px",progressHeight:"4px",focusRing:"2px",focusRingOffset:"2px",otpBox:"60px",choiceMinHeight:"76px",stepGap:"32px",headingGap:"12px"},motion:{page:"320ms",easeOut:"cubic-bezier(0.16, 1, 0.3, 1)"}};var We={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},Mr=["danger","success","warning","info"];function Ut(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(Ut,"channel");function ro(e){let t=Ut(parseInt(e.slice(1,3),16)),n=Ut(parseInt(e.slice(3,5),16)),o=Ut(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*o}s(ro,"luminance");function Ar(e,t){let n=ro(e),o=ro(t),a=Math.max(n,o),i=Math.min(n,o);return(a+.05)/(i+.05)}s(Ar,"contrastRatio");function so(e,t){return Math.min(...Mr.map(n=>Ar(We[e][n].fg,t)))}s(so,"worstAgainst");function io(e,t,n){return Math.min(so(e,t),so(e,n))}s(io,"worstStatusContrast");function ao(e,t){return io("light",e,t)>=io("dark",e,t)?"light":"dark"}s(ao,"statusSchemeFor");import{useRef as Fr,useState as Vr}from"react";import{useEffect as Dr,useId as Br,useRef as $t}from"react";import{jsx as Ie,jsxs as lo}from"react/jsx-runtime";function ut({open:e,title:t,closeLabel:n,onClose:o,children:a,actions:i,role:r,testId:l,returnFocus:u}){let p=$t(null),m=$t(null),g=$t(!1),b=Br();return Dr(()=>{let d=p.current;if(d!==null){if(e&&!d.open?(m.current=typeof document>"u"?null:document.activeElement,typeof d.showModal=="function"?d.showModal():d.setAttribute("open","")):!e&&d.open&&(typeof d.close=="function"?d.close():d.removeAttribute("open")),!e&&g.current){let h=u?.current??(m.current instanceof HTMLElement?m.current:null);m.current=null,h?.focus()}g.current=e}},[e,u]),Ie("dialog",{ref:p,className:"sekyro-dialog","aria-labelledby":b,...r==="alertdialog"?{role:r}:{},"data-testid":l,onCancel:d=>{d.preventDefault(),o()},onClick:d=>{d.target===d.currentTarget&&o()},children:lo("div",{className:"sekyro-dialog__panel",children:[lo("div",{className:"sekyro-dialog__head",children:[Ie("h2",{id:b,className:"sekyro-dialog__title",children:t}),n!==void 0?Ie("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:o,children:Ie(G,{name:"close"})}):null]}),a!==void 0?Ie("div",{className:"sekyro-dialog__body",children:a}):null,i!==void 0?Ie("div",{className:"sekyro-dialog__actions",children:i}):null]})})}s(ut,"FlowDialog");import{jsx as ze,jsxs as co}from"react/jsx-runtime";var Hr=["intro","data","processing","sharing","retention"];function uo({i18n:e,purpose:t="identity"}){let{t:n}=e,[o,a]=Vr(!1),i=Fr(null),[r,l=""]=n("consent.short").split("{terms}");return co("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[co("p",{className:"sekyro-consent__line",children:[r,ze("button",{ref:i,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:n("consent.termsLink")}),l]}),ze(ut,{open:o,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>a(!1),returnFocus:i,testId:"sekyro-consent-terms",children:ze("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?ze(F,{view:"HumanConsentTerms",i18n:e,quiet:!0}):Hr.map(u=>ze("p",{children:n(`consent.terms.${u}`)},u))})})]})}s(uo,"ConsentNotice");function po(e){let t=e.trim().split(/\s+/).filter(o=>o!=="");return(t.length>=2?[t[0],t[1]].map(o=>Array.from(o??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(po,"initials");import{useSyncExternalStore as Ur}from"react";var yo=s(e=>({colors:{...e?K.dark:K.light},radius:K.radius,fontFamily:K.font}),"brandTheme"),ma=yo(!1),fo=/^#[0-9a-f]{6}$/i;function Kt(e,t,n){if(t)return null;let o=bt(e).colors,a=n?.colors?.bg??o?.bg,i=n?.colors?.surface??o?.surface;return a===void 0&&i===void 0||a!==void 0&&!fo.test(a)||i!==void 0&&!fo.test(i)?null:ao(a??K.light.bg,i??K.light.surface)}s(Kt,"partnerStatusScheme");function dt(e,t,n){let o=bt(e);if(n&&o.colors!==void 0){let{brand:a,brandFg:i}=o.colors;a!==void 0&&Wr(a,K.dark.bg)>=3?o.colors={brand:a,ring:a,...i!==void 0?{brandFg:i}:{}}:delete o.colors}if(Kt(e,n,t)==="dark"){let a=We.dark;o.colors={...o.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return je(yo(n),o,gn(t))}s(dt,"verificationTheme");function pt(e){let t=Ur(Gr,Kr,()=>!1);return e==="dark"||e==="system"&&t}s(pt,"useDarkScheme");var $r="(prefers-color-scheme: dark)",go=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia($r):null,"media"),Kr=s(()=>go()?.matches??!1,"prefersDark");function Gr(e){let t=go();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(Gr,"subscribe");function Wr(e,t){let[n,o]=[mo(e),mo(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}s(Wr,"contrast");function mo(e){let t=[1,3,5].map(n=>{let o=Number.parseInt(e.slice(n,n+2),16)/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(mo,"luminance");var Gt="sekyro.testerGate";function Wt(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}s(Wt,"store");function ho(e=Date.now()){try{Wt()?.setItem(Gt,String(e))}catch{}}s(ho,"rememberTester");function ko(e=Date.now()){try{let t=Number(Wt()?.getItem(Gt)??"");return Number.isFinite(t)&&t>0&&e-t<2592e6}catch{return!1}}s(ko,"rememberedTester");function So(){try{Wt()?.removeItem(Gt)}catch{}}s(So,"forgetTester");import{useEffect as zr,useId as Yr,useState as qr}from"react";import{jsx as W,jsxs as Ye}from"react/jsx-runtime";var bo=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),Zr={review:{icon:"pending",tone:"info"},cooldown:{icon:"timer",tone:"info"},rejected:{icon:"close",tone:"neutral"},policy:{icon:"close",tone:"neutral"},inconclusive:{icon:"warning",tone:"neutral"},unavailable:{icon:"timer",tone:"neutral"},expired:{icon:"timer",tone:"neutral"}};function Jr({screen:e}){if(e==="verified")return Ye("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 80 80","aria-hidden":"true",focusable:"false",children:[W("circle",{className:"sekyro-outcome__ring",cx:"40",cy:"40",r:"40"}),W("circle",{className:"sekyro-outcome__disc",cx:"40",cy:"40",r:"32"}),W("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(22 22) scale(1.5)"})]});let{icon:t,tone:n}=Zr[e];return W("span",{className:`sekyro-tile sekyro-tile--${n} sekyro-outcome-tile`,"aria-hidden":"true","data-screen":e,children:W(G,{name:t})})}s(Jr,"OutcomeMark");function Qr({label:e,id:t,copied:n}){let[o,a]=qr(!1);return zr(()=>{if(!o)return;let i=setTimeout(()=>a(!1),1600);return()=>clearTimeout(i)},[o]),Ye("button",{type:"button",className:`sekyro-reference${o?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[W("span",{"aria-live":"polite",children:o?n:e}),W("bdi",{dir:"ltr",children:t}),W(G,{name:"copy"})]})}s(Qr,"ReferenceLine");function zt({step:e,locale:t,strings:n,className:o,onClose:a}){let i=I(t,n),{t:r}=i,l=Yr(),u=we(),p=e.context.orgName,m=e.reasonCode??"",g=e.display==="platform_unsupported"?"policy":e.display,b=s(h=>p!==""&&h!=="cooldown"?r(`native.result.${h}`,{org:p}):r(`session.result.${h}.description`),"partnerLine"),d;switch(e.display){case"rejected":d=bo.has(ht(m))?r("session.result.detailsMismatch",{org:p}):b("rejected");break;case"policy":{if(bo.has(ht(m)))d=r("session.result.detailsMismatch",{org:p});else if(m==="device_velocity_exceeded")d=r("session.result.deviceVelocity",{org:p});else if(m==="capture_tampered")d=r("session.result.deviceStop");else if(m==="camera_unavailable")d=r("reasons.camera_unavailable",{org:p});else if(m==="underage_estimated")d=r("reasons.underage_estimated");else if(m==="starter_credit_claimed")d=r("reasons.starter_credit_claimed");else if(m==="blocked_by_org")d=r("reasons.blocked_by_org");else{let h=m===""?null:cn(m);d=h!==null?r(h,{org:p}):b("policy")}break}case"cooldown":{let h=un(i.locale,e.retryAfter);d=h!==null?r(h.key,{time:h.time}):r("session.result.cooldown.description");break}case"platform_unsupported":d=r("result.platform_unsupported");break;default:d=b(g)}return Ye("section",{className:`sekyro-result${o?` ${o}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[Ye("div",{className:"sekyro-result__body",children:[W(Jr,{screen:g}),Ye("div",{className:"sekyro-heading",children:[W("h2",{id:l,ref:u,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${g}.title`)}),W("p",{className:"sekyro-text-muted",children:d})]}),W(Qr,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),a!==void 0?W("div",{className:"sekyro-actions",children:W(P,{full:!0,onClick:a,children:p!==""?r("native.result.back",{org:p}):r("native.close")})}):null]})}s(zt,"VerificationResultScreen");import{Fragment as qe,jsx as c,jsxs as J}from"react/jsx-runtime";function ts(e,t,n){let o=t?K.dark:K.light,a=t?K.roles.dark:K.roles.light,i=e.colors??{},r={},l=i.fg===o.fg&&i.surface===o.surface;i.brand===o.brand&&i.surface===o.surface&&(r["--sekyro-color-brand-soft"]=a.brandSoft),l&&(r["--sekyro-color-line"]=a.line,r["--sekyro-color-line-subtle"]=a.lineSubtle,r["--sekyro-color-line-strong"]=a.lineStrong,r["--sekyro-color-sunken"]=a.sunken),i.fgMuted===o.fgMuted&&i.surface===o.surface&&(r["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===K.font&&(r["--sekyro-font-display"]=K.fontDisplay);let u=t?Ht.dark:Ht.light;if(r["--sekyro-color-success-soft"]=u.successSoft,r["--sekyro-color-success-fg"]=u.successFg,r["--sekyro-color-on-success"]=u.onSuccess,r["--sekyro-color-warning-soft"]=u.warningSoft,r["--sekyro-color-warning-fg"]=u.warningFg,r["--sekyro-color-danger-soft"]=u.dangerSoft,r["--sekyro-color-danger-fg"]=u.dangerFg,r["--sekyro-color-on-danger"]=u.onDanger,r["--sekyro-color-info-soft"]=u.infoSoft,r["--sekyro-color-info-fg"]=u.infoFg,i.brand===o.brand&&(r["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let p=We[n];for(let m of["danger","success","warning","info"])r[`--sekyro-color-${m}-soft`]=p[m].soft,r[`--sekyro-color-${m}-fg`]=p[m].fg;r["--sekyro-color-on-success"]=p.success.on,r["--sekyro-color-on-danger"]=p.danger.on}return r}s(ts,"flowRoles");function Zt(e){let{verification:t,locale:n,strings:o,onStep:a,onResult:i}=e,{step:r,error:l}=Nt(t);Ze(()=>{r!==null&&a?.(r)},[r,a]),Ze(()=>i===void 0?void 0:t.on("result",i),[t,i]);let u=pt(e.colorScheme??"light"),p=r?.context.branding,m=dt(p,e.theme,u),[g,b]=j(!1),d=`sekyro-verification${u?" sekyro-verification--dark":""}${g?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,h=ae(e.onClose);h.current=e.onClose;let v=ae(r);v.current=r;let E=oe(()=>{let _=v.current;h.current?.(_?.kind==="result"?{reason:"finished",result:_.result}:{reason:"cancelled"})},[]),[T,x]=j(null),R=oe(()=>{let _=v.current;_!==null&&_.kind!=="result"&&_.context.consentRecorded?x("close"):E()},[E]),B=qt(()=>t.reportCaptureIssue===void 0?null:_=>t.reportCaptureIssue?.(_),[t]);return c(kn,{theme:m,className:d,children:c(Ge,{locale:n,...o!==void 0?{strings:o}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:ts(m,u,Kt(p,u,e.theme)),children:c(Nn.Provider,{value:b,children:c(vt.Provider,{value:e.onClose!==void 0?E:void 0,children:c(tt.Provider,{value:e.onClose!==void 0?R:void 0,children:J(pn.Provider,{value:B,children:[c(as,{...e,step:r,error:l,immersive:g,onLeaveAsk:()=>x("history"),onClosed:E}),c(rs,{open:T!==null,onStay:()=>{T==="history"&&Yt(),x(null)},onLeave:()=>{let _=T;x(null),_==="close"||e.onClose!==void 0?E():typeof window<"u"&&No()}})]})})})})})})})}s(Zt,"SekyroVerification");function ns(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,o=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof o=="string"&&o!==""&&typeof a=="string"&&a!==""?{title:o,description:a}:null}s(ns,"processingCopyOf");function os({error:e,retry:t}){let{t:n}=I(),o=we();return J(St,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(ln(e))}),e.retryable?c(P,{ref:o,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}s(os,"CameraErrorNotice");var vo="sekyroFlow";function Co(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[vo]===!0}s(Co,"onGuard");function Yt(){if(typeof window>"u"||Co())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[vo]:!0},"")}s(Yt,"pushGuard");function No(){window.history.back()}s(No,"leaveHistory");function rs({open:e,onStay:t,onLeave:n}){let{t:o}=I();return c(ut,{open:e,role:"alertdialog",title:o("leave.title"),onClose:t,testId:"sekyro-leave",actions:J(qe,{children:[c(P,{full:!0,onClick:t,children:o("leave.stay")}),c(P,{full:!0,kind:"danger",onClick:n,children:o("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:o("leave.body")})})}s(rs,"LeaveDialog");function ss(e,t){let[n,o]=j(!1),[a,i]=j(null),r=e===null?void 0:e.skipCapture,l=ae(r);l.current=r;let u=ae(!1),p=e?.key;Ze(()=>i(null),[p]);let m=oe(()=>{if(u.current)return;let h=l.current;h!==void 0&&(u.current=!0,o(!0),i(null),h().catch(v=>i(t.t(Se(v,t.strings)))).finally(()=>{u.current=!1,o(!1)}))},[t]),g=oe(()=>i(null),[]),b=r!==void 0,d=t.t("sandbox.skipCapture");return qt(()=>b?{label:d,busy:n,failed:a,run:m,reset:g}:null,[b,d,n,a,m,g])}s(ss,"useSkipCapture");function is({skip:e}){return J(qe,{children:[e.failed!==null?c(A,{tone:"danger",children:c("span",{children:e.failed})}):null,c(P,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}s(is,"SkipAction");function as(e){let{step:t,error:n,slots:o,immersive:a}=e,i=I(),{t:r}=i,[l,u]=j(!1),[p,m]=j([]),g=oe(f=>(m(L=>[...L,f]),()=>m(L=>L.filter(z=>z!==f))),[]),[b,d]=j(null),h=oe(f=>d(()=>f),[]),[v,E]=j(0),[T,x]=j(null),R=ss(t,i),B=t?.context.testerGate!==void 0,[_,C]=j(!1),k=ae(null);Ze(()=>{!B||k.current!==null||(k.current=ko(),k.current&&C(!0))},[B]);let M=t?.context.purpose??"identity",$=t?.context.returning===!0,be=e.verification,Le=M==="human"||t?.context.cameraUnavailableHandled===!0,Oe=be.reportCameraUnavailable!==void 0&&Le?f=>be.reportCameraUnavailable?.(f)??Promise.resolve():void 0,ve=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,Y=e.handoffUrl,fe=oe((f,L)=>Oe===void 0?void 0:c(F,{view:"NoCameraView",i18n:i,quiet:!0,cause:L,onRetry:f,...ve?{onContinue:Oe}:{},...Y!==void 0?{handoffUrl:Y}:{}}),[i,be,Le,ve,Y]),Me=qt(()=>Rn(t),[t]),le=oe((f,L)=>c(Ln,{start:f,context:L,human:M==="human",returning:$,notice:L.permissionSettled&&L.permission==="denied"?fe(f,"denied"):void 0,...Me!==void 0?{retry:Me}:{}}),[M,$,fe,Me]),me=oe((f,L)=>{let z=Xr(f.kind);return(z!==void 0?fe(L,z):void 0)??J(qe,{children:[c(os,{error:f,retry:L}),z!==void 0&&Y!==void 0?c(F,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:Y}):null]})},[fe,Y,i]),Ae=ae(""),De=e.livenessProps?.slots?.stageOverlay,Je=oe(f=>(f.guidance!==""&&!f.coached&&(Ae.current=f.guidance),c(Mn,{testId:"sekyro-capture-stage",video:c("video",{ref:f.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:f.settled?r("capture.checkingTitle"):f.guidance!==""?f.guidance:Ae.current,note:f.note,status:f.status,busy:f.settled,progress:f.phase==="seeking"||f.phase==="aligning"?f.progress:1,still:f.still,live:f.live,closeLabel:r("native.close"),overlay:De?.(f.videoRef),ramp:f.ramp?.colour??null,...f.settled?{}:{onClose:s(()=>E(L=>L+1),"onClose")},end:f.modeSwitch!=null?c(dn,{view:f.modeSwitch,className:"sekyro-glass sekyro-glass--label"}):null,children:f.settled||!f.live?null:c(wn,{onStop:()=>E(L=>L+1)})})),[r,De]),ft=es(),re=t,Be=t!==null&&T===t.key&&t.context.switchable!==void 0,ye=b??(t===null||t.kind==="result"?null:Be?()=>x(null):t.context.switchable!==void 0&&typeof re?.chooseOption=="function"?()=>x(t.key):null),Fe=ae(ye);Fe.current=ye;let q=ae(t);q.current=t;let se=ae({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});se.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let ce=e.backNavigation==="history";if(Ze(()=>{if(!ce||typeof window>"u")return;Yt();let f=s(()=>{if(Co())return;let L=q.current,z=Fe.current;z!==null?(z(),Yt()):L?.kind!=="result"&&L?.context.consentRecorded===!0?se.current.ask():se.current.hostClose?se.current.closed():No()},"onPop");return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[ce]),n!==null)return c(St,{tone:"danger",children:c("span",{children:r(Se(n,i.strings))})});if(t===null)return J("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:r("common.loading")}),c("span",{className:"sekyro-skeleton__bar is-title"}),c("span",{className:"sekyro-skeleton__bar"}),c("span",{className:"sekyro-skeleton__bar is-short"}),c("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:D}=t,Q=s(f=>{u(!0),f().finally(()=>u(!1))},"refresh"),Qe=o?.header??c(us,{context:D,headerId:ft,end:o?.headerEnd,...ye!==null?{onBack:ye}:{}}),w,ge=Be;if(_&&e.verification.testerGate!==void 0)w=c(kt.Provider,{value:Je,children:c(F,{view:"TesterGateView",i18n:i,verification:e.verification,attemptsLeft:D.testerGate?.attemptsLeft??0,livenessProps:{...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:e.livenessProps?.slots?.intro??le},locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice},onBound:()=>ho(),onDone:f=>{f&&So(),C(!1)}})});else if(ge)w=c(F,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>x(null)});else switch(t.kind){case"phone_otp":w=c(Et,{step:t});break;case"email_otp":w=c(Tt,{step:t});break;case"method":w=c(Lt,{step:t});break;case"registry":w=c(at,{step:t});break;case"document":w=c(Bt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let f=e.livenessProps?.slots?.intro,L={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:f??le,...f===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:me}:{}},...v>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};w=c(kt.Provider,{value:Je,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(F,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:L,sekyroIntro:f===void 0},v):c(yn,{...L},v)});break}case"portrait":w=J(qe,{children:[t.retakeOnly?c(F,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,c(Ft,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":w=c(F,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":w=c(F,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":w=c(F,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":{let f=t.checkType==="doc_ocr"?r("handoff.lead.document"):t.checkType==="portrait_icao"?r("handoff.lead.portrait"):void 0;w=e.handoffUrl!==void 0?c(F,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh,...f!==void 0?{lead:f}:{}}):c(rt,{tone:"brand",icon:"smartphone",title:r("handoff.title"),actions:c(P,{kind:"secondary",full:!0,disabled:l,onClick:()=>Q(t.refresh),children:r("common.refresh")}),children:c("p",{children:f??r("reasons.mobile_required")})});break}case"processing":{let f=ns(i.strings,t.service);w=c(rt,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:f?.title??r("session.processing.title"),actions:t.stalled?c(P,{kind:"secondary",full:!0,disabled:l,onClick:()=>Q(t.refresh),children:r("common.refresh")}):null,children:c("p",{children:f?.description??r("session.processing.description")})});break}case"eid":w=c(It,{step:t});break;case"unsupported":{let f=t.reason==="platform_unsupported";w=c(rt,{tone:"neutral",icon:"smartphone",title:r(f?"needsApp.title":"unsupported.title"),actions:c(ls,{org:D.orgName}),children:c("p",{children:f?D.orgName!==""?r("needsApp.description",{org:D.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:D.orgName})})});break}case"result":w=o?.result?.(t)??c(cs,{step:t});break;default:{let f=t;w=null}}let he=!a&&!D.consentRecorded&&t.kind!=="result"?c(uo,{i18n:i,purpose:D.purpose}):null,ue=R!==null&&!a&&!ge&&!_?c(is,{skip:R}):null,ke=B&&!_&&!a&&!ge&&e.verification.testerGate!==void 0?c(F,{view:"TesterGateAction",i18n:i,quiet:!0,onOpen:()=>C(!0)}):null,Ce=ue===null&&ke===null?he:J(qe,{children:[ke,ue,he]});return c(Cn.Provider,{value:h,children:c(nt.Provider,{value:R,children:c(On.Provider,{value:e.handoffUrl,children:J(vn.Provider,{value:Ce===null?null:{node:Ce,owner:p[0]??null,claim:g},children:[a?null:Qe,!a&&t.kind!=="result"&&D.sections.length>1?c(ds,{context:D,current:t.section,i18n:i}):null,c(_n,{pageKey:t.key,children:w}),!a&&!ge&&t.kind!=="result"&&t.context.switchable!==void 0?c(F,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>x(t.key),quiet:!0},t.key):null,p.length===0?Ce:null,a?null:o?.footer!==void 0?o.footer:D.branding?.hideAttribution===!0?null:J("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c(G,{name:"lock"}),r("shell.verifiedBy")]})]})})})})}s(as,"Body");function ls({org:e}){let{t}=I(),n=jr(vt);return n===void 0?null:c(P,{full:!0,onClick:n,children:e!==""?t("native.result.back",{org:e}):t("native.close")})}s(ls,"BackToOrg");function cs({step:e}){return c(tt.Consumer,{children:t=>c(zt,{step:e,...t!==void 0?{onClose:t}:{}})})}s(cs,"ResultPage");function us({context:e,headerId:t,end:n,onBack:o}){let{t:a}=I(),[i,r]=j(!1),l=i?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:J("div",{className:"sekyro-org",children:[o!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:o,"data-testid":"sekyro-back",children:c(G,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?c("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>r(!0)}):po(e.orgName)}),J("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),e.sandbox?c("span",{className:"sekyro-sandbox-badge","data-testid":"sekyro-sandbox-badge",children:a("app.sandboxBadge")}):null,n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(tt.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:p,children:c(G,{name:"close"})}):null})]})})}s(us,"OrgHeader");function ds({context:e,current:t,i18n:n}){let o=t===null?-1:e.sections.indexOf(t),a=e.progress,i=a!==void 0&&a.length===e.sections.length?a:e.sections.map((r,l)=>({id:r,state:l<o?"done":l===o?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:i.map(({id:r,state:l})=>c("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${r}`]??r})},r))})}s(ds,"SectionProgress");import{useEffect as ps,useState as wo}from"react";import{jsx as Re}from"react/jsx-runtime";function fs(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(fs,"pageUrl");function ms({hostedUrl:e,inAppBrowser:t,...n}){let[o,a]=wo(t===!0);ps(()=>{t===void 0&&Ct()&&a(!0)},[t]);let[i,r]=wo(!1),l=pt(n.colorScheme??"light"),u=n.handoffUrl??e??fs();return o&&!i?Re(hn,{theme:je(dt(void 0,void 0,l),n.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:Re(Ge,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:Re("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:Re(ys,{url:u,onContinue:()=>r(!0)})})})}):Re(Zt,{...n,...u!==""?{handoffUrl:u}:{}})}s(ms,"SekyroFlow");function ys({url:e,onContinue:t}){let n=I();return Re(F,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}s(ys,"Prompt");export{Bt as DocumentCapture,It as EidStep,Tt as EmailOtpStep,at as IdNumberEntry,Lt as MethodChoice,pr as NniEntry,Et as PhoneOtpStep,Ft as PortraitCapture,ms as SekyroFlow,Zt as SekyroVerification,Ge as StepI18nProvider,zt as VerificationResultScreen,Io as arSteps,Ro as enSteps,Oo as formatTemplate,Lo as frSteps,Ct as isInAppBrowser,Eo as loadSekyroLocale,Mo as resolveSekyroStrings,To as retakeHintStringKey,I as useStepI18n,Nt as useVerificationStep};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/react",
3
- "version": "0.1.0-rc.20",
3
+ "version": "0.1.0-rc.21",
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": {
@@ -75,7 +75,7 @@
75
75
  "strings:steps": "node scripts/gen-step-strings.mjs"
76
76
  },
77
77
  "peerDependencies": {
78
- "@sekyro/web": "^0.1.0-rc.23 || ^0.2.0-rc.0",
78
+ "@sekyro/web": "^0.1.0-rc.25 || ^0.2.0-rc.0",
79
79
  "react": ">=18.2",
80
80
  "react-dom": ">=18.2"
81
81
  },
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.20",
101
- "bom-ref": "@sekyro/react@0.1.0-rc.20",
100
+ "version": "0.1.0-rc.21",
101
+ "bom-ref": "@sekyro/react@0.1.0-rc.21",
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.20?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
111
+ "purl": "pkg:npm/%40sekyro/react@0.1.0-rc.21?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.20"
150
+ "ref": "@sekyro/react@0.1.0-rc.21"
151
151
  }
152
152
  ]
153
153
  }
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{a,b,c,d,e}from"./chunk-FQDXB2B2.js";import"./chunk-WL77LOB3.js";import"./chunk-HRNF3WQA.js";import"./chunk-RKO3RGGA.js";import"./chunk-RO2EITOC.js";import"./chunk-6QYD5HOU.js";import"./chunk-2KED7D2Q.js";export{d as PortraitReviewView,e as PortraitScreens,b as PortraitSourceView,c as PortraitUploadView,a as portraitCopy};
File without changes