@sekyro/elements 0.1.0-rc.30 → 0.1.0-rc.31
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 +18 -0
- package/dist/cdn/chunks/{capture-session-doc-NJKFAWHW-5ISANLWB.js → capture-session-doc-2JNGYSH6-GFUM3RZY.js} +1 -1
- package/dist/cdn/chunks/challenge-frame-HTZ2ZBIE-5JRAFZOU.js +1 -0
- package/dist/cdn/chunks/chunk-44UA2IDQ.js +1 -0
- package/dist/cdn/chunks/{chunk-4GDGJEJ6.js → chunk-4MHDMYKP.js} +1 -1
- package/dist/cdn/chunks/chunk-5AGMJYMI.js +1 -0
- package/dist/cdn/chunks/{chunk-W2IBE5PM.js → chunk-5OPKZZON.js} +1 -1
- package/dist/cdn/chunks/chunk-6T7VBPLY.js +3 -0
- package/dist/cdn/chunks/{chunk-KEO772AF.js → chunk-7V3YMJPI.js} +1 -1
- package/dist/cdn/chunks/{chunk-XZKF2U76.js → chunk-AKU6DWJM.js} +1 -1
- package/dist/cdn/chunks/{chunk-GR6JK2ML.js → chunk-DO66BOHU.js} +1 -1
- package/dist/cdn/chunks/{chunk-2HKOE6CN.js → chunk-EB2QC3GA.js} +1 -1
- package/dist/cdn/chunks/chunk-EGCT7K5E.js +1 -0
- package/dist/cdn/chunks/{chunk-FOPIRIC2.js → chunk-HTIKUYTU.js} +1 -1
- package/dist/cdn/chunks/{chunk-IWRPGU4X.js → chunk-JICBF2XL.js} +1 -1
- package/dist/cdn/chunks/{chunk-JU4XNPJJ.js → chunk-LBEHJATK.js} +1 -1
- package/dist/cdn/chunks/chunk-PRZX4CTP.js +33 -0
- package/dist/cdn/chunks/{chunk-4H47RI64.js → chunk-PWGUNXYH.js} +1 -1
- package/dist/cdn/chunks/{chunk-52X5ZO4S.js → chunk-SOCYEC7N.js} +1 -1
- package/dist/cdn/chunks/{chunk-5KTQLZKN.js → chunk-SYUAQ7BF.js} +1 -1
- package/dist/cdn/chunks/{chunk-5JSOPXYS.js → chunk-T5IBMUSY.js} +1 -1
- package/dist/cdn/chunks/chunk-V6PELUV7.js +1 -0
- package/dist/cdn/chunks/{chunk-DEDYOTBZ.js → chunk-XVHJIXFH.js} +1 -1
- package/dist/cdn/chunks/{chunk-TBQUAM5Z.js → chunk-Y6MS7VVL.js} +1 -1
- package/dist/cdn/chunks/chunk-ZWGMVZWP.js +1 -0
- package/dist/cdn/chunks/create-document-capture-DNJSSCWA-M73L4ODE.js +1 -0
- package/dist/cdn/chunks/{create-portrait-capture-5VGYZUOK-KTCFCHTN.js → create-portrait-capture-3MHP4DGA-4XIQSUJ3.js} +1 -1
- package/dist/cdn/chunks/{document-capture-view-SCXJCJET-YFWA53XE.js → document-capture-view-RFBBBM3S-MO6WL377.js} +1 -1
- package/dist/cdn/chunks/{eid-view-F75DTWPK-AE6YBJNY.js → eid-view-XM5VHPPM-6KKXEHDA.js} +1 -1
- package/dist/cdn/chunks/{email-otp-view-T3NRXENJ-K6FY5XVU.js → email-otp-view-RQV5WU3T-TP222TAL.js} +1 -1
- package/dist/cdn/chunks/flow-views-GYVML5BT-MTJUSGHX.js +1 -0
- package/dist/cdn/chunks/{form-view-7NPB2AJE-TCOF3XPH.js → form-view-Z7ODA3GO-2R5H32O2.js} +1 -1
- package/dist/cdn/chunks/overlay-de-ZQRK2WPD-YEE555KF.js +1 -0
- package/dist/cdn/chunks/overlay-es-XSQAIH32-DCYWAHRS.js +1 -0
- package/dist/cdn/chunks/overlay-pt-2LMQDJ4F-EWEOFJ27.js +1 -0
- package/dist/cdn/chunks/plan-runner-JXCJC5MM-BF6RMCBJ.js +1 -0
- package/dist/cdn/chunks/{portrait-capture-view-4HUAQUIA-G3YLZEHM.js → portrait-capture-view-ZBOXEM6H-LSOMBP5R.js} +1 -1
- package/dist/cdn/chunks/{portrait-review-view-VKRWP4HK-6NZPPDWZ.js → portrait-review-view-BWCMLEID-JA7RWO6C.js} +1 -1
- package/dist/cdn/chunks/{proof-of-address-view-BXQ4O2CU-RFNWZRUP.js → proof-of-address-view-LW5RYD5I-Q3UXH6YT.js} +1 -1
- package/dist/cdn/chunks/session-events-W5DRVA6F-BNHYAEHE.js +8 -0
- package/dist/cdn/chunks/session-watch-7HMFAHQI-WNCXXNDK.js +1 -0
- package/dist/cdn/define.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/{chunk-Q47EK3FL.js → chunk-35LCXJCF.js} +1 -1
- package/dist/chunk-3DAPWPSR.js +1 -0
- package/dist/{chunk-2XRKOCPR.js → chunk-A5EHF3BR.js} +1 -1
- package/dist/{chunk-RSXZISUG.js → chunk-BA2AJKJM.js} +1 -1
- package/dist/{chunk-QDHTMKLS.js → chunk-CMJWPBX6.js} +1 -1
- package/dist/chunk-H7LR746C.js +33 -0
- package/dist/chunk-JGYTOIH7.js +1 -0
- package/dist/{chunk-ZG77WO25.js → chunk-JREXIOVU.js} +1 -1
- package/dist/{chunk-5MOE4EK4.js → chunk-QEDULGVW.js} +1 -1
- package/dist/{chunk-YHJQJMRS.js → chunk-SVNDR2JE.js} +1 -1
- package/dist/{chunk-7GCPE3LG.js → chunk-W4G27O4B.js} +1 -1
- package/dist/{chunk-SCZ22CNO.js → chunk-WQIU4I3K.js} +1 -1
- package/dist/{chunk-D2KOFFZS.js → chunk-YHNEYMR2.js} +1 -1
- package/dist/{chunk-L7NFG55Y.js → chunk-YLWJXCPT.js} +1 -1
- package/dist/define.cjs +5 -5
- package/dist/define.js +1 -1
- package/dist/{document-capture-view-SCXJCJET-WFZYQEU2.js → document-capture-view-RFBBBM3S-ZNPUP6QX.js} +1 -1
- package/dist/{eid-view-F75DTWPK-QMS64USC.js → eid-view-XM5VHPPM-XKR4NZTZ.js} +1 -1
- package/dist/{email-otp-view-T3NRXENJ-WF5ZRHQS.js → email-otp-view-RQV5WU3T-JY72E4XM.js} +1 -1
- package/dist/flow-views-GYVML5BT-WVKFYYSN.js +1 -0
- package/dist/{form-view-7NPB2AJE-5GEBWQJ7.js → form-view-Z7ODA3GO-2ONECUO5.js} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1 -1
- package/dist/overlay-de-ZQRK2WPD-FMRJWQQX.js +1 -0
- package/dist/overlay-es-XSQAIH32-VTIW3L6E.js +1 -0
- package/dist/overlay-pt-2LMQDJ4F-BB366XXI.js +1 -0
- package/dist/{portrait-capture-view-4HUAQUIA-LYTXJIEX.js → portrait-capture-view-ZBOXEM6H-PNCYH3WV.js} +1 -1
- package/dist/{portrait-review-view-VKRWP4HK-4XFARABZ.js → portrait-review-view-BWCMLEID-MAO4RY74.js} +1 -1
- package/dist/{proof-of-address-view-BXQ4O2CU-455UQJ3O.js → proof-of-address-view-LW5RYD5I-RDTH7FUR.js} +1 -1
- package/dist/styles.css +2 -1
- package/package.json +3 -3
- package/sbom.cdx.json +4 -4
- package/dist/cdn/chunks/challenge-frame-LWDSKM5K-J3CNO3XT.js +0 -1
- package/dist/cdn/chunks/chunk-GORELL4J.js +0 -1
- package/dist/cdn/chunks/chunk-IAPQGT6L.js +0 -1
- package/dist/cdn/chunks/chunk-JB27ZDFD.js +0 -1
- package/dist/cdn/chunks/chunk-KPUG7TMO.js +0 -33
- package/dist/cdn/chunks/chunk-LNE2P3TV.js +0 -1
- package/dist/cdn/chunks/chunk-RVL4N5KZ.js +0 -1
- package/dist/cdn/chunks/chunk-X6SULJS2.js +0 -3
- package/dist/cdn/chunks/create-document-capture-3DB2Y3GP-SMSQUDH2.js +0 -1
- package/dist/cdn/chunks/flow-views-TVG4PFSE-2UL4L6TO.js +0 -1
- package/dist/cdn/chunks/overlay-de-SYWE2LZE-AZG4RYMA.js +0 -1
- package/dist/cdn/chunks/overlay-es-D43QR7EF-ZODSTOP2.js +0 -1
- package/dist/cdn/chunks/overlay-pt-2YUWBZX7-UTMWWMN7.js +0 -1
- package/dist/cdn/chunks/plan-runner-432VPNQW-OBQFQCWK.js +0 -1
- package/dist/chunk-3SFLN33V.js +0 -1
- package/dist/chunk-4BQSPVSM.js +0 -33
- package/dist/chunk-CX7T4ADY.js +0 -1
- package/dist/flow-views-TVG4PFSE-OWVBXJ2R.js +0 -1
- package/dist/overlay-de-SYWE2LZE-QIFDHKT6.js +0 -1
- package/dist/overlay-es-D43QR7EF-FZNYZGGS.js +0 -1
- package/dist/overlay-pt-2YUWBZX7-4AFNZWV2.js +0 -1
package/dist/cdn/chunks/{email-otp-view-T3NRXENJ-K6FY5XVU.js → email-otp-view-RQV5WU3T-TP222TAL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as G,b as J,c as K}from"./chunk-KEO772AF.js";import{a as Y}from"./chunk-XZKF2U76.js";import{a as B}from"./chunk-RVL4N5KZ.js";import"./chunk-X6SULJS2.js";import"./chunk-4H47RI64.js";import{A as P,H as j,K as h,L as U,a as de,b as me,c as x,w as F,y as T}from"./chunk-2HKOE6CN.js";import{G as W}from"./chunk-LNE2P3TV.js";import"./chunk-W2IBE5PM.js";import"./chunk-GORELL4J.js";import"./chunk-P7K7ELYZ.js";import{a as n}from"./chunk-5QL6W6FW.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as p,c as A}from"./chunk-4FHWXBOB.js";var s=A(de(),1),e=A(me(),1);var pe={"emailOtp.reason_otp_daily_cap_reached":"لا يمكننا إرسال رمز إلى بريدك الإلكتروني اليوم. اختر طريقة أخرى للتحقق إن كانت متاحة، أو حاول مرة أخرى لاحقًا.","emailOtp.reason_payment_method_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_spend_cap_reached":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_insufficient_balance":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_account_verification_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"عنوان بريدك الإلكتروني","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا","emailOtp.send":"أرسل لي رمزًا عبر البريد الإلكتروني","emailOtp.verifyTitle":"أدخل الرمز","emailOtp.verifyDescription":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إلى بريدك الإلكتروني لإتمام التحقّق من عنوانك","emailOtp.sentTo":"أرسلنا رمزًا مكوّنًا من 6 أرقام إلى {email}","emailOtp.codeLabel":"رمز التحقّق","emailOtp.codeHelper":"أدخل الرمز المكوّن من 6 أرقام الوارد في الرسالة","emailOtp.verify":"تحقّق من الرمز","emailOtp.resend":"إعادة إرسال الرمز","emailOtp.resendIn":"إعادة إرسال الرمز خلال {seconds} ثانية","emailOtp.expiresIn":"ينتهي الرمز خلال {time}","emailOtp.expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد","emailOtp.reason_otp_mismatch":"الرمز غير صحيح. تحقّق منه وأعد إدخاله","emailOtp.reason_otp_expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد للمتابعة","emailOtp.reason_otp_send_failed":"تعذّر إرسال الرسالة. أعد المحاولة لاحقًا. إذا تكرر ذلك، فتواصل مع الجهة التي طلبت منك التحقق.","emailOtp.reason_otp_rate_limited":"طُلبت رموز كثيرة لهذا العنوان. أعد المحاولة لاحقًا أو أدخل عنوانًا آخر.","emailOtp.reason_email_invalid":"لا يمكننا الإرسال إلى هذا العنوان. تحقّق منه أو أدخل عنوانًا آخر","emailOtp.reason_email_disposable":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا","emailOtp.changeEmail":"تغيير البريد الإلكتروني","emailOtp.backToCode":"العودة إلى الرمز","emailOtp.reason_otp_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك"},b={"emailOtp.reason_otp_daily_cap_reached":"We can't email you a code today. Choose another way to verify if one is offered, or try again later.","emailOtp.reason_payment_method_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_spend_cap_reached":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_insufficient_balance":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_account_verification_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.sendTitle":"Verify your email address","emailOtp.sendDescription":"We'll email you a one-time code to confirm this address is yours","emailOtp.prefilledNotice":"We'll send a verification code to your registered email address.","emailOtp.emailLabel":"Email address","emailOtp.emailHelper":"We'll send a one-time code to this address","emailOtp.emailPlaceholder":"Your email address","emailOtp.emailInvalid":"Enter a valid email address","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the code","emailOtp.verifyDescription":"Type the 6-digit code we emailed you to finish verifying your address","emailOtp.sentTo":"We sent a 6-digit code to {email}","emailOtp.codeLabel":"Verification code","emailOtp.codeHelper":"Enter the 6-digit code from the email","emailOtp.verify":"Verify code","emailOtp.resend":"Resend code","emailOtp.resendIn":"Resend code in {seconds}s","emailOtp.expiresIn":"Code expires in {time}","emailOtp.expired":"That code has expired. Resend a new one","emailOtp.reason_otp_mismatch":"That code was incorrect. Check it and enter it again","emailOtp.reason_otp_expired":"That code has expired. Resend a new code to continue","emailOtp.reason_otp_send_failed":"We couldn't send the email. Try again later. If it keeps happening, contact the organization that asked you to verify.","emailOtp.reason_otp_rate_limited":"Too many codes were requested for this address. Try again later, or enter another address.","emailOtp.reason_email_invalid":"We can't send to this address. Check it or enter another one","emailOtp.reason_email_disposable":"Use a permanent email address, not a temporary one","emailOtp.changeEmail":"Change email","emailOtp.backToCode":"Back to code","emailOtp.reason_otp_resend_limit":"You can't get more codes. Enter the last code you received"},ce={"emailOtp.reason_otp_daily_cap_reached":"Nous ne pouvons pas vous envoyer de code par e-mail aujourd'hui. Choisissez une autre méthode si elle est proposée, ou réessayez plus tard.","emailOtp.reason_payment_method_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_spend_cap_reached":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_insufficient_balance":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_account_verification_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.sendTitle":"Vérifiez votre e-mail","emailOtp.sendDescription":"Nous vous enverrons par e-mail un code à usage unique pour confirmer que cette adresse vous appartient","emailOtp.prefilledNotice":"Nous enverrons un code de vérification à votre adresse e-mail enregistrée.","emailOtp.emailLabel":"Adresse e-mail","emailOtp.emailHelper":"Nous enverrons un code à usage unique à cette adresse","emailOtp.emailPlaceholder":"Votre adresse e-mail","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code","emailOtp.verifyDescription":"Saisissez le code à 6 chiffres que nous vous avons envoyé par e-mail pour finaliser la vérification de votre adresse","emailOtp.sentTo":"Nous avons envoyé un code à 6 chiffres à {email}","emailOtp.codeLabel":"Code de vérification","emailOtp.codeHelper":"Saisissez le code à 6 chiffres reçu par e-mail","emailOtp.verify":"Vérifier le code","emailOtp.resend":"Renvoyer le code","emailOtp.resendIn":"Renvoyer le code dans {seconds} s","emailOtp.expiresIn":"Le code expire dans {time}","emailOtp.expired":"Ce code a expiré. Renvoyez-en un nouveau","emailOtp.reason_otp_mismatch":"Ce code est incorrect. Vérifiez-le et saisissez-le à nouveau","emailOtp.reason_otp_expired":"Ce code a expiré. Renvoyez un nouveau code pour continuer","emailOtp.reason_otp_send_failed":"Nous n'avons pas pu envoyer l'e-mail. Réessayez plus tard. Si le problème continue, contactez l'organisation qui vous a demandé de vous vérifier.","emailOtp.reason_otp_rate_limited":"Trop de codes ont été demandés pour cette adresse. Réessayez plus tard ou saisissez une autre adresse.","emailOtp.reason_email_invalid":"Nous ne pouvons pas envoyer à cette adresse. Vérifiez-la ou saisissez-en une autre","emailOtp.reason_email_disposable":"Utilisez une adresse e-mail permanente, pas une adresse temporaire","emailOtp.changeEmail":"Changer d'adresse e-mail","emailOtp.backToCode":"Retour au code","emailOtp.reason_otp_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu"},ue={en:b,fr:ce,ar:pe,es:b,pt:b,de:b},Q=n((a,l,O)=>{if(a===void 0)return 0;let _=Date.parse(a)-l;return Number.isFinite(_)?Math.min(O,Math.max(0,Math.ceil(_/1e3))):0},"secondsUntil"),he=600,Oe=60,_e=n(a=>`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`,"mmss"),X=new Set(["otp_expired","otp_send_failed","otp_rate_limited","otp_resend_limit","email_invalid","email_disposable","otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","account_verification_required"]);function fe({step:a,i18n:l,className:O,defaultEmail:_="",onError:Z}){let i=n((t,o)=>B(l.strings[t]??ue[l.locale][t],o),"t"),[N,ee]=(0,s.useState)(_),[f,E]=(0,s.useState)(""),[r,z]=(0,s.useState)(!1),[w,q]=(0,s.useState)(null),[g,c]=(0,s.useState)(!1),[I,ae]=(0,s.useState)(null),u=(0,s.useRef)(null),v=a.phase==="verify",m=v&&!g,R=K(v),d=(0,s.useId)(),[ie,te]=G(a.reason==="otp_mismatch",a.attemptsRemaining,()=>E("")),V=v?a.codeExpiresAt??"sent":null;(0,s.useEffect)(()=>{V!==null&&(c(!1),u.current!==null&&!X.has(a.reason??"")&&ae(u.current),u.current=null)},[V]);let S=n(async t=>{z(!0),q(null);try{await t()}catch(o){q(o instanceof W&&o.field==="email"?i("emailOtp.emailInvalid"):l.t(Y(o,l.strings))),Z?.(o)}finally{z(!1)}},"run"),$=n(t=>{let o=a.needsEmail?t?I:N.trim():null;u.current=o,S(async()=>{try{await a.send(o!==null?{email:o}:{})}catch(ne){throw u.current=null,ne}})},"send"),D=n(t=>{S(()=>a.verify(t))},"submitCode"),se=n(t=>{t.preventDefault(),m?D(f):$(!1)},"onSubmit"),k=Q(a.codeExpiresAt,R,he),C=Q(a.resendAvailableAt,R,Oe),y=m&&a.codeExpiresAt!==void 0&&k===0,L=a.needsEmail&&!a.attemptsExhausted,H=v&&(a.codeExpiresAt===void 0||k>0);P(m&&L?()=>c(!0):g&&H?()=>c(!1):null,r);let[oe,le]=i("emailOtp.sentTo").split("{email}"),M=a.context.simulation?.otpCode,re=a.reason==="otp_mismatch"?(0,e.jsxs)(h,{tone:"danger",children:[(0,e.jsx)("span",{children:i("emailOtp.reason_otp_mismatch")}),(0,e.jsx)("span",{children:U(l,a.attemptsRemaining,a.attemptsExhausted)})]}):a.reason!==void 0&&X.has(a.reason)?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:i(`emailOtp.reason_${a.reason}`)})}):a.reason==="tester_mismatch"?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:l.t("sandboxMode.mismatchEmail")})}):null;return(0,e.jsxs)("form",{className:`sekyro-step sekyro-otp${O?` ${O}`:""}`,"aria-labelledby":d,onSubmit:se,noValidate:!0,children:[(0,e.jsx)(F,{id:d,title:i(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m&&M!==void 0?(0,e.jsx)(j,{template:l.t("sandbox.otpHint"),code:M}):m?(0,e.jsxs)(e.Fragment,{children:[oe,(0,e.jsx)("bdi",{dir:"ltr",className:"sekyro-mono",children:I??a.sentToMasked}),le]}):i("emailOtp.sendDescription")}),re,w!==null?(0,e.jsx)(h,{tone:"danger",children:(0,e.jsx)("span",{children:w})}):null,m?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:i("emailOtp.codeLabel")}),(0,e.jsx)(J,{id:`${d}-code`,value:f,invalid:ie,onChange:p(t=>{t!==""&&te(),E(t),t.length===6&&f.length!==6&&!r&&!a.attemptsExhausted&&D(t)},"onChange")}),(0,e.jsx)("span",{className:`sekyro-help sekyro-otp-expiry${y?" is-danger":""}`,"aria-hidden":!y||void 0,children:y?i("emailOtp.expired"):i("emailOtp.expiresIn",{time:_e(k)})})]}),(0,e.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y?i("emailOtp.expired"):""}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r||f.length!==6,"aria-busy":r||void 0,children:i("emailOtp.verify")}),(0,e.jsxs)("div",{className:"sekyro-resend-row",children:[(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r||C>0,onClick:p(()=>$(!0),"onClick"),children:C>0?i("emailOtp.resendIn",{seconds:C}):i("emailOtp.resend")}),L?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!0),"onClick"),"data-testid":"sekyro-otp-change",children:i("emailOtp.changeEmail")}):null]})]})]}):(0,e.jsxs)(e.Fragment,{children:[a.needsEmail?(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-email`,children:i("emailOtp.emailLabel")}),(0,e.jsx)("input",{id:`${d}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:i("emailOtp.emailPlaceholder"),value:N,"aria-describedby":`${d}-email-help`,onChange:p(t=>ee(t.target.value),"onChange")}),(0,e.jsx)("span",{id:`${d}-email-help`,className:"sekyro-help",children:i("emailOtp.emailHelper")})]}):(0,e.jsx)("p",{className:"sekyro-text-muted",children:i("emailOtp.prefilledNotice")}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r,"aria-busy":r||void 0,children:i("emailOtp.send")}),g&&H?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!1),"onClick"),"data-testid":"sekyro-otp-back-to-code",children:i("emailOtp.backToCode")}):null]})]})]})}p(fe,"Ve");n(fe,"EmailOtpView");export{fe as EmailOtpView};
|
|
1
|
+
"use client";import{a as G,b as J,c as K}from"./chunk-7V3YMJPI.js";import{a as Y}from"./chunk-AKU6DWJM.js";import"./chunk-6T7VBPLY.js";import{a as B}from"./chunk-ZWGMVZWP.js";import"./chunk-PWGUNXYH.js";import{A as P,H as j,K as h,L as U,a as de,b as me,c as x,w as F,y as T}from"./chunk-EB2QC3GA.js";import{a as n}from"./chunk-5QL6W6FW.js";import{H as W}from"./chunk-44UA2IDQ.js";import"./chunk-5OPKZZON.js";import"./chunk-EGCT7K5E.js";import"./chunk-P7K7ELYZ.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as p,c as A}from"./chunk-4FHWXBOB.js";var s=A(de(),1),e=A(me(),1);var pe={"emailOtp.reason_otp_daily_cap_reached":"لا يمكننا إرسال رمز إلى بريدك الإلكتروني اليوم. اختر طريقة أخرى للتحقق إن كانت متاحة، أو حاول مرة أخرى لاحقًا.","emailOtp.reason_payment_method_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_spend_cap_reached":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_insufficient_balance":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_account_verification_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"عنوان بريدك الإلكتروني","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا","emailOtp.send":"أرسل لي رمزًا عبر البريد الإلكتروني","emailOtp.verifyTitle":"أدخل الرمز","emailOtp.verifyDescription":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إلى بريدك الإلكتروني لإتمام التحقّق من عنوانك","emailOtp.sentTo":"أرسلنا رمزًا مكوّنًا من 6 أرقام إلى {email}","emailOtp.codeLabel":"رمز التحقّق","emailOtp.codeHelper":"أدخل الرمز المكوّن من 6 أرقام الوارد في الرسالة","emailOtp.verify":"تحقّق من الرمز","emailOtp.resend":"إعادة إرسال الرمز","emailOtp.resendIn":"إعادة إرسال الرمز خلال {seconds} ثانية","emailOtp.expiresIn":"ينتهي الرمز خلال {time}","emailOtp.expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد","emailOtp.reason_otp_mismatch":"الرمز غير صحيح. تحقّق منه وأعد إدخاله","emailOtp.reason_otp_expired":"انتهت صلاحية الرمز. أعد إرسال رمز جديد للمتابعة","emailOtp.reason_otp_send_failed":"تعذّر إرسال الرسالة. أعد المحاولة لاحقًا. إذا تكرر ذلك، فتواصل مع الجهة التي طلبت منك التحقق.","emailOtp.reason_otp_rate_limited":"طُلبت رموز كثيرة لهذا العنوان. أعد المحاولة لاحقًا أو أدخل عنوانًا آخر.","emailOtp.reason_email_invalid":"لا يمكننا الإرسال إلى هذا العنوان. تحقّق منه أو أدخل عنوانًا آخر","emailOtp.reason_email_disposable":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا","emailOtp.changeEmail":"تغيير البريد الإلكتروني","emailOtp.backToCode":"العودة إلى الرمز","emailOtp.reason_otp_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك"},b={"emailOtp.reason_otp_daily_cap_reached":"We can't email you a code today. Choose another way to verify if one is offered, or try again later.","emailOtp.reason_payment_method_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_spend_cap_reached":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_insufficient_balance":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_account_verification_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.sendTitle":"Verify your email address","emailOtp.sendDescription":"We'll email you a one-time code to confirm this address is yours","emailOtp.prefilledNotice":"We'll send a verification code to your registered email address.","emailOtp.emailLabel":"Email address","emailOtp.emailHelper":"We'll send a one-time code to this address","emailOtp.emailPlaceholder":"Your email address","emailOtp.emailInvalid":"Enter a valid email address","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the code","emailOtp.verifyDescription":"Type the 6-digit code we emailed you to finish verifying your address","emailOtp.sentTo":"We sent a 6-digit code to {email}","emailOtp.codeLabel":"Verification code","emailOtp.codeHelper":"Enter the 6-digit code from the email","emailOtp.verify":"Verify code","emailOtp.resend":"Resend code","emailOtp.resendIn":"Resend code in {seconds}s","emailOtp.expiresIn":"Code expires in {time}","emailOtp.expired":"That code has expired. Resend a new one","emailOtp.reason_otp_mismatch":"That code was incorrect. Check it and enter it again","emailOtp.reason_otp_expired":"That code has expired. Resend a new code to continue","emailOtp.reason_otp_send_failed":"We couldn't send the email. Try again later. If it keeps happening, contact the organization that asked you to verify.","emailOtp.reason_otp_rate_limited":"Too many codes were requested for this address. Try again later, or enter another address.","emailOtp.reason_email_invalid":"We can't send to this address. Check it or enter another one","emailOtp.reason_email_disposable":"Use a permanent email address, not a temporary one","emailOtp.changeEmail":"Change email","emailOtp.backToCode":"Back to code","emailOtp.reason_otp_resend_limit":"You can't get more codes. Enter the last code you received"},ce={"emailOtp.reason_otp_daily_cap_reached":"Nous ne pouvons pas vous envoyer de code par e-mail aujourd'hui. Choisissez une autre méthode si elle est proposée, ou réessayez plus tard.","emailOtp.reason_payment_method_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_spend_cap_reached":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_insufficient_balance":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_account_verification_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.sendTitle":"Vérifiez votre e-mail","emailOtp.sendDescription":"Nous vous enverrons par e-mail un code à usage unique pour confirmer que cette adresse vous appartient","emailOtp.prefilledNotice":"Nous enverrons un code de vérification à votre adresse e-mail enregistrée.","emailOtp.emailLabel":"Adresse e-mail","emailOtp.emailHelper":"Nous enverrons un code à usage unique à cette adresse","emailOtp.emailPlaceholder":"Votre adresse e-mail","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code","emailOtp.verifyDescription":"Saisissez le code à 6 chiffres que nous vous avons envoyé par e-mail pour finaliser la vérification de votre adresse","emailOtp.sentTo":"Nous avons envoyé un code à 6 chiffres à {email}","emailOtp.codeLabel":"Code de vérification","emailOtp.codeHelper":"Saisissez le code à 6 chiffres reçu par e-mail","emailOtp.verify":"Vérifier le code","emailOtp.resend":"Renvoyer le code","emailOtp.resendIn":"Renvoyer le code dans {seconds} s","emailOtp.expiresIn":"Le code expire dans {time}","emailOtp.expired":"Ce code a expiré. Renvoyez-en un nouveau","emailOtp.reason_otp_mismatch":"Ce code est incorrect. Vérifiez-le et saisissez-le à nouveau","emailOtp.reason_otp_expired":"Ce code a expiré. Renvoyez un nouveau code pour continuer","emailOtp.reason_otp_send_failed":"Nous n'avons pas pu envoyer l'e-mail. Réessayez plus tard. Si le problème continue, contactez l'organisation qui vous a demandé de vous vérifier.","emailOtp.reason_otp_rate_limited":"Trop de codes ont été demandés pour cette adresse. Réessayez plus tard ou saisissez une autre adresse.","emailOtp.reason_email_invalid":"Nous ne pouvons pas envoyer à cette adresse. Vérifiez-la ou saisissez-en une autre","emailOtp.reason_email_disposable":"Utilisez une adresse e-mail permanente, pas une adresse temporaire","emailOtp.changeEmail":"Changer d'adresse e-mail","emailOtp.backToCode":"Retour au code","emailOtp.reason_otp_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu"},ue={en:b,fr:ce,ar:pe,es:b,pt:b,de:b},Q=n((a,l,O)=>{if(a===void 0)return 0;let _=Date.parse(a)-l;return Number.isFinite(_)?Math.min(O,Math.max(0,Math.ceil(_/1e3))):0},"secondsUntil"),he=600,Oe=60,_e=n(a=>`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`,"mmss"),X=new Set(["otp_expired","otp_send_failed","otp_rate_limited","otp_resend_limit","email_invalid","email_disposable","otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","account_verification_required"]);function fe({step:a,i18n:l,className:O,defaultEmail:_="",onError:Z}){let i=n((t,o)=>B(l.strings[t]??ue[l.locale][t],o),"t"),[N,ee]=(0,s.useState)(_),[f,E]=(0,s.useState)(""),[r,z]=(0,s.useState)(!1),[w,q]=(0,s.useState)(null),[g,c]=(0,s.useState)(!1),[I,ae]=(0,s.useState)(null),u=(0,s.useRef)(null),v=a.phase==="verify",m=v&&!g,R=K(v),d=(0,s.useId)(),[ie,te]=G(a.reason==="otp_mismatch",a.attemptsRemaining,()=>E("")),V=v?a.codeExpiresAt??"sent":null;(0,s.useEffect)(()=>{V!==null&&(c(!1),u.current!==null&&!X.has(a.reason??"")&&ae(u.current),u.current=null)},[V]);let S=n(async t=>{z(!0),q(null);try{await t()}catch(o){q(o instanceof W&&o.field==="email"?i("emailOtp.emailInvalid"):l.t(Y(o,l.strings))),Z?.(o)}finally{z(!1)}},"run"),$=n(t=>{let o=a.needsEmail?t?I:N.trim():null;u.current=o,S(async()=>{try{await a.send(o!==null?{email:o}:{})}catch(ne){throw u.current=null,ne}})},"send"),D=n(t=>{S(()=>a.verify(t))},"submitCode"),se=n(t=>{t.preventDefault(),m?D(f):$(!1)},"onSubmit"),k=Q(a.codeExpiresAt,R,he),C=Q(a.resendAvailableAt,R,Oe),y=m&&a.codeExpiresAt!==void 0&&k===0,L=a.needsEmail&&!a.attemptsExhausted,H=v&&(a.codeExpiresAt===void 0||k>0);P(m&&L?()=>c(!0):g&&H?()=>c(!1):null,r);let[oe,le]=i("emailOtp.sentTo").split("{email}"),M=a.context.simulation?.otpCode,re=a.reason==="otp_mismatch"?(0,e.jsxs)(h,{tone:"danger",children:[(0,e.jsx)("span",{children:i("emailOtp.reason_otp_mismatch")}),(0,e.jsx)("span",{children:U(l,a.attemptsRemaining,a.attemptsExhausted)})]}):a.reason!==void 0&&X.has(a.reason)?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:i(`emailOtp.reason_${a.reason}`)})}):a.reason==="tester_mismatch"?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:l.t("sandboxMode.mismatchEmail")})}):null;return(0,e.jsxs)("form",{className:`sekyro-step sekyro-otp${O?` ${O}`:""}`,"aria-labelledby":d,onSubmit:se,noValidate:!0,children:[(0,e.jsx)(F,{id:d,title:i(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m&&M!==void 0?(0,e.jsx)(j,{template:l.t("sandbox.otpHint"),code:M}):m?(0,e.jsxs)(e.Fragment,{children:[oe,(0,e.jsx)("bdi",{dir:"ltr",className:"sekyro-mono",children:I??a.sentToMasked}),le]}):i("emailOtp.sendDescription")}),re,w!==null?(0,e.jsx)(h,{tone:"danger",children:(0,e.jsx)("span",{children:w})}):null,m?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:i("emailOtp.codeLabel")}),(0,e.jsx)(J,{id:`${d}-code`,value:f,invalid:ie,onChange:p(t=>{t!==""&&te(),E(t),t.length===6&&f.length!==6&&!r&&!a.attemptsExhausted&&D(t)},"onChange")}),(0,e.jsx)("span",{className:`sekyro-help sekyro-otp-expiry${y?" is-danger":""}`,"aria-hidden":!y||void 0,children:y?i("emailOtp.expired"):i("emailOtp.expiresIn",{time:_e(k)})})]}),(0,e.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y?i("emailOtp.expired"):""}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r||f.length!==6,"aria-busy":r||void 0,children:i("emailOtp.verify")}),(0,e.jsxs)("div",{className:"sekyro-resend-row",children:[(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r||C>0,onClick:p(()=>$(!0),"onClick"),children:C>0?i("emailOtp.resendIn",{seconds:C}):i("emailOtp.resend")}),L?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!0),"onClick"),"data-testid":"sekyro-otp-change",children:i("emailOtp.changeEmail")}):null]})]})]}):(0,e.jsxs)(e.Fragment,{children:[a.needsEmail?(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-email`,children:i("emailOtp.emailLabel")}),(0,e.jsx)("input",{id:`${d}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:i("emailOtp.emailPlaceholder"),value:N,"aria-describedby":`${d}-email-help`,onChange:p(t=>ee(t.target.value),"onChange")}),(0,e.jsx)("span",{id:`${d}-email-help`,className:"sekyro-help",children:i("emailOtp.emailHelper")})]}):(0,e.jsx)("p",{className:"sekyro-text-muted",children:i("emailOtp.prefilledNotice")}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r,"aria-busy":r||void 0,children:i("emailOtp.send")}),g&&H?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!1),"onClick"),"data-testid":"sekyro-otp-back-to-code",children:i("emailOtp.backToCode")}):null]})]})]})}p(fe,"Ve");n(fe,"EmailOtpView");export{fe as EmailOtpView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as Ae,b as O,c as Ce}from"./chunk-YVQ6LFN4.js";import{a as H,e as W,f as ge,g as Q,h as E,i as ve,j as ke,k as be,l as Z}from"./chunk-5AGMJYMI.js";import"./chunk-SYUAQ7BF.js";import{a as fe}from"./chunk-AKU6DWJM.js";import"./chunk-DO66BOHU.js";import{a as N}from"./chunk-Y6MS7VVL.js";import"./chunk-6T7VBPLY.js";import{a as j}from"./chunk-ZWGMVZWP.js";import"./chunk-PWGUNXYH.js";import{K as S,a as $e,b as Ue,c as w,t as L,v as z,w as ye,y as B}from"./chunk-EB2QC3GA.js";import{a as m}from"./chunk-5QL6W6FW.js";import{a as q}from"./chunk-44UA2IDQ.js";import"./chunk-5OPKZZON.js";import"./chunk-EGCT7K5E.js";import"./chunk-P7K7ELYZ.js";import{c as D,f as he}from"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as y,c as me}from"./chunk-4FHWXBOB.js";var k=me($e(),1),r=me(Ue(),1);var Fe={"consent.human.terms.intro":"تؤكد Sekyro AI أن شخصًا حقيقيًا يُجري هذه الخطوة، نيابةً عن الجهة التي طلبتها.","consent.human.terms.data":"تلتقط Sekyro AI تسجيلًا قصيرًا لوجهك.","consent.human.terms.processing":"يُفحص هذا التسجيل للتأكد من أنك شخص حقيقي وحاضر، وقد يُقارَن بالوجوه التي سبق التحقق منها لدى هذه الجهة.","consent.human.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.human.terms.retention":"تُخزَّن بياناتك مشفّرة. وتحدّد الجهة التي طلبت هذا التحقق مدة الاحتفاظ بها. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع تلك الجهة.","capture.noCamera.title":"تتطلب هذه الخطوة كاميرا","capture.noCamera.body":"اسمح بالوصول إلى الكاميرا وحاول مرة أخرى، أو تابع على هاتف مزوّد بكاميرا.","capture.noCamera.continue":"المتابعة بدون كاميرا","capture.noCamera.deniedTitle":"اسمح بالوصول إلى الكاميرا","capture.noCamera.deniedBody":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","capture.noCamera.stepsChrome":"في Chrome، اضغط على الرمز الموجود بجانب العنوان، ثم الأذونات، وفعّل الكاميرا.","capture.noCamera.stepsSamsung":"في Samsung Internet، افتح القائمة، ثم الإعدادات، المواقع والتنزيلات، أذونات المواقع، الكاميرا، واسمح لهذا الموقع.","capture.noCamera.stepsSafari":"في Safari، اضغط على زر aA في شريط العنوان، ثم إعدادات موقع الويب، واضبط الكاميرا على السماح.","capture.noCamera.stepsDesktop":"انقر على الرمز الموجود بجانب العنوان واسمح بالكاميرا لهذا الموقع.","capture.noCamera.stepsSystem":"ما زالت محظورة؟ تحقق في إعدادات هاتفك من أن متصفحك مسموح له باستخدام الكاميرا.","capture.noCamera.stillBlocked":"ما زالت الكاميرا محظورة. اتبع الخطوات أعلاه ثم أعد المحاولة.","capture.noCamera.inAppTitle":"افتح هذه الصفحة في متصفحك","capture.noCamera.inAppBody":"لا يمكن لمتصفح هذا التطبيق استخدام الكاميرا. افتح الصفحة في Chrome أو Safari للمتابعة.","choice.title":"كيف تريد المتابعة؟","choice.description":"اختر خيارًا واحدًا.","choice.switch":"استخدم خيارًا آخر","choice.changeMethod":"تغيير الطريقة","contact.title":"كيف تريد استلام الرمز؟","contact.description":"اختر خيارًا واحدًا.","contact.phone":"عبر الهاتف (واتساب أو رسالة نصية)","contact.email":"عبر البريد الإلكتروني","contact.switch":"استخدم خيارًا آخر","summary.title":"تحقق من بياناتك","summary.description":"تأكد من أن هذه بياناتك قبل الصورة الحية.","summary.fullName":"الاسم الكامل","summary.birthDate":"تاريخ الميلاد","summary.nationality":"الجنسية","summary.documentType":"الوثيقة","summary.documentNumber":"رقم الوثيقة","summary.nni":"الرقم الوطني للتعريف الموريتاني (NNI)","summary.id_number":"رقم الهوية","summary.expiryDate":"تاريخ الانتهاء","summary.portraitAlt":"الصورة المسجلة","summary.source.registry":"من سجل الحالة المدنية","summary.source.document":"مقروءة من وثيقتك","summary.source.chip":"مقروءة من شريحة وثيقتك","summary.name":"الاسم","summary.birthYear":"سنة الميلاد","summary.confirm":"تأكيد ومتابعة","summary.retakeDocument":"مسح وثيقتي مرة أخرى","summary.retakeNationalNumber":"إدخال رقمي مرة أخرى","summary.noRetake":"لم يعد بإمكانك إعادة المحاولة. تواصل مع {org} إذا كانت هذه البيانات غير صحيحة","capture.tipsIcao.title":"لصورة الهوية:","capture.tipsIcao.glasses":"انزع نظارتك","capture.tipsIcao.headwear":"انزع القبعة. يُقبل غطاء الرأس الديني إذا كان الوجه ظاهرًا بالكامل","capture.tipsIcao.expression":"حافظ على تعبير محايد وفمك مغلق","capture.tipsIcao.faceCamera":"انظر مباشرة إلى الكاميرا وعيناك مفتوحتان","capture.tipsIcao.background":"قف أمام خلفية سادة فاتحة اللون","capture.tipsIcao.lighting":"استخدم إضاءة متساوية على وجهك: دون ظلال","capture.tipsIcao.hair":"أبعد شعرك عن وجهك وعينيك","capture.tipsIcao.summary":"قف أمام جدار سادة فاتح اللون مع إضاءة متساوية على وجهك. انزع نظارتك وأي قبعة. أبعد شعرك عن وجهك، وانظر مباشرة إلى الكاميرا وعيناك مفتوحتان، وحافظ على تعبير محايد وفمك مغلق، وابقَ ثابتًا.","portrait.retakeOnly":"نجح التحقق الحي. الصورة فقط تحتاج إلى محاولة أخرى","portrait.keepCamera":"ابقَ أمام الكاميرا","handoff.description":"امسح الرمز بهاتفك للمتابعة","handoff.qrAlt":"رمز QR يفتح عملية التحقق هذه على هاتفك","handoff.copyLink":"نسخ الرابط","handoff.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة من متصفحك بدلًا من ذلك","handoff.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة على هاتفك","inApp.title":"افتح الصفحة في متصفحك","inApp.description":"لا تعمل الكاميرا جيدًا داخل هذا التطبيق. افتح الرابط في Chrome أو Safari للمتابعة.","inApp.copyLink":"نسخ الرابط","inApp.copied":"تم نسخ الرابط. الصقه في متصفحك","inApp.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة بدلًا من ذلك","inApp.continueAnyway":"المتابعة هنا على أي حال","needsApp.capture.title":"تابع في التطبيق","needsApp.capture.description":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org}.","needsApp.capture.descriptionSekyro":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org} أو في تطبيق Sekyro AI.","needsApp.capture.descriptionNoOrg":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في التطبيق الذي أُعطي لك.","needsApp.capture.descriptionNoOrgSekyro":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في تطبيق Sekyro AI.","needsApp.capture.openSekyro":"افتح في تطبيق Sekyro AI","needsApp.capture.getApp":"احصل على تطبيق Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"امسح الرمز بهاتفك لفتح هذا التحقق في التطبيق.","needsApp.capture.qrAlt":"رمز QR يفتح هذا التحقق في التطبيق","needsApp.capture.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة في التطبيق","inApp.openBrowser":"افتح في المتصفح","testerGate.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. يجب أن يتطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة. بعد ذلك تُجري الجلسة فحوصات حقيقية.","testerGate.notice":"يُقارَن وجهك بوجوه المختبِرين المسجَّلين لدى المؤسسة. يُحتفظ بالفيديو والنتيجة مع هذه الجلسة، ويمكن للمؤسسة الاطلاع عليهما.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"يُحتفظ بالفيديو والنتيجة مع هذه الجلسة. يمكنك إعادة المحاولة.","testerGate.retakeTitle":"تعذّر علينا التحقق من وجهك بوضوح","testerGate.retakeBody":"لا تُحتسب هذه المحاولة. يُحتفظ بالفيديو مع هذه الجلسة. اجعل الضوء أمامك لا خلفك، وأمسك الهاتف بمستوى عينيك ووجهك في الوسط، وابقَ ثابتًا، ثم أعد المحاولة.","testerGate.livenessTitle":"لم يتم تأكيد الوجه الحي","testerGate.livenessBody":"لم تتم مقارنة وجهك بالمختبِرين بعد. اجعل الضوء أمامك لا خلفك، وأمسك الهاتف بمستوى عينيك ووجهك في الوسط، وابقَ ثابتًا. لا بأس بالنظارات. يُحتفظ بالفيديو والنتيجة مع هذه الجلسة.","testerGate.retry":"أعد المحاولة","testerGate.continue":"متابعة","testerGate.checkUnavailableTitle":"تعذّر إجراء فحص الأمان","testerGate.checkUnavailableBody":"حظر هذا المتصفح أو هذه الشبكة فحص الأمان، لذا لا يمكن بدء الفحوص الحقيقية هنا. أعد المحاولة أو افتح الرابط في متصفح آخر.","sandboxMode.title":"كيف تريد الاختبار؟","sandboxMode.testDataBody":"لا يُفحص أي شيء حقيقي. النتائج قيم اختبار.","sandboxMode.testerTitle":"فحوصات حقيقية (مختبِر مسجَّل)","sandboxMode.testerBody":"يُتحقق من وجهك أولًا. بعد ذلك يجب أن تطابق كل خطوة بيانات تسجيلك.","sandboxMode.noTestersTitle":"لا يوجد مختبِر مسجَّل","sandboxMode.noTestersBody":"لا يوجد أي مختبِر مسجَّل في هذه المؤسسة. اطلب من أحد المسؤولين أن يرسل إليك رابط تسجيل مختبِر من لوحة التحكم.","sandboxMode.continueTestData":"المتابعة باستخدام بيانات الاختبار","sandboxMode.boundTitle":"الفحوصات الحقيقية مفعّلة لـ {name}","sandboxMode.summaryTestDataBody":"هذه الهوية وهمية. وهي لا تطابق الرقم الذي أدخلته."},$={"consent.human.terms.intro":"Sekyro AI confirms that a real person is completing this step, on behalf of the organization that asked for it.","consent.human.terms.data":"Sekyro AI collects a short capture of your face.","consent.human.terms.processing":"The capture is checked to confirm that you are a real person who is present. It may be compared with faces already verified for this organization.","consent.human.terms.sharing":"The organization that requested this verification learns its outcome.","consent.human.terms.retention":"Your data is stored encrypted. The organization that requested this verification sets how long it is kept. To exercise your data-protection rights, contact that organization.","capture.noCamera.title":"This step needs a camera","capture.noCamera.body":"Allow camera access and try again, or continue on a phone with a camera.","capture.noCamera.continue":"Continue without a camera","capture.noCamera.deniedTitle":"Allow camera access","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","capture.noCamera.stepsChrome":"In Chrome, tap the icon to the left of the address, then Permissions, and turn on Camera.","capture.noCamera.stepsSamsung":"In Samsung Internet, open the menu, then Settings, Sites and downloads, Site permissions, Camera, and allow this site.","capture.noCamera.stepsSafari":"In Safari, tap the aA button in the address bar, then Website Settings, and set Camera to Allow.","capture.noCamera.stepsDesktop":"Click the icon to the left of the address and allow the camera for this site.","capture.noCamera.stepsSystem":"Still blocked? In your phone's settings, check that your browser may use the camera.","capture.noCamera.stillBlocked":"The camera is still blocked. Follow the steps above, then try again.","capture.noCamera.inAppTitle":"Open this page in your browser","capture.noCamera.inAppBody":"This app's browser can't use your camera. Open the page in Chrome or Safari to continue.","choice.title":"Choose how to continue","choice.description":"Choose one option.","choice.switch":"Use another option","choice.changeMethod":"Change method","contact.title":"Where to send your code","contact.description":"Choose one option.","contact.phone":"By phone (WhatsApp or SMS)","contact.email":"By email","contact.switch":"Use another option","summary.title":"Check your details","summary.description":"Make sure this is you before the live photo.","summary.fullName":"Full name","summary.birthDate":"Date of birth","summary.nationality":"Nationality","summary.documentType":"Document","summary.documentNumber":"Document number","summary.nni":"Mauritanian national ID number (NNI)","summary.id_number":"ID number","summary.expiryDate":"Expiry date","summary.portraitAlt":"Photo on record","summary.source.registry":"From the civil registry","summary.source.document":"Read from your document","summary.source.chip":"Read from your document's chip","summary.name":"Name","summary.birthYear":"Year of birth","summary.confirm":"Confirm and continue","summary.retakeDocument":"Scan my document again","summary.retakeNationalNumber":"Enter my number again","summary.noRetake":"You can't try again. Contact {org} if these details are wrong","capture.tipsIcao.title":"For your ID photo:","capture.tipsIcao.glasses":"Remove your glasses","capture.tipsIcao.headwear":"Remove hats and caps. A religious head covering is fine if your whole face shows","capture.tipsIcao.expression":"Keep a neutral expression with your mouth closed","capture.tipsIcao.faceCamera":"Look straight at the camera with your eyes open","capture.tipsIcao.background":"Stand in front of a plain, light background","capture.tipsIcao.lighting":"Use even light on your face: no shadows","capture.tipsIcao.hair":"Keep your hair away from your face and eyes","capture.tipsIcao.summary":"Stand in front of a plain, light wall with even light on your face. Remove your glasses and any hat. Keep your hair off your face, look straight at the camera with your eyes open, keep a neutral expression with your mouth closed, and hold still.","portrait.retakeOnly":"Your live check passed. Only the photo needs another try","portrait.keepCamera":"Stay in front of the camera","handoff.description":"Scan with your phone to continue","handoff.qrAlt":"QR code that opens this verification on your phone","handoff.copyLink":"Copy link","handoff.copyFailed":"We couldn't copy the link. Copy this page's address from your browser instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open in your browser","inApp.description":"The camera doesn't work well inside this app. Open the link in Chrome or Safari to continue.","inApp.copyLink":"Copy link","inApp.copied":"Link copied. Paste it in your browser","inApp.copyFailed":"We couldn't copy the link. Copy this page's address instead","inApp.continueAnyway":"Continue here anyway","needsApp.capture.title":"Continue in the app","needsApp.capture.description":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app.","needsApp.capture.descriptionSekyro":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app or in the Sekyro AI app.","needsApp.capture.descriptionNoOrg":"This verification takes the photos in a mobile app. Open it in the app you were given.","needsApp.capture.descriptionNoOrgSekyro":"This verification takes the photos in a mobile app. Open it in the Sekyro AI app.","needsApp.capture.openSekyro":"Open in the Sekyro AI app","needsApp.capture.getApp":"Get the Sekyro AI app","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scan with your phone to open this verification in the app.","needsApp.capture.qrAlt":"QR code that opens this verification in the app","needsApp.capture.waiting":"This page moves on when you finish in the app","inApp.openBrowser":"Open in browser","testerGate.title":"Run real checks as a tester","testerGate.body":"Look at the camera. Your face must match one of the organization's enrolled testers. Then the session runs real checks.","testerGate.notice":"Your face is compared with the organization's enrolled testers. The video and the result are kept with this session, and the organization can see them.","testerGate.start":"Start","testerGate.checking":"Checking your face","testerGate.boundTitle":"Real checks are on","testerGate.boundBody":"You were recognised as an enrolled tester. The next steps run real checks.","testerGate.missTitle":"No enrolled tester matched","testerGate.missBody":"The video and the result are kept with this session. You can try again.","testerGate.retakeTitle":"We couldn't check your face clearly","testerGate.retakeBody":"This try doesn't count. The video is kept with this session. Have the light in front of you, not behind, hold the phone at eye level with your face centred, keep still, and try again.","testerGate.livenessTitle":"Live face not confirmed","testerGate.livenessBody":"Your face wasn't compared with the testers yet. Have the light in front of you, not behind, hold the phone at eye level with your face centred, and keep still. Glasses are fine. The video and the result are kept with this session.","testerGate.retry":"Try again","testerGate.continue":"Continue","testerGate.checkUnavailableTitle":"The security check could not run","testerGate.checkUnavailableBody":"This browser or network blocked the security check, so real checks cannot start here. Try again, or open the link in another browser.","sandboxMode.title":"How do you want to test?","sandboxMode.testDataBody":"Nothing real is checked. The results are test values.","sandboxMode.testerTitle":"Real checks (enrolled tester)","sandboxMode.testerBody":"Your face is checked first. Then every step must match your enrollment details.","sandboxMode.noTestersTitle":"No enrolled tester","sandboxMode.noTestersBody":"No tester is enrolled in this organization. Ask an admin to send you a tester enrollment link from the dashboard.","sandboxMode.continueTestData":"Continue with test data","sandboxMode.boundTitle":"Real checks are on for {name}","sandboxMode.summaryTestDataBody":"This identity is made up. It doesn't match the number you typed."},Ye={"consent.human.terms.intro":"Sekyro AI confirme qu'une personne réelle effectue cette étape, pour le compte de l'organisme qui l'a demandée.","consent.human.terms.data":"Sekyro AI recueille une courte capture de votre visage.","consent.human.terms.processing":"La capture est analysée pour confirmer que vous êtes une personne réelle et présente. Elle peut être comparée aux visages déjà vérifiés pour cet organisme.","consent.human.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.human.terms.retention":"Vos données sont stockées chiffrées. L'organisme qui a demandé cette vérification fixe leur durée de conservation. Pour exercer vos droits en matière de protection des données, contactez cet organisme.","capture.noCamera.title":"Une caméra est nécessaire","capture.noCamera.body":"Autorisez l'accès à la caméra et réessayez, ou continuez sur un téléphone équipé d'une caméra.","capture.noCamera.continue":"Continuer sans caméra","capture.noCamera.deniedTitle":"Autorisez la caméra","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","capture.noCamera.stepsChrome":"Dans Chrome, touchez l'icône à gauche de l'adresse, puis Autorisations, et activez Caméra.","capture.noCamera.stepsSamsung":"Dans Samsung Internet, ouvrez le menu, puis Paramètres, Sites et téléchargements, Autorisations des sites, Appareil photo, et autorisez ce site.","capture.noCamera.stepsSafari":"Dans Safari, touchez le bouton aA de la barre d'adresse, puis Réglages du site web, et réglez Caméra sur Autoriser.","capture.noCamera.stepsDesktop":"Cliquez sur l'icône à gauche de l'adresse et autorisez la caméra pour ce site.","capture.noCamera.stepsSystem":"Toujours bloquée ? Dans les réglages du téléphone, vérifiez que votre navigateur peut utiliser la caméra.","capture.noCamera.stillBlocked":"La caméra est toujours bloquée. Suivez les étapes ci-dessus, puis réessayez.","capture.noCamera.inAppTitle":"Ouvrez cette page dans votre navigateur","capture.noCamera.inAppBody":"Le navigateur de cette application ne peut pas utiliser votre caméra. Ouvrez la page dans Chrome ou Safari pour continuer.","choice.title":"Comment continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","choice.changeMethod":"Changer de méthode","contact.title":"Où envoyer votre code ?","contact.description":"Choisissez une option.","contact.phone":"Par téléphone (WhatsApp ou SMS)","contact.email":"Par e-mail","contact.switch":"Utiliser une autre option","summary.title":"Vérifiez vos informations","summary.description":"Assurez-vous qu'il s'agit bien de vous avant la photo en direct.","summary.fullName":"Nom complet","summary.birthDate":"Date de naissance","summary.nationality":"Nationalité","summary.documentType":"Document","summary.documentNumber":"Numéro du document","summary.nni":"Numéro national d'identification mauritanien (NNI)","summary.id_number":"Numéro d'identité","summary.expiryDate":"Date d'expiration","summary.portraitAlt":"Photo enregistrée","summary.source.registry":"Issu de l'état civil","summary.source.document":"Lu sur votre document","summary.source.chip":"Lu sur la puce de votre document","summary.name":"Nom","summary.birthYear":"Année de naissance","summary.confirm":"Confirmer et continuer","summary.retakeDocument":"Scanner à nouveau mon document","summary.retakeNationalNumber":"Saisir à nouveau mon numéro","summary.noRetake":"Vous ne pouvez plus réessayer. Contactez {org} si ces informations sont incorrectes","capture.tipsIcao.title":"Pour votre photo d'identité :","capture.tipsIcao.glasses":"Retirez vos lunettes","capture.tipsIcao.headwear":"Retirez chapeau et casquette. Un couvre-chef religieux est accepté si tout le visage est visible","capture.tipsIcao.expression":"Gardez une expression neutre, la bouche fermée","capture.tipsIcao.faceCamera":"Regardez la caméra bien en face, les yeux ouverts","capture.tipsIcao.background":"Placez-vous devant un fond uni et clair","capture.tipsIcao.lighting":"Éclairez votre visage de façon uniforme : sans ombres","capture.tipsIcao.hair":"Dégagez vos cheveux du visage et des yeux","capture.tipsIcao.summary":"Placez-vous devant un mur uni et clair, le visage éclairé de façon uniforme. Retirez vos lunettes et tout chapeau. Dégagez vos cheveux du visage, regardez la caméra bien en face, les yeux ouverts, gardez une expression neutre, la bouche fermée, et ne bougez plus.","portrait.retakeOnly":"Votre vérification en direct est validée. Seule la photo est à refaire","portrait.keepCamera":"Restez face à la caméra","handoff.description":"Scannez avec votre téléphone pour continuer","handoff.qrAlt":"Code QR qui ouvre cette vérification sur votre téléphone","handoff.copyLink":"Copier le lien","handoff.copyFailed":"Nous n'avons pas pu copier le lien. Copiez plutôt l'adresse de cette page depuis votre navigateur","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez dans le navigateur","inApp.description":"La caméra fonctionne mal dans cette application. Ouvrez le lien dans Chrome ou Safari pour continuer.","inApp.copyLink":"Copier le lien","inApp.copied":"Lien copié. Collez-le dans votre navigateur","inApp.copyFailed":"Impossible de copier le lien. Copiez plutôt l'adresse de cette page","inApp.continueAnyway":"Continuer ici quand même","needsApp.capture.title":"Continuez dans l’application","needsApp.capture.description":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org}.","needsApp.capture.descriptionSekyro":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org} ou dans l’application Sekyro AI.","needsApp.capture.descriptionNoOrg":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application que l’on vous a indiquée.","needsApp.capture.descriptionNoOrgSekyro":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application Sekyro AI.","needsApp.capture.openSekyro":"Ouvrir dans l’application Sekyro AI","needsApp.capture.getApp":"Obtenir l’application Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scannez avec votre téléphone pour ouvrir cette vérification dans l’application.","needsApp.capture.qrAlt":"QR code qui ouvre cette vérification dans l’application","needsApp.capture.waiting":"Cette page avancera d’elle-même une fois l’étape terminée dans l’application","inApp.openBrowser":"Ouvrir dans le navigateur","testerGate.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Votre visage doit correspondre à l'un des testeurs inscrits de l'organisation. Ensuite, la session lance de vrais contrôles.","testerGate.notice":"Votre visage est comparé à ceux des testeurs inscrits de l'organisation. La vidéo et le résultat sont conservés avec cette session, et l'organisation peut les voir.","testerGate.start":"Commencer","testerGate.checking":"Vérification de votre visage","testerGate.boundTitle":"Les vrais contrôles sont activés","testerGate.boundBody":"Vous avez été reconnu comme testeur inscrit. Les étapes suivantes lancent de vrais contrôles.","testerGate.missTitle":"Aucun testeur inscrit ne correspond","testerGate.missBody":"La vidéo et le résultat sont conservés avec cette session. Vous pouvez réessayer.","testerGate.retakeTitle":"Nous n'avons pas pu vérifier votre visage clairement","testerGate.retakeBody":"Cet essai ne compte pas. La vidéo est conservée avec cette session. Placez la lumière devant vous et non derrière, tenez le téléphone à hauteur des yeux, le visage centré, restez immobile et réessayez.","testerGate.livenessTitle":"Visage en direct non confirmé","testerGate.livenessBody":"Votre visage n'a pas encore été comparé aux testeurs. Placez la lumière devant vous et non derrière, tenez le téléphone à hauteur des yeux, le visage centré, et restez immobile. Les lunettes ne posent pas de problème. La vidéo et le résultat sont conservés avec cette session.","testerGate.retry":"Réessayer","testerGate.continue":"Continuer","testerGate.checkUnavailableTitle":"Le contrôle de sécurité n’a pas pu s’exécuter","testerGate.checkUnavailableBody":"Ce navigateur ou ce réseau a bloqué le contrôle de sécurité, les vérifications réelles ne peuvent donc pas démarrer ici. Réessayez ou ouvrez le lien dans un autre navigateur.","sandboxMode.title":"Comment voulez-vous tester ?","sandboxMode.testDataBody":"Rien de réel n'est contrôlé. Les résultats sont des valeurs de test.","sandboxMode.testerTitle":"Vrais contrôles (testeur inscrit)","sandboxMode.testerBody":"Votre visage est vérifié d'abord. Ensuite chaque étape doit correspondre à vos données d'inscription.","sandboxMode.noTestersTitle":"Aucun testeur inscrit","sandboxMode.noTestersBody":"Aucun testeur n'est inscrit dans cette organisation. Demandez à un administrateur de vous envoyer un lien d'inscription testeur depuis le tableau de bord.","sandboxMode.continueTestData":"Continuer avec des données de test","sandboxMode.boundTitle":"Vrais contrôles activés pour {name}","sandboxMode.summaryTestDataBody":"Cette identité est fictive. Elle ne correspond pas au numéro saisi."},Te={M:{perBlock:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26],blocks:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16],formatBits:0},H:{perBlock:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28],blocks:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25],formatBits:2}},xe=20;function Se(e){let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}y(Se,"Pe");m(Se,"rawDataModules");function X(e,t){let{perBlock:n,blocks:a}=Te[t],o=n[e-1],c=a[e-1],l=Math.floor(Se(e)/8),s=c-l%c,i=Math.floor(l/c)-o;return[o,s===c?[[c,i]]:[[s,i],[c-s,i+1]]]}y(X,"xe");m(X,"blockLayout");var K=m((e,t)=>X(e,t)[1].reduce((n,[a,o])=>n+a*o,0),"dataCapacity");function U(e,t){let n=0;for(let a=7;a>=0;a-=1)n=n<<1^(n>>>7)*285,n^=(t>>>a&1)*e;return n&255}y(U,"j");m(U,"gfMul");function Ne(e){let t=new Array(e).fill(0);t[e-1]=1;let n=1;for(let a=0;a<e;a+=1){for(let o=0;o<e;o+=1)t[o]=U(t[o],n),o+1<e&&(t[o]=t[o]^t[o+1]);n=U(n,2)}return t}y(Ne,"Re");m(Ne,"rsDivisor");function Ie(e,t){let n=t.map(()=>0);for(let a of e){let o=a^n.shift();n.push(0),t.forEach((c,l)=>{n[l]=n[l]^U(c,o)})}return n}y(Ie,"Ve");m(Ie,"rsRemainder");function Me(e,t,n){let a=[],o=m((d,u)=>{for(let b=u-1;b>=0;b-=1)a.push(d>>>b&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let d of e)o(d,8);let c=K(t,n)*8;o(0,Math.min(4,c-a.length)),o(0,(8-a.length%8)%8);let l=[];for(let d=0;d<a.length;d+=8)l.push(a.slice(d,d+8).reduce((u,b)=>u<<1|b,0));for(let d=236;l.length<K(t,n);d^=253)l.push(d);let[s,i]=X(t,n),p=Ne(s),h=[],f=0;for(let[d,u]of i)for(let b=0;b<d;b+=1){let A=l.slice(f,f+u);f+=u,h.push({data:A,ec:Ie(A,p)})}let v=[],g=Math.max(...h.map(d=>d.data.length));for(let d=0;d<g;d+=1)for(let u of h)d<u.data.length&&v.push(u.data[d]);for(let d=0;d<s;d+=1)for(let u of h)v.push(u.ec[d]);return v}y(Me,"Le");m(Me,"codewords");function J(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=Math.ceil((e*4+4)/(t*2-2))*2,a=[6];for(let o=e*4+10;a.length<t;o-=n)a.splice(1,0,o);return a}y(J,"Ne");m(J,"alignmentPositions");var We=[(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],G,_e=(G=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,a){this.dark[t*this.size+n]=a,this.fixed[t*this.size+n]=!0}get(t,n){return this.dark[t*this.size+n]===!0}},y(G,"ne"),G);m(_e,"Grid");var je=_e;function ze(e,t){let n=e.size;for(let c=0;c<n;c+=1)e.set(6,c,c%2===0),e.set(c,6,c%2===0);for(let[c,l]of[[3,3],[3,n-4],[n-4,3]])for(let s=-4;s<=4;s+=1)for(let i=-4;i<=4;i+=1){let p=c+s,h=l+i;if(p<0||p>=n||h<0||h>=n)continue;let f=Math.max(Math.abs(s),Math.abs(i));e.set(p,h,f!==2&&f!==4)}let a=J(t),o=a.length-1;if(a.forEach((c,l)=>a.forEach((s,i)=>{if(!(l===0&&i===0||l===0&&i===o||l===o&&i===0))for(let p=-2;p<=2;p+=1)for(let h=-2;h<=2;h+=1)e.set(c+p,s+h,Math.max(Math.abs(p),Math.abs(h))!==1)})),ee(e,0),t>=7){let c=t;for(let s=0;s<12;s+=1)c=c<<1^(c>>>11)*7973;let l=t<<12|c;for(let s=0;s<18;s+=1){let i=(l>>>s&1)===1,p=n-11+s%3,h=Math.floor(s/3);e.set(p,h,i),e.set(h,p,i)}}}y(ze,"De");m(ze,"drawFunctionPatterns");function ee(e,t,n=0){let a=e.size,o=n<<3|t,c=o;for(let i=0;i<10;i+=1)c=c<<1^(c>>>9)*1335;let l=(o<<10|c)^21522,s=m(i=>(l>>>i&1)===1,"bit");for(let i=0;i<=5;i+=1)e.set(i,8,s(i));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let i=9;i<15;i+=1)e.set(8,14-i,s(i));for(let i=0;i<8;i+=1)e.set(8,a-1-i,s(i));for(let i=8;i<15;i+=1)e.set(a-15+i,8,s(i));e.set(a-8,8,!0)}y(ee,"Te");m(ee,"drawFormat");function Ee(e,t){let n=e.size,a=0;for(let o=n-1;o>=1;o-=2){o===6&&(o=5);for(let c=0;c<n;c+=1)for(let l=0;l<2;l+=1){let s=o-l,i=(o+1&2)===0?n-1-c:c;e.fixed[i*n+s]!==!0&&(a<t.length*8&&(e.dark[i*n+s]=(t[a>>>3]>>>7-(a&7)&1)===1),a+=1)}}}y(Ee,"Fe");m(Ee,"placeData");function Ge(e,t){let n=We[t];for(let a=0;a<e.size;a+=1)for(let o=0;o<e.size;o+=1)e.fixed[a*e.size+o]!==!0&&n(a,o)&&(e.dark[a*e.size+o]=!e.dark[a*e.size+o])}y(Ge,"He");m(Ge,"applyMask");function Re(e){let t=e.size,n=0,a=m(c=>{let l=1;for(let s=1;s<=t;s+=1)s<t&&c(s)===c(s-1)?l+=1:(l>=5&&(n+=3+(l-5)),l=1);for(let s=0;s+10<t;s+=1){let i=[!0,!1,!0,!0,!0,!1,!0];if(!(i.every((f,v)=>c(s+v)===f)||i.every((f,v)=>c(s+4+v)===f)))continue;let p=[0,1,2,3].every(f=>!c(s+f))&&i.every((f,v)=>c(s+4+v)===f),h=i.every((f,v)=>c(s+v)===f)&&[7,8,9,10].every(f=>!c(s+f));p&&(n+=40),h&&(n+=40)}},"line");for(let c=0;c<t;c+=1)a(l=>e.get(c,l));for(let c=0;c<t;c+=1)a(l=>e.get(l,c));for(let c=0;c+1<t;c+=1)for(let l=0;l+1<t;l+=1){let s=e.get(c,l);s===e.get(c,l+1)&&s===e.get(c+1,l)&&s===e.get(c+1,l+1)&&(n+=3)}let o=e.dark.filter(Boolean).length;return n+=Math.floor(Math.abs(o*20-t*t*10)/(t*t))*10,n}y(Re,"Ee");m(Re,"penalty");function te(e,t={}){let n=t.ecl??"M",a=new TextEncoder().encode(e),o=1;for(;o<=xe&&!(4+(o<10?8:16)+a.length*8<=K(o,n)*8);o+=1);if(o>xe)throw new RangeError("text too long for a QR code");let c=Me(a,o,n),l=m(p=>{let h=new je(o*4+17);return ze(h,o),Ee(h,c),Ge(h,p),ee(h,p,Te[n].formatBits),h},"build"),s=null;if(t.mask!==void 0)s=l(t.mask);else{let p=Number.POSITIVE_INFINITY;for(let h=0;h<8;h+=1){let f=l(h),v=Re(f);v<p&&(p=v,s=f)}}let i=s;return{size:i.size,get:m((p,h)=>i.get(p,h),"get")}}y(te,"J");m(te,"encodeQr");var De={viewBox:"0 0 100 100",d:"M22.37,0H77.63A22.37,22.37 0 0 1 100,22.37V77.63A22.37,22.37 0 0 1 77.63,100H22.37A22.37,22.37 0 0 1 0,77.63V22.37A22.37,22.37 0 0 1 22.37,0ZM48.067,21H38.308A17.308,17.308 0 0 0 21,38.308V42.543A19.886,19.886 0 0 0 40.886,62.429H60.219V57.641A4.419,4.419 0 0 0 55.8,53.222H43.463A11.416,11.416 0 0 1 32.048,41.806V38.308A8.102,8.102 0 0 1 40.149,30.206H43.648A4.419,4.419 0 0 0 48.067,25.787ZM38.676,79H59.114A19.886,19.886 0 0 0 79,59.114V57.457A19.886,19.886 0 0 0 59.114,37.571H38.676V42.359A4.419,4.419 0 0 0 43.095,46.778H56.537A11.416,11.416 0 0 1 67.952,58.194V58.378A11.416,11.416 0 0 1 56.537,69.794H43.095A4.419,4.419 0 0 0 38.676,74.213ZM51.933,21H79V37.571H69.794V30.206H51.933ZM21,71.543A7.457,7.457 0 1 0 35.914,71.543A7.457,7.457 0 1 0 21,71.543Z"},P=.42,Qe=.2,C=m(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function M(e,t,n,a){let o=`A${C(a)} ${C(a)} 0 0 1 `;return`M${C(e+a)} ${C(t)}H${C(e+n-a)}${o}${C(e+n)} ${C(t+a)}V${C(t+n-a)}${o}${C(e+n-a)} ${C(t+n)}H${C(e+a)}${o}${C(e)} ${C(t+n-a)}V${C(t+a)}${o}${C(e+a)} ${C(t)}Z`}y(M,"_");m(M,"roundedSquare");function Le(e){let t=(e-17)/4,n=J(t),a=n.length-1,o=[];return n.forEach((c,l)=>n.forEach((s,i)=>{l===0&&i===0||l===0&&i===a||l===a&&i===0||o.push([c,s])})),o}y(Le,"qe");m(Le,"alignmentCentres");function ae(e,{quiet:t=4,logo:n=!1}={}){let a=e.size,o=m((d,u)=>d<7&&u<7||d<7&&u>=a-7||d>=a-7&&u<7,"isFinder"),c=Math.floor(a*Qe),l=n?c%2===0?c-1:c:0,s=(a-l)/2,i=m((d,u)=>l>0&&d>=s&&d<s+l&&u>=s&&u<s+l,"inZone"),p=Le(a).filter(([d,u])=>!i(d,u)),h=m((d,u)=>p.some(([b,A])=>Math.abs(d-b)<=2&&Math.abs(u-A)<=2),"isAlign"),f=`a${C(P)} ${C(P)} 0 1 0 `,v="";for(let d=0;d<a;d+=1)for(let u=0;u<a;u+=1)!e.get(d,u)||o(d,u)||h(d,u)||i(d,u)||(v+=`M${C(u+t+.5-P)} ${C(d+t+.5)}${f}${C(2*P)} 0${f}${C(-2*P)} 0Z`);let g="";for(let[d,u]of[[0,0],[0,a-7],[a-7,0]]){let b=u+t,A=d+t;g+=M(b,A,7,1.6)+M(b+1,A+1,5,.6)+M(b+2,A+2,3,.6)}for(let[d,u]of p){let b=u-2+t,A=d-2+t;g+=M(b,A,5,1.2)+M(b+1,A+1,3,.5)+M(b+2,A+2,1,.5)}return{size:a+t*2,dots:v,finders:g,logo:l>0?{x:s+t+.5,y:s+t+.5,size:l-1}:null}}y(ae,"te");m(ae,"styledQr");function re(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${C(e.x)} ${C(e.y)}) scale(${t})`}y(re,"oe");m(re,"qrLogoTransform");var Ze={en:$,fr:Ye,ar:Fe,es:$,pt:$,de:$},Ke={en:O,fr:Ce,ar:Ae,es:O,pt:O,de:O};function x(e){let t=e.strings;return(n,a)=>j(t[n]??Ze[e.locale][n]??"",a)}y(x,"A");m(x,"flowT");function oe(e,t){let n=x(t);return e.flatMap(a=>{let o=a.service==="phone_otp"?n("contact.phone"):a.service==="email_otp"?n("contact.email"):Q(a,t),c=ge[a.service];return o===null?[]:[{id:a.id,label:o,...c!==void 0?{glyph:(0,r.jsx)(z,{name:c})}:{}}]})}y(oe,"ze");m(oe,"labelled");function ne({step:e,i18n:t,onError:n}){let a=x(t),{busy:o,error:c,run:l}=E(t,n),s=e.kind==="contact_choice";return(0,r.jsx)(H,{title:a(s?"contact.title":"choice.title"),description:a(s?"contact.description":"choice.description"),options:oe(e.choice.options,t),busy:o,error:c,focus:!0,testId:s?"sekyro-contact-choice":"sekyro-choice",onChoose:y(i=>l(()=>e.choose(i)),"onChoose")})}y(ne,"Be");m(ne,"PlanChoiceView");var Ot=ne,Pt=ne;function Xe({step:e,i18n:t,onError:n,onOpen:a}){let o=x(t),{busy:c,error:l,run:s}=E(t,n),i=e,p=e.context.switchable,h=p===void 0?[]:p.options.filter(A=>A.id!==p.current),f=i.kind==="registry"&&(i.reason==="nni_not_found"||i.reason==="registry_record_not_found")&&i.canUseDocument||i.kind==="eid"&&i.reason?.startsWith("eid_")&&i.canUseCamera;if(p===void 0||h.length===0||i.chooseOption===void 0||f)return null;let v=p.kind==="identity_method",g=!v&&h.length===1?h[0]:void 0,d=g!==void 0&&(g.service==="phone_otp"||g.service==="email_otp"),u=g===void 0?void 0:d&&i.canSwitch&&i.switchTo!==void 0?()=>i.switchTo.call(e):()=>i.chooseOption.call(e,g.id),b=v?o("choice.changeMethod"):g===void 0?o("choice.switch"):d?o("contact.switch"):Q(g,t);return b===null?null:(0,r.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[l!==null?(0,r.jsx)(S,{tone:"danger",children:(0,r.jsx)("span",{children:l})}):null,(0,r.jsx)(w,{kind:"secondary",disabled:c,"aria-busy":c||void 0,onClick:y(()=>u===void 0?a():s(u),"onClick"),"data-testid":d?"sekyro-contact-switch":v?"sekyro-change-method":"sekyro-lane-switch",children:b})]})}y(Xe,"Rt");m(Xe,"LaneSwitch");function Je({step:e,i18n:t,onError:n,onClose:a}){let o=x(t),{busy:c,error:l,run:s}=E(t,n),i=e.context.switchable,p=e.chooseOption,h=i===void 0?[]:oe(i.options,t),f=h.length>1;if((0,k.useEffect)(()=>{f||a()},[f,a]),i===void 0||p===void 0||!f)return null;let[v,g]=i.kind==="identity_method"?[t.t("method.heading"),t.t("method.lead")]:i.kind==="contact"?[o("contact.title"),o("contact.description")]:[o("choice.title"),o("choice.description")];return(0,r.jsx)(H,{title:v,description:g,options:h,...i.current!==null?{marked:i.current}:{},busy:c,error:l,focus:!0,testId:"sekyro-lane-choice",onChoose:y(d=>d===i.current?a():s(()=>p.call(e,d)),"onChoose")})}y(Je,"Vt");m(Je,"LaneChoiceView");var et=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["idNumberMasked","summary.id_number",!0],["expiryDate","summary.expiryDate",!0]];function Be(e){let[t,n]=(0,k.useState)(null);return(0,k.useEffect)(()=>{if(!e.portraitAvailable)return;let a=!0,o=null;return e.portrait().then(c=>{!a||c===null||!c.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(o=URL.createObjectURL(c),n(o))}),()=>{a=!1,o!==null&&URL.revokeObjectURL(o)}},[e.portraitAvailable]),t}y(Be,"We");m(Be,"usePortraitUrl");var tt=m(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function Oe(e,t){try{return new Intl.DateTimeFormat(t==="ar"?"ar-u-nu-latn":t,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))}catch{return e}}y(Oe,"je");m(Oe,"formatDate");function at({step:e,i18n:t,onError:n}){let a=x(t),o=(0,k.useId)(),c=L(),l=Be(e),{busy:s,error:i,run:p}=E(t,n),h=e.context.orgName,f=["registry","document","chip"].find(A=>A===e.source),v=e.summaryKind==="partial",g=e.fullNameAr,d=t.locale==="ar"?g??e.fullName:e.fullName??g,u=m(A=>t.strings[`doc.type.${A}`]??A,"documentLabel"),b=e.context.sandbox&&(e.context.sandboxRun?.mode==="simulated"||e.context.sandboxRun===void 0&&e.context.simulation!==void 0);return(0,r.jsxs)("section",{className:"sekyro-step","aria-labelledby":o,"data-testid":"sekyro-identity-summary",children:[(0,r.jsxs)("div",{className:"sekyro-heading",children:[(0,r.jsx)("h2",{id:o,ref:c,tabIndex:-1,className:"sekyro-text-body",children:a("summary.title")}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:a("summary.description")})]}),f!==void 0?(0,r.jsx)("p",{className:"sekyro-summary__source",children:a(`summary.source.${f}`)}):null,b?(0,r.jsxs)(S,{tone:"warning",children:[(0,r.jsx)("strong",{children:t.t("sandboxMode.testData")}),(0,r.jsx)("span",{children:a("sandboxMode.summaryTestDataBody")})]}):null,(0,r.jsxs)("div",{className:"sekyro-summary",children:[l!==null?(0,r.jsx)("img",{className:"sekyro-summary__portrait",src:l,alt:a("summary.portraitAlt")}):null,(0,r.jsx)("dl",{className:"sekyro-summary__list",children:et.map(([A,I,_])=>{let T=A==="idNumberMasked"?e.idNumberMasked??e.nniMasked:A==="fullName"?d:e[A];return T===void 0?null:(0,r.jsxs)("div",{className:"sekyro-summary__row",children:[(0,r.jsx)("dt",{className:"sekyro-text-muted",children:a(A==="fullName"&&v?"summary.name":I)}),(0,r.jsx)("dd",{children:tt(T)?Oe(T,t.locale):_||T===g?(0,r.jsx)("bdi",{dir:_?"ltr":"rtl",children:T}):A==="documentType"?u(T):T})]},A)})})]}),i!==null?(0,r.jsx)(S,{tone:"danger",children:(0,r.jsx)("span",{children:i})}):null,e.retakeAvailable?null:(0,r.jsx)("p",{className:"sekyro-text-muted",children:a("summary.noRetake",{org:h})}),(0,r.jsxs)(B,{children:[(0,r.jsx)(w,{full:!0,disabled:s,"aria-busy":s||void 0,onClick:y(()=>p(()=>e.confirm()),"onClick"),children:a("summary.confirm")}),e.retakeAvailable?(0,r.jsx)(w,{kind:"secondary",full:!0,disabled:s,onClick:y(()=>p(()=>e.retake()),"onClick"),children:a(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}y(at,"Lt");m(at,"IdentitySummaryView");var rt=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function ot({step:e,i18n:t,livenessProps:n,sekyroIntro:a}){let o=x(t),[c,l]=(0,k.useState)(null);(0,k.useEffect)(()=>e.onLivePhoto(u=>{let b=u.update?.coach;l(u.holding||b===void 0?null:t.t(`portrait.coach.${b}`))}),[e,t]);let s=e.instructions==="icao",i=(0,k.useMemo)(()=>ve(e),[e]),p=e.icao?.profile==="selfie",h=(0,k.useMemo)(()=>s?rt.filter(u=>!p||u!=="background").map(u=>({id:u,text:o(`capture.tipsIcao.${u}`)})):void 0,[s,p,t]),f=(0,k.useMemo)(()=>s&&!p?{...n.strings,"capture.tips.title":o("capture.tipsIcao.title")}:n.strings,[s,p,n.strings,t]),v=p?void 0:o("capture.tipsIcao.title"),g=(0,k.useMemo)(()=>a===!0&&h!==void 0?{...n.slots,intro:m((u,b)=>(0,r.jsx)(ke,{start:u,context:b,tips:h,...v!==void 0?{tipsTitle:v}:{},...i!==void 0?{retry:i}:{}}),"intro")}:n.slots,[a,h,v,i,n.slots,t]),d=p?`${(h??[]).map(u=>u.text).join(". ")}.`:o("capture.tipsIcao.summary");return(0,r.jsx)(W,{...n,...g!==void 0?{slots:g}:{},...f!==void 0?{strings:f}:{},...h!==void 0?{tips:h,tipsSummary:d}:{},coach:c})}y(ot,"Ot");m(ot,"LivePhotoLiveness");function nt({i18n:e}){let t=x(e);return(0,r.jsxs)(S,{tone:"info",children:[(0,r.jsx)("strong",{children:t("portrait.retakeOnly")}),(0,r.jsx)("span",{children:t("portrait.keepCamera")})]})}y(nt,"Dt");m(nt,"PortraitRetakeNotice");function st({i18n:e,provider:t}){let n=e.strings,a=m(o=>n[o]??Ke[e.locale][o]??"","pick");return(0,r.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?j(a("eid.continueHint"),{provider:t}):a("eid.continueHintGeneric")})}y(st,"Ft");m(st,"EidContinueHint");async function Pe(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}y(Pe,"Je");m(Pe,"copy");function F({url:e,i18n:t,label:n,primary:a}){let o=x(t),[c,l]=(0,k.useState)("idle"),s=n.startsWith("inApp.")?"inApp":"handoff";return(0,r.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,r.jsx)(w,{kind:a?"primary":"secondary",full:!0,onClick:y(()=>{Pe(e).then(i=>l(i?"copied":"failed"))},"onClick"),children:o(n)}),(0,r.jsx)("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:c==="idle"?"":o(`${s}.${c==="copied"?"copied":"copyFailed"}`)})]})}y(F,"se");m(F,"CopyLink");function se({url:e,i18n:t,refresh:n,footer:a,lead:o}){let c=x(t),l=(0,k.useId)(),s=(0,k.useMemo)(()=>{try{return ae(te(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]),i=L();return(0,r.jsxs)("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":l,"data-testid":"sekyro-handoff",children:[(0,r.jsxs)("div",{className:"sekyro-heading",children:[(0,r.jsx)("h2",{id:l,ref:i,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),o!==void 0?(0,r.jsx)("p",{children:o}):null,(0,r.jsx)("p",{className:"sekyro-text-muted",children:c("handoff.description")})]}),s!==null?(0,r.jsxs)("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":c("handoff.qrAlt"),children:[(0,r.jsx)("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),(0,r.jsx)("path",{d:s.dots,className:"sekyro-qr__fg"}),(0,r.jsx)("path",{d:s.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),s.logo!==null?(0,r.jsx)("path",{d:De.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(s.logo),"data-qr-mark":""}):null]}):null,(0,r.jsxs)("p",{className:"sekyro-handoff__waiting",role:"status",children:[(0,r.jsx)("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),c("handoff.waiting")]}),(0,r.jsxs)(B,{children:[(0,r.jsx)(F,{url:e,i18n:t,label:"handoff.copyLink"}),a??null]})]})}y(se,"Ge");m(se,"HandoffView");var we={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function it({i18n:e,org:t,nativeApp:n,fallbackUrl:a,refresh:o,footer:c}){let l=x(e),s=(0,k.useMemo)(()=>!D(),[]),i=n.link??a,p=(0,k.useMemo)(()=>{if(!s||i===void 0||i==="")return null;try{return ae(te(i,{ecl:"H"}),{logo:!0})}catch{return null}},[s,i]),[h,f]=(0,k.useState)(!1),v=m(()=>{o!==void 0&&(f(!0),o().catch(()=>{}).finally(()=>f(!1)))},"again"),g=n.sekyroApp,d=t!==""?l(g?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):l(g?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return(0,r.jsxs)(N,{tone:"brand",icon:"smartphone",title:l("needsApp.capture.title"),testId:"sekyro-native-app",actions:(0,r.jsxs)(r.Fragment,{children:[!s&&g&&n.sekyroAppLink!==void 0?(0,r.jsx)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:n.sekyroAppLink,"data-testid":"sekyro-open-sekyro-app",children:l("needsApp.capture.openSekyro")}):null,o!==void 0?(0,r.jsx)(w,{kind:"secondary",full:!0,disabled:h,onClick:v,children:e.t("common.refresh")}):null,c??null]}),children:[(0,r.jsx)("p",{children:d}),p!==null?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"sekyro-qr",viewBox:`0 0 ${p.size} ${p.size}`,role:"img","aria-label":l("needsApp.capture.qrAlt"),children:[(0,r.jsx)("rect",{width:p.size,height:p.size,className:"sekyro-qr__bg"}),(0,r.jsx)("path",{d:p.dots,className:"sekyro-qr__fg"}),(0,r.jsx)("path",{d:p.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),p.logo!==null?(0,r.jsx)("path",{d:De.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(p.logo),"data-qr-mark":""}):null]}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:l("needsApp.capture.scan")})]}):null,g?(0,r.jsxs)("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[l("needsApp.capture.getApp")," ",(0,r.jsx)("a",{href:we.appStore,target:"_blank",rel:"noopener noreferrer",children:l("needsApp.capture.appStore")})," · ",(0,r.jsx)("a",{href:we.googlePlay,target:"_blank",rel:"noopener noreferrer",children:l("needsApp.capture.googlePlay")})]}):null,(0,r.jsxs)("p",{className:"sekyro-handoff__waiting",role:"status",children:[(0,r.jsx)("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),l("needsApp.capture.waiting")]})]})}y(it,"Ht");m(it,"NativeAppView");var ct=["intro","data","processing","sharing","retention"];function lt({i18n:e}){let t=x(e);return(0,r.jsx)(r.Fragment,{children:ct.map(n=>(0,r.jsx)("p",{children:t(`consent.human.terms.${n}`)},n))})}y(lt,"Et");m(lt,"HumanConsentTerms");function dt({url:e,i18n:t}){return(0,k.useMemo)(()=>!D(),[])?(0,r.jsx)(se,{url:e,i18n:t}):null}y(dt,"$t");m(dt,"DesktopHandoffView");function Ve(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(be(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let n=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||n?"ios":/Android/i.test(t)?"chrome_android":"desktop"}y(Ve,"tt");m(Ve,"cameraHelpPlatform");var ut={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function pt({i18n:e,cause:t,onRetry:n,onContinue:a,handoffUrl:o,repeated:c=!1,platform:l}){let s=x(e),i=(0,k.useId)(),p=L(),[h,f]=(0,k.useState)("idle"),v=(0,k.useMemo)(()=>o!==void 0&&!D(),[o]),g=t==="denied",d=(0,k.useMemo)(()=>l??Ve(),[l]),u=g&&d==="in_app",[b,A]=(0,k.useState)(!1),I=(0,k.useRef)(!1),_=(0,k.useRef)(!0);(0,k.useEffect)(()=>(_.current=!0,()=>{_.current=!1}),[]);let T=m(()=>{if(!g){n();return}I.current||(I.current=!0,he().catch(()=>"unknown").then(V=>{I.current=!1,_.current&&(V==="denied"&&!b&&!c?A(!0):n())}))},"retry"),He=m(()=>{a!==void 0&&(f("busy"),a(t).then(()=>f("idle"),V=>f(V instanceof q&&V.code==="check_out_of_order"?"idle":"failed")))},"end"),R=typeof window>"u"?"":window.location.href.split("#")[0]??"",Y=(0,k.useMemo)(()=>u&&R!==""?Z(R):null,[u,R]),ie=(0,r.jsxs)(r.Fragment,{children:[u&&Y!==null?(0,r.jsxs)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:Y,"data-testid":"sekyro-open-browser",children:[(0,r.jsx)(z,{name:"external"}),s("inApp.openBrowser")]}):null,u&&R!==""?(0,r.jsx)(F,{url:R,i18n:e,label:"inApp.copyLink",primary:Y===null}):null,(0,r.jsx)(w,{full:!0,kind:!u&&(g||a===void 0)?"primary":"secondary",onClick:T,children:e.t("common.retry")}),a!==void 0?(0,r.jsx)(w,{full:!0,kind:g?"secondary":"primary",disabled:h==="busy","aria-busy":h==="busy"||void 0,onClick:He,children:s("capture.noCamera.continue")}):null]}),ce=h==="failed"?(0,r.jsx)(S,{tone:"danger",children:(0,r.jsx)("span",{children:e.t("errors.network_error")})}):null,le=s(u?"capture.noCamera.inAppTitle":g?"capture.noCamera.deniedTitle":"capture.noCamera.title"),de=s(u?"capture.noCamera.inAppBody":g?"capture.noCamera.deniedBody":"capture.noCamera.body"),ue=g&&!u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{"data-testid":"sekyro-camera-steps","data-platform":d,children:s(ut[d])}),d!=="desktop"?(0,r.jsx)("p",{className:"sekyro-text-muted",children:s("capture.noCamera.stepsSystem")}):null]}):null,pe=g&&(b||c)?(0,r.jsx)(S,{tone:"warning",children:(0,r.jsx)("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:s("capture.noCamera.stillBlocked")})}):null;return v&&o!==void 0?(0,r.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":i,"data-testid":"sekyro-no-camera","data-cause":t,children:[(0,r.jsx)(se,{url:o,i18n:e}),(0,r.jsx)("h2",{id:i,ref:p,tabIndex:-1,className:"sekyro-text-body",children:le}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:de}),ue,pe,ce,(0,r.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:ie})]}):(0,r.jsxs)(N,{tone:g?"warning":"neutral",icon:"camera",titleId:i,title:le,testId:"sekyro-no-camera",actions:ie,children:[(0,r.jsx)("p",{children:de}),ue,pe,ce]})}y(pt,"qt");m(pt,"NoCameraView");function mt({url:e,i18n:t,onContinue:n}){let a=x(t),o=(0,k.useId)(),c=(0,k.useMemo)(()=>Z(e),[e]);return(0,r.jsx)(N,{tone:"brand",icon:"external",titleId:o,title:a("inApp.title"),testId:"sekyro-in-app",actions:(0,r.jsxs)(r.Fragment,{children:[c!==null?(0,r.jsxs)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:c,"data-testid":"sekyro-open-browser",children:[(0,r.jsx)(z,{name:"external"}),a("inApp.openBrowser")]}):null,(0,r.jsx)(F,{url:e,i18n:t,label:"inApp.copyLink",primary:c===null}),(0,r.jsx)(w,{kind:"ghost",full:!0,onClick:n,children:a("inApp.continueAnyway")})]}),children:(0,r.jsx)("p",{children:a("inApp.description")})})}y(mt,"Ut");m(mt,"InAppBrowserPrompt");var ht={retake:{title:"testerGate.retakeTitle",body:"testerGate.retakeBody"},liveness:{title:"testerGate.livenessTitle",body:"testerGate.livenessBody"},no_match:{title:"testerGate.missTitle",body:"testerGate.missBody"}};function qe(e){return e instanceof q?e.code==="attestation_invalid":e instanceof Error&&e.name==="AttestationUnavailableError"}y(qe,"rt");m(qe,"isCheckUnavailable");function yt({step:e,i18n:t,verification:n,onError:a}){let o=x(t),c=(0,k.useId)(),l=L(),{busy:s,error:i,run:p}=E(t,a),[h,f]=(0,k.useState)(!1),v=n.chooseSandboxMode,g=m(d=>{if(v!==void 0){if(d==="tester"&&!e.testersAvailable){f(!0);return}p(()=>v.call(n,d).catch(u=>{if(u instanceof q&&u.code==="no_testers")return f(!0);throw u}))}},"pick");return h?(0,r.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":c,"data-testid":"sekyro-sandbox-no-testers",children:[(0,r.jsxs)("div",{className:"sekyro-heading",children:[(0,r.jsx)("h2",{id:c,ref:l,tabIndex:-1,className:"sekyro-text-body",children:o("sandboxMode.noTestersTitle")}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:o("sandboxMode.noTestersBody")})]}),i!==null?(0,r.jsx)(S,{tone:"danger",children:(0,r.jsx)("span",{children:i})}):null,(0,r.jsxs)(B,{children:[(0,r.jsx)(w,{full:!0,disabled:s||v===void 0,"aria-busy":s||void 0,onClick:y(()=>g("simulated"),"onClick"),children:o("sandboxMode.continueTestData")}),(0,r.jsx)(w,{full:!0,kind:"secondary",disabled:s,onClick:y(()=>f(!1),"onClick"),children:t.t("common.back")})]})]}):(0,r.jsx)(H,{title:o("sandboxMode.title"),options:[{id:"simulated",label:t.t("sandboxMode.testData"),sub:o("sandboxMode.testDataBody"),glyph:(0,r.jsx)(z,{name:"info"})},{id:"tester",label:o("sandboxMode.testerTitle"),sub:o("sandboxMode.testerBody"),glyph:(0,r.jsx)(z,{name:"face"})}],busy:s||v===void 0,error:i,focus:!0,testId:"sekyro-sandbox-mode",onChoose:y(d=>g(d==="tester"?"tester":"simulated"),"onChoose")})}y(yt,"Yt");m(yt,"SandboxModeView");function ft({i18n:e,testerName:t,onContinue:n}){let a=x(e);return(0,r.jsx)(N,{tone:"success",icon:"success",title:t!==void 0?a("sandboxMode.boundTitle",{name:t}):a("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:(0,r.jsx)(w,{full:!0,onClick:n,children:a("testerGate.continue")}),children:(0,r.jsx)("p",{children:a("testerGate.boundBody")})})}y(ft,"Qt");m(ft,"TesterBoundView");function gt({i18n:e,verification:t,attemptsLeft:n,livenessProps:a}){let o=x(e),c=(0,k.useId)(),[l,s]=(0,k.useState)("intro"),[i,p]=(0,k.useState)(null),[h,f]=(0,k.useState)("no_match"),v=t.testerGate,g=o("testerGate.notice"),d=m(b=>{v!==void 0&&(s("checking"),v.call(t,b,{evidenceNotice:g.trim()!==""}).then(({bound:A,missReason:I})=>{A||(f(I??"no_match"),s("miss"))},A=>{if(qe(A)){p(null),s("unavailable");return}p(e.t(fe(A,e.strings))),s("failed")}))},"captured"),u=(0,r.jsx)(w,{full:!0,onClick:y(()=>s("capture"),"onClick"),"data-testid":"sekyro-tester-gate-retry",children:o("testerGate.retry")});if(l==="capture")return(0,r.jsx)(W,{...a,onCaptured:d});if(l==="checking")return(0,r.jsx)(N,{tone:"brand",icon:"face",busy:!0,live:!0,title:o("testerGate.checking"),testId:"sekyro-tester-gate-checking"});if(l==="unavailable")return(0,r.jsx)(N,{tone:"warning",icon:"info",title:o("testerGate.checkUnavailableTitle"),testId:"sekyro-tester-gate-unavailable",actions:u,children:(0,r.jsx)("p",{children:o("testerGate.checkUnavailableBody")})});if(l==="miss"||l==="failed"){let b=ht[h],A=l==="failed"||h==="retake"||n>0;return(0,r.jsx)(N,{tone:"warning",icon:"info",title:o(l==="miss"?b.title:"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:A?u:void 0,children:(0,r.jsx)("p",{children:l==="miss"?o(b.body):i})})}return(0,r.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":c,"data-testid":"sekyro-tester-gate",children:[(0,r.jsx)(ye,{id:c,title:o("testerGate.title"),lead:o("testerGate.body")}),(0,r.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-tester-gate-notice",children:g}),(0,r.jsx)(B,{children:(0,r.jsx)(w,{full:!0,onClick:y(()=>s("capture"),"onClick"),disabled:v===void 0,"data-testid":"sekyro-tester-gate-start",children:o("testerGate.start")})})]})}y(gt,"Kt");m(gt,"TesterGateView");export{Ot as ContactChoiceView,dt as DesktopHandoffView,st as EidContinueHint,Pt as GenericChoiceView,se as HandoffView,lt as HumanConsentTerms,at as IdentitySummaryView,mt as InAppBrowserPrompt,Je as LaneChoiceView,Xe as LaneSwitch,ot as LivePhotoLiveness,it as NativeAppView,pt as NoCameraView,nt as PortraitRetakeNotice,yt as SandboxModeView,ft as TesterBoundView,gt as TesterGateView,Ve as cameraHelpPlatform};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as re,b as be,c as ve,d as ge,e as ke}from"./chunk-4GDGJEJ6.js";import{a as J}from"./chunk-SIBJ56BG.js";import{a as ye}from"./chunk-RVL4N5KZ.js";import{b as Z,c as me}from"./chunk-X6SULJS2.js";import"./chunk-4H47RI64.js";import{K as pe,a as X,b as ee,c as ue,w as fe,y as he}from"./chunk-2HKOE6CN.js";import{E as ce}from"./chunk-LNE2P3TV.js";import"./chunk-W2IBE5PM.js";import"./chunk-GORELL4J.js";import"./chunk-P7K7ELYZ.js";import{a as c}from"./chunk-5QL6W6FW.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as s,c as U}from"./chunk-4FHWXBOB.js";var S=U(X(),1),E=U(X(),1),f=U(ee(),1);var F=U(X(),1),g=U(ee(),1),l=U(ee(),1);var Oe={"form.title":"بضعة أسئلة","form.lead":"تطلب منك {org} الإجابة عن هذه الأسئلة.","form.optional":"اختياري","form.continue":"متابعة","form.sending":"جارٍ إرسال إجاباتك…","form.yes":"نعم","form.no":"لا","form.chooseAny":"اختر كل ما ينطبق","form.choose":"اختر","form.openLink":"يُفتح في علامة تبويب جديدة","form.consents":"موافقتك","form.remote.other":"أخرى","form.remote.otherField":"إجابتك","form.remote.filter":"ابحث في الخيارات","form.remote.noMatch":"لا يوجد خيار يطابق بحثك","form.date.day":"اليوم","form.date.month":"الشهر","form.date.year":"السنة","form.fields.full_name.label":"الاسم الكامل","form.fields.full_name.help":"اسمك واسم عائلتك كما تكتبهما عادةً","form.fields.birth_date.label":"تاريخ الميلاد","form.fields.email.label":"البريد الإلكتروني","form.fields.phone.label":"رقم الهاتف","form.fields.address.label":"العنوان","form.fields.address.help":"مكان سكنك الحالي","form.fields.country.label":"البلد","form.fields.occupation.label":"المهنة","form.address.line1":"الشارع والرقم","form.address.line2":"تفاصيل إضافية للعنوان","form.address.city":"المدينة","form.address.postcode":"الرمز البريدي","form.address.country":"البلد","form.address.addLine":"أضف سطرًا","form.phoneCountry":"رمز البلد","form.errors.summary":"راجع الإجابات المشار إليها أدناه.","form.errors.required":"أجب عن هذا السؤال للمتابعة","form.errors.choiceRequired":"اختر إجابة للمتابعة","form.errors.consentRequired":"حدّد هذا المربع للمتابعة","form.errors.tooLong":"اختصر إجابتك إلى {max} حرفًا أو أقل","form.errors.tooShort":"أدخل {min} أحرف على الأقل","form.errors.email":"أدخل عنوان بريد إلكتروني كاملًا يتضمن @ ونطاقًا","form.errors.phone":"أدخل الرقم دون رمز البلد، بالأرقام فقط","form.errors.date":"أدخل تاريخًا صحيحًا: اليوم والشهر والسنة","form.errors.datePast":"أدخل تاريخًا في الماضي","form.errors.dateFuture":"أدخل تاريخًا في المستقبل","form.errors.dateMin":"أدخل تاريخًا في {date} أو بعده","form.errors.dateMax":"أدخل تاريخًا في {date} أو قبله","form.errors.number":"أدخل عددًا بالأرقام","form.errors.numberInteger":"أدخل عددًا صحيحًا","form.errors.numberDecimals":"استخدم منزلتين عشريتين على الأكثر","form.errors.numberMin":"أدخل {min} أو أكثر","form.errors.numberMax":"أدخل {max} أو أقل","form.errors.choice":"اختر إحدى الإجابات المعروضة","form.errors.cardNumber":"لا تُدخل رقم بطاقة هنا.","form.errors.address":"أدخل الشارع والمدينة والبلد","form.errors.failed":"تعذّر إرسال إجاباتك. تحقّق من اتصالك وحاول مرة أخرى","form.remote.results.one":"خيار واحد","form.remote.results.two":"خياران","form.remote.results.few":"{count} خيارات","form.remote.results.many":"{count} خيارًا","form.remote.results.other":"{count} خيار"},H={"form.title":"A few questions","form.lead":"{org} asks you to answer these questions.","form.optional":"optional","form.continue":"Continue","form.sending":"Sending your answers…","form.yes":"Yes","form.no":"No","form.chooseAny":"Choose all that apply","form.choose":"Choose","form.openLink":"Opens in a new tab","form.consents":"Your consent","form.remote.other":"Other","form.remote.otherField":"Your answer","form.remote.filter":"Search the options","form.remote.noMatch":"No option matches your search","form.date.day":"Day","form.date.month":"Month","form.date.year":"Year","form.fields.full_name.label":"Full name","form.fields.full_name.help":"Your first and last names, as you usually write them","form.fields.birth_date.label":"Date of birth","form.fields.email.label":"Email address","form.fields.phone.label":"Phone number","form.fields.address.label":"Address","form.fields.address.help":"Where you live now","form.fields.country.label":"Country","form.fields.occupation.label":"Occupation","form.address.line1":"Street and number","form.address.line2":"More address details","form.address.city":"City or town","form.address.postcode":"Postal code","form.address.country":"Country","form.address.addLine":"Add a line","form.phoneCountry":"Country code","form.errors.summary":"Check the answers marked below.","form.errors.required":"Answer this question to continue","form.errors.choiceRequired":"Choose an answer to continue","form.errors.consentRequired":"Tick this box to continue","form.errors.tooLong":"Shorten your answer to {max} characters or fewer","form.errors.tooShort":"Enter at least {min} characters","form.errors.email":"Enter a full email address, with @ and a domain","form.errors.phone":"Enter the number without the country code, digits only","form.errors.date":"Enter a real date: day, month and year","form.errors.datePast":"Enter a date in the past","form.errors.dateFuture":"Enter a date in the future","form.errors.dateMin":"Enter a date on or after {date}","form.errors.dateMax":"Enter a date on or before {date}","form.errors.number":"Enter a number, using digits","form.errors.numberInteger":"Enter a whole number","form.errors.numberDecimals":"Use at most 2 decimals","form.errors.numberMin":"Enter {min} or more","form.errors.numberMax":"Enter {max} or less","form.errors.choice":"Choose one of the answers listed","form.errors.cardNumber":"Do not enter a card number here.","form.errors.address":"Enter the street, the city and the country","form.errors.failed":"We could not send your answers. Check your connection and try again","form.remote.results.one":"{count} option","form.remote.results.other":"{count} options"},Re={"form.title":"Quelques questions","form.lead":"{org} vous demande de répondre à ces questions.","form.optional":"facultatif","form.continue":"Continuer","form.sending":"Envoi de vos réponses…","form.yes":"Oui","form.no":"Non","form.chooseAny":"Choisissez toutes les réponses qui s’appliquent","form.choose":"Choisir","form.openLink":"S’ouvre dans un nouvel onglet","form.consents":"Votre consentement","form.remote.other":"Autre","form.remote.otherField":"Votre réponse","form.remote.filter":"Rechercher parmi les options","form.remote.noMatch":"Aucune option ne correspond à votre recherche","form.date.day":"Jour","form.date.month":"Mois","form.date.year":"Année","form.fields.full_name.label":"Nom complet","form.fields.full_name.help":"Vos prénoms et nom, comme vous les écrivez d’habitude","form.fields.birth_date.label":"Date de naissance","form.fields.email.label":"Adresse e-mail","form.fields.phone.label":"Numéro de téléphone","form.fields.address.label":"Adresse","form.fields.address.help":"Là où vous habitez aujourd’hui","form.fields.country.label":"Pays","form.fields.occupation.label":"Profession","form.address.line1":"Rue et numéro","form.address.line2":"Complément d’adresse","form.address.city":"Ville","form.address.postcode":"Code postal","form.address.country":"Pays","form.address.addLine":"Ajouter une ligne","form.phoneCountry":"Indicatif du pays","form.errors.summary":"Vérifiez les réponses signalées ci-dessous.","form.errors.required":"Répondez à cette question pour continuer","form.errors.choiceRequired":"Choisissez une réponse pour continuer","form.errors.consentRequired":"Cochez cette case pour continuer","form.errors.tooLong":"Raccourcissez votre réponse à {max} caractères au plus","form.errors.tooShort":"Saisissez au moins {min} caractères","form.errors.email":"Saisissez une adresse e-mail complète, avec @ et un domaine","form.errors.phone":"Saisissez le numéro sans l’indicatif, en chiffres seulement","form.errors.date":"Saisissez une date réelle : jour, mois et année","form.errors.datePast":"Saisissez une date passée","form.errors.dateFuture":"Saisissez une date à venir","form.errors.dateMin":"Saisissez une date à partir du {date}","form.errors.dateMax":"Saisissez une date jusqu’au {date}","form.errors.number":"Saisissez un nombre, en chiffres","form.errors.numberInteger":"Saisissez un nombre entier","form.errors.numberDecimals":"Utilisez au plus 2 décimales","form.errors.numberMin":"Saisissez {min} ou plus","form.errors.numberMax":"Saisissez {max} ou moins","form.errors.choice":"Choisissez une des réponses proposées","form.errors.cardNumber":"N’indiquez pas de numéro de carte ici.","form.errors.address":"Indiquez la rue, la ville et le pays","form.errors.failed":"Nous n’avons pas pu envoyer vos réponses. Vérifiez votre connexion et réessayez","form.remote.results.one":"{count} option","form.remote.results.other":"{count} options"};function Y(e){return e.replace(/[٠-٩۰-۹]/g,r=>String((r.charCodeAt(0)&15)%10))}s(Y,"G");c(Y,"westernDigits");function se(){let e=(0,E.useId)();return{control:`${e}-c`,help:`${e}-h`,error:`${e}-e`}}s(se,"ee");c(se,"useFieldIds");function D(e,r,o){return[r?e.help:null,o?e.error:null].filter(t=>t!==null).join(" ")||void 0}s(D,"E");c(D,"describedBy");function K({text:e,lang:r,optional:o}){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{lang:r?.lang,dir:r?.dir,children:e}),o!==null?(0,f.jsx)("span",{className:"sekyro-form-optional",children:` (${o})`}):null]})}s(K,"Z");c(K,"LabelText");function de({ids:e,help:r,helpLang:o,error:t}){return(0,f.jsxs)(f.Fragment,{children:[r!==void 0?(0,f.jsx)("span",{className:"sekyro-help",id:e.help,lang:o?.lang,dir:o?.dir,children:r}):null,t?(0,f.jsx)("span",{className:"sekyro-help is-danger",id:e.error,role:"alert",children:t}):null]})}s(de,"re");c(de,"FieldNotes");function R({ids:e,label:r,children:o,notes:t}){return(0,f.jsxs)("div",{className:"sekyro-field sekyro-form-q",children:[(0,f.jsx)("label",{className:"sekyro-label",id:`${e.control}-l`,htmlFor:e.control,children:r}),o,t]})}s(R,"T");c(R,"Field");function V({legend:e,children:r,notes:o,invalid:t,describedby:n}){return(0,f.jsxs)("fieldset",{className:`sekyro-form-q sekyro-form-group${t?" is-invalid":""}`,"aria-describedby":n,children:[(0,f.jsx)("legend",{className:"sekyro-label",children:e}),r,o]})}s(V,"V");c(V,"Group");function Ce(e){let r={ArrowDown:1,ArrowUp:-1,ArrowRight:1,ArrowLeft:-1}[e.key];if(r===void 0)return;getComputedStyle(e.currentTarget).direction==="rtl"&&(e.key==="ArrowRight"||e.key==="ArrowLeft")&&(r=-r);let o=e.currentTarget.closest("fieldset"),t=o===null?[]:Array.from(o.querySelectorAll('input[type="checkbox"]')),n=t.indexOf(e.currentTarget),a=t[(n+r+t.length)%t.length];a!==void 0&&(e.preventDefault(),a.focus())}s(Ce,"Ie");c(Ce,"moveInGroup");function te({name:e,type:r,options:o,value:t,onChange:n,required:a,invalid:m,describedby:k}){let q=Array.isArray(t)?t:t===null?[]:[t];return(0,f.jsx)("div",{className:"sekyro-form-choices",children:o.map(h=>{let i=q.includes(h.value);return(0,f.jsxs)("label",{className:"sekyro-form-choice",children:[(0,f.jsx)("input",{type:r,name:e,value:h.value,checked:i,required:r==="radio"?a:void 0,"aria-invalid":m||void 0,"aria-describedby":k,onKeyDown:r==="checkbox"?Ce:void 0,onChange:s(()=>{n(r==="radio"?h.value:i?q.filter(y=>y!==h.value):[...q,h.value])},"onChange")}),(0,f.jsx)("span",{lang:h.lang?.lang,dir:h.lang?.dir,children:h.label})]},h.value)})})}s(te,"oe");c(te,"ChoiceList");function ne(e){let[r,o,t]=[e.day,e.month,e.year].map(n=>Y(n).trim());if(!(r===""&&o===""&&t===""))return`${(t??"").padStart(4,"0")}-${(o??"").padStart(2,"0")}-${(r??"").padStart(2,"0")}`}s(ne,"ne");c(ne,"dateValue");function ae(e){let r=typeof e=="string"?/^(\d{4})-(\d{2})-(\d{2})$/.exec(e):null;return r===null?{day:"",month:"",year:""}:{day:String(Number(r[3])),month:String(Number(r[2])),year:r[1]}}s(ae,"te");c(ae,"dateParts");function Ne(e,r,o,t=new Date().getUTCFullYear()){if(r==="")return!1;let n=Number(r);return e==="day"?!(n>=1&&n<=31):e==="month"?!(n>=1&&n<=12):r.length!==4||n<1900||n>(o?t:2100)}s(Ne,"xe");c(Ne,"datePartBad");function le({ids:e,parts:r,onChange:o,labels:t,required:n,invalid:a,birthday:m,onPartBlur:k,onLeave:q}){let h=c(y=>{let _=y.target.dataset.part;_!==void 0&&k(_),y.currentTarget.contains(y.relatedTarget)||q()},"onBlur"),i=c((y,_)=>(0,f.jsxs)("div",{className:`sekyro-form-date__${y}`,children:[(0,f.jsx)("label",{className:"sekyro-help",htmlFor:`${e.control}-${y}`,children:t[y]}),(0,f.jsx)("input",{id:`${e.control}-${y}`,"data-part":y,className:"sekyro-input",type:"text",inputMode:"numeric",dir:"ltr",maxLength:_,autoComplete:m?`bday-${y}`:"off",required:n,"aria-invalid":a||void 0,"aria-describedby":D(e,!1,a),value:r[y],onChange:s(A=>o({...r,[y]:Y(A.target.value).replace(/\D/g,"")}),"onChange")})]}),"cell");return(0,f.jsxs)("div",{className:"sekyro-form-date",onBlur:h,children:[i("day",2),i("month",2),i("year",4)]})}s(le,"se");c(le,"DateInputs");function qe(e){return(0,E.useMemo)(()=>{let r=[];for(let t=65;t<=90;t++)for(let n=65;n<=90;n++){let a=String.fromCharCode(t,n);re(a)!==void 0&&a!=="AC"&&a!=="TA"&&r.push(a)}let o=new Intl.Collator(e);return r.map(t=>({code:t,name:J(t,e)})).sort((t,n)=>o.compare(t.name,n.name))},[e])}s(qe,"Me");c(qe,"useCountries");function ie({id:e,labelId:r,value:o,onChange:t,locale:n,placeholder:a,searchLabel:m,searchPlaceholder:k,noMatch:q,invalid:h,describedby:i}){let y=qe(n),[_,A]=(0,E.useState)(!1),z=(0,E.useRef)(null),P=(0,E.useRef)(null),p=(0,E.useId)(),M=`${e}-v`,L=y.find(b=>b.code===o),O=c(()=>{A(!1),requestAnimationFrame(()=>z.current?.focus())},"close");return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("button",{ref:z,id:e,type:"button",className:"sekyro-input sekyro-form-country","aria-labelledby":`${r} ${M}`,"aria-expanded":_,"aria-controls":_?p:void 0,"aria-invalid":h||void 0,"aria-describedby":i,onClick:s(()=>{A(b=>!b),_||requestAnimationFrame(()=>P.current?.focus())},"onClick"),children:L!==void 0?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:ve(L.code)}),(0,f.jsx)("span",{className:"sekyro-form-country__name",id:M,children:L.name})]}):(0,f.jsx)("span",{className:"sekyro-form-country__name is-empty",id:M,children:a})}),_?(0,f.jsx)("div",{id:p,className:"sekyro-form-country__list",onKeyDown:s(b=>{b.key==="Escape"&&(b.preventDefault(),O())},"onKeyDown"),children:(0,f.jsx)(be,{countries:y,label:(0,f.jsx)("span",{className:"sekyro-visually-hidden",children:m}),searchPlaceholder:k,noMatch:q,selected:o,searchRef:P,scroll:!0,onPick:s(b=>{t(b),O()},"onPick")})}):null]})}s(ie,"ae");c(ie,"CountryField");var T="\0other",_e,oe;function xe(e){let[r,o]=(0,F.useState)(_e);return(0,F.useEffect)(()=>{if(!e||r!==void 0)return;let t=!0;return oe??(oe=import("./icons-form-R366YPMB-6C7SJPCB.js").then(n=>_e=n.FORM_OPTION_ICON_PATHS)),oe.then(n=>t&&o(n)).catch(()=>{}),()=>{t=!1}},[e,r]),r}s(xe,"Te");c(xe,"useOptionIcons");function we({icon:e,imageUrl:r,icons:o}){let[t,n]=(0,F.useState)(!1);if(r!==void 0&&!t)return(0,g.jsx)("img",{className:"sekyro-form-card__picture",src:r,alt:"",loading:"lazy",decoding:"async",onError:s(()=>n(!0),"onError")});let a=e!==void 0?o?.[e]:void 0;return a===void 0?null:(0,g.jsx)("span",{className:"sekyro-form-card__icon","aria-hidden":"true",children:(0,g.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,focusable:"false",dangerouslySetInnerHTML:{__html:a}})})}s(we,"qe");c(we,"OptionPicture");function Se({name:e,labelId:r,remote:o,draft:t,onChange:n,required:a,invalid:m,describedby:k,client:q,copy:h}){let[i,y]=(0,F.useState)(""),_=(0,F.useId)(),A=(0,F.useId)(),z=(0,F.useRef)(null),[P,p]=(0,F.useState)(!1),M=o.options.length>Z.remoteFilterAbove,L=(0,F.useMemo)(()=>M?me(o.options,i):o.options,[o.options,i,M]),O=o.otherLabel??h.other,b=xe(o.options.some(u=>u.icon!==void 0));(0,F.useEffect)(()=>{P&&(z.current?.focus(),p(!1))},[P]);let x=c(u=>{u===T?(n({pick:T,other:t.other}),p(!0)):n({pick:u,other:""})},"pick");return(0,g.jsxs)("div",{className:"sekyro-form-remote",children:[M?(0,g.jsxs)("div",{className:"sekyro-field sekyro-form-remote__filter",children:[(0,g.jsx)("label",{className:"sekyro-help",htmlFor:_,children:h.filter}),(0,g.jsx)("input",{id:_,className:"sekyro-input",type:"search",autoComplete:"off",value:i,onChange:s(u=>y(u.target.value),"onChange")}),(0,g.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:i.trim()===""?"":h.results(L.length)})]}):null,(0,g.jsxs)("div",{className:"sekyro-form-cards",role:"radiogroup","aria-labelledby":r,"aria-required":a||void 0,"aria-invalid":m||void 0,"aria-describedby":k,children:[L.map(u=>{let I=t.pick===u.value;return(0,g.jsxs)("label",{className:"sekyro-form-card","data-value":u.value,children:[(0,g.jsx)("input",{type:"radio",name:e,value:u.value,checked:I,required:a,"aria-invalid":m||void 0,onChange:s(()=>x(u.value),"onChange")}),(0,g.jsx)(we,{icon:u.icon,imageUrl:u.imageUrl,icons:b}),(0,g.jsxs)("span",{className:"sekyro-form-card__text",lang:q.lang,children:[u.title!==void 0?(0,g.jsx)("span",{className:"sekyro-form-card__title",dir:"auto",children:u.title}):null,(0,g.jsx)("span",{className:"sekyro-form-card__label",dir:"auto",children:u.label}),u.description!==void 0?(0,g.jsx)("span",{className:"sekyro-form-card__description",dir:"auto",children:u.description}):null]})]},u.value)}),M&&L.length===0&&!o.allowOther?(0,g.jsx)("p",{className:"sekyro-help sekyro-form-remote__none",children:h.noMatch}):null,o.allowOther?(0,g.jsxs)("label",{className:"sekyro-form-card sekyro-form-card--other",children:[(0,g.jsx)("input",{type:"radio",name:e,value:T,checked:t.pick===T,required:a,"aria-invalid":m||void 0,onChange:s(()=>x(T),"onChange")}),(0,g.jsx)("span",{className:"sekyro-form-card__text",children:(0,g.jsx)("span",{className:"sekyro-form-card__label",dir:"auto",lang:o.otherLabel!==void 0?q.lang:void 0,children:O})})]}):null]}),t.pick===T?(0,g.jsxs)("div",{className:"sekyro-field sekyro-form-remote__other",children:[(0,g.jsx)("label",{className:"sekyro-help",htmlFor:A,children:o.otherLabel??h.otherField}),(0,g.jsx)("input",{id:A,ref:z,className:"sekyro-input",type:"text",autoComplete:"off",maxLength:Z.remoteOther,required:a,"aria-invalid":m||void 0,"aria-describedby":k,value:t.other,onChange:s(u=>n({pick:T,other:u.target.value}),"onChange")})]}):null]})}s(Se,"Se");c(Se,"OptionCardList");var De={en:H,fr:Re,ar:Oe,es:H,pt:H,de:H};function Me(e){let r=e.strings,o=De[e.locale];return(t,n)=>ye(r[t]??o[t]??"",n)}s(Me,"Be");c(Me,"formCopy");var Te=new Set(["single_choice","multiple_choice","yes_no","remote_choice"]),je=c(e=>e.kind==="field"?e.field==="country":Te.has(e.type),"isChoice");function Ae(e,r,o){if(e.kind==="field")switch(e.field){case"birth_date":return ae(r);case"phone":return typeof r=="string"?r:"";case"address":{let t=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{};return{line1:t.lines?.[0]??"",line2:t.lines?.slice(1).join(", ")??"",city:t.city??"",postcode:t.postcode??"",country:t.country??o}}default:return typeof r=="string"?r:""}switch(e.type){case"multiple_choice":return Array.isArray(r)?r:[];case"yes_no":return typeof r=="boolean"?r:null;case"single_choice":return typeof r=="string"?r:null;case"date":return ae(r);case"number":return typeof r=="number"?String(r):"";case"remote_choice":return{pick:null,other:""};default:return typeof r=="string"?r:""}}s(Ae,"Ke");c(Ae,"draftOf");function Fe(e,r){if(e.kind==="field")switch(e.field){case"birth_date":return ne(r);case"phone":return r||void 0;case"address":{let o=r,t=[o.line1,o.line2].map(n=>n.trim()).filter(n=>n!=="");return t.length===0&&o.city.trim()===""&&o.postcode.trim()===""?void 0:{country:o.country,city:o.city.trim(),lines:t,...o.postcode.trim()!==""?{postcode:o.postcode.trim()}:{}}}case"email":return r.trim().toLowerCase()||void 0;default:return r.trim()||void 0}switch(e.type){case"multiple_choice":return r.length>0?r:void 0;case"yes_no":return typeof r=="boolean"?r:void 0;case"single_choice":return typeof r=="string"?r:void 0;case"date":return ne(r);case"remote_choice":{let o=r;return o.pick===null?void 0:o.pick===T?{other:o.other.trim()}:o.pick}case"number":{let o=Y(r).replace(/[\s ]/g,"").replace(/[,٫]/g,".");if(o==="")return;let t=Number(o);return Number.isFinite(t)&&/^-?\d+(\.\d+)?$/.test(o)?t:Number.NaN}default:return r.trim()||void 0}}s(Fe,"Ye");c(Fe,"answerOf");function $e(e,r,o,t){let n=c(m=>{try{return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${String(m)}T00:00:00Z`))}catch{return String(m)}},"date"),a=e.params??{};switch(e.code){case"required":return o(r!==void 0&&je(r)?"form.errors.choiceRequired":"form.errors.required");case"consent_required":return o("form.errors.consentRequired");case"too_long":return o("form.errors.tooLong",{max:Number(a.max??0)});case"too_short":return o("form.errors.tooShort",{min:Number(a.min??0)});case"email_invalid":return o("form.errors.email");case"phone_invalid":return o("form.errors.phone");case"date_invalid":return o("form.errors.date");case"date_not_past":return o("form.errors.datePast");case"date_not_future":return o("form.errors.dateFuture");case"date_too_early":return o("form.errors.dateMin",{date:n(a.date)});case"date_too_late":return o("form.errors.dateMax",{date:n(a.date)});case"number_invalid":return o("form.errors.number");case"number_not_integer":return o("form.errors.numberInteger");case"number_decimals":return o("form.errors.numberDecimals");case"number_too_small":return o("form.errors.numberMin",{min:new Intl.NumberFormat(t).format(Number(a.min??0))});case"number_too_large":return o("form.errors.numberMax",{max:new Intl.NumberFormat(t).format(Number(a.max??0))});case"address_invalid":return o("form.errors.address");case"card_number":return o("form.errors.cardNumber");default:return o("form.errors.choice")}}s($e,"Ue");c($e,"issueText");var W={full_name:200,occupation:120,email:254,short_text:120,long_text:1e3};function Le(e,r){let o=new Intl.PluralRules(r);return{other:e("form.remote.other"),otherField:e("form.remote.otherField"),filter:e("form.remote.filter"),results:c(t=>e(`form.remote.results.${o.select(t)}`,{count:t})||e("form.remote.results.other",{count:t}),"results"),noMatch:e("form.remote.noMatch")}}s(Le,"je");c(Le,"remoteCopy");function Ve({step:e,i18n:r,onError:o}){let t=Me(r),{form:n}=e,a={lang:n.locale,dir:e.dir},m=typeof n.prefill?.country=="string"?n.prefill.country:"",[k,q]=(0,S.useState)(()=>Object.fromEntries(n.questions.map(d=>[d.id,Ae(d,n.prefill?.[d.id],m)]))),[h,i]=(0,S.useState)({}),[y,_]=(0,S.useState)([]),[A,z]=(0,S.useState)(!1),[P,p]=(0,S.useState)(!1),[M,L]=(0,S.useState)(0),O=(0,S.useRef)(null),b=(0,S.useId)();(0,S.useEffect)(()=>{M!==0&&O.current?.querySelector('[aria-invalid="true"]')?.focus()},[M]);let x=c(d=>{let N=y.find(C=>C.id===d);return N===void 0?null:$e(N,n.questions.find(C=>C.id===d),t,r.locale)},"errorOf"),u=c((d,N)=>{q(C=>({...C,[d]:N})),_(C=>C.filter($=>$.id!==d))},"set"),I=c(()=>{let d={};for(let N of n.questions){let C=Fe(N,k[N.id]??null);C!==void 0&&(d[N.id]=C)}return{answers:d,consents:Object.fromEntries(n.consents.map(N=>[N.id,h[N.id]===!0]))}},"input"),j=c(d=>{let N=e.validate(I()).filter(C=>C.id===d&&C.code!=="required");_(C=>[...C.filter($=>$.id!==d),...N])},"checkOne"),v=c(d=>{if(d.preventDefault(),A)return;let N=I(),C=e.validate(N);if(C.length>0){_(C),L($=>$+1);return}z(!0),p(!1),e.submit(N).catch($=>{o?.($);let B=($ instanceof ce||$?.name==="FormAnswersError"?$.issues:null)?.filter(G=>n.questions.some(Q=>Q.id===G.id)||n.consents.some(Q=>Q.id===G.id))??[];B.length>0?(_(B),L(G=>G+1)):p(!0)}).finally(()=>z(!1))},"onSubmit"),w=c(d=>d?null:t("form.optional"),"optional");return(0,l.jsxs)("form",{ref:O,className:"sekyro-step sekyro-form","aria-labelledby":b,onSubmit:v,noValidate:!0,"data-testid":"sekyro-form-step",children:[(0,l.jsx)(fe,{id:b,title:n.title??t("form.title"),lead:n.intro??t("form.lead",{org:e.context.orgName}),lang:{...n.title!==void 0?{title:n.locale}:{},...n.intro!==void 0?{lead:n.locale}:{},dir:e.dir}}),P?(0,l.jsx)(pe,{tone:"danger",children:(0,l.jsx)("span",{children:t("form.errors.failed")})}):null,(0,l.jsx)("div",{className:"sekyro-form-questions",children:n.questions.map(d=>(0,l.jsx)(ze,{q:d,draft:k[d.id]??null,onChange:s(N=>u(d.id,N),"onChange"),error:x(d.id),optional:w(d.required),c:t,locale:r.locale,client:a,fallbackCountry:m,onCheck:s(()=>j(d.id),"onCheck")},d.id))}),n.consents.length>0?(0,l.jsxs)("fieldset",{className:"sekyro-form-q sekyro-form-group sekyro-form-consents",children:[(0,l.jsx)("legend",{className:"sekyro-label",children:t("form.consents")}),n.consents.map(d=>(0,l.jsx)(Ie,{id:d.id,text:d.text,link:d.link,required:d.required,checked:h[d.id]===!0,onChange:s(N=>{i(C=>({...C,[d.id]:N})),_(C=>C.filter($=>$.id!==d.id))},"onChange"),error:x(d.id),optional:w(d.required),openLink:t("form.openLink"),client:a},d.id))]}):null,(0,l.jsxs)(he,{children:[(0,l.jsx)(ue,{type:"submit",full:!0,disabled:A,"aria-busy":A||void 0,"data-testid":"sekyro-form-continue",children:t(A?"form.sending":"form.continue")}),(0,l.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:A?t("form.sending"):""})]})]})}s(Ve,"Mr");c(Ve,"FormView");function Ie({id:e,text:r,link:o,required:t,checked:n,onChange:a,error:m,optional:k,openLink:q,client:h}){let i=se();return(0,l.jsxs)("div",{className:"sekyro-form-consent","data-consent":e,children:[(0,l.jsxs)("div",{className:"sekyro-form-choice sekyro-form-consent__row",children:[(0,l.jsx)("input",{id:i.control,type:"checkbox",checked:n,required:t,"aria-invalid":m!==null||void 0,"aria-describedby":D(i,!1,m!==null),onChange:s(y=>a(y.target.checked),"onChange")}),(0,l.jsxs)("span",{className:"sekyro-form-consent__text",children:[(0,l.jsx)("label",{htmlFor:i.control,children:(0,l.jsx)(K,{text:r,lang:h,optional:k})}),o!==void 0?(0,l.jsxs)("a",{className:"sekyro-link sekyro-form-consent__link",href:o.url,target:"_blank",rel:"noopener noreferrer",lang:h.lang,dir:h.dir,children:[o.label,(0,l.jsxs)("span",{className:"sekyro-visually-hidden",children:[" (",q,")"]})]}):null]})]}),(0,l.jsx)(de,{ids:i,error:m})]})}s(Ie,"We");c(Ie,"Consent");function ze({q:e,draft:r,onChange:o,error:t,optional:n,c:a,locale:m,client:k,fallbackCountry:q,onCheck:h}){let i=se(),[y,_]=(0,S.useState)(()=>new Set),A=e.kind==="field"&&e.field==="birth_date",z=(A||e.kind==="custom"&&e.type==="date")&&[...y].some(v=>Ne(v,Y(r[v]??""),A)),P=t??(z?a("form.errors.date"):null),p=P!==null,M=e.kind==="custom"?e:null,L=M!==null?M.help:e.kind==="field"&&(e.field==="full_name"||e.field==="address")?a(`form.fields.${e.field}.help`):void 0,O=M!==null?k:void 0,b=M!==null?(0,l.jsx)(K,{text:M.label,lang:k,optional:n}):(0,l.jsx)(K,{text:a(`form.fields.${e.kind==="field"?e.field:""}.label`),optional:n}),x=(0,l.jsx)(de,{ids:i,help:L,helpLang:O,error:P}),u=D(i,L!==void 0,p),I=c(v=>v.long===!0?(0,l.jsx)("textarea",{id:i.control,className:"sekyro-input sekyro-form-textarea",rows:4,maxLength:v.max,required:e.required,"aria-invalid":p||void 0,"aria-describedby":u,value:r,onChange:s(w=>o(w.target.value),"onChange")}):(0,l.jsx)("input",{id:i.control,className:"sekyro-input",type:v.type??"text",inputMode:v.inputMode,autoComplete:v.autoComplete??"off",dir:v.dir,maxLength:v.max,required:e.required,"aria-invalid":p||void 0,"aria-describedby":u,value:r,onChange:s(w=>o(w.target.value),"onChange")}),"text");if(e.kind==="field")switch(e.field){case"full_name":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({autoComplete:"name",max:W.full_name})});case"occupation":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({autoComplete:"organization-title",max:W.occupation})});case"email":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({type:"email",inputMode:"email",autoComplete:"email",dir:"ltr",max:W.email})});case"country":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:(0,l.jsx)(ie,{id:i.control,labelId:`${i.control}-l`,value:r??"",onChange:o,locale:m,placeholder:a("form.choose"),searchLabel:a("doc.countrySearch"),searchPlaceholder:a("doc.countrySearch"),noMatch:a("doc.noCountryMatch"),invalid:p,describedby:u})});case"phone":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:(0,l.jsx)(Ee,{id:i.control,value:r,onChange:o,locale:m,c:a,fallbackCountry:q,required:e.required,invalid:p,describedby:u})});case"birth_date":return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsx)(le,{ids:i,parts:r,onChange:o,labels:{day:a("form.date.day"),month:a("form.date.month"),year:a("form.date.year")},required:e.required,invalid:p,birthday:!0,onPartBlur:s(v=>_(w=>new Set(w).add(v)),"onPartBlur"),onLeave:h})});case"address":{let v=r,w=c((d,N,C,$)=>(0,l.jsxs)("div",{className:"sekyro-field",children:[(0,l.jsx)("label",{className:"sekyro-help",id:`${i.control}-${d}-l`,htmlFor:`${i.control}-${d}`,children:a(N)}),d==="country"?(0,l.jsx)(ie,{id:`${i.control}-${d}`,labelId:`${i.control}-${d}-l`,value:v.country,onChange:s(B=>o({...v,country:B}),"onChange"),locale:m,placeholder:a("form.choose"),searchLabel:a("doc.countrySearch"),searchPlaceholder:a("doc.countrySearch"),noMatch:a("doc.noCountryMatch"),invalid:p,describedby:D(i,!1,p)}):(0,l.jsx)("input",{id:`${i.control}-${d}`,className:"sekyro-input",type:"text",autoComplete:C,maxLength:$,required:e.required&&d!=="line2"&&d!=="postcode","aria-invalid":p||void 0,"aria-describedby":D(i,!1,p),value:v[d],onChange:s(B=>o({...v,[d]:B.target.value}),"onChange")})]}),"part");return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsxs)("div",{className:"sekyro-form-address",children:[w("line1","form.address.line1","address-line1",120),w("line2","form.address.line2","address-line2",120),w("city","form.address.city","address-level2",80),w("postcode","form.address.postcode","postal-code",16),w("country","form.address.country","country",2)]})})}default:return null}let j=e;switch(j.type){case"short_text":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({max:W.short_text})});case"long_text":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({max:W.long_text,long:!0})});case"number":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({inputMode:"decimal",dir:"ltr",max:20})});case"date":return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsx)(le,{ids:i,parts:r,onChange:o,labels:{day:a("form.date.day"),month:a("form.date.month"),year:a("form.date.year")},required:e.required,invalid:p,birthday:!1,onPartBlur:s(v=>_(w=>new Set(w).add(v)),"onPartBlur"),onLeave:h})});case"yes_no":return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsx)(te,{name:i.control,type:"radio",options:[{value:"yes",label:a("form.yes")},{value:"no",label:a("form.no")}],value:r===!0?"yes":r===!1?"no":null,onChange:s(v=>o(v==="yes"),"onChange"),required:e.required,invalid:p,describedby:D(i,!1,p)})});case"remote_choice":return j.remote===void 0?null:(0,l.jsx)(V,{legend:(0,l.jsx)("span",{id:`${i.control}-l`,children:b}),notes:x,invalid:p,describedby:u,children:(0,l.jsx)(Se,{name:i.control,labelId:`${i.control}-l`,remote:j.remote,draft:r,onChange:o,required:e.required,invalid:p,describedby:D(i,!1,p),client:k,copy:Le(a,m)})});case"single_choice":case"multiple_choice":{let v=j.type==="multiple_choice";return(0,l.jsx)(V,{legend:b,notes:(0,l.jsxs)(l.Fragment,{children:[v?(0,l.jsx)("span",{className:"sekyro-help",children:a("form.chooseAny")}):null,x]}),invalid:p,describedby:u,children:(0,l.jsx)(te,{name:i.control,type:v?"checkbox":"radio",options:(j.choices??[]).map(w=>({value:w.value,label:w.label,lang:k})),value:r,onChange:o,required:e.required,invalid:p,describedby:D(i,!1,p)})})}default:return null}}s(ze,"Ze");c(ze,"Question");function Pe(e,r){let o=[];for(let a=65;a<=90;a++)for(let m=65;m<=90;m++){let k=String.fromCharCode(a,m),q=re(k);q!==void 0&&k!=="AC"&&k!=="TA"&&o.push({code:k,dial:`+${q}`})}let t=new Intl.Collator(r),n=new Map(o.map(a=>[a.code,J(a.code,r)]));return o.sort((a,m)=>a.code===e?-1:m.code===e?1:t.compare(n.get(a.code)??"",n.get(m.code)??"")),o}s(Pe,"Je");c(Pe,"phoneCountries");function Ee({id:e,value:r,onChange:o,locale:t,c:n,fallbackCountry:a,required:m,invalid:k,describedby:q}){let h=(0,S.useMemo)(()=>Pe(a||"MR",t),[a,t]),[i]=(0,S.useState)(()=>r||(h[0]?.dial??"")),y=ge({countries:h,international:!1,closed:!1,defaultPhone:i}),_=y.empty?"":y.typed??y.phone;return(0,S.useEffect)(()=>{_!==r&&o(_)},[_]),(0,l.jsx)(ke,{field:y,id:e,locale:t,t:n,required:m,invalid:k,describedby:q,compact:!0})}s(Ee,"Xe");c(Ee,"FormPhone");export{Ve as FormView,Me as formCopy};
|
|
1
|
+
"use client";import{a as re,b as be,c as ve,d as ge,e as ke}from"./chunk-4MHDMYKP.js";import{a as J}from"./chunk-SIBJ56BG.js";import{b as Z,c as me}from"./chunk-6T7VBPLY.js";import{a as ye}from"./chunk-ZWGMVZWP.js";import"./chunk-PWGUNXYH.js";import{K as pe,a as X,b as ee,c as ue,w as fe,y as he}from"./chunk-EB2QC3GA.js";import{a as c}from"./chunk-5QL6W6FW.js";import{F as ce}from"./chunk-44UA2IDQ.js";import"./chunk-5OPKZZON.js";import"./chunk-EGCT7K5E.js";import"./chunk-P7K7ELYZ.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as s,c as U}from"./chunk-4FHWXBOB.js";var S=U(X(),1),E=U(X(),1),f=U(ee(),1);var F=U(X(),1),g=U(ee(),1),l=U(ee(),1);var Oe={"form.title":"بضعة أسئلة","form.lead":"تطلب منك {org} الإجابة عن هذه الأسئلة.","form.optional":"اختياري","form.continue":"متابعة","form.sending":"جارٍ إرسال إجاباتك…","form.yes":"نعم","form.no":"لا","form.chooseAny":"اختر كل ما ينطبق","form.choose":"اختر","form.openLink":"يُفتح في علامة تبويب جديدة","form.consents":"موافقتك","form.remote.other":"أخرى","form.remote.otherField":"إجابتك","form.remote.filter":"ابحث في الخيارات","form.remote.noMatch":"لا يوجد خيار يطابق بحثك","form.date.day":"اليوم","form.date.month":"الشهر","form.date.year":"السنة","form.fields.full_name.label":"الاسم الكامل","form.fields.full_name.help":"اسمك واسم عائلتك كما تكتبهما عادةً","form.fields.birth_date.label":"تاريخ الميلاد","form.fields.email.label":"البريد الإلكتروني","form.fields.phone.label":"رقم الهاتف","form.fields.address.label":"العنوان","form.fields.address.help":"مكان سكنك الحالي","form.fields.country.label":"البلد","form.fields.occupation.label":"المهنة","form.address.line1":"الشارع والرقم","form.address.line2":"تفاصيل إضافية للعنوان","form.address.city":"المدينة","form.address.postcode":"الرمز البريدي","form.address.country":"البلد","form.address.addLine":"أضف سطرًا","form.phoneCountry":"رمز البلد","form.errors.summary":"راجع الإجابات المشار إليها أدناه.","form.errors.required":"أجب عن هذا السؤال للمتابعة","form.errors.choiceRequired":"اختر إجابة للمتابعة","form.errors.consentRequired":"حدّد هذا المربع للمتابعة","form.errors.tooLong":"اختصر إجابتك إلى {max} حرفًا أو أقل","form.errors.tooShort":"أدخل {min} أحرف على الأقل","form.errors.email":"أدخل عنوان بريد إلكتروني كاملًا يتضمن @ ونطاقًا","form.errors.phone":"أدخل الرقم دون رمز البلد، بالأرقام فقط","form.errors.date":"أدخل تاريخًا صحيحًا: اليوم والشهر والسنة","form.errors.datePast":"أدخل تاريخًا في الماضي","form.errors.dateFuture":"أدخل تاريخًا في المستقبل","form.errors.dateMin":"أدخل تاريخًا في {date} أو بعده","form.errors.dateMax":"أدخل تاريخًا في {date} أو قبله","form.errors.number":"أدخل عددًا بالأرقام","form.errors.numberInteger":"أدخل عددًا صحيحًا","form.errors.numberDecimals":"استخدم منزلتين عشريتين على الأكثر","form.errors.numberMin":"أدخل {min} أو أكثر","form.errors.numberMax":"أدخل {max} أو أقل","form.errors.choice":"اختر إحدى الإجابات المعروضة","form.errors.cardNumber":"لا تُدخل رقم بطاقة هنا.","form.errors.address":"أدخل الشارع والمدينة والبلد","form.errors.failed":"تعذّر إرسال إجاباتك. تحقّق من اتصالك وحاول مرة أخرى","form.remote.results.one":"خيار واحد","form.remote.results.two":"خياران","form.remote.results.few":"{count} خيارات","form.remote.results.many":"{count} خيارًا","form.remote.results.other":"{count} خيار"},H={"form.title":"A few questions","form.lead":"{org} asks you to answer these questions.","form.optional":"optional","form.continue":"Continue","form.sending":"Sending your answers…","form.yes":"Yes","form.no":"No","form.chooseAny":"Choose all that apply","form.choose":"Choose","form.openLink":"Opens in a new tab","form.consents":"Your consent","form.remote.other":"Other","form.remote.otherField":"Your answer","form.remote.filter":"Search the options","form.remote.noMatch":"No option matches your search","form.date.day":"Day","form.date.month":"Month","form.date.year":"Year","form.fields.full_name.label":"Full name","form.fields.full_name.help":"Your first and last names, as you usually write them","form.fields.birth_date.label":"Date of birth","form.fields.email.label":"Email address","form.fields.phone.label":"Phone number","form.fields.address.label":"Address","form.fields.address.help":"Where you live now","form.fields.country.label":"Country","form.fields.occupation.label":"Occupation","form.address.line1":"Street and number","form.address.line2":"More address details","form.address.city":"City or town","form.address.postcode":"Postal code","form.address.country":"Country","form.address.addLine":"Add a line","form.phoneCountry":"Country code","form.errors.summary":"Check the answers marked below.","form.errors.required":"Answer this question to continue","form.errors.choiceRequired":"Choose an answer to continue","form.errors.consentRequired":"Tick this box to continue","form.errors.tooLong":"Shorten your answer to {max} characters or fewer","form.errors.tooShort":"Enter at least {min} characters","form.errors.email":"Enter a full email address, with @ and a domain","form.errors.phone":"Enter the number without the country code, digits only","form.errors.date":"Enter a real date: day, month and year","form.errors.datePast":"Enter a date in the past","form.errors.dateFuture":"Enter a date in the future","form.errors.dateMin":"Enter a date on or after {date}","form.errors.dateMax":"Enter a date on or before {date}","form.errors.number":"Enter a number, using digits","form.errors.numberInteger":"Enter a whole number","form.errors.numberDecimals":"Use at most 2 decimals","form.errors.numberMin":"Enter {min} or more","form.errors.numberMax":"Enter {max} or less","form.errors.choice":"Choose one of the answers listed","form.errors.cardNumber":"Do not enter a card number here.","form.errors.address":"Enter the street, the city and the country","form.errors.failed":"We could not send your answers. Check your connection and try again","form.remote.results.one":"{count} option","form.remote.results.other":"{count} options"},Re={"form.title":"Quelques questions","form.lead":"{org} vous demande de répondre à ces questions.","form.optional":"facultatif","form.continue":"Continuer","form.sending":"Envoi de vos réponses…","form.yes":"Oui","form.no":"Non","form.chooseAny":"Choisissez toutes les réponses qui s’appliquent","form.choose":"Choisir","form.openLink":"S’ouvre dans un nouvel onglet","form.consents":"Votre consentement","form.remote.other":"Autre","form.remote.otherField":"Votre réponse","form.remote.filter":"Rechercher parmi les options","form.remote.noMatch":"Aucune option ne correspond à votre recherche","form.date.day":"Jour","form.date.month":"Mois","form.date.year":"Année","form.fields.full_name.label":"Nom complet","form.fields.full_name.help":"Vos prénoms et nom, comme vous les écrivez d’habitude","form.fields.birth_date.label":"Date de naissance","form.fields.email.label":"Adresse e-mail","form.fields.phone.label":"Numéro de téléphone","form.fields.address.label":"Adresse","form.fields.address.help":"Là où vous habitez aujourd’hui","form.fields.country.label":"Pays","form.fields.occupation.label":"Profession","form.address.line1":"Rue et numéro","form.address.line2":"Complément d’adresse","form.address.city":"Ville","form.address.postcode":"Code postal","form.address.country":"Pays","form.address.addLine":"Ajouter une ligne","form.phoneCountry":"Indicatif du pays","form.errors.summary":"Vérifiez les réponses signalées ci-dessous.","form.errors.required":"Répondez à cette question pour continuer","form.errors.choiceRequired":"Choisissez une réponse pour continuer","form.errors.consentRequired":"Cochez cette case pour continuer","form.errors.tooLong":"Raccourcissez votre réponse à {max} caractères au plus","form.errors.tooShort":"Saisissez au moins {min} caractères","form.errors.email":"Saisissez une adresse e-mail complète, avec @ et un domaine","form.errors.phone":"Saisissez le numéro sans l’indicatif, en chiffres seulement","form.errors.date":"Saisissez une date réelle : jour, mois et année","form.errors.datePast":"Saisissez une date passée","form.errors.dateFuture":"Saisissez une date à venir","form.errors.dateMin":"Saisissez une date à partir du {date}","form.errors.dateMax":"Saisissez une date jusqu’au {date}","form.errors.number":"Saisissez un nombre, en chiffres","form.errors.numberInteger":"Saisissez un nombre entier","form.errors.numberDecimals":"Utilisez au plus 2 décimales","form.errors.numberMin":"Saisissez {min} ou plus","form.errors.numberMax":"Saisissez {max} ou moins","form.errors.choice":"Choisissez une des réponses proposées","form.errors.cardNumber":"N’indiquez pas de numéro de carte ici.","form.errors.address":"Indiquez la rue, la ville et le pays","form.errors.failed":"Nous n’avons pas pu envoyer vos réponses. Vérifiez votre connexion et réessayez","form.remote.results.one":"{count} option","form.remote.results.other":"{count} options"};function Y(e){return e.replace(/[٠-٩۰-۹]/g,r=>String((r.charCodeAt(0)&15)%10))}s(Y,"G");c(Y,"westernDigits");function se(){let e=(0,E.useId)();return{control:`${e}-c`,help:`${e}-h`,error:`${e}-e`}}s(se,"ee");c(se,"useFieldIds");function D(e,r,o){return[r?e.help:null,o?e.error:null].filter(t=>t!==null).join(" ")||void 0}s(D,"E");c(D,"describedBy");function K({text:e,lang:r,optional:o}){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{lang:r?.lang,dir:r?.dir,children:e}),o!==null?(0,f.jsx)("span",{className:"sekyro-form-optional",children:` (${o})`}):null]})}s(K,"Z");c(K,"LabelText");function de({ids:e,help:r,helpLang:o,error:t}){return(0,f.jsxs)(f.Fragment,{children:[r!==void 0?(0,f.jsx)("span",{className:"sekyro-help",id:e.help,lang:o?.lang,dir:o?.dir,children:r}):null,t?(0,f.jsx)("span",{className:"sekyro-help is-danger",id:e.error,role:"alert",children:t}):null]})}s(de,"re");c(de,"FieldNotes");function R({ids:e,label:r,children:o,notes:t}){return(0,f.jsxs)("div",{className:"sekyro-field sekyro-form-q",children:[(0,f.jsx)("label",{className:"sekyro-label",id:`${e.control}-l`,htmlFor:e.control,children:r}),o,t]})}s(R,"T");c(R,"Field");function V({legend:e,children:r,notes:o,invalid:t,describedby:n}){return(0,f.jsxs)("fieldset",{className:`sekyro-form-q sekyro-form-group${t?" is-invalid":""}`,"aria-describedby":n,children:[(0,f.jsx)("legend",{className:"sekyro-label",children:e}),r,o]})}s(V,"V");c(V,"Group");function Ce(e){let r={ArrowDown:1,ArrowUp:-1,ArrowRight:1,ArrowLeft:-1}[e.key];if(r===void 0)return;getComputedStyle(e.currentTarget).direction==="rtl"&&(e.key==="ArrowRight"||e.key==="ArrowLeft")&&(r=-r);let o=e.currentTarget.closest("fieldset"),t=o===null?[]:Array.from(o.querySelectorAll('input[type="checkbox"]')),n=t.indexOf(e.currentTarget),a=t[(n+r+t.length)%t.length];a!==void 0&&(e.preventDefault(),a.focus())}s(Ce,"Ie");c(Ce,"moveInGroup");function te({name:e,type:r,options:o,value:t,onChange:n,required:a,invalid:m,describedby:k}){let q=Array.isArray(t)?t:t===null?[]:[t];return(0,f.jsx)("div",{className:"sekyro-form-choices",children:o.map(h=>{let i=q.includes(h.value);return(0,f.jsxs)("label",{className:"sekyro-form-choice",children:[(0,f.jsx)("input",{type:r,name:e,value:h.value,checked:i,required:r==="radio"?a:void 0,"aria-invalid":m||void 0,"aria-describedby":k,onKeyDown:r==="checkbox"?Ce:void 0,onChange:s(()=>{n(r==="radio"?h.value:i?q.filter(y=>y!==h.value):[...q,h.value])},"onChange")}),(0,f.jsx)("span",{lang:h.lang?.lang,dir:h.lang?.dir,children:h.label})]},h.value)})})}s(te,"oe");c(te,"ChoiceList");function ne(e){let[r,o,t]=[e.day,e.month,e.year].map(n=>Y(n).trim());if(!(r===""&&o===""&&t===""))return`${(t??"").padStart(4,"0")}-${(o??"").padStart(2,"0")}-${(r??"").padStart(2,"0")}`}s(ne,"ne");c(ne,"dateValue");function ae(e){let r=typeof e=="string"?/^(\d{4})-(\d{2})-(\d{2})$/.exec(e):null;return r===null?{day:"",month:"",year:""}:{day:String(Number(r[3])),month:String(Number(r[2])),year:r[1]}}s(ae,"te");c(ae,"dateParts");function Ne(e,r,o,t=new Date().getUTCFullYear()){if(r==="")return!1;let n=Number(r);return e==="day"?!(n>=1&&n<=31):e==="month"?!(n>=1&&n<=12):r.length!==4||n<1900||n>(o?t:2100)}s(Ne,"xe");c(Ne,"datePartBad");function le({ids:e,parts:r,onChange:o,labels:t,required:n,invalid:a,birthday:m,onPartBlur:k,onLeave:q}){let h=c(y=>{let _=y.target.dataset.part;_!==void 0&&k(_),y.currentTarget.contains(y.relatedTarget)||q()},"onBlur"),i=c((y,_)=>(0,f.jsxs)("div",{className:`sekyro-form-date__${y}`,children:[(0,f.jsx)("label",{className:"sekyro-help",htmlFor:`${e.control}-${y}`,children:t[y]}),(0,f.jsx)("input",{id:`${e.control}-${y}`,"data-part":y,className:"sekyro-input",type:"text",inputMode:"numeric",dir:"ltr",maxLength:_,autoComplete:m?`bday-${y}`:"off",required:n,"aria-invalid":a||void 0,"aria-describedby":D(e,!1,a),value:r[y],onChange:s(A=>o({...r,[y]:Y(A.target.value).replace(/\D/g,"")}),"onChange")})]}),"cell");return(0,f.jsxs)("div",{className:"sekyro-form-date",onBlur:h,children:[i("day",2),i("month",2),i("year",4)]})}s(le,"se");c(le,"DateInputs");function qe(e){return(0,E.useMemo)(()=>{let r=[];for(let t=65;t<=90;t++)for(let n=65;n<=90;n++){let a=String.fromCharCode(t,n);re(a)!==void 0&&a!=="AC"&&a!=="TA"&&r.push(a)}let o=new Intl.Collator(e);return r.map(t=>({code:t,name:J(t,e)})).sort((t,n)=>o.compare(t.name,n.name))},[e])}s(qe,"Me");c(qe,"useCountries");function ie({id:e,labelId:r,value:o,onChange:t,locale:n,placeholder:a,searchLabel:m,searchPlaceholder:k,noMatch:q,invalid:h,describedby:i}){let y=qe(n),[_,A]=(0,E.useState)(!1),z=(0,E.useRef)(null),P=(0,E.useRef)(null),p=(0,E.useId)(),M=`${e}-v`,L=y.find(b=>b.code===o),O=c(()=>{A(!1),requestAnimationFrame(()=>z.current?.focus())},"close");return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("button",{ref:z,id:e,type:"button",className:"sekyro-input sekyro-form-country","aria-labelledby":`${r} ${M}`,"aria-expanded":_,"aria-controls":_?p:void 0,"aria-invalid":h||void 0,"aria-describedby":i,onClick:s(()=>{A(b=>!b),_||requestAnimationFrame(()=>P.current?.focus())},"onClick"),children:L!==void 0?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:ve(L.code)}),(0,f.jsx)("span",{className:"sekyro-form-country__name",id:M,children:L.name})]}):(0,f.jsx)("span",{className:"sekyro-form-country__name is-empty",id:M,children:a})}),_?(0,f.jsx)("div",{id:p,className:"sekyro-form-country__list",onKeyDown:s(b=>{b.key==="Escape"&&(b.preventDefault(),O())},"onKeyDown"),children:(0,f.jsx)(be,{countries:y,label:(0,f.jsx)("span",{className:"sekyro-visually-hidden",children:m}),searchPlaceholder:k,noMatch:q,selected:o,searchRef:P,scroll:!0,onPick:s(b=>{t(b),O()},"onPick")})}):null]})}s(ie,"ae");c(ie,"CountryField");var T="\0other",_e,oe;function xe(e){let[r,o]=(0,F.useState)(_e);return(0,F.useEffect)(()=>{if(!e||r!==void 0)return;let t=!0;return oe??(oe=import("./icons-form-R366YPMB-6C7SJPCB.js").then(n=>_e=n.FORM_OPTION_ICON_PATHS)),oe.then(n=>t&&o(n)).catch(()=>{}),()=>{t=!1}},[e,r]),r}s(xe,"Te");c(xe,"useOptionIcons");function we({icon:e,imageUrl:r,icons:o}){let[t,n]=(0,F.useState)(!1);if(r!==void 0&&!t)return(0,g.jsx)("img",{className:"sekyro-form-card__picture",src:r,alt:"",loading:"lazy",decoding:"async",onError:s(()=>n(!0),"onError")});let a=e!==void 0?o?.[e]:void 0;return a===void 0?null:(0,g.jsx)("span",{className:"sekyro-form-card__icon","aria-hidden":"true",children:(0,g.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,focusable:"false",dangerouslySetInnerHTML:{__html:a}})})}s(we,"qe");c(we,"OptionPicture");function Se({name:e,labelId:r,remote:o,draft:t,onChange:n,required:a,invalid:m,describedby:k,client:q,copy:h}){let[i,y]=(0,F.useState)(""),_=(0,F.useId)(),A=(0,F.useId)(),z=(0,F.useRef)(null),[P,p]=(0,F.useState)(!1),M=o.options.length>Z.remoteFilterAbove,L=(0,F.useMemo)(()=>M?me(o.options,i):o.options,[o.options,i,M]),O=o.otherLabel??h.other,b=xe(o.options.some(u=>u.icon!==void 0));(0,F.useEffect)(()=>{P&&(z.current?.focus(),p(!1))},[P]);let x=c(u=>{u===T?(n({pick:T,other:t.other}),p(!0)):n({pick:u,other:""})},"pick");return(0,g.jsxs)("div",{className:"sekyro-form-remote",children:[M?(0,g.jsxs)("div",{className:"sekyro-field sekyro-form-remote__filter",children:[(0,g.jsx)("label",{className:"sekyro-help",htmlFor:_,children:h.filter}),(0,g.jsx)("input",{id:_,className:"sekyro-input",type:"search",autoComplete:"off",value:i,onChange:s(u=>y(u.target.value),"onChange")}),(0,g.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:i.trim()===""?"":h.results(L.length)})]}):null,(0,g.jsxs)("div",{className:"sekyro-form-cards",role:"radiogroup","aria-labelledby":r,"aria-required":a||void 0,"aria-invalid":m||void 0,"aria-describedby":k,children:[L.map(u=>{let I=t.pick===u.value;return(0,g.jsxs)("label",{className:"sekyro-form-card","data-value":u.value,children:[(0,g.jsx)("input",{type:"radio",name:e,value:u.value,checked:I,required:a,"aria-invalid":m||void 0,onChange:s(()=>x(u.value),"onChange")}),(0,g.jsx)(we,{icon:u.icon,imageUrl:u.imageUrl,icons:b}),(0,g.jsxs)("span",{className:"sekyro-form-card__text",lang:q.lang,children:[u.title!==void 0?(0,g.jsx)("span",{className:"sekyro-form-card__title",dir:"auto",children:u.title}):null,(0,g.jsx)("span",{className:"sekyro-form-card__label",dir:"auto",children:u.label}),u.description!==void 0?(0,g.jsx)("span",{className:"sekyro-form-card__description",dir:"auto",children:u.description}):null]})]},u.value)}),M&&L.length===0&&!o.allowOther?(0,g.jsx)("p",{className:"sekyro-help sekyro-form-remote__none",children:h.noMatch}):null,o.allowOther?(0,g.jsxs)("label",{className:"sekyro-form-card sekyro-form-card--other",children:[(0,g.jsx)("input",{type:"radio",name:e,value:T,checked:t.pick===T,required:a,"aria-invalid":m||void 0,onChange:s(()=>x(T),"onChange")}),(0,g.jsx)("span",{className:"sekyro-form-card__text",children:(0,g.jsx)("span",{className:"sekyro-form-card__label",dir:"auto",lang:o.otherLabel!==void 0?q.lang:void 0,children:O})})]}):null]}),t.pick===T?(0,g.jsxs)("div",{className:"sekyro-field sekyro-form-remote__other",children:[(0,g.jsx)("label",{className:"sekyro-help",htmlFor:A,children:o.otherLabel??h.otherField}),(0,g.jsx)("input",{id:A,ref:z,className:"sekyro-input",type:"text",autoComplete:"off",maxLength:Z.remoteOther,required:a,"aria-invalid":m||void 0,"aria-describedby":k,value:t.other,onChange:s(u=>n({pick:T,other:u.target.value}),"onChange")})]}):null]})}s(Se,"Se");c(Se,"OptionCardList");var De={en:H,fr:Re,ar:Oe,es:H,pt:H,de:H};function Me(e){let r=e.strings,o=De[e.locale];return(t,n)=>ye(r[t]??o[t]??"",n)}s(Me,"Be");c(Me,"formCopy");var Te=new Set(["single_choice","multiple_choice","yes_no","remote_choice"]),je=c(e=>e.kind==="field"?e.field==="country":Te.has(e.type),"isChoice");function Ae(e,r,o){if(e.kind==="field")switch(e.field){case"birth_date":return ae(r);case"phone":return typeof r=="string"?r:"";case"address":{let t=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{};return{line1:t.lines?.[0]??"",line2:t.lines?.slice(1).join(", ")??"",city:t.city??"",postcode:t.postcode??"",country:t.country??o}}default:return typeof r=="string"?r:""}switch(e.type){case"multiple_choice":return Array.isArray(r)?r:[];case"yes_no":return typeof r=="boolean"?r:null;case"single_choice":return typeof r=="string"?r:null;case"date":return ae(r);case"number":return typeof r=="number"?String(r):"";case"remote_choice":return{pick:null,other:""};default:return typeof r=="string"?r:""}}s(Ae,"Ke");c(Ae,"draftOf");function Fe(e,r){if(e.kind==="field")switch(e.field){case"birth_date":return ne(r);case"phone":return r||void 0;case"address":{let o=r,t=[o.line1,o.line2].map(n=>n.trim()).filter(n=>n!=="");return t.length===0&&o.city.trim()===""&&o.postcode.trim()===""?void 0:{country:o.country,city:o.city.trim(),lines:t,...o.postcode.trim()!==""?{postcode:o.postcode.trim()}:{}}}case"email":return r.trim().toLowerCase()||void 0;default:return r.trim()||void 0}switch(e.type){case"multiple_choice":return r.length>0?r:void 0;case"yes_no":return typeof r=="boolean"?r:void 0;case"single_choice":return typeof r=="string"?r:void 0;case"date":return ne(r);case"remote_choice":{let o=r;return o.pick===null?void 0:o.pick===T?{other:o.other.trim()}:o.pick}case"number":{let o=Y(r).replace(/[\s ]/g,"").replace(/[,٫]/g,".");if(o==="")return;let t=Number(o);return Number.isFinite(t)&&/^-?\d+(\.\d+)?$/.test(o)?t:Number.NaN}default:return r.trim()||void 0}}s(Fe,"Ye");c(Fe,"answerOf");function $e(e,r,o,t){let n=c(m=>{try{return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${String(m)}T00:00:00Z`))}catch{return String(m)}},"date"),a=e.params??{};switch(e.code){case"required":return o(r!==void 0&&je(r)?"form.errors.choiceRequired":"form.errors.required");case"consent_required":return o("form.errors.consentRequired");case"too_long":return o("form.errors.tooLong",{max:Number(a.max??0)});case"too_short":return o("form.errors.tooShort",{min:Number(a.min??0)});case"email_invalid":return o("form.errors.email");case"phone_invalid":return o("form.errors.phone");case"date_invalid":return o("form.errors.date");case"date_not_past":return o("form.errors.datePast");case"date_not_future":return o("form.errors.dateFuture");case"date_too_early":return o("form.errors.dateMin",{date:n(a.date)});case"date_too_late":return o("form.errors.dateMax",{date:n(a.date)});case"number_invalid":return o("form.errors.number");case"number_not_integer":return o("form.errors.numberInteger");case"number_decimals":return o("form.errors.numberDecimals");case"number_too_small":return o("form.errors.numberMin",{min:new Intl.NumberFormat(t).format(Number(a.min??0))});case"number_too_large":return o("form.errors.numberMax",{max:new Intl.NumberFormat(t).format(Number(a.max??0))});case"address_invalid":return o("form.errors.address");case"card_number":return o("form.errors.cardNumber");default:return o("form.errors.choice")}}s($e,"Ue");c($e,"issueText");var W={full_name:200,occupation:120,email:254,short_text:120,long_text:1e3};function Le(e,r){let o=new Intl.PluralRules(r);return{other:e("form.remote.other"),otherField:e("form.remote.otherField"),filter:e("form.remote.filter"),results:c(t=>e(`form.remote.results.${o.select(t)}`,{count:t})||e("form.remote.results.other",{count:t}),"results"),noMatch:e("form.remote.noMatch")}}s(Le,"je");c(Le,"remoteCopy");function Ve({step:e,i18n:r,onError:o}){let t=Me(r),{form:n}=e,a={lang:n.locale,dir:e.dir},m=typeof n.prefill?.country=="string"?n.prefill.country:"",[k,q]=(0,S.useState)(()=>Object.fromEntries(n.questions.map(d=>[d.id,Ae(d,n.prefill?.[d.id],m)]))),[h,i]=(0,S.useState)({}),[y,_]=(0,S.useState)([]),[A,z]=(0,S.useState)(!1),[P,p]=(0,S.useState)(!1),[M,L]=(0,S.useState)(0),O=(0,S.useRef)(null),b=(0,S.useId)();(0,S.useEffect)(()=>{M!==0&&O.current?.querySelector('[aria-invalid="true"]')?.focus()},[M]);let x=c(d=>{let N=y.find(C=>C.id===d);return N===void 0?null:$e(N,n.questions.find(C=>C.id===d),t,r.locale)},"errorOf"),u=c((d,N)=>{q(C=>({...C,[d]:N})),_(C=>C.filter($=>$.id!==d))},"set"),I=c(()=>{let d={};for(let N of n.questions){let C=Fe(N,k[N.id]??null);C!==void 0&&(d[N.id]=C)}return{answers:d,consents:Object.fromEntries(n.consents.map(N=>[N.id,h[N.id]===!0]))}},"input"),j=c(d=>{let N=e.validate(I()).filter(C=>C.id===d&&C.code!=="required");_(C=>[...C.filter($=>$.id!==d),...N])},"checkOne"),v=c(d=>{if(d.preventDefault(),A)return;let N=I(),C=e.validate(N);if(C.length>0){_(C),L($=>$+1);return}z(!0),p(!1),e.submit(N).catch($=>{o?.($);let B=($ instanceof ce||$?.name==="FormAnswersError"?$.issues:null)?.filter(G=>n.questions.some(Q=>Q.id===G.id)||n.consents.some(Q=>Q.id===G.id))??[];B.length>0?(_(B),L(G=>G+1)):p(!0)}).finally(()=>z(!1))},"onSubmit"),w=c(d=>d?null:t("form.optional"),"optional");return(0,l.jsxs)("form",{ref:O,className:"sekyro-step sekyro-form","aria-labelledby":b,onSubmit:v,noValidate:!0,"data-testid":"sekyro-form-step",children:[(0,l.jsx)(fe,{id:b,title:n.title??t("form.title"),lead:n.intro??t("form.lead",{org:e.context.orgName}),lang:{...n.title!==void 0?{title:n.locale}:{},...n.intro!==void 0?{lead:n.locale}:{},dir:e.dir}}),P?(0,l.jsx)(pe,{tone:"danger",children:(0,l.jsx)("span",{children:t("form.errors.failed")})}):null,(0,l.jsx)("div",{className:"sekyro-form-questions",children:n.questions.map(d=>(0,l.jsx)(ze,{q:d,draft:k[d.id]??null,onChange:s(N=>u(d.id,N),"onChange"),error:x(d.id),optional:w(d.required),c:t,locale:r.locale,client:a,fallbackCountry:m,onCheck:s(()=>j(d.id),"onCheck")},d.id))}),n.consents.length>0?(0,l.jsxs)("fieldset",{className:"sekyro-form-q sekyro-form-group sekyro-form-consents",children:[(0,l.jsx)("legend",{className:"sekyro-label",children:t("form.consents")}),n.consents.map(d=>(0,l.jsx)(Ie,{id:d.id,text:d.text,link:d.link,required:d.required,checked:h[d.id]===!0,onChange:s(N=>{i(C=>({...C,[d.id]:N})),_(C=>C.filter($=>$.id!==d.id))},"onChange"),error:x(d.id),optional:w(d.required),openLink:t("form.openLink"),client:a},d.id))]}):null,(0,l.jsxs)(he,{children:[(0,l.jsx)(ue,{type:"submit",full:!0,disabled:A,"aria-busy":A||void 0,"data-testid":"sekyro-form-continue",children:t(A?"form.sending":"form.continue")}),(0,l.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:A?t("form.sending"):""})]})]})}s(Ve,"Mr");c(Ve,"FormView");function Ie({id:e,text:r,link:o,required:t,checked:n,onChange:a,error:m,optional:k,openLink:q,client:h}){let i=se();return(0,l.jsxs)("div",{className:"sekyro-form-consent","data-consent":e,children:[(0,l.jsxs)("div",{className:"sekyro-form-choice sekyro-form-consent__row",children:[(0,l.jsx)("input",{id:i.control,type:"checkbox",checked:n,required:t,"aria-invalid":m!==null||void 0,"aria-describedby":D(i,!1,m!==null),onChange:s(y=>a(y.target.checked),"onChange")}),(0,l.jsxs)("span",{className:"sekyro-form-consent__text",children:[(0,l.jsx)("label",{htmlFor:i.control,children:(0,l.jsx)(K,{text:r,lang:h,optional:k})}),o!==void 0?(0,l.jsxs)("a",{className:"sekyro-link sekyro-form-consent__link",href:o.url,target:"_blank",rel:"noopener noreferrer",lang:h.lang,dir:h.dir,children:[o.label,(0,l.jsxs)("span",{className:"sekyro-visually-hidden",children:[" (",q,")"]})]}):null]})]}),(0,l.jsx)(de,{ids:i,error:m})]})}s(Ie,"We");c(Ie,"Consent");function ze({q:e,draft:r,onChange:o,error:t,optional:n,c:a,locale:m,client:k,fallbackCountry:q,onCheck:h}){let i=se(),[y,_]=(0,S.useState)(()=>new Set),A=e.kind==="field"&&e.field==="birth_date",z=(A||e.kind==="custom"&&e.type==="date")&&[...y].some(v=>Ne(v,Y(r[v]??""),A)),P=t??(z?a("form.errors.date"):null),p=P!==null,M=e.kind==="custom"?e:null,L=M!==null?M.help:e.kind==="field"&&(e.field==="full_name"||e.field==="address")?a(`form.fields.${e.field}.help`):void 0,O=M!==null?k:void 0,b=M!==null?(0,l.jsx)(K,{text:M.label,lang:k,optional:n}):(0,l.jsx)(K,{text:a(`form.fields.${e.kind==="field"?e.field:""}.label`),optional:n}),x=(0,l.jsx)(de,{ids:i,help:L,helpLang:O,error:P}),u=D(i,L!==void 0,p),I=c(v=>v.long===!0?(0,l.jsx)("textarea",{id:i.control,className:"sekyro-input sekyro-form-textarea",rows:4,maxLength:v.max,required:e.required,"aria-invalid":p||void 0,"aria-describedby":u,value:r,onChange:s(w=>o(w.target.value),"onChange")}):(0,l.jsx)("input",{id:i.control,className:"sekyro-input",type:v.type??"text",inputMode:v.inputMode,autoComplete:v.autoComplete??"off",dir:v.dir,maxLength:v.max,required:e.required,"aria-invalid":p||void 0,"aria-describedby":u,value:r,onChange:s(w=>o(w.target.value),"onChange")}),"text");if(e.kind==="field")switch(e.field){case"full_name":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({autoComplete:"name",max:W.full_name})});case"occupation":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({autoComplete:"organization-title",max:W.occupation})});case"email":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({type:"email",inputMode:"email",autoComplete:"email",dir:"ltr",max:W.email})});case"country":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:(0,l.jsx)(ie,{id:i.control,labelId:`${i.control}-l`,value:r??"",onChange:o,locale:m,placeholder:a("form.choose"),searchLabel:a("doc.countrySearch"),searchPlaceholder:a("doc.countrySearch"),noMatch:a("doc.noCountryMatch"),invalid:p,describedby:u})});case"phone":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:(0,l.jsx)(Ee,{id:i.control,value:r,onChange:o,locale:m,c:a,fallbackCountry:q,required:e.required,invalid:p,describedby:u})});case"birth_date":return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsx)(le,{ids:i,parts:r,onChange:o,labels:{day:a("form.date.day"),month:a("form.date.month"),year:a("form.date.year")},required:e.required,invalid:p,birthday:!0,onPartBlur:s(v=>_(w=>new Set(w).add(v)),"onPartBlur"),onLeave:h})});case"address":{let v=r,w=c((d,N,C,$)=>(0,l.jsxs)("div",{className:"sekyro-field",children:[(0,l.jsx)("label",{className:"sekyro-help",id:`${i.control}-${d}-l`,htmlFor:`${i.control}-${d}`,children:a(N)}),d==="country"?(0,l.jsx)(ie,{id:`${i.control}-${d}`,labelId:`${i.control}-${d}-l`,value:v.country,onChange:s(B=>o({...v,country:B}),"onChange"),locale:m,placeholder:a("form.choose"),searchLabel:a("doc.countrySearch"),searchPlaceholder:a("doc.countrySearch"),noMatch:a("doc.noCountryMatch"),invalid:p,describedby:D(i,!1,p)}):(0,l.jsx)("input",{id:`${i.control}-${d}`,className:"sekyro-input",type:"text",autoComplete:C,maxLength:$,required:e.required&&d!=="line2"&&d!=="postcode","aria-invalid":p||void 0,"aria-describedby":D(i,!1,p),value:v[d],onChange:s(B=>o({...v,[d]:B.target.value}),"onChange")})]}),"part");return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsxs)("div",{className:"sekyro-form-address",children:[w("line1","form.address.line1","address-line1",120),w("line2","form.address.line2","address-line2",120),w("city","form.address.city","address-level2",80),w("postcode","form.address.postcode","postal-code",16),w("country","form.address.country","country",2)]})})}default:return null}let j=e;switch(j.type){case"short_text":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({max:W.short_text})});case"long_text":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({max:W.long_text,long:!0})});case"number":return(0,l.jsx)(R,{ids:i,label:b,notes:x,children:I({inputMode:"decimal",dir:"ltr",max:20})});case"date":return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsx)(le,{ids:i,parts:r,onChange:o,labels:{day:a("form.date.day"),month:a("form.date.month"),year:a("form.date.year")},required:e.required,invalid:p,birthday:!1,onPartBlur:s(v=>_(w=>new Set(w).add(v)),"onPartBlur"),onLeave:h})});case"yes_no":return(0,l.jsx)(V,{legend:b,notes:x,invalid:p,describedby:u,children:(0,l.jsx)(te,{name:i.control,type:"radio",options:[{value:"yes",label:a("form.yes")},{value:"no",label:a("form.no")}],value:r===!0?"yes":r===!1?"no":null,onChange:s(v=>o(v==="yes"),"onChange"),required:e.required,invalid:p,describedby:D(i,!1,p)})});case"remote_choice":return j.remote===void 0?null:(0,l.jsx)(V,{legend:(0,l.jsx)("span",{id:`${i.control}-l`,children:b}),notes:x,invalid:p,describedby:u,children:(0,l.jsx)(Se,{name:i.control,labelId:`${i.control}-l`,remote:j.remote,draft:r,onChange:o,required:e.required,invalid:p,describedby:D(i,!1,p),client:k,copy:Le(a,m)})});case"single_choice":case"multiple_choice":{let v=j.type==="multiple_choice";return(0,l.jsx)(V,{legend:b,notes:(0,l.jsxs)(l.Fragment,{children:[v?(0,l.jsx)("span",{className:"sekyro-help",children:a("form.chooseAny")}):null,x]}),invalid:p,describedby:u,children:(0,l.jsx)(te,{name:i.control,type:v?"checkbox":"radio",options:(j.choices??[]).map(w=>({value:w.value,label:w.label,lang:k})),value:r,onChange:o,required:e.required,invalid:p,describedby:D(i,!1,p)})})}default:return null}}s(ze,"Ze");c(ze,"Question");function Pe(e,r){let o=[];for(let a=65;a<=90;a++)for(let m=65;m<=90;m++){let k=String.fromCharCode(a,m),q=re(k);q!==void 0&&k!=="AC"&&k!=="TA"&&o.push({code:k,dial:`+${q}`})}let t=new Intl.Collator(r),n=new Map(o.map(a=>[a.code,J(a.code,r)]));return o.sort((a,m)=>a.code===e?-1:m.code===e?1:t.compare(n.get(a.code)??"",n.get(m.code)??"")),o}s(Pe,"Je");c(Pe,"phoneCountries");function Ee({id:e,value:r,onChange:o,locale:t,c:n,fallbackCountry:a,required:m,invalid:k,describedby:q}){let h=(0,S.useMemo)(()=>Pe(a||"MR",t),[a,t]),[i]=(0,S.useState)(()=>r||(h[0]?.dial??"")),y=ge({countries:h,international:!1,closed:!1,defaultPhone:i}),_=y.empty?"":y.typed??y.phone;return(0,S.useEffect)(()=>{_!==r&&o(_)},[_]),(0,l.jsx)(ke,{field:y,id:e,locale:t,t:n,required:m,invalid:k,describedby:q,compact:!0})}s(Ee,"Xe");c(Ee,"FormPhone");export{Ve as FormView,Me as formCopy};
|