@sekyro/react 0.1.0-rc.8 → 0.1.0-rc.9
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 +16 -0
- package/dist/chunk-2KED7D2Q.js +2 -0
- package/dist/chunk-4CUPBFVB.js +2 -0
- package/dist/chunk-4U5FQY26.js +2 -0
- package/dist/chunk-64PTFYXL.js +2 -0
- package/dist/chunk-7C3GZLJB.js +2 -0
- package/dist/{chunk-4ENKV24I.js → chunk-EZ5TVL6P.js} +1 -1
- package/dist/{chunk-2CJEADGY.js → chunk-PYAJMHZH.js} +1 -1
- package/dist/{chunk-R2D6V2R6.js → chunk-RFCYXRRC.js} +1 -1
- package/dist/chunk-RPQZH66I.js +2 -0
- package/dist/chunk-VRS7WSIK.js +2 -0
- package/dist/chunk-WJW3SNXQ.js +2 -0
- package/dist/chunk-XZEX5KTU.js +2 -0
- package/dist/{chunk-5JPJXBN6.js → chunk-YY76AMUA.js} +1 -1
- package/dist/chunk-ZCAZDOMD.js +2 -0
- package/dist/document-capture-view-2XBWIX6K.js +2 -0
- package/dist/eid-view-4T7Y2NJC.js +2 -0
- package/dist/email-otp-view-76T5QW7H.js +2 -0
- package/dist/flow-views-LEW6T5UR.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +1 -1
- package/dist/overlay-de-WAVGHULU.js +2 -0
- package/dist/overlay-es-CHRGVULE.js +2 -0
- package/dist/overlay-pt-2QQ7WMTF.js +2 -0
- package/dist/portrait-capture-view-GORALODC.js +2 -0
- package/dist/styles.css +12 -11
- package/dist/{theme-7Jj6eSH6.d.cts → theme-DiGLpM-i.d.cts} +26 -7
- package/dist/{theme-7Jj6eSH6.d.ts → theme-DiGLpM-i.d.ts} +26 -7
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +31 -4
- package/dist/verification/index.d.ts +31 -4
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +14 -0
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-2PGJ7P7E.js +0 -2
- package/dist/chunk-36RC3M4K.js +0 -2
- package/dist/chunk-COU4Y3DB.js +0 -2
- package/dist/chunk-LZU57LVO.js +0 -2
- package/dist/chunk-OSS4NHIS.js +0 -2
- package/dist/chunk-PXRIFHY2.js +0 -2
- package/dist/chunk-Y4PPDNQR.js +0 -2
- package/dist/chunk-ZTN4YV7S.js +0 -2
- package/dist/chunk-ZVSRJKQE.js +0 -2
- package/dist/document-capture-view-IAVBLXBO.js +0 -2
- package/dist/eid-view-FK54R7ER.js +0 -2
- package/dist/email-otp-view-ZVXSJMN5.js +0 -2
- package/dist/flow-views-5VR7NLTE.js +0 -2
- package/dist/portrait-capture-view-FYUOQWF7.js +0 -2
package/dist/chunk-PXRIFHY2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var m=Object.defineProperty;var r=(e,t)=>m(e,"name",{value:t,configurable:!0});import{forwardRef as g}from"react";import{jsx as h}from"react/jsx-runtime";var k=g(r(function({kind:t="primary",full:a=!1,className:n,type:o,...i},l){let s=["sekyro-btn",`sekyro-btn--${t}`];return a&&s.push("sekyro-btn--full"),n!==void 0&&s.push(n),h("button",{ref:l,type:o??"button",className:s.join(" "),...i})},"Button"));var c={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture…","capture.checking":"We're checking your identity…","capture.checkingHint":"This usually takes a few seconds — keep this page open","capture.securityNote":"Your images are encrypted and used only for this verification","capture.cameraOff":"Camera off","capture.previewAlt":"Preview of the captured image of your face","capture.retryCoaching.title":"That attempt didn't work — a few adjustments will help:","capture.retryCoaching.light":"Find good lighting — light on your face, not behind you","capture.retryCoaching.eyeLevel":"Hold your phone at eye level","capture.retryCoaching.head":"Look straight at the camera and keep your head upright","capture.attemptsRemaining.one":"{count} attempt remaining","capture.attemptsRemaining.other":"{count} attempts remaining","common.retry":"Try again","fcv2.err.permission":"Allow camera access in your browser settings (the camera icon in the address bar), then try again","fcv2.err.notfound":"No camera detected — connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera — close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS) — reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format — open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable — try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face — hold the phone in front of you","fcv3.come_closer":"Bring the phone a little closer","fcv3.move_back":"Move the phone a little farther away","fcv3.center_face":"Center your face in the circle","fcv3.straighten":"Hold your head straight","fcv3.more_light":"Find a brighter spot — light your face","fcv3.too_bright":"Too much light — move out of direct light","fcv3.hold_still":"Perfect — hold still","fcv3.steady_camera":"Hold the phone steady","fcv3.hold_upright":"Hold the phone upright","reasons.no_face":"No face could be detected during the check","reasons.media_unreadable":"The submitted capture could not be read","reasons.clip_too_short":"The capture was too short","reasons.spoof_detected":"The liveness check could not confirm a live person in front of the camera","reasons.review_band":"The automatic check was not conclusive, so it was sent to human review","reasons.nni_not_found":"The national identification number was not found in the civil registry","reasons.nni_invalid":"The national identification number is not a valid 10-digit NNI","reasons.registry_unavailable":"The civil registry could not be reached to confirm your number","reasons.result_from_cache":"The registry check was confirmed from a recent copy of the registry","reasons.no_face_source":"No face could be detected in the selfie photo","reasons.no_face_reference":"No reference photo was available to compare your selfie against — the requester needs to resolve this, so retaking your selfie will not help","reasons.low_quality_reference":"The reference photo on file was not clear enough to compare against","reasons.below_threshold":"The selfie did not match the photo on the identity document closely enough","reasons.side_missing":"One side of the identity document was not submitted","reasons.mrz_checksum_failed":"The machine-readable zone of the document could not be validated","reasons.unreadable":"The document photo was not clear enough to read","reasons.expired_document":"The identity document has expired","reasons.authenticity_review":"The document was sent to human review to confirm its authenticity","reasons.registry_mismatch":"The document's details did not match the civil registry — a reviewer will check","reasons.document_nni_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.otp_mismatch":"The verification code did not match the one we sent","reasons.otp_expired":"The verification code expired before it was entered","reasons.otp_send_failed":"We could not send a verification code to your phone","reasons.uncalibrated_capture_channel":"Desktop/webcam captures are not yet auto-decided — your verification went to human review","reasons.capture_back_camera":"Use the front camera. Hold the phone in front of your face and try again","reasons.capture_not_upright":"Hold your phone upright, not sideways, and try again","reasons.location_not_allowed":"Verification isn't available in your region.","reasons.anonymizer_blocked":"Turn off your VPN or proxy, then open the link again.","reasons.nationality_not_allowed":"This service can't verify this document. Contact the organization for other options.","reasons.document_type_not_accepted":"This type of document isn't accepted. Choose another document.","reasons.underage":"You don't meet the minimum age for this service.","reasons.age_unverifiable":"We couldn't read your date of birth. Take a clearer photo of your document.","reasons.nationality_unreadable":"We couldn't read your nationality. Take a clearer photo of your document.","reasons.name_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.birth_date_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.nationality_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.document_number_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.liveness_inconclusive":"Let's try again: face a light source and hold still.","reasons.match_inconclusive":"We couldn't confirm it's you. Try again in good light, without glasses.","reasons.subject_revoked":"The identity on file for this check is no longer available — the requester needs to run a full verification, so retrying will not help","reasons.probe_not_from_liveness":"Keep your face in the frame the whole time, then try again.","reasons.document_authenticity":"Use the original card, not a photo or a copy, and avoid reflections.","reasons.mobile_required":"Continue on your phone to take the selfie.","reasons.capture_tampered":"We couldn't verify this capture. Use your phone's built-in camera, without screen recording or camera apps.","reasons.device_velocity_exceeded":"This device can't be used for another verification right now. Contact the organization.","reasons.device_cooldown":"Too many attempts. Try again later.","cooldown.retryIn":"Too many attempts. Try again {time}.","cooldown.retryAt":"Too many attempts. Try again after {time}.","capture.busy":"Our service is busy. Trying again…","errors.inference_unavailable":"Try again in a moment.","method.title":"How do you want to verify?","method.description":"Choose one option to continue","returning.title":"Confirm it's you","returning.description":"You verified your identity before. One short face capture confirms it's still you.","method.national_number":"Enter my Mauritanian national ID number (NNI)","method.document_photo":"Photo of my document","errors.method_required":"Choose how you want to verify, then continue","errors.attestation_invalid":"We could not confirm this browser session is genuine — reload the page and try again","errors.network_error":"We could not reach the verification service — check your internet connection and try again","errors.session_expired":"This verification session has expired — ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number — ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source — avoid strong light behind you","capture.tips.uncover":"Uncover your face — no glasses, mask or hand in front of it","capture.tips.eyeLevel":"Hold your phone at eye level","capture.tips.straight":"Look straight at the camera and keep still","capture.tips.summary":"Stand in a well-lit area. Uncover your face — no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera — choose Allow","capture.permission.denied":"Camera access is blocked — allow it in your browser settings (the camera icon in the address bar), then reload this page","capture.permission.unknown":"We'll ask to use your camera when you start","capture.cameraLabel":"Camera","capture.facing.user":"Front camera","capture.facing.environment":"Back camera","capture.assisted.title":"Capture the person's face","capture.assisted.lead":"Point the back camera at the person's face and hold the phone upright. The voice guidance speaks to the person being filmed.","capture.assisted.stage":"Point the camera at the person's face","capture.voiceGuidance":"Voice guidance","capture.preparing.hint":"Setting up on-device face detection — this can take a moment on a slow connection","capture.ready":"Ready — start when you are","fcv2.err.models":"The face-detection models could not be loaded — check your connection and try again"};var u={"capture.start":"تشغيل الكاميرا","capture.recordAgain":"ابدأ محاولة جديدة","capture.switchCamera":"تبديل الكاميرا","capture.preparing.title":"جارٍ تجهيز الالتقاط الآمن…","capture.checking":"نتحقق من هويتك…","capture.checkingHint":"يستغرق هذا عادةً بضع ثوانٍ — أبقِ هذه الصفحة مفتوحة","capture.securityNote":"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق","capture.cameraOff":"الكاميرا مطفأة","capture.previewAlt":"معاينة الصورة الملتقطة لوجهك","capture.retryCoaching.title":"لم تنجح هذه المحاولة — بعض التعديلات ستساعد:","capture.retryCoaching.light":"اختر مكانًا جيد الإضاءة — الضوء على وجهك لا خلفك","capture.retryCoaching.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.retryCoaching.head":"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا","capture.attemptsRemaining.zero":"لم تتبقَّ أي محاولة","capture.attemptsRemaining.one":"تبقّت محاولة واحدة","capture.attemptsRemaining.two":"تبقّت محاولتان","capture.attemptsRemaining.few":"تبقّت {count} محاولات","capture.attemptsRemaining.many":"تبقّت {count} محاولة","capture.attemptsRemaining.other":"تبقّت {count} محاولة","common.retry":"أعد المحاولة","fcv2.err.permission":"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة","fcv2.err.notfound":"لم يتم العثور على كاميرا — وصِّل كاميرا أو فعِّلها ثم أعد المحاولة","fcv2.err.inuse":"تطبيق آخر يستخدم الكاميرا — أغلقه ثم أعد المحاولة","fcv2.err.insecure":"تتطلب الكاميرا اتصالًا آمنًا (HTTPS) — افتح هذه الصفحة عبر HTTPS","fcv2.err.unsupported":"متصفحك لا يستطيع الالتقاط بصيغة مدعومة — افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري","fcv2.err.generic":"الكاميرا غير متاحة — أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة","fcv3.no_face":"لا نرى وجهك — أمسك الهاتف أمامك","fcv3.come_closer":"قرّب الهاتف قليلًا","fcv3.move_back":"أبعد الهاتف قليلًا","fcv3.center_face":"ضع وجهك في منتصف الدائرة","fcv3.straighten":"أبقِ رأسك مستقيمًا","fcv3.more_light":"انتقل إلى مكان أكثر إضاءة — أضئ وجهك","fcv3.too_bright":"الإضاءة قوية جدًا — تجنّب الضوء المباشر على وجهك","fcv3.hold_still":"ممتاز — لا تتحرك","fcv3.steady_camera":"أمسك الهاتف بثبات","fcv3.hold_upright":"أمسك الهاتف بشكل عمودي","reasons.no_face":"تعذّر اكتشاف أي وجه أثناء التحقق","reasons.media_unreadable":"تعذّرت قراءة اللقطة المُرسلة","reasons.clip_too_short":"كانت اللقطة أقصر من اللازم","reasons.spoof_detected":"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا","reasons.review_band":"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية","reasons.nni_not_found":"لم يُعثر على الرقم الوطني في سجل الحالة المدنية","reasons.nni_invalid":"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام","reasons.registry_unavailable":"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد رقمك","reasons.result_from_cache":"أُكِّد فحص السجل استنادًا إلى نسخة حديثة من السجل","reasons.no_face_source":"تعذّر اكتشاف وجه في الصورة الذاتية","reasons.no_face_reference":"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها — على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي","reasons.low_quality_reference":"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة","reasons.below_threshold":"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية","reasons.side_missing":"أحد وجهي وثيقة الهوية لم يُرسل","reasons.mrz_checksum_failed":"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة","reasons.unreadable":"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة","reasons.expired_document":"انتهت صلاحية وثيقة الهوية","reasons.authenticity_review":"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها","reasons.registry_mismatch":"بيانات الوثيقة لا تطابق السجل المدني — سيتحقق منها مراجع","reasons.document_nni_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد — أُحيل تحققك إلى مراجعة بشرية","reasons.capture_back_camera":"استخدم الكاميرا الأمامية. أمسك الهاتف أمام وجهك وحاول مرة أخرى","reasons.capture_not_upright":"أمسك هاتفك بشكل عمودي وليس أفقيًا، ثم حاول مرة أخرى","reasons.location_not_allowed":"التحقق غير متاح في منطقتك.","reasons.anonymizer_blocked":"أوقف تشغيل VPN أو الوكيل ثم افتح الرابط مجددًا.","reasons.nationality_not_allowed":"لا يمكن لهذه الخدمة التحقق من هذه الوثيقة. تواصل مع الجهة لمعرفة الخيارات الأخرى.","reasons.document_type_not_accepted":"هذا النوع من الوثائق غير مقبول. اختر وثيقة أخرى.","reasons.underage":"لا تستوفي الحد الأدنى للسن لهذه الخدمة.","reasons.age_unverifiable":"تعذّرت قراءة تاريخ ميلادك. التقط صورة أوضح لوثيقتك.","reasons.nationality_unreadable":"تعذّرت قراءة جنسيتك. التقط صورة أوضح لوثيقتك.","reasons.name_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.birth_date_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.nationality_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.document_number_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.liveness_inconclusive":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","reasons.match_inconclusive":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","reasons.subject_revoked":"لم تعد الهوية المحفوظة لهذا التحقق متاحة — على الجهة الطالبة إجراء تحقق كامل، وإعادة المحاولة لن تُجدي","reasons.probe_not_from_liveness":"أبقِ وجهك داخل الإطار طوال الوقت، ثم حاول مجددًا.","reasons.document_authenticity":"استخدم البطاقة الأصلية، لا صورة لها ولا نسخة منها، وتجنّب الانعكاسات.","reasons.mobile_required":"تابع على هاتفك لالتقاط صورة لوجهك.","reasons.capture_tampered":"تعذّر التحقق من هذا الالتقاط. استخدم الكاميرا المدمجة في هاتفك، دون تسجيل الشاشة أو تطبيقات الكاميرا.","reasons.device_velocity_exceeded":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع الجهة.","reasons.device_cooldown":"محاولات كثيرة. حاول مجددًا لاحقًا.","cooldown.retryIn":"محاولات كثيرة. حاول مجددًا {time}.","cooldown.retryAt":"محاولات كثيرة. حاول مجددًا بعد {time}.","capture.busy":"خدمتنا مشغولة حاليًا. نعيد المحاولة…","errors.inference_unavailable":"حاول مجددًا بعد لحظات.","method.title":"كيف تريد التحقق من هويتك؟","method.description":"اختر إحدى الطريقتين للمتابعة","returning.title":"أكّد أنك أنت","returning.description":"سبق أن تحقّقت من هويتك. التقاط قصير لوجهك يكفي لتأكيد أنك أنت.","method.national_number":"إدخال الرقم الوطني للتعريف الموريتاني (NNI)","method.document_photo":"تصوير وثيقتي","errors.method_required":"اختر طريقة التحقق، ثم تابع","errors.attestation_invalid":"تعذّر التأكد من سلامة جلسة المتصفح — أعد تحميل الصفحة وحاول مجددًا","errors.network_error":"تعذّر الوصول إلى خدمة التحقق — تحقق من اتصالك بالإنترنت وأعد المحاولة","errors.session_expired":"انتهت صلاحية جلسة التحقق هذه — اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا","errors.nni_unbound":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف — اطلب رابطًا جديدًا من الجهة الطالبة","capture.tips.title":"لتحقق ناجح:","capture.tips.light":"اجعل الضوء أمام وجهك — تجنّب الإضاءة القوية خلفك","capture.tips.uncover":"اكشف وجهك — بلا نظارات أو كمامة أو يد أمامه","capture.tips.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.tips.straight":"انظر مباشرة إلى الكاميرا وابقَ ثابتًا","capture.tips.summary":"اختر مكانًا جيد الإضاءة. اكشف وجهك — بلا نظارات أو كمامة. بعد تشغيل الكاميرا، أمسك هاتفك بمستوى العينين، وانظر مباشرة إلى الكاميرا وابقَ ثابتًا.","capture.tips.listen":"استمع إلى التعليمات","capture.tips.stop":"إيقاف","capture.permission.granted":"تم السماح بالوصول إلى الكاميرا","capture.permission.prompt":"سيطلب متصفحك استخدام الكاميرا — اختر «السماح»","capture.permission.denied":"الوصول إلى الكاميرا محظور — اسمح به من إعدادات المتصفح (رمز الكاميرا في شريط العنوان)، ثم أعد تحميل الصفحة","capture.permission.unknown":"سنطلب استخدام الكاميرا عند البدء","capture.cameraLabel":"الكاميرا","capture.facing.user":"الكاميرا الأمامية","capture.facing.environment":"الكاميرا الخلفية","capture.assisted.title":"صوّر وجه الشخص","capture.assisted.lead":"وجّه الكاميرا الخلفية نحو وجه الشخص وأمسك الهاتف بشكل عمودي. الإرشادات الصوتية تخاطب الشخص الذي تصوّره.","capture.assisted.stage":"وجّه الكاميرا نحو وجه الشخص","capture.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك — قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز — ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه — تحقق من اتصالك ثم أعد المحاولة"};var p={"capture.start":"Démarrer la caméra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de caméra","capture.preparing.title":"Préparation de la capture sécurisée…","capture.checking":"Nous vérifions votre identité…","capture.checkingHint":"Cela prend généralement quelques secondes — gardez cette page ouverte","capture.securityNote":"Vos images sont chiffrées et utilisées uniquement pour cette vérification","capture.cameraOff":"Caméra éteinte","capture.previewAlt":"Aperçu de l’image capturée de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti — quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien éclairé — lumière sur le visage, pas derrière vous","capture.retryCoaching.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la caméra, la tête bien droite","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"Réessayer","fcv2.err.permission":"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez","fcv2.err.notfound":"Aucune caméra détectée — branchez ou activez une caméra, puis réessayez","fcv2.err.inuse":"La caméra est utilisée par une autre application — fermez-la, puis réessayez","fcv2.err.insecure":"La caméra nécessite une connexion sécurisée (HTTPS) — rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible — ouvrez cette page dans un navigateur récent comme Chrome ou Safari","fcv2.err.generic":"Caméra indisponible — réessayez, ou contactez le support si le problème persiste","fcv3.no_face":"Nous ne voyons pas votre visage — tenez le téléphone devant vous","fcv3.come_closer":"Rapprochez un peu le téléphone","fcv3.move_back":"Éloignez un peu le téléphone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la tête droite","fcv3.more_light":"Cherchez un endroit plus lumineux — éclairez votre visage","fcv3.too_bright":"Trop de lumière — évitez la lumière directe sur le visage","fcv3.hold_still":"Parfait — ne bougez plus","fcv3.steady_camera":"Tenez le téléphone stable","fcv3.hold_upright":"Tenez le téléphone à la verticale","reasons.no_face":"Aucun visage n’a pu être détecté pendant la vérification","reasons.media_unreadable":"La capture envoyée n’a pas pu être lue","reasons.clip_too_short":"La capture était trop courte","reasons.spoof_detected":"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra","reasons.review_band":"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain","reasons.nni_not_found":"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil","reasons.nni_invalid":"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres","reasons.registry_unavailable":"Le registre d'état civil n'a pas pu être joint pour confirmer votre numéro","reasons.result_from_cache":"Le contrôle du registre a été confirmé à partir d'une copie récente du registre","reasons.no_face_source":"Aucun visage n'a pu être détecté sur la photo selfie","reasons.no_face_reference":"Aucune photo de référence n'était disponible pour comparer votre selfie — c'est au demandeur de le résoudre, reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de référence enregistrée n'était pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité","reasons.side_missing":"Un côté de la pièce d'identité n'a pas été envoyé","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu être validée","reasons.unreadable":"La photo du document n'était pas assez nette pour être lue","reasons.expired_document":"La pièce d'identité a expiré","reasons.authenticity_review":"Le document a été transmis à un examen humain pour confirmer son authenticité","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil — un examinateur va vérifier","reasons.document_nni_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.otp_mismatch":"Le code de vérification ne correspond pas à celui que nous avons envoyé","reasons.otp_expired":"Le code de vérification a expiré avant d'être saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de vérification à votre téléphone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore décidées automatiquement — votre vérification part en revue humaine","reasons.capture_back_camera":"Utilisez la caméra avant. Tenez le téléphone devant votre visage et réessayez","reasons.capture_not_upright":"Tenez votre téléphone à la verticale, pas à l'horizontale, et réessayez","reasons.location_not_allowed":"La vérification n'est pas disponible dans votre région.","reasons.anonymizer_blocked":"Désactivez votre VPN ou proxy, puis rouvrez le lien.","reasons.nationality_not_allowed":"Ce service ne peut pas vérifier ce document. Contactez l'organisation pour d'autres options.","reasons.document_type_not_accepted":"Ce type de document n'est pas accepté. Choisissez un autre document.","reasons.underage":"Vous n'avez pas l'âge minimum requis pour ce service.","reasons.age_unverifiable":"Nous n'avons pas pu lire votre date de naissance. Prenez une photo plus nette de votre document.","reasons.nationality_unreadable":"Nous n'avons pas pu lire votre nationalité. Prenez une photo plus nette de votre document.","reasons.name_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.birth_date_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.nationality_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.document_number_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.liveness_inconclusive":"Réessayons : placez-vous face à une source de lumière et restez immobile.","reasons.match_inconclusive":"Nous n'avons pas pu confirmer qu'il s'agit bien de vous. Réessayez dans un endroit bien éclairé, sans lunettes.","reasons.subject_revoked":"L'identité enregistrée pour cette vérification n'est plus disponible — le demandeur doit lancer une vérification complète, réessayer n'y changera rien","reasons.probe_not_from_liveness":"Gardez votre visage dans le cadre tout du long, puis réessayez.","reasons.document_authenticity":"Utilisez la carte originale, pas une photo ni une copie, et évitez les reflets.","reasons.mobile_required":"Continuez sur votre téléphone pour prendre le selfie.","reasons.capture_tampered":"Nous n'avons pas pu vérifier cette capture. Utilisez l'appareil photo intégré de votre téléphone, sans enregistrement d'écran ni application de caméra.","reasons.device_velocity_exceeded":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez l'organisation.","reasons.device_cooldown":"Trop de tentatives. Réessayez plus tard.","cooldown.retryIn":"Trop de tentatives. Réessayez {time}.","cooldown.retryAt":"Trop de tentatives. Réessayez à partir de {time}.","capture.busy":"Notre service est très sollicité. Nouvel essai en cours…","errors.inference_unavailable":"Réessayez dans un instant.","method.title":"Comment souhaitez-vous vérifier votre identité ?","method.description":"Choisissez une option pour continuer","returning.title":"Confirmez qu'il s'agit bien de vous","returning.description":"Vous avez déjà vérifié votre identité. Une courte capture du visage confirme qu'il s'agit toujours de vous.","method.national_number":"Saisir mon numéro national d'identification mauritanien (NNI)","method.document_photo":"Photographier mon document","errors.method_required":"Choisissez comment vérifier votre identité, puis continuez","errors.attestation_invalid":"Nous n'avons pas pu confirmer l'authenticité de cette session de navigateur — rechargez la page et réessayez","errors.network_error":"Nous n'avons pas pu joindre le service de vérification — vérifiez votre connexion internet et réessayez","errors.session_expired":"Cette session de vérification a expiré — demandez un nouveau lien à l'organisme qui vous a envoyé ici","errors.nni_unbound":"Ce lien a été créé sans votre numéro national d'identification — demandez un nouveau lien à l'organisme demandeur","capture.tips.title":"Pour une vérification réussie :","capture.tips.light":"Placez-vous face à la lumière — évitez une forte lumière derrière vous","capture.tips.uncover":"Dégagez votre visage — ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.tips.straight":"Regardez droit vers la caméra et restez immobile","capture.tips.summary":"Placez-vous dans une zone bien éclairée. Dégagez votre visage — ni lunettes, ni masque. Une fois la caméra démarrée, tenez votre téléphone à hauteur des yeux, regardez droit vers la caméra et restez immobile.","capture.tips.listen":"Écouter les instructions","capture.tips.stop":"Arrêter","capture.permission.granted":"Accès à la caméra autorisé","capture.permission.prompt":"Votre navigateur va demander l’accès à la caméra — choisissez « Autoriser »","capture.permission.denied":"L’accès à la caméra est bloqué — autorisez-le dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l’accès à la caméra au démarrage","capture.cameraLabel":"Caméra","capture.facing.user":"Caméra avant","capture.facing.environment":"Caméra arrière","capture.assisted.title":"Filmez le visage de la personne","capture.assisted.lead":"Pointez la caméra arrière vers le visage de la personne et tenez le téléphone à la verticale. Le guidage vocal s'adresse à la personne filmée.","capture.assisted.stage":"Pointez la caméra vers le visage de la personne","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la détection du visage sur l’appareil — cela peut prendre un instant sur une connexion lente","capture.ready":"Prêt — commencez quand vous voulez","fcv2.err.models":"Impossible de charger les modèles de détection du visage — vérifiez votre connexion puis réessayez"};function q(e){switch(e){case"center":return"fcv3.center_face";case"closer":return"fcv3.come_closer";case"farther":return"fcv3.move_back";case"light":return"fcv3.more_light";case"still":case"hold":return"fcv3.hold_still";case"upright":return"fcv3.hold_upright";default:{let t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}r(q,"hintStringKey");function P(e){return`fcv2.err.${e}`}r(P,"captureErrorStringKey");function A(e){switch(e){case"no_recorder":return"fcv2.err.unsupported";case"attestation":return"errors.attestation_invalid";case"network":return"errors.network_error";case"nni_unbound":return"errors.nni_unbound";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${e}`;return Object.hasOwn(c,t)?t:null}}}r(A,"reasonStringKey");function H(e,t,a=new Date){if(t===void 0)return null;let n=new Date(t),o=n.getTime()-a.getTime();if(!Number.isFinite(o)||o<=0)return null;if(o<36e5){let s=Math.max(1,Math.ceil(o/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(s,"minute")}}let i=n.toDateString()===a.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...i?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(n)}}r(H,"retryAfterTime");function I(e,t,a){let n=new Intl.PluralRules(t).select(a);return((n==="other"?void 0:e[`capture.attemptsRemaining.${n}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(a))}r(I,"attemptsRemainingText");import{createContext as f,useContext as v}from"react";var _={ar:u,fr:p,en:c};function j(e,t){let a=_[e];if(t===void 0)return a;let n={...a};for(let o of Object.keys(t)){let i=t[o];typeof i=="string"&&(n[o]=i)}return n}r(j,"resolveStrings");var d=f(e=>c[e]??""),F=d.Provider;function V(){return v(d)}r(V,"useStrings");import{useCallback as y}from"react";function $(){return y(e=>{e?.focus()},[])}r($,"useFocusOnMount");import{jsx as b}from"react/jsx-runtime";function Q({tone:e,role:t,children:a,testId:n}){return b("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":n,children:a})}r(Q,"Notice");export{r as a,k as b,c,u as d,p as e,q as f,P as g,A as h,H as i,I as j,j as k,F as l,V as m,Q as n,$ as o};
|
package/dist/chunk-Y4PPDNQR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as i,k as a}from"./chunk-PXRIFHY2.js";var s={"session.title":"تحقّق من هويتك","session.requestedBy":"تطلب {orgName} منك التحقق من هويتك","returning.requestedBy":"تطلب {orgName} منك تأكيد أنك أنت","consent.notice":"بإكمال عملية التحقق من الهوية، فإنك توافق على معالجة بياناتك الشخصية والبيومترية للتحقق من هويتك.","consent.details":"التفاصيل","consent.terms.intro":"تتحقق Sekyro AI من هويتك نيابةً عن الجهة التي أرسلت إليك هذا الرابط. قبل البدء، اطّلع على كيفية استخدام بياناتك.","consent.terms.data":"أثناء التحقق، تجمع Sekyro AI صور وثيقة هويتك، ومقطع فيديو ذاتيًا قصيرًا، وصورة ذاتية، ورقم وثيقة هويتك.","consent.terms.processing":"تُستخدم هذه البيانات للتحقق من هويتك فقط: يُقارَن وجهك بالصورة الموجودة على وثيقتك، ويُطابَق رقمك مع سجلات الجهة المُصدِرة متى أمكن ذلك. وقد يفحص بعض الخطوات مراجع بشري مخوَّل.","consent.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.terms.retention":"تُخزَّن بياناتك مشفّرة ولا يُحتفظ بها إلا للمدة التي يقتضيها القانون. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع الجهة التي طلبت هذا التحقق.","otp.sendTitle":"تحقّق من رقم هاتفك","otp.sendDescription":"سنرسل إليك رمزًا يُستخدم مرة واحدة لتأكيد أن هذا الرقم يخصّك","otp.prefilledNotice":"سنرسل رمز تحقّق إلى رقم هاتفك المسجّل.","otp.phoneLabel":"رقم الهاتف","otp.phoneHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا الرقم","otp.phonePlaceholder":"8 أرقام","otp.send":"إرسال الرمز","otp.channelSms":"رسالة نصية","otp.channelWhatsapp":"واتساب","otp.verifyTitle":"أدخل رمز التحقّق","otp.verifyDescription":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إليك لإتمام التحقّق من رقمك","otp.sentTo":"أرسلنا رمزًا مكوّنًا من 6 أرقام إلى {number} عبر {channel}","otp.codeLabel":"رمز التحقّق","otp.codeHelper":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إليك","otp.verify":"تحقّق من الرمز","otp.resend":"إعادة إرسال الرمز","otp.resendIn":"إعادة إرسال الرمز خلال {seconds} ثانية","otp.expiresIn":"ينتهي الرمز خلال {time}","otp.expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد","otp.reason_otp_mismatch":"الرمز غير صحيح. تحقّق منه وأعد إدخاله","otp.reason_otp_expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد للمتابعة","otp.reason_otp_send_failed":"تعذّر إرسال الرمز. أعد المحاولة بعد قليل","otp.chooseChannel":"كيف تريد أن تتلقّى رمزك؟","otp.sendBy":"إرسال الرمز عبر {channel}","otp.resendBy":"إعادة الإرسال عبر {channel}","otp.reason_otp_channel_unavailable":"هذه الوسيلة غير متاحة. اختر طريقة أخرى لتلقّي رمزك","otp.reason_otp_destination_not_allowed":"لا يمكننا إرسال الرموز إلى أرقام هذا البلد. أدخل رقمًا آخر","otp.reason_otp_destination_unknown":"تعذّر التعرّف على هذا الرقم. تحقّق منه وأعد إدخاله مع رمز البلد","otp.reason_otp_rate_limited":"طلبت رموزًا كثيرة. انتظر قليلًا ثم أعد المحاولة","session.steps.population.title":"أدخل رقم تعريفك الوطني","session.steps.population.description":"يُطابَق رقمك الوطني المكوّن من 10 أرقام مع سجل الحالة المدنية","population.label":"الرقم الوطني للتعريف الموريتاني (NNI)","population.helper":"رقم التعريف الوطني المكوّن من 10 أرقام كما هو مطبوع على بطاقتك","population.placeholder":"10 أرقام","population.submit":"تحقّق من رقمي","population.invalid":"أدخل الأرقام العشرة للرقم الوطني كما هو مطبوع على بطاقة هويتك","population.reason_registry_unavailable":"سجل الحالة المدنية غير متاح مؤقتًا. لم يُتحقَّق من رقمك. أعد المحاولة بعد قليل","population.reason_nni_not_found":"لم يُعثر على هذا الرقم في سجل الحالة المدنية. تأكد من مطابقته تمامًا لبطاقتك","population.reason_nni_invalid":"هذا الرقم ليس رقمًا وطنيًا صالحًا. تحقق من الأرقام العشرة المطبوعة على بطاقة هويتك","population.bound.description":"قدّمت الجهة الطالبة رقمك الوطني للتعريف مسبقًا. أكّد للتحقق منه في سجل الحالة المدنية","population.bound.confirm":"تأكيد ومتابعة","population.reason_nni_not_found_or_document":"لم نعثر على هذا الرقم. تأكّد منه، أو استخدم وثيقتك بدلًا منه.","population.useDocument":"استخدام وثيقتي بدلًا من ذلك","population.fromDocument.title":"التحقق في السجل المدني","population.fromDocument.description":"نتحقق من الرقم الوطني المقروء من وثيقتك في السجل المدني","population.fromDocument.continue":"متابعة","session.steps.doc.titleRecto":"صوّر الوجه الأمامي لوثيقة هويتك","session.steps.doc.titleVerso":"صوّر الوجه الخلفي لوثيقة هويتك","session.steps.doc.description":"استخدم إضاءة جيدة وأبقِ البطاقة كاملة داخل الإطار","doc.pickTitle":"أي وثيقة ستستخدم؟","doc.pickDescription":"اختر وثيقة الهوية التي بحوزتك. ستمسحها بالكاميرا","doc.pickLabel":"نوع الوثيقة","doc.startScan":"بدء المسح","doc.titlePassport":"امسح صفحة بيانات جواز سفرك","doc.reason_side_missing":"حُفظ أحد الوجهين. صوّر الآن الوجه المتبقي من الوثيقة","doc.reason_unreadable":"تعذّرت قراءة الوثيقة. أعد التقاط الصورة بحيث تكون البطاقة كاملة وواضحة داخل الإطار","doc.process_failed":"تعذّرت معالجة هذه الصورة. التقط صورة جديدة وأعد المحاولة","doc.uploading":"جارٍ رفع وثيقتك…","doc.cameraBlocked":"نحتاج إلى الكاميرا لمسح الوثيقة. الوصول إلى الكاميرا محظور أو غير متاح","doc.cameraBlockedHint":"اسمح بالوصول إلى الكاميرا لهذا الموقع من إعدادات المتصفح ثم أعد المحاولة","doc.retryCamera":"إعادة تجربة الكاميرا","doc.holdUpright":"ضع الوثيقة داخل الإطار. سيتم الالتقاط تلقائيًا. للحصول على صورة أوضح، أدر هاتفك أفقيًا","dcv2.sensing":"جارٍ البحث عن الوثيقة. ضعها داخل الإطار","dcv2.too_far":"قرّب الوثيقة حتى تملأ الإطار","dcv2.too_close":"ابتعد قليلًا. أبقِ الوثيقة كاملة داخل الإطار","dcv2.edge_clipped":"أدخل الوثيقة كاملة داخل الإطار. أبقِ الحواف ظاهرة","dcv2.wrong_shape":"هذا لا يبدو صحيحًا. ضع الوثيقة مسطحة باتجاه الكاميرا مباشرة","dcv2.tilted":"أمسك الهاتف بشكل مستوٍ فوق الوثيقة. الزاوية كبيرة جدًا","dcv2.too_dark":"ابحث عن مكان أكثر إضاءة. أنر الوثيقة","dcv2.too_bright":"الإضاءة قوية جدًا. أمل الوثيقة بعيدًا عن الانعكاس","dcv2.blurry":"ثبّت هاتفك. الصورة غير واضحة","dcv2.focus_far":"قريب جدًا للتركيز. أبعد الهاتف قليلًا","dcv2.glare":"الضوء ينعكس على الوثيقة. أملها قليلًا","dcv2.hold_still":"ممتاز. لا تتحرك","dcv2.processing":"جارٍ الالتقاط…","dcv2.side_captured":"تم التقاط هذا الوجه. اقلب الوثيقة إلى الوجه الخلفي","dcv2.captured":"تم الالتقاط","session.processing.title":"جارٍ معالجة عمليات التحقق","session.processing.description":"يستغرق ذلك عادةً بضع ثوانٍ. وستظهر النتيجة هنا","handoff.title":"تابع على هاتفك","session.result.approved.title":"تم التحقق من هويتك","session.result.approved.description":"انتهيت. يمكنك إغلاق هذه الصفحة","session.result.review.title":"تحققك قيد المراجعة","session.result.review.description":"سيتم إرسال النتيجة إلى الجهة التي أرسلت لك هذا الرابط. لا حاجة لأي إجراء آخر.","session.result.rejected.title":"تعذّر التحقق من هويتك","session.result.rejected.description":"تواصل مع الجهة التي أرسلت إليك هذا الرابط إذا كنت تعتقد أن الأمر خطأ","session.result.expired.title":"انتهت صلاحية جلسة التحقق هذه","session.result.expired.description":"اطلب رابطًا جديدًا من الجهة التي أرسلته، ثم ابدأ من جديد","session.result.detailsMismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى {org}. تواصل مع {org}.","session.result.deviceVelocity":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع {org}.","session.result.deviceStop":"تعذّر المتابعة على هذا الجهاز. حاول مرة أخرى من جهاز أو متصفح آخر.","result.referenceLabel":"الرمز المرجعي","common.loading":"جارٍ تحميل جلسة التحقق","common.refresh":"حدّث الحالة","common.noAttemptsLeft":"لم تتبقَّ أي محاولة","session.steps.portrait.title":"التقط صورة الهوية","session.steps.portrait.description":"انظر مباشرة إلى الكاميرا بملامح محايدة، أمام جدار سادة وفاتح","portrait.coach.no_face":"ضع وجهك داخل الإطار البيضاوي","portrait.coach.multiple_faces":"تأكد من عدم وجود أي شخص آخر في الصورة","portrait.coach.center":"ضع وجهك في وسط الإطار البيضاوي","portrait.coach.too_close":"ابتعد قليلاً","portrait.coach.pose":"انظر مباشرة إلى الكاميرا","portrait.coach.eyes":"افتح عينيك أكثر قليلاً","portrait.coach.mouth":"أغلق فمك، بتعبير محايد","portrait.coach.glare":"أمِل نظارتك أو انزعها","portrait.coach.lighting":"اجعل وجهك مقابل نافذة أو مصباح","portrait.coach.lighting_side":"تجنّب الإضاءة من جانب واحد","portrait.coach.background":"قف أمام جدار فاتح اللون وسادة","portrait.coach.resolution":"اقترب قليلاً","portrait.coach.hold_still":"لا تتحرك","portrait.coach.hold":"ممتاز. لا تتحرك","portrait.criteria.face":"الوجه داخل الإطار","portrait.criteria.framing":"في الوسط","portrait.criteria.pose":"النظر مباشرة","portrait.criteria.eyes":"العينان مفتوحتان","portrait.criteria.mouth":"تعبير محايد","portrait.criteria.glare":"بلا انعكاس","portrait.criteria.lighting":"إضاءة متساوية","portrait.criteria.background":"خلفية سادة","portrait.criteria.resolution":"قريب بما يكفي","portrait.criteria.sharpness":"ثابت","portrait.report.pose":"وضعية الرأس","portrait.report.eyes":"العينان","portrait.report.mouth":"تعبير الوجه","portrait.report.occlusion":"الوجه مكشوف","portrait.report.glare":"انعكاس النظارة","portrait.report.lighting":"الإضاءة","portrait.report.background":"الخلفية","portrait.report.resolution":"المسافة","portrait.checksLabel":"فحوصات الصورة","portrait.met":"تم","portrait.notMet":"ليس بعد","portrait.starting":"جارٍ تشغيل الكاميرا…","portrait.taken":"تم التقاط الصورة","portrait.uploading":"جارٍ إرسال صورتك…","portrait.checking":"جارٍ التحقق من صورتك…","portrait.retryTitle":"لنلتقط صورتك مرة أخرى","portrait.reportTitle":"ما يجب تصحيحه","portrait.retake":"التقط الصورة مرة أخرى","portrait.uploadFailed":"تعذّر إرسال صورتك. تحقّق من اتصالك ثم أعد المحاولة.","portrait.sendAgain":"أرسل الصورة مرة أخرى","portrait.matching":"جارٍ مقارنة صورتك بوثيقة هويتك…","portrait.reviewTitle":"سنراجع صورتك","portrait.reviewDescription":"سيتحقق أحد أعضاء فريقنا من صورتك. يمكنك المتابعة.","portrait.cameraBlocked":"نحتاج إلى الكاميرا لالتقاط صورة الهوية. الوصول إلى الكاميرا محظور أو غير متاح","portrait.cameraBlockedHint":"اسمح بالوصول إلى الكاميرا لهذا الموقع من إعدادات المتصفح ثم أعد المحاولة","portrait.retryCamera":"إعادة تجربة الكاميرا","reasons.icao_pose":"انظر مباشرة إلى الكاميرا","reasons.icao_eyes":"افتح عينيك أكثر قليلاً","reasons.icao_mouth":"أغلق فمك وحافظ على ملامح محايدة","reasons.icao_occlusion":"أزل ما يغطي وجهك، وأمِل نظارتك أو انزعها","reasons.icao_lighting":"قف مقابل نافذة أو مصباح، وتجنب الضوء من جهة واحدة","reasons.icao_background":"قف أمام جدار سادة وفاتح","reasons.icao_resolution":"اقترب قليلاً من الكاميرا","reasons.portrait_not_from_liveness":"يجب أن تكون الصورة للشخص نفسه الذي أجرى فحص الوجه. التقطها بنفسك مرة أخرى","reasons.tester_document_mismatch":"هذه الوثيقة لا تخص المختبِر","reasons.tester_phone_mismatch":"استخدم رقم الهاتف الذي سجّل به المختبِر","method.national_eid":"التحقق عبر {provider}","method.national_eidGeneric":"التحقق عبر هويتك الرقمية الوطنية","consent.short":"بالمتابعة، فإنك توافق على {terms}.","consent.termsLink":"الشروط","session.progressLabel":"تقدّم التحقق","section.contact":"تحقق من وسيلة التواصل","section.identity":"تحقق من هويتك","section.live_photo":"التقط صورة حية","section.screening":"فحوصات إضافية","handoff.copied":"تم نسخ الرابط. افتحه على هاتفك","needsApp.title":"يتطلب هذا التحقق تطبيقًا على الهاتف","needsApp.description":"تطلب {org} قراءة شريحة مستندك. افتح تطبيق {org} على هاتف يدعم NFC للمتابعة.","needsApp.descriptionNoOrg":"يقرأ هذا التحقق شريحة مستندك. افتح التطبيق على هاتف يدعم NFC للمتابعة.","population.recheck.title":"تحقّق من رقمك الوطني","population.recheck.description":"لم يتطابق وجهك مع السجل الخاص بهذا الرقم. تحقّق من الرقم وأدخله مرة أخرى.","otp.phoneInvalid":"أدخل رقم هاتفك مع رمز البلد","otp.codeInvalid":"أدخل الرمز المكوّن من 6 أرقام","doc.countryTitle":"ما البلد الذي أصدر وثيقتك؟","doc.countryLabel":"بلد الإصدار","doc.countrySearch":"ابحث عن بلد","doc.noCountryMatch":"لا يوجد بلد يطابق بحثك","doc.type.carte_identite":"بطاقة الهوية","doc.type.residence_permit":"بطاقة الإقامة","doc.type.passport":"جواز السفر","doc.showSide":"اعرض أحد وجهي البطاقة","doc.showPage":"اعرض صفحة الصورة","doc.flip":"اقلب البطاقة","doc.sameFace":"الوجه نفسه · اقلب البطاقة","doc.reaskRecto":"اعرض الوجه الأمامي مرة أخرى","doc.reread":"تعذّرت قراءة هذا الوجه · ثبّت البطاقة في إضاءة جيدة","doc.photoTaken":"تم التقاط الصورة","doc.frontCaptured":"تم التقاط الوجه الأمامي","doc.backCaptured":"تم التقاط الوجه الخلفي","doc.pageCaptured":"تم التقاط الصفحة","doc.progressFront":"الأمام","doc.progressBack":"الخلف","doc.progressPage":"صفحة الصورة","doc.shutter":"التقط الصورة","doc.torchOn":"شغّل الضوء","doc.torchOff":"أطفئ الضوء","result.platform_unsupported":"يتطلب هذا التحقق تطبيقًا على الهاتف.","unsupported.title":"يلزم التحديث","unsupported.description":"تتطلب هذه الخطوة إصدارًا أحدث من هذه الصفحة. تواصل مع {org}.","shell.subtitle":"التحقق من الهوية","shell.verifiedBy":"تم التحقق بواسطة Sekyro AI","doc.sub.carte_identite":"الوجه والظهر","doc.sub.residence_permit":"الوجه والظهر","doc.sub.passport":"الصفحة التي تحمل صورتك","native.close":"إغلاق","native.face.introTitle":"لنتحقق الآن من وجهك","native.face.introLead":"لقطة واحدة دون أي حركة خاصة: انظر إلى الشاشة فقط.","native.doc.holdIt":"احتفظ بوثيقتك في متناول يدك.","native.doc.changeCountry":"تغيير البلد","native.result.approved":"اكتمل التحقق. يمكنك العودة إلى {org}.","native.result.review":"ستُرسل النتيجة إلى {org}. لا يلزمك فعل أي شيء آخر.","native.result.rejected":"تواصل مع {org} إذا كنت تعتقد أن هذا خطأ.","native.result.expired":"ابدأ من جديد من {org} للحصول على جلسة جديدة.","native.result.copied":"تم النسخ","native.result.back":"العودة إلى {org}"};var c={"session.title":"Verify your identity","session.requestedBy":"{orgName} asks you to verify your identity","returning.requestedBy":"{orgName} asks you to confirm it's you","consent.notice":"By completing this identity verification, you consent to the processing of your personal and biometric data to verify your identity.","consent.details":"Learn more","consent.terms.intro":"Sekyro AI verifies your identity on behalf of the organization that sent you this link. Before you start, review how your data is used.","consent.terms.data":"During verification, Sekyro AI collects photos of your identity document, a short selfie video, a selfie photo, and your identity document number.","consent.terms.processing":"This data is used only to verify your identity: your face is compared with the photo on your document, and your number is checked against the issuing authority's records when available. Some steps may be examined by an authorized human reviewer.","consent.terms.sharing":"The organization that requested this verification is informed of its outcome.","consent.terms.retention":"Your data is stored encrypted and kept only as long as the law requires. To exercise your data-protection rights, contact the organization that requested this verification.","otp.sendTitle":"Verify your phone number","otp.sendDescription":"We'll send you a one-time code to confirm this number is yours","otp.prefilledNotice":"We'll send a verification code to your registered phone number.","otp.phoneLabel":"Phone number","otp.phoneHelper":"We'll send a one-time code to this number","otp.phonePlaceholder":"8 digits","otp.send":"Send code","otp.channelSms":"SMS","otp.channelWhatsapp":"WhatsApp","otp.verifyTitle":"Enter the verification code","otp.verifyDescription":"Type the 6-digit code we sent you to finish verifying your number","otp.sentTo":"We sent a 6-digit code to {number} via {channel}","otp.codeLabel":"Verification code","otp.codeHelper":"Enter the 6-digit code we sent you","otp.verify":"Verify code","otp.resend":"Resend code","otp.resendIn":"Resend code in {seconds}s","otp.expiresIn":"Code expires in {time}","otp.expired":"That code has expired. Resend a new one","otp.reason_otp_mismatch":"That code was incorrect. Check it and enter it again","otp.reason_otp_expired":"That code has expired. Resend a new code to continue","otp.reason_otp_send_failed":"We couldn't send the code. Try again in a moment","otp.chooseChannel":"How should we send your code?","otp.sendBy":"Send code by {channel}","otp.resendBy":"Resend by {channel}","otp.reason_otp_channel_unavailable":"That channel isn't available. Choose another way to get your code","otp.reason_otp_destination_not_allowed":"We can't send codes to numbers from this country. Enter another number","otp.reason_otp_destination_unknown":"We couldn't recognize this number. Check it and enter it again with the country code","otp.reason_otp_rate_limited":"Too many codes requested. Wait a moment, then try again","session.steps.population.title":"Enter your national ID number","session.steps.population.description":"Your 10-digit NNI is checked against the civil registry","population.label":"Mauritanian national ID number (NNI)","population.helper":"10-digit national identification number, exactly as printed on your ID","population.placeholder":"10 digits","population.submit":"Verify my number","population.invalid":"Enter the 10-digit NNI printed on your national ID","population.reason_registry_unavailable":"The civil registry is temporarily unreachable. Your number was not checked. Try again in a moment","population.reason_nni_not_found":"This number was not found in the civil registry. Check that it matches your ID exactly","population.reason_nni_invalid":"This is not a valid NNI. Check the 10 digits printed on your national ID","population.bound.description":"The requester already provided your national ID number. Confirm to check it against the civil registry","population.bound.confirm":"Confirm and continue","population.reason_nni_not_found_or_document":"We couldn't find this number. Check it, or use your document instead.","population.useDocument":"Use my document instead","population.fromDocument.title":"Checking the civil registry","population.fromDocument.description":"We're checking the national number from your document against the civil registry","population.fromDocument.continue":"Continue","session.steps.doc.titleRecto":"Photograph the front of your ID document","session.steps.doc.titleVerso":"Photograph the back of your ID document","session.steps.doc.description":"Use good lighting and keep the whole card inside the frame","doc.pickTitle":"Which document will you use?","doc.pickDescription":"Choose the identity document you have with you. You will scan it with your camera","doc.pickLabel":"Document type","doc.startScan":"Start scanning","doc.titlePassport":"Scan your passport data page","doc.reason_side_missing":"One side is saved. Now photograph the remaining side of the document","doc.reason_unreadable":"We could not read the document. Retake the photo with the whole card sharp and inside the frame","doc.process_failed":"We could not process this photo. Take a new one and try again","doc.uploading":"Uploading your document…","doc.cameraBlocked":"We need your camera to scan the document. Camera access is blocked or unavailable","doc.cameraBlockedHint":"Allow camera access for this site in your browser settings, then try again","doc.retryCamera":"Try the camera again","doc.holdUpright":"Fit the document inside the frame. It captures by itself. For a sharper photo, turn your phone sideways","dcv2.sensing":"Looking for the document. Fit it inside the frame","dcv2.too_far":"Bring the document closer so it fills the frame","dcv2.too_close":"Move back a little. Keep the whole document in the frame","dcv2.edge_clipped":"Fit the whole document inside the frame. Keep the edges visible","dcv2.wrong_shape":"That doesn't look right. Lay the document flat, straight toward the camera","dcv2.tilted":"Hold the phone flat above the document. Too much angle","dcv2.too_dark":"Find a brighter spot. Light the document","dcv2.too_bright":"Too much light. Tilt the document away from the glare","dcv2.blurry":"Hold your phone steady. The image is blurry","dcv2.focus_far":"Too close to focus. Move the phone a little farther","dcv2.glare":"Light is reflecting off the document. Tilt it slightly","dcv2.hold_still":"Perfect. Hold still","dcv2.processing":"Capturing…","dcv2.side_captured":"Side captured. Flip the document to the back","dcv2.captured":"Captured","session.processing.title":"Your checks are being processed","session.processing.description":"This usually takes a few seconds. The result will appear here","handoff.title":"Continue on your phone","session.result.approved.title":"Your identity is verified","session.result.approved.description":"You are done. You can close this page","session.result.review.title":"Your verification is under review","session.result.review.description":"The result will be sent to the organization that gave you this link. You don't need to do anything else.","session.result.rejected.title":"Your identity could not be verified","session.result.rejected.description":"Contact the organization that sent you this link if you believe this is a mistake","session.result.expired.title":"This verification session has expired","session.result.expired.description":"Request a new link from the organization that sent it, then start again","session.result.detailsMismatch":"The details don't match the information {org} has. Contact {org}.","session.result.deviceVelocity":"This device can't be used for another verification right now. Contact {org}.","session.result.deviceStop":"We couldn't continue on this device. Try again on another device or browser.","result.referenceLabel":"Reference code","common.loading":"Loading your verification session","common.refresh":"Refresh status","common.noAttemptsLeft":"No attempts left","session.steps.portrait.title":"Take your ID photo","session.steps.portrait.description":"Look straight at the camera with a neutral expression, in front of a plain, light wall","portrait.coach.no_face":"Place your face inside the oval","portrait.coach.multiple_faces":"Make sure no one else is in the picture","portrait.coach.center":"Center your face in the oval","portrait.coach.too_close":"Move back a little","portrait.coach.pose":"Look straight at the camera","portrait.coach.eyes":"Open your eyes a little more","portrait.coach.mouth":"Close your mouth, neutral expression","portrait.coach.glare":"Tilt your glasses or remove them","portrait.coach.lighting":"Face a window or a lamp","portrait.coach.lighting_side":"Avoid light from one side","portrait.coach.background":"Stand in front of a plain, light wall","portrait.coach.resolution":"Come a little closer","portrait.coach.hold_still":"Hold still","portrait.coach.hold":"Perfect. Hold still","portrait.criteria.face":"Face in the oval","portrait.criteria.framing":"Centered","portrait.criteria.pose":"Looking straight","portrait.criteria.eyes":"Eyes open","portrait.criteria.mouth":"Neutral expression","portrait.criteria.glare":"No glare","portrait.criteria.lighting":"Even light","portrait.criteria.background":"Plain background","portrait.criteria.resolution":"Close enough","portrait.criteria.sharpness":"Steady","portrait.report.pose":"Head position","portrait.report.eyes":"Eyes","portrait.report.mouth":"Expression","portrait.report.occlusion":"Face uncovered","portrait.report.glare":"Glasses glare","portrait.report.lighting":"Lighting","portrait.report.background":"Background","portrait.report.resolution":"Distance","portrait.checksLabel":"Photo checks","portrait.met":"done","portrait.notMet":"not yet","portrait.starting":"Starting the camera…","portrait.taken":"Photo taken","portrait.uploading":"Sending your photo…","portrait.checking":"Checking your photo…","portrait.retryTitle":"Let's take your photo again","portrait.reportTitle":"What to fix","portrait.retake":"Take the photo again","portrait.uploadFailed":"We couldn't send your photo. Check your connection, then try again.","portrait.sendAgain":"Send the photo again","portrait.matching":"Comparing your photo with your identity document…","portrait.reviewTitle":"We'll review your photo","portrait.reviewDescription":"A member of our team will check your photo. You can continue.","portrait.cameraBlocked":"We need your camera to take your ID photo. Camera access is blocked or unavailable","portrait.cameraBlockedHint":"Allow camera access for this site in your browser settings, then try again","portrait.retryCamera":"Try the camera again","reasons.icao_pose":"Look straight at the camera","reasons.icao_eyes":"Open your eyes a little more","reasons.icao_mouth":"Close your mouth and keep a neutral expression","reasons.icao_occlusion":"Remove anything covering your face, and tilt or remove your glasses","reasons.icao_lighting":"Face a window or a lamp, and avoid light from one side","reasons.icao_background":"Stand in front of a plain, light wall","reasons.icao_resolution":"Come a little closer to the camera","reasons.portrait_not_from_liveness":"The photo must be of the same person who did the face check. Take it again yourself","reasons.tester_document_mismatch":"This document doesn't belong to the tester","reasons.tester_phone_mismatch":"Use the phone number the tester enrolled with","method.national_eid":"Verify with {provider}","method.national_eidGeneric":"Verify with your national eID","consent.short":"By continuing, you agree to the {terms}.","consent.termsLink":"terms","session.progressLabel":"Verification progress","section.contact":"Verify your contact","section.identity":"Verify your identity","section.live_photo":"Take a live photo","section.screening":"Additional checks","handoff.copied":"Link copied. Open it on your phone","needsApp.title":"This verification needs a phone app","needsApp.description":"{org} asks to read your document's chip. Open {org}'s app on a phone with NFC to continue.","needsApp.descriptionNoOrg":"This verification reads your document's chip. Open the app on a phone with NFC to continue.","population.recheck.title":"Check your national number","population.recheck.description":"Your face didn't match the record for this number. Check the number and enter it again.","otp.phoneInvalid":"Enter your phone number with the country code","otp.codeInvalid":"Enter the 6-digit code","doc.countryTitle":"Which country issued your document?","doc.countryLabel":"Issuing country","doc.countrySearch":"Search for a country","doc.noCountryMatch":"No country matches your search","doc.type.carte_identite":"Identity card","doc.type.residence_permit":"Residence permit","doc.type.passport":"Passport","doc.showSide":"Show one side of the card","doc.showPage":"Show the photo page","doc.flip":"Turn the card over","doc.sameFace":"Same side · turn the card over","doc.reaskRecto":"Show the front again","doc.reread":"We couldn't read this side · hold it steady in good light","doc.photoTaken":"Photo taken","doc.frontCaptured":"Front captured","doc.backCaptured":"Back captured","doc.pageCaptured":"Page captured","doc.progressFront":"Front","doc.progressBack":"Back","doc.progressPage":"Photo page","doc.shutter":"Take the photo","doc.torchOn":"Turn on the light","doc.torchOff":"Turn off the light","result.platform_unsupported":"This verification needs a phone app.","unsupported.title":"Update required","unsupported.description":"This step needs a newer version of this page. Contact {org}.","shell.subtitle":"Identity verification","shell.verifiedBy":"Verified by Sekyro AI","doc.sub.carte_identite":"Front and back","doc.sub.residence_permit":"Front and back","doc.sub.passport":"The page with your photo","native.close":"Close","native.face.introTitle":"Now let's check your face","native.face.introLead":"One capture, no special movement: just look at the screen.","native.doc.holdIt":"Keep your document within reach.","native.doc.changeCountry":"Change country","native.result.approved":"Your verification is complete. You can go back to {org}.","native.result.review":"The result will be sent to {org}. There's nothing else you need to do.","native.result.rejected":"Contact {org} if you think this is a mistake.","native.result.expired":"Start again from {org} to get a new session.","native.result.copied":"Copied","native.result.back":"Back to {org}"};var p={"session.title":"Vérifiez votre identité","session.requestedBy":"{orgName} vous demande de vérifier votre identité","returning.requestedBy":"{orgName} vous demande de confirmer qu'il s'agit bien de vous","consent.notice":"En poursuivant la vérification d'identité, vous consentez au traitement de vos données personnelles et biométriques afin de vérifier votre identité.","consent.details":"En savoir plus","consent.terms.intro":"Sekyro AI vérifie votre identité pour le compte de l'organisme qui vous a envoyé ce lien. Avant de commencer, consultez la façon dont vos données sont utilisées.","consent.terms.data":"Pendant la vérification, Sekyro AI recueille les photos de votre pièce d'identité, une courte vidéo selfie, une photo selfie et le numéro de votre pièce d'identité.","consent.terms.processing":"Ces données servent uniquement à vérifier votre identité : votre visage est comparé à la photo de votre document et votre numéro est vérifié auprès des registres de l'autorité émettrice lorsque c'est possible. Certaines étapes peuvent être examinées par un examinateur humain habilité.","consent.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.terms.retention":"Vos données sont stockées chiffrées et conservées uniquement pendant la durée exigée par la loi. Pour exercer vos droits en matière de protection des données, contactez l'organisme qui a demandé cette vérification.","otp.sendTitle":"Vérifiez votre numéro de téléphone","otp.sendDescription":"Nous vous enverrons un code à usage unique pour confirmer que ce numéro vous appartient","otp.prefilledNotice":"Nous enverrons un code de vérification à votre numéro de téléphone enregistré.","otp.phoneLabel":"Numéro de téléphone","otp.phoneHelper":"Nous enverrons un code à usage unique à ce numéro","otp.phonePlaceholder":"8 chiffres","otp.send":"Envoyer le code","otp.channelSms":"SMS","otp.channelWhatsapp":"WhatsApp","otp.verifyTitle":"Saisissez le code de vérification","otp.verifyDescription":"Saisissez le code à 6 chiffres que nous vous avons envoyé pour finaliser la vérification de votre numéro","otp.sentTo":"Nous avons envoyé un code à 6 chiffres au {number} par {channel}","otp.codeLabel":"Code de vérification","otp.codeHelper":"Saisissez le code à 6 chiffres que nous vous avons envoyé","otp.verify":"Vérifier le code","otp.resend":"Renvoyer le code","otp.resendIn":"Renvoyer le code dans {seconds} s","otp.expiresIn":"Le code expire dans {time}","otp.expired":"Ce code a expiré. Renvoyez-en un nouveau","otp.reason_otp_mismatch":"Ce code est incorrect. Vérifiez-le et saisissez-le à nouveau","otp.reason_otp_expired":"Ce code a expiré. Renvoyez un nouveau code pour continuer","otp.reason_otp_send_failed":"Nous n'avons pas pu envoyer le code. Réessayez dans un instant","otp.chooseChannel":"Comment souhaitez-vous recevoir votre code ?","otp.sendBy":"Envoyer le code par {channel}","otp.resendBy":"Renvoyer par {channel}","otp.reason_otp_channel_unavailable":"Ce moyen d'envoi n'est pas disponible. Choisissez une autre façon de recevoir votre code","otp.reason_otp_destination_not_allowed":"Nous ne pouvons pas envoyer de code aux numéros de ce pays. Saisissez un autre numéro","otp.reason_otp_destination_unknown":"Nous n'avons pas reconnu ce numéro. Vérifiez-le et saisissez-le à nouveau avec l'indicatif du pays","otp.reason_otp_rate_limited":"Trop de codes demandés. Patientez un instant, puis réessayez","session.steps.population.title":"Saisissez votre numéro national d'identification","session.steps.population.description":"Votre NNI à 10 chiffres est vérifié auprès du registre d'état civil","population.label":"Numéro national d'identification mauritanien (NNI)","population.helper":"Numéro national d'identification à 10 chiffres, tel qu'imprimé sur votre pièce","population.placeholder":"10 chiffres","population.submit":"Vérifier mon numéro","population.invalid":"Saisissez les 10 chiffres du NNI imprimé sur votre pièce d'identité","population.reason_registry_unavailable":"Le registre d'état civil est temporairement inaccessible. Votre numéro n'a pas été vérifié. Réessayez dans un instant","population.reason_nni_not_found":"Ce numéro est introuvable dans le registre d'état civil. Vérifiez qu'il correspond exactement à votre pièce","population.reason_nni_invalid":"Ce numéro n'est pas un NNI valide. Vérifiez les 10 chiffres imprimés sur votre pièce d'identité","population.bound.description":"L'organisme demandeur a déjà fourni votre numéro national d'identification. Confirmez pour le vérifier auprès de l'état civil","population.bound.confirm":"Confirmer et continuer","population.reason_nni_not_found_or_document":"Nous n'avons pas trouvé ce numéro. Vérifiez-le, ou utilisez plutôt votre document.","population.useDocument":"Utiliser plutôt mon document","population.fromDocument.title":"Vérification auprès du registre civil","population.fromDocument.description":"Nous vérifions le numéro national lu sur votre document auprès du registre civil","population.fromDocument.continue":"Continuer","session.steps.doc.titleRecto":"Photographiez le recto de votre pièce d'identité","session.steps.doc.titleVerso":"Photographiez le verso de votre pièce d'identité","session.steps.doc.description":"Utilisez un bon éclairage et gardez la carte entière dans le cadre","doc.pickTitle":"Quel document allez-vous utiliser ?","doc.pickDescription":"Choisissez la pièce d'identité en votre possession. Vous la scannerez avec votre caméra","doc.pickLabel":"Type de document","doc.startScan":"Commencer le scan","doc.titlePassport":"Scannez la page de données de votre passeport","doc.reason_side_missing":"Une face est enregistrée. Photographiez maintenant l'autre face du document","doc.reason_unreadable":"Nous n'avons pas pu lire le document. Reprenez la photo avec la carte entière, nette et dans le cadre","doc.process_failed":"Nous n'avons pas pu traiter cette photo. Prenez-en une nouvelle et réessayez","doc.uploading":"Envoi de votre document…","doc.cameraBlocked":"Nous avons besoin de votre caméra pour scanner le document. L'accès est bloqué ou indisponible","doc.cameraBlockedHint":"Autorisez l'accès à la caméra pour ce site dans les réglages du navigateur, puis réessayez","doc.retryCamera":"Réessayer la caméra","doc.holdUpright":"Placez le document dans le cadre. La capture est automatique. Pour une photo plus nette, tournez votre téléphone à l'horizontale","dcv2.sensing":"Recherche du document. Placez-le dans le cadre","dcv2.too_far":"Rapprochez le document pour qu'il remplisse le cadre","dcv2.too_close":"Reculez un peu. Gardez tout le document dans le cadre","dcv2.edge_clipped":"Placez tout le document dans le cadre. Gardez les bords visibles","dcv2.wrong_shape":"Cela ne semble pas correct. Posez le document à plat, face à la caméra","dcv2.tilted":"Tenez le téléphone à plat au-dessus du document. Trop d'angle","dcv2.too_dark":"Trouvez un endroit plus lumineux. Éclairez le document","dcv2.too_bright":"Trop de lumière. Inclinez le document pour éviter les reflets","dcv2.blurry":"Tenez votre téléphone immobile. L'image est floue","dcv2.focus_far":"Trop près pour la mise au point. Éloignez un peu le téléphone","dcv2.glare":"La lumière se reflète sur le document. Inclinez-le légèrement","dcv2.hold_still":"Parfait. Ne bougez plus","dcv2.processing":"Capture…","dcv2.side_captured":"Face capturée. Retournez le document","dcv2.captured":"Capturé","session.processing.title":"Vos vérifications sont en cours de traitement","session.processing.description":"Cela prend généralement quelques secondes. Le résultat s'affichera ici","handoff.title":"Continuez sur votre téléphone","session.result.approved.title":"Votre identité est vérifiée","session.result.approved.description":"C'est terminé. Vous pouvez fermer cette page","session.result.review.title":"Votre vérification est en cours d'examen","session.result.review.description":"Le résultat sera transmis à l'organisation qui vous a envoyé ce lien. Vous n'avez rien d'autre à faire.","session.result.rejected.title":"Votre identité n'a pas pu être vérifiée","session.result.rejected.description":"Contactez l'organisme qui vous a envoyé ce lien si vous pensez qu'il s'agit d'une erreur","session.result.expired.title":"Cette session de vérification a expiré","session.result.expired.description":"Demandez un nouveau lien à l'organisme qui l'a envoyé, puis recommencez","session.result.detailsMismatch":"Ces informations ne correspondent pas à celles dont dispose {org}. Contactez {org}.","session.result.deviceVelocity":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez {org}.","session.result.deviceStop":"Impossible de continuer sur cet appareil. Réessayez sur un autre appareil ou navigateur.","result.referenceLabel":"Code de référence","common.loading":"Chargement de votre session de vérification","common.refresh":"Actualiser le statut","common.noAttemptsLeft":"Plus aucune tentative","session.steps.portrait.title":"Prenez votre photo d’identité","session.steps.portrait.description":"Regardez la caméra bien en face, l’expression neutre, devant un mur uni et clair","portrait.coach.no_face":"Placez votre visage dans l'ovale","portrait.coach.multiple_faces":"Assurez-vous d'être seul sur la photo","portrait.coach.center":"Centrez votre visage dans l'ovale","portrait.coach.too_close":"Reculez un peu","portrait.coach.pose":"Regardez droit vers la caméra","portrait.coach.eyes":"Ouvrez un peu plus les yeux","portrait.coach.mouth":"Fermez la bouche, expression neutre","portrait.coach.glare":"Inclinez vos lunettes ou retirez-les","portrait.coach.lighting":"Placez-vous face à une fenêtre ou une lampe","portrait.coach.lighting_side":"Évitez la lumière venant d'un seul côté","portrait.coach.background":"Placez-vous devant un mur uni et clair","portrait.coach.resolution":"Rapprochez-vous un peu","portrait.coach.hold_still":"Ne bougez plus","portrait.coach.hold":"Parfait. Ne bougez plus","portrait.criteria.face":"Visage dans l'ovale","portrait.criteria.framing":"Centré","portrait.criteria.pose":"Regard droit","portrait.criteria.eyes":"Yeux ouverts","portrait.criteria.mouth":"Expression neutre","portrait.criteria.glare":"Sans reflet","portrait.criteria.lighting":"Lumière uniforme","portrait.criteria.background":"Fond uni","portrait.criteria.resolution":"Assez proche","portrait.criteria.sharpness":"Stable","portrait.report.pose":"Position de la tête","portrait.report.eyes":"Yeux","portrait.report.mouth":"Expression","portrait.report.occlusion":"Visage dégagé","portrait.report.glare":"Reflets des lunettes","portrait.report.lighting":"Éclairage","portrait.report.background":"Arrière-plan","portrait.report.resolution":"Distance","portrait.checksLabel":"Contrôles de la photo","portrait.met":"validé","portrait.notMet":"pas encore","portrait.starting":"Démarrage de la caméra…","portrait.taken":"Photo prise","portrait.uploading":"Envoi de votre photo…","portrait.checking":"Vérification de votre photo…","portrait.retryTitle":"Reprenons votre photo","portrait.reportTitle":"À corriger","portrait.retake":"Reprendre la photo","portrait.uploadFailed":"Nous n'avons pas pu envoyer votre photo. Vérifiez votre connexion, puis réessayez.","portrait.sendAgain":"Renvoyer la photo","portrait.matching":"Comparaison de votre photo avec votre pièce d'identité…","portrait.reviewTitle":"Nous allons vérifier votre photo","portrait.reviewDescription":"Un membre de notre équipe vérifiera votre photo. Vous pouvez continuer.","portrait.cameraBlocked":"Nous avons besoin de votre caméra pour prendre votre photo d'identité. L'accès à la caméra est bloqué ou indisponible","portrait.cameraBlockedHint":"Autorisez l'accès à la caméra pour ce site dans les réglages du navigateur, puis réessayez","portrait.retryCamera":"Réessayer la caméra","reasons.icao_pose":"Regardez la caméra bien en face","reasons.icao_eyes":"Ouvrez un peu plus les yeux","reasons.icao_mouth":"Fermez la bouche et gardez une expression neutre","reasons.icao_occlusion":"Retirez ce qui couvre votre visage, et inclinez ou retirez vos lunettes","reasons.icao_lighting":"Placez-vous face à une fenêtre ou une lampe, sans lumière d’un seul côté","reasons.icao_background":"Placez-vous devant un mur uni et clair","reasons.icao_resolution":"Rapprochez-vous un peu de la caméra","reasons.portrait_not_from_liveness":"La photo doit être celle de la personne qui a fait le contrôle du visage. Reprenez-la vous-même","reasons.tester_document_mismatch":"Ce document n'appartient pas au testeur","reasons.tester_phone_mismatch":"Utilisez le numéro avec lequel le testeur s'est inscrit","method.national_eid":"Vérifier avec {provider}","method.national_eidGeneric":"Vérifier avec votre eID national","consent.short":"En continuant, vous acceptez les {terms}.","consent.termsLink":"conditions","session.progressLabel":"Progression de la vérification","section.contact":"Vérifiez votre contact","section.identity":"Vérifiez votre identité","section.live_photo":"Prenez une photo en direct","section.screening":"Contrôles complémentaires","handoff.copied":"Lien copié. Ouvrez-le sur votre téléphone","needsApp.title":"Cette vérification nécessite une application mobile","needsApp.description":"{org} demande de lire la puce de votre document. Ouvrez l'application de {org} sur un téléphone avec NFC pour continuer.","needsApp.descriptionNoOrg":"Cette vérification lit la puce de votre document. Ouvrez l'application sur un téléphone avec NFC pour continuer.","population.recheck.title":"Vérifiez votre numéro national","population.recheck.description":"Votre visage ne correspond pas au dossier de ce numéro. Vérifiez le numéro et saisissez-le à nouveau.","otp.phoneInvalid":"Saisissez votre numéro avec l'indicatif du pays","otp.codeInvalid":"Saisissez le code à 6 chiffres","doc.countryTitle":"Quel pays a délivré votre document ?","doc.countryLabel":"Pays de délivrance","doc.countrySearch":"Rechercher un pays","doc.noCountryMatch":"Aucun pays ne correspond à votre recherche","doc.type.carte_identite":"Carte d'identité","doc.type.residence_permit":"Titre de séjour","doc.type.passport":"Passeport","doc.showSide":"Montrez une face de la carte","doc.showPage":"Montrez la page avec la photo","doc.flip":"Retournez la carte","doc.sameFace":"Même face · retournez la carte","doc.reaskRecto":"Remontrez le recto","doc.reread":"Lecture impossible · tenez la carte stable, bien éclairée","doc.photoTaken":"Photo prise","doc.frontCaptured":"Recto capturé","doc.backCaptured":"Verso capturé","doc.pageCaptured":"Page capturée","doc.progressFront":"Recto","doc.progressBack":"Verso","doc.progressPage":"Page photo","doc.shutter":"Prendre la photo","doc.torchOn":"Allumer la lampe","doc.torchOff":"Éteindre la lampe","result.platform_unsupported":"Cette vérification nécessite une application mobile.","unsupported.title":"Mise à jour requise","unsupported.description":"Cette étape nécessite une version plus récente de cette page. Contactez {org}.","shell.subtitle":"Vérification d'identité","shell.verifiedBy":"Vérifié par Sekyro AI","doc.sub.carte_identite":"Recto et verso","doc.sub.residence_permit":"Recto et verso","doc.sub.passport":"La page avec votre photo","native.close":"Fermer","native.face.introTitle":"Vérifions maintenant votre visage","native.face.introLead":"Une seule prise, sans geste particulier : regardez simplement l'écran.","native.doc.holdIt":"Gardez votre document à portée de main.","native.doc.changeCountry":"Changer de pays","native.result.approved":"Votre vérification est terminée. Vous pouvez retourner à {org}.","native.result.review":"Le résultat sera transmis à {org}. Vous n'avez rien d'autre à faire.","native.result.rejected":"Contactez {org} si vous pensez qu'il s'agit d'une erreur.","native.result.expired":"Recommencez depuis {org} pour obtenir une nouvelle session.","native.result.copied":"Copiée","native.result.back":"Revenir à {org}"};import{createContext as h,useContext as m,useMemo as d}from"react";import{jsx as y}from"react/jsx-runtime";var v={en:c,fr:p,ar:s};function g(t,e){return e===void 0?t:t.replace(/\{(\w+)\}/g,(o,r)=>Object.hasOwn(e,r)?String(e[r]):o)}i(g,"formatTemplate");function f(t,e){let o={...a(t),...v[t]};if(e!==void 0)for(let r of Object.keys(e)){let n=e[r];typeof n=="string"&&(o[r]=n)}return o}i(f,"resolveSekyroStrings");var u=h(null);function l(t,e){let o=f(t,e);return{locale:t,strings:o,t:i((r,n)=>g(o[r]??"",n),"t")}}i(l,"build");function x({locale:t,strings:e,children:o}){let r=d(()=>l(t,e),[t,e]);return y(u.Provider,{value:r,children:o})}i(x,"StepI18nProvider");function L(t,e){let o=m(u);return d(()=>o!==null&&t===void 0&&e===void 0?o:l(t??o?.locale??"en",e),[o,t,e])}i(L,"useStepI18n");export{s as a,c as b,p as c,g as d,f as e,x as f,L as g};
|
package/dist/chunk-ZTN4YV7S.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as L}from"./chunk-2CJEADGY.js";import{e as I,f as C}from"./chunk-2PGJ7P7E.js";import{a as m}from"./chunk-PXRIFHY2.js";import{useLayoutEffect as P,useRef as z,useState as F}from"react";import{jsx as s,jsxs as r}from"react/jsx-runtime";var x=72;function H(c,n){let t=c*.72,o=t*1.32;return{cx:c/2,cy:(n-o)/2.1+o/2,a:t/2,b:o/2}}m(H,"faceOval");function U({cx:c,cy:n,a:t,b:o}){return Array.from({length:x},(w,u)=>{let f=-Math.PI/2+u/x*2*Math.PI,l=Math.cos(f),y=Math.sin(f),p=c+t*l,h=n+o*y,k=Math.hypot(o*l,t*y),v=o*l/k,d=t*y/k,a=m($=>Math.round($*10)/10,"r");return`M${a(p+v*16)} ${a(h+d*16)}L${a(p+v*28)} ${a(h+d*28)}`})}m(U,"ticks");function Z({video:c,instruction:n,note:t,busy:o,progress:w,still:u,overlay:f,onClose:l,closeLabel:y,end:p,live:h=!0,children:k,testId:v}){I(h);let d=z(null),[a,$]=F({w:0,h:0});P(()=>{let b=d.current;if(b===null)return;let O=m(()=>$({w:b.clientWidth,h:b.clientHeight}),"measure");if(O(),typeof ResizeObserver>"u")return;let S=new ResizeObserver(O);return S.observe(b),()=>S.disconnect()},[]);let e=H(a.w,a.h),N=a.w>0?U(e):[],g=Math.round(Math.min(1,Math.max(0,w))*x),R=e.cy-e.b,i=Math.max(e.a,e.b)+40,M=70*Math.PI/180;return s("section",{className:"sekyro-lm sekyro-fc","aria-label":n,"data-testid":v,children:r("div",{ref:d,className:"sekyro-lm-stage",children:[c,u?s("img",{className:"sekyro-lm-video sekyro-fc-still",src:u,alt:""}):null,f,a.w>0?r("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${a.w} ${a.h}`,"aria-hidden":"true",focusable:"false",children:[r("defs",{children:[r("linearGradient",{id:"sekyro-fc-fade",gradientUnits:"userSpaceOnUse",x1:e.cx-i*Math.sin(M),y1:e.cy,x2:e.cx,y2:e.cy,children:[s("stop",{offset:"0",className:"sekyro-fc-fade",stopOpacity:"0"}),s("stop",{offset:"1",className:"sekyro-fc-fade"})]}),s("mask",{id:"sekyro-fc-light",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:a.w,height:a.h,children:s("path",{className:"sekyro-fc-sweep",style:{transformOrigin:`${e.cx}px ${e.cy}px`},d:`M${e.cx} ${e.cy}L${e.cx-i*Math.sin(M)} ${e.cy-i*Math.cos(M)}A${i} ${i} 0 0 1 ${e.cx} ${e.cy-i}Z`,fill:"url(#sekyro-fc-fade)"})})]}),s("path",{className:"sekyro-fc-scrim",fillRule:"evenodd",d:`M0 0H${a.w}V${a.h}H0Z M${e.cx-e.a} ${e.cy}a${e.a} ${e.b} 0 1 0 ${2*e.a} 0a${e.a} ${e.b} 0 1 0 ${-2*e.a} 0Z`}),s("ellipse",{className:"sekyro-fc-rim",cx:e.cx,cy:e.cy,rx:e.a,ry:e.b}),s("path",{className:"sekyro-fc-ticks",d:N.join("")}),g>0?s("path",{className:"sekyro-fc-ticks is-done",d:N.slice(0,g).join("")}):null,g<x?s("path",{className:"sekyro-fc-ticks is-light",d:N.join(""),mask:"url(#sekyro-fc-light)"}):null]}):null,s("div",{className:"sekyro-lm-instruction sekyro-fc-instruction",style:{insetBlockStart:R-80},children:s("div",{role:"status","aria-live":"polite",children:s(C,{swapKey:n,className:"sekyro-lm-line",children:n})})}),t?r("p",{className:"sekyro-lm-under sekyro-lm-note",style:{insetBlockStart:R+2*e.b+48},children:[o?s("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}):null,s("span",{children:t})]}):null,r("div",{className:"sekyro-lm-controls",children:[r("div",{className:"sekyro-lm-bar",children:[l!==void 0?s("button",{type:"button",className:"sekyro-glass","aria-label":y,onClick:l,children:s(L,{name:"close"})}):null,p]}),k]})]})})}m(Z,"FaceCamera");export{Z as a};
|
package/dist/chunk-ZVSRJKQE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as Yt,c as Zt}from"./chunk-36RC3M4K.js";import{a as n,b as G,f as Ht,g as Gt,h as qt,i as Dt,j as jt,k as $t,l as zt,m as F,n as D,o as Ge}from"./chunk-PXRIFHY2.js";import{useId as nr}from"react";import{Fragment as tr,jsx as R,jsxs as Y}from"react/jsx-runtime";function Z({className:e,children:t}){return R("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}n(Z,"Svg");var st="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function Wt(e){return Y(Z,{...e,children:[R("circle",{cx:"12",cy:"12",r:"4"}),R("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}n(Wt,"SunIcon");function Qt(e){return Y(Z,{...e,children:[R("circle",{cx:"12",cy:"12",r:"9"}),R("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}n(Qt,"FaceUncoveredIcon");function Jt(e){return Y(Z,{...e,children:[R("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),R("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),R("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}n(Jt,"PhoneEyeLevelIcon");function Xt(e){return Y(Z,{...e,children:[R("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),R("circle",{cx:"12",cy:"12",r:"2.8"})]})}n(Xt,"LookStraightIcon");function en(e){return Y(Z,{...e,children:[R("path",{d:st}),R("path",{d:"M9 13l2 2 4-4"})]})}n(en,"CameraCheckIcon");function tn(e){return Y(Z,{...e,children:[R("path",{d:st}),R("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}n(tn,"CameraAskIcon");function nn(e){return Y(Z,{...e,children:[R("path",{d:st}),R("path",{d:"M3 3l18 18"})]})}n(nn,"CameraBlockedIcon");function he({off:e,className:t}){return Y(Z,{className:t,children:[R("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?R("path",{d:"M4 4l16 16"}):Y(tr,{children:[R("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),R("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}n(he,"SpeakerIcon");function rn(e){return R(Z,{...e,children:R("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}n(rn,"CheckIcon");function on(e){return Y(Z,{className:e.className??"sekyro-spinner",children:[R("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),R("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}n(on,"SpinnerIcon");import{jsx as oe,jsxs as sn}from"react/jsx-runtime";var qe=["light","uncover","eyeLevel","straight"],rr={light:{key:"capture.tips.light",icon:n(()=>oe(Wt,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:n(()=>oe(Qt,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:n(()=>oe(Jt,{}),"icon")},straight:{key:"capture.tips.straight",icon:n(()=>oe(Xt,{}),"icon")}};function an({tips:e}){let t=F(),s=nr();return e.length===0?null:sn("section",{className:"sekyro-tips","aria-labelledby":s,"data-testid":"sekyro-tips",children:[oe("p",{className:"sekyro-tips__title",id:s,children:t("capture.tips.title")}),oe("ul",{className:"sekyro-tips__list",children:e.map(o=>{let r=typeof o=="string"?rr[o]:void 0,a=typeof o=="string"?o:o.id,l=r!==void 0?r.icon():typeof o=="string"?void 0:o.icon,p=r!==void 0?t(r.key):typeof o=="string"?o:o.text;return sn("li",{className:"sekyro-tips__item",children:[l!=null?oe("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:l}):null,oe("span",{children:p})]},a)})})]})}n(an,"TipList");import{useEffect as cn,useId as or,useRef as sr,useState as ir}from"react";import{jsx as W,jsxs as De}from"react/jsx-runtime";var ar=220;function ln({title:e,description:t,options:s,busy:o,error:r,focus:a,testId:l,look:p="cards",marked:C,onChoose:S}){let M=or(),I=Ge(),[h,c]=ir(null),m=sr(null);cn(()=>{r!==null&&c(null)},[r]),cn(()=>()=>{m.current!==null&&clearTimeout(m.current)},[]);let g=n(d=>{o||h!==null||(c(d),m.current=setTimeout(()=>{m.current=null,c(null),S(d)},ar))},"choose");return De("section",{className:"sekyro-stack sekyro-stack--4 sekyro-choice","aria-labelledby":M,"data-testid":l,children:[De("div",{className:"sekyro-stack sekyro-stack--1",children:[W("h2",{id:M,ref:a?I:void 0,tabIndex:-1,className:"sekyro-text-body",children:e}),t!==void 0&&t!==""?W("p",{className:"sekyro-text-muted",children:t}):null]}),r!==null?W(D,{tone:"danger",children:W("span",{children:r})}):null,p==="buttons"?W("div",{className:"sekyro-stack sekyro-stack--3",children:s.map((d,w)=>W(G,{kind:w===0?"primary":"ghost",full:!0,disabled:o,"aria-busy":o||void 0,onClick:()=>S(d.id),children:d.label},d.id))}):W("div",{className:"sekyro-choices",children:s.map(d=>De("button",{type:"button",className:"sekyro-card","aria-pressed":(h??C)===d.id,"aria-busy":o||void 0,disabled:o||h!==null&&h!==d.id,onClick:()=>g(d.id),children:[d.glyph,De("span",{className:"sekyro-card__body",children:[W("span",{className:"sekyro-card__title",children:d.label}),d.sub!==void 0?W("span",{className:"sekyro-card__sub",children:d.sub}):null]}),W("span",{className:"sekyro-radio","aria-hidden":"true"})]},d.id))})]})}n(ln,"ChoiceScreen");var je=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera","fcv3.hold_upright","capture.tips.summary"];function ue(e){return e!==null&&je.includes(e)}n(ue,"isVoiceKey");import{useCallback as J,useEffect as de,useLayoutEffect as dr,useMemo as pr,useRef as ke,useState as Ee}from"react";var cr=n((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function ve(e,t,s){let o;try{if(typeof e=="function")o=e(t,s);else{let r=e[s];o=r!=null&&cr(r,t)?r[t]:null}}catch{return null}return typeof o=="string"&&o!==""?o:null}n(ve,"resolveClip");var lr="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",pn={ar:"ar-SA",fr:"fr-FR",en:"en-US"};function Q(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}n(Q,"synth");function ur(){return Q()!==null&&typeof SpeechSynthesisUtterance=="function"}n(ur,"speechAvailable");function un(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}n(un,"baseLang");function fn(e,t){let s=n(r=>r.replace(/_/g,"-").toLowerCase(),"norm"),o=un(t);return e.find(r=>s(r.lang)===s(t))??e.find(r=>un(r.lang)===o)}n(fn,"pickVoice");function yn(e){if(!ur())return!1;let t=[];try{t=Q()?.getVoices()??[]}catch{return!0}return t.length===0||fn(t,e)!==void 0}n(yn,"speechUsable");function mn(e){let t=Q();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}n(mn,"subscribeVoices");function Ne(e){try{let t=typeof location<"u"?location.href:"http://localhost/",s=new URL(e,t);return`clip:${s.origin}${s.pathname}`}catch{return`clip:${e}`}}n(Ne,"clipIdentity");function dn(e){e.pause(),e.removeAttribute("src"),e.load()}n(dn,"release");function gn(){let e=null,t=null,s=0,o=null,r=[],a=new Map,l=n(()=>{r=Q()?.getVoices()??[]},"loadVoices"),p=!1,C=n(()=>{let c=Q();p||c===null||(p=!0,l(),c.addEventListener?.("voiceschanged",l))},"bindVoices"),S=n(()=>(e??(e=new Audio),e),"element"),M=n((c,m,g)=>{let d=Q();if(d!==null&&c!==""&&typeof SpeechSynthesisUtterance=="function"){C();let w=fn(r,m);if(r.length===0||w!==void 0){d.cancel();let f=new SpeechSynthesisUtterance(c);f.lang=m,w!==void 0&&(f.voice=w),f.rate=.95,g!==void 0&&(f.onend=f.onerror=g),d.speak(f);return}}g?.()},"speak"),I=n(()=>{s+=1,o=null,e!==null&&(e.pause(),e.currentTime=0),Q()?.cancel()},"stop"),h=n(c=>{for(let m of c){let g=Ne(m);if(a.has(g))continue;let d=new Audio;d.preload="auto",d.src=m,a.set(g,d)}},"warmClips");return{say(c){let m=c.url!==null?Ne(c.url):`tts:${c.lang}:${c.text}`;if(m===o)return;o=m,s+=1;let g=s,d=c.onEnd,w=d!==void 0?()=>{g===s&&d()}:void 0;if(Q()?.cancel(),c.url!==null){let f=S();f.pause(),f.muted=!1,f.src=c.url,f.currentTime=0,f.onended=w??null,f.play()?.catch(V=>{g===s&&V?.name!=="AbortError"&&(c.speech?M(c.text,c.lang,w):w?.())});return}c.speech?M(c.text,c.lang,w):w?.()},unlock({lang:c,speech:m,prefetch:g}){let d=S();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let V=Uint8Array.from(atob(lr),x=>x.charCodeAt(0));t=URL.createObjectURL(new Blob([V],{type:"audio/wav"}))}let w=d.paused===!1&&t!==null&&d.src!==t;t!==null&&!w&&(d.muted=!0,d.onended=null,d.src=t,d.play()?.catch(()=>{}));let f=Q();if(m&&f!==null&&typeof SpeechSynthesisUtterance=="function"){C();let V=new SpeechSynthesisUtterance(" ");V.volume=0,V.lang=c,f.speak(V)}h(g??[])},prefetch:h,stop:I,dispose(){I(),p&&Q()?.removeEventListener?.("voiceschanged",l),p=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&dn(e),e=null;for(let c of a.values())dn(c);a.clear()}}}n(gn,"createVoicePlayer");var hn="sekyro.voiceGuidance";function vn(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}n(vn,"readVoicePreference");function kn(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}n(kn,"writeVoicePreference");var Pe="capture.tips.summary",fr=typeof window<"u"?dr:de,yr=Object.freeze({});function it(e,t){let s=new Set,o=[];for(let r of je){let a=r===Pe?null:ve(e,r,t);a===null||s.has(Ne(a))||(s.add(Ne(a)),o.push(a))}return o}n(it,"resolvedClipUrls");function at({locale:e,defaultClips:t,options:s}){let o=s===!1,r=o?{}:s??{},a=r.storageKey===void 0?hn:r.storageKey,[l,p]=Ee(r.defaultEnabled??!0),C=ke(l),[S,M]=Ee(!1),[I,h]=Ee("none"),[c,m]=Ee(!1),g=ke(!1),[d,w]=Ee(0),f=ke(null),V=J(()=>(f.current??(f.current=gn()),f.current),[]),x=pn[e],y=r.speechFallback,N=y===void 0||y===!0?!0:y===!1?!1:y.includes(e),T=r.clips??t??yr,B=ke(!1),i=ke(T);fr(()=>{i.current=T,C.current=l}),de(()=>{if(o||a===null)return;let k=vn(a);k!==null&&(C.current=k,p(k))},[o,a]),de(()=>{if(!(o||!N))return mn(()=>w(k=>k+1))},[o,N]);let P=r.clips;de(()=>{if(o)return;let k=N&&yn(x);M(it(T,e).length>0||k),h(P!==void 0&&ve(P,Pe,e)!==null?"partner":ve(T,Pe,e)!==null||k?"default":"none")},[o,T,P,e,N,x,d]),de(()=>{if(o||!l||!B.current)return;let k=it(T,e);k.length>0&&V().prefetch(k)},[o,l,T,e,V]),de(()=>()=>{f.current?.dispose(),f.current=null,B.current=!1},[]);let v=J(k=>{o||(B.current=!0,V().unlock({lang:x,speech:N,...k?{prefetch:it(i.current,e)}:{}}))},[o,V,x,N,e]),$=J(()=>v(C.current),[v]),_=J(()=>{g.current=!1,m(!1)},[]),q=J(()=>{_(),f.current?.stop()},[_]),ie=J(()=>{g.current&&q()},[q]),H=J((k,ae)=>{if(o)return;if(g.current){q();return}let u=V();u.stop(),g.current=!0,m(!0);let fe=ae?.clip===!1?null:ve(i.current,Pe,e);u.say({url:fe,text:k,lang:x,speech:N,onEnd:_})},[o,q,V,e,x,N,_]),E=J(k=>{o||(k?v(!0):q(),a!==null&&kn(a,k),C.current=k,p(k))},[o,v,q,a]),K=J(()=>E(!C.current),[E]),A=J((k,ae)=>{if(o||!l)return;g.current&&_();let u=ve(i.current,k,e);V().say({url:u,text:ae,lang:x,speech:N})},[o,l,e,V,x,N,_]);return pr(()=>({supported:!o&&S,enabled:!o&&l,setEnabled:E,toggle:K,unlock:$,speakKey:A,stop:q,summary:o?"none":I,summaryPlaying:c,toggleSummary:H,stopSummary:ie}),[o,S,l,E,K,$,A,q,I,c,H,ie])}n(at,"useVoiceGuidance");function ct(e,t,s,o){let{speakKey:r,stop:a,enabled:l}=e,p=ke(!1);de(()=>{if(!o||!l){p.current&&a(),p.current=!1;return}p.current=!0,ue(t)&&t!==Pe&&s!==""&&r(t,s)},[o,l,t,s,r,a])}n(ct,"useSpeakGuidance");import{isValidElement as Gr,useCallback as We,useContext as qr,useEffect as se,useMemo as Re,useRef as pe,useState as jn}from"react";import{useEffect as mr,useRef as gr}from"react";import{jsx as be,jsxs as lt}from"react/jsx-runtime";function bn({showCoaching:e,attemptsText:t,showRetake:s,onRetake:o}){let r=F(),a=gr(null);return mr(()=>{s&&a.current?.focus()},[s]),!e&&!s?null:lt("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?lt("div",{className:"sekyro-stack sekyro-stack--1",children:[be("p",{className:"sekyro-text-body",children:r("capture.retryCoaching.title")}),lt("ul",{className:"sekyro-coaching",children:[be("li",{children:r("capture.retryCoaching.light")}),be("li",{children:r("capture.retryCoaching.eyeLevel")}),be("li",{children:r("capture.retryCoaching.head")})]}),t!==null?be("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:t}):null]}):null,s?be(G,{ref:a,className:"sekyro-btn--start",onClick:o,children:r("capture.recordAgain")}):null]})}n(bn,"CapturedPanel");function $e(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}n($e,"isDevBuild");import{createContext as hr}from"react";var Cn=hr(null);import{useCallback as wn,useEffect as Mn,useRef as Ce}from"react";import{useId as vr}from"react";import{jsx as ze,jsxs as ut}from"react/jsx-runtime";var kr=["user","environment"];function Sn({value:e,onChange:t}){let s=F(),o=vr();return ut("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[ze("legend",{className:"sekyro-segmented__legend",children:s("capture.cameraLabel")}),ze("div",{className:"sekyro-segmented__options",children:kr.map(r=>ut("label",{className:"sekyro-segmented__option",children:[ze("input",{type:"radio",className:"sekyro-segmented__input",name:o,value:r,checked:e===r,onChange:()=>t(r)}),ut("span",{className:"sekyro-segmented__face",children:[ze("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),s(`capture.facing.${r}`)]})]},r))})]})}n(Sn,"FacingPicker");import{useEffect as br,useState as Cr}from"react";import{jsx as _e,jsxs as Sr}from"react/jsx-runtime";function Vn({state:e}){let t=F(),[s,o]=Cr(!1);br(()=>{e!=="unknown"&&o(!0)},[e]);let r=e==="granted"?_e(en,{}):e==="denied"?_e(nn,{}):_e(tn,{});return Sr("div",{role:s?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[_e("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:r}),_e("span",{children:t(`capture.permission.${e}`)})]})}n(Vn,"PermissionRow");import{jsx as Ye,jsxs as Rn}from"react/jsx-runtime";function Ln({voice:e}){let t=F();if(!e.supported)return null;let s=e.enabled;return Rn("button",{type:"button",role:"switch","aria-checked":s,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>e.toggle(),children:[Rn("span",{className:"sekyro-switch__label",children:[Ye(he,{off:!s}),t("capture.voiceGuidance")]}),Ye("span",{className:"sekyro-switch__track","aria-hidden":"true",children:Ye("span",{className:"sekyro-switch__thumb",children:s?Ye(rn,{className:"sekyro-switch__check"}):null})})]})}n(Ln,"VoiceSwitch");import{Fragment as Rr,jsx as U,jsxs as Se}from"react/jsx-runtime";function In({assets:e,onRetryAssets:t,permission:s,captureMode:o="self",canChooseFacing:r,facing:a,onFacingChange:l,voice:p,tips:C,summary:S,startLabel:M,startDisabled:I,onStart:h}){let c=F(),m=Ce(S?.stop);m.current=S?.stop,Mn(()=>()=>m.current?.(),[]);let g=Ce(null),d=Ce(null),w=Ce(null),f=Ce(e),V=Ce(!1);Mn(()=>{let P=f.current;if(f.current=e,P===e)return;let v=V.current;e!=="loading"&&(V.current=!1),Vr(g.current)&&(e==="failed"?w.current?.focus():v&&d.current?.focus())},[e]);let x=wn(()=>{V.current=!0,t()},[t]),y=e==="loading",N=y||I,T=wn(()=>{N||(m.current?.(),h())},[N,h]),B;e==="failed"?B=Se(D,{tone:"danger",testId:"sekyro-assets-error",children:[U("p",{className:"sekyro-text-body",children:c("fcv2.err.models")}),U(G,{kind:"ghost",ref:w,className:"sekyro-btn--start",onClick:x,"data-testid":"sekyro-assets-retry",children:c("common.retry")})]}):B=Se("div",{className:"sekyro-stack sekyro-stack--1",children:[U(G,{ref:d,full:!0,"data-testid":"sekyro-start","aria-disabled":N?"true":void 0,"aria-busy":y?"true":void 0,onClick:T,children:y?Se(Rr,{children:[U(on,{}),c("capture.preparing.title")]}):M??c("capture.start")}),y?U("p",{className:"sekyro-text-muted",children:c("capture.preparing.hint")}):null]});let i=o==="assisted";return Se("div",{ref:g,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[i?Se("div",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-assisted-intro",children:[U("h2",{className:"sekyro-text-body",children:c("capture.assisted.title")}),U("p",{className:"sekyro-text-muted",children:c("capture.assisted.lead")})]}):null,C!==!1?U(an,{tips:C}):null,S!==void 0?Se(G,{kind:"ghost",className:"sekyro-btn--start",onClick:S.toggle,"data-testid":"sekyro-tips-listen",children:[U(he,{off:!1}),c(S.playing?"capture.tips.stop":"capture.tips.listen")]}):null,U(Vn,{state:s}),i&&r?U(Sn,{value:a,onChange:l}):null,U(Ln,{voice:p}),U("p",{className:"sekyro-text-muted",children:c("capture.securityNote")}),B,U("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?c("capture.preparing.title"):e==="ready"?c("capture.ready"):""})]})}n(In,"PreCaptureScreen");function Vr(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}n(Vr,"focusIsOurs");import{useEffect as dt,useState as pt}from"react";function xn(e){return En(e,"mobileRequired")}n(xn,"useMobileRequired");function Nn(e){return En(e,"returning").required}n(Nn,"useReturning");function En(e,t){let[s,o]=pt({required:!1,settled:e===void 0});return dt(()=>{let r=e?.[t];if(e===void 0||typeof r!="function"){o({required:!1,settled:!0});return}let a=!0;return o({required:!1,settled:!1}),Promise.resolve().then(()=>r.call(e)).then(l=>{a&&o({required:l===!0,settled:!0})},()=>{a&&o({required:!1,settled:!0})}),()=>{a=!1}},[e,t]),s}n(En,"useFlag");function Pn(e){let[t,s]=pt({mode:"self",settled:e===void 0});return dt(()=>{let o=e?.captureMode;if(e===void 0||typeof o!="function"){s({mode:"self",settled:!0});return}let r=!0;return s({mode:"self",settled:!1}),Promise.resolve().then(()=>o.call(e)).then(a=>{r&&s({mode:a==="assisted"?"assisted":"self",settled:!0})},()=>{r&&s({mode:"self",settled:!0})}),()=>{r=!1}},[e]),t}n(Pn,"useCaptureMode");function _n(e){let[t,s]=pt(!1);return dt(()=>{if(s(!1),e===void 0)return;let o=e.on("busy",()=>s(!0)),r=e.on("result",()=>s(!1));return()=>{o(),r()}},[e]),t}n(_n,"useBusy");import{getLivenessAssetsStatus as Lr,preloadLivenessAssets as wr,subscribeLivenessAssets as Mr}from"@sekyro/web";import{useCallback as ft,useEffect as An,useRef as Tn,useState as Ir,useSyncExternalStore as xr}from"react";var Nr=n(()=>"idle","serverSnapshot");function Kn(e){return wr(e!==void 0?{assetBaseUrl:e}:{})}n(Kn,"preload");function On(e,t=!0){let s=xr(ft(I=>Mr(I,e),[e]),()=>Lr(e),Nr),[o,r]=Ir(null),a=Tn(!1),l=ft(()=>{Kn(e).then(I=>{a.current&&I==="idle"&&r({base:e})})},[e]);An(()=>(a.current=!0,l(),()=>{a.current=!1}),[l]);let p=Tn(null);An(()=>{if(s!=="idle"){p.current={base:e};return}!t||p.current===null||p.current.base!==e||(p.current=null,l())},[s,e,l,t]);let C=ft(()=>{Kn(e)},[e]);return{gate:o!==null&&o.base===e&&s==="idle"||s==="ready"?"ready":s==="failed"?"failed":"loading",retry:C}}n(On,"useLivenessAssets");import{createLivenessCapture as Er}from"@sekyro/web";import{useCallback as yt,useEffect as Pr,useRef as Ve,useState as X}from"react";var Fn={progress:0,hint:null,faceDetected:!1};function Un(e){let{videoRef:t,assetBaseUrl:s}=e,r=Ve(e.verification).current,a=Ve(!1);e.verification!==r&&!a.current&&$e()&&(a.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let l=Ve(null),[p,C]=X("idle"),[S,M]=X(Fn),[I,h]=X(!1),[c,m]=X(!1),[g,d]=X(null),[w,f]=X(!1),[V,x]=X(null),[y,N]=X(null),[T,B]=X(null),[i,P]=X(null),v=Ve(null),$=Ve("idle"),_=Ve(e);_.current=e,Pr(()=>{let E=t.current;if(E===null)return;let K={video:E,...s!==void 0?{assetBaseUrl:s}:{}},A=r!==void 0?r.liveness(K):Er(K);l.current=A;let k=n(()=>P(A.facingMode??null),"readFacing");k();let ae=[A.on("state",u=>{u==="starting"?(x(null),N(null),M(Fn),m(!1),h(!1),d(null),v.current=null):u==="gating"&&$.current==="recording"&&(m(!1),h(!1),d(null),v.current=null),$.current=u,k(),C(u),_.current.onStateChange?.(u)}),A.on("gate",u=>{let fe=v.current;v.current=u.progress,h(fe!==null&&u.progress<fe-.001&&u.progress>0&&u.progress<1),u.progress>=1&&m(!0),M(u)}),A.on("frozen",({previewDataUrl:u})=>d(u)),A.on("profile",({animations:u})=>f(u==="reduced")),A.on("captured",u=>{x(u),B(null),_.current.onCaptured?.(u)}),A.on("error",u=>{N(u),_.current.onError?.(u)}),r?.on("result",u=>{B(u),_.current.onResult?.(u)})];return()=>{for(let u of ae)u?.();l.current=null,A.destroy()}},[r,t,s]);let q=yt(E=>{l.current?.start(E)},[]),ie=yt(()=>{l.current?.retry()},[]),H=yt(()=>{let E=l.current,K=E?.switchCamera()===!0;return K&&(P(E?.facingMode??null),m(!1),h(!1),d(null),v.current=null),K},[]);return{state:p,gate:S,draining:I,gateLocked:c,frozenPreview:g,reduceMotion:w,artifacts:V,error:y,result:T,facingMode:i,start:q,retry:ie,switchCamera:H}}n(Un,"useLivenessHandle");import{useCallback as _r,useEffect as Ar,useState as Ze}from"react";var Tr=new Set(["national_number"]);function Bn(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(s=>Tr.has(s));return t.length>0?{...e,options:t}:null}n(Bn,"pending");function Hn(e){let[t,s]=Ze(null),[o,r]=Ze(e===void 0),[a,l]=Ze(!1),[p,C]=Ze(!1);Ar(()=>{if(s(null),e===void 0){r(!0);return}let h=!0,c=e.methodChoice;typeof c=="function"?(r(!1),Promise.resolve().then(()=>c.call(e)).then(g=>{h&&s(Bn(g))},()=>{}).finally(()=>{h&&r(!0)})):r(!0);let m=e.on("method",g=>s(Bn(g)));return()=>{h=!1,m()}},[e]);let S=_r(async h=>{if(e===void 0)return!1;l(!0),C(!1);try{return await e.selectMethod(h),s(null),!0}catch{return C(!0),!1}finally{l(!1)}},[e]),M=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:M==="national_number"&&!p?M:null,settled:o,busy:a,failed:p,select:S}}n(Hn,"useMethodChoice");import{useEffect as Kr,useMemo as Or,useState as Fr}from"react";var Ur=["ar","fr","en"];function Br(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}n(Br,"isClipUrl");function Hr(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let s={};for(let o of Ur){let r=t[o];if(!(typeof r!="object"||r===null))for(let[a,l]of Object.entries(r))!ue(a)||!Br(l)||((s[o]??(s[o]={}))[a]=l)}return Object.keys(s).length>0?s:null}n(Hr,"toVoiceClipMap");function Gn(e){let[t,s]=Fr(null);Kr(()=>{if(s(null),e===void 0)return;let r=!0,a=n(p=>{if(!r)return;let C=typeof p=="object"&&p!==null&&typeof p.setId=="string"?p:null;s(S=>S?.setId===C?.setId?S:C)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(a,()=>a(null))}catch{a(null)}let l=e.on("view",p=>a(p.voice));return()=>{r=!1,l()}},[e]);let o=Or(()=>t!==null?Hr(t):null,[t]);return e===void 0?null:o}n(Gn,"useServerVoiceClips");import{jsx as qn}from"react/jsx-runtime";function Dn({voice:e}){let t=F();return qn(G,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>e.toggle(),children:qn(he,{off:!e.enabled,className:"sekyro-icon"})})}n(Dn,"VoiceChip");import{Fragment as Wr,jsx as L,jsxs as Ae}from"react/jsx-runtime";var Dr=800;function jr(e){return e===void 0||e!==!1&&e.length===qe.length&&qe.every(t=>e.includes(t))}n(jr,"isDefaultTips");function $r(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}n($r,"carriesActivation");function zr(e){return typeof e=="object"&&e!==null&&!Gr(e)&&"tone"in e&&"text"in e}n(zr,"isNoticeObject");function Yr(e){return e==="starting"||e==="gating"||e==="recording"}n(Yr,"isCapturing");function Zr(e){return e==="captured"||e==="uploading"||e==="checking"}n(Zr,"isPostCapture");function ci({verification:e,locale:t,dir:s,strings:o,slots:r,autoStart:a=!1,notice:l,startDisabled:p=!1,startLabel:C,tips:S,tipsSummary:M,coach:I,voice:h,onGuidance:c,onCaptured:m,onResult:g,onError:d,onStateChange:w,assetBaseUrl:f,className:V}){let x=Re(()=>$t(t,o),[t,o]),y=Re(()=>b=>x[b]??"",[x]),N=s??(t==="ar"?"rtl":"ltr"),T=pe(null),B=qr(Cn),i=Un({verification:e,videoRef:T,assetBaseUrl:f,onCaptured:m,onResult:g,onError:d,onStateChange:w}),P=On(f,i.state==="idle"&&i.error===null),v=Hn(e),$=v.choice!==null,_=xn(e),q=Nn(e),ie=_n(e),H=Zt(),E=Pn(e),K=E.mode==="assisted",A=K&&H.canChooseFacing,k=h!==!1&&h?.clips===void 0,ae=Gn(k?e:void 0),u=at({locale:t,defaultClips:ae,options:h}),[fe,Qe]=jn(null),z=K?fe??(H.canChooseFacing?"environment":"user"):"user",mt=E.settled&&(!K||H.facingSettled),gt=pe(null),Te=pe(!1),ht=pe(u.unlock);ht.current=u.unlock,se(()=>{let b=gt.current;if(b===null)return;let le=["pointerup","touchend","click","keydown"],re=n(()=>{for(let xe of le)b.removeEventListener(xe,ge,!0)},"disarm");function ge(xe){if(Te.current){re();return}$r(xe)&&(Te.current=!0,re(),ht.current())}n(ge,"onGesture");for(let xe of le)b.addEventListener(xe,ge,{capture:!0,passive:!0});return re},[]);let vt=We(()=>{Te.current||(Te.current=!0,u.unlock()),i.start({facing:z})},[u.unlock,i.start,z]),kt=We(()=>i.start({facing:z}),[i.start,z]),Ke=pe(!1),Le=i.state==="idle"&&i.error===null,bt=!$&&!_.required&&(a===!0||a==="when-permitted"&&H.permission==="granted"),Ct=bt&&v.settled&&_.settled&&mt,$n=a==="when-permitted"&&!H.permissionSettled&&!Ke.current,St=bt&&Le&&!Ke.current,Je=($n||St||!mt)&&P.gate==="ready"?"loading":P.gate;se(()=>{!Ct||!Le||P.gate!=="ready"||Ke.current||(Ke.current=!0,kt())},[Ct,Le,P.gate,kt]);let zn=Le&&!$&&!_.required&&!(St&&P.gate==="ready"),Vt=We(()=>{i.switchCamera()&&Qe(z==="user"?"environment":"user")},[i.switchCamera,z]),Rt=i.state!=="idle"&&i.facingMode!==null?i.facingMode:z;se(()=>{let b=T.current?.style;Rt==="user"?b?.removeProperty("transform"):b&&(b.transform="none")},[Rt]);let Oe=Re(()=>i.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(i.artifacts.keyframe):null,[i.artifacts]);se(()=>{if(Oe!==null)return()=>URL.revokeObjectURL(Oe)},[Oe]);let Lt=i.frozenPreview??Oe,ye=e!==void 0,O=Yr(i.state),ne=Zr(i.state),Fe=O||ne,j=i.result,wt=i.state==="done"&&j!==null,Mt=i.state==="recording"&&i.frozenPreview!==null,Xe=B!==null,we=ne||Mt,It=ne?"checking":Mt?"frozen":i.state==="recording"?"recording":i.gateLocked||i.gate.progress>=1?"locked":i.gate.faceDetected?"aligning":"seeking",Ue=O?i.gate.hint:null,Be=i.state==="starting"?"capture.preparing.title":Ue===null?null:Ue==="center"&&!i.gate.faceDetected?"fcv3.no_face":Ht(Ue),[Yn,xt]=jn(null);se(()=>{if(Be!=="fcv3.no_face"){xt(Be);return}if(!O)return;let b=setTimeout(()=>xt(Be),Dr);return()=>clearTimeout(b)},[Be,O]);let et=O&&typeof I=="string"&&I!=="",Nt=K&&O?y("capture.assisted.stage"):null,ce=O&&!et?Yn:null,tt=et?I:ce===null?"":y(ce);ct(u,ce,tt,O);let Et=pe(c);Et.current=c,se(()=>{if(ue(ce))try{Et.current?.(ce)}catch(b){console.error("[@sekyro/react] onGuidance threw:",b)}},[ce]);let Me=Re(()=>({supported:u.supported,enabled:u.enabled,setEnabled:u.setEnabled,toggle:u.toggle}),[u.supported,u.enabled,u.setEnabled,u.toggle]),nt=r?.voicePrompt,Pt=nt!==void 0,_t=h===void 0,At=pe(!1);se(()=>{!Pt||!_t||At.current||!$e()||(At.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[Pt,_t]);let Zn=nt!==void 0?(b,le,re)=>nt(b,le,re,Me):u.supported?()=>L(Dn,{voice:Me}):void 0,{summary:rt,summaryPlaying:Tt,toggleSummary:Kt,stopSummary:Ot}=u,He=M!==void 0&&M!=="",Ft=He?M:y("capture.tips.summary"),Ut=He?rt!=="none":rt==="partner"||rt==="default"&&jr(S),Wn=Re(()=>Ut?{playing:Tt,toggle:n(()=>Kt(Ft,{clip:!He}),"toggle"),stop:Ot}:void 0,[Ut,Tt,Kt,Ft,Ot,He]),Qn=Re(()=>({assets:Je,retryAssets:P.retry,permission:H.permission,captureMode:E.mode,facing:z,setFacing:Qe,canChooseFacing:A,voice:Me}),[Je,P.retry,H.permission,E.mode,A,z,Me]),Jn=zr(l)?L(D,{tone:l.tone,testId:"sekyro-host-notice",children:L("span",{children:l.text})}):l??null,ee=j!==null&&j.status==="retry"?j:null,te=wt&&j.status==="unavailable"&&!$&&j.reason!=="portrait_required"?j:null,Ie=wt&&(j.status==="approved"||j.status==="rejected"||j.status==="review")?j:null,me=n((b,le)=>{if(b===void 0)return null;if(b==="device_cooldown"){let ge=Dt(t,le);if(ge!==null)return y(ge.key).replace("{time}",ge.time)}let re=qt(b);return re===null?null:y(re)},"reasonText"),Xn=te!==null&&te.reason!==void 0&&te.reason!=="nni_unbound"&&te.reason!=="method_required"&&te.reason!=="mobile_required"&&!(te.reason==="no_recorder"&&i.artifacts?.degraded==="NO_RECORDER"),Bt=Ge(),er=$&&v.auto===null&&!O&&!ne&&i.error===null,ot=We(async b=>{await v.select(b)&&i.state==="done"&&i.retry()},[v.select,i.state,i.retry]);return se(()=>{v.auto!==null&&!v.busy&&!O&&!ne&&ot(v.auto)},[v.auto,v.busy,O,ne,ot]),L(zt,{value:y,children:Ae("div",{ref:gt,className:V===void 0?"sekyro-capture":`sekyro-capture ${V}`,dir:N,lang:t,"data-testid":"sekyro-liveness-capture","data-state":i.state,children:[r?.header,ee!==null&&me(ee.reason)!==null&&!(Xe&&Fe)?L(D,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:L("span",{children:me(ee.reason)})}):null,ie&&ne&&!Xe?L(D,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:L("span",{children:y("capture.busy")})}):null,_.required&&Le?L(D,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:L("span",{children:y("reasons.mobile_required")})}):null,i.error!==null?r?.errorPanel!==void 0?r.errorPanel(i.error,i.retry):Ae(D,{tone:"danger",testId:"sekyro-error-notice",children:[L("span",{children:y(Gt(i.error.kind))}),i.error.retryable?L(G,{ref:Bt,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:y("common.retry")}):null]}):null,te!==null?Ae(D,{tone:"danger",testId:"sekyro-unavailable-notice",children:[L("span",{children:me(te.reason)??y(te.reason===void 0?"errors.session_expired":"errors.network_error")}),Xn?L(G,{ref:Bt,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:y("capture.recordAgain")}):null]}):null,Ie!==null&&me(Ie.reason)!==null?L(D,{tone:Ie.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:L("span",{children:me(Ie.reason,Ie.retryAfter)})}):null,L("div",{className:Fe?void 0:"sekyro-hidden","data-capture-live":Fe?"":void 0,children:Xe?B({videoRef:T,guidance:we&&ye?y("capture.checking"):tt,coached:et&&!(we&&ye),note:we?ye?y(ie?"capture.busy":"capture.checkingHint"):null:ee!==null?me(ee.reason):Nt,settled:we&&ye,progress:i.gate.progress,phase:It,still:we?Lt:null,live:Fe,switchCamera:O&&i.state!=="recording"&&A&&Vt}):L(Yt,{videoRef:T,guidanceText:tt,guidanceHint:Ue,guidanceKey:ce,progress:i.gate.progress,phase:It,draining:i.draining,stillUrl:Lt,showChecking:ye,onSwitchCamera:Vt,canSwitchCamera:K&&O&&i.state!=="recording",operatorText:Nt,voicePrompt:Zn,overlay:r?.stageOverlay,reduceMotion:i.reduceMotion})}),er&&v.choice!==null?L(ln,{title:y("method.title"),description:y("method.description"),options:v.choice.options.map(b=>({id:b,label:y(`method.${b}`)})),busy:v.busy,error:v.failed?y("errors.network_error"):null,focus:i.state==="done",testId:"sekyro-method",look:"buttons",onChoose:b=>{ot(b)}}):null,zn?Ae(Wr,{children:[q&&r?.header===void 0?Ae("div",{className:"sekyro-stack sekyro-stack--1",children:[L("h2",{className:"sekyro-text-body",children:y("returning.title")}),L("p",{className:"sekyro-text-muted",children:y("returning.description")})]}):null,Jn,r?.intro!==void 0?r.intro(vt,Qn):L(In,{assets:Je,onRetryAssets:P.retry,permission:H.permission,captureMode:E.mode,canChooseFacing:A,facing:z,onFacingChange:Qe,voice:Me,tips:S??qe,summary:Wn,startLabel:C,startDisabled:p,onStart:vt})]}):null,L(bn,{showCoaching:ee!==null,attemptsText:ee?.attemptsRemaining!==void 0?jt(x,t,ee.attemptsRemaining):null,showRetake:ee!==null&&!O&&!ne||!ye&&i.state==="captured",onRetake:i.retry}),r?.footer]})})}n(ci,"LivenessCapture");export{Cn as a,Sn as b,qe as c,ln as d,je as e,Dr as f,ci as g};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{d as me}from"./chunk-Y4PPDNQR.js";import{a as A}from"./chunk-2CJEADGY.js";import{a as pe,b as he,e as fe,f as ve}from"./chunk-2PGJ7P7E.js";import{a as ge,b as X}from"./chunk-LZU57LVO.js";import{a as h,b as G,h as de}from"./chunk-PXRIFHY2.js";import{useEffect as R,useLayoutEffect as Ue,useRef as Q,useState as S}from"react";var Se={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 ye={"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 ke={"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 we={"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 be={"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.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":"لنحاول مرة أخرى"};var Ce={"native.doc.introTitle":"We'll photograph your document","native.doc.introLead":"Your phone's camera will open. The photo is taken by itself as soon as the document is well framed.","native.doc.tip.flat":"Lay the document flat on a dark surface.","native.doc.tip.glare":"Avoid glare from lamps or sunlight.","native.doc.tip.frame":"Keep the whole document in the frame.","native.doc.openCamera":"Open the camera","native.doc.changeDocument":"Change document","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"};var ze={"native.doc.introTitle":"Nous allons photographier votre pièce","native.doc.introLead":"La caméra de votre téléphone va s'ouvrir. La photo est prise automatiquement dès que la pièce est bien cadrée.","native.doc.tip.flat":"Posez la pièce à plat, sur une surface sombre.","native.doc.tip.glare":"Évitez les reflets de lampe ou de soleil.","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.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"};var Be=["locking","capturing"],W=class W{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(e,r){return this.presentHint(e,r),this.presentLock(e,r),this.presentCard(e,r),this.shutterSince=e.manualShutter?this.shutterSince??r:null,this.shown={...this.shown,manualShutter:this.shutterSince!==null&&r-this.shutterSince>=1e3},this.shown}presentHint(e,r){let a=e.phase==="framing"&&!(e.hint==="blurry"&&e.card===null)?e.hint:null;if(e.phase!=="framing"){this.shown={...this.shown,hint:null},this.candidate=null;return}if(a!==this.candidate&&(this.candidate=a,this.candidateSince=r),a===this.shown.hint)return;let s=r-this.candidateSince>=(a===null?0:350),u=this.shown.hint===null||r-this.hintShownAt>=1200;s&&u&&(this.shown={...this.shown,hint:a},this.hintShownAt=r)}presentLock(e,r){if(Be.includes(e.phase)){this.shown={...this.shown,locking:!0},this.lockLostAt=null;return}if(this.shown.locking){if(e.phase!=="framing"){this.shown={...this.shown,locking:!1},this.lockLostAt=null;return}this.lockLostAt??(this.lockLostAt=r),r-this.lockLostAt>=300&&(this.shown={...this.shown,locking:!1},this.lockLostAt=null)}}presentCard(e,r){let a=e.card;if(a===null||e.phase!=="framing"){if(e.phase!=="framing"){this.shown={...this.shown,card:null},this.detectedSince=null,this.lostSince=null;return}this.detectedSince=null,this.lostSince??(this.lostSince=r),r-this.lostSince>=300&&(this.shown={...this.shown,card:null});return}if(this.lostSince=null,this.detectedSince??(this.detectedSince=r),r-this.detectedSince<250)return;let s=this.shown.card;if(s===null){this.shown={...this.shown,card:{...a}};return}let u=.35;this.shown={...this.shown,card:{fill:s.fill+(a.fill-s.fill)*u,offsetX:s.offsetX+(a.offsetX-s.offsetX)*u,offsetY:s.offsetY+(a.offsetY-s.offsetY)*u}}}};h(W,"ScanPresenter");var P=W;import{Fragment as at,jsx as t,jsxs as m}from"react/jsx-runtime";var Fe={en:Ce,fr:ze,ar:be},Ge=450,De=h(n=>e=>me(n.strings[e]??Fe[n.locale][e]??""),"useScanCopy");function Ne({name:n}){return t("svg",{className:"sekyro-glyph",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:Se[n]}})}h(Ne,"ScanGlyph");var Xe={en:ke,fr:we,ar:ye};function We(n,e){return n===null||n.state==="fallback"||n.state==="mismatch"?null:n.state==="searching"?e?"dcv3.mrz.searching":"dcv3.mrz.showMrzSide":n.state==="valid"?"dcv3.mrz.valid":n.coach!==void 0?`dcv3.mrz.${n.coach}`:"dcv3.mrz.reading"}h(We,"mrzInstruction");function Me(n){return n.reason==="unreadable"?"doc.reason_unreadable":n.reason!==void 0&&n.reason!=="side_missing"?de(n.reason):null}h(Me,"reasonOf");function xt({step:n,i18n:e,liveMrz:r,...a}){let[s,u]=S(!1);return s?t(et,{step:n,i18n:e,...r!==void 0?{liveMrz:r}:{},onClose:()=>u(!1)}):t(qe,{step:n,i18n:e,onOpen:()=>u(!0),...a})}h(xt,"DocumentCaptureView");function Qe({passport:n}){let r=Math.round(228/(n?1.42:1.586));return m("svg",{className:"sekyro-mark sekyro-mark--card",viewBox:`-12 -12 252 ${r+24}`,"aria-hidden":"true",focusable:"false",children:[t("defs",{children:t("clipPath",{id:"sekyro-card-clip",children:t("rect",{width:228,height:r,rx:"12.5"})})}),t("rect",{className:"sekyro-mark__card",width:228,height:r,rx:"12.5"}),t("rect",{className:"sekyro-mark__photo",x:"17",y:"17",width:"55",height:r*.52,rx:"6"}),[0,1,2].map(a=>t("rect",{className:"sekyro-mark__text",x:"88",y:23+a*r*.12,width:100-a*20,height:"6",rx:"3"},a)),[0,1].map(a=>t("rect",{className:"sekyro-mark__text",x:"17",y:r*.74+a*9,width:194,height:"4",rx:"2"},a)),t("g",{clipPath:"url(#sekyro-card-clip)",children:t("g",{className:"sekyro-mark__read",style:{"--sekyro-read-w":"228px"},children:t("rect",{x:"-1",width:"2",height:r,className:"sekyro-mark__beam"})})}),t("path",{className:"sekyro-mark__brackets",d:Ze(-10,-10,248,r+20,16,30)})]})}h(Qe,"ScanMark");function Ze(n,e,r,a,s,u){let w=Math.min(s,u*.6);return[[n,e,1,1],[n+r,e,-1,1],[n,e+a,1,-1],[n+r,e+a,-1,-1]].map(([b,T,f,E])=>`M${b} ${T+E*u}V${T+E*w}Q${b} ${T} ${b+f*w} ${T}H${b+f*u}`).join("")}h(Ze,"brackets");function qe({step:n,i18n:e,onOpen:r,onChangeCountry:a,onChangeDocument:s}){let u=De(e),w=n.documentType==="passport",y=Me(n);return m("section",{className:"sekyro-step","data-testid":"sekyro-document",children:[t(Qe,{passport:w}),t(pe,{title:u("native.doc.introTitle"),lead:u("native.doc.introLead")}),y!==null?m(ge,{tone:"warning",children:[t("span",{children:e.t(y)}),t("span",{children:X(e,n.attemptsRemaining,n.attemptsExhausted)})]}):null,m("ul",{className:"sekyro-tiprows",children:[m("li",{children:[t(A,{name:w?"passport":"card"}),u("native.doc.tip.flat")]}),m("li",{children:[t(A,{name:"light"}),u("native.doc.tip.glare")]}),m("li",{children:[t(Ne,{name:"image"}),u("native.doc.tip.frame")]})]}),s!==void 0||a!==void 0?m("div",{className:"sekyro-links",children:[s!==void 0?t("button",{type:"button",className:"sekyro-link",onClick:s,children:u("native.doc.changeDocument")}):null,a!==void 0?t("button",{type:"button",className:"sekyro-link",onClick:a,children:e.t("native.doc.changeCountry")}):null]}):null,t(he,{children:m(G,{full:!0,onClick:r,children:[t(A,{name:"camera"}),u("native.doc.openCamera")]})})]})}h(qe,"DocumentIntro");function Le(n,e,r){let a=n*.88,s=a/r;return{x:(n-a)/2,y:e*.42-s/2,w:a,h:s}}h(Le,"guideRect");var je={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"},Je=h(()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0,"reduceMotion");function et({step:n,i18n:e,liveMrz:r,onClose:a}){let s=De(e),u=Q(null),w=Q(null),y=Q(null),[b,T]=S("idle"),[f,E]=S(null),[xe,Z]=S(null),[p,$e]=S({w:0,h:0}),[z,Te]=S({hint:null,locking:!1,card:null,manualShutter:!1}),[q,_e]=S({}),[j,He]=S(null),[J,Re]=S(null),[ee,te]=S(0),[ne,re]=S(null),[O,ae]=S(null),L=n.documentType==="passport",K=L?1.42:1.586;fe(!0),Ue(()=>{let i=u.current;if(i===null)return;let c=h(()=>$e({w:i.clientWidth,h:i.clientHeight}),"measure");if(c(),typeof ResizeObserver>"u")return;let l=new ResizeObserver(c);return l.observe(i),()=>l.disconnect()},[]);let o=Le(p.w,p.h,K);R(()=>{p.w===0||p.h===0||y.current?.setGuide?.({viewAspect:p.w/p.h,rect:{x:o.x/p.w,y:o.y/p.h,width:o.w/p.w,height:o.h/p.h}})},[p.w,p.h,o.x,o.y,o.w,o.h]),R(()=>{let i=w.current;if(i===null)return;let c=n.capture({video:i,...r!==void 0?{liveMrz:r}:{}});y.current=c;let l=u.current;if(l!==null&&l.clientWidth>0&&l.clientHeight>0){let d=Le(l.clientWidth,l.clientHeight,K);c.setGuide?.({viewAspect:l.clientWidth/l.clientHeight,rect:{x:d.x/l.clientWidth,y:d.y/l.clientHeight,width:d.w/l.clientWidth,height:d.h/l.clientHeight}})}let C=new P,g={scan:null,feedback:null,gate:null},N=h(d=>{g={...g,...d};let M=g.gate?.guide,Ye={phase:g.scan?.phase??"framing",hint:g.feedback?.reticle==="coaching"?g.feedback.key:null,card:M?.detected?{fill:M.fill,offsetX:M.offsetX,offsetY:M.offsetY}:null,manualShutter:g.scan?.manualShutter??!1},x=C.present(Ye,performance.now());Te($=>$.hint===x.hint&&$.locking===x.locking&&$.manualShutter===x.manualShutter&&$.card?.fill===x.card?.fill&&$.card?.offsetX===x.card?.offsetX&&$.card?.offsetY===x.card?.offsetY?$:x)},"present"),Ve=[c.on("state",T),c.on("feedback",d=>N({feedback:d})),c.on("gate",d=>N({gate:d})),c.on("scan",d=>{E(d),N({scan:d})}),c.on("captured",d=>{_e(M=>({...M,[tt(d.side,L,M)]:d.previewDataUrl})),He(d.previewDataUrl),Re(rt(i))}),c.on("error",Z),c.on("mrz",d=>{d.state==="mismatch"?ae(d.format??null):re(d)})];return c.start().catch(()=>{}),()=>{for(let d of Ve)d();c.destroy(),y.current=null}},[n.issuer,n.documentType]);let k=f?.phase??"framing",D=k==="reading"||k==="result",V=k==="flipCue"||k==="reaskRecto",_=z.locking,se=f?.captured.length??0;R(()=>{_&&te(i=>i+1)},[_]),R(()=>{se>0&&te(i=>i+1)},[se]);let Ae=f?.expected??null;R(()=>{re(null)},[Ae]),R(()=>{if(O===null)return;let i=setTimeout(()=>ae(null),2e3);return()=>clearTimeout(i)},[O]);let oe=V||D?null:We(ne,L),Y=O!==null?O==="TD3"?"dcv3.mrz.looksLikePassport":"dcv3.mrz.looksLikeCard":oe,Ee=Y===null?null:e.strings[Y]??Xe[e.locale][Y],ie=Me(n),le=z.hint===null?null:je[z.hint]??`dcv2.${z.hint}`,Oe=le??(k==="flipCue"?f?.notice==="same_face"?"doc.sameFace":"doc.flip":k==="reaskRecto"?"doc.reaskRecto":D?"native.scan.reading":k==="locking"||k==="capturing"||_?"native.scan.holdStill":f?.notice==="reread"?"doc.reread":f?.notice==="technical"?"native.scan.retry":f?.notice==="blurry"?"native.scan.blurry":ie??(L?"doc.showPage":"doc.showSide")),B=Ee??s(Oe),H=z.card,v=o;if(!_&&H!==null&&H.fill>=.45&&H.fill<=1.25&&!Je()){let i=o.w*H.fill,c=i/K,l=o.x+o.w/2+o.w*Math.max(-.25,Math.min(.25,H.offsetX)),C=o.y+o.h/2+o.h*Math.max(-.25,Math.min(.25,H.offsetY));v={x:l-i/2,y:C-c/2,w:i,h:c}}let I=o.w*.045,U=28,ce=Math.min(I,U*.6),Ke=[[v.x,v.y,1,1],[v.x+v.w,v.y,-1,1],[v.x,v.y+v.h,1,-1],[v.x+v.w,v.y+v.h,-1,-1]],Ie=_?"is-locked":z.hint!==null?"is-coaching":"",Pe=L?[{side:"single",label:"doc.progressPage"}]:[{side:"recto",label:"doc.progressFront"},{side:"verso",label:"doc.progressBack"}],ue=o.y+o.h+48,F={insetInlineStart:o.x,insetBlockStart:o.y,inlineSize:o.w,blockSize:o.h,borderRadius:I};return t("section",{className:"sekyro-lm","aria-label":B,"data-testid":"sekyro-document",children:m("div",{ref:u,className:`sekyro-lm-stage${D?" is-reading":""}${V?" is-flip":""}`,style:{"--sekyro-guide-w":`${o.w}px`},children:[t("video",{ref:w,className:"sekyro-lm-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true",onPointerUp:i=>{let c=i.currentTarget,l=c.getBoundingClientRect(),C=Math.max(l.width/(c.videoWidth||1),l.height/(c.videoHeight||1)),g=c.videoWidth*C,N=c.videoHeight*C;g>0&&N>0&&y.current?.focusAt((i.clientX-l.left+(g-l.width)/2)/g,(i.clientY-l.top+(N-l.height)/2)/N)}}),p.w>0?m(at,{children:[D&&J!==null?t("img",{className:"sekyro-lm-scene",src:J,alt:""}):null,D&&j!==null?t("img",{className:"sekyro-lm-frozen",src:j,alt:"",style:F}):null,m("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${p.w} ${p.h}`,"aria-hidden":"true",focusable:"false",children:[m("defs",{children:[m("linearGradient",{id:"sekyro-lm-top",x1:"0",y1:"0",x2:"0",y2:"1",children:[t("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0.85"}),t("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0"})]}),m("linearGradient",{id:"sekyro-lm-bottom",x1:"0",y1:"0",x2:"0",y2:"1",children:[t("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0"}),t("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0.9"})]})]}),t("path",{className:"sekyro-lm-scrim",fillRule:"evenodd",d:`M0 0H${p.w}V${p.h}H0Z${nt(o,I)}`}),t("rect",{width:p.w,height:Math.max(0,o.y),fill:"url(#sekyro-lm-top)"}),t("rect",{y:o.y+o.h,width:p.w,height:Math.max(0,p.h-o.y-o.h),fill:"url(#sekyro-lm-bottom)"}),t("g",{className:`sekyro-lm-brackets ${Ie}`,children:Ke.map(([i,c,l,C],g)=>t("path",{style:{transform:`translate(${i}px, ${c}px) scale(${l}, ${C})`},d:`M0 ${U}V${ce}Q0 0 ${ce} 0H${U}`},g))}),_?t("rect",{className:"sekyro-lm-trace",x:o.x,y:o.y,width:o.w,height:o.h,rx:I,pathLength:"1",style:{animationDuration:`${Ge}ms`}}):null]}),t("div",{className:"sekyro-lm-slot",style:F,"aria-hidden":"true",children:D?t("span",{className:"sekyro-lm-read is-repeating"}):ee>0?t("span",{className:"sekyro-lm-read"},ee):null})]}):null,oe!==null?t("div",{className:"sekyro-lm-slot",style:F,"aria-hidden":"true",children:t("span",{"data-testid":"sekyro-mrz-strip",className:`sekyro-lm-mrz${L?" is-page":""}${ne?.state==="valid"?" is-valid":""}`})}):null,m("div",{className:"sekyro-lm-instruction",style:{insetBlockStart:o.y-64},children:[t("div",{role:"status","aria-live":"polite",children:t(ve,{swapKey:B,className:"sekyro-lm-line",children:B})}),ie!==null&&k==="framing"&&le===null?t("p",{className:"sekyro-lm-attempts",children:X(e,n.attemptsRemaining,n.attemptsExhausted)}):null]}),D?m("p",{className:"sekyro-lm-under sekyro-lm-note",style:{insetBlockStart:ue-12},children:[t("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}),s("native.scan.putDown")]}):V?t("div",{className:`sekyro-lm-under sekyro-lm-flip${k==="reaskRecto"?" is-toFront":""}`,style:{insetBlockStart:ue-20},"data-testid":"sekyro-flip-cue","aria-hidden":"true",children:m("span",{className:"sekyro-lm-flip-card",style:{aspectRatio:String(K)},children:[t("span",{className:"sekyro-lm-flip-front"}),t("span",{className:"sekyro-lm-flip-back"})]})}):null,m("div",{className:"sekyro-lm-controls",children:[m("div",{className:"sekyro-lm-bar",children:[t("button",{type:"button",className:"sekyro-glass","aria-label":e.t("native.close"),onClick:a,children:t(A,{name:"close"})}),f?.torchAvailable?t("button",{type:"button",className:`sekyro-glass${f.torch?" is-on":""}`,"aria-label":e.t("doc.torchOn"),"aria-pressed":f.torch,onClick:()=>y.current?.setTorch(!f.torch),children:t(Ne,{name:"flashlight"})}):null]}),xe!==null?m("div",{className:"sekyro-lm-error",role:"alert",children:[t("p",{children:e.t("doc.cameraBlocked")}),t("p",{children:e.t("doc.cameraBlockedHint")}),t(G,{onClick:()=>{Z(null),y.current?.retry()},children:e.t("doc.retryCamera")})]}):null,z.manualShutter?t("button",{type:"button",className:"sekyro-shutter","aria-label":e.t("doc.shutter"),onClick:()=>y.current?.shutter()}):null,t("ol",{className:"sekyro-lm-tray",children:Pe.map(({side:i,label:c})=>{let l=f?.captured.includes(i)??!1;return m("li",{className:l?"is-done":void 0,"aria-current":!l&&(L||f?.expected===i)?"step":void 0,children:[l?m("span",{className:"sekyro-lm-thumb",children:[q[i]!==void 0?t("img",{src:q[i],alt:""}):null,t("svg",{className:"sekyro-lm-check",viewBox:"0 0 18 18","aria-hidden":"true",children:t("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})]}):null,s(c)]},i)})})]}),b==="uploading"||b==="checking"?t("span",{className:"sekyro-visually-hidden",role:"status",children:b==="uploading"?e.t("doc.uploading"):s("native.scan.reading")}):null]})})}h(et,"LumiereScan");function tt(n,e,r){return e?"single":n==="recto"||n==="verso"?n:r.recto===void 0?"recto":"verso"}h(tt,"slotOf");function nt({x:n,y:e,w:r,h:a},s){return`M${n+s} ${e}H${n+r-s}Q${n+r} ${e} ${n+r} ${e+s}V${e+a-s}Q${n+r} ${e+a} ${n+r-s} ${e+a}H${n+s}Q${n} ${e+a} ${n} ${e+a-s}V${e+s}Q${n} ${e} ${n+s} ${e}Z`}h(nt,"roundedRect");function rt(n){let e=Math.round(n.videoWidth/4),r=Math.round(n.videoHeight/4);if(e===0||r===0||typeof document>"u")return null;try{let a=document.createElement("canvas");a.width=e,a.height=r;let s=a.getContext("2d");return s===null?null:(s.drawImage(n,0,0,e,r),a.toDataURL("image/jpeg",.7))}catch{return null}}h(rt,"sceneSnapshot");export{xt as DocumentCaptureView,Ge as LOCK_TRACE_MS,Le as guideRect,We as mrzInstruction,tt as slotOf};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as K}from"./chunk-5JPJXBN6.js";import{a as O,b as U,c as z}from"./chunk-H2KIOYQU.js";import{a as G}from"./chunk-R2D6V2R6.js";import{d as h}from"./chunk-Y4PPDNQR.js";import{a as E}from"./chunk-LZU57LVO.js";import{a,b as f,o as V}from"./chunk-PXRIFHY2.js";import{isValidNni as oe,normalizeNni as _}from"@sekyro/web";import{useEffect as x,useId as re,useRef as W,useState as N}from"react";import{Fragment as R,jsx as i,jsxs as l}from"react/jsx-runtime";var Y={en:U,fr:z,ar:O},$=6,de=new Set(["eid_identifier_invalid","eid_code_invalid","eid_locked","eid_not_enrolled"]),q=a((e,o)=>{if(e===void 0)return 0;let p=Date.parse(e)-o;return Number.isFinite(p)?Math.max(0,Math.ceil(p/1e3)):0},"secondsUntil"),se=a(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss");function be({step:e,i18n:o,className:p,onError:J}){let A=o.strings,n=a((t,d)=>h(A[t]??Y[o.locale][t]??"",d),"t"),B=a((t,d)=>{let ne=new Intl.PluralRules(o.locale).select(d),L=`${t}.${ne}`,te=A[L]??Y[o.locale][L]??n(`${t}.other`);return h(te,{count:new Intl.NumberFormat(o.locale).format(d)})},"plural"),y=a(t=>e.providerName?n(`eid.${t}`,{provider:e.providerName}):n(`eid.${t}Generic`),"named"),[C,Q]=N(""),[g,w]=N(""),[c,I]=N(!1),[v,u]=N(null),r=e.phase==="code",P=K(r),s=re(),X=V(),m=a(async t=>{I(!0),u(null);try{await t()}catch(d){u(G(d,o.strings)),J?.(d)}finally{I(!1)}},"run"),D=W(!1);x(()=>{!e.identifierBound||r||e.reason!==void 0||D.current||(D.current=!0,m(()=>e.start()))},[e.identifierBound,r,e.reason]),x(()=>{(e.reason==="eid_code_invalid"||e.codeExpiresAt!==void 0)&&w("")},[e.reason,e.codeExpiresAt,e.codeAttemptsRemaining]);let F=W(r);x(()=>{r&&!F.current&&document.getElementById(`${s}-code`)?.focus(),F.current=r},[r,s]);let k=e.reason==="eid_locked",M=q(e.codeExpiresAt,P),T=r&&e.codeExpiresAt!==void 0&&M===0,S=q(e.resendAvailableAt,P),H=e.resendsRemaining===0||e.reason==="eid_resend_limit",Z=a(t=>{if(t.preventDefault(),r){g.length===$&&!k&&m(()=>e.verify(g));return}if(e.identifierBound){m(()=>e.start());return}let d=_(C);if(e.country==="MR"){if(!/^\d{10}$/.test(d))return u("population.invalid");if(!oe(d))return u("population.reason_nni_invalid")}m(()=>e.start(d))},"onSubmit"),b=e.reason?.startsWith("eid_")?e.reason:void 0,j=l(R,{children:[b!==void 0?l(E,{tone:de.has(b)?"danger":"warning",children:[i("span",{children:n(`reasons.${b}`)}),b==="eid_code_invalid"&&e.codeAttemptsRemaining!==void 0?i("span",{children:B("eid.codeAttemptsRemaining",e.codeAttemptsRemaining)}):null,e.canUseCamera?i(f,{kind:"ghost",disabled:c,onClick:()=>{m(()=>e.useCamera())},children:n("eid.useCamera")}):null]}):null,v!==null?i(E,{tone:"danger",children:i("span",{children:o.t(v)})}):null]}),[ee,ie]=r?[y("codeTitle"),y("codeHelp")]:[y("identifierTitle"),y(e.identifierBound?"boundDescription":"identifierDescription")];return l("form",{className:`sekyro-stack sekyro-stack--4 sekyro-otp${p?` ${p}`:""}`,"aria-labelledby":s,onSubmit:Z,noValidate:!0,"data-testid":"sekyro-eid",children:[l("div",{className:"sekyro-stack sekyro-stack--1",children:[i("h2",{id:s,ref:X,tabIndex:-1,className:"sekyro-text-body",children:ee}),i("p",{className:"sekyro-text-muted",children:ie}),e.afterPass==="continue"?i("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:e.providerName?n("eid.continueHint",{provider:e.providerName}):n("eid.continueHintGeneric")}):null]}),j,r?l(R,{children:[l("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${s}-code`,children:n("eid.codeLabel")}),i("input",{id:`${s}-code`,className:"sekyro-input sekyro-input--code",dir:"ltr",inputMode:"numeric",autoComplete:"one-time-code",value:g,disabled:k,onChange:t=>{u(null),w(_(t.target.value).replace(/\D/g,"").slice(0,$))}})]}),l("div",{className:"sekyro-row",children:[e.codeExpiresAt!==void 0?i("span",{className:"sekyro-text-muted",children:T?n("eid.expired"):n("eid.expiresIn",{time:se(M)})}):null,H?i("span",{className:"sekyro-text-muted",children:n("eid.noResendsLeft")}):i(f,{kind:"ghost",disabled:c||S>0||k,onClick:()=>{m(()=>e.resend())},children:S>0?n("eid.resendIn",{seconds:S}):n("eid.resend")})]}),!H&&e.resendsRemaining!==void 0?i("p",{className:"sekyro-text-muted",children:B("eid.resendsRemaining",e.resendsRemaining)}):null,i("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:T?n("eid.expired"):""}),i(f,{type:"submit",full:!0,disabled:c||g.length!==$||k,"aria-busy":c||void 0,children:n("eid.verify")})]}):l(R,{children:[e.identifierBound?null:l("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${s}-nni`,children:o.t("population.label")}),i("input",{id:`${s}-nni`,className:"sekyro-input sekyro-mono",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o.t("population.placeholder"),value:C,"aria-describedby":`${s}-nni-help`,"aria-invalid":v==="population.invalid"||v==="population.reason_nni_invalid"||void 0,onChange:t=>{u(null),Q(_(t.target.value).replace(/\D/g,"").slice(0,10))}}),i("span",{id:`${s}-nni-help`,className:"sekyro-help",children:o.t("population.helper")})]}),i(f,{type:"submit",full:!0,disabled:c,"aria-busy":c||void 0,children:n("eid.start")})]})]})}a(be,"EidView");export{be as EidView};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as R}from"./chunk-4ENKV24I.js";import{a as A}from"./chunk-5JPJXBN6.js";import{a as w}from"./chunk-R2D6V2R6.js";import{d as z}from"./chunk-Y4PPDNQR.js";import{a as V,b as h}from"./chunk-2PGJ7P7E.js";import{a as f,b as $}from"./chunk-LZU57LVO.js";import{a as s,b as _}from"./chunk-PXRIFHY2.js";import{OtpInputError as G}from"@sekyro/web";import{useId as K,useState as O}from"react";var L={"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":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا"};var P={"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 verification 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 in a moment","emailOtp.reason_otp_rate_limited":"Too many codes requested. Wait a moment, then try again","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"};var D={"emailOtp.sendTitle":"Vérifiez votre adresse 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 de vérification","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 dans un instant","emailOtp.reason_otp_rate_limited":"Trop de codes demandés. Patientez un instant, puis réessayez","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"};import{Fragment as b,jsx as i,jsxs as o}from"react/jsx-runtime";var J={en:P,fr:D,ar:L},H=s((e,n)=>{if(e===void 0)return 0;let d=Date.parse(e)-n;return Number.isFinite(d)?Math.max(0,Math.ceil(d/1e3)):0},"secondsUntil"),Q=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),X=new Set(["otp_expired","otp_send_failed","otp_rate_limited","email_invalid","email_disposable"]);function ue({step:e,i18n:n,className:d,defaultEmail:S="",onError:W}){let a=s((t,p)=>z(n.strings[t]??J[n.locale][t],p),"t"),[y,M]=O(S),[c,q]=O(""),[r,g]=O(!1),[E,N]=O(null),m=e.phase==="verify",x=A(m),l=K(),k=s(async t=>{g(!0),N(null);try{await t()}catch(p){N(p instanceof G&&p.field==="email"?a("emailOtp.emailInvalid"):n.t(w(p,n.strings))),W?.(p)}finally{g(!1)}},"run"),T=s(t=>{k(()=>e.send(e.needsEmail&&(!t||y!==S)?{email:y}:{}))},"send"),I=s(t=>{k(()=>e.verify(t))},"submitCode"),F=s(t=>{t.preventDefault(),m?I(c):T(!1)},"onSubmit"),C=H(e.codeExpiresAt,x),v=H(e.resendAvailableAt,x),u=m&&e.codeExpiresAt!==void 0&&C===0,[B,U]=a("emailOtp.sentTo").split("{email}"),Y=e.reason==="otp_mismatch"?o(f,{tone:"danger",children:[i("span",{children:a("emailOtp.reason_otp_mismatch")}),i("span",{children:$(n,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&X.has(e.reason)?i(f,{tone:"warning",children:i("span",{children:a(`emailOtp.reason_${e.reason}`)})}):null;return o("form",{className:`sekyro-step sekyro-otp${d?` ${d}`:""}`,"aria-labelledby":l,onSubmit:F,noValidate:!0,children:[i(V,{id:l,title:a(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m?o(b,{children:[B,i("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),U]}):a("emailOtp.sendDescription")}),Y,E!==null?i(f,{tone:"danger",children:i("span",{children:E})}):null,m?o(b,{children:[o("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${l}-code`,children:a("emailOtp.codeLabel")}),i(R,{id:`${l}-code`,value:c,invalid:e.reason==="otp_mismatch",onChange:t=>{q(t),t.length===6&&c.length!==6&&!r&&!e.attemptsExhausted&&I(t)}}),i("span",{className:`sekyro-help sekyro-otp-expiry${u?" is-danger":""}`,"aria-hidden":!u||void 0,children:u?a("emailOtp.expired"):a("emailOtp.expiresIn",{time:Q(C)})})]}),i("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:u?a("emailOtp.expired"):""}),o(h,{children:[i(_,{type:"submit",full:!0,disabled:r||c.length!==6,"aria-busy":r||void 0,children:a("emailOtp.verify")}),i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r||v>0,onClick:()=>T(!0),children:v>0?a("emailOtp.resendIn",{seconds:v}):a("emailOtp.resend")})]})]}):o(b,{children:[e.needsEmail?o("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${l}-email`,children:a("emailOtp.emailLabel")}),i("input",{id:`${l}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:a("emailOtp.emailPlaceholder"),value:y,"aria-describedby":`${l}-email-help`,onChange:t=>M(t.target.value)}),i("span",{id:`${l}-email-help`,className:"sekyro-help",children:a("emailOtp.emailHelper")})]}):i("p",{className:"sekyro-text-muted",children:a("emailOtp.prefilledNotice")}),i(h,{children:i(_,{type:"submit",full:!0,disabled:r,"aria-busy":r||void 0,children:a("emailOtp.send")})})]})]})}s(ue,"EmailOtpView");export{ue as EmailOtpView};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as B,b as F,c as S,d as K}from"./chunk-OSS4NHIS.js";import{d as A,g as T}from"./chunk-ZVSRJKQE.js";import{a as E,b as U,c as H}from"./chunk-H2KIOYQU.js";import"./chunk-R2D6V2R6.js";import{d as z}from"./chunk-Y4PPDNQR.js";import"./chunk-36RC3M4K.js";import{a as q}from"./chunk-2CJEADGY.js";import"./chunk-2PGJ7P7E.js";import{a as I}from"./chunk-LZU57LVO.js";import{a as p,b as v,o as C}from"./chunk-PXRIFHY2.js";import{useEffect as D,useId as O,useMemo as N,useRef as me,useState as V}from"react";var Y={"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.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":"المتابعة هنا على أي حال"};var G={"choice.title":"How do you want to continue?","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"How do you want to get 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.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 this page 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"};var $={"choice.title":"Comment voulez-vous continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Comment voulez-vous recevoir 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.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 cette page dans votre 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"};var M=[[10,[[1,16]]],[16,[[1,28]]],[26,[[1,44]]],[18,[[2,32]]],[24,[[2,43]]],[16,[[4,27]]],[18,[[4,31]]],[22,[[2,38],[2,39]]],[22,[[3,36],[2,37]]],[26,[[4,43],[1,44]]],[30,[[1,50],[4,51]]],[22,[[6,36],[2,37]]],[22,[[8,37],[1,38]]],[24,[[4,40],[5,41]]],[24,[[5,41],[5,42]]],[28,[[7,45],[3,46]]],[28,[[10,46],[1,47]]],[26,[[9,43],[4,44]]],[26,[[3,44],[11,45]]],[26,[[3,41],[13,42]]]],Q=M.length,oe=0,R=p(e=>(M[e-1]?.[1]??[]).reduce((t,[n,o])=>t+n*o,0),"dataCapacity");function L(e,t){let n=0;for(let o=7;o>=0;o-=1)n=n<<1^(n>>>7)*285,n^=(t>>>o&1)*e;return n&255}p(L,"gfMul");function ne(e){let t=new Array(e).fill(0);t[e-1]=1;let n=1;for(let o=0;o<e;o+=1){for(let i=0;i<e;i+=1)t[i]=L(t[i],n),i+1<e&&(t[i]=t[i]^t[i+1]);n=L(n,2)}return t}p(ne,"rsDivisor");function re(e,t){let n=t.map(()=>0);for(let o of e){let i=o^n.shift();n.push(0),t.forEach((a,s)=>{n[s]=n[s]^L(a,i)})}return n}p(re,"rsRemainder");function ie(e,t){let n=[],o=p((l,m)=>{for(let b=m-1;b>=0;b-=1)n.push(l>>>b&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let l of e)o(l,8);let i=R(t)*8;o(0,Math.min(4,i-n.length)),o(0,(8-n.length%8)%8);let a=[];for(let l=0;l<n.length;l+=8)a.push(n.slice(l,l+8).reduce((m,b)=>m<<1|b,0));for(let l=236;a.length<R(t);l^=253)a.push(l);let[s,r]=M[t-1],c=ne(s),u=[],f=0;for(let[l,m]of r)for(let b=0;b<l;b+=1){let w=a.slice(f,f+m);f+=m,u.push({data:w,ec:re(w,c)})}let h=[],y=Math.max(...u.map(l=>l.data.length));for(let l=0;l<y;l+=1)for(let m of u)l<m.data.length&&h.push(m.data[l]);for(let l=0;l<s;l+=1)for(let m of u)h.push(m.ec[l]);return h}p(ie,"codewords");function ae(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=Math.ceil((e*4+4)/(t*2-2))*2,o=[6];for(let i=e*4+10;o.length<t;i-=n)o.splice(1,0,i);return o}p(ae,"alignmentPositions");var se=[(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],_=class _{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,n,o){this.dark[t*this.size+n]=o,this.fixed[t*this.size+n]=!0}get(t,n){return this.dark[t*this.size+n]===!0}};p(_,"Grid");var P=_;function ce(e,t){let n=e.size;for(let a=0;a<n;a+=1)e.set(6,a,a%2===0),e.set(a,6,a%2===0);for(let[a,s]of[[3,3],[3,n-4],[n-4,3]])for(let r=-4;r<=4;r+=1)for(let c=-4;c<=4;c+=1){let u=a+r,f=s+c;if(u<0||u>=n||f<0||f>=n)continue;let h=Math.max(Math.abs(r),Math.abs(c));e.set(u,f,h!==2&&h!==4)}let o=ae(t),i=o.length-1;if(o.forEach((a,s)=>o.forEach((r,c)=>{if(!(s===0&&c===0||s===0&&c===i||s===i&&c===0))for(let u=-2;u<=2;u+=1)for(let f=-2;f<=2;f+=1)e.set(a+u,r+f,Math.max(Math.abs(u),Math.abs(f))!==1)})),W(e,0),t>=7){let a=t;for(let r=0;r<12;r+=1)a=a<<1^(a>>>11)*7973;let s=t<<12|a;for(let r=0;r<18;r+=1){let c=(s>>>r&1)===1,u=n-11+r%3,f=Math.floor(r/3);e.set(u,f,c),e.set(f,u,c)}}}p(ce,"drawFunctionPatterns");function W(e,t){let n=e.size,o=oe<<3|t,i=o;for(let r=0;r<10;r+=1)i=i<<1^(i>>>9)*1335;let a=(o<<10|i)^21522,s=p(r=>(a>>>r&1)===1,"bit");for(let r=0;r<=5;r+=1)e.set(r,8,s(r));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let r=9;r<15;r+=1)e.set(8,14-r,s(r));for(let r=0;r<8;r+=1)e.set(8,n-1-r,s(r));for(let r=8;r<15;r+=1)e.set(n-15+r,8,s(r));e.set(n-8,8,!0)}p(W,"drawFormat");function ue(e,t){let n=e.size,o=0;for(let i=n-1;i>=1;i-=2){i===6&&(i=5);for(let a=0;a<n;a+=1)for(let s=0;s<2;s+=1){let r=i-s,u=(i+1&2)===0?n-1-a:a;e.fixed[u*n+r]!==!0&&(o<t.length*8&&(e.dark[u*n+r]=(t[o>>>3]>>>7-(o&7)&1)===1),o+=1)}}}p(ue,"placeData");function le(e,t){let n=se[t];for(let o=0;o<e.size;o+=1)for(let i=0;i<e.size;i+=1)e.fixed[o*e.size+i]!==!0&&n(o,i)&&(e.dark[o*e.size+i]=!e.dark[o*e.size+i])}p(le,"applyMask");function pe(e){let t=e.size,n=0,o=p(a=>{let s=1;for(let r=1;r<=t;r+=1)r<t&&a(r)===a(r-1)?s+=1:(s>=5&&(n+=3+(s-5)),s=1);for(let r=0;r+10<t;r+=1){let c=[!0,!1,!0,!0,!0,!1,!0];if(!(c.every((y,l)=>a(r+l)===y)||c.every((y,l)=>a(r+4+l)===y)))continue;let f=[0,1,2,3].every(y=>!a(r+y))&&c.every((y,l)=>a(r+4+l)===y),h=c.every((y,l)=>a(r+l)===y)&&[7,8,9,10].every(y=>!a(r+y));f&&(n+=40),h&&(n+=40)}},"line");for(let a=0;a<t;a+=1)o(s=>e.get(a,s));for(let a=0;a<t;a+=1)o(s=>e.get(s,a));for(let a=0;a+1<t;a+=1)for(let s=0;s+1<t;s+=1){let r=e.get(a,s);r===e.get(a,s+1)&&r===e.get(a+1,s)&&r===e.get(a+1,s+1)&&(n+=3)}let i=e.dark.filter(Boolean).length;return n+=Math.floor(Math.abs(i*20-t*t*10)/(t*t))*10,n}p(pe,"penalty");function j(e,t={}){let n=new TextEncoder().encode(e),o=1;for(;o<=Q&&!(4+(o<10?8:16)+n.length*8<=R(o)*8);o+=1);if(o>Q)throw new RangeError("text too long for a QR code");let i=ie(n,o),a=p(c=>{let u=new P(o*4+17);return ce(u,o),ue(u,i),le(u,c),W(u,c),u},"build"),s=null;if(t.mask!==void 0)s=a(t.mask);else{let c=Number.POSITIVE_INFINITY;for(let u=0;u<8;u+=1){let f=a(u),h=pe(f);h<c&&(c=h,s=f)}}let r=s;return{size:r.size,get:p((c,u)=>r.get(c,u),"get")}}p(j,"encodeQr");function X(e,t=4){let n=[];for(let o=0;o<e.size;o+=1)for(let i=0;i<e.size;i+=1)e.get(o,i)&&n.push(`M${i+t} ${o+t}h1v1h-1z`);return{size:e.size+t*2,d:n.join("")}}p(X,"qrPath");import{jsx as d,jsxs as k}from"react/jsx-runtime";var de={en:G,fr:$,ar:Y},J={en:U,fr:H,ar:E};function g(e){let t=e.strings;return(n,o)=>z(t[n]??de[e.locale][n]??"",o)}p(g,"flowT");function Z(e,t){let n=g(t);return e.flatMap(o=>{let i=o.service==="phone_otp"?n("contact.phone"):o.service==="email_otp"?n("contact.email"):F(o,t),a=B[o.service];return i===null?[]:[{id:o.id,label:i,...a!==void 0?{glyph:d(q,{name:a})}:{}}]})}p(Z,"labelled");function ee({step:e,i18n:t,onError:n}){let o=g(t),{busy:i,error:a,run:s}=S(t,n),r=e.kind==="contact_choice";return d(A,{title:o(r?"contact.title":"choice.title"),description:o(r?"contact.description":"choice.description"),options:Z(e.choice.options,t),busy:i,error:a,focus:!0,testId:r?"sekyro-contact-choice":"sekyro-choice",onChoose:c=>s(()=>e.choose(c))})}p(ee,"PlanChoiceView");var Ue=ee,He=ee;function Be({step:e,i18n:t,onError:n,onOpen:o}){let i=g(t),{busy:a,error:s,run:r}=S(t,n),c=e,u=e.context.switchable,f=u===void 0?[]:u.options.filter(w=>w.id!==u.current),h=c.kind==="registry"&&c.reason==="nni_not_found"&&c.canUseDocument||c.kind==="eid"&&c.reason?.startsWith("eid_")&&c.canUseCamera,y=f.length===1?f[0]:void 0,l=y!==void 0&&(y.service==="phone_otp"||y.service==="email_otp"),m=l&&c.canSwitch&&c.switchTo!==void 0?()=>c.switchTo.call(e):c.chooseOption===void 0||y===void 0?void 0:()=>c.chooseOption.call(e,y.id);if(f.length===0||h||y!==void 0&&(m===void 0||b()===null)||y===void 0&&c.chooseOption===void 0)return null;function b(){return y===void 0?i("choice.switch"):y.service==="phone_otp"||y.service==="email_otp"?i("contact.switch"):c.kind==="registry"&&y.service==="document"?t.t("population.useDocument"):c.kind==="eid"?t.strings["eid.useCamera"]??J[t.locale]["eid.useCamera"]:F(y,t)}return p(b,"labelOf"),k("div",{className:"sekyro-stack sekyro-stack--1",children:[s!==null?d(I,{tone:"danger",children:d("span",{children:s})}):null,d(v,{kind:"ghost",disabled:a,"aria-busy":a||void 0,onClick:()=>m===void 0?o():r(m),"data-testid":l?"sekyro-contact-switch":"sekyro-lane-switch",children:b()})]})}p(Be,"LaneSwitch");function qe({step:e,i18n:t,onError:n,onClose:o}){let i=g(t),{busy:a,error:s,run:r}=S(t,n),c=e.context.switchable,u=e.chooseOption;return c===void 0||u===void 0?null:d(A,{title:i("choice.title"),description:i("choice.description"),options:Z(c.options,t),...c.current!==null?{marked:c.current}:{},busy:a,error:s,focus:!0,testId:"sekyro-lane-choice",onChoose:f=>f===c.current?o():r(()=>u.call(e,f))})}p(qe,"LaneChoiceView");var fe=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["nniMasked","summary.nni",!0],["expiryDate","summary.expiryDate",!0]];function ye(e){let[t,n]=V(null);return D(()=>{if(!e.portraitAvailable)return;let o=!0,i=null;return e.portrait().then(a=>{!o||a===null||!a.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(i=URL.createObjectURL(a),n(i))}),()=>{o=!1,i!==null&&URL.revokeObjectURL(i)}},[e.portraitAvailable]),t}p(ye,"usePortraitUrl");function Ke({step:e,i18n:t,onError:n}){let o=g(t),i=O(),a=C(),s=ye(e),{busy:r,error:c,run:u}=S(t,n),f=e.context.orgName,h=["registry","document","chip"].find(m=>m===e.source),y=e.summaryKind==="partial",l=p(m=>t.strings[`doc.type.${m}`]??m,"documentLabel");return k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":i,"data-testid":"sekyro-identity-summary",children:[k("div",{className:"sekyro-stack sekyro-stack--1",children:[d("h2",{id:i,ref:a,tabIndex:-1,className:"sekyro-text-body",children:o("summary.title")}),d("p",{className:"sekyro-text-muted",children:o("summary.description")}),h!==void 0?d("p",{className:"sekyro-text-muted",children:o(`summary.source.${h}`)}):null]}),k("div",{className:"sekyro-summary",children:[s!==null?d("img",{className:"sekyro-summary__portrait",src:s,alt:o("summary.portraitAlt")}):null,d("dl",{className:"sekyro-summary__list",children:fe.map(([m,b,w])=>{let x=e[m];return x===void 0?null:k("div",{className:"sekyro-summary__row",children:[d("dt",{className:"sekyro-text-muted",children:o(m==="fullName"&&y?"summary.name":b)}),d("dd",{children:w?d("bdi",{dir:"ltr",children:x}):m==="documentType"?l(x):x})]},m)})})]}),c!==null?d(I,{tone:"danger",children:d("span",{children:c})}):null,k("div",{className:"sekyro-stack sekyro-stack--3",children:[d(v,{full:!0,disabled:r,"aria-busy":r||void 0,onClick:()=>u(()=>e.confirm()),children:o("summary.confirm")}),e.retakeAvailable?d(v,{kind:"ghost",full:!0,disabled:r,onClick:()=>u(()=>e.retake()),children:o(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):d("p",{className:"sekyro-text-muted",children:o("summary.noRetake",{org:f})})]})]})}p(Ke,"IdentitySummaryView");var he=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Ye({step:e,i18n:t,livenessProps:n,sekyroIntro:o}){let i=g(t),[a,s]=V(null);D(()=>e.onLivePhoto(m=>{let b=m.update?.coach;s(m.holding||b===void 0?null:t.t(`portrait.coach.${b}`))}),[e,t]);let r=e.instructions==="icao",c=e.icao?.profile==="selfie",u=N(()=>r?he.filter(m=>!c||m!=="background").map(m=>({id:m,text:i(`capture.tipsIcao.${m}`)})):void 0,[r,c,t]),f=N(()=>r&&!c?{...n.strings,"capture.tips.title":i("capture.tipsIcao.title")}:n.strings,[r,c,n.strings,t]),h=c?void 0:i("capture.tipsIcao.title"),y=N(()=>o===!0&&u!==void 0?{...n.slots,intro:p((m,b)=>d(K,{start:m,context:b,tips:u,...h!==void 0?{tipsTitle:h}:{}}),"intro")}:n.slots,[o,u,h,n.slots,t]),l=c?`${(u??[]).map(m=>m.text).join(". ")}.`:i("capture.tipsIcao.summary");return d(T,{...n,...y!==void 0?{slots:y}:{},...f!==void 0?{strings:f}:{},...u!==void 0?{tips:u,tipsSummary:l}:{},coach:a})}p(Ye,"LivePhotoLiveness");function Ge({i18n:e}){let t=g(e);return k(I,{tone:"info",children:[d("strong",{children:t("portrait.retakeOnly")}),d("span",{children:t("portrait.keepCamera")})]})}p(Ge,"PortraitRetakeNotice");function $e({i18n:e,provider:t}){let n=e.strings,o=p(i=>n[i]??J[e.locale][i]??"","pick");return d("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?z(o("eid.continueHint"),{provider:t}):o("eid.continueHintGeneric")})}p($e,"EidContinueHint");async function be(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}p(be,"copy");function te({url:e,i18n:t,label:n}){let o=g(t),[i,a]=V("idle"),s=n.startsWith("inApp.")?"inApp":"handoff";return k("div",{className:"sekyro-stack sekyro-stack--1",children:[d(v,{kind:"ghost",onClick:()=>{be(e).then(r=>a(r?"copied":"failed"))},children:o(n)}),d("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:i==="idle"?"":o(`${s}.${i==="copied"?"copied":"copyFailed"}`)})]})}p(te,"CopyLink");function Qe({url:e,i18n:t,refresh:n,footer:o}){let i=g(t),a=O(),s=N(()=>{try{return X(j(e))}catch{return null}},[e]),r=me(n);r.current=n;let c=C();return D(()=>{let u=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&r.current?.().catch(()=>{})},5e3);return()=>clearInterval(u)},[]),k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":a,"data-testid":"sekyro-handoff",children:[d("h2",{id:a,ref:c,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),d("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"),shapeRendering:"crispEdges",children:[d("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),d("path",{d:s.d,className:"sekyro-qr__fg"})]}):null,d(te,{url:e,i18n:t,label:"handoff.copyLink"}),d("p",{className:"sekyro-text-muted",children:i("handoff.waiting")}),o??null]})}p(Qe,"HandoffView");function We({url:e,i18n:t,onContinue:n}){let o=g(t),i=O(),a=C();return k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":i,"data-testid":"sekyro-in-app",children:[d("h2",{id:i,ref:a,tabIndex:-1,className:"sekyro-text-body",children:o("inApp.title")}),d("p",{className:"sekyro-text-muted",children:o("inApp.description")}),d(te,{url:e,i18n:t,label:"inApp.copyLink"}),d(v,{kind:"ghost",onClick:n,children:o("inApp.continueAnyway")})]})}p(We,"InAppBrowserPrompt");export{Ue as ContactChoiceView,$e as EidContinueHint,He as GenericChoiceView,Qe as HandoffView,Ke as IdentitySummaryView,We as InAppBrowserPrompt,qe as LaneChoiceView,Be as LaneSwitch,Ye as LivePhotoLiveness,Ge as PortraitRetakeNotice};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as R}from"./chunk-ZTN4YV7S.js";import{b as M,c as G}from"./chunk-36RC3M4K.js";import"./chunk-2CJEADGY.js";import{c as L}from"./chunk-2PGJ7P7E.js";import{a as d,b as T}from"./chunk-LZU57LVO.js";import{a as s,b as C,o as B}from"./chunk-PXRIFHY2.js";import{useContext as J,useEffect as Q,useRef as $,useState as p}from"react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var S=["pose","eyes","mouth","lighting","background","resolution"];function nt({step:r,i18n:m,assetBaseUrl:v}){let{t:e}=m,b=$(null),l=$(null),[n,U]=p("idle"),[f,w]=p(null),[F,g]=p(null),[N,I]=p({facing:"user",assisted:!1}),{canChooseFacing:V}=G(),A=B(),P=J(L);Q(()=>{let a=b.current;if(a===null)return;let o=r.capture({video:a,...v!==void 0?{assetBaseUrl:v}:{}});l.current=o;let u=s(()=>I({facing:o.facingMode??"user",assisted:o.captureMode==="assisted"}),"readCamera");u();let D=[o.on("state",k=>{u(),U(k)}),o.on("gate",w),o.on("error",g)];return o.start().catch(()=>{}),()=>{for(let k of D)k();o.destroy(),l.current=null}},[]);let E=n==="uploading"||n==="checking",c=n==="done",O=c&&r.reason!==void 0&&!r.uploadFailed,_=n==="starting"||n==="idle"?"portrait.starting":n==="captured"?"portrait.taken":n==="uploading"?"portrait.uploading":n==="checking"?"portrait.checking":`portrait.coach.${f?.coach??"no_face"}`,K=(r.report??[]).filter(a=>!a.pass),y=r.reason!==void 0?`reasons.${r.reason}`:null,x=s(()=>{g(null),l.current?.retry()},"retake"),h=s(a=>{let o=f?.criteria.find(u=>u.criterion===a);return o!==void 0&&(o.held||o.waived)},"met"),j=f?.ready||n==="captured"||E?1:S.filter(h).length/S.length,H=y!==null&&(n==="gating"||O),q=N.assisted&&V&&(n==="starting"||n==="gating"||n==="error"),z=s(()=>{let a=l.current;a?.switchCamera()===!0&&(g(null),w(null),I({facing:a.facingMode??"user",assisted:!0}))},"switchCamera");return i(R,{testId:"sekyro-portrait",video:t("video",{ref:b,className:`sekyro-lm-video sekyro-fc-video${N.facing==="environment"?" is-rear":""}`,playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),instruction:e(_),progress:j,closeLabel:e("native.close"),...P!==void 0?{onClose:P}:{},...q?{end:t("button",{type:"button",className:"sekyro-glass",onClick:z,"aria-label":e("capture.switchCamera"),"data-testid":"sekyro-portrait-switch",children:t(M,{})})}:{},children:[t("h2",{ref:A,tabIndex:-1,className:"sekyro-visually-hidden",children:e(r.reason!==void 0?"portrait.retryTitle":"session.steps.portrait.title")}),H||F!==null||c&&(r.uploadFailed||!r.attemptsExhausted)?i("div",{className:"sekyro-fc-panel",children:[H?i(d,{tone:"warning",children:[t("span",{children:m.strings[y]!==void 0?e(y):e("portrait.retryTitle")}),K.length>0?i("span",{children:[e("portrait.reportTitle"),": ",K.map(a=>e(`portrait.report.${a.criterion}`)).join(", ")]}):null,t("span",{children:T(m,r.attemptsRemaining,r.attemptsExhausted)})]}):null,F!==null?i(d,{tone:"danger",children:[t("span",{children:e("portrait.cameraBlocked")}),t("span",{children:e("portrait.cameraBlockedHint")}),t(C,{kind:"ghost",onClick:x,children:e("portrait.retryCamera")})]}):null,r.uploadFailed&&c?t(d,{tone:"danger",children:t("span",{children:e("portrait.uploadFailed")})}):null,c&&!r.attemptsExhausted?t(C,{full:!0,onClick:x,disabled:E,children:e("portrait.retake")}):null]}):null,t("ul",{className:"sekyro-fc-checks","aria-label":e("portrait.checksLabel"),children:S.map(a=>i("li",{className:h(a)?"is-met":void 0,children:[t("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:t("svg",{viewBox:"0 0 18 18",children:t("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),t("span",{children:e(`portrait.criteria.${a}`)}),t("span",{className:"sekyro-visually-hidden",children:e(h(a)?"portrait.met":"portrait.notMet")})]},a))})]})}s(nt,"PortraitCaptureView");export{nt as PortraitCaptureView};
|