@sekyro/react 0.1.0-rc.34 → 0.1.0-rc.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/{chunk-I2RFCMMS.js → chunk-2TEU3U7V.js} +1 -1
- package/dist/{chunk-LUSKU2HP.js → chunk-3GSNJJCA.js} +1 -1
- package/dist/{chunk-G3BC56US.js → chunk-6JKZ5S2U.js} +1 -1
- package/dist/{chunk-2XILMIVI.js → chunk-BMD5J7TC.js} +1 -1
- package/dist/chunk-ERWGG4X6.js +2 -0
- package/dist/{chunk-I5THJGNE.js → chunk-FT5BC4W5.js} +1 -1
- package/dist/{chunk-4SO473VD.js → chunk-HICSMGFX.js} +1 -1
- package/dist/{chunk-ACO37UHL.js → chunk-KB7SLMC3.js} +1 -1
- package/dist/{chunk-RVY5IHV4.js → chunk-NEUOVHVC.js} +1 -1
- package/dist/{chunk-DBQXVMWD.js → chunk-ODSPOWMV.js} +1 -1
- package/dist/{chunk-ZBABRSO2.js → chunk-P7TS7JPW.js} +1 -1
- package/dist/{chunk-X37A2AZL.js → chunk-PEQBKIR7.js} +1 -1
- package/dist/{chunk-G6HP3HNE.js → chunk-ZXY2YUAP.js} +1 -1
- package/dist/document-capture-view-7ZSM7YTT.js +2 -0
- package/dist/{eid-view-PWROMDEV.js → eid-view-ZM7QAEME.js} +1 -1
- package/dist/{email-otp-view-Q334LLOM.js → email-otp-view-EYS26ZZM.js} +1 -1
- package/dist/{flow-views-I3YI3NWV.js → flow-views-7SAYQQ62.js} +1 -1
- package/dist/{form-view-XPOGTYL6.js → form-view-Y5KA6R5T.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/overlay-de-4OISTBDL.js +2 -0
- package/dist/overlay-es-YO5UCAO2.js +2 -0
- package/dist/overlay-pt-E7PSFLLQ.js +2 -0
- package/dist/{portrait-capture-view-G4BE6IVC.js → portrait-capture-view-E5LKQQ5Y.js} +1 -1
- package/dist/portrait-review-view-NJHH2E4W.js +2 -0
- package/dist/{proof-of-address-view-CFVHB2XR.js → proof-of-address-view-LS3JZUTD.js} +1 -1
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +9 -0
- package/dist/verification/index.d.ts +9 -0
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +9 -1
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-AKUQWUZO.js +0 -2
- package/dist/document-capture-view-FSMO25KF.js +0 -2
- package/dist/overlay-de-VMGXTY3V.js +0 -2
- package/dist/overlay-es-45YNJBVM.js +0 -2
- package/dist/overlay-pt-EU4FBZ2U.js +0 -2
- package/dist/portrait-review-view-WGI5PXWF.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as We}from"./chunk-KB7SLMC3.js";import{d as Xe}from"./chunk-ODSPOWMV.js";import"./chunk-6JKZ5S2U.js";import{a as Ue,b as Ke,c as Ae}from"./chunk-7MMT5M4E.js";import{d as Be}from"./chunk-ERWGG4X6.js";import{a as A,b as he,d as fe,j as Ve,k as Ye,l as Ge,n as Fe,p as ye,q as ve}from"./chunk-PEQBKIR7.js";import"./chunk-BMD5J7TC.js";import{a as K,m as Re,o as Ee}from"./chunk-P7TS7JPW.js";import{a as s}from"./chunk-2KED7D2Q.js";import{acceptedTypesFor as _t}from"@sekyro/web";import{useContext as ot,useEffect as B,useLayoutEffect as Ct,useRef as L,useState as k}from"react";var je={image:'<path d="M2 12C2 7.29 2 4.93 3.46 3.46C4.93 2 7.29 2 12 2C16.71 2 19.07 2 20.54 3.46C22 4.93 22 7.29 22 12C22 16.71 22 19.07 20.54 20.54C19.07 22 16.71 22 12 22C7.29 22 4.93 22 3.46 20.54C2 19.07 2 16.71 2 12Z" stroke="currentColor"/><path d="M14 8A2 2 0 1 0 18 8A2 2 0 1 0 14 8Z" stroke="currentColor"/><path d="M2 12.5L3.75 10.97C4.66 10.17 6.04 10.22 6.89 11.07L11.18 15.36C11.87 16.05 12.95 16.14 13.75 15.58L14.04 15.37C15.19 14.57 16.74 14.66 17.78 15.6L21 18.5" stroke="currentColor" stroke-linecap="round"/>',flashlight:'<path d="M9 11.66V19C9 19.93 9 20.4 9.15 20.77C9.36 21.26 9.74 21.64 10.23 21.85C10.6 22 11.07 22 12 22C12.93 22 13.4 22 13.77 21.85C14.26 21.64 14.64 21.26 14.85 20.77C15 20.4 15 19.93 15 19V11.66C15 10.84 15 10.43 15.15 10.06C15.3 9.7 15.59 9.41 16.17 8.83L16.17 8.83L19.41 5.59C19.7 5.3 19.85 5.15 19.92 4.97C20 4.78 20 4.58 20 4.17V4C20 3.06 20 2.59 19.71 2.29C19.41 2 18.94 2 18 2H6C5.06 2 4.59 2 4.29 2.29C4 2.59 4 3.06 4 4V4.17C4 4.58 4 4.78 4.08 4.97C4.15 5.15 4.3 5.3 4.59 5.59L7.83 8.83C8.41 9.41 8.7 9.7 8.85 10.06C9 10.43 9 10.84 9 11.66Z" stroke="currentColor" stroke-linecap="round"/><path d="M15 10H9" stroke="currentColor" stroke-linecap="round"/><path d="M12 13V15" stroke="currentColor" stroke-linecap="round"/><path d="M4.5 5H19.5" stroke="currentColor" stroke-linecap="round"/>'};var Qe={"dcv3.mrz.searching":"ضع صفحة جواز السفر كاملة داخل الإطار","dcv3.mrz.showMrzSide":"اعرض الوجه الذي يحتوي على سطرين أو ثلاثة أسطر من الحروف","dcv3.mrz.reading":"جارٍ قراءة الوثيقة… ثبّتها","dcv3.mrz.moveCloser":"اقترب حتى تملأ أسطر الحروف الإطار","dcv3.mrz.turnSideways":"أدر هاتفك أفقيًا لقراءة أسطر الحروف","dcv3.mrz.glare":"أمِل الوثيقة لإزالة الانعكاس","dcv3.mrz.holdStill":"لا تتحرك","dcv3.mrz.valid":"تمت قراءة الوثيقة. جارٍ التقاط الصورة","dcv3.mrz.looksLikePassport":"يبدو أن هذا جواز سفر","dcv3.mrz.looksLikeCard":"يبدو أن هذه بطاقة تعريف أو بطاقة إقامة"};var Q={"dcv3.mrz.searching":"Fit the whole passport page in the frame","dcv3.mrz.showMrzSide":"Show the side with the two or three lines of characters","dcv3.mrz.reading":"Reading the document… hold it steady","dcv3.mrz.moveCloser":"Move closer so the lines of characters fill the frame","dcv3.mrz.turnSideways":"Turn your phone sideways to read the lines of characters","dcv3.mrz.glare":"Tilt the document to remove the reflection","dcv3.mrz.holdStill":"Hold still","dcv3.mrz.valid":"Document read. Taking the photo","dcv3.mrz.looksLikePassport":"This looks like a passport","dcv3.mrz.looksLikeCard":"This looks like an identity card or residence permit"};var Ze={"dcv3.mrz.searching":"Cadrez toute la page du passeport","dcv3.mrz.showMrzSide":"Montrez la face avec les deux ou trois lignes de caractères","dcv3.mrz.reading":"Lecture du document… tenez-le immobile","dcv3.mrz.moveCloser":"Rapprochez-vous pour que les lignes de caractères remplissent le cadre","dcv3.mrz.turnSideways":"Tournez votre téléphone à l’horizontale pour lire les lignes de caractères","dcv3.mrz.glare":"Inclinez le document pour supprimer le reflet","dcv3.mrz.holdStill":"Ne bougez plus","dcv3.mrz.valid":"Document lu. Prise de la photo","dcv3.mrz.looksLikePassport":"Ceci ressemble à un passeport","dcv3.mrz.looksLikeCard":"Ceci ressemble à une carte d’identité ou un titre de séjour"};var Je={"doc.uploadInstead":"رفع صورة بدلًا من ذلك","doc.uploadTitle":"ارفع صورة لوثيقتك","doc.uploadHint":"صورة واضحة للوثيقة كاملة، ملتقطة بكاميرا.","doc.uploadUnsupported":"اختر صورة للوثيقة بصيغة JPEG أو PNG أو HEIC.","doc.uploadFailed":"تعذّر إرسال هذه الصورة. أعد المحاولة.","doc.source.title":"كيف تريد إضافة وثيقتك؟","doc.source.description":"التقط صورة بالكاميرا، أو ارفع صورة للوثيقة من هذا الجهاز.","doc.source.camera":"التقاط صورة","doc.source.upload":"رفع صورة"};var Z={"doc.uploadInstead":"Upload a photo instead","doc.uploadTitle":"Upload a photo of your document","doc.uploadHint":"A clear photo of the whole document, taken with a camera.","doc.uploadUnsupported":"Choose a JPEG, PNG or HEIC photo of the document.","doc.uploadFailed":"We could not send this photo. Try again.","doc.source.title":"How do you want to add your document?","doc.source.description":"Take a photo with the camera, or upload a photo of the document from this device.","doc.source.camera":"Take a photo","doc.source.upload":"Upload a photo"};var qe={"doc.uploadInstead":"Téléverser une photo à la place","doc.uploadTitle":"Téléversez une photo de votre document","doc.uploadHint":"Une photo nette du document entier, prise avec un appareil photo.","doc.uploadUnsupported":"Choisissez une photo JPEG, PNG ou HEIC du document.","doc.uploadFailed":"Nous n'avons pas pu envoyer cette photo. Réessayez.","doc.source.title":"Comment voulez-vous ajouter votre document ?","doc.source.description":"Prenez une photo avec la caméra, ou importez une photo du document depuis cet appareil.","doc.source.camera":"Prendre une photo","doc.source.upload":"Importer une photo"};var et={"native.doc.introTitle":"سنلتقط صورة لوثيقتك","native.doc.introLead":"تُلتقط الصورة تلقائيًا عندما تكون الوثيقة داخل الإطار.","native.doc.tip.flat":"ضع الوثيقة مسطحة على سطح داكن.","native.doc.tip.glare":"تجنّب انعكاسات الضوء.","native.doc.tip.frame":"أبقِ الوثيقة كاملة داخل الإطار.","native.doc.openCamera":"افتح الكاميرا","native.doc.changeDocument":"تغيير الوثيقة","native.doc.titleOf.carte_identite":"صوّر بطاقة هويتك","native.doc.titleOf.passport":"صوّر جواز سفرك","native.doc.titleOf.residence_permit":"صوّر بطاقة إقامتك","native.doc.titleOf.drivers_license":"صوّر رخصة قيادتك","native.doc.onlyType.carte_identite":"{country}: تُقبل بطاقة الهوية فقط هنا.","native.doc.onlyType.passport":"{country}: يُقبل جواز السفر فقط هنا.","native.doc.onlyType.residence_permit":"{country}: تُقبل بطاقة الإقامة فقط هنا.","native.doc.onlyType.drivers_license":"{country}: تُقبل رخصة القيادة فقط هنا.","native.scan.closer":"اقترب قليلًا","native.scan.farther":"ابتعد قليلًا","native.scan.glare":"أمِل البطاقة قليلًا","native.scan.dark":"الإضاءة ضعيفة. شغّل المصباح.","native.scan.blurry":"الصورة غير واضحة. ثبّت الهاتف.","native.scan.holdStill":"لا تتحرك","native.scan.reading":"جارٍ التحقق من وثيقتك…","native.scan.putDown":"يمكنك وضع وثيقتك جانبًا.","native.scan.retry":"لنحاول مرة أخرى","native.scan.seenPassport":"يبدو أن هذا جواز سفر","native.scan.seenCard":"يبدو أن هذه بطاقة هوية أو بطاقة إقامة","native.scan.showInstead.carte_identite":"أظهر بطاقة هويتك بدلًا منها","native.scan.showInstead.passport":"أظهر صفحة الصورة في جواز سفرك بدلًا منها","native.scan.showInstead.residence_permit":"أظهر بطاقة إقامتك بدلًا منها","native.scan.showInstead.drivers_license":"أظهر رخصة قيادتك بدلًا منها"};var J={"native.doc.introTitle":"Photograph your document","native.doc.introLead":"The photo is taken by itself once the document is in the frame.","native.doc.tip.flat":"Lay it flat on a dark surface.","native.doc.tip.glare":"Avoid glare from lights.","native.doc.tip.frame":"Keep all of it in the frame.","native.doc.openCamera":"Open the camera","native.doc.changeDocument":"Change document","native.doc.titleOf.carte_identite":"Photograph your identity card","native.doc.titleOf.passport":"Photograph your passport","native.doc.titleOf.residence_permit":"Photograph your residence permit","native.doc.titleOf.drivers_license":"Photograph your driver's license","native.doc.onlyType.carte_identite":"{country}: only an identity card is accepted here.","native.doc.onlyType.passport":"{country}: only a passport is accepted here.","native.doc.onlyType.residence_permit":"{country}: only a residence permit is accepted here.","native.doc.onlyType.drivers_license":"{country}: only a driver's license is accepted here.","native.scan.closer":"Move a little closer","native.scan.farther":"Move back a little","native.scan.glare":"Tilt the card a little","native.scan.dark":"Too dark. Turn on the light.","native.scan.blurry":"Blurry image. Hold the phone still.","native.scan.holdStill":"Hold still","native.scan.reading":"Checking your document…","native.scan.putDown":"You can put your document down.","native.scan.retry":"Let's try that again","native.scan.seenPassport":"This looks like a passport","native.scan.seenCard":"This looks like an identity card or residence permit","native.scan.showInstead.carte_identite":"Show your identity card instead","native.scan.showInstead.passport":"Show the photo page of your passport instead","native.scan.showInstead.residence_permit":"Show your residence permit instead","native.scan.showInstead.drivers_license":"Show your driver's license instead"};var tt={"native.doc.introTitle":"Photographiez votre pièce","native.doc.introLead":"La photo se prend toute seule quand la pièce est bien cadrée.","native.doc.tip.flat":"Posez la pièce à plat sur fond sombre.","native.doc.tip.glare":"Évitez les reflets de lumière.","native.doc.tip.frame":"Gardez toute la pièce dans le cadre.","native.doc.openCamera":"Ouvrir la caméra","native.doc.changeDocument":"Changer de document","native.doc.titleOf.carte_identite":"Photographiez votre carte d'identité","native.doc.titleOf.passport":"Photographiez votre passeport","native.doc.titleOf.residence_permit":"Photographiez votre titre de séjour","native.doc.titleOf.drivers_license":"Photographiez votre permis de conduire","native.doc.onlyType.carte_identite":"{country} : seule la carte d'identité est acceptée ici.","native.doc.onlyType.passport":"{country} : seul le passeport est accepté ici.","native.doc.onlyType.residence_permit":"{country} : seul le titre de séjour est accepté ici.","native.doc.onlyType.drivers_license":"{country} : seul le permis de conduire est accepté ici.","native.scan.closer":"Approchez un peu","native.scan.farther":"Reculez un peu","native.scan.glare":"Inclinez un peu la carte","native.scan.dark":"Trop sombre. Allumez la lampe.","native.scan.blurry":"Image floue. Tenez le téléphone immobile.","native.scan.holdStill":"Ne bougez plus","native.scan.reading":"Vérification de votre document…","native.scan.putDown":"Vous pouvez poser votre pièce.","native.scan.retry":"Réessayons","native.scan.seenPassport":"Ceci ressemble à un passeport","native.scan.seenCard":"Ceci ressemble à une carte d'identité ou un titre de séjour","native.scan.showInstead.carte_identite":"Montrez plutôt votre carte d'identité","native.scan.showInstead.passport":"Montrez plutôt la page photo de votre passeport","native.scan.showInstead.residence_permit":"Montrez plutôt votre titre de séjour","native.scan.showInstead.drivers_license":"Montrez plutôt votre permis de conduire"};var ge=class ge{constructor(){this.shown=null;this.shownAt=0;this.yielded=null}present(t,o,r,a){(t===null||t.key!==this.yielded)&&(this.yielded=null);let l=this.shown;return t!==null&&this.yielded===null?l?.kind==="problem"&&l.key===t.key&&l.action===t.action?!t.blocking&&o!==null&&a-this.shownAt>=3e3?(this.yielded=t.key,this.show({kind:"hint",key:o,action:null},a)):l:this.show({kind:"problem",key:t.key,action:t.action},a):l?.kind==="problem"&&t===null&&(r||a-this.shownAt<3e3)?l:o===null?this.show(null,a):l?.kind==="hint"&&l.key===o?l:this.show({kind:"hint",key:o,action:null},a)}show(t,o){return this.shown=t,this.shownAt=o,t}};s(ge,"NoticeBand");var re=ge;var bt=["locking","capturing"],Se=class Se{constructor(){this.shown={hint:null,locking:!1,card:null,manualShutter:!1};this.candidate=null;this.candidateSince=0;this.hintShownAt=0;this.lockLostAt=null;this.detectedSince=null;this.lostSince=null;this.shutterSince=null}present(t,o){return this.presentHint(t,o),this.presentLock(t,o),this.presentCard(t,o),this.shutterSince=t.manualShutter?this.shutterSince??o:null,this.shown={...this.shown,manualShutter:this.shutterSince!==null&&o-this.shutterSince>=1e3},this.shown}presentHint(t,o){let r=t.phase==="framing"&&!(t.hint==="blurry"&&t.card===null)?t.hint:null;if(t.phase!=="framing"){this.shown={...this.shown,hint:null},this.candidate=null;return}if(r!==this.candidate&&(this.candidate=r,this.candidateSince=o),r===this.shown.hint)return;let a=o-this.candidateSince>=(r===null?0:350),l=this.shown.hint===null||o-this.hintShownAt>=2500;a&&l&&(this.shown={...this.shown,hint:r},this.hintShownAt=o)}presentLock(t,o){if(bt.includes(t.phase)){this.shown={...this.shown,locking:!0},this.lockLostAt=null;return}if(this.shown.locking){if(t.phase!=="framing"){this.shown={...this.shown,locking:!1},this.lockLostAt=null;return}this.lockLostAt??(this.lockLostAt=o),o-this.lockLostAt>=300&&(this.shown={...this.shown,locking:!1},this.lockLostAt=null)}}presentCard(t,o){let r=t.card;if(r===null||t.phase!=="framing"){if(t.phase!=="framing"){this.shown={...this.shown,card:null},this.detectedSince=null,this.lostSince=null;return}this.detectedSince=null,this.lostSince??(this.lostSince=o),o-this.lostSince>=300&&(this.shown={...this.shown,card:null});return}if(this.lostSince=null,this.detectedSince??(this.detectedSince=o),o-this.detectedSince<250)return;let a=this.shown.card;if(a===null){this.shown={...this.shown,card:{...r}};return}let l=.35;this.shown={...this.shown,card:{fill:a.fill+(r.fill-a.fill)*l,offsetX:a.offsetX+(r.offsetX-a.offsetX)*l,offsetY:a.offsetY+(r.offsetY-a.offsetY)*l}}}};s(Se,"ScanPresenter");var ae=Se;import{Fragment as we,jsx as n,jsxs as d}from"react/jsx-runtime";var zt={en:J,fr:tt,ar:et,es:J,pt:J,de:J},Nt=450,be=s(e=>(t,o)=>Be(e.strings[t]??zt[e.locale][t]??"",o),"useScanCopy");function Dt(e,t){try{return new Intl.DisplayNames([t],{type:"region"}).of(e)??e}catch{return e}}s(Dt,"regionName");function xt(e){let t=e.documentType,o=t===null?"native.doc.introTitle":`native.doc.titleOf.${t}`,r=t!==null&&e.issuer!==null&&_t(e.documents,e.issuer).length===1;return{titleKey:o,onlyKey:r?`native.doc.onlyType.${t}`:null}}s(xt,"introCopy");function se({name:e}){return n("svg",{className:"sekyro-glyph",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:je[e]}})}s(se,"ScanGlyph");var Tt={en:Q,fr:Ze,ar:Qe,es:Q,pt:Q,de:Q},Lt={en:Z,fr:qe,ar:Je,es:Z,pt:Z,de:Z},Mt="image/jpeg,image/png,image/heic,image/heif";function G(e){let t=e.strings,o=s(r=>t[r]??Lt[e.locale][r],"text");return{t:s(r=>o(r)??"","t")}}s(G,"uploadCopy");function Pt(e,t){return e===null||e.state==="fallback"||e.state==="mismatch"?null:e.state==="searching"?t?"dcv3.mrz.searching":"dcv3.mrz.showMrzSide":e.state==="valid"?"dcv3.mrz.valid":e.coach==="holdStill"?"dcv3.mrz.holdStill":"dcv3.mrz.reading"}s(Pt,"mrzInstruction");function It(e){return e?.state==="reading"&&e.coach!==void 0&&e.coach!=="holdStill"?`mrz:${e.coach}`:null}s(It,"mrzHint");function $t(e){return e==="carte_identite"||e==="passport"||e==="residence_permit"||e==="drivers_license"?`native.scan.showInstead.${e}`:null}s($t,"showInsteadKey");var Ht={document_type_mismatch:"doc.reason_document_type_mismatch",document_number_invalid:"doc.reason_document_number_invalid",provider_unavailable:"doc.reason_provider_unavailable",document_type_not_supported:"doc.reason_document_type_not_supported",document_sides_mismatch:"doc.reason_document_sides_mismatch"};function _e(e){if(e.reason==="unreadable")return"doc.reason_unreadable";let t=e.reason!==void 0?Ht[e.reason]:void 0;return t!==void 0?t:e.reason==="tester_document_mismatch"?"reasons.tester_document_mismatch":e.reason!==void 0&&e.reason!=="side_missing"?Ee(e.reason):null}s(_e,"reasonOf");var rt=new Set(["document_type_not_accepted","tester_document_mismatch","document_type_mismatch","provider_unavailable","document_type_not_supported","document_sides_mismatch"]);function $n({step:e,i18n:t,liveMrz:o,barcodeAssetBaseUrl:r,ageLead:a,...l}){let[S,h]=k(!1),f=L(-1),[y,g]=k("idle"),w=L(null),C=typeof e.uploadDocument=="function",z=C?e.photo?.source??"camera":"camera",M=C&&z!=="camera"&&e.photo?.uploadOffered===!0,[b,V]=k(null),H=z==="upload"?"upload":z==="choice"?b??e.photo?.pick??"source":"camera",O=y==="sending"?void 0:()=>w.current?.click(),v=s(async R=>{let ee=R.currentTarget.files?.[0];if(R.currentTarget.value="",ee!==void 0){h(!1),g("sending");try{await e.uploadDocument(ee),g("idle")}catch(X){g(X instanceof TypeError&&X.message==="unsupported_file"?"unsupported":"failed")}}},"onFile"),q=M?n("input",{ref:w,type:"file",accept:Mt,hidden:!0,"data-testid":"sekyro-doc-upload","aria-label":G(t).t("doc.uploadTitle"),onChange:R=>{v(R)}}):null,D=G(t),F=e.photo?.cameraOnPhone===!0;return H==="camera"&&F?n(Xe,{i18n:t,lead:t.t("handoff.lead.document"),refresh:e.refresh,actions:n(K,{kind:"ghost",full:!0,onClick:()=>V("upload"),children:D.t("doc.source.upload")})}):H==="source"?n(We,{testId:"sekyro-doc-source",title:D.t("doc.source.title"),lead:D.t("doc.source.description"),cameraLabel:F?t.t("capture.source.phone"):D.t("doc.source.camera"),onPhone:F,uploadLabel:D.t("doc.source.upload"),notice:n(Ce,{step:e,i18n:t}),onCamera:()=>V("camera"),onUpload:()=>V("upload")}):H==="upload"?d(we,{children:[n(Et,{step:e,i18n:t,ageLead:a===!0,upload:y,offered:M,onPick:()=>w.current?.click(),...z==="choice"?{onCamera:s(()=>V("camera"),"onCamera")}:{},...l}),q]}):d(we,{children:[S?n(At,{step:e,i18n:t,attempts:f,...o!==void 0?{liveMrz:o}:{},...r!==void 0?{barcodeAssetBaseUrl:r}:{},...M&&O!==void 0?{onUpload:O}:{},onClose:()=>h(!1)}):n(Rt,{step:e,i18n:t,ageLead:a===!0,onOpen:()=>h(!0),upload:y,...M&&O!==void 0?{onUpload:O}:{},...l}),q]})}s($n,"DocumentCaptureView");function at({passport:e}){let o=Math.round(228/(e?1.42:1.586));return d("svg",{className:`sekyro-mark sekyro-mark--card${e?" sekyro-mark--passport":""}`,viewBox:`-12 ${e?-22:-12} 252 ${o+(e?34:24)}`,"aria-hidden":"true",focusable:"false",children:[n("defs",{children:n("clipPath",{id:"sekyro-card-clip",children:n("rect",{width:228,height:o,rx:"12.5"})})}),e?n("rect",{className:"sekyro-mark__page",x:"10",y:"-14",width:208,height:o,rx:"10"}):null,n("rect",{className:"sekyro-mark__card",width:228,height:o,rx:"12.5"}),n("rect",{className:"sekyro-mark__photo",x:"17",y:"17",width:"55",height:o*(e?.5:.62),rx:"6"}),[0,1,2].map(r=>n("rect",{className:"sekyro-mark__text",x:"88",y:23+r*o*.12,width:100-r*20,height:"6",rx:"3"},r)),e?[0,1].map(r=>n("line",{className:"sekyro-mark__code",x1:"17",x2:211,y1:o*.75+r*11,y2:o*.75+r*11},r)):n("rect",{className:"sekyro-mark__text",x:"88",y:23+3*o*.12,width:"60",height:"6",rx:"3"}),n("g",{clipPath:"url(#sekyro-card-clip)",children:n("g",{className:"sekyro-mark__read",style:{"--sekyro-read-w":"228px"},children:n("rect",{x:"-1",width:"2",height:o,className:"sekyro-mark__beam"})})}),n("path",{className:"sekyro-mark__brackets",d:Ot(-10,-10,248,o+20,16,30)})]})}s(at,"ScanMark");function Ot(e,t,o,r,a,l){let S=Math.min(a,l*.6);return[[e,t,1,1],[e+o,t,-1,1],[e,t+r,1,-1],[e+o,t+r,-1,-1]].map(([f,y,g,w])=>`M${f} ${y+w*l}V${y+w*S}Q${f} ${y} ${f+g*S} ${y}H${f+g*l}`).join("")}s(Ot,"brackets");function Rt({step:e,i18n:t,ageLead:o,onOpen:r,onChangeCountry:a,onChangeDocument:l,upload:S,onUpload:h}){let f=be(t),y=G(t),g=e.documentType==="passport",w=xt(e),C=_e(e),z=S==="sending",M=ot(Ye)?.busy===!0;return d("section",{className:"sekyro-step sekyro-step--doc-intro","data-testid":"sekyro-document",children:[n(at,{passport:g}),n(he,{title:f(w.titleKey)||f("native.doc.introTitle"),lead:o?t.t("doc.ageStepUp"):f("native.doc.introLead")}),w.onlyKey!==null&&e.issuer!==null?n("p",{className:"sekyro-text-muted sekyro-doc-only",children:f(w.onlyKey,{country:Dt(e.issuer,t.locale)})}):null,n(Ce,{step:e,i18n:t}),e.reason!==void 0&&rt.has(e.reason)?null:d("ul",{className:"sekyro-tiprows",children:[d("li",{children:[n(A,{name:g?"passport":"card"}),f("native.doc.tip.flat")]}),d("li",{children:[n(A,{name:"light"}),f("native.doc.tip.glare")]}),d("li",{children:[n(se,{name:"image"}),f("native.doc.tip.frame")]})]}),n(st,{i18n:t,...l!==void 0?{onChangeDocument:l}:{},...a!==void 0?{onChangeCountry:a}:{}}),n(it,{i18n:t,upload:S}),z?n("p",{className:"sekyro-text-muted",role:"status",children:t.t("doc.uploading")}):h!==void 0?n("p",{className:"sekyro-text-muted",children:y.t("doc.uploadHint")}):null,d(fe,{children:[d(K,{full:!0,onClick:r,disabled:z||M,children:[n(A,{name:"camera"}),f("native.doc.openCamera")]}),h!==void 0?d(K,{full:!0,kind:"ghost",onClick:h,children:[n(se,{name:"image"}),y.t("doc.uploadInstead")]}):null]})]})}s(Rt,"DocumentIntro");function Ce({step:e,i18n:t}){let o=_e(e);return o===null?null:d(ye,{tone:"warning",children:[n("span",{children:t.t(o)}),n("span",{children:ve(t,e.attemptsRemaining,e.attemptsExhausted)})]})}s(Ce,"ReasonNotice");function st({i18n:e,onChangeCountry:t,onChangeDocument:o}){let r=be(e);return o===void 0&&t===void 0?null:d("div",{className:"sekyro-links",children:[o!==void 0?n("button",{type:"button",className:"sekyro-link",onClick:o,children:r("native.doc.changeDocument")}):null,t!==void 0?n("button",{type:"button",className:"sekyro-link",onClick:t,children:e.t("native.doc.changeCountry")}):null]})}s(st,"ChangeLinks");function it({i18n:e,upload:t}){return t!=="unsupported"&&t!=="failed"?null:n(ye,{tone:"warning",children:n("span",{children:G(e).t(t==="unsupported"?"doc.uploadUnsupported":"doc.uploadFailed")})})}s(it,"UploadNotice");function Et({step:e,i18n:t,ageLead:o,upload:r,offered:a,onPick:l,onCamera:S,onChangeCountry:h,onChangeDocument:f}){let y=G(t),g=r==="sending";return d("section",{className:"sekyro-step","data-testid":"sekyro-doc-upload-screen",children:[n(at,{passport:e.documentType==="passport"}),n(he,{title:y.t("doc.uploadTitle"),lead:o?t.t("doc.ageStepUp"):y.t("doc.uploadHint")}),o?n("p",{className:"sekyro-text-muted",children:y.t("doc.uploadHint")}):null,n(Ce,{step:e,i18n:t}),n(st,{i18n:t,...f!==void 0?{onChangeDocument:f}:{},...h!==void 0?{onChangeCountry:h}:{}}),n(it,{i18n:t,upload:r}),g?n("p",{className:"sekyro-text-muted",role:"status",children:t.t("doc.uploading")}):null,d(fe,{children:[d(K,{full:!0,onClick:l,disabled:g||!a||e.attemptsExhausted,children:[n(se,{name:"image"}),y.t("doc.source.upload")]}),S!==void 0?d(K,{full:!0,kind:"ghost",onClick:S,disabled:g,children:[n(A,{name:"camera"}),y.t("doc.source.camera")]}):null]})]})}s(Et,"DocumentUploadScreen");function nt(e,t,o){let r=e*.88,a=r/o;return{x:(e-r)/2,y:t*.42-a/2,w:r,h:a}}s(nt,"guideRect");var Ut={"mrz:moveCloser":"dcv3.mrz.moveCloser","mrz:turnSideways":"dcv3.mrz.turnSideways","mrz:glare":"dcv3.mrz.glare",too_far:"native.scan.closer",too_close:"native.scan.farther",focus_far:"native.scan.farther",glare:"native.scan.glare",too_bright:"native.scan.glare",too_dark:"native.scan.dark",blurry:"native.scan.blurry"},Kt=s(()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0,"reduceMotion");function At({step:e,i18n:t,liveMrz:o,barcodeAssetBaseUrl:r,onClose:a,attempts:l,onUpload:S}){let h=be(t),f=ot(Ue),y=L(f);y.current=f;let g=L(null),w=L(null),C=L(null),[z,M]=k("idle"),[b,V]=k(null),[H,O]=k(null),[v,q]=k({w:0,h:0}),[D,F]=k({hint:null,locking:!1,card:null,manualShutter:!1}),[R,ee]=k({}),[X,ct]=k(null),[ze,lt]=k(null),[Ne,De]=k(0),[xe,Te]=k(null),[ie,dt]=k(null),[ce,ut]=k(0),Le=L(0);Le.current=ce;let E=e.documentType==="passport",te=E?1.42:1.586;Ve(!0),Ct(()=>{let c=g.current;if(c===null)return;let p=s(()=>q({w:c.clientWidth,h:c.clientHeight}),"measure");if(p(),typeof ResizeObserver>"u")return;let u=new ResizeObserver(p);return u.observe(c),()=>u.disconnect()},[]);let i=nt(v.w,v.h,te);B(()=>{v.w===0||v.h===0||C.current?.setGuide?.({viewAspect:v.w/v.h,rect:{x:i.x/v.w,y:i.y/v.h,width:i.w/v.w,height:i.h/v.h}})},[v.w,v.h,i.x,i.y,i.w,i.h]),B(()=>{let c=w.current;if(c===null)return;let p=e.capture({video:c,...o!==void 0?{liveMrz:o}:{},...r!==void 0?{barcodeAssetBaseUrl:r}:{}});C.current=p;let u=g.current;if(u!==null&&u.clientWidth>0&&u.clientHeight>0){let m=nt(u.clientWidth,u.clientHeight,te);p.setGuide?.({viewAspect:u.clientWidth/u.clientHeight,rect:{x:m.x/u.clientWidth,y:m.y/u.clientHeight,width:m.w/u.clientWidth,height:m.h/u.clientHeight}})}let I=new ae,_={scan:null,feedback:null,gate:null,mrz:null},$=s(m=>{_={..._,...m};let x=_.gate?.guide,wt={phase:_.scan?.phase??"framing",hint:_.feedback?.reticle==="coaching"?_.feedback.key:e.documentType==="drivers_license"?null:It(_.mrz),card:x?.detected?{fill:x.fill,offsetX:x.offsetX,offsetY:x.offsetY}:null,manualShutter:_.scan?.manualShutter??!1},W=I.present(wt,performance.now());F(j=>j.hint===W.hint&&j.locking===W.locking&&j.manualShutter===W.manualShutter&&Ft(j.card,W.card)?j:W)},"present"),kt=[p.on("state",M),p.on("feedback",m=>$({feedback:m})),p.on("gate",m=>$({gate:m})),p.on("scan",m=>{V(m),$({scan:m})}),p.on("captured",m=>{ut(x=>x+1),ee(x=>({...x,[Yt(m.side,E,x)]:m.previewDataUrl})),ct(m.previewDataUrl),lt(Xt(c))}),p.on("error",m=>{O(m);let x=y.current;x!==null&&Ae(x,Ke("document",m,Math.max(0,l.current)))}),p.on("mrz",m=>{m.state==="mismatch"?dt({format:m.format??null,at:Le.current}):(Te(m),$({mrz:m}))})];return l.current+=1,p.start().catch(()=>{}),()=>{for(let m of kt)m();p.destroy(),C.current=null}},[e.issuer,e.documentType]);let T=b?.phase??"framing",P=T==="reading"||T==="result",le=T==="flipCue"||T==="reaskRecto",U=D.locking,Me=b?.captured.length??0;B(()=>{U&&De(c=>c+1)},[U]),B(()=>{Me>0&&De(c=>c+1)},[Me]);let pt=b?.expected??null;B(()=>{Te(null)},[pt]);let de=le||P||e.documentType==="drivers_license"?null:Pt(xe,E),Pe=s(c=>t.strings[c]??Tt[t.locale][c],"liveText"),mt=s(c=>c.startsWith("dcv3.")?Pe(c):h(c),"copy"),ue=de!==null?Pe(de):h(T==="flipCue"?"doc.flip":T==="reaskRecto"?"doc.reaskRecto":P?"native.scan.reading":T==="locking"||T==="capturing"||U?"native.scan.holdStill":E?"doc.showPage":"doc.showSide"),ne=_e(e),Ie=s(c=>({key:h(c),action:ve(t,e.attemptsRemaining,e.attemptsExhausted),blocking:e.reason!==void 0&&rt.has(e.reason)}),"reasonProblem"),$e=$t(e.documentType),ht=ie!==null&&ce<=ie.at+1?{key:h(ie.format==="TD3"?"native.scan.seenPassport":"native.scan.seenCard"),action:$e===null?null:h($e),blocking:!0}:b?.notice==="same_face"?{key:h("doc.sameFace"),action:null,blocking:!1}:b?.notice==="reread"?ne!==null?Ie(ne):{key:h("doc.reread"),action:null,blocking:!1}:b?.notice==="technical"?{key:h("native.scan.retry"),action:null,blocking:!1}:b?.notice==="blurry"?{key:h("native.scan.blurry"),action:null,blocking:!1}:ne!==null&&ce===0?Ie(ne):null,ft=D.hint===null?null:mt(Ut[D.hint]??`dcv2.${D.hint}`),He=Bt(ht,ft,U||T==="capturing"||P),Y=D.card,N=i;if(!U&&Y!==null&&Y.fill>=.45&&Y.fill<=1.25&&!Kt()){let c=i.w*Y.fill,p=c/te,u=i.x+i.w/2+i.w*Math.max(-.25,Math.min(.25,Y.offsetX)),I=i.y+i.h/2+i.h*Math.max(-.25,Math.min(.25,Y.offsetY));N={x:u-c/2,y:I-p/2,w:c,h:p}}let oe=i.w*.045,pe=28,Oe=Math.min(oe,pe*.6),yt=[[N.x,N.y,1,1],[N.x+N.w,N.y,-1,1],[N.x,N.y+N.h,1,-1],[N.x+N.w,N.y+N.h,-1,-1]],vt=U?"is-locked":He!==null?"is-coaching":"",gt=E?[{side:"single",label:"doc.progressPage"}]:[{side:"recto",label:"doc.progressFront"},{side:"verso",label:"doc.progressBack"}],St=i.y+i.h+16,me={insetInlineStart:i.x,insetBlockStart:i.y,inlineSize:i.w,blockSize:i.h,borderRadius:oe};return n("section",{className:"sekyro-lm","aria-label":ue,"data-testid":"sekyro-document",children:d("div",{ref:g,className:`sekyro-lm-stage${P?" is-reading":""}${le?" is-flip":""}`,style:{"--sekyro-guide-w":`${i.w}px`},children:[n("video",{ref:w,className:"sekyro-lm-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true",onPointerUp:c=>{let p=c.currentTarget,u=p.getBoundingClientRect(),I=Math.max(u.width/(p.videoWidth||1),u.height/(p.videoHeight||1)),_=p.videoWidth*I,$=p.videoHeight*I;_>0&&$>0&&C.current?.focusAt((c.clientX-u.left+(_-u.width)/2)/_,(c.clientY-u.top+($-u.height)/2)/$)}}),v.w>0?d(we,{children:[P&&ze!==null?n("img",{className:"sekyro-lm-scene",src:ze,alt:""}):null,P&&X!==null?n("img",{className:"sekyro-lm-frozen",src:X,alt:"",style:me}):null,d("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${v.w} ${v.h}`,"aria-hidden":"true",focusable:"false",children:[d("defs",{children:[d("linearGradient",{id:"sekyro-lm-top",x1:"0",y1:"0",x2:"0",y2:"1",children:[n("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0.85"}),n("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0"})]}),d("linearGradient",{id:"sekyro-lm-bottom",x1:"0",y1:"0",x2:"0",y2:"1",children:[n("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0"}),n("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0.9"})]})]}),n("path",{className:"sekyro-lm-scrim",fillRule:"evenodd",d:`M0 0H${v.w}V${v.h}H0Z${Gt(i,oe)}`}),n("rect",{width:v.w,height:Math.max(0,i.y),fill:"url(#sekyro-lm-top)"}),n("rect",{y:i.y+i.h,width:v.w,height:Math.max(0,v.h-i.y-i.h),fill:"url(#sekyro-lm-bottom)"}),n("g",{className:`sekyro-lm-brackets ${vt}`,children:yt.map(([c,p,u,I],_)=>n("path",{style:{transform:`translate(${c}px, ${p}px) scale(${u}, ${I})`},d:`M0 ${pe}V${Oe}Q0 0 ${Oe} 0H${pe}`},_))}),U?n("rect",{className:"sekyro-lm-trace",x:i.x,y:i.y,width:i.w,height:i.h,rx:oe,pathLength:"1",style:{animationDuration:`${Nt}ms`}}):null]}),n("div",{className:"sekyro-lm-slot",style:me,"aria-hidden":"true",children:P?n("span",{className:"sekyro-lm-read is-repeating"}):Ne>0?n("span",{className:"sekyro-lm-read"},Ne):null})]}):null,de!==null?n("div",{className:"sekyro-lm-slot",style:me,"aria-hidden":"true",children:n("span",{"data-testid":"sekyro-mrz-strip",className:`sekyro-lm-mrz${E?" is-page":""}${xe?.state==="valid"?" is-valid":""}`})}):null,n("div",{className:"sekyro-lm-instruction",style:{insetBlockStart:i.y-64},children:n("div",{role:"status","aria-live":"polite","data-testid":"sekyro-scan-instruction",children:n(Fe,{swapKey:ue,className:"sekyro-lm-line",children:ue})})}),d("div",{className:"sekyro-lm-below",style:{insetBlockStart:St,inlineSize:i.w,insetInlineStart:i.x},children:[n(Vt,{band:He}),P?d("p",{className:"sekyro-lm-note",children:[n("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}),h("native.scan.putDown")]}):le?n("div",{className:`sekyro-lm-flip${T==="reaskRecto"?" is-toFront":""}`,"data-testid":"sekyro-flip-cue","aria-hidden":"true",children:d("span",{className:"sekyro-lm-flip-card",style:{aspectRatio:String(te)},children:[n("span",{className:"sekyro-lm-flip-front"}),n("span",{className:"sekyro-lm-flip-back"})]})}):null]}),d("div",{className:"sekyro-lm-controls",children:[d("div",{className:"sekyro-lm-bar",children:[n("button",{type:"button",className:"sekyro-glass","aria-label":t.t("native.close"),onClick:a,children:n(A,{name:"close"})}),b?.torchAvailable?n("button",{type:"button",className:`sekyro-glass${b.torch?" is-on":""}`,"aria-label":t.t("doc.torchOn"),"aria-pressed":b.torch,onClick:()=>C.current?.setTorch(!b.torch),children:n(se,{name:"flashlight"})}):null]}),H!==null?d("div",{className:"sekyro-lm-error",role:"alert",children:[n("p",{children:t.t("doc.cameraBlocked")}),n("p",{children:t.t(H.kind==="permission"?"doc.cameraBlockedHint":Re(H.kind))}),n(K,{onClick:()=>{O(null),l.current+=1,C.current?.retry()},children:t.t("doc.retryCamera")})]}):null,D.manualShutter?n("button",{type:"button",className:"sekyro-shutter","aria-label":t.t("doc.shutter"),onClick:()=>C.current?.shutter()}):null,n("ol",{className:"sekyro-lm-tray",children:gt.map(({side:c,label:p})=>{let u=b?.captured.includes(c)??!1;return d("li",{className:u?"is-done":void 0,"aria-current":!u&&(E||b?.expected===c)?"step":void 0,children:[u?d("span",{className:"sekyro-lm-thumb",children:[R[c]!==void 0?n("img",{src:R[c],alt:""}):null,n("svg",{className:"sekyro-lm-check",viewBox:"0 0 18 18","aria-hidden":"true",children:n("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})]}):null,h(p)]},c)})}),S!==void 0?n("button",{type:"button",className:"sekyro-lm-upload",onClick:S,children:G(t).t("doc.uploadInstead")}):null,z==="uploading"||z==="checking"?null:n(Ge,{onStop:a})]}),z==="uploading"||z==="checking"?n("span",{className:"sekyro-visually-hidden",role:"status",children:z==="uploading"?t.t("doc.uploading"):h("native.scan.reading")}):null]})})}s(At,"LumiereScan");function Bt(e,t,o){let r=L(null);r.current??(r.current=new re);let[a,l]=k(null),S=L({problem:e,hint:t,busy:o});S.current={problem:e,hint:t,busy:o};let h=e===null?null:`${e.blocking}|${e.key}|${e.action??""}`;return B(()=>{let f=s(()=>{let{problem:g,hint:w,busy:C}=S.current;l(r.current?.present(g,w,C,performance.now())??null)},"run");f();let y=setInterval(f,250);return()=>clearInterval(y)},[h,t,o]),a}s(Bt,"useNoticeBand");function Vt({band:e}){let[t,o]=k(e);B(()=>{e!==null&&o(e)},[e]);let r=e??t;return n("div",{className:`sekyro-lm-band${e!==null?" is-open":""}`,"data-testid":"sekyro-scan-notice",children:n("div",{role:"status","aria-live":"polite","aria-atomic":"true",children:r!==null?d("div",{className:"sekyro-notice sekyro-notice--warning","data-kind":r.kind,"aria-hidden":e===null||void 0,children:[n("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:n(A,{name:"warning"})}),d("div",{className:"sekyro-notice__body",children:[n("span",{children:r.key}),r.action!==null&&r.action!==""?n("span",{children:r.action}):null]})]}):null})})}s(Vt,"NoticeBandView");function Yt(e,t,o){return t?"single":e==="recto"||e==="verso"?e:o.recto===void 0?"recto":"verso"}s(Yt,"slotOf");function Gt({x:e,y:t,w:o,h:r},a){return`M${e+a} ${t}H${e+o-a}Q${e+o} ${t} ${e+o} ${t+a}V${t+r-a}Q${e+o} ${t+r} ${e+o-a} ${t+r}H${e+a}Q${e} ${t+r} ${e} ${t+r-a}V${t+a}Q${e} ${t} ${e+a} ${t}Z`}s(Gt,"roundedRect");var ke=.004;function Ft(e,t){return e===null||t===null?e===t:Math.abs(e.fill-t.fill)<ke&&Math.abs(e.offsetX-t.offsetX)<ke&&Math.abs(e.offsetY-t.offsetY)<ke}s(Ft,"sameCard");function Xt(e){let t=Math.round(e.videoWidth/4),o=Math.round(e.videoHeight/4);if(t===0||o===0||typeof document>"u")return null;try{let r=document.createElement("canvas");r.width=t,r.height=o;let a=r.getContext("2d");return a===null?null:(a.drawImage(e,0,0,t,o),r.toDataURL("image/jpeg",.7))}catch{return null}}s(Xt,"sceneSnapshot");export{$n as DocumentCaptureView,Nt as LOCK_TRACE_MS,Mt as UPLOAD_ACCEPT,nt as guideRect,xt as introCopy,It as mrzHint,Pt as mrzInstruction,Ft as sameCard,$t as showInsteadKey,Yt as slotOf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as O,b as K,c as z}from"./chunk-GUTF3SPK.js";import{a as Y,b as y,c as q}from"./chunk-55NNQK5P.js";import{a as U}from"./chunk-VRDPGOXM.js";import{d as $}from"./chunk-
|
|
2
|
+
import{a as O,b as K,c as z}from"./chunk-GUTF3SPK.js";import{a as Y,b as y,c as q}from"./chunk-55NNQK5P.js";import{a as U}from"./chunk-VRDPGOXM.js";import{d as $}from"./chunk-ERWGG4X6.js";import{d as x,m as W,p as A}from"./chunk-PEQBKIR7.js";import"./chunk-BMD5J7TC.js";import{a as N,s as G}from"./chunk-P7TS7JPW.js";import{a}from"./chunk-2KED7D2Q.js";import{isValidNni as ce,normalizeNni as J}from"@sekyro/web";import{useEffect as R,useId as ue,useRef as Q,useState as S}from"react";import{Fragment as w,jsx as n,jsxs as l}from"react/jsx-runtime";var X={en:y,fr:q,ar:Y,es:y,pt:y,de:y},C=6,me=new Set(["eid_identifier_invalid","eid_code_invalid","eid_locked","eid_not_enrolled"]),Z=a((e,t)=>{if(e===void 0)return 0;let p=Date.parse(e)-t;return Number.isFinite(p)?Math.max(0,Math.ceil(p/1e3)):0},"secondsUntil"),pe=a(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss");function Ae({step:e,i18n:t,className:p,onError:j}){let B=t.strings,o=a((i,s)=>$(B[i]??X[t.locale][i]??"",s),"t"),P=a((i,s)=>{let ae=new Intl.PluralRules(t.locale).select(s),V=`${i}.${ae}`,le=B[V]??X[t.locale][V]??o(`${i}.other`);return $(le,{count:new Intl.NumberFormat(t.locale).format(s)})},"plural"),v=a(i=>e.providerName?o(`eid.${i}`,{provider:e.providerName}):o(`eid.${i}Generic`),"named"),[I,ee]=S(""),[f,h]=S(""),[c,D]=S(!1),[g,u]=S(null),r=e.phase==="code",F=z(r),d=ue(),ne=G(),[ie,oe]=O(e.reason==="eid_code_invalid",e.codeAttemptsRemaining??0,()=>h("")),m=a(async i=>{D(!0),u(null);try{await i()}catch(s){u(U(s,t.strings)),j?.(s)}finally{D(!1)}},"run"),T=Q(!1);R(()=>{!e.identifierBound||r||e.reason!==void 0||T.current||(T.current=!0,m(()=>e.start()))},[e.identifierBound,r,e.reason]),R(()=>{(e.reason==="eid_code_invalid"||e.codeExpiresAt!==void 0)&&h("")},[e.reason,e.codeExpiresAt,e.codeAttemptsRemaining]);let H=Q(r);R(()=>{r&&!H.current&&document.getElementById(`${d}-code`)?.focus(),H.current=r},[r,d]);let b=e.reason==="eid_locked",M=Z(e.codeExpiresAt,F),E=r&&e.codeExpiresAt!==void 0&&M===0,_=Z(e.resendAvailableAt,F),L=e.resendsRemaining===0||e.reason==="eid_resend_limit",te=a(i=>{if(i.preventDefault(),r){f.length===C&&!b&&m(()=>e.verify(f));return}if(e.identifierBound){m(()=>e.start());return}let s=J(I);if(e.country==="MR"){if(!/^\d{10}$/.test(s))return u("population.invalid");if(!ce(s))return u("population.reason_nni_invalid")}m(()=>e.start(s))},"onSubmit"),k=e.reason?.startsWith("eid_")?e.reason:void 0,re=l(w,{children:[k!==void 0?l(A,{tone:me.has(k)?"danger":"warning",children:[n("span",{children:o(`reasons.${k}`)}),k==="eid_code_invalid"&&e.codeAttemptsRemaining!==void 0?n("span",{children:P("eid.codeAttemptsRemaining",e.codeAttemptsRemaining)}):null,e.canUseCamera?n(N,{kind:"secondary",disabled:c,onClick:()=>{m(()=>e.useCamera())},children:o("eid.useCamera")}):null]}):null,g!==null?n(A,{tone:"danger",children:n("span",{children:t.t(g)})}):null]}),[de,se]=r?[v("codeTitle"),v("codeHelp")]:[v("identifierTitle"),v(e.identifierBound?"boundDescription":"identifierDescription")];return l("form",{className:`sekyro-step sekyro-otp${p?` ${p}`:""}`,"aria-labelledby":d,onSubmit:te,noValidate:!0,"data-testid":"sekyro-eid",children:[l("div",{className:"sekyro-heading",children:[n("h2",{id:d,ref:ne,tabIndex:-1,className:"sekyro-text-body",children:de}),n("p",{className:"sekyro-text-muted",children:r&&e.context.simulation!==void 0?n(W,{template:t.t("sandbox.otpHint"),code:e.context.simulation.otpCode}):se}),e.afterPass==="continue"?n("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:e.providerName?o("eid.continueHint",{provider:e.providerName}):o("eid.continueHintGeneric")}):null]}),re,r?l(w,{children:[l("div",{className:"sekyro-field",children:[n("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:o("eid.codeLabel")}),b?n("input",{id:`${d}-code`,className:"sekyro-input sekyro-input--number",dir:"ltr",value:f,disabled:!0,readOnly:!0}):n(K,{id:`${d}-code`,value:f,length:C,invalid:ie,onChange:i=>{u(null),i!==""&&oe(),h(i)}}),e.codeExpiresAt!==void 0?n("span",{className:`sekyro-help sekyro-otp-expiry${E?" is-danger":""}`,children:E?o("eid.expired"):o("eid.expiresIn",{time:pe(M)})}):null]}),n("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:E?o("eid.expired"):""}),l(x,{children:[n(N,{type:"submit",full:!0,disabled:c||f.length!==C||b,"aria-busy":c||void 0,children:o("eid.verify")}),n("div",{className:"sekyro-resend-row",children:L?n("p",{className:"sekyro-resend is-waiting",children:o("eid.noResendsLeft")}):n("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:c||_>0||b,onClick:()=>{m(()=>e.resend())},children:_>0?o("eid.resendIn",{seconds:_}):o("eid.resend")})}),!L&&e.resendsRemaining!==void 0?n("p",{className:"sekyro-help sekyro-center",children:P("eid.resendsRemaining",e.resendsRemaining)}):null]})]}):l(w,{children:[e.identifierBound?null:l("div",{className:"sekyro-field",children:[n("label",{className:"sekyro-label",htmlFor:`${d}-nni`,children:t.t("population.label")}),n("input",{id:`${d}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:t.t("population.placeholder"),value:I,"aria-describedby":`${d}-nni-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_nni_invalid"||void 0,onChange:i=>{u(null),ee(J(i.target.value).replace(/\D/g,"").slice(0,10))}}),n("span",{id:`${d}-nni-help`,className:"sekyro-help",children:t.t("population.helper")})]}),n(x,{children:n(N,{type:"submit",full:!0,disabled:c,"aria-busy":c||void 0,children:o("eid.start")})})]})]})}a(Ae,"EidView");export{Ae as EidView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as B,b as F,c as J}from"./chunk-GUTF3SPK.js";import{a as U}from"./chunk-VRDPGOXM.js";import{d as M}from"./chunk-AKUQWUZO.js";import{b as Y,d as k,f as K,m as G,p as b,q as j}from"./chunk-X37A2AZL.js";import"./chunk-2XILMIVI.js";import{a as C}from"./chunk-ZBABRSO2.js";import{a as r}from"./chunk-2KED7D2Q.js";import{OtpInputError as pe}from"@sekyro/web";import{useEffect as ce,useId as ue,useRef as fe,useState as p}from"react";var Q={"emailOtp.reason_otp_daily_cap_reached":"لا يمكننا إرسال رمز إلى بريدك الإلكتروني اليوم. اختر طريقة أخرى للتحقق إن كانت متاحة، أو حاول مرة أخرى لاحقًا.","emailOtp.reason_payment_method_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_spend_cap_reached":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_insufficient_balance":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_account_verification_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"عنوان بريدك الإلكتروني","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا","emailOtp.send":"أرسل لي رمزًا عبر البريد الإلكتروني","emailOtp.verifyTitle":"أدخل الرمز","emailOtp.verifyDescription":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إلى بريدك الإلكتروني لإتمام التحقّق من عنوانك","emailOtp.sentTo":"أرسلنا رمزًا مكوّنًا من 6 أرقام إلى {email}","emailOtp.codeLabel":"رمز التحقّق","emailOtp.codeHelper":"أدخل الرمز المكوّن من 6 أرقام الوارد في الرسالة","emailOtp.verify":"تحقّق من الرمز","emailOtp.resend":"إعادة إرسال الرمز","emailOtp.resendIn":"إعادة إرسال الرمز خلال {seconds} ثانية","emailOtp.expiresIn":"ينتهي الرمز خلال {time}","emailOtp.expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد","emailOtp.reason_otp_mismatch":"الرمز غير صحيح. تحقّق منه وأعد إدخاله","emailOtp.reason_otp_expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد للمتابعة","emailOtp.reason_otp_send_failed":"تعذّر إرسال الرسالة. أعد المحاولة لاحقًا. إذا تكرر ذلك، فتواصل مع الجهة التي طلبت منك التحقق.","emailOtp.reason_otp_rate_limited":"طُلبت رموز كثيرة لهذا العنوان. أعد المحاولة لاحقًا أو أدخل عنوانًا آخر.","emailOtp.reason_email_invalid":"لا يمكننا الإرسال إلى هذا العنوان. تحقّق منه أو أدخل عنوانًا آخر","emailOtp.reason_email_disposable":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا","emailOtp.changeEmail":"تغيير البريد الإلكتروني","emailOtp.backToCode":"العودة إلى الرمز","emailOtp.reason_otp_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك"};var f={"emailOtp.reason_otp_daily_cap_reached":"We can't email you a code today. Choose another way to verify if one is offered, or try again later.","emailOtp.reason_payment_method_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_spend_cap_reached":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_insufficient_balance":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_account_verification_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.sendTitle":"Verify your email address","emailOtp.sendDescription":"We'll email you a one-time code to confirm this address is yours","emailOtp.prefilledNotice":"We'll send a verification code to your registered email address.","emailOtp.emailLabel":"Email address","emailOtp.emailHelper":"We'll send a one-time code to this address","emailOtp.emailPlaceholder":"Your email address","emailOtp.emailInvalid":"Enter a valid email address","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the code","emailOtp.verifyDescription":"Type the 6-digit code we emailed you to finish verifying your address","emailOtp.sentTo":"We sent a 6-digit code to {email}","emailOtp.codeLabel":"Verification code","emailOtp.codeHelper":"Enter the 6-digit code from the email","emailOtp.verify":"Verify code","emailOtp.resend":"Resend code","emailOtp.resendIn":"Resend code in {seconds}s","emailOtp.expiresIn":"Code expires in {time}","emailOtp.expired":"That code has expired. Resend a new one","emailOtp.reason_otp_mismatch":"That code was incorrect. Check it and enter it again","emailOtp.reason_otp_expired":"That code has expired. Resend a new code to continue","emailOtp.reason_otp_send_failed":"We couldn't send the email. Try again later. If it keeps happening, contact the organization that asked you to verify.","emailOtp.reason_otp_rate_limited":"Too many codes were requested for this address. Try again later, or enter another address.","emailOtp.reason_email_invalid":"We can't send to this address. Check it or enter another one","emailOtp.reason_email_disposable":"Use a permanent email address, not a temporary one","emailOtp.changeEmail":"Change email","emailOtp.backToCode":"Back to code","emailOtp.reason_otp_resend_limit":"You can't get more codes. Enter the last code you received"};var X={"emailOtp.reason_otp_daily_cap_reached":"Nous ne pouvons pas vous envoyer de code par e-mail aujourd'hui. Choisissez une autre méthode si elle est proposée, ou réessayez plus tard.","emailOtp.reason_payment_method_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_spend_cap_reached":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_insufficient_balance":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_account_verification_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.sendTitle":"Vérifiez votre e-mail","emailOtp.sendDescription":"Nous vous enverrons par e-mail un code à usage unique pour confirmer que cette adresse vous appartient","emailOtp.prefilledNotice":"Nous enverrons un code de vérification à votre adresse e-mail enregistrée.","emailOtp.emailLabel":"Adresse e-mail","emailOtp.emailHelper":"Nous enverrons un code à usage unique à cette adresse","emailOtp.emailPlaceholder":"Votre adresse e-mail","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code","emailOtp.verifyDescription":"Saisissez le code à 6 chiffres que nous vous avons envoyé par e-mail pour finaliser la vérification de votre adresse","emailOtp.sentTo":"Nous avons envoyé un code à 6 chiffres à {email}","emailOtp.codeLabel":"Code de vérification","emailOtp.codeHelper":"Saisissez le code à 6 chiffres reçu par e-mail","emailOtp.verify":"Vérifier le code","emailOtp.resend":"Renvoyer le code","emailOtp.resendIn":"Renvoyer le code dans {seconds} s","emailOtp.expiresIn":"Le code expire dans {time}","emailOtp.expired":"Ce code a expiré. Renvoyez-en un nouveau","emailOtp.reason_otp_mismatch":"Ce code est incorrect. Vérifiez-le et saisissez-le à nouveau","emailOtp.reason_otp_expired":"Ce code a expiré. Renvoyez un nouveau code pour continuer","emailOtp.reason_otp_send_failed":"Nous n'avons pas pu envoyer l'e-mail. Réessayez plus tard. Si le problème continue, contactez l'organisation qui vous a demandé de vous vérifier.","emailOtp.reason_otp_rate_limited":"Trop de codes ont été demandés pour cette adresse. Réessayez plus tard ou saisissez une autre adresse.","emailOtp.reason_email_invalid":"Nous ne pouvons pas envoyer à cette adresse. Vérifiez-la ou saisissez-en une autre","emailOtp.reason_email_disposable":"Utilisez une adresse e-mail permanente, pas une adresse temporaire","emailOtp.changeEmail":"Changer d'adresse e-mail","emailOtp.backToCode":"Retour au code","emailOtp.reason_otp_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu"};import{Fragment as N,jsx as i,jsxs as s}from"react/jsx-runtime";var Oe={en:f,fr:X,ar:Q,es:f,pt:f,de:f},Z=r((e,l,O)=>{if(e===void 0)return 0;let _=Date.parse(e)-l;return Number.isFinite(_)?Math.min(O,Math.max(0,Math.ceil(_/1e3))):0},"secondsUntil"),_e=600,he=60,ye=r(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),ee=new Set(["otp_expired","otp_send_failed","otp_rate_limited","otp_resend_limit","email_invalid","email_disposable","otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","account_verification_required"]);function Ve({step:e,i18n:l,className:O,defaultEmail:_="",onError:ie}){let a=r((t,o)=>M(l.strings[t]??Oe[l.locale][t],o),"t"),[T,ae]=p(_),[h,x]=p(""),[n,w]=p(!1),[z,I]=p(null),[g,c]=p(!1),[R,te]=p(null),u=fe(null),y=e.phase==="verify",m=y&&!g,q=J(y),d=ue(),[oe,se]=B(e.reason==="otp_mismatch",e.attemptsRemaining,()=>x("")),V=y?e.codeExpiresAt??"sent":null;ce(()=>{V!==null&&(c(!1),u.current!==null&&!ee.has(e.reason??"")&&te(u.current),u.current=null)},[V]);let A=r(async t=>{w(!0),I(null);try{await t()}catch(o){I(o instanceof pe&&o.field==="email"?a("emailOtp.emailInvalid"):l.t(U(o,l.strings))),ie?.(o)}finally{w(!1)}},"run"),L=r(t=>{let o=e.needsEmail?t?R:T.trim():null;u.current=o,A(async()=>{try{await e.send(o!==null?{email:o}:{})}catch(me){throw u.current=null,me}})},"send"),D=r(t=>{A(()=>e.verify(t))},"submitCode"),ne=r(t=>{t.preventDefault(),m?D(h):L(!1)},"onSubmit"),S=Z(e.codeExpiresAt,q,_e),E=Z(e.resendAvailableAt,q,he),v=m&&e.codeExpiresAt!==void 0&&S===0,$=e.needsEmail&&!e.attemptsExhausted,P=y&&(e.codeExpiresAt===void 0||S>0),W=m&&$?()=>c(!0):g&&P?()=>c(!1):null;K(W===null?null:n?()=>{}:W);let[re,le]=a("emailOtp.sentTo").split("{email}"),H=e.context.simulation?.otpCode,de=e.reason==="otp_mismatch"?s(b,{tone:"danger",children:[i("span",{children:a("emailOtp.reason_otp_mismatch")}),i("span",{children:j(l,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&ee.has(e.reason)?i(b,{tone:"warning",children:i("span",{children:a(`emailOtp.reason_${e.reason}`)})}):null;return s("form",{className:`sekyro-step sekyro-otp${O?` ${O}`:""}`,"aria-labelledby":d,onSubmit:ne,noValidate:!0,children:[i(Y,{id:d,title:a(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m&&H!==void 0?i(G,{template:l.t("sandbox.otpHint"),code:H}):m?s(N,{children:[re,i("bdi",{dir:"ltr",className:"sekyro-mono",children:R??e.sentToMasked}),le]}):a("emailOtp.sendDescription")}),de,z!==null?i(b,{tone:"danger",children:i("span",{children:z})}):null,m?s(N,{children:[s("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:a("emailOtp.codeLabel")}),i(F,{id:`${d}-code`,value:h,invalid:oe,onChange:t=>{t!==""&&se(),x(t),t.length===6&&h.length!==6&&!n&&!e.attemptsExhausted&&D(t)}}),i("span",{className:`sekyro-help sekyro-otp-expiry${v?" is-danger":""}`,"aria-hidden":!v||void 0,children:v?a("emailOtp.expired"):a("emailOtp.expiresIn",{time:ye(S)})})]}),i("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:v?a("emailOtp.expired"):""}),s(k,{children:[i(C,{type:"submit",full:!0,disabled:n||h.length!==6,"aria-busy":n||void 0,children:a("emailOtp.verify")}),s("div",{className:"sekyro-resend-row",children:[i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:n||E>0,onClick:()=>L(!0),children:E>0?a("emailOtp.resendIn",{seconds:E}):a("emailOtp.resend")}),$?i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:n,onClick:()=>c(!0),"data-testid":"sekyro-otp-change",children:a("emailOtp.changeEmail")}):null]})]})]}):s(N,{children:[e.needsEmail?s("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${d}-email`,children:a("emailOtp.emailLabel")}),i("input",{id:`${d}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:a("emailOtp.emailPlaceholder"),value:T,"aria-describedby":`${d}-email-help`,onChange:t=>ae(t.target.value)}),i("span",{id:`${d}-email-help`,className:"sekyro-help",children:a("emailOtp.emailHelper")})]}):i("p",{className:"sekyro-text-muted",children:a("emailOtp.prefilledNotice")}),s(k,{children:[i(C,{type:"submit",full:!0,disabled:n,"aria-busy":n||void 0,children:a("emailOtp.send")}),g&&P?i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:n,onClick:()=>c(!1),"data-testid":"sekyro-otp-back-to-code",children:a("emailOtp.backToCode")}):null]})]})]})}r(Ve,"EmailOtpView");export{Ve as EmailOtpView};
|
|
2
|
+
import{a as B,b as F,c as J}from"./chunk-GUTF3SPK.js";import{a as U}from"./chunk-VRDPGOXM.js";import{d as M}from"./chunk-ERWGG4X6.js";import{b as Y,d as k,f as K,m as G,p as b,q as j}from"./chunk-PEQBKIR7.js";import"./chunk-BMD5J7TC.js";import{a as C}from"./chunk-P7TS7JPW.js";import{a as r}from"./chunk-2KED7D2Q.js";import{OtpInputError as pe}from"@sekyro/web";import{useEffect as ce,useId as ue,useRef as fe,useState as p}from"react";var Q={"emailOtp.reason_otp_daily_cap_reached":"لا يمكننا إرسال رمز إلى بريدك الإلكتروني اليوم. اختر طريقة أخرى للتحقق إن كانت متاحة، أو حاول مرة أخرى لاحقًا.","emailOtp.reason_payment_method_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_spend_cap_reached":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_insufficient_balance":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_account_verification_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"عنوان بريدك الإلكتروني","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا","emailOtp.send":"أرسل لي رمزًا عبر البريد الإلكتروني","emailOtp.verifyTitle":"أدخل الرمز","emailOtp.verifyDescription":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إلى بريدك الإلكتروني لإتمام التحقّق من عنوانك","emailOtp.sentTo":"أرسلنا رمزًا مكوّنًا من 6 أرقام إلى {email}","emailOtp.codeLabel":"رمز التحقّق","emailOtp.codeHelper":"أدخل الرمز المكوّن من 6 أرقام الوارد في الرسالة","emailOtp.verify":"تحقّق من الرمز","emailOtp.resend":"إعادة إرسال الرمز","emailOtp.resendIn":"إعادة إرسال الرمز خلال {seconds} ثانية","emailOtp.expiresIn":"ينتهي الرمز خلال {time}","emailOtp.expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد","emailOtp.reason_otp_mismatch":"الرمز غير صحيح. تحقّق منه وأعد إدخاله","emailOtp.reason_otp_expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد للمتابعة","emailOtp.reason_otp_send_failed":"تعذّر إرسال الرسالة. أعد المحاولة لاحقًا. إذا تكرر ذلك، فتواصل مع الجهة التي طلبت منك التحقق.","emailOtp.reason_otp_rate_limited":"طُلبت رموز كثيرة لهذا العنوان. أعد المحاولة لاحقًا أو أدخل عنوانًا آخر.","emailOtp.reason_email_invalid":"لا يمكننا الإرسال إلى هذا العنوان. تحقّق منه أو أدخل عنوانًا آخر","emailOtp.reason_email_disposable":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا","emailOtp.changeEmail":"تغيير البريد الإلكتروني","emailOtp.backToCode":"العودة إلى الرمز","emailOtp.reason_otp_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك"};var f={"emailOtp.reason_otp_daily_cap_reached":"We can't email you a code today. Choose another way to verify if one is offered, or try again later.","emailOtp.reason_payment_method_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_spend_cap_reached":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_insufficient_balance":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_account_verification_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.sendTitle":"Verify your email address","emailOtp.sendDescription":"We'll email you a one-time code to confirm this address is yours","emailOtp.prefilledNotice":"We'll send a verification code to your registered email address.","emailOtp.emailLabel":"Email address","emailOtp.emailHelper":"We'll send a one-time code to this address","emailOtp.emailPlaceholder":"Your email address","emailOtp.emailInvalid":"Enter a valid email address","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the code","emailOtp.verifyDescription":"Type the 6-digit code we emailed you to finish verifying your address","emailOtp.sentTo":"We sent a 6-digit code to {email}","emailOtp.codeLabel":"Verification code","emailOtp.codeHelper":"Enter the 6-digit code from the email","emailOtp.verify":"Verify code","emailOtp.resend":"Resend code","emailOtp.resendIn":"Resend code in {seconds}s","emailOtp.expiresIn":"Code expires in {time}","emailOtp.expired":"That code has expired. Resend a new one","emailOtp.reason_otp_mismatch":"That code was incorrect. Check it and enter it again","emailOtp.reason_otp_expired":"That code has expired. Resend a new code to continue","emailOtp.reason_otp_send_failed":"We couldn't send the email. Try again later. If it keeps happening, contact the organization that asked you to verify.","emailOtp.reason_otp_rate_limited":"Too many codes were requested for this address. Try again later, or enter another address.","emailOtp.reason_email_invalid":"We can't send to this address. Check it or enter another one","emailOtp.reason_email_disposable":"Use a permanent email address, not a temporary one","emailOtp.changeEmail":"Change email","emailOtp.backToCode":"Back to code","emailOtp.reason_otp_resend_limit":"You can't get more codes. Enter the last code you received"};var X={"emailOtp.reason_otp_daily_cap_reached":"Nous ne pouvons pas vous envoyer de code par e-mail aujourd'hui. Choisissez une autre méthode si elle est proposée, ou réessayez plus tard.","emailOtp.reason_payment_method_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_spend_cap_reached":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_insufficient_balance":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_account_verification_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.sendTitle":"Vérifiez votre e-mail","emailOtp.sendDescription":"Nous vous enverrons par e-mail un code à usage unique pour confirmer que cette adresse vous appartient","emailOtp.prefilledNotice":"Nous enverrons un code de vérification à votre adresse e-mail enregistrée.","emailOtp.emailLabel":"Adresse e-mail","emailOtp.emailHelper":"Nous enverrons un code à usage unique à cette adresse","emailOtp.emailPlaceholder":"Votre adresse e-mail","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code","emailOtp.verifyDescription":"Saisissez le code à 6 chiffres que nous vous avons envoyé par e-mail pour finaliser la vérification de votre adresse","emailOtp.sentTo":"Nous avons envoyé un code à 6 chiffres à {email}","emailOtp.codeLabel":"Code de vérification","emailOtp.codeHelper":"Saisissez le code à 6 chiffres reçu par e-mail","emailOtp.verify":"Vérifier le code","emailOtp.resend":"Renvoyer le code","emailOtp.resendIn":"Renvoyer le code dans {seconds} s","emailOtp.expiresIn":"Le code expire dans {time}","emailOtp.expired":"Ce code a expiré. Renvoyez-en un nouveau","emailOtp.reason_otp_mismatch":"Ce code est incorrect. Vérifiez-le et saisissez-le à nouveau","emailOtp.reason_otp_expired":"Ce code a expiré. Renvoyez un nouveau code pour continuer","emailOtp.reason_otp_send_failed":"Nous n'avons pas pu envoyer l'e-mail. Réessayez plus tard. Si le problème continue, contactez l'organisation qui vous a demandé de vous vérifier.","emailOtp.reason_otp_rate_limited":"Trop de codes ont été demandés pour cette adresse. Réessayez plus tard ou saisissez une autre adresse.","emailOtp.reason_email_invalid":"Nous ne pouvons pas envoyer à cette adresse. Vérifiez-la ou saisissez-en une autre","emailOtp.reason_email_disposable":"Utilisez une adresse e-mail permanente, pas une adresse temporaire","emailOtp.changeEmail":"Changer d'adresse e-mail","emailOtp.backToCode":"Retour au code","emailOtp.reason_otp_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu"};import{Fragment as N,jsx as i,jsxs as s}from"react/jsx-runtime";var Oe={en:f,fr:X,ar:Q,es:f,pt:f,de:f},Z=r((e,l,O)=>{if(e===void 0)return 0;let _=Date.parse(e)-l;return Number.isFinite(_)?Math.min(O,Math.max(0,Math.ceil(_/1e3))):0},"secondsUntil"),_e=600,he=60,ye=r(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),ee=new Set(["otp_expired","otp_send_failed","otp_rate_limited","otp_resend_limit","email_invalid","email_disposable","otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","account_verification_required"]);function Ve({step:e,i18n:l,className:O,defaultEmail:_="",onError:ie}){let a=r((t,o)=>M(l.strings[t]??Oe[l.locale][t],o),"t"),[T,ae]=p(_),[h,x]=p(""),[n,w]=p(!1),[z,I]=p(null),[g,c]=p(!1),[R,te]=p(null),u=fe(null),y=e.phase==="verify",m=y&&!g,q=J(y),d=ue(),[oe,se]=B(e.reason==="otp_mismatch",e.attemptsRemaining,()=>x("")),V=y?e.codeExpiresAt??"sent":null;ce(()=>{V!==null&&(c(!1),u.current!==null&&!ee.has(e.reason??"")&&te(u.current),u.current=null)},[V]);let A=r(async t=>{w(!0),I(null);try{await t()}catch(o){I(o instanceof pe&&o.field==="email"?a("emailOtp.emailInvalid"):l.t(U(o,l.strings))),ie?.(o)}finally{w(!1)}},"run"),L=r(t=>{let o=e.needsEmail?t?R:T.trim():null;u.current=o,A(async()=>{try{await e.send(o!==null?{email:o}:{})}catch(me){throw u.current=null,me}})},"send"),D=r(t=>{A(()=>e.verify(t))},"submitCode"),ne=r(t=>{t.preventDefault(),m?D(h):L(!1)},"onSubmit"),S=Z(e.codeExpiresAt,q,_e),E=Z(e.resendAvailableAt,q,he),v=m&&e.codeExpiresAt!==void 0&&S===0,$=e.needsEmail&&!e.attemptsExhausted,P=y&&(e.codeExpiresAt===void 0||S>0),W=m&&$?()=>c(!0):g&&P?()=>c(!1):null;K(W===null?null:n?()=>{}:W);let[re,le]=a("emailOtp.sentTo").split("{email}"),H=e.context.simulation?.otpCode,de=e.reason==="otp_mismatch"?s(b,{tone:"danger",children:[i("span",{children:a("emailOtp.reason_otp_mismatch")}),i("span",{children:j(l,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&ee.has(e.reason)?i(b,{tone:"warning",children:i("span",{children:a(`emailOtp.reason_${e.reason}`)})}):null;return s("form",{className:`sekyro-step sekyro-otp${O?` ${O}`:""}`,"aria-labelledby":d,onSubmit:ne,noValidate:!0,children:[i(Y,{id:d,title:a(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m&&H!==void 0?i(G,{template:l.t("sandbox.otpHint"),code:H}):m?s(N,{children:[re,i("bdi",{dir:"ltr",className:"sekyro-mono",children:R??e.sentToMasked}),le]}):a("emailOtp.sendDescription")}),de,z!==null?i(b,{tone:"danger",children:i("span",{children:z})}):null,m?s(N,{children:[s("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:a("emailOtp.codeLabel")}),i(F,{id:`${d}-code`,value:h,invalid:oe,onChange:t=>{t!==""&&se(),x(t),t.length===6&&h.length!==6&&!n&&!e.attemptsExhausted&&D(t)}}),i("span",{className:`sekyro-help sekyro-otp-expiry${v?" is-danger":""}`,"aria-hidden":!v||void 0,children:v?a("emailOtp.expired"):a("emailOtp.expiresIn",{time:ye(S)})})]}),i("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:v?a("emailOtp.expired"):""}),s(k,{children:[i(C,{type:"submit",full:!0,disabled:n||h.length!==6,"aria-busy":n||void 0,children:a("emailOtp.verify")}),s("div",{className:"sekyro-resend-row",children:[i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:n||E>0,onClick:()=>L(!0),children:E>0?a("emailOtp.resendIn",{seconds:E}):a("emailOtp.resend")}),$?i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:n,onClick:()=>c(!0),"data-testid":"sekyro-otp-change",children:a("emailOtp.changeEmail")}):null]})]})]}):s(N,{children:[e.needsEmail?s("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${d}-email`,children:a("emailOtp.emailLabel")}),i("input",{id:`${d}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:a("emailOtp.emailPlaceholder"),value:T,"aria-describedby":`${d}-email-help`,onChange:t=>ae(t.target.value)}),i("span",{id:`${d}-email-help`,className:"sekyro-help",children:a("emailOtp.emailHelper")})]}):i("p",{className:"sekyro-text-muted",children:a("emailOtp.prefilledNotice")}),s(k,{children:[i(C,{type:"submit",full:!0,disabled:n,"aria-busy":n||void 0,children:a("emailOtp.send")}),g&&P?i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:n,onClick:()=>c(!1),"data-testid":"sekyro-otp-back-to-code",children:a("emailOtp.backToCode")}):null]})]})]})}r(Ve,"EmailOtpView");export{Ve as EmailOtpView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as he,b as Y,c as T,d as ge,e as be,f as ke,g as W}from"./chunk-LUSKU2HP.js";import{a as x}from"./chunk-G3BC56US.js";import{f as U,j as Q}from"./chunk-G6HP3HNE.js";import"./chunk-RVY5IHV4.js";import"./chunk-7MMT5M4E.js";import{a as fe,b as B,c as ye}from"./chunk-55NNQK5P.js";import{a as de}from"./chunk-VRDPGOXM.js";import{d as K}from"./chunk-AKUQWUZO.js";import{a as D,b as me,d as H,p as _}from"./chunk-X37A2AZL.js";import"./chunk-2XILMIVI.js";import{a as S,s as V}from"./chunk-ZBABRSO2.js";import{a as m}from"./chunk-2KED7D2Q.js";import{HostedApiError as ze,queryCameraPermission as Qe}from"@sekyro/web";import{detectIsMobile as oe}from"@sekyro/web/core";import{useEffect as M,useId as L,useMemo as C,useRef as $,useState as I}from"react";var ve={"consent.human.terms.intro":"تؤكد Sekyro AI أن شخصًا حقيقيًا يُجري هذه الخطوة، نيابةً عن الجهة التي طلبتها.","consent.human.terms.data":"تلتقط Sekyro AI تسجيلًا قصيرًا لوجهك.","consent.human.terms.processing":"يُفحص هذا التسجيل للتأكد من أنك شخص حقيقي وحاضر، وقد يُقارَن بالوجوه التي سبق التحقق منها لدى هذه الجهة.","consent.human.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.human.terms.retention":"تُخزَّن بياناتك مشفّرة ولا يُحتفظ بها إلا للمدة التي يقتضيها القانون وإعدادات الجهة. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع الجهة التي طلبت هذا التحقق.","capture.noCamera.title":"تتطلب هذه الخطوة كاميرا","capture.noCamera.body":"اسمح بالوصول إلى الكاميرا وحاول مرة أخرى، أو تابع على هاتف مزوّد بكاميرا.","capture.noCamera.continue":"المتابعة بدون كاميرا","capture.noCamera.deniedTitle":"اسمح بالوصول إلى الكاميرا","capture.noCamera.deniedBody":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","capture.noCamera.stepsChrome":"في Chrome، اضغط على الرمز الموجود بجانب العنوان، ثم الأذونات، وفعّل الكاميرا.","capture.noCamera.stepsSamsung":"في Samsung Internet، افتح القائمة، ثم الإعدادات، المواقع والتنزيلات، أذونات المواقع، الكاميرا، واسمح لهذا الموقع.","capture.noCamera.stepsSafari":"في Safari، اضغط على زر aA في شريط العنوان، ثم إعدادات موقع الويب، واضبط الكاميرا على السماح.","capture.noCamera.stepsDesktop":"انقر على الرمز الموجود بجانب العنوان واسمح بالكاميرا لهذا الموقع.","capture.noCamera.stepsSystem":"ما زالت محظورة؟ تحقق في إعدادات هاتفك من أن متصفحك مسموح له باستخدام الكاميرا.","capture.noCamera.stillBlocked":"ما زالت الكاميرا محظورة. اتبع الخطوات أعلاه ثم أعد المحاولة.","capture.noCamera.inAppTitle":"افتح هذه الصفحة في متصفحك","capture.noCamera.inAppBody":"لا يمكن لمتصفح هذا التطبيق استخدام الكاميرا. افتح الصفحة في Chrome أو Safari للمتابعة.","choice.title":"كيف تريد المتابعة؟","choice.description":"اختر خيارًا واحدًا.","choice.switch":"استخدم خيارًا آخر","contact.title":"كيف تريد استلام الرمز؟","contact.description":"اختر خيارًا واحدًا.","contact.phone":"عبر الهاتف (واتساب أو رسالة نصية)","contact.email":"عبر البريد الإلكتروني","contact.switch":"استخدم خيارًا آخر","summary.title":"تحقق من بياناتك","summary.description":"تأكد من أن هذه بياناتك قبل الصورة الحية.","summary.fullName":"الاسم الكامل","summary.birthDate":"تاريخ الميلاد","summary.nationality":"الجنسية","summary.documentType":"الوثيقة","summary.documentNumber":"رقم الوثيقة","summary.nni":"الرقم الوطني للتعريف الموريتاني (NNI)","summary.id_number":"رقم الهوية","summary.expiryDate":"تاريخ الانتهاء","summary.portraitAlt":"الصورة المسجلة","summary.source.registry":"من سجل الحالة المدنية","summary.source.document":"مقروءة من وثيقتك","summary.source.chip":"مقروءة من شريحة وثيقتك","summary.name":"الاسم","summary.birthYear":"سنة الميلاد","summary.confirm":"تأكيد ومتابعة","summary.retakeDocument":"مسح وثيقتي مرة أخرى","summary.retakeNationalNumber":"إدخال رقمي مرة أخرى","summary.noRetake":"لم يعد بإمكانك إعادة المحاولة. تواصل مع {org} إذا كانت هذه البيانات غير صحيحة","capture.tipsIcao.title":"لصورة الهوية:","capture.tipsIcao.glasses":"انزع نظارتك","capture.tipsIcao.headwear":"انزع القبعة. يُقبل غطاء الرأس الديني إذا كان الوجه ظاهرًا بالكامل","capture.tipsIcao.expression":"حافظ على تعبير محايد وفمك مغلق","capture.tipsIcao.faceCamera":"انظر مباشرة إلى الكاميرا وعيناك مفتوحتان","capture.tipsIcao.background":"قف أمام خلفية سادة فاتحة اللون","capture.tipsIcao.lighting":"استخدم إضاءة متساوية على وجهك: دون ظلال","capture.tipsIcao.hair":"أبعد شعرك عن وجهك وعينيك","capture.tipsIcao.summary":"قف أمام جدار سادة فاتح اللون مع إضاءة متساوية على وجهك. انزع نظارتك وأي قبعة. أبعد شعرك عن وجهك، وانظر مباشرة إلى الكاميرا وعيناك مفتوحتان، وحافظ على تعبير محايد وفمك مغلق، وابقَ ثابتًا.","portrait.retakeOnly":"نجح التحقق الحي. الصورة فقط تحتاج إلى محاولة أخرى","portrait.keepCamera":"ابقَ أمام الكاميرا","handoff.description":"امسح الرمز بهاتفك للمتابعة","handoff.qrAlt":"رمز QR يفتح عملية التحقق هذه على هاتفك","handoff.copyLink":"نسخ الرابط","handoff.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة من متصفحك بدلًا من ذلك","handoff.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة على هاتفك","inApp.title":"افتح الصفحة في متصفحك","inApp.description":"لا تعمل الكاميرا جيدًا داخل هذا التطبيق. افتح الرابط في Chrome أو Safari للمتابعة.","inApp.copyLink":"نسخ الرابط","inApp.copied":"تم نسخ الرابط. الصقه في متصفحك","inApp.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة بدلًا من ذلك","inApp.continueAnyway":"المتابعة هنا على أي حال","needsApp.capture.title":"تابع في التطبيق","needsApp.capture.description":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org}.","needsApp.capture.descriptionSekyro":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org} أو في تطبيق Sekyro AI.","needsApp.capture.descriptionNoOrg":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في التطبيق الذي أُعطي لك.","needsApp.capture.descriptionNoOrgSekyro":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في تطبيق Sekyro AI.","needsApp.capture.openSekyro":"افتح في تطبيق Sekyro AI","needsApp.capture.getApp":"احصل على تطبيق Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"امسح الرمز بهاتفك لفتح هذا التحقق في التطبيق.","needsApp.capture.qrAlt":"رمز QR يفتح هذا التحقق في التطبيق","needsApp.capture.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة في التطبيق","inApp.openBrowser":"افتح في المتصفح","testerGate.action":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. إذا تطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة، فستُجري هذه الجلسة فحوصات حقيقية. وإلا فلن يُحتفظ بأي شيء وستتابع باستخدام بيانات الاختبار.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"لم يُحتفظ بأي شيء. يمكنك إعادة المحاولة أو المتابعة باستخدام بيانات الاختبار.","testerGate.retry":"أعد المحاولة","testerGate.continueTest":"المتابعة باستخدام بيانات الاختبار","testerGate.continue":"متابعة","testerGate.limitBody":"تم بلوغ الحد اليومي للفحوصات الحقيقية للمختبِرين. تابع باستخدام بيانات الاختبار، أو أعد المحاولة غدًا.","testerGate.exhaustedBody":"لم تتبقَّ أي محاولة في هذه الجلسة. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة.","testerGate.closedBody":"لا يمكن بدء الفحوصات الحقيقية إلا قبل أول التقاط. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة."};var R={"consent.human.terms.intro":"Sekyro AI confirms that a real person is completing this step, on behalf of the organization that asked for it.","consent.human.terms.data":"Sekyro AI collects a short capture of your face.","consent.human.terms.processing":"The capture is checked to confirm that you are a real person who is present. It may be compared with faces already verified for this organization.","consent.human.terms.sharing":"The organization that requested this verification learns its outcome.","consent.human.terms.retention":"Your data is stored encrypted and kept only as long as the law and the organization's settings require. To exercise your data-protection rights, contact the organization that requested this verification.","capture.noCamera.title":"This step needs a camera","capture.noCamera.body":"Allow camera access and try again, or continue on a phone with a camera.","capture.noCamera.continue":"Continue without a camera","capture.noCamera.deniedTitle":"Allow camera access","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","capture.noCamera.stepsChrome":"In Chrome, tap the icon to the left of the address, then Permissions, and turn on Camera.","capture.noCamera.stepsSamsung":"In Samsung Internet, open the menu, then Settings, Sites and downloads, Site permissions, Camera, and allow this site.","capture.noCamera.stepsSafari":"In Safari, tap the aA button in the address bar, then Website Settings, and set Camera to Allow.","capture.noCamera.stepsDesktop":"Click the icon to the left of the address and allow the camera for this site.","capture.noCamera.stepsSystem":"Still blocked? In your phone's settings, check that your browser may use the camera.","capture.noCamera.stillBlocked":"The camera is still blocked. Follow the steps above, then try again.","capture.noCamera.inAppTitle":"Open this page in your browser","capture.noCamera.inAppBody":"This app's browser can't use your camera. Open the page in Chrome or Safari to continue.","choice.title":"Choose how to continue","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"Where to send your code","contact.description":"Choose one option.","contact.phone":"By phone (WhatsApp or SMS)","contact.email":"By email","contact.switch":"Use another option","summary.title":"Check your details","summary.description":"Make sure this is you before the live photo.","summary.fullName":"Full name","summary.birthDate":"Date of birth","summary.nationality":"Nationality","summary.documentType":"Document","summary.documentNumber":"Document number","summary.nni":"Mauritanian national ID number (NNI)","summary.id_number":"ID number","summary.expiryDate":"Expiry date","summary.portraitAlt":"Photo on record","summary.source.registry":"From the civil registry","summary.source.document":"Read from your document","summary.source.chip":"Read from your document's chip","summary.name":"Name","summary.birthYear":"Year of birth","summary.confirm":"Confirm and continue","summary.retakeDocument":"Scan my document again","summary.retakeNationalNumber":"Enter my number again","summary.noRetake":"You can't try again. Contact {org} if these details are wrong","capture.tipsIcao.title":"For your ID photo:","capture.tipsIcao.glasses":"Remove your glasses","capture.tipsIcao.headwear":"Remove hats and caps. A religious head covering is fine if your whole face shows","capture.tipsIcao.expression":"Keep a neutral expression with your mouth closed","capture.tipsIcao.faceCamera":"Look straight at the camera with your eyes open","capture.tipsIcao.background":"Stand in front of a plain, light background","capture.tipsIcao.lighting":"Use even light on your face: no shadows","capture.tipsIcao.hair":"Keep your hair away from your face and eyes","capture.tipsIcao.summary":"Stand in front of a plain, light wall with even light on your face. Remove your glasses and any hat. Keep your hair off your face, look straight at the camera with your eyes open, keep a neutral expression with your mouth closed, and hold still.","portrait.retakeOnly":"Your live check passed. Only the photo needs another try","portrait.keepCamera":"Stay in front of the camera","handoff.description":"Scan with your phone to continue","handoff.qrAlt":"QR code that opens this verification on your phone","handoff.copyLink":"Copy link","handoff.copyFailed":"We couldn't copy the link. Copy this page's address from your browser instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open in your browser","inApp.description":"The camera doesn't work well inside this app. Open the link in Chrome or Safari to continue.","inApp.copyLink":"Copy link","inApp.copied":"Link copied. Paste it in your browser","inApp.copyFailed":"We couldn't copy the link. Copy this page's address instead","inApp.continueAnyway":"Continue here anyway","needsApp.capture.title":"Continue in the app","needsApp.capture.description":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app.","needsApp.capture.descriptionSekyro":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app or in the Sekyro AI app.","needsApp.capture.descriptionNoOrg":"This verification takes the photos in a mobile app. Open it in the app you were given.","needsApp.capture.descriptionNoOrgSekyro":"This verification takes the photos in a mobile app. Open it in the Sekyro AI app.","needsApp.capture.openSekyro":"Open in the Sekyro AI app","needsApp.capture.getApp":"Get the Sekyro AI app","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scan with your phone to open this verification in the app.","needsApp.capture.qrAlt":"QR code that opens this verification in the app","needsApp.capture.waiting":"This page moves on when you finish in the app","inApp.openBrowser":"Open in browser","testerGate.action":"Run real checks as a tester","testerGate.title":"Run real checks as a tester","testerGate.body":"Look at the camera. If your face matches one of the organization's enrolled testers, this session runs real checks. If not, nothing is kept and you continue with test data.","testerGate.start":"Start","testerGate.checking":"Checking your face","testerGate.boundTitle":"Real checks are on","testerGate.boundBody":"You were recognised as an enrolled tester. The next steps run real checks.","testerGate.missTitle":"No enrolled tester matched","testerGate.missBody":"Nothing was kept. You can try again or continue with test data.","testerGate.retry":"Try again","testerGate.continueTest":"Continue with test data","testerGate.continue":"Continue","testerGate.limitBody":"Today's limit of real checks for testers is reached. Continue with test data, or try again tomorrow.","testerGate.exhaustedBody":"No tries are left on this session. Continue with test data, or start a new session.","testerGate.closedBody":"Real checks can start only before the first capture. Continue with test data, or start a new session."};var Ae={"consent.human.terms.intro":"Sekyro AI confirme qu'une personne réelle effectue cette étape, pour le compte de l'organisme qui l'a demandée.","consent.human.terms.data":"Sekyro AI recueille une courte capture de votre visage.","consent.human.terms.processing":"La capture est analysée pour confirmer que vous êtes une personne réelle et présente. Elle peut être comparée aux visages déjà vérifiés pour cet organisme.","consent.human.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.human.terms.retention":"Vos données sont stockées chiffrées et conservées uniquement pendant la durée exigée par la loi et les paramètres de l'organisme. Pour exercer vos droits en matière de protection des données, contactez l'organisme qui a demandé cette vérification.","capture.noCamera.title":"Une caméra est nécessaire","capture.noCamera.body":"Autorisez l'accès à la caméra et réessayez, ou continuez sur un téléphone équipé d'une caméra.","capture.noCamera.continue":"Continuer sans caméra","capture.noCamera.deniedTitle":"Autorisez la caméra","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","capture.noCamera.stepsChrome":"Dans Chrome, touchez l'icône à gauche de l'adresse, puis Autorisations, et activez Caméra.","capture.noCamera.stepsSamsung":"Dans Samsung Internet, ouvrez le menu, puis Paramètres, Sites et téléchargements, Autorisations des sites, Appareil photo, et autorisez ce site.","capture.noCamera.stepsSafari":"Dans Safari, touchez le bouton aA de la barre d'adresse, puis Réglages du site web, et réglez Caméra sur Autoriser.","capture.noCamera.stepsDesktop":"Cliquez sur l'icône à gauche de l'adresse et autorisez la caméra pour ce site.","capture.noCamera.stepsSystem":"Toujours bloquée ? Dans les réglages du téléphone, vérifiez que votre navigateur peut utiliser la caméra.","capture.noCamera.stillBlocked":"La caméra est toujours bloquée. Suivez les étapes ci-dessus, puis réessayez.","capture.noCamera.inAppTitle":"Ouvrez cette page dans votre navigateur","capture.noCamera.inAppBody":"Le navigateur de cette application ne peut pas utiliser votre caméra. Ouvrez la page dans Chrome ou Safari pour continuer.","choice.title":"Comment continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Où envoyer votre code ?","contact.description":"Choisissez une option.","contact.phone":"Par téléphone (WhatsApp ou SMS)","contact.email":"Par e-mail","contact.switch":"Utiliser une autre option","summary.title":"Vérifiez vos informations","summary.description":"Assurez-vous qu'il s'agit bien de vous avant la photo en direct.","summary.fullName":"Nom complet","summary.birthDate":"Date de naissance","summary.nationality":"Nationalité","summary.documentType":"Document","summary.documentNumber":"Numéro du document","summary.nni":"Numéro national d'identification mauritanien (NNI)","summary.id_number":"Numéro d'identité","summary.expiryDate":"Date d'expiration","summary.portraitAlt":"Photo enregistrée","summary.source.registry":"Issu de l'état civil","summary.source.document":"Lu sur votre document","summary.source.chip":"Lu sur la puce de votre document","summary.name":"Nom","summary.birthYear":"Année de naissance","summary.confirm":"Confirmer et continuer","summary.retakeDocument":"Scanner à nouveau mon document","summary.retakeNationalNumber":"Saisir à nouveau mon numéro","summary.noRetake":"Vous ne pouvez plus réessayer. Contactez {org} si ces informations sont incorrectes","capture.tipsIcao.title":"Pour votre photo d'identité :","capture.tipsIcao.glasses":"Retirez vos lunettes","capture.tipsIcao.headwear":"Retirez chapeau et casquette. Un couvre-chef religieux est accepté si tout le visage est visible","capture.tipsIcao.expression":"Gardez une expression neutre, la bouche fermée","capture.tipsIcao.faceCamera":"Regardez la caméra bien en face, les yeux ouverts","capture.tipsIcao.background":"Placez-vous devant un fond uni et clair","capture.tipsIcao.lighting":"Éclairez votre visage de façon uniforme : sans ombres","capture.tipsIcao.hair":"Dégagez vos cheveux du visage et des yeux","capture.tipsIcao.summary":"Placez-vous devant un mur uni et clair, le visage éclairé de façon uniforme. Retirez vos lunettes et tout chapeau. Dégagez vos cheveux du visage, regardez la caméra bien en face, les yeux ouverts, gardez une expression neutre, la bouche fermée, et ne bougez plus.","portrait.retakeOnly":"Votre vérification en direct est validée. Seule la photo est à refaire","portrait.keepCamera":"Restez face à la caméra","handoff.description":"Scannez avec votre téléphone pour continuer","handoff.qrAlt":"Code QR qui ouvre cette vérification sur votre téléphone","handoff.copyLink":"Copier le lien","handoff.copyFailed":"Nous n'avons pas pu copier le lien. Copiez plutôt l'adresse de cette page depuis votre navigateur","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez dans le navigateur","inApp.description":"La caméra fonctionne mal dans cette application. Ouvrez le lien dans Chrome ou Safari pour continuer.","inApp.copyLink":"Copier le lien","inApp.copied":"Lien copié. Collez-le dans votre navigateur","inApp.copyFailed":"Impossible de copier le lien. Copiez plutôt l'adresse de cette page","inApp.continueAnyway":"Continuer ici quand même","needsApp.capture.title":"Continuez dans l’application","needsApp.capture.description":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org}.","needsApp.capture.descriptionSekyro":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org} ou dans l’application Sekyro AI.","needsApp.capture.descriptionNoOrg":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application que l’on vous a indiquée.","needsApp.capture.descriptionNoOrgSekyro":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application Sekyro AI.","needsApp.capture.openSekyro":"Ouvrir dans l’application Sekyro AI","needsApp.capture.getApp":"Obtenir l’application Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scannez avec votre téléphone pour ouvrir cette vérification dans l’application.","needsApp.capture.qrAlt":"QR code qui ouvre cette vérification dans l’application","needsApp.capture.waiting":"Cette page avancera d’elle-même une fois l’étape terminée dans l’application","inApp.openBrowser":"Ouvrir dans le navigateur","testerGate.action":"Lancer de vrais contrôles en tant que testeur","testerGate.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Si votre visage correspond à l'un des testeurs inscrits de l'organisation, cette session lance de vrais contrôles. Sinon, rien n'est conservé et vous continuez avec des données de test.","testerGate.start":"Commencer","testerGate.checking":"Vérification de votre visage","testerGate.boundTitle":"Les vrais contrôles sont activés","testerGate.boundBody":"Vous avez été reconnu comme testeur inscrit. Les étapes suivantes lancent de vrais contrôles.","testerGate.missTitle":"Aucun testeur inscrit ne correspond","testerGate.missBody":"Rien n'a été conservé. Vous pouvez réessayer ou continuer avec des données de test.","testerGate.retry":"Réessayer","testerGate.continueTest":"Continuer avec des données de test","testerGate.continue":"Continuer","testerGate.limitBody":"La limite de vrais contrôles pour les testeurs est atteinte pour aujourd'hui. Continuez avec des données de test, ou réessayez demain.","testerGate.exhaustedBody":"Il ne reste plus d'essai sur cette session. Continuez avec des données de test, ou lancez une nouvelle session.","testerGate.closedBody":"Les vrais contrôles ne peuvent commencer qu'avant la première capture. Continuez avec des données de test, ou lancez une nouvelle session."};var Se={M:{perBlock:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26],blocks:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16],formatBits:0},H:{perBlock:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28],blocks:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25],formatBits:2}},we=20;function Oe(e){let t=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}m(Oe,"rawDataModules");function Ce(e,t){let{perBlock:r,blocks:n}=Se[t],o=r[e-1],i=n[e-1],c=Math.floor(Oe(e)/8),s=i-c%i,a=Math.floor(c/i)-o;return[o,s===i?[[i,a]]:[[s,a],[i-s,a+1]]]}m(Ce,"blockLayout");var Z=m((e,t)=>Ce(e,t)[1].reduce((r,[n,o])=>r+n*o,0),"dataCapacity");function j(e,t){let r=0;for(let n=7;n>=0;n-=1)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r&255}m(j,"gfMul");function Me(e){let t=new Array(e).fill(0);t[e-1]=1;let r=1;for(let n=0;n<e;n+=1){for(let o=0;o<e;o+=1)t[o]=j(t[o],r),o+1<e&&(t[o]=t[o]^t[o+1]);r=j(r,2)}return t}m(Me,"rsDivisor");function Le(e,t){let r=t.map(()=>0);for(let n of e){let o=n^r.shift();r.push(0),t.forEach((i,c)=>{r[c]=r[c]^j(i,o)})}return r}m(Le,"rsRemainder");function Fe(e,t,r){let n=[],o=m((p,d)=>{for(let h=d-1;h>=0;h-=1)n.push(p>>>h&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let p of e)o(p,8);let i=Z(t,r)*8;o(0,Math.min(4,i-n.length)),o(0,(8-n.length%8)%8);let c=[];for(let p=0;p<n.length;p+=8)c.push(n.slice(p,p+8).reduce((d,h)=>d<<1|h,0));for(let p=236;c.length<Z(t,r);p^=253)c.push(p);let[s,a]=Ce(t,r),l=Me(s),f=[],b=0;for(let[p,d]of a)for(let h=0;h<p;h+=1){let A=c.slice(b,b+d);b+=d,f.push({data:A,ec:Le(A,l)})}let y=[],g=Math.max(...f.map(p=>p.data.length));for(let p=0;p<g;p+=1)for(let d of f)p<d.data.length&&y.push(d.data[p]);for(let p=0;p<s;p+=1)for(let d of f)y.push(d.ec[p]);return y}m(Fe,"codewords");function Ie(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=Math.ceil((e*4+4)/(t*2-2))*2,n=[6];for(let o=e*4+10;n.length<t;o-=r)n.splice(1,0,o);return n}m(Ie,"alignmentPositions");var Ve=[(e,t)=>(e+t)%2===0,e=>e%2===0,(e,t)=>t%3===0,(e,t)=>(e+t)%3===0,(e,t)=>(Math.floor(e/2)+Math.floor(t/3))%2===0,(e,t)=>e*t%2+e*t%3===0,(e,t)=>(e*t%2+e*t%3)%2===0,(e,t)=>((e+t)%2+e*t%3)%2===0],re=class re{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,r,n){this.dark[t*this.size+r]=n,this.fixed[t*this.size+r]=!0}get(t,r){return this.dark[t*this.size+r]===!0}};m(re,"Grid");var X=re;function De(e,t){let r=e.size;for(let i=0;i<r;i+=1)e.set(6,i,i%2===0),e.set(i,6,i%2===0);for(let[i,c]of[[3,3],[3,r-4],[r-4,3]])for(let s=-4;s<=4;s+=1)for(let a=-4;a<=4;a+=1){let l=i+s,f=c+a;if(l<0||l>=r||f<0||f>=r)continue;let b=Math.max(Math.abs(s),Math.abs(a));e.set(l,f,b!==2&&b!==4)}let n=Ie(t),o=n.length-1;if(n.forEach((i,c)=>n.forEach((s,a)=>{if(!(c===0&&a===0||c===0&&a===o||c===o&&a===0))for(let l=-2;l<=2;l+=1)for(let f=-2;f<=2;f+=1)e.set(i+l,s+f,Math.max(Math.abs(l),Math.abs(f))!==1)})),xe(e,0),t>=7){let i=t;for(let s=0;s<12;s+=1)i=i<<1^(i>>>11)*7973;let c=t<<12|i;for(let s=0;s<18;s+=1){let a=(c>>>s&1)===1,l=r-11+s%3,f=Math.floor(s/3);e.set(l,f,a),e.set(f,l,a)}}}m(De,"drawFunctionPatterns");function xe(e,t,r=0){let n=e.size,o=r<<3|t,i=o;for(let a=0;a<10;a+=1)i=i<<1^(i>>>9)*1335;let c=(o<<10|i)^21522,s=m(a=>(c>>>a&1)===1,"bit");for(let a=0;a<=5;a+=1)e.set(a,8,s(a));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let a=9;a<15;a+=1)e.set(8,14-a,s(a));for(let a=0;a<8;a+=1)e.set(8,n-1-a,s(a));for(let a=8;a<15;a+=1)e.set(n-15+a,8,s(a));e.set(n-8,8,!0)}m(xe,"drawFormat");function He(e,t){let r=e.size,n=0;for(let o=r-1;o>=1;o-=2){o===6&&(o=5);for(let i=0;i<r;i+=1)for(let c=0;c<2;c+=1){let s=o-c,l=(o+1&2)===0?r-1-i:i;e.fixed[l*r+s]!==!0&&(n<t.length*8&&(e.dark[l*r+s]=(t[n>>>3]>>>7-(n&7)&1)===1),n+=1)}}}m(He,"placeData");function $e(e,t){let r=Ve[t];for(let n=0;n<e.size;n+=1)for(let o=0;o<e.size;o+=1)e.fixed[n*e.size+o]!==!0&&r(n,o)&&(e.dark[n*e.size+o]=!e.dark[n*e.size+o])}m($e,"applyMask");function qe(e){let t=e.size,r=0,n=m(i=>{let c=1;for(let s=1;s<=t;s+=1)s<t&&i(s)===i(s-1)?c+=1:(c>=5&&(r+=3+(c-5)),c=1);for(let s=0;s+10<t;s+=1){let a=[!0,!1,!0,!0,!0,!1,!0];if(!(a.every((y,g)=>i(s+g)===y)||a.every((y,g)=>i(s+4+g)===y)))continue;let f=[0,1,2,3].every(y=>!i(s+y))&&a.every((y,g)=>i(s+4+g)===y),b=a.every((y,g)=>i(s+g)===y)&&[7,8,9,10].every(y=>!i(s+y));f&&(r+=40),b&&(r+=40)}},"line");for(let i=0;i<t;i+=1)n(c=>e.get(i,c));for(let i=0;i<t;i+=1)n(c=>e.get(c,i));for(let i=0;i+1<t;i+=1)for(let c=0;c+1<t;c+=1){let s=e.get(i,c);s===e.get(i,c+1)&&s===e.get(i+1,c)&&s===e.get(i+1,c+1)&&(r+=3)}let o=e.dark.filter(Boolean).length;return r+=Math.floor(Math.abs(o*20-t*t*10)/(t*t))*10,r}m(qe,"penalty");function J(e,t={}){let r=t.ecl??"M",n=new TextEncoder().encode(e),o=1;for(;o<=we&&!(4+(o<10?8:16)+n.length*8<=Z(o,r)*8);o+=1);if(o>we)throw new RangeError("text too long for a QR code");let i=Fe(n,o,r),c=m(l=>{let f=new X(o*4+17);return De(f,o),He(f,i),$e(f,l),xe(f,l,Se[r].formatBits),f},"build"),s=null;if(t.mask!==void 0)s=c(t.mask);else{let l=Number.POSITIVE_INFINITY;for(let f=0;f<8;f+=1){let b=c(f),y=qe(b);y<l&&(l=y,s=b)}}let a=s;return{size:a.size,get:m((l,f)=>a.get(l,f),"get")}}m(J,"encodeQr");var ee={viewBox:"0 0 100 100",d:"M22.37,0H77.63A22.37,22.37 0 0 1 100,22.37V77.63A22.37,22.37 0 0 1 77.63,100H22.37A22.37,22.37 0 0 1 0,77.63V22.37A22.37,22.37 0 0 1 22.37,0ZM48.067,21H38.308A17.308,17.308 0 0 0 21,38.308V42.543A19.886,19.886 0 0 0 40.886,62.429H60.219V57.641A4.419,4.419 0 0 0 55.8,53.222H43.463A11.416,11.416 0 0 1 32.048,41.806V38.308A8.102,8.102 0 0 1 40.149,30.206H43.648A4.419,4.419 0 0 0 48.067,25.787ZM38.676,79H59.114A19.886,19.886 0 0 0 79,59.114V57.457A19.886,19.886 0 0 0 59.114,37.571H38.676V42.359A4.419,4.419 0 0 0 43.095,46.778H56.537A11.416,11.416 0 0 1 67.952,58.194V58.378A11.416,11.416 0 0 1 56.537,69.794H43.095A4.419,4.419 0 0 0 38.676,74.213ZM51.933,21H79V37.571H69.794V30.206H51.933ZM21,71.543A7.457,7.457 0 1 0 35.914,71.543A7.457,7.457 0 1 0 21,71.543Z"},O=.42,Ee=.2,v=m(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function G(e,t,r,n){let o=`A${v(n)} ${v(n)} 0 0 1 `;return`M${v(e+n)} ${v(t)}H${v(e+r-n)}${o}${v(e+r)} ${v(t+n)}V${v(t+r-n)}${o}${v(e+r-n)} ${v(t+r)}H${v(e+n)}${o}${v(e)} ${v(t+r-n)}V${v(t+n)}${o}${v(e+n)} ${v(t)}Z`}m(G,"roundedSquare");function Ue(e){let t=(e-17)/4,r=Ie(t),n=r.length-1,o=[];return r.forEach((i,c)=>r.forEach((s,a)=>{c===0&&a===0||c===0&&a===n||c===n&&a===0||o.push([i,s])})),o}m(Ue,"alignmentCentres");function te(e,{quiet:t=4,logo:r=!1}={}){let n=e.size,o=m((p,d)=>p<7&&d<7||p<7&&d>=n-7||p>=n-7&&d<7,"isFinder"),i=Math.floor(n*Ee),c=r?i%2===0?i-1:i:0,s=(n-c)/2,a=m((p,d)=>c>0&&p>=s&&p<s+c&&d>=s&&d<s+c,"inZone"),l=Ue(n).filter(([p,d])=>!a(p,d)),f=m((p,d)=>l.some(([h,A])=>Math.abs(p-h)<=2&&Math.abs(d-A)<=2),"isAlign"),b=`a${v(O)} ${v(O)} 0 1 0 `,y="";for(let p=0;p<n;p+=1)for(let d=0;d<n;d+=1)!e.get(p,d)||o(p,d)||f(p,d)||a(p,d)||(y+=`M${v(d+t+.5-O)} ${v(p+t+.5)}${b}${v(2*O)} 0${b}${v(-2*O)} 0Z`);let g="";for(let[p,d]of[[0,0],[0,n-7],[n-7,0]]){let h=d+t,A=p+t;g+=G(h,A,7,1.6)+G(h+1,A+1,5,.6)+G(h+2,A+2,3,.6)}for(let[p,d]of l){let h=d-2+t,A=p-2+t;g+=G(h,A,5,1.2)+G(h+1,A+1,3,.5)+G(h+2,A+2,1,.5)}return{size:n+t*2,dots:y,finders:g,logo:c>0?{x:s+t+.5,y:s+t+.5,size:c-1}:null}}m(te,"styledQr");function ne(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${v(e.x)} ${v(e.y)}) scale(${t})`}m(ne,"qrLogoTransform");import{Fragment as N,jsx as u,jsxs as k}from"react/jsx-runtime";var Ke={en:R,fr:Ae,ar:ve,es:R,pt:R,de:R},_e={en:B,fr:ye,ar:fe,es:B,pt:B,de:B};function w(e){let t=e.strings;return(r,n)=>K(t[r]??Ke[e.locale][r]??"",n)}m(w,"flowT");function Ge(e,t){let r=w(t);return e.flatMap(n=>{let o=n.service==="phone_otp"?r("contact.phone"):n.service==="email_otp"?r("contact.email"):Y(n,t),i=he[n.service];return o===null?[]:[{id:n.id,label:o,...i!==void 0?{glyph:u(D,{name:i})}:{}}]})}m(Ge,"labelled");function Pe({step:e,i18n:t,onError:r}){let n=w(t),{busy:o,error:i,run:c}=T(t,r),s=e.kind==="contact_choice";return u(U,{title:n(s?"contact.title":"choice.title"),description:n(s?"contact.description":"choice.description"),options:Ge(e.choice.options,t),busy:o,error:i,focus:!0,testId:s?"sekyro-contact-choice":"sekyro-choice",onChoose:a=>c(()=>e.choose(a))})}m(Pe,"PlanChoiceView");var Bt=Pe,Tt=Pe;function Rt({step:e,i18n:t,onError:r,onOpen:n}){let o=w(t),{busy:i,error:c,run:s}=T(t,r),a=e,l=e.context.switchable,f=l===void 0?[]:l.options.filter(h=>h.id!==l.current),b=a.kind==="registry"&&(a.reason==="nni_not_found"||a.reason==="registry_record_not_found")&&a.canUseDocument||a.kind==="eid"&&a.reason?.startsWith("eid_")&&a.canUseCamera,y=f.length===1?f[0]:void 0,g=y!==void 0&&(y.service==="phone_otp"||y.service==="email_otp"),p=g&&a.canSwitch&&a.switchTo!==void 0?()=>a.switchTo.call(e):a.chooseOption===void 0||y===void 0?void 0:()=>a.chooseOption.call(e,y.id);if(f.length===0||b||y!==void 0&&(p===void 0||d()===null)||y===void 0&&a.chooseOption===void 0)return null;function d(){return y===void 0?o("choice.switch"):y.service==="phone_otp"||y.service==="email_otp"?o("contact.switch"):a.kind==="registry"&&y.service==="document"?t.t("population.useDocument"):a.kind==="eid"?t.strings["eid.useCamera"]??_e[t.locale]["eid.useCamera"]:Y(y,t)}return m(d,"labelOf"),k("div",{className:"sekyro-stack sekyro-stack--1",children:[c!==null?u(_,{tone:"danger",children:u("span",{children:c})}):null,u(S,{kind:"secondary",disabled:i,"aria-busy":i||void 0,onClick:()=>p===void 0?n():s(p),"data-testid":g?"sekyro-contact-switch":"sekyro-lane-switch",children:d()})]})}m(Rt,"LaneSwitch");function Ot({step:e,i18n:t,onError:r,onClose:n}){let o=w(t),{busy:i,error:c,run:s}=T(t,r),a=e.context.switchable,l=e.chooseOption;return a===void 0||l===void 0?null:u(U,{title:o("choice.title"),description:o("choice.description"),options:Ge(a.options,t),...a.current!==null?{marked:a.current}:{},busy:i,error:c,focus:!0,testId:"sekyro-lane-choice",onChoose:f=>f===a.current?n():s(()=>l.call(e,f))})}m(Ot,"LaneChoiceView");var Ye=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["idNumberMasked","summary.id_number",!0],["expiryDate","summary.expiryDate",!0]];function We(e){let[t,r]=I(null);return M(()=>{if(!e.portraitAvailable)return;let n=!0,o=null;return e.portrait().then(i=>{!n||i===null||!i.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(o=URL.createObjectURL(i),r(o))}),()=>{n=!1,o!==null&&URL.revokeObjectURL(o)}},[e.portraitAvailable]),t}m(We,"usePortraitUrl");var Ze=m(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function je(e,t){try{return new Intl.DateTimeFormat(t==="ar"?"ar-u-nu-latn":t,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))}catch{return e}}m(je,"formatDate");function Mt({step:e,i18n:t,onError:r}){let n=w(t),o=L(),i=V(),c=We(e),{busy:s,error:a,run:l}=T(t,r),f=e.context.orgName,b=["registry","document","chip"].find(p=>p===e.source),y=e.summaryKind==="partial",g=m(p=>t.strings[`doc.type.${p}`]??p,"documentLabel");return k("section",{className:"sekyro-step","aria-labelledby":o,"data-testid":"sekyro-identity-summary",children:[k("div",{className:"sekyro-heading",children:[u("h2",{id:o,ref:i,tabIndex:-1,className:"sekyro-text-body",children:n("summary.title")}),u("p",{className:"sekyro-text-muted",children:n("summary.description")})]}),b!==void 0?u("p",{className:"sekyro-summary__source",children:n(`summary.source.${b}`)}):null,k("div",{className:"sekyro-summary",children:[c!==null?u("img",{className:"sekyro-summary__portrait",src:c,alt:n("summary.portraitAlt")}):null,u("dl",{className:"sekyro-summary__list",children:Ye.map(([p,d,h])=>{let A=p==="idNumberMasked"?e.idNumberMasked??e.nniMasked:e[p];return A===void 0?null:k("div",{className:"sekyro-summary__row",children:[u("dt",{className:"sekyro-text-muted",children:n(p==="fullName"&&y?"summary.name":d)}),u("dd",{children:Ze(A)?je(A,t.locale):h?u("bdi",{dir:"ltr",children:A}):p==="documentType"?g(A):A})]},p)})})]}),a!==null?u(_,{tone:"danger",children:u("span",{children:a})}):null,e.retakeAvailable?null:u("p",{className:"sekyro-text-muted",children:n("summary.noRetake",{org:f})}),k(H,{children:[u(S,{full:!0,disabled:s,"aria-busy":s||void 0,onClick:()=>l(()=>e.confirm()),children:n("summary.confirm")}),e.retakeAvailable?u(S,{kind:"secondary",full:!0,disabled:s,onClick:()=>l(()=>e.retake()),children:n(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}m(Mt,"IdentitySummaryView");var Xe=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Lt({step:e,i18n:t,livenessProps:r,sekyroIntro:n}){let o=w(t),[i,c]=I(null);M(()=>e.onLivePhoto(d=>{let h=d.update?.coach;c(d.holding||h===void 0?null:t.t(`portrait.coach.${h}`))}),[e,t]);let s=e.instructions==="icao",a=C(()=>ge(e),[e]),l=e.icao?.profile==="selfie",f=C(()=>s?Xe.filter(d=>!l||d!=="background").map(d=>({id:d,text:o(`capture.tipsIcao.${d}`)})):void 0,[s,l,t]),b=C(()=>s&&!l?{...r.strings,"capture.tips.title":o("capture.tipsIcao.title")}:r.strings,[s,l,r.strings,t]),y=l?void 0:o("capture.tipsIcao.title"),g=C(()=>n===!0&&f!==void 0?{...r.slots,intro:m((d,h)=>u(be,{start:d,context:h,tips:f,...y!==void 0?{tipsTitle:y}:{},...a!==void 0?{retry:a}:{}}),"intro")}:r.slots,[n,f,y,a,r.slots,t]),p=l?`${(f??[]).map(d=>d.text).join(". ")}.`:o("capture.tipsIcao.summary");return u(Q,{...r,...g!==void 0?{slots:g}:{},...b!==void 0?{strings:b}:{},...f!==void 0?{tips:f,tipsSummary:p}:{},coach:i})}m(Lt,"LivePhotoLiveness");function Ft({i18n:e}){let t=w(e);return k(_,{tone:"info",children:[u("strong",{children:t("portrait.retakeOnly")}),u("span",{children:t("portrait.keepCamera")})]})}m(Ft,"PortraitRetakeNotice");function Vt({i18n:e,provider:t}){let r=e.strings,n=m(o=>r[o]??_e[e.locale][o]??"","pick");return u("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?K(n("eid.continueHint"),{provider:t}):n("eid.continueHintGeneric")})}m(Vt,"EidContinueHint");async function Je(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(Je,"copy");function ae({url:e,i18n:t,label:r,primary:n}){let o=w(t),[i,c]=I("idle"),s=r.startsWith("inApp.")?"inApp":"handoff";return k("div",{className:"sekyro-stack sekyro-stack--1",children:[u(S,{kind:n?"primary":"secondary",full:!0,onClick:()=>{Je(e).then(a=>c(a?"copied":"failed"))},children:o(r)}),u("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:i==="idle"?"":o(`${s}.${i==="copied"?"copied":"copyFailed"}`)})]})}m(ae,"CopyLink");function Be({url:e,i18n:t,refresh:r,footer:n,lead:o}){let i=w(t),c=L(),s=C(()=>{try{return te(J(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]),a=$(r);a.current=r;let l=V();return M(()=>{let f=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&a.current?.().catch(()=>{})},5e3);return()=>clearInterval(f)},[]),k("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":c,"data-testid":"sekyro-handoff",children:[k("div",{className:"sekyro-heading",children:[u("h2",{id:c,ref:l,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),o!==void 0?u("p",{children:o}):null,u("p",{className:"sekyro-text-muted",children:i("handoff.description")})]}),s!==null?k("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":i("handoff.qrAlt"),children:[u("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),u("path",{d:s.dots,className:"sekyro-qr__fg"}),u("path",{d:s.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),s.logo!==null?u("path",{d:ee.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:ne(s.logo),"data-qr-mark":""}):null]}):null,k("p",{className:"sekyro-handoff__waiting",role:"status",children:[u("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),i("handoff.waiting")]}),k(H,{children:[u(ae,{url:e,i18n:t,label:"handoff.copyLink"}),n??null]})]})}m(Be,"HandoffView");var Ne={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function Dt({i18n:e,org:t,nativeApp:r,fallbackUrl:n,refresh:o,footer:i}){let c=w(e),s=C(()=>!oe(),[]),a=r.link??n,l=C(()=>{if(!s||a===void 0||a==="")return null;try{return te(J(a,{ecl:"H"}),{logo:!0})}catch{return null}},[s,a]),f=$(o);f.current=o,M(()=>{let h=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&f.current?.().catch(()=>{})},5e3);return()=>clearInterval(h)},[]);let[b,y]=I(!1),g=m(()=>{o!==void 0&&(y(!0),o().catch(()=>{}).finally(()=>y(!1)))},"again"),p=r.sekyroApp,d=t!==""?c(p?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):c(p?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return k(x,{tone:"brand",icon:"smartphone",title:c("needsApp.capture.title"),testId:"sekyro-native-app",actions:k(N,{children:[!s&&p&&r.sekyroAppLink!==void 0?u("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:r.sekyroAppLink,"data-testid":"sekyro-open-sekyro-app",children:c("needsApp.capture.openSekyro")}):null,o!==void 0?u(S,{kind:"secondary",full:!0,disabled:b,onClick:g,children:e.t("common.refresh")}):null,i??null]}),children:[u("p",{children:d}),l!==null?k(N,{children:[k("svg",{className:"sekyro-qr",viewBox:`0 0 ${l.size} ${l.size}`,role:"img","aria-label":c("needsApp.capture.qrAlt"),children:[u("rect",{width:l.size,height:l.size,className:"sekyro-qr__bg"}),u("path",{d:l.dots,className:"sekyro-qr__fg"}),u("path",{d:l.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),l.logo!==null?u("path",{d:ee.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:ne(l.logo),"data-qr-mark":""}):null]}),u("p",{className:"sekyro-text-muted",children:c("needsApp.capture.scan")})]}):null,p?k("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[c("needsApp.capture.getApp")," ",u("a",{href:Ne.appStore,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.appStore")})," · ",u("a",{href:Ne.googlePlay,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.googlePlay")})]}):null,k("p",{className:"sekyro-handoff__waiting",role:"status",children:[u("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),c("needsApp.capture.waiting")]})]})}m(Dt,"NativeAppView");var et=["intro","data","processing","sharing","retention"];function Ht({i18n:e}){let t=w(e);return u(N,{children:et.map(r=>u("p",{children:t(`consent.human.terms.${r}`)},r))})}m(Ht,"HumanConsentTerms");function $t({url:e,i18n:t}){return C(()=>!oe(),[])?u(Be,{url:e,i18n:t}):null}m($t,"DesktopHandoffView");function tt(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(ke(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let r=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||r?"ios":/Android/i.test(t)?"chrome_android":"desktop"}m(tt,"cameraHelpPlatform");var nt={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function qt({i18n:e,cause:t,onRetry:r,onContinue:n,handoffUrl:o,repeated:i=!1,platform:c}){let s=w(e),a=L(),l=V(),[f,b]=I("idle"),y=C(()=>o!==void 0&&!oe(),[o]),g=t==="denied",p=C(()=>c??tt(),[c]),d=g&&p==="in_app",[h,A]=I(!1),z=$(!1),q=$(!0);M(()=>(q.current=!0,()=>{q.current=!1}),[]);let Te=m(()=>{if(!g){r();return}z.current||(z.current=!0,Qe().catch(()=>"unknown").then(F=>{z.current=!1,q.current&&(F==="denied"&&!h&&!i?A(!0):r())}))},"retry"),Re=m(()=>{n!==void 0&&(b("busy"),n(t).then(()=>b("idle"),F=>b(F instanceof ze&&F.code==="check_out_of_order"?"idle":"failed")))},"end"),P=typeof window>"u"?"":window.location.href.split("#")[0]??"",E=C(()=>d&&P!==""?W(P):null,[d,P]),se=k(N,{children:[d&&E!==null?k("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:E,"data-testid":"sekyro-open-browser",children:[u(D,{name:"external"}),s("inApp.openBrowser")]}):null,d&&P!==""?u(ae,{url:P,i18n:e,label:"inApp.copyLink",primary:E===null}):null,u(S,{full:!0,kind:!d&&(g||n===void 0)?"primary":"secondary",onClick:Te,children:e.t("common.retry")}),n!==void 0?u(S,{full:!0,kind:g?"secondary":"primary",disabled:f==="busy","aria-busy":f==="busy"||void 0,onClick:Re,children:s("capture.noCamera.continue")}):null]}),ie=f==="failed"?u(_,{tone:"danger",children:u("span",{children:e.t("errors.network_error")})}):null,ce=s(d?"capture.noCamera.inAppTitle":g?"capture.noCamera.deniedTitle":"capture.noCamera.title"),ue=s(d?"capture.noCamera.inAppBody":g?"capture.noCamera.deniedBody":"capture.noCamera.body"),pe=g&&!d?k(N,{children:[u("p",{"data-testid":"sekyro-camera-steps","data-platform":p,children:s(nt[p])}),p!=="desktop"?u("p",{className:"sekyro-text-muted",children:s("capture.noCamera.stepsSystem")}):null]}):null,le=g&&(h||i)?u(_,{tone:"warning",children:u("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:s("capture.noCamera.stillBlocked")})}):null;return y&&o!==void 0?k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":a,"data-testid":"sekyro-no-camera","data-cause":t,children:[u(Be,{url:o,i18n:e}),u("h2",{id:a,ref:l,tabIndex:-1,className:"sekyro-text-body",children:ce}),u("p",{className:"sekyro-text-muted",children:ue}),pe,le,ie,u("div",{className:"sekyro-stack sekyro-stack--3",children:se})]}):k(x,{tone:g?"warning":"neutral",icon:"camera",titleId:a,title:ce,testId:"sekyro-no-camera",actions:se,children:[u("p",{children:ue}),pe,le,ie]})}m(qt,"NoCameraView");function Et({url:e,i18n:t,onContinue:r}){let n=w(t),o=L(),i=C(()=>W(e),[e]);return u(x,{tone:"brand",icon:"external",titleId:o,title:n("inApp.title"),testId:"sekyro-in-app",actions:k(N,{children:[i!==null?k("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:i,"data-testid":"sekyro-open-browser",children:[u(D,{name:"external"}),n("inApp.openBrowser")]}):null,u(ae,{url:e,i18n:t,label:"inApp.copyLink",primary:i===null}),u(S,{kind:"ghost",full:!0,onClick:r,children:n("inApp.continueAnyway")})]}),children:u("p",{children:n("inApp.description")})})}m(Et,"InAppBrowserPrompt");var rt={tester_limit_reached:"testerGate.limitBody",gate_attempts_exhausted:"testerGate.exhaustedBody",tester_gate_closed:"testerGate.closedBody"};function Ut({i18n:e,onOpen:t}){let r=w(e);return u(S,{kind:"ghost",full:!0,onClick:t,"data-testid":"sekyro-tester-gate-action",children:r("testerGate.action")})}m(Ut,"TesterGateAction");function Qt({i18n:e,verification:t,attemptsLeft:r,livenessProps:n,onBound:o,onDone:i}){let c=w(e),s=L(),[a,l]=I("intro"),[f,b]=I(null),y=t.testerGate,g=m(d=>{y!==void 0&&(l("checking"),y.call(t,d).then(({bound:h})=>{h&&o(),l(h?"bound":"miss")},h=>{let A=h instanceof ze?h.code:"",z=rt[A];b(z!==void 0?c(z):e.t(de(h,e.strings))),l("failed")}))},"captured"),p=u(S,{full:!0,kind:a==="intro"?"secondary":"primary",onClick:()=>i(!0),"data-testid":"sekyro-tester-gate-continue",children:c("testerGate.continueTest")});return a==="capture"?u(Q,{...n,onCaptured:g}):a==="checking"?u(x,{tone:"brand",icon:"face",busy:!0,live:!0,title:c("testerGate.checking"),testId:"sekyro-tester-gate-checking"}):a==="bound"?u(x,{tone:"success",icon:"success",title:c("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:u(S,{full:!0,onClick:()=>i(!1),children:c("testerGate.continue")}),children:u("p",{children:c("testerGate.boundBody")})}):a==="miss"||a==="failed"?u(x,{tone:"warning",icon:"info",title:c(a==="miss"?"testerGate.missTitle":"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:k(N,{children:[p,r>0&&a==="miss"?u(S,{full:!0,kind:"secondary",onClick:()=>l("capture"),children:c("testerGate.retry")}):null]}),children:u("p",{children:a==="miss"?c("testerGate.missBody"):f})}):k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":s,"data-testid":"sekyro-tester-gate",children:[u(me,{id:s,title:c("testerGate.title"),lead:c("testerGate.body")}),k(H,{children:[u(S,{full:!0,onClick:()=>l("capture"),disabled:y===void 0,"data-testid":"sekyro-tester-gate-start",children:c("testerGate.start")}),p]})]})}m(Qt,"TesterGateView");export{Bt as ContactChoiceView,$t as DesktopHandoffView,Vt as EidContinueHint,Tt as GenericChoiceView,Be as HandoffView,Ht as HumanConsentTerms,Mt as IdentitySummaryView,Et as InAppBrowserPrompt,Ot as LaneChoiceView,Rt as LaneSwitch,Lt as LivePhotoLiveness,Dt as NativeAppView,qt as NoCameraView,Ft as PortraitRetakeNotice,Ut as TesterGateAction,Qt as TesterGateView,tt as cameraHelpPlatform};
|
|
2
|
+
import{a as he,b as Y,c as T,d as ge,e as be,f as ke,g as W}from"./chunk-3GSNJJCA.js";import{a as x}from"./chunk-6JKZ5S2U.js";import{f as U,j as Q}from"./chunk-ZXY2YUAP.js";import"./chunk-NEUOVHVC.js";import"./chunk-7MMT5M4E.js";import{a as fe,b as B,c as ye}from"./chunk-55NNQK5P.js";import{a as de}from"./chunk-VRDPGOXM.js";import{d as K}from"./chunk-ERWGG4X6.js";import{a as D,b as me,d as H,p as _}from"./chunk-PEQBKIR7.js";import"./chunk-BMD5J7TC.js";import{a as S,s as V}from"./chunk-P7TS7JPW.js";import{a as m}from"./chunk-2KED7D2Q.js";import{HostedApiError as ze,queryCameraPermission as Qe}from"@sekyro/web";import{detectIsMobile as oe}from"@sekyro/web/core";import{useEffect as M,useId as L,useMemo as C,useRef as $,useState as I}from"react";var ve={"consent.human.terms.intro":"تؤكد Sekyro AI أن شخصًا حقيقيًا يُجري هذه الخطوة، نيابةً عن الجهة التي طلبتها.","consent.human.terms.data":"تلتقط Sekyro AI تسجيلًا قصيرًا لوجهك.","consent.human.terms.processing":"يُفحص هذا التسجيل للتأكد من أنك شخص حقيقي وحاضر، وقد يُقارَن بالوجوه التي سبق التحقق منها لدى هذه الجهة.","consent.human.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.human.terms.retention":"تُخزَّن بياناتك مشفّرة ولا يُحتفظ بها إلا للمدة التي يقتضيها القانون وإعدادات الجهة. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع الجهة التي طلبت هذا التحقق.","capture.noCamera.title":"تتطلب هذه الخطوة كاميرا","capture.noCamera.body":"اسمح بالوصول إلى الكاميرا وحاول مرة أخرى، أو تابع على هاتف مزوّد بكاميرا.","capture.noCamera.continue":"المتابعة بدون كاميرا","capture.noCamera.deniedTitle":"اسمح بالوصول إلى الكاميرا","capture.noCamera.deniedBody":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","capture.noCamera.stepsChrome":"في Chrome، اضغط على الرمز الموجود بجانب العنوان، ثم الأذونات، وفعّل الكاميرا.","capture.noCamera.stepsSamsung":"في Samsung Internet، افتح القائمة، ثم الإعدادات، المواقع والتنزيلات، أذونات المواقع، الكاميرا، واسمح لهذا الموقع.","capture.noCamera.stepsSafari":"في Safari، اضغط على زر aA في شريط العنوان، ثم إعدادات موقع الويب، واضبط الكاميرا على السماح.","capture.noCamera.stepsDesktop":"انقر على الرمز الموجود بجانب العنوان واسمح بالكاميرا لهذا الموقع.","capture.noCamera.stepsSystem":"ما زالت محظورة؟ تحقق في إعدادات هاتفك من أن متصفحك مسموح له باستخدام الكاميرا.","capture.noCamera.stillBlocked":"ما زالت الكاميرا محظورة. اتبع الخطوات أعلاه ثم أعد المحاولة.","capture.noCamera.inAppTitle":"افتح هذه الصفحة في متصفحك","capture.noCamera.inAppBody":"لا يمكن لمتصفح هذا التطبيق استخدام الكاميرا. افتح الصفحة في Chrome أو Safari للمتابعة.","choice.title":"كيف تريد المتابعة؟","choice.description":"اختر خيارًا واحدًا.","choice.switch":"استخدم خيارًا آخر","contact.title":"كيف تريد استلام الرمز؟","contact.description":"اختر خيارًا واحدًا.","contact.phone":"عبر الهاتف (واتساب أو رسالة نصية)","contact.email":"عبر البريد الإلكتروني","contact.switch":"استخدم خيارًا آخر","summary.title":"تحقق من بياناتك","summary.description":"تأكد من أن هذه بياناتك قبل الصورة الحية.","summary.fullName":"الاسم الكامل","summary.birthDate":"تاريخ الميلاد","summary.nationality":"الجنسية","summary.documentType":"الوثيقة","summary.documentNumber":"رقم الوثيقة","summary.nni":"الرقم الوطني للتعريف الموريتاني (NNI)","summary.id_number":"رقم الهوية","summary.expiryDate":"تاريخ الانتهاء","summary.portraitAlt":"الصورة المسجلة","summary.source.registry":"من سجل الحالة المدنية","summary.source.document":"مقروءة من وثيقتك","summary.source.chip":"مقروءة من شريحة وثيقتك","summary.name":"الاسم","summary.birthYear":"سنة الميلاد","summary.confirm":"تأكيد ومتابعة","summary.retakeDocument":"مسح وثيقتي مرة أخرى","summary.retakeNationalNumber":"إدخال رقمي مرة أخرى","summary.noRetake":"لم يعد بإمكانك إعادة المحاولة. تواصل مع {org} إذا كانت هذه البيانات غير صحيحة","capture.tipsIcao.title":"لصورة الهوية:","capture.tipsIcao.glasses":"انزع نظارتك","capture.tipsIcao.headwear":"انزع القبعة. يُقبل غطاء الرأس الديني إذا كان الوجه ظاهرًا بالكامل","capture.tipsIcao.expression":"حافظ على تعبير محايد وفمك مغلق","capture.tipsIcao.faceCamera":"انظر مباشرة إلى الكاميرا وعيناك مفتوحتان","capture.tipsIcao.background":"قف أمام خلفية سادة فاتحة اللون","capture.tipsIcao.lighting":"استخدم إضاءة متساوية على وجهك: دون ظلال","capture.tipsIcao.hair":"أبعد شعرك عن وجهك وعينيك","capture.tipsIcao.summary":"قف أمام جدار سادة فاتح اللون مع إضاءة متساوية على وجهك. انزع نظارتك وأي قبعة. أبعد شعرك عن وجهك، وانظر مباشرة إلى الكاميرا وعيناك مفتوحتان، وحافظ على تعبير محايد وفمك مغلق، وابقَ ثابتًا.","portrait.retakeOnly":"نجح التحقق الحي. الصورة فقط تحتاج إلى محاولة أخرى","portrait.keepCamera":"ابقَ أمام الكاميرا","handoff.description":"امسح الرمز بهاتفك للمتابعة","handoff.qrAlt":"رمز QR يفتح عملية التحقق هذه على هاتفك","handoff.copyLink":"نسخ الرابط","handoff.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة من متصفحك بدلًا من ذلك","handoff.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة على هاتفك","inApp.title":"افتح الصفحة في متصفحك","inApp.description":"لا تعمل الكاميرا جيدًا داخل هذا التطبيق. افتح الرابط في Chrome أو Safari للمتابعة.","inApp.copyLink":"نسخ الرابط","inApp.copied":"تم نسخ الرابط. الصقه في متصفحك","inApp.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة بدلًا من ذلك","inApp.continueAnyway":"المتابعة هنا على أي حال","needsApp.capture.title":"تابع في التطبيق","needsApp.capture.description":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org}.","needsApp.capture.descriptionSekyro":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org} أو في تطبيق Sekyro AI.","needsApp.capture.descriptionNoOrg":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في التطبيق الذي أُعطي لك.","needsApp.capture.descriptionNoOrgSekyro":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في تطبيق Sekyro AI.","needsApp.capture.openSekyro":"افتح في تطبيق Sekyro AI","needsApp.capture.getApp":"احصل على تطبيق Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"امسح الرمز بهاتفك لفتح هذا التحقق في التطبيق.","needsApp.capture.qrAlt":"رمز QR يفتح هذا التحقق في التطبيق","needsApp.capture.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة في التطبيق","inApp.openBrowser":"افتح في المتصفح","testerGate.action":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. إذا تطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة، فستُجري هذه الجلسة فحوصات حقيقية. وإلا فلن يُحتفظ بأي شيء وستتابع باستخدام بيانات الاختبار.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"لم يُحتفظ بأي شيء. يمكنك إعادة المحاولة أو المتابعة باستخدام بيانات الاختبار.","testerGate.retry":"أعد المحاولة","testerGate.continueTest":"المتابعة باستخدام بيانات الاختبار","testerGate.continue":"متابعة","testerGate.limitBody":"تم بلوغ الحد اليومي للفحوصات الحقيقية للمختبِرين. تابع باستخدام بيانات الاختبار، أو أعد المحاولة غدًا.","testerGate.exhaustedBody":"لم تتبقَّ أي محاولة في هذه الجلسة. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة.","testerGate.closedBody":"لا يمكن بدء الفحوصات الحقيقية إلا قبل أول التقاط. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة."};var R={"consent.human.terms.intro":"Sekyro AI confirms that a real person is completing this step, on behalf of the organization that asked for it.","consent.human.terms.data":"Sekyro AI collects a short capture of your face.","consent.human.terms.processing":"The capture is checked to confirm that you are a real person who is present. It may be compared with faces already verified for this organization.","consent.human.terms.sharing":"The organization that requested this verification learns its outcome.","consent.human.terms.retention":"Your data is stored encrypted and kept only as long as the law and the organization's settings require. To exercise your data-protection rights, contact the organization that requested this verification.","capture.noCamera.title":"This step needs a camera","capture.noCamera.body":"Allow camera access and try again, or continue on a phone with a camera.","capture.noCamera.continue":"Continue without a camera","capture.noCamera.deniedTitle":"Allow camera access","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","capture.noCamera.stepsChrome":"In Chrome, tap the icon to the left of the address, then Permissions, and turn on Camera.","capture.noCamera.stepsSamsung":"In Samsung Internet, open the menu, then Settings, Sites and downloads, Site permissions, Camera, and allow this site.","capture.noCamera.stepsSafari":"In Safari, tap the aA button in the address bar, then Website Settings, and set Camera to Allow.","capture.noCamera.stepsDesktop":"Click the icon to the left of the address and allow the camera for this site.","capture.noCamera.stepsSystem":"Still blocked? In your phone's settings, check that your browser may use the camera.","capture.noCamera.stillBlocked":"The camera is still blocked. Follow the steps above, then try again.","capture.noCamera.inAppTitle":"Open this page in your browser","capture.noCamera.inAppBody":"This app's browser can't use your camera. Open the page in Chrome or Safari to continue.","choice.title":"Choose how to continue","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"Where to send your code","contact.description":"Choose one option.","contact.phone":"By phone (WhatsApp or SMS)","contact.email":"By email","contact.switch":"Use another option","summary.title":"Check your details","summary.description":"Make sure this is you before the live photo.","summary.fullName":"Full name","summary.birthDate":"Date of birth","summary.nationality":"Nationality","summary.documentType":"Document","summary.documentNumber":"Document number","summary.nni":"Mauritanian national ID number (NNI)","summary.id_number":"ID number","summary.expiryDate":"Expiry date","summary.portraitAlt":"Photo on record","summary.source.registry":"From the civil registry","summary.source.document":"Read from your document","summary.source.chip":"Read from your document's chip","summary.name":"Name","summary.birthYear":"Year of birth","summary.confirm":"Confirm and continue","summary.retakeDocument":"Scan my document again","summary.retakeNationalNumber":"Enter my number again","summary.noRetake":"You can't try again. Contact {org} if these details are wrong","capture.tipsIcao.title":"For your ID photo:","capture.tipsIcao.glasses":"Remove your glasses","capture.tipsIcao.headwear":"Remove hats and caps. A religious head covering is fine if your whole face shows","capture.tipsIcao.expression":"Keep a neutral expression with your mouth closed","capture.tipsIcao.faceCamera":"Look straight at the camera with your eyes open","capture.tipsIcao.background":"Stand in front of a plain, light background","capture.tipsIcao.lighting":"Use even light on your face: no shadows","capture.tipsIcao.hair":"Keep your hair away from your face and eyes","capture.tipsIcao.summary":"Stand in front of a plain, light wall with even light on your face. Remove your glasses and any hat. Keep your hair off your face, look straight at the camera with your eyes open, keep a neutral expression with your mouth closed, and hold still.","portrait.retakeOnly":"Your live check passed. Only the photo needs another try","portrait.keepCamera":"Stay in front of the camera","handoff.description":"Scan with your phone to continue","handoff.qrAlt":"QR code that opens this verification on your phone","handoff.copyLink":"Copy link","handoff.copyFailed":"We couldn't copy the link. Copy this page's address from your browser instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open in your browser","inApp.description":"The camera doesn't work well inside this app. Open the link in Chrome or Safari to continue.","inApp.copyLink":"Copy link","inApp.copied":"Link copied. Paste it in your browser","inApp.copyFailed":"We couldn't copy the link. Copy this page's address instead","inApp.continueAnyway":"Continue here anyway","needsApp.capture.title":"Continue in the app","needsApp.capture.description":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app.","needsApp.capture.descriptionSekyro":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app or in the Sekyro AI app.","needsApp.capture.descriptionNoOrg":"This verification takes the photos in a mobile app. Open it in the app you were given.","needsApp.capture.descriptionNoOrgSekyro":"This verification takes the photos in a mobile app. Open it in the Sekyro AI app.","needsApp.capture.openSekyro":"Open in the Sekyro AI app","needsApp.capture.getApp":"Get the Sekyro AI app","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scan with your phone to open this verification in the app.","needsApp.capture.qrAlt":"QR code that opens this verification in the app","needsApp.capture.waiting":"This page moves on when you finish in the app","inApp.openBrowser":"Open in browser","testerGate.action":"Run real checks as a tester","testerGate.title":"Run real checks as a tester","testerGate.body":"Look at the camera. If your face matches one of the organization's enrolled testers, this session runs real checks. If not, nothing is kept and you continue with test data.","testerGate.start":"Start","testerGate.checking":"Checking your face","testerGate.boundTitle":"Real checks are on","testerGate.boundBody":"You were recognised as an enrolled tester. The next steps run real checks.","testerGate.missTitle":"No enrolled tester matched","testerGate.missBody":"Nothing was kept. You can try again or continue with test data.","testerGate.retry":"Try again","testerGate.continueTest":"Continue with test data","testerGate.continue":"Continue","testerGate.limitBody":"Today's limit of real checks for testers is reached. Continue with test data, or try again tomorrow.","testerGate.exhaustedBody":"No tries are left on this session. Continue with test data, or start a new session.","testerGate.closedBody":"Real checks can start only before the first capture. Continue with test data, or start a new session."};var Ae={"consent.human.terms.intro":"Sekyro AI confirme qu'une personne réelle effectue cette étape, pour le compte de l'organisme qui l'a demandée.","consent.human.terms.data":"Sekyro AI recueille une courte capture de votre visage.","consent.human.terms.processing":"La capture est analysée pour confirmer que vous êtes une personne réelle et présente. Elle peut être comparée aux visages déjà vérifiés pour cet organisme.","consent.human.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.human.terms.retention":"Vos données sont stockées chiffrées et conservées uniquement pendant la durée exigée par la loi et les paramètres de l'organisme. Pour exercer vos droits en matière de protection des données, contactez l'organisme qui a demandé cette vérification.","capture.noCamera.title":"Une caméra est nécessaire","capture.noCamera.body":"Autorisez l'accès à la caméra et réessayez, ou continuez sur un téléphone équipé d'une caméra.","capture.noCamera.continue":"Continuer sans caméra","capture.noCamera.deniedTitle":"Autorisez la caméra","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","capture.noCamera.stepsChrome":"Dans Chrome, touchez l'icône à gauche de l'adresse, puis Autorisations, et activez Caméra.","capture.noCamera.stepsSamsung":"Dans Samsung Internet, ouvrez le menu, puis Paramètres, Sites et téléchargements, Autorisations des sites, Appareil photo, et autorisez ce site.","capture.noCamera.stepsSafari":"Dans Safari, touchez le bouton aA de la barre d'adresse, puis Réglages du site web, et réglez Caméra sur Autoriser.","capture.noCamera.stepsDesktop":"Cliquez sur l'icône à gauche de l'adresse et autorisez la caméra pour ce site.","capture.noCamera.stepsSystem":"Toujours bloquée ? Dans les réglages du téléphone, vérifiez que votre navigateur peut utiliser la caméra.","capture.noCamera.stillBlocked":"La caméra est toujours bloquée. Suivez les étapes ci-dessus, puis réessayez.","capture.noCamera.inAppTitle":"Ouvrez cette page dans votre navigateur","capture.noCamera.inAppBody":"Le navigateur de cette application ne peut pas utiliser votre caméra. Ouvrez la page dans Chrome ou Safari pour continuer.","choice.title":"Comment continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Où envoyer votre code ?","contact.description":"Choisissez une option.","contact.phone":"Par téléphone (WhatsApp ou SMS)","contact.email":"Par e-mail","contact.switch":"Utiliser une autre option","summary.title":"Vérifiez vos informations","summary.description":"Assurez-vous qu'il s'agit bien de vous avant la photo en direct.","summary.fullName":"Nom complet","summary.birthDate":"Date de naissance","summary.nationality":"Nationalité","summary.documentType":"Document","summary.documentNumber":"Numéro du document","summary.nni":"Numéro national d'identification mauritanien (NNI)","summary.id_number":"Numéro d'identité","summary.expiryDate":"Date d'expiration","summary.portraitAlt":"Photo enregistrée","summary.source.registry":"Issu de l'état civil","summary.source.document":"Lu sur votre document","summary.source.chip":"Lu sur la puce de votre document","summary.name":"Nom","summary.birthYear":"Année de naissance","summary.confirm":"Confirmer et continuer","summary.retakeDocument":"Scanner à nouveau mon document","summary.retakeNationalNumber":"Saisir à nouveau mon numéro","summary.noRetake":"Vous ne pouvez plus réessayer. Contactez {org} si ces informations sont incorrectes","capture.tipsIcao.title":"Pour votre photo d'identité :","capture.tipsIcao.glasses":"Retirez vos lunettes","capture.tipsIcao.headwear":"Retirez chapeau et casquette. Un couvre-chef religieux est accepté si tout le visage est visible","capture.tipsIcao.expression":"Gardez une expression neutre, la bouche fermée","capture.tipsIcao.faceCamera":"Regardez la caméra bien en face, les yeux ouverts","capture.tipsIcao.background":"Placez-vous devant un fond uni et clair","capture.tipsIcao.lighting":"Éclairez votre visage de façon uniforme : sans ombres","capture.tipsIcao.hair":"Dégagez vos cheveux du visage et des yeux","capture.tipsIcao.summary":"Placez-vous devant un mur uni et clair, le visage éclairé de façon uniforme. Retirez vos lunettes et tout chapeau. Dégagez vos cheveux du visage, regardez la caméra bien en face, les yeux ouverts, gardez une expression neutre, la bouche fermée, et ne bougez plus.","portrait.retakeOnly":"Votre vérification en direct est validée. Seule la photo est à refaire","portrait.keepCamera":"Restez face à la caméra","handoff.description":"Scannez avec votre téléphone pour continuer","handoff.qrAlt":"Code QR qui ouvre cette vérification sur votre téléphone","handoff.copyLink":"Copier le lien","handoff.copyFailed":"Nous n'avons pas pu copier le lien. Copiez plutôt l'adresse de cette page depuis votre navigateur","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez dans le navigateur","inApp.description":"La caméra fonctionne mal dans cette application. Ouvrez le lien dans Chrome ou Safari pour continuer.","inApp.copyLink":"Copier le lien","inApp.copied":"Lien copié. Collez-le dans votre navigateur","inApp.copyFailed":"Impossible de copier le lien. Copiez plutôt l'adresse de cette page","inApp.continueAnyway":"Continuer ici quand même","needsApp.capture.title":"Continuez dans l’application","needsApp.capture.description":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org}.","needsApp.capture.descriptionSekyro":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org} ou dans l’application Sekyro AI.","needsApp.capture.descriptionNoOrg":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application que l’on vous a indiquée.","needsApp.capture.descriptionNoOrgSekyro":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application Sekyro AI.","needsApp.capture.openSekyro":"Ouvrir dans l’application Sekyro AI","needsApp.capture.getApp":"Obtenir l’application Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scannez avec votre téléphone pour ouvrir cette vérification dans l’application.","needsApp.capture.qrAlt":"QR code qui ouvre cette vérification dans l’application","needsApp.capture.waiting":"Cette page avancera d’elle-même une fois l’étape terminée dans l’application","inApp.openBrowser":"Ouvrir dans le navigateur","testerGate.action":"Lancer de vrais contrôles en tant que testeur","testerGate.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Si votre visage correspond à l'un des testeurs inscrits de l'organisation, cette session lance de vrais contrôles. Sinon, rien n'est conservé et vous continuez avec des données de test.","testerGate.start":"Commencer","testerGate.checking":"Vérification de votre visage","testerGate.boundTitle":"Les vrais contrôles sont activés","testerGate.boundBody":"Vous avez été reconnu comme testeur inscrit. Les étapes suivantes lancent de vrais contrôles.","testerGate.missTitle":"Aucun testeur inscrit ne correspond","testerGate.missBody":"Rien n'a été conservé. Vous pouvez réessayer ou continuer avec des données de test.","testerGate.retry":"Réessayer","testerGate.continueTest":"Continuer avec des données de test","testerGate.continue":"Continuer","testerGate.limitBody":"La limite de vrais contrôles pour les testeurs est atteinte pour aujourd'hui. Continuez avec des données de test, ou réessayez demain.","testerGate.exhaustedBody":"Il ne reste plus d'essai sur cette session. Continuez avec des données de test, ou lancez une nouvelle session.","testerGate.closedBody":"Les vrais contrôles ne peuvent commencer qu'avant la première capture. Continuez avec des données de test, ou lancez une nouvelle session."};var Se={M:{perBlock:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26],blocks:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16],formatBits:0},H:{perBlock:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28],blocks:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25],formatBits:2}},we=20;function Oe(e){let t=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}m(Oe,"rawDataModules");function Ce(e,t){let{perBlock:r,blocks:n}=Se[t],o=r[e-1],i=n[e-1],c=Math.floor(Oe(e)/8),s=i-c%i,a=Math.floor(c/i)-o;return[o,s===i?[[i,a]]:[[s,a],[i-s,a+1]]]}m(Ce,"blockLayout");var Z=m((e,t)=>Ce(e,t)[1].reduce((r,[n,o])=>r+n*o,0),"dataCapacity");function j(e,t){let r=0;for(let n=7;n>=0;n-=1)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r&255}m(j,"gfMul");function Me(e){let t=new Array(e).fill(0);t[e-1]=1;let r=1;for(let n=0;n<e;n+=1){for(let o=0;o<e;o+=1)t[o]=j(t[o],r),o+1<e&&(t[o]=t[o]^t[o+1]);r=j(r,2)}return t}m(Me,"rsDivisor");function Le(e,t){let r=t.map(()=>0);for(let n of e){let o=n^r.shift();r.push(0),t.forEach((i,c)=>{r[c]=r[c]^j(i,o)})}return r}m(Le,"rsRemainder");function Fe(e,t,r){let n=[],o=m((p,d)=>{for(let h=d-1;h>=0;h-=1)n.push(p>>>h&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let p of e)o(p,8);let i=Z(t,r)*8;o(0,Math.min(4,i-n.length)),o(0,(8-n.length%8)%8);let c=[];for(let p=0;p<n.length;p+=8)c.push(n.slice(p,p+8).reduce((d,h)=>d<<1|h,0));for(let p=236;c.length<Z(t,r);p^=253)c.push(p);let[s,a]=Ce(t,r),l=Me(s),f=[],b=0;for(let[p,d]of a)for(let h=0;h<p;h+=1){let A=c.slice(b,b+d);b+=d,f.push({data:A,ec:Le(A,l)})}let y=[],g=Math.max(...f.map(p=>p.data.length));for(let p=0;p<g;p+=1)for(let d of f)p<d.data.length&&y.push(d.data[p]);for(let p=0;p<s;p+=1)for(let d of f)y.push(d.ec[p]);return y}m(Fe,"codewords");function Ie(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=Math.ceil((e*4+4)/(t*2-2))*2,n=[6];for(let o=e*4+10;n.length<t;o-=r)n.splice(1,0,o);return n}m(Ie,"alignmentPositions");var Ve=[(e,t)=>(e+t)%2===0,e=>e%2===0,(e,t)=>t%3===0,(e,t)=>(e+t)%3===0,(e,t)=>(Math.floor(e/2)+Math.floor(t/3))%2===0,(e,t)=>e*t%2+e*t%3===0,(e,t)=>(e*t%2+e*t%3)%2===0,(e,t)=>((e+t)%2+e*t%3)%2===0],re=class re{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,r,n){this.dark[t*this.size+r]=n,this.fixed[t*this.size+r]=!0}get(t,r){return this.dark[t*this.size+r]===!0}};m(re,"Grid");var X=re;function De(e,t){let r=e.size;for(let i=0;i<r;i+=1)e.set(6,i,i%2===0),e.set(i,6,i%2===0);for(let[i,c]of[[3,3],[3,r-4],[r-4,3]])for(let s=-4;s<=4;s+=1)for(let a=-4;a<=4;a+=1){let l=i+s,f=c+a;if(l<0||l>=r||f<0||f>=r)continue;let b=Math.max(Math.abs(s),Math.abs(a));e.set(l,f,b!==2&&b!==4)}let n=Ie(t),o=n.length-1;if(n.forEach((i,c)=>n.forEach((s,a)=>{if(!(c===0&&a===0||c===0&&a===o||c===o&&a===0))for(let l=-2;l<=2;l+=1)for(let f=-2;f<=2;f+=1)e.set(i+l,s+f,Math.max(Math.abs(l),Math.abs(f))!==1)})),xe(e,0),t>=7){let i=t;for(let s=0;s<12;s+=1)i=i<<1^(i>>>11)*7973;let c=t<<12|i;for(let s=0;s<18;s+=1){let a=(c>>>s&1)===1,l=r-11+s%3,f=Math.floor(s/3);e.set(l,f,a),e.set(f,l,a)}}}m(De,"drawFunctionPatterns");function xe(e,t,r=0){let n=e.size,o=r<<3|t,i=o;for(let a=0;a<10;a+=1)i=i<<1^(i>>>9)*1335;let c=(o<<10|i)^21522,s=m(a=>(c>>>a&1)===1,"bit");for(let a=0;a<=5;a+=1)e.set(a,8,s(a));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let a=9;a<15;a+=1)e.set(8,14-a,s(a));for(let a=0;a<8;a+=1)e.set(8,n-1-a,s(a));for(let a=8;a<15;a+=1)e.set(n-15+a,8,s(a));e.set(n-8,8,!0)}m(xe,"drawFormat");function He(e,t){let r=e.size,n=0;for(let o=r-1;o>=1;o-=2){o===6&&(o=5);for(let i=0;i<r;i+=1)for(let c=0;c<2;c+=1){let s=o-c,l=(o+1&2)===0?r-1-i:i;e.fixed[l*r+s]!==!0&&(n<t.length*8&&(e.dark[l*r+s]=(t[n>>>3]>>>7-(n&7)&1)===1),n+=1)}}}m(He,"placeData");function $e(e,t){let r=Ve[t];for(let n=0;n<e.size;n+=1)for(let o=0;o<e.size;o+=1)e.fixed[n*e.size+o]!==!0&&r(n,o)&&(e.dark[n*e.size+o]=!e.dark[n*e.size+o])}m($e,"applyMask");function qe(e){let t=e.size,r=0,n=m(i=>{let c=1;for(let s=1;s<=t;s+=1)s<t&&i(s)===i(s-1)?c+=1:(c>=5&&(r+=3+(c-5)),c=1);for(let s=0;s+10<t;s+=1){let a=[!0,!1,!0,!0,!0,!1,!0];if(!(a.every((y,g)=>i(s+g)===y)||a.every((y,g)=>i(s+4+g)===y)))continue;let f=[0,1,2,3].every(y=>!i(s+y))&&a.every((y,g)=>i(s+4+g)===y),b=a.every((y,g)=>i(s+g)===y)&&[7,8,9,10].every(y=>!i(s+y));f&&(r+=40),b&&(r+=40)}},"line");for(let i=0;i<t;i+=1)n(c=>e.get(i,c));for(let i=0;i<t;i+=1)n(c=>e.get(c,i));for(let i=0;i+1<t;i+=1)for(let c=0;c+1<t;c+=1){let s=e.get(i,c);s===e.get(i,c+1)&&s===e.get(i+1,c)&&s===e.get(i+1,c+1)&&(r+=3)}let o=e.dark.filter(Boolean).length;return r+=Math.floor(Math.abs(o*20-t*t*10)/(t*t))*10,r}m(qe,"penalty");function J(e,t={}){let r=t.ecl??"M",n=new TextEncoder().encode(e),o=1;for(;o<=we&&!(4+(o<10?8:16)+n.length*8<=Z(o,r)*8);o+=1);if(o>we)throw new RangeError("text too long for a QR code");let i=Fe(n,o,r),c=m(l=>{let f=new X(o*4+17);return De(f,o),He(f,i),$e(f,l),xe(f,l,Se[r].formatBits),f},"build"),s=null;if(t.mask!==void 0)s=c(t.mask);else{let l=Number.POSITIVE_INFINITY;for(let f=0;f<8;f+=1){let b=c(f),y=qe(b);y<l&&(l=y,s=b)}}let a=s;return{size:a.size,get:m((l,f)=>a.get(l,f),"get")}}m(J,"encodeQr");var ee={viewBox:"0 0 100 100",d:"M22.37,0H77.63A22.37,22.37 0 0 1 100,22.37V77.63A22.37,22.37 0 0 1 77.63,100H22.37A22.37,22.37 0 0 1 0,77.63V22.37A22.37,22.37 0 0 1 22.37,0ZM48.067,21H38.308A17.308,17.308 0 0 0 21,38.308V42.543A19.886,19.886 0 0 0 40.886,62.429H60.219V57.641A4.419,4.419 0 0 0 55.8,53.222H43.463A11.416,11.416 0 0 1 32.048,41.806V38.308A8.102,8.102 0 0 1 40.149,30.206H43.648A4.419,4.419 0 0 0 48.067,25.787ZM38.676,79H59.114A19.886,19.886 0 0 0 79,59.114V57.457A19.886,19.886 0 0 0 59.114,37.571H38.676V42.359A4.419,4.419 0 0 0 43.095,46.778H56.537A11.416,11.416 0 0 1 67.952,58.194V58.378A11.416,11.416 0 0 1 56.537,69.794H43.095A4.419,4.419 0 0 0 38.676,74.213ZM51.933,21H79V37.571H69.794V30.206H51.933ZM21,71.543A7.457,7.457 0 1 0 35.914,71.543A7.457,7.457 0 1 0 21,71.543Z"},O=.42,Ee=.2,v=m(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function G(e,t,r,n){let o=`A${v(n)} ${v(n)} 0 0 1 `;return`M${v(e+n)} ${v(t)}H${v(e+r-n)}${o}${v(e+r)} ${v(t+n)}V${v(t+r-n)}${o}${v(e+r-n)} ${v(t+r)}H${v(e+n)}${o}${v(e)} ${v(t+r-n)}V${v(t+n)}${o}${v(e+n)} ${v(t)}Z`}m(G,"roundedSquare");function Ue(e){let t=(e-17)/4,r=Ie(t),n=r.length-1,o=[];return r.forEach((i,c)=>r.forEach((s,a)=>{c===0&&a===0||c===0&&a===n||c===n&&a===0||o.push([i,s])})),o}m(Ue,"alignmentCentres");function te(e,{quiet:t=4,logo:r=!1}={}){let n=e.size,o=m((p,d)=>p<7&&d<7||p<7&&d>=n-7||p>=n-7&&d<7,"isFinder"),i=Math.floor(n*Ee),c=r?i%2===0?i-1:i:0,s=(n-c)/2,a=m((p,d)=>c>0&&p>=s&&p<s+c&&d>=s&&d<s+c,"inZone"),l=Ue(n).filter(([p,d])=>!a(p,d)),f=m((p,d)=>l.some(([h,A])=>Math.abs(p-h)<=2&&Math.abs(d-A)<=2),"isAlign"),b=`a${v(O)} ${v(O)} 0 1 0 `,y="";for(let p=0;p<n;p+=1)for(let d=0;d<n;d+=1)!e.get(p,d)||o(p,d)||f(p,d)||a(p,d)||(y+=`M${v(d+t+.5-O)} ${v(p+t+.5)}${b}${v(2*O)} 0${b}${v(-2*O)} 0Z`);let g="";for(let[p,d]of[[0,0],[0,n-7],[n-7,0]]){let h=d+t,A=p+t;g+=G(h,A,7,1.6)+G(h+1,A+1,5,.6)+G(h+2,A+2,3,.6)}for(let[p,d]of l){let h=d-2+t,A=p-2+t;g+=G(h,A,5,1.2)+G(h+1,A+1,3,.5)+G(h+2,A+2,1,.5)}return{size:n+t*2,dots:y,finders:g,logo:c>0?{x:s+t+.5,y:s+t+.5,size:c-1}:null}}m(te,"styledQr");function ne(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${v(e.x)} ${v(e.y)}) scale(${t})`}m(ne,"qrLogoTransform");import{Fragment as N,jsx as u,jsxs as k}from"react/jsx-runtime";var Ke={en:R,fr:Ae,ar:ve,es:R,pt:R,de:R},_e={en:B,fr:ye,ar:fe,es:B,pt:B,de:B};function w(e){let t=e.strings;return(r,n)=>K(t[r]??Ke[e.locale][r]??"",n)}m(w,"flowT");function Ge(e,t){let r=w(t);return e.flatMap(n=>{let o=n.service==="phone_otp"?r("contact.phone"):n.service==="email_otp"?r("contact.email"):Y(n,t),i=he[n.service];return o===null?[]:[{id:n.id,label:o,...i!==void 0?{glyph:u(D,{name:i})}:{}}]})}m(Ge,"labelled");function Pe({step:e,i18n:t,onError:r}){let n=w(t),{busy:o,error:i,run:c}=T(t,r),s=e.kind==="contact_choice";return u(U,{title:n(s?"contact.title":"choice.title"),description:n(s?"contact.description":"choice.description"),options:Ge(e.choice.options,t),busy:o,error:i,focus:!0,testId:s?"sekyro-contact-choice":"sekyro-choice",onChoose:a=>c(()=>e.choose(a))})}m(Pe,"PlanChoiceView");var Bt=Pe,Tt=Pe;function Rt({step:e,i18n:t,onError:r,onOpen:n}){let o=w(t),{busy:i,error:c,run:s}=T(t,r),a=e,l=e.context.switchable,f=l===void 0?[]:l.options.filter(h=>h.id!==l.current),b=a.kind==="registry"&&(a.reason==="nni_not_found"||a.reason==="registry_record_not_found")&&a.canUseDocument||a.kind==="eid"&&a.reason?.startsWith("eid_")&&a.canUseCamera,y=f.length===1?f[0]:void 0,g=y!==void 0&&(y.service==="phone_otp"||y.service==="email_otp"),p=g&&a.canSwitch&&a.switchTo!==void 0?()=>a.switchTo.call(e):a.chooseOption===void 0||y===void 0?void 0:()=>a.chooseOption.call(e,y.id);if(f.length===0||b||y!==void 0&&(p===void 0||d()===null)||y===void 0&&a.chooseOption===void 0)return null;function d(){return y===void 0?o("choice.switch"):y.service==="phone_otp"||y.service==="email_otp"?o("contact.switch"):a.kind==="registry"&&y.service==="document"?t.t("population.useDocument"):a.kind==="eid"?t.strings["eid.useCamera"]??_e[t.locale]["eid.useCamera"]:Y(y,t)}return m(d,"labelOf"),k("div",{className:"sekyro-stack sekyro-stack--1",children:[c!==null?u(_,{tone:"danger",children:u("span",{children:c})}):null,u(S,{kind:"secondary",disabled:i,"aria-busy":i||void 0,onClick:()=>p===void 0?n():s(p),"data-testid":g?"sekyro-contact-switch":"sekyro-lane-switch",children:d()})]})}m(Rt,"LaneSwitch");function Ot({step:e,i18n:t,onError:r,onClose:n}){let o=w(t),{busy:i,error:c,run:s}=T(t,r),a=e.context.switchable,l=e.chooseOption;return a===void 0||l===void 0?null:u(U,{title:o("choice.title"),description:o("choice.description"),options:Ge(a.options,t),...a.current!==null?{marked:a.current}:{},busy:i,error:c,focus:!0,testId:"sekyro-lane-choice",onChoose:f=>f===a.current?n():s(()=>l.call(e,f))})}m(Ot,"LaneChoiceView");var Ye=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["idNumberMasked","summary.id_number",!0],["expiryDate","summary.expiryDate",!0]];function We(e){let[t,r]=I(null);return M(()=>{if(!e.portraitAvailable)return;let n=!0,o=null;return e.portrait().then(i=>{!n||i===null||!i.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(o=URL.createObjectURL(i),r(o))}),()=>{n=!1,o!==null&&URL.revokeObjectURL(o)}},[e.portraitAvailable]),t}m(We,"usePortraitUrl");var Ze=m(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function je(e,t){try{return new Intl.DateTimeFormat(t==="ar"?"ar-u-nu-latn":t,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))}catch{return e}}m(je,"formatDate");function Mt({step:e,i18n:t,onError:r}){let n=w(t),o=L(),i=V(),c=We(e),{busy:s,error:a,run:l}=T(t,r),f=e.context.orgName,b=["registry","document","chip"].find(p=>p===e.source),y=e.summaryKind==="partial",g=m(p=>t.strings[`doc.type.${p}`]??p,"documentLabel");return k("section",{className:"sekyro-step","aria-labelledby":o,"data-testid":"sekyro-identity-summary",children:[k("div",{className:"sekyro-heading",children:[u("h2",{id:o,ref:i,tabIndex:-1,className:"sekyro-text-body",children:n("summary.title")}),u("p",{className:"sekyro-text-muted",children:n("summary.description")})]}),b!==void 0?u("p",{className:"sekyro-summary__source",children:n(`summary.source.${b}`)}):null,k("div",{className:"sekyro-summary",children:[c!==null?u("img",{className:"sekyro-summary__portrait",src:c,alt:n("summary.portraitAlt")}):null,u("dl",{className:"sekyro-summary__list",children:Ye.map(([p,d,h])=>{let A=p==="idNumberMasked"?e.idNumberMasked??e.nniMasked:e[p];return A===void 0?null:k("div",{className:"sekyro-summary__row",children:[u("dt",{className:"sekyro-text-muted",children:n(p==="fullName"&&y?"summary.name":d)}),u("dd",{children:Ze(A)?je(A,t.locale):h?u("bdi",{dir:"ltr",children:A}):p==="documentType"?g(A):A})]},p)})})]}),a!==null?u(_,{tone:"danger",children:u("span",{children:a})}):null,e.retakeAvailable?null:u("p",{className:"sekyro-text-muted",children:n("summary.noRetake",{org:f})}),k(H,{children:[u(S,{full:!0,disabled:s,"aria-busy":s||void 0,onClick:()=>l(()=>e.confirm()),children:n("summary.confirm")}),e.retakeAvailable?u(S,{kind:"secondary",full:!0,disabled:s,onClick:()=>l(()=>e.retake()),children:n(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}m(Mt,"IdentitySummaryView");var Xe=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Lt({step:e,i18n:t,livenessProps:r,sekyroIntro:n}){let o=w(t),[i,c]=I(null);M(()=>e.onLivePhoto(d=>{let h=d.update?.coach;c(d.holding||h===void 0?null:t.t(`portrait.coach.${h}`))}),[e,t]);let s=e.instructions==="icao",a=C(()=>ge(e),[e]),l=e.icao?.profile==="selfie",f=C(()=>s?Xe.filter(d=>!l||d!=="background").map(d=>({id:d,text:o(`capture.tipsIcao.${d}`)})):void 0,[s,l,t]),b=C(()=>s&&!l?{...r.strings,"capture.tips.title":o("capture.tipsIcao.title")}:r.strings,[s,l,r.strings,t]),y=l?void 0:o("capture.tipsIcao.title"),g=C(()=>n===!0&&f!==void 0?{...r.slots,intro:m((d,h)=>u(be,{start:d,context:h,tips:f,...y!==void 0?{tipsTitle:y}:{},...a!==void 0?{retry:a}:{}}),"intro")}:r.slots,[n,f,y,a,r.slots,t]),p=l?`${(f??[]).map(d=>d.text).join(". ")}.`:o("capture.tipsIcao.summary");return u(Q,{...r,...g!==void 0?{slots:g}:{},...b!==void 0?{strings:b}:{},...f!==void 0?{tips:f,tipsSummary:p}:{},coach:i})}m(Lt,"LivePhotoLiveness");function Ft({i18n:e}){let t=w(e);return k(_,{tone:"info",children:[u("strong",{children:t("portrait.retakeOnly")}),u("span",{children:t("portrait.keepCamera")})]})}m(Ft,"PortraitRetakeNotice");function Vt({i18n:e,provider:t}){let r=e.strings,n=m(o=>r[o]??_e[e.locale][o]??"","pick");return u("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?K(n("eid.continueHint"),{provider:t}):n("eid.continueHintGeneric")})}m(Vt,"EidContinueHint");async function Je(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(Je,"copy");function ae({url:e,i18n:t,label:r,primary:n}){let o=w(t),[i,c]=I("idle"),s=r.startsWith("inApp.")?"inApp":"handoff";return k("div",{className:"sekyro-stack sekyro-stack--1",children:[u(S,{kind:n?"primary":"secondary",full:!0,onClick:()=>{Je(e).then(a=>c(a?"copied":"failed"))},children:o(r)}),u("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:i==="idle"?"":o(`${s}.${i==="copied"?"copied":"copyFailed"}`)})]})}m(ae,"CopyLink");function Be({url:e,i18n:t,refresh:r,footer:n,lead:o}){let i=w(t),c=L(),s=C(()=>{try{return te(J(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]),a=$(r);a.current=r;let l=V();return M(()=>{let f=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&a.current?.().catch(()=>{})},5e3);return()=>clearInterval(f)},[]),k("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":c,"data-testid":"sekyro-handoff",children:[k("div",{className:"sekyro-heading",children:[u("h2",{id:c,ref:l,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),o!==void 0?u("p",{children:o}):null,u("p",{className:"sekyro-text-muted",children:i("handoff.description")})]}),s!==null?k("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":i("handoff.qrAlt"),children:[u("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),u("path",{d:s.dots,className:"sekyro-qr__fg"}),u("path",{d:s.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),s.logo!==null?u("path",{d:ee.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:ne(s.logo),"data-qr-mark":""}):null]}):null,k("p",{className:"sekyro-handoff__waiting",role:"status",children:[u("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),i("handoff.waiting")]}),k(H,{children:[u(ae,{url:e,i18n:t,label:"handoff.copyLink"}),n??null]})]})}m(Be,"HandoffView");var Ne={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function Dt({i18n:e,org:t,nativeApp:r,fallbackUrl:n,refresh:o,footer:i}){let c=w(e),s=C(()=>!oe(),[]),a=r.link??n,l=C(()=>{if(!s||a===void 0||a==="")return null;try{return te(J(a,{ecl:"H"}),{logo:!0})}catch{return null}},[s,a]),f=$(o);f.current=o,M(()=>{let h=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&f.current?.().catch(()=>{})},5e3);return()=>clearInterval(h)},[]);let[b,y]=I(!1),g=m(()=>{o!==void 0&&(y(!0),o().catch(()=>{}).finally(()=>y(!1)))},"again"),p=r.sekyroApp,d=t!==""?c(p?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):c(p?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return k(x,{tone:"brand",icon:"smartphone",title:c("needsApp.capture.title"),testId:"sekyro-native-app",actions:k(N,{children:[!s&&p&&r.sekyroAppLink!==void 0?u("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:r.sekyroAppLink,"data-testid":"sekyro-open-sekyro-app",children:c("needsApp.capture.openSekyro")}):null,o!==void 0?u(S,{kind:"secondary",full:!0,disabled:b,onClick:g,children:e.t("common.refresh")}):null,i??null]}),children:[u("p",{children:d}),l!==null?k(N,{children:[k("svg",{className:"sekyro-qr",viewBox:`0 0 ${l.size} ${l.size}`,role:"img","aria-label":c("needsApp.capture.qrAlt"),children:[u("rect",{width:l.size,height:l.size,className:"sekyro-qr__bg"}),u("path",{d:l.dots,className:"sekyro-qr__fg"}),u("path",{d:l.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),l.logo!==null?u("path",{d:ee.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:ne(l.logo),"data-qr-mark":""}):null]}),u("p",{className:"sekyro-text-muted",children:c("needsApp.capture.scan")})]}):null,p?k("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[c("needsApp.capture.getApp")," ",u("a",{href:Ne.appStore,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.appStore")})," · ",u("a",{href:Ne.googlePlay,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.googlePlay")})]}):null,k("p",{className:"sekyro-handoff__waiting",role:"status",children:[u("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),c("needsApp.capture.waiting")]})]})}m(Dt,"NativeAppView");var et=["intro","data","processing","sharing","retention"];function Ht({i18n:e}){let t=w(e);return u(N,{children:et.map(r=>u("p",{children:t(`consent.human.terms.${r}`)},r))})}m(Ht,"HumanConsentTerms");function $t({url:e,i18n:t}){return C(()=>!oe(),[])?u(Be,{url:e,i18n:t}):null}m($t,"DesktopHandoffView");function tt(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(ke(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let r=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||r?"ios":/Android/i.test(t)?"chrome_android":"desktop"}m(tt,"cameraHelpPlatform");var nt={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function qt({i18n:e,cause:t,onRetry:r,onContinue:n,handoffUrl:o,repeated:i=!1,platform:c}){let s=w(e),a=L(),l=V(),[f,b]=I("idle"),y=C(()=>o!==void 0&&!oe(),[o]),g=t==="denied",p=C(()=>c??tt(),[c]),d=g&&p==="in_app",[h,A]=I(!1),z=$(!1),q=$(!0);M(()=>(q.current=!0,()=>{q.current=!1}),[]);let Te=m(()=>{if(!g){r();return}z.current||(z.current=!0,Qe().catch(()=>"unknown").then(F=>{z.current=!1,q.current&&(F==="denied"&&!h&&!i?A(!0):r())}))},"retry"),Re=m(()=>{n!==void 0&&(b("busy"),n(t).then(()=>b("idle"),F=>b(F instanceof ze&&F.code==="check_out_of_order"?"idle":"failed")))},"end"),P=typeof window>"u"?"":window.location.href.split("#")[0]??"",E=C(()=>d&&P!==""?W(P):null,[d,P]),se=k(N,{children:[d&&E!==null?k("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:E,"data-testid":"sekyro-open-browser",children:[u(D,{name:"external"}),s("inApp.openBrowser")]}):null,d&&P!==""?u(ae,{url:P,i18n:e,label:"inApp.copyLink",primary:E===null}):null,u(S,{full:!0,kind:!d&&(g||n===void 0)?"primary":"secondary",onClick:Te,children:e.t("common.retry")}),n!==void 0?u(S,{full:!0,kind:g?"secondary":"primary",disabled:f==="busy","aria-busy":f==="busy"||void 0,onClick:Re,children:s("capture.noCamera.continue")}):null]}),ie=f==="failed"?u(_,{tone:"danger",children:u("span",{children:e.t("errors.network_error")})}):null,ce=s(d?"capture.noCamera.inAppTitle":g?"capture.noCamera.deniedTitle":"capture.noCamera.title"),ue=s(d?"capture.noCamera.inAppBody":g?"capture.noCamera.deniedBody":"capture.noCamera.body"),pe=g&&!d?k(N,{children:[u("p",{"data-testid":"sekyro-camera-steps","data-platform":p,children:s(nt[p])}),p!=="desktop"?u("p",{className:"sekyro-text-muted",children:s("capture.noCamera.stepsSystem")}):null]}):null,le=g&&(h||i)?u(_,{tone:"warning",children:u("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:s("capture.noCamera.stillBlocked")})}):null;return y&&o!==void 0?k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":a,"data-testid":"sekyro-no-camera","data-cause":t,children:[u(Be,{url:o,i18n:e}),u("h2",{id:a,ref:l,tabIndex:-1,className:"sekyro-text-body",children:ce}),u("p",{className:"sekyro-text-muted",children:ue}),pe,le,ie,u("div",{className:"sekyro-stack sekyro-stack--3",children:se})]}):k(x,{tone:g?"warning":"neutral",icon:"camera",titleId:a,title:ce,testId:"sekyro-no-camera",actions:se,children:[u("p",{children:ue}),pe,le,ie]})}m(qt,"NoCameraView");function Et({url:e,i18n:t,onContinue:r}){let n=w(t),o=L(),i=C(()=>W(e),[e]);return u(x,{tone:"brand",icon:"external",titleId:o,title:n("inApp.title"),testId:"sekyro-in-app",actions:k(N,{children:[i!==null?k("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:i,"data-testid":"sekyro-open-browser",children:[u(D,{name:"external"}),n("inApp.openBrowser")]}):null,u(ae,{url:e,i18n:t,label:"inApp.copyLink",primary:i===null}),u(S,{kind:"ghost",full:!0,onClick:r,children:n("inApp.continueAnyway")})]}),children:u("p",{children:n("inApp.description")})})}m(Et,"InAppBrowserPrompt");var rt={tester_limit_reached:"testerGate.limitBody",gate_attempts_exhausted:"testerGate.exhaustedBody",tester_gate_closed:"testerGate.closedBody"};function Ut({i18n:e,onOpen:t}){let r=w(e);return u(S,{kind:"ghost",full:!0,onClick:t,"data-testid":"sekyro-tester-gate-action",children:r("testerGate.action")})}m(Ut,"TesterGateAction");function Qt({i18n:e,verification:t,attemptsLeft:r,livenessProps:n,onBound:o,onDone:i}){let c=w(e),s=L(),[a,l]=I("intro"),[f,b]=I(null),y=t.testerGate,g=m(d=>{y!==void 0&&(l("checking"),y.call(t,d).then(({bound:h})=>{h&&o(),l(h?"bound":"miss")},h=>{let A=h instanceof ze?h.code:"",z=rt[A];b(z!==void 0?c(z):e.t(de(h,e.strings))),l("failed")}))},"captured"),p=u(S,{full:!0,kind:a==="intro"?"secondary":"primary",onClick:()=>i(!0),"data-testid":"sekyro-tester-gate-continue",children:c("testerGate.continueTest")});return a==="capture"?u(Q,{...n,onCaptured:g}):a==="checking"?u(x,{tone:"brand",icon:"face",busy:!0,live:!0,title:c("testerGate.checking"),testId:"sekyro-tester-gate-checking"}):a==="bound"?u(x,{tone:"success",icon:"success",title:c("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:u(S,{full:!0,onClick:()=>i(!1),children:c("testerGate.continue")}),children:u("p",{children:c("testerGate.boundBody")})}):a==="miss"||a==="failed"?u(x,{tone:"warning",icon:"info",title:c(a==="miss"?"testerGate.missTitle":"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:k(N,{children:[p,r>0&&a==="miss"?u(S,{full:!0,kind:"secondary",onClick:()=>l("capture"),children:c("testerGate.retry")}):null]}),children:u("p",{children:a==="miss"?c("testerGate.missBody"):f})}):k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":s,"data-testid":"sekyro-tester-gate",children:[u(me,{id:s,title:c("testerGate.title"),lead:c("testerGate.body")}),k(H,{children:[u(S,{full:!0,onClick:()=>l("capture"),disabled:y===void 0,"data-testid":"sekyro-tester-gate-start",children:c("testerGate.start")}),p]})]})}m(Qt,"TesterGateView");export{Bt as ContactChoiceView,$t as DesktopHandoffView,Vt as EidContinueHint,Tt as GenericChoiceView,Be as HandoffView,Ht as HumanConsentTerms,Mt as IdentitySummaryView,Et as InAppBrowserPrompt,Ot as LaneChoiceView,Rt as LaneSwitch,Lt as LivePhotoLiveness,Dt as NativeAppView,qt as NoCameraView,Ft as PortraitRetakeNotice,Ut as TesterGateAction,Qt as TesterGateView,tt as cameraHelpPlatform};
|