@everymatrix/cashier-page 1.93.60 → 1.93.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/components/{CashierCarousel-DMrMmClP.cjs → CashierCarousel-BM-KceW7.cjs} +6 -6
  2. package/components/{CashierCarousel-DwrGzk7c.js → CashierCarousel-CwYg_hFh.js} +1004 -967
  3. package/components/{CashierCarousel-DJXsZKF9.js → CashierCarousel-DcUyAcwc.js} +950 -913
  4. package/components/CashierError-BeL8YqKx.cjs +1 -0
  5. package/components/CashierError-CfKKb6JV.js +831 -0
  6. package/components/CashierError-dD8Ujs5i.js +847 -0
  7. package/components/CashierHeader-BcMI_JFJ.cjs +1 -0
  8. package/components/CashierHeader-C7A_llUb.js +409 -0
  9. package/components/CashierHeader-DHBbF3Fw.js +409 -0
  10. package/components/{CashierIframeRedirect-CF8dL6ee.js → CashierIframeRedirect-BUfajkxx.js} +107 -95
  11. package/components/CashierIframeRedirect-cI2gXg_a.cjs +1 -0
  12. package/components/{CashierIframeRedirect-CbC9sVb1.js → CashierIframeRedirect-pWxVJsqa.js} +107 -95
  13. package/components/{CashierMethodDetails-DU55y4Rq.js → CashierMethodDetails-CyiT2xsa.js} +4410 -3877
  14. package/components/CashierMethodDetails-p9l4Iluu.cjs +85 -0
  15. package/components/{CashierMethodDetails-BrlBDyIX.js → CashierMethodDetails-vTXZEUgh.js} +4327 -3794
  16. package/components/{CashierMethodsList-CsZkLAGV.js → CashierMethodsList-By3SBa7K.js} +307 -264
  17. package/components/CashierMethodsList-CUErZLfD.cjs +1 -0
  18. package/components/{CashierMethodsList-DuiE7pDZ.js → CashierMethodsList-CZdQjuPQ.js} +308 -265
  19. package/components/{CashierModal-ZV_9oeml.js → CashierModal-CkZf2u_p.js} +20 -20
  20. package/components/{CashierModal-BLrymidc.cjs → CashierModal-DCXxFKAW.cjs} +1 -1
  21. package/components/{CashierModal-CV1Fn4BP.js → CashierModal-Sl2X44Qr.js} +19 -19
  22. package/components/{CashierNotifications-C_xReVni.js → CashierNotifications-6zJqvaK5.js} +18 -18
  23. package/components/{CashierNotifications-B8bRZMac.cjs → CashierNotifications-BJ9m5MR5.cjs} +1 -1
  24. package/components/{CashierNotifications-DHKh64xU.js → CashierNotifications-CI9LFS0z.js} +18 -18
  25. package/components/CashierPage-9HFOkmPt.cjs +1 -0
  26. package/components/CashierPage-CBLhCGtM.js +4851 -0
  27. package/components/CashierPage-ChksZ7x2.js +4811 -0
  28. package/components/CashierReceiptPage-C9vc8Tdq.js +1892 -0
  29. package/components/CashierReceiptPage-D7uA7grn.cjs +26 -0
  30. package/components/CashierReceiptPage-DiyMd0oq.js +1912 -0
  31. package/components/{CashierSessionExpirationModal-DlbWG4xD.js → CashierSessionExpirationModal-DsVCou9W.js} +514 -487
  32. package/components/CashierSessionExpirationModal-TeGdT9SY.cjs +2 -0
  33. package/components/{CashierSessionExpirationModal-C0KV3SHR.js → CashierSessionExpirationModal-u83AoXvo.js} +490 -463
  34. package/components/{CashierSpinner-D3HhhmOb.js → CashierSpinner-CxccWP9P.js} +9 -9
  35. package/components/{CashierSpinner-DKYO0FtD.cjs → CashierSpinner-D6QJrkuJ.cjs} +1 -1
  36. package/components/{CashierSpinner-DyemUXs_.js → CashierSpinner-h23y-7eM.js} +9 -9
  37. package/components/CashierStepUp-BaKfagWu.js +1204 -0
  38. package/components/CashierStepUp-Bwo5aVPT.cjs +1 -0
  39. package/components/CashierStepUp-cTf7L6t4.js +1165 -0
  40. package/components/CashierTransactionHistory-Dd5ydbYM.js +1394 -0
  41. package/components/CashierTransactionHistory-Dx7mVKOh.cjs +1 -0
  42. package/components/CashierTransactionHistory-JR1DrsVh.js +1394 -0
  43. package/components/CashierVerifications-0enYZZLD.js +683 -0
  44. package/components/CashierVerifications-C_73oFvm.cjs +1 -0
  45. package/components/CashierVerifications-clMzLemr.js +687 -0
  46. package/components/{TxnStatusIcon-ssLhQR5N.js → TxnStatusIcon-BdmgpoFK.js} +5 -5
  47. package/components/{TxnStatusIcon-CWkyVMIU.cjs → TxnStatusIcon-BuY_lIOK.cjs} +1 -1
  48. package/components/{TxnStatusIcon-BwvCa-Ig.js → TxnStatusIcon-DdHua6_u.js} +5 -5
  49. package/components/{TxnTypeIcons-CTQXT_j5.cjs → TxnTypeIcons-BOR9sqs3.cjs} +1 -1
  50. package/components/{TxnTypeIcons-B84nFRMh.js → TxnTypeIcons-Dj4BEiZD.js} +1 -1
  51. package/components/{TxnTypeIcons-DhwUYw-o.js → TxnTypeIcons-GA3AS07V.js} +1 -1
  52. package/es2015/cashier-page.cjs +1 -1
  53. package/es2015/cashier-page.js +1 -1
  54. package/esnext/cashier-page.js +1 -1
  55. package/package.json +1 -1
  56. package/components/CashierError-BL_rmfvV.cjs +0 -1
  57. package/components/CashierError-Bqtyy8-q.js +0 -638
  58. package/components/CashierError-D054pa3k.js +0 -654
  59. package/components/CashierHeader-BNDmkX5f.js +0 -397
  60. package/components/CashierHeader-DJYOdmdi.js +0 -397
  61. package/components/CashierHeader-PvXFHPzQ.cjs +0 -1
  62. package/components/CashierIframeRedirect-C0AQ3pLh.cjs +0 -1
  63. package/components/CashierMethodDetails-DLCEFTpO.cjs +0 -85
  64. package/components/CashierMethodsList-D6dEg4zv.cjs +0 -1
  65. package/components/CashierPage-BtrYOlrz.js +0 -4584
  66. package/components/CashierPage-XewFlLFL.js +0 -4550
  67. package/components/CashierPage-ZwlEVQK1.cjs +0 -1
  68. package/components/CashierReceiptPage-BHUK-JH2.js +0 -1784
  69. package/components/CashierReceiptPage-Ur_cm9GB.cjs +0 -26
  70. package/components/CashierReceiptPage-ooyhUTMT.js +0 -1764
  71. package/components/CashierSessionExpirationModal-WrH-ardc.cjs +0 -2
  72. package/components/CashierStepUp-CSZd5C7z.js +0 -1130
  73. package/components/CashierStepUp-CmTcFbG9.js +0 -1091
  74. package/components/CashierStepUp-DKytvkqu.cjs +0 -1
  75. package/components/CashierTransactionHistory-DSJAL5H2.js +0 -1341
  76. package/components/CashierTransactionHistory-Dk0b66AC.cjs +0 -1
  77. package/components/CashierTransactionHistory-Dt-gnylu.js +0 -1341
  78. package/components/CashierVerifications-BUcxHXrG.js +0 -627
  79. package/components/CashierVerifications-Byj-MslV.js +0 -623
  80. package/components/CashierVerifications-f5t-nR--.cjs +0 -1
@@ -1,1130 +0,0 @@
1
- var Qe = Object.defineProperty, $e = Object.defineProperties;
2
- var et = Object.getOwnPropertyDescriptors;
3
- var Me = Object.getOwnPropertySymbols;
4
- var tt = Object.prototype.hasOwnProperty, nt = Object.prototype.propertyIsEnumerable;
5
- var Te = (n, t, e) => t in n ? Qe(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, ve = (n, t) => {
6
- for (var e in t || (t = {}))
7
- tt.call(t, e) && Te(n, e, t[e]);
8
- if (Me)
9
- for (var e of Me(t))
10
- nt.call(t, e) && Te(n, e, t[e]);
11
- return n;
12
- }, Le = (n, t) => $e(n, et(t));
13
- var me = (n, t, e) => new Promise((i, l) => {
14
- var a = (c) => {
15
- try {
16
- s(e.next(c));
17
- } catch (f) {
18
- l(f);
19
- }
20
- }, u = (c) => {
21
- try {
22
- s(e.throw(c));
23
- } catch (f) {
24
- l(f);
25
- }
26
- }, s = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(a, u);
27
- s((e = e.apply(n, t)).next());
28
- });
29
- import { a as it, $ as lt, S as ot, b as rt, s as st, f as oe, c as at, G as ke, e as O, k as S, m as v, o as r, p as ct, q as ut, y as ze, v as D, l as d, x as te, X as J, n as x, w as L, a2 as Be, W as Z, r as pt, Z as Ae, a4 as dt, B as ft, C as mt, D as ht, E as gt, F as bt } from "./CashierCarousel-DwrGzk7c.js";
30
- function Re(n, t) {
31
- it(n, t);
32
- }
33
- function wt(n) {
34
- lt.set(n);
35
- }
36
- const Ie = {
37
- en: {
38
- otpTitle: "Code verification is required",
39
- popupMessage: "Please enter the security code received on your SMS/email address to perform the update.",
40
- popupMessageLastWarning: "If the next validation attempt is failed, your transaction will fail and you will be returned back to payment method.",
41
- minutes: "minutes",
42
- errorHeader: "Error",
43
- configError: "Unable to load OTP data. Please try again later.",
44
- otpHeading: "Enter OTP",
45
- resendOtp: "Resent OTP",
46
- submit: "Submit",
47
- close: "Close",
48
- invalidOtp: "The code you've sent is not valid. Please try again.",
49
- accountBlocked: "Too many attempts for OTP. Your account has been blocked for one hour.",
50
- submissionError: "Something went wrong. Please try again.",
51
- otpExpiredMessage: "Validation code has expired, please request a new one to continue.",
52
- timeRemaining: "Code expires in:",
53
- selectChannelTitle: "Select verification method",
54
- selectChannelMessage: "Choose how you would like to receive your verification code",
55
- channelSMS: "SMS",
56
- channelEmail: "Email",
57
- sendCode: "Send code",
58
- waitSeconds: "Please wait for before resending:"
59
- },
60
- tr: {
61
- otpTitle: "Kod doğrulaması gereklidir",
62
- popupMessage: "Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",
63
- popupMessageLastWarning: "Bir sonraki doğrulama denemesi başarısız olursa, işleminiz başarısız olacak ve ödeme yöntemine geri döndürüleceksiniz.",
64
- minutes: "dakika",
65
- errorHeader: "Hata",
66
- configError: "OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",
67
- otpHeading: "OTP Girin",
68
- resendOtp: "OTP'yi Yeniden Gönder",
69
- submit: "Gönder",
70
- close: "Kapat",
71
- invalidOtp: "Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",
72
- accountBlocked: "OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",
73
- submissionError: "Bir şeyler ters gitti. Lütfen tekrar deneyin.",
74
- otpExpiredMessage: "Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",
75
- timeRemaining: "Kodun süresi doluyor:",
76
- selectChannelTitle: "Doğrulama yöntemi seçin",
77
- selectChannelMessage: "Doğrulama kodunuzu nasıl almak istediğinizi seçin",
78
- channelSMS: "SMS kodu",
79
- channelEmail: "E-posta kodu",
80
- sendCode: "Kodu gönder",
81
- waitSeconds: "Tekrar göndermeden önce lütfen bekleyin:"
82
- },
83
- fr: {
84
- otpTitle: "La vérification par code est requise",
85
- popupMessage: "Veuillez saisir le code de sécurité reçu par SMS ou par e-mail afin d’effectuer la mise à jour.",
86
- popupMessageLastWarning: "Si la prochaine tentative de validation échoue, votre transaction échouera et vous serez redirigé vers le moyen de paiement.",
87
- minutes: "minutes",
88
- errorHeader: "Erreur",
89
- configError: "Impossible de charger les données OTP. Veuillez réessayer plus tard.",
90
- otpHeading: "Saisir le code OTP",
91
- resendOtp: "Renvoyer le code OTP",
92
- submit: "Valider",
93
- close: "Fermer",
94
- invalidOtp: "Le code que vous avez saisi n’est pas valide. Veuillez réessayer.",
95
- accountBlocked: "Trop de tentatives de code OTP. Votre compte a été bloqué pendant une heure.",
96
- submissionError: "Une erreur s’est produite. Veuillez réessayer.",
97
- otpExpiredMessage: "Le code de validation a expiré. Veuillez en demander un nouveau pour continuer.",
98
- timeRemaining: "Le code expire dans :",
99
- selectChannelTitle: "Sélectionner la méthode de vérification",
100
- selectChannelMessage: "Choisissez comment vous souhaitez recevoir votre code de vérification",
101
- channelSMS: "SMS",
102
- channelEmail: "E-mail",
103
- sendCode: "Envoyer le code",
104
- waitSeconds: "Veuillez patienter avant de renvoyer le code :"
105
- }
106
- };
107
- function _t(n) {
108
- at(n, "svelte-gpy3mu", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}');
109
- }
110
- function Pe(n, t, e) {
111
- const i = n.slice();
112
- return i[69] = t[e], i[70] = t, i[71] = e, i;
113
- }
114
- function yt(n) {
115
- let t, e, i, l, a, u, s, c, f, _, w, T, M, b, m, y, C, R = (
116
- /*$_*/
117
- n[19]("channelSMS") + ""
118
- ), K, F, V, I, ne, q, Q, re, $, E, z, W, se, ae, ce = (
119
- /*$_*/
120
- n[19]("channelEmail") + ""
121
- ), U, he, X, H, Y, ue, pe;
122
- function de(p, k) {
123
- return (
124
- /*showResendOtp*/
125
- p[9] ? Et : (
126
- /*showOtpInput*/
127
- p[12] ? kt : Ct
128
- )
129
- );
130
- }
131
- let ee = de(n), G = ee(n), N = (
132
- /*selectedChannel*/
133
- n[0] && De(n)
134
- );
135
- function ge(p, k) {
136
- if (
137
- /*isLoading*/
138
- p[3] && /*showOtpInput*/
139
- p[12]
140
- )
141
- return zt;
142
- if (
143
- /*showOtpInput*/
144
- p[12] && /*config*/
145
- p[4]
146
- )
147
- return Lt;
148
- }
149
- let ie = ge(n), j = ie && ie(n);
150
- function be(p, k) {
151
- if (
152
- /*showResendOtp*/
153
- p[9]
154
- )
155
- return Rt;
156
- if (
157
- /*showOtpInput*/
158
- p[12] && /*config*/
159
- p[4]
160
- )
161
- return At;
162
- }
163
- let le = be(n), P = le && le(n);
164
- return {
165
- c() {
166
- t = v("div"), G.c(), e = x(), i = v("div"), l = v("label"), a = v("div"), u = x(), s = v("input"), f = x(), _ = v("div"), w = J("svg"), T = J("path"), M = J("circle"), b = J("circle"), m = J("circle"), y = x(), C = v("span"), K = L(R), F = x(), V = v("label"), I = v("div"), ne = x(), q = v("input"), re = x(), $ = v("div"), E = J("svg"), z = J("rect"), W = J("path"), se = x(), ae = v("span"), U = L(ce), he = x(), N && N.c(), X = x(), j && j.c(), H = x(), Y = v("div"), P && P.c(), r(t, "class", "OtpDescription"), r(a, "class", "RadioIndicator"), Z(
167
- a,
168
- "checked",
169
- /*selectedChannel*/
170
- n[0] === /*channels*/
171
- n[20].SMS
172
- ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
173
- n[20].SMS, s.checked = c = /*selectedChannel*/
174
- n[0] === /*channels*/
175
- n[20].SMS, r(T, "d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"), r(M, "cx", "9"), r(M, "cy", "11"), r(M, "r", "0.5"), r(M, "fill", "currentColor"), r(b, "cx", "12"), r(b, "cy", "11"), r(b, "r", "0.5"), r(b, "fill", "currentColor"), r(m, "cx", "15"), r(m, "cy", "11"), r(m, "r", "0.5"), r(m, "fill", "currentColor"), r(w, "xmlns", "http://www.w3.org/2000/svg"), r(w, "width", "24"), r(w, "height", "24"), r(w, "viewBox", "0 0 24 24"), r(w, "fill", "none"), r(w, "stroke", "currentColor"), r(w, "stroke-width", "2"), r(w, "stroke-linecap", "round"), r(w, "stroke-linejoin", "round"), r(_, "class", "ChannelContent"), r(l, "class", "ChannelCheckbox"), Z(
176
- l,
177
- "selected",
178
- /*selectedChannel*/
179
- n[0] === /*channels*/
180
- n[20].SMS
181
- ), r(I, "class", "RadioIndicator"), Z(
182
- I,
183
- "checked",
184
- /*selectedChannel*/
185
- n[0] === /*channels*/
186
- n[20].EMAIL
187
- ), r(q, "type", "radio"), r(q, "name", "channel"), q.value = /*channels*/
188
- n[20].EMAIL, q.checked = Q = /*selectedChannel*/
189
- n[0] === /*channels*/
190
- n[20].EMAIL, r(z, "x", "2"), r(z, "y", "4"), r(z, "width", "20"), r(z, "height", "16"), r(z, "rx", "2"), r(W, "d", "m2 7 10 6 10-6"), r(E, "xmlns", "http://www.w3.org/2000/svg"), r(E, "width", "24"), r(E, "height", "24"), r(E, "viewBox", "0 0 24 24"), r(E, "fill", "none"), r(E, "stroke", "currentColor"), r(E, "stroke-width", "2"), r(E, "stroke-linecap", "round"), r(E, "stroke-linejoin", "round"), r($, "class", "ChannelContent"), r(V, "class", "ChannelCheckbox"), Z(
191
- V,
192
- "selected",
193
- /*selectedChannel*/
194
- n[0] === /*channels*/
195
- n[20].EMAIL
196
- ), r(i, "class", "ChannelSelection"), r(Y, "class", "OtpActionButtons");
197
- },
198
- m(p, k) {
199
- S(p, t, k), G.m(t, null), S(p, e, k), S(p, i, k), d(i, l), d(l, a), d(l, u), d(l, s), d(l, f), d(l, _), d(_, w), d(w, T), d(w, M), d(w, b), d(w, m), d(_, y), d(_, C), d(C, K), d(i, F), d(i, V), d(V, I), d(V, ne), d(V, q), d(V, re), d(V, $), d($, E), d(E, z), d(E, W), d($, se), d($, ae), d(ae, U), S(p, he, k), N && N.m(p, k), S(p, X, k), j && j.m(p, k), S(p, H, k), S(p, Y, k), P && P.m(Y, null), ue || (pe = [
200
- te(
201
- s,
202
- "change",
203
- /*change_handler*/
204
- n[39]
205
- ),
206
- te(
207
- q,
208
- "change",
209
- /*change_handler_1*/
210
- n[40]
211
- )
212
- ], ue = !0);
213
- },
214
- p(p, k) {
215
- ee === (ee = de(p)) && G ? G.p(p, k) : (G.d(1), G = ee(p), G && (G.c(), G.m(t, null))), k[0] & /*selectedChannel, channels*/
216
- 1048577 && Z(
217
- a,
218
- "checked",
219
- /*selectedChannel*/
220
- p[0] === /*channels*/
221
- p[20].SMS
222
- ), k[0] & /*selectedChannel*/
223
- 1 && c !== (c = /*selectedChannel*/
224
- p[0] === /*channels*/
225
- p[20].SMS) && (s.checked = c), k[0] & /*$_*/
226
- 524288 && R !== (R = /*$_*/
227
- p[19]("channelSMS") + "") && D(K, R), k[0] & /*selectedChannel, channels*/
228
- 1048577 && Z(
229
- l,
230
- "selected",
231
- /*selectedChannel*/
232
- p[0] === /*channels*/
233
- p[20].SMS
234
- ), k[0] & /*selectedChannel, channels*/
235
- 1048577 && Z(
236
- I,
237
- "checked",
238
- /*selectedChannel*/
239
- p[0] === /*channels*/
240
- p[20].EMAIL
241
- ), k[0] & /*selectedChannel*/
242
- 1 && Q !== (Q = /*selectedChannel*/
243
- p[0] === /*channels*/
244
- p[20].EMAIL) && (q.checked = Q), k[0] & /*$_*/
245
- 524288 && ce !== (ce = /*$_*/
246
- p[19]("channelEmail") + "") && D(U, ce), k[0] & /*selectedChannel, channels*/
247
- 1048577 && Z(
248
- V,
249
- "selected",
250
- /*selectedChannel*/
251
- p[0] === /*channels*/
252
- p[20].EMAIL
253
- ), /*selectedChannel*/
254
- p[0] ? N ? N.p(p, k) : (N = De(p), N.c(), N.m(X.parentNode, X)) : N && (N.d(1), N = null), ie === (ie = ge(p)) && j ? j.p(p, k) : (j && j.d(1), j = ie && ie(p), j && (j.c(), j.m(H.parentNode, H))), le === (le = be(p)) && P ? P.p(p, k) : (P && P.d(1), P = le && le(p), P && (P.c(), P.m(Y, null)));
255
- },
256
- d(p) {
257
- p && (O(t), O(e), O(i), O(he), O(X), O(H), O(Y)), G.d(), N && N.d(p), j && j.d(p), P && P.d(), ue = !1, Be(pe);
258
- }
259
- };
260
- }
261
- function vt(n) {
262
- let t, e, i, l, a, u, s = (
263
- /*$_*/
264
- n[19]("errorHeader") + ""
265
- ), c, f, _, w, T, M, b = (
266
- /*$_*/
267
- n[19]("close") + ""
268
- ), m, y, C;
269
- return {
270
- c() {
271
- t = v("div"), e = v("div"), i = J("svg"), l = J("path"), a = x(), u = v("h2"), c = L(s), f = x(), _ = v("p"), w = L(
272
- /*errorMessage*/
273
- n[8]
274
- ), T = x(), M = v("button"), m = L(b), r(l, "d", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"), r(i, "xmlns", "http://www.w3.org/2000/svg"), r(i, "viewBox", "0 0 512 512"), r(e, "class", "OtpErrorHeader"), r(M, "class", "OtpButton error"), r(t, "class", "OtpError");
275
- },
276
- m(R, K) {
277
- S(R, t, K), d(t, e), d(e, i), d(i, l), d(e, a), d(e, u), d(u, c), d(t, f), d(t, _), d(_, w), d(t, T), d(t, M), d(M, m), y || (C = te(
278
- M,
279
- "click",
280
- /*manualClosePopup*/
281
- n[28]
282
- ), y = !0);
283
- },
284
- p(R, K) {
285
- K[0] & /*$_*/
286
- 524288 && s !== (s = /*$_*/
287
- R[19]("errorHeader") + "") && D(c, s), K[0] & /*errorMessage*/
288
- 256 && D(
289
- w,
290
- /*errorMessage*/
291
- R[8]
292
- ), K[0] & /*$_*/
293
- 524288 && b !== (b = /*$_*/
294
- R[19]("close") + "") && D(m, b);
295
- },
296
- d(R) {
297
- R && O(t), y = !1, C();
298
- }
299
- };
300
- }
301
- function kt(n) {
302
- let t, e, i, l;
303
- function a(f, _) {
304
- return (
305
- /*isLastWarning*/
306
- f[10] ? St : Ot
307
- );
308
- }
309
- let u = a(n), s = u(n), c = (
310
- /*hasErrors*/
311
- n[6] && xe(n)
312
- );
313
- return {
314
- c() {
315
- t = v("p"), s.c(), i = x(), c && c.c(), l = pt(), r(t, "class", e = /*isLastWarning*/
316
- n[10] ? "LastWarningMessage" : "");
317
- },
318
- m(f, _) {
319
- S(f, t, _), s.m(t, null), S(f, i, _), c && c.m(f, _), S(f, l, _);
320
- },
321
- p(f, _) {
322
- u === (u = a(f)) && s ? s.p(f, _) : (s.d(1), s = u(f), s && (s.c(), s.m(t, null))), _[0] & /*isLastWarning*/
323
- 1024 && e !== (e = /*isLastWarning*/
324
- f[10] ? "LastWarningMessage" : "") && r(t, "class", e), /*hasErrors*/
325
- f[6] ? c ? c.p(f, _) : (c = xe(f), c.c(), c.m(l.parentNode, l)) : c && (c.d(1), c = null);
326
- },
327
- d(f) {
328
- f && (O(t), O(i), O(l)), s.d(), c && c.d(f);
329
- }
330
- };
331
- }
332
- function Ct(n) {
333
- let t, e = (
334
- /*$_*/
335
- (n[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
336
- ), i;
337
- return {
338
- c() {
339
- t = v("p"), i = L(e);
340
- },
341
- m(l, a) {
342
- S(l, t, a), d(t, i);
343
- },
344
- p(l, a) {
345
- a[0] & /*$_*/
346
- 524288 && e !== (e = /*$_*/
347
- (l[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && D(i, e);
348
- },
349
- d(l) {
350
- l && O(t);
351
- }
352
- };
353
- }
354
- function Et(n) {
355
- let t, e = (
356
- /*$_*/
357
- n[19]("otpExpiredMessage") + ""
358
- ), i;
359
- return {
360
- c() {
361
- t = v("p"), i = L(e), r(t, "class", "OtpNoticeMessage"), r(t, "role", "alert");
362
- },
363
- m(l, a) {
364
- S(l, t, a), d(t, i);
365
- },
366
- p(l, a) {
367
- a[0] & /*$_*/
368
- 524288 && e !== (e = /*$_*/
369
- l[19]("otpExpiredMessage") + "") && D(i, e);
370
- },
371
- d(l) {
372
- l && O(t);
373
- }
374
- };
375
- }
376
- function Ot(n) {
377
- let t = (
378
- /*$_*/
379
- n[19]("popupMessage") + ""
380
- ), e;
381
- return {
382
- c() {
383
- e = L(t);
384
- },
385
- m(i, l) {
386
- S(i, e, l);
387
- },
388
- p(i, l) {
389
- l[0] & /*$_*/
390
- 524288 && t !== (t = /*$_*/
391
- i[19]("popupMessage") + "") && D(e, t);
392
- },
393
- d(i) {
394
- i && O(e);
395
- }
396
- };
397
- }
398
- function St(n) {
399
- let t = (
400
- /*$_*/
401
- n[19]("popupMessageLastWarning") + ""
402
- ), e;
403
- return {
404
- c() {
405
- e = L(t);
406
- },
407
- m(i, l) {
408
- S(i, e, l);
409
- },
410
- p(i, l) {
411
- l[0] & /*$_*/
412
- 524288 && t !== (t = /*$_*/
413
- i[19]("popupMessageLastWarning") + "") && D(e, t);
414
- },
415
- d(i) {
416
- i && O(e);
417
- }
418
- };
419
- }
420
- function xe(n) {
421
- let t, e;
422
- return {
423
- c() {
424
- t = v("p"), e = L(
425
- /*errorMessage*/
426
- n[8]
427
- ), r(t, "class", "OtpErrorMessage"), r(t, "role", "alert");
428
- },
429
- m(i, l) {
430
- S(i, t, l), d(t, e);
431
- },
432
- p(i, l) {
433
- l[0] & /*errorMessage*/
434
- 256 && D(
435
- e,
436
- /*errorMessage*/
437
- i[8]
438
- );
439
- },
440
- d(i) {
441
- i && O(t);
442
- }
443
- };
444
- }
445
- function De(n) {
446
- let t, e, i, l;
447
- function a(c, f) {
448
- return (
449
- /*currentChannelTimer*/
450
- c[17] > 0 ? Tt : Mt
451
- );
452
- }
453
- let u = a(n), s = u(n);
454
- return {
455
- c() {
456
- t = v("button"), s.c(), r(t, "class", "OtpButton"), t.disabled = e = !/*canSubmitChannel*/
457
- n[18], Z(t, "disabled", !/*canSubmitChannel*/
458
- n[18] || /*waitingForConfig*/
459
- n[16]);
460
- },
461
- m(c, f) {
462
- S(c, t, f), s.m(t, null), i || (l = te(
463
- t,
464
- "click",
465
- /*handleChannelSubmit*/
466
- n[22]
467
- ), i = !0);
468
- },
469
- p(c, f) {
470
- u === (u = a(c)) && s ? s.p(c, f) : (s.d(1), s = u(c), s && (s.c(), s.m(t, null))), f[0] & /*canSubmitChannel*/
471
- 262144 && e !== (e = !/*canSubmitChannel*/
472
- c[18]) && (t.disabled = e), f[0] & /*canSubmitChannel, waitingForConfig*/
473
- 327680 && Z(t, "disabled", !/*canSubmitChannel*/
474
- c[18] || /*waitingForConfig*/
475
- c[16]);
476
- },
477
- d(c) {
478
- c && O(t), s.d(), i = !1, l();
479
- }
480
- };
481
- }
482
- function Mt(n) {
483
- let t = (
484
- /*$_*/
485
- n[19]("sendCode") + ""
486
- ), e;
487
- return {
488
- c() {
489
- e = L(t);
490
- },
491
- m(i, l) {
492
- S(i, e, l);
493
- },
494
- p(i, l) {
495
- l[0] & /*$_*/
496
- 524288 && t !== (t = /*$_*/
497
- i[19]("sendCode") + "") && D(e, t);
498
- },
499
- d(i) {
500
- i && O(e);
501
- }
502
- };
503
- }
504
- function Tt(n) {
505
- let t = (
506
- /*$_*/
507
- n[19]("waitSeconds") + ""
508
- ), e, i, l, a;
509
- return {
510
- c() {
511
- e = L(t), i = L(" ("), l = L(
512
- /*currentChannelTimer*/
513
- n[17]
514
- ), a = L("s)");
515
- },
516
- m(u, s) {
517
- S(u, e, s), S(u, i, s), S(u, l, s), S(u, a, s);
518
- },
519
- p(u, s) {
520
- s[0] & /*$_*/
521
- 524288 && t !== (t = /*$_*/
522
- u[19]("waitSeconds") + "") && D(e, t), s[0] & /*currentChannelTimer*/
523
- 131072 && D(
524
- l,
525
- /*currentChannelTimer*/
526
- u[17]
527
- );
528
- },
529
- d(u) {
530
- u && (O(e), O(i), O(l), O(a));
531
- }
532
- };
533
- }
534
- function Lt(n) {
535
- let t, e, i = (
536
- /*$_*/
537
- n[19]("timeRemaining") + ""
538
- ), l, a, u = (
539
- /*formatTime*/
540
- n[23](
541
- /*timeLeft*/
542
- n[5]
543
- ) + ""
544
- ), s, c, f = (
545
- /*$_*/
546
- n[19]("minutes") + ""
547
- ), _, w, T, M = Ae(
548
- /*otp*/
549
- n[2]
550
- ), b = [];
551
- for (let m = 0; m < M.length; m += 1)
552
- b[m] = je(Pe(n, M, m));
553
- return {
554
- c() {
555
- t = v("div"), e = v("div"), l = L(i), a = x(), s = L(u), c = x(), _ = L(f), w = x(), T = v("div");
556
- for (let m = 0; m < b.length; m += 1)
557
- b[m].c();
558
- r(e, "class", "OtpTimer"), r(T, "class", "OtpField"), r(t, "class", "OtpFieldWrapper");
559
- },
560
- m(m, y) {
561
- S(m, t, y), d(t, e), d(e, l), d(e, a), d(e, s), d(e, c), d(e, _), d(t, w), d(t, T);
562
- for (let C = 0; C < b.length; C += 1)
563
- b[C] && b[C].m(T, null);
564
- },
565
- p(m, y) {
566
- if (y[0] & /*$_*/
567
- 524288 && i !== (i = /*$_*/
568
- m[19]("timeRemaining") + "") && D(l, i), y[0] & /*timeLeft*/
569
- 32 && u !== (u = /*formatTime*/
570
- m[23](
571
- /*timeLeft*/
572
- m[5]
573
- ) + "") && D(s, u), y[0] & /*$_*/
574
- 524288 && f !== (f = /*$_*/
575
- m[19]("minutes") + "") && D(_, f), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
576
- 117458964) {
577
- M = Ae(
578
- /*otp*/
579
- m[2]
580
- );
581
- let C;
582
- for (C = 0; C < M.length; C += 1) {
583
- const R = Pe(m, M, C);
584
- b[C] ? b[C].p(R, y) : (b[C] = je(R), b[C].c(), b[C].m(T, null));
585
- }
586
- for (; C < b.length; C += 1)
587
- b[C].d(1);
588
- b.length = M.length;
589
- }
590
- },
591
- d(m) {
592
- m && O(t), dt(b, m);
593
- }
594
- };
595
- }
596
- function zt(n) {
597
- let t;
598
- return {
599
- c() {
600
- t = v("div"), t.innerHTML = '<span class="OtpLoader"></span>', r(t, "class", "OtpLoaderContainer");
601
- },
602
- m(e, i) {
603
- S(e, t, i);
604
- },
605
- p: ke,
606
- d(e) {
607
- e && O(t);
608
- }
609
- };
610
- }
611
- function je(n) {
612
- let t, e, i, l = (
613
- /*index*/
614
- n[71]
615
- ), a, u;
616
- const s = () => (
617
- /*input_binding*/
618
- n[41](t, l)
619
- ), c = () => (
620
- /*input_binding*/
621
- n[41](null, l)
622
- );
623
- function f(...w) {
624
- return (
625
- /*input_handler*/
626
- n[42](
627
- /*index*/
628
- n[71],
629
- ...w
630
- )
631
- );
632
- }
633
- function _(...w) {
634
- return (
635
- /*keydown_handler*/
636
- n[43](
637
- /*index*/
638
- n[71],
639
- ...w
640
- )
641
- );
642
- }
643
- return {
644
- c() {
645
- t = v("input"), r(t, "id", `otp-input-${/*index*/
646
- n[71]}`), r(t, "type", "text"), r(t, "class", e = `otp-box ${/*config*/
647
- n[4].inputLength % 2 === 0 && /*index*/
648
- n[71] === /*config*/
649
- n[4].inputLength / 2 - 1 ? "space" : ""}`), r(t, "maxlength", 1), t.value = i = /*char*/
650
- n[69], r(t, "inputmode", "numeric"), t.disabled = /*inputDisabled*/
651
- n[11], r(t, "autocomplete", "off");
652
- },
653
- m(w, T) {
654
- S(w, t, T), s(), a || (u = [
655
- te(t, "input", f),
656
- te(t, "keydown", _),
657
- te(
658
- t,
659
- "paste",
660
- /*handleOnPasteOtp*/
661
- n[24]
662
- )
663
- ], a = !0);
664
- },
665
- p(w, T) {
666
- n = w, T[0] & /*config*/
667
- 16 && e !== (e = `otp-box ${/*config*/
668
- n[4].inputLength % 2 === 0 && /*index*/
669
- n[71] === /*config*/
670
- n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(t, "class", e), T[0] & /*otp*/
671
- 4 && i !== (i = /*char*/
672
- n[69]) && t.value !== i && (t.value = i), T[0] & /*inputDisabled*/
673
- 2048 && (t.disabled = /*inputDisabled*/
674
- n[11]), l !== /*index*/
675
- n[71] && (c(), l = /*index*/
676
- n[71], s());
677
- },
678
- d(w) {
679
- w && O(t), c(), a = !1, Be(u);
680
- }
681
- };
682
- }
683
- function At(n) {
684
- let t, e = (
685
- /*$_*/
686
- n[19]("submit") + ""
687
- ), i, l, a, u;
688
- return {
689
- c() {
690
- t = v("button"), i = L(e), r(t, "class", "OtpButton"), t.disabled = l = /*otp*/
691
- n[2].join("").length !== /*config*/
692
- n[4].inputLength || /*isSubmitting*/
693
- n[13] || /*maxAttempts*/
694
- n[15];
695
- },
696
- m(s, c) {
697
- S(s, t, c), d(t, i), a || (u = te(
698
- t,
699
- "click",
700
- /*submitOtp*/
701
- n[29]
702
- ), a = !0);
703
- },
704
- p(s, c) {
705
- c[0] & /*$_*/
706
- 524288 && e !== (e = /*$_*/
707
- s[19]("submit") + "") && D(i, e), c[0] & /*otp, config, isSubmitting, maxAttempts*/
708
- 40980 && l !== (l = /*otp*/
709
- s[2].join("").length !== /*config*/
710
- s[4].inputLength || /*isSubmitting*/
711
- s[13] || /*maxAttempts*/
712
- s[15]) && (t.disabled = l);
713
- },
714
- d(s) {
715
- s && O(t), a = !1, u();
716
- }
717
- };
718
- }
719
- function Rt(n) {
720
- let t, e = (
721
- /*$_*/
722
- n[19]("resendOtp") + ""
723
- ), i, l, a;
724
- return {
725
- c() {
726
- t = v("button"), i = L(e), r(t, "class", "OtpButton");
727
- },
728
- m(u, s) {
729
- S(u, t, s), d(t, i), l || (a = te(
730
- t,
731
- "click",
732
- /*handleResendOtp*/
733
- n[27]
734
- ), l = !0);
735
- },
736
- p(u, s) {
737
- s[0] & /*$_*/
738
- 524288 && e !== (e = /*$_*/
739
- u[19]("resendOtp") + "") && D(i, e);
740
- },
741
- d(u) {
742
- u && O(t), l = !1, a();
743
- }
744
- };
745
- }
746
- function It(n) {
747
- let t;
748
- function e(a, u) {
749
- return (
750
- /*hasConfigErrors*/
751
- a[7] ? vt : yt
752
- );
753
- }
754
- let i = e(n), l = i(n);
755
- return {
756
- c() {
757
- t = v("div"), l.c(), r(t, "class", "OtpContent");
758
- },
759
- m(a, u) {
760
- S(a, t, u), l.m(t, null), n[44](t);
761
- },
762
- p(a, u) {
763
- i === (i = e(a)) && l ? l.p(a, u) : (l.d(1), l = i(a), l && (l.c(), l.m(t, null)));
764
- },
765
- i: ke,
766
- o: ke,
767
- d(a) {
768
- a && O(t), l.d(), n[44](null);
769
- }
770
- };
771
- }
772
- function Pt(n, t, e) {
773
- let i, l, a;
774
- ct(n, bt, (o) => e(19, a = o));
775
- let { clientstyling: u = "" } = t, { clientstylingurl: s = "" } = t, { mbsource: c } = t, { lang: f = "en" } = t, { endpoint: _ } = t, { session: w } = t, { translationurl: T } = t, { templateid: M } = t, b = [], m = !0, y = null, C = 0, R = "", K = "", F = !1, V = !1, I = "", ne = "", q = "", Q = !1, re = !1, $ = !1, E = "", z = {}, W = null, se = !1, ae = !1, ce = "", U, he, X = [], H = null, Y = 0, ue = !1, pe = !1;
776
- const de = { SMS: "sms", EMAIL: "email" }, ee = {
777
- MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
778
- INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
779
- MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
780
- };
781
- Object.keys(Ie).forEach((o) => {
782
- Re(o, Ie[o]);
783
- });
784
- const G = () => {
785
- wt(f);
786
- }, N = () => {
787
- fetch(T).then((o) => o.json()).then((o) => {
788
- Object.keys(o).forEach((h) => {
789
- Re(h, o[h]);
790
- });
791
- }).catch((o) => {
792
- console.log(o);
793
- });
794
- }, ge = (o) => me(this, null, function* () {
795
- var h;
796
- if ((h = o.detail) != null && h["x-step-up-required"]) {
797
- if (e(7, V = !1), e(6, F = !1), e(8, I = ""), ne = o.detail["x-step-up-token"], q = o.detail.flow, !ne || !q) {
798
- e(3, m = !1), e(7, V = !0), e(8, I = a("configError"));
799
- return;
800
- }
801
- e(12, se = !1), e(3, m = !1);
802
- }
803
- }), ie = () => {
804
- H && (clearInterval(H), H = null), W && (clearInterval(W), W = null), e(6, F = !1), e(7, V = !1), e(8, I = ""), e(10, re = !1), e(2, b = []), e(4, y = null), e(3, m = !0), e(0, E = ""), e(12, se = !1), e(38, z = {});
805
- }, j = () => {
806
- ie();
807
- }, be = () => new Promise((o, h) => {
808
- const g = new URL(`${_}/api/pam/v1/mfa/challenge/${ne}`), A = new Headers();
809
- A.append("accept", "application/json"), A.append("Content-Type", "application/json"), A.append("X-SessionId", `${w}`), e(16, pe = !0);
810
- const fe = {
811
- method: "PATCH",
812
- headers: A,
813
- body: JSON.stringify({
814
- channel: E,
815
- templateId: M
816
- })
817
- };
818
- fetch(g, fe).then((Se) => Se.json()).then(() => {
819
- e(15, ue = !1), k(), we(), o();
820
- }).catch((Se) => {
821
- h();
822
- });
823
- }), le = () => {
824
- W && clearInterval(W), W = setInterval(
825
- () => {
826
- const o = ve({}, z);
827
- let h = !1;
828
- Object.keys(o).forEach((g) => {
829
- o[g] > 0 && (o[g]--, h = !0);
830
- }), e(38, z = o), !h && W && (clearInterval(W), W = null);
831
- },
832
- 1e3
833
- );
834
- }, P = (o) => {
835
- e(0, E = o);
836
- }, p = () => me(this, null, function* () {
837
- if (!(!E || z[E] && z[E] > 0)) {
838
- e(3, m = !0), M && M.startsWith("2fa-") && e(30, M = `2fa-${E}`);
839
- try {
840
- yield be(), yield ye(), e(38, z = Le(ve({}, z), {
841
- [E]: 30
842
- })), le(), e(12, se = !0), k(), we();
843
- } catch (o) {
844
- console.error("Error submitting channel:", o), e(6, F = !0), e(8, I = a("submissionError"));
845
- } finally {
846
- e(3, m = !1);
847
- }
848
- }
849
- }), k = () => {
850
- const o = new Date(R), h = new Date(K), g = /* @__PURE__ */ new Date(), A = h.getTime() - g.getTime();
851
- Y = o.getTime() - A;
852
- const B = Date.now(), fe = Math.max(0, Math.floor((Y - B) / 1e3));
853
- e(5, C = fe);
854
- }, we = () => {
855
- H && clearInterval(H), H = setInterval(
856
- () => {
857
- const o = Date.now(), h = Math.max(0, Math.floor((Y - o) / 1e3));
858
- e(5, C = h), e(11, $ = h <= 0), h <= 0 && (clearInterval(H), H = null, e(9, Q = !0), e(6, F = !1), e(10, re = !1));
859
- },
860
- 1e3
861
- );
862
- }, Ve = (o) => {
863
- const h = Math.floor(o / 60), g = o % 60;
864
- return `${h.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`;
865
- }, _e = (o, h) => {
866
- const g = [...b];
867
- g[o] = h.toUpperCase(), e(2, b = g), g.join("") !== ce && e(13, ae = !1);
868
- }, He = (o) => {
869
- var A, B, fe;
870
- o.preventDefault();
871
- const g = (((B = (A = o.clipboardData) == null ? void 0 : A.getData("text")) == null ? void 0 : B.trim()) || "").slice(0, y.inputLength).split("");
872
- e(2, b = [...g, ...Array(y.inputLength - g.length).fill("")]), (fe = X[g.length]) == null || fe.focus(), g.length === y.inputLength && Oe();
873
- }, Ce = (o, h) => {
874
- const g = o.target, A = g.value;
875
- if (/^[a-z0-9]$/i.test(A)) {
876
- _e(h, A);
877
- const B = X[h + 1];
878
- B == null || B.focus();
879
- }
880
- g.value = "";
881
- }, Ee = (o, h) => {
882
- const g = o.key, A = o.ctrlKey || o.metaKey;
883
- if (/^[a-z0-9]$/i.test(g)) {
884
- if (A && g.toLowerCase() === "v")
885
- return;
886
- o.preventDefault(), _e(h, g);
887
- const B = X[h + 1];
888
- B == null || B.focus();
889
- } else if (g === "Backspace") {
890
- o.preventDefault(), b[h] !== "" && _e(h, "");
891
- const B = X[h - 1];
892
- B == null || B.focus();
893
- }
894
- }, Ne = () => {
895
- q == "stateful" && (be(), e(9, Q = !1));
896
- const o = new CustomEvent("otpResendRequested");
897
- window.dispatchEvent(o);
898
- }, We = (o) => {
899
- window.dispatchEvent(new CustomEvent(
900
- "otpSubmitted",
901
- {
902
- detail: {
903
- code: o,
904
- maxAttempts: y.maxValidationAttempts,
905
- validatedAttempts: y.numberOfValidateAttempts
906
- }
907
- }
908
- ));
909
- }, Fe = (o) => me(this, null, function* () {
910
- const h = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/validate`, _);
911
- h.searchParams.append("input", o);
912
- try {
913
- const g = yield fetch(h.href, { method: "POST" });
914
- if (g.status === 200) {
915
- qe();
916
- return;
917
- }
918
- const A = yield g.json();
919
- throw new Error(A.message);
920
- } catch (g) {
921
- if (yield ye(), g.message === ee.INTERNAL_SERVER_ERROR) {
922
- if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
923
- window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
924
- {
925
- type: "WidgetNotification",
926
- data: {
927
- type: "error",
928
- message: a("accountBlocked")
929
- }
930
- },
931
- window.location.href
932
- ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
933
- return;
934
- }
935
- e(6, F = !0), e(8, I = a("invalidOtp")), ye();
936
- return;
937
- }
938
- g.message === ee.MAX_INVALIDATE && (e(6, F = !0), e(8, I = a("invalidOtp"))), g.details === ee.MAX_ATTEMPTS_EXCEEDED && e(15, ue = !0), console.error("OTP submission failed:", g), e(6, F = !0), e(8, I = a("submissionError"));
939
- } finally {
940
- e(3, m = !1);
941
- }
942
- }), qe = () => {
943
- window.dispatchEvent(new CustomEvent(
944
- "otpSuccess",
945
- {
946
- detail: {
947
- message: "User successfully authenticated"
948
- }
949
- }
950
- ));
951
- }, Ue = () => {
952
- window.dispatchEvent(new CustomEvent("manualClosePopup"));
953
- }, Oe = () => me(this, null, function* () {
954
- if (b.join("").length !== y.inputLength) {
955
- e(6, F = !0), e(8, I = a("invalidOtp"));
956
- return;
957
- }
958
- const o = b.join("");
959
- e(13, ae = !0), ce = o, e(3, m = !0), e(6, F = !1), e(8, I = ""), q === "stateless" && We(o), q === "stateful" && (yield Fe(o));
960
- }), ye = () => me(this, null, function* () {
961
- if (_)
962
- try {
963
- e(3, m = !0);
964
- const o = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/config`, _), h = yield fetch(o.href), g = yield h.json();
965
- if (h.ok)
966
- e(4, y = g), e(2, b = Array(y.inputLength).fill("")), e(9, Q = !1), R = y.expirationTime, K = y.serverTime, y.numberOfValidateAttempts !== 0 && (e(6, F = !0), e(8, I = a("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && e(10, re = !0), e(3, m = !1), k(), we(), e(16, pe = !1);
967
- else if (g && g.details === ee.MAX_ATTEMPTS_EXCEEDED)
968
- window.dispatchEvent(new CustomEvent("manualClosePopup"));
969
- else {
970
- const A = g && g.message || `Failed to load config. Status: ${h.status}`;
971
- throw new Error(A);
972
- }
973
- } catch (o) {
974
- e(3, m = !1), e(7, V = !0), e(8, I = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", o);
975
- }
976
- });
977
- ut(() => (window.addEventListener("stepUpAuthRequired", ge, !1), window.addEventListener("closePopup", j, !1), () => {
978
- window.removeEventListener("stepUpAuthRequired", ge), window.removeEventListener("closePopup", j, !1), H && clearInterval(H), W && clearInterval(W);
979
- }));
980
- const Xe = () => P(de.SMS), Ke = () => P(de.EMAIL);
981
- function Ge(o, h) {
982
- ze[o ? "unshift" : "push"](() => {
983
- X[h] = o, e(14, X);
984
- });
985
- }
986
- const Ye = (o, h) => Ce(h, o), Je = (o, h) => Ee(h, o);
987
- function Ze(o) {
988
- ze[o ? "unshift" : "push"](() => {
989
- U = o, e(1, U);
990
- });
991
- }
992
- return n.$$set = (o) => {
993
- "clientstyling" in o && e(31, u = o.clientstyling), "clientstylingurl" in o && e(32, s = o.clientstylingurl), "mbsource" in o && e(33, c = o.mbsource), "lang" in o && e(34, f = o.lang), "endpoint" in o && e(35, _ = o.endpoint), "session" in o && e(36, w = o.session), "translationurl" in o && e(37, T = o.translationurl), "templateid" in o && e(30, M = o.templateid);
994
- }, n.$$.update = () => {
995
- n.$$.dirty[0] & /*customStylingContainer*/
996
- 2 | n.$$.dirty[1] & /*clientstyling*/
997
- 1 && u && U && ft(U, u), n.$$.dirty[0] & /*customStylingContainer*/
998
- 2 | n.$$.dirty[1] & /*clientstylingurl*/
999
- 2 && s && U && mt(U, s), n.$$.dirty[0] & /*customStylingContainer*/
1000
- 2 | n.$$.dirty[1] & /*mbsource*/
1001
- 4 && c && U && ht(U, `${c}.Style`, he), n.$$.dirty[1] & /*lang*/
1002
- 8 && f && G(), n.$$.dirty[1] & /*lang, translationurl*/
1003
- 72 && f && T && N(), n.$$.dirty[0] & /*selectedChannel*/
1004
- 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
1005
- 128 && e(18, i = E && (!z[E] || z[E] === 0)), n.$$.dirty[0] & /*selectedChannel*/
1006
- 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
1007
- 128 && e(17, l = E && z[E] || 0);
1008
- }, [
1009
- E,
1010
- U,
1011
- b,
1012
- m,
1013
- y,
1014
- C,
1015
- F,
1016
- V,
1017
- I,
1018
- Q,
1019
- re,
1020
- $,
1021
- se,
1022
- ae,
1023
- X,
1024
- ue,
1025
- pe,
1026
- l,
1027
- i,
1028
- a,
1029
- de,
1030
- P,
1031
- p,
1032
- Ve,
1033
- He,
1034
- Ce,
1035
- Ee,
1036
- Ne,
1037
- Ue,
1038
- Oe,
1039
- M,
1040
- u,
1041
- s,
1042
- c,
1043
- f,
1044
- _,
1045
- w,
1046
- T,
1047
- z,
1048
- Xe,
1049
- Ke,
1050
- Ge,
1051
- Ye,
1052
- Je,
1053
- Ze
1054
- ];
1055
- }
1056
- class xt extends ot {
1057
- constructor(t) {
1058
- super(), rt(
1059
- this,
1060
- t,
1061
- Pt,
1062
- It,
1063
- st,
1064
- {
1065
- clientstyling: 31,
1066
- clientstylingurl: 32,
1067
- mbsource: 33,
1068
- lang: 34,
1069
- endpoint: 35,
1070
- session: 36,
1071
- translationurl: 37,
1072
- templateid: 30
1073
- },
1074
- _t,
1075
- [-1, -1, -1]
1076
- );
1077
- }
1078
- get clientstyling() {
1079
- return this.$$.ctx[31];
1080
- }
1081
- set clientstyling(t) {
1082
- this.$$set({ clientstyling: t }), oe();
1083
- }
1084
- get clientstylingurl() {
1085
- return this.$$.ctx[32];
1086
- }
1087
- set clientstylingurl(t) {
1088
- this.$$set({ clientstylingurl: t }), oe();
1089
- }
1090
- get mbsource() {
1091
- return this.$$.ctx[33];
1092
- }
1093
- set mbsource(t) {
1094
- this.$$set({ mbsource: t }), oe();
1095
- }
1096
- get lang() {
1097
- return this.$$.ctx[34];
1098
- }
1099
- set lang(t) {
1100
- this.$$set({ lang: t }), oe();
1101
- }
1102
- get endpoint() {
1103
- return this.$$.ctx[35];
1104
- }
1105
- set endpoint(t) {
1106
- this.$$set({ endpoint: t }), oe();
1107
- }
1108
- get session() {
1109
- return this.$$.ctx[36];
1110
- }
1111
- set session(t) {
1112
- this.$$set({ session: t }), oe();
1113
- }
1114
- get translationurl() {
1115
- return this.$$.ctx[37];
1116
- }
1117
- set translationurl(t) {
1118
- this.$$set({ translationurl: t }), oe();
1119
- }
1120
- get templateid() {
1121
- return this.$$.ctx[30];
1122
- }
1123
- set templateid(t) {
1124
- this.$$set({ templateid: t }), oe();
1125
- }
1126
- }
1127
- gt(xt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1128
- export {
1129
- xt as default
1130
- };