@everymatrix/cashier-page-nd 1.69.158 → 1.69.161

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 (70) hide show
  1. package/components/{CashierCarousel-C5QNf4lE.js → CashierCarousel-BNKjZ4dF.js} +68 -80
  2. package/components/{CashierCarousel-Jl2aqYfe.cjs → CashierCarousel-CecQbbdW.cjs} +1 -1
  3. package/components/{CashierCarousel-SDse7_hX.js → CashierCarousel-D8MiOwuE.js} +78 -90
  4. package/components/{CashierError-Jdj_uZ4I.js → CashierError-BwZRYX5r.js} +1 -1
  5. package/components/{CashierError-Bwwq1pwM.cjs → CashierError-DFQyDQHn.cjs} +1 -1
  6. package/components/{CashierError-DkeWHxFp.js → CashierError-kVdNczE9.js} +1 -1
  7. package/components/CashierHeader-B3b8zbwP.cjs +1 -0
  8. package/components/{CashierHeader-Bfh3U7q4.js → CashierHeader-B9Y-DaUB.js} +40 -47
  9. package/components/{CashierHeader-Cee3k8wZ.js → CashierHeader-CzpZDjFX.js} +40 -47
  10. package/components/{CashierIframeRedirect-aSqRnHR6.js → CashierIframeRedirect-B_A79AFN.js} +31 -40
  11. package/components/CashierIframeRedirect-YYamzRsf.cjs +1 -0
  12. package/components/{CashierIframeRedirect-BrbS0BDH.js → CashierIframeRedirect-aTaiu0hG.js} +31 -40
  13. package/components/CashierMethodDetails-Djz0YVdl.cjs +85 -0
  14. package/components/{CashierMethodDetails-DX-z6Jjw.js → CashierMethodDetails-vqZ-0qpb.js} +2369 -2359
  15. package/components/{CashierMethodDetails-i-RQQsra.js → CashierMethodDetails-zjBgl5O9.js} +2224 -2214
  16. package/components/CashierMethodsList-B2jqSv5Z.cjs +1 -0
  17. package/components/{CashierMethodsList-BHs-wwYk.js → CashierMethodsList-Cnn42TjJ.js} +133 -149
  18. package/components/{CashierMethodsList-BGudjIvl.js → CashierMethodsList-DZpnLNKK.js} +157 -173
  19. package/components/{CashierModal-yJBbNL81.js → CashierModal-BE9c03E8.js} +24 -22
  20. package/components/CashierModal-Diij1t-w.cjs +1 -0
  21. package/components/{CashierModal-CwsfMVcW.js → CashierModal-R6fQk7sI.js} +31 -29
  22. package/components/{CashierNotifications-CFvZHX_b.js → CashierNotifications-5EjGguMj.js} +1 -1
  23. package/components/{CashierNotifications-hmcOuIJT.cjs → CashierNotifications-kuNLTOB3.cjs} +1 -1
  24. package/components/{CashierNotifications-DMZuy8M1.js → CashierNotifications-mhDeZtGd.js} +1 -1
  25. package/components/CashierPage--bNtt0ZB.js +4020 -0
  26. package/components/CashierPage-AuMyT6Ml.js +3994 -0
  27. package/components/CashierPage-DnWBs_Ec.cjs +1 -0
  28. package/components/{CashierReceiptPage-DuEiUyJc.js → CashierReceiptPage-4CpH6Lph.js} +546 -707
  29. package/components/{CashierReceiptPage-B9a7gDY-.js → CashierReceiptPage-CaOh6aYf.js} +512 -673
  30. package/components/{CashierReceiptPage-C3EVhPo1.cjs → CashierReceiptPage-DtDeyhLN.cjs} +2 -2
  31. package/components/CashierSessionExpirationModal-B2cq879y.js +1181 -0
  32. package/components/CashierSessionExpirationModal-MEJ82s4s.cjs +2 -0
  33. package/components/CashierSessionExpirationModal-QiihT6us.js +1181 -0
  34. package/components/{CashierSpinner-CXXRwfkL.js → CashierSpinner-CYSebSGZ.js} +1 -1
  35. package/components/{CashierSpinner-XWfResBK.js → CashierSpinner-DIyI0RD1.js} +1 -1
  36. package/components/{CashierSpinner-DHf6UHDV.cjs → CashierSpinner-DVLxgI0s.cjs} +1 -1
  37. package/components/CashierStepUp-CvPD-MgB.js +1060 -0
  38. package/components/CashierStepUp-DDBuGQ0M.cjs +1 -0
  39. package/components/CashierStepUp-NmLeVdoy.js +1099 -0
  40. package/components/{CashierTransactionHistory-wILVLaBk.js → CashierTransactionHistory-BXhu8BW2.js} +5 -5
  41. package/components/{CashierTransactionHistory-DK5N-xDu.cjs → CashierTransactionHistory-Ce_eQe-8.cjs} +1 -1
  42. package/components/{CashierTransactionHistory-B8cH2q8D.js → CashierTransactionHistory-DY_jYf9w.js} +5 -5
  43. package/components/{CashierVerifications-jxiTTMUn.js → CashierVerifications-BKBGiKZW.js} +106 -125
  44. package/components/{CashierVerifications-DEAJcpkR.js → CashierVerifications-BW5zvUQo.js} +109 -128
  45. package/components/CashierVerifications-CTga7bbd.cjs +1 -0
  46. package/components/{TxnStatusIcon-BRmGPXeu.js → TxnStatusIcon-CpJJHtXq.js} +1 -1
  47. package/components/{TxnStatusIcon-BorUmEdf.cjs → TxnStatusIcon-DuWdYaRx.cjs} +1 -1
  48. package/components/{TxnStatusIcon-B7vs3WN_.js → TxnStatusIcon-Krgh5oF3.js} +1 -1
  49. package/components/{TxnTypeIcons-DvPoXWdX.js → TxnTypeIcons-Az6Gbxxw.js} +1 -1
  50. package/components/{TxnTypeIcons-C_PpXN7w.js → TxnTypeIcons-Bvy6NVGO.js} +1 -1
  51. package/components/{TxnTypeIcons-CDAmP_Qb.cjs → TxnTypeIcons-iU9VGsWs.cjs} +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/CashierHeader-CMbldu41.cjs +0 -1
  57. package/components/CashierIframeRedirect-C913Adzi.cjs +0 -1
  58. package/components/CashierMethodDetails-CkmKFn6o.cjs +0 -85
  59. package/components/CashierMethodsList-Bi3djwQ1.cjs +0 -1
  60. package/components/CashierModal-BNtmC5_L.cjs +0 -1
  61. package/components/CashierPage-0AG8inLp.cjs +0 -1
  62. package/components/CashierPage-CCOmel8o.js +0 -3914
  63. package/components/CashierPage-DK3pkfDN.js +0 -3940
  64. package/components/CashierSessionExpirationModal-BCXqjFP1.cjs +0 -2
  65. package/components/CashierSessionExpirationModal-CUZEUmS8.js +0 -1187
  66. package/components/CashierSessionExpirationModal-VNg9En5U.js +0 -1187
  67. package/components/CashierStepUp-BUkCs2Td.js +0 -1109
  68. package/components/CashierStepUp-BkNgRDll.js +0 -1070
  69. package/components/CashierStepUp-Cbk0-AbY.cjs +0 -1
  70. package/components/CashierVerifications-BvCSSDjh.cjs +0 -1
@@ -0,0 +1,1060 @@
1
+ import { a as Ue, $ as qe, S as Ke, b as Xe, s as Ge, f as oe, c as Ye, G as we, e as E, k as S, m as k, o as r, p as Je, q as Qe, y as Ce, v as D, l as u, x as te, W as J, n as P, w as T, _ as Ae, V as Q, r as Ze, X as Oe, a3 as $e, B as et, C as tt, D as nt, E as lt, F as ot } from "./CashierCarousel-BNKjZ4dF.js";
2
+ function Ee(n, e) {
3
+ Ue(n, e);
4
+ }
5
+ function it(n) {
6
+ qe.set(n);
7
+ }
8
+ const Se = {
9
+ en: {
10
+ otpTitle: "Code verification is required",
11
+ popupMessage: "Please enter the security code received on your SMS/email address to perform the update.",
12
+ popupMessageLastWarning: "If the next validation attempt is failed, you will be logged out and blocked temporarily.",
13
+ minutes: "minutes",
14
+ errorHeader: "Error",
15
+ configError: "Unable to load OTP data. Please try again later.",
16
+ otpHeading: "Enter OTP",
17
+ resendOtp: "Resent OTP",
18
+ submit: "Submit",
19
+ close: "Close",
20
+ invalidOtp: "The code you've sent is not valid. Please try again.",
21
+ accountBlocked: "Too many attempts for OTP. Your account has been blocked for one hour.",
22
+ submissionError: "Something went wrong. Please try again.",
23
+ otpExpiredMessage: "Validation code has expired, please request a new one to continue.",
24
+ timeRemaining: "Code expires in:",
25
+ selectChannelTitle: "Select verification method",
26
+ selectChannelMessage: "Choose how you would like to receive your verification code",
27
+ channelSMS: "SMS",
28
+ channelEmail: "Email",
29
+ sendCode: "Send code",
30
+ waitSeconds: "Please wait for before resending:"
31
+ },
32
+ tr: {
33
+ otpTitle: "Kod doğrulaması gereklidir",
34
+ popupMessage: "Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",
35
+ popupMessageLastWarning: "Bir sonraki doğrulama denemesi başarısız olursa, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",
36
+ minutes: "dakika",
37
+ errorHeader: "Hata",
38
+ configError: "OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",
39
+ otpHeading: "OTP Girin",
40
+ resendOtp: "OTP'yi Yeniden Gönder",
41
+ submit: "Gönder",
42
+ close: "Kapat",
43
+ invalidOtp: "Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",
44
+ accountBlocked: "OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",
45
+ submissionError: "Bir şeyler ters gitti. Lütfen tekrar deneyin.",
46
+ otpExpiredMessage: "Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",
47
+ timeRemaining: "Kodun süresi doluyor:",
48
+ selectChannelTitle: "Select verification method",
49
+ selectChannelMessage: "Choose how you would like to receive your verification code",
50
+ channelSMS: "SMS kodu",
51
+ channelEmail: "E-posta kodu",
52
+ sendCode: "Kodu gönder",
53
+ waitSeconds: "Tekrar göndermeden önce lütfen bekleyin:"
54
+ }
55
+ };
56
+ function rt(n) {
57
+ Ye(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}}');
58
+ }
59
+ function Me(n, e, t) {
60
+ const l = n.slice();
61
+ return l[67] = e[t], l[68] = e, l[69] = t, l;
62
+ }
63
+ function st(n) {
64
+ let e, t, l, o, a, p, s, d, f, _, b, L, M, w, m, y, C, A = (
65
+ /*$_*/
66
+ n[17]("channelSMS") + ""
67
+ ), q, W, B, x, ne, F, Z, ie, $, O, I, V, re, se, ae = (
68
+ /*$_*/
69
+ n[17]("channelEmail") + ""
70
+ ), U, X, H, ee, G, ce, fe;
71
+ function me(c, v) {
72
+ return (
73
+ /*showResendOtp*/
74
+ c[9] ? ut : (
75
+ /*showOtpInput*/
76
+ c[12] ? ct : pt
77
+ )
78
+ );
79
+ }
80
+ let pe = me(n), K = pe(n), j = (
81
+ /*selectedChannel*/
82
+ n[0] && Te(n)
83
+ );
84
+ function ue(c, v) {
85
+ if (
86
+ /*isLoading*/
87
+ c[3] && /*showOtpInput*/
88
+ c[12]
89
+ )
90
+ return wt;
91
+ if (
92
+ /*showOtpInput*/
93
+ c[12] && /*config*/
94
+ c[4]
95
+ )
96
+ return gt;
97
+ }
98
+ let le = ue(n), R = le && le(n);
99
+ function he(c, v) {
100
+ if (
101
+ /*showResendOtp*/
102
+ c[9]
103
+ )
104
+ return _t;
105
+ if (
106
+ /*showOtpInput*/
107
+ c[12] && /*config*/
108
+ c[4]
109
+ )
110
+ return bt;
111
+ }
112
+ let Y = he(n), z = Y && Y(n);
113
+ return {
114
+ c() {
115
+ e = k("div"), K.c(), t = P(), l = k("div"), o = k("label"), a = k("div"), p = P(), s = k("input"), f = P(), _ = k("div"), b = J("svg"), L = J("path"), M = J("circle"), w = J("circle"), m = J("circle"), y = P(), C = k("span"), q = T(A), W = P(), B = k("label"), x = k("div"), ne = P(), F = k("input"), ie = P(), $ = k("div"), O = J("svg"), I = J("rect"), V = J("path"), re = P(), se = k("span"), U = T(ae), X = P(), j && j.c(), H = P(), R && R.c(), ee = P(), G = k("div"), z && z.c(), r(e, "class", "OtpDescription"), r(a, "class", "RadioIndicator"), Q(
116
+ a,
117
+ "checked",
118
+ /*selectedChannel*/
119
+ n[0] === /*channels*/
120
+ n[18].SMS
121
+ ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
122
+ n[18].SMS, s.checked = d = /*selectedChannel*/
123
+ n[0] === /*channels*/
124
+ n[18].SMS, r(L, "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(w, "cx", "12"), r(w, "cy", "11"), r(w, "r", "0.5"), r(w, "fill", "currentColor"), r(m, "cx", "15"), r(m, "cy", "11"), r(m, "r", "0.5"), r(m, "fill", "currentColor"), r(b, "xmlns", "http://www.w3.org/2000/svg"), r(b, "width", "24"), r(b, "height", "24"), r(b, "viewBox", "0 0 24 24"), r(b, "fill", "none"), r(b, "stroke", "currentColor"), r(b, "stroke-width", "2"), r(b, "stroke-linecap", "round"), r(b, "stroke-linejoin", "round"), r(_, "class", "ChannelContent"), r(o, "class", "ChannelCheckbox"), Q(
125
+ o,
126
+ "selected",
127
+ /*selectedChannel*/
128
+ n[0] === /*channels*/
129
+ n[18].SMS
130
+ ), r(x, "class", "RadioIndicator"), Q(
131
+ x,
132
+ "checked",
133
+ /*selectedChannel*/
134
+ n[0] === /*channels*/
135
+ n[18].EMAIL
136
+ ), r(F, "type", "radio"), r(F, "name", "channel"), F.value = /*channels*/
137
+ n[18].EMAIL, F.checked = Z = /*selectedChannel*/
138
+ n[0] === /*channels*/
139
+ n[18].EMAIL, r(I, "x", "2"), r(I, "y", "4"), r(I, "width", "20"), r(I, "height", "16"), r(I, "rx", "2"), r(V, "d", "m2 7 10 6 10-6"), r(O, "xmlns", "http://www.w3.org/2000/svg"), r(O, "width", "24"), r(O, "height", "24"), r(O, "viewBox", "0 0 24 24"), r(O, "fill", "none"), r(O, "stroke", "currentColor"), r(O, "stroke-width", "2"), r(O, "stroke-linecap", "round"), r(O, "stroke-linejoin", "round"), r($, "class", "ChannelContent"), r(B, "class", "ChannelCheckbox"), Q(
140
+ B,
141
+ "selected",
142
+ /*selectedChannel*/
143
+ n[0] === /*channels*/
144
+ n[18].EMAIL
145
+ ), r(l, "class", "ChannelSelection"), r(G, "class", "OtpActionButtons");
146
+ },
147
+ m(c, v) {
148
+ S(c, e, v), K.m(e, null), S(c, t, v), S(c, l, v), u(l, o), u(o, a), u(o, p), u(o, s), u(o, f), u(o, _), u(_, b), u(b, L), u(b, M), u(b, w), u(b, m), u(_, y), u(_, C), u(C, q), u(l, W), u(l, B), u(B, x), u(B, ne), u(B, F), u(B, ie), u(B, $), u($, O), u(O, I), u(O, V), u($, re), u($, se), u(se, U), S(c, X, v), j && j.m(c, v), S(c, H, v), R && R.m(c, v), S(c, ee, v), S(c, G, v), z && z.m(G, null), ce || (fe = [
149
+ te(
150
+ s,
151
+ "change",
152
+ /*change_handler*/
153
+ n[37]
154
+ ),
155
+ te(
156
+ F,
157
+ "change",
158
+ /*change_handler_1*/
159
+ n[38]
160
+ )
161
+ ], ce = !0);
162
+ },
163
+ p(c, v) {
164
+ pe === (pe = me(c)) && K ? K.p(c, v) : (K.d(1), K = pe(c), K && (K.c(), K.m(e, null))), v[0] & /*selectedChannel, channels*/
165
+ 262145 && Q(
166
+ a,
167
+ "checked",
168
+ /*selectedChannel*/
169
+ c[0] === /*channels*/
170
+ c[18].SMS
171
+ ), v[0] & /*selectedChannel*/
172
+ 1 && d !== (d = /*selectedChannel*/
173
+ c[0] === /*channels*/
174
+ c[18].SMS) && (s.checked = d), v[0] & /*$_*/
175
+ 131072 && A !== (A = /*$_*/
176
+ c[17]("channelSMS") + "") && D(q, A), v[0] & /*selectedChannel, channels*/
177
+ 262145 && Q(
178
+ o,
179
+ "selected",
180
+ /*selectedChannel*/
181
+ c[0] === /*channels*/
182
+ c[18].SMS
183
+ ), v[0] & /*selectedChannel, channels*/
184
+ 262145 && Q(
185
+ x,
186
+ "checked",
187
+ /*selectedChannel*/
188
+ c[0] === /*channels*/
189
+ c[18].EMAIL
190
+ ), v[0] & /*selectedChannel*/
191
+ 1 && Z !== (Z = /*selectedChannel*/
192
+ c[0] === /*channels*/
193
+ c[18].EMAIL) && (F.checked = Z), v[0] & /*$_*/
194
+ 131072 && ae !== (ae = /*$_*/
195
+ c[17]("channelEmail") + "") && D(U, ae), v[0] & /*selectedChannel, channels*/
196
+ 262145 && Q(
197
+ B,
198
+ "selected",
199
+ /*selectedChannel*/
200
+ c[0] === /*channels*/
201
+ c[18].EMAIL
202
+ ), /*selectedChannel*/
203
+ c[0] ? j ? j.p(c, v) : (j = Te(c), j.c(), j.m(H.parentNode, H)) : j && (j.d(1), j = null), le === (le = ue(c)) && R ? R.p(c, v) : (R && R.d(1), R = le && le(c), R && (R.c(), R.m(ee.parentNode, ee))), Y === (Y = he(c)) && z ? z.p(c, v) : (z && z.d(1), z = Y && Y(c), z && (z.c(), z.m(G, null)));
204
+ },
205
+ d(c) {
206
+ c && (E(e), E(t), E(l), E(X), E(H), E(ee), E(G)), K.d(), j && j.d(c), R && R.d(c), z && z.d(), ce = !1, Ae(fe);
207
+ }
208
+ };
209
+ }
210
+ function at(n) {
211
+ let e, t, l, o, a, p, s = (
212
+ /*$_*/
213
+ n[17]("errorHeader") + ""
214
+ ), d, f, _, b, L, M, w = (
215
+ /*$_*/
216
+ n[17]("close") + ""
217
+ ), m, y, C;
218
+ return {
219
+ c() {
220
+ e = k("div"), t = k("div"), l = J("svg"), o = J("path"), a = P(), p = k("h2"), d = T(s), f = P(), _ = k("p"), b = T(
221
+ /*errorMessage*/
222
+ n[8]
223
+ ), L = P(), M = k("button"), m = T(w), r(o, "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(l, "xmlns", "http://www.w3.org/2000/svg"), r(l, "viewBox", "0 0 512 512"), r(t, "class", "OtpErrorHeader"), r(M, "class", "OtpButton error"), r(e, "class", "OtpError");
224
+ },
225
+ m(A, q) {
226
+ S(A, e, q), u(e, t), u(t, l), u(l, o), u(t, a), u(t, p), u(p, d), u(e, f), u(e, _), u(_, b), u(e, L), u(e, M), u(M, m), y || (C = te(
227
+ M,
228
+ "click",
229
+ /*manualClosePopup*/
230
+ n[26]
231
+ ), y = !0);
232
+ },
233
+ p(A, q) {
234
+ q[0] & /*$_*/
235
+ 131072 && s !== (s = /*$_*/
236
+ A[17]("errorHeader") + "") && D(d, s), q[0] & /*errorMessage*/
237
+ 256 && D(
238
+ b,
239
+ /*errorMessage*/
240
+ A[8]
241
+ ), q[0] & /*$_*/
242
+ 131072 && w !== (w = /*$_*/
243
+ A[17]("close") + "") && D(m, w);
244
+ },
245
+ d(A) {
246
+ A && E(e), y = !1, C();
247
+ }
248
+ };
249
+ }
250
+ function ct(n) {
251
+ let e, t, l, o;
252
+ function a(f, _) {
253
+ return (
254
+ /*isLastWarning*/
255
+ f[10] ? ft : dt
256
+ );
257
+ }
258
+ let p = a(n), s = p(n), d = (
259
+ /*hasErrors*/
260
+ n[6] && Le(n)
261
+ );
262
+ return {
263
+ c() {
264
+ e = k("p"), s.c(), l = P(), d && d.c(), o = Ze(), r(e, "class", t = /*isLastWarning*/
265
+ n[10] ? "LastWarningMessage" : "");
266
+ },
267
+ m(f, _) {
268
+ S(f, e, _), s.m(e, null), S(f, l, _), d && d.m(f, _), S(f, o, _);
269
+ },
270
+ p(f, _) {
271
+ p === (p = a(f)) && s ? s.p(f, _) : (s.d(1), s = p(f), s && (s.c(), s.m(e, null))), _[0] & /*isLastWarning*/
272
+ 1024 && t !== (t = /*isLastWarning*/
273
+ f[10] ? "LastWarningMessage" : "") && r(e, "class", t), /*hasErrors*/
274
+ f[6] ? d ? d.p(f, _) : (d = Le(f), d.c(), d.m(o.parentNode, o)) : d && (d.d(1), d = null);
275
+ },
276
+ d(f) {
277
+ f && (E(e), E(l), E(o)), s.d(), d && d.d(f);
278
+ }
279
+ };
280
+ }
281
+ function pt(n) {
282
+ let e, t = (
283
+ /*$_*/
284
+ (n[17]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
285
+ ), l;
286
+ return {
287
+ c() {
288
+ e = k("p"), l = T(t);
289
+ },
290
+ m(o, a) {
291
+ S(o, e, a), u(e, l);
292
+ },
293
+ p(o, a) {
294
+ a[0] & /*$_*/
295
+ 131072 && t !== (t = /*$_*/
296
+ (o[17]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && D(l, t);
297
+ },
298
+ d(o) {
299
+ o && E(e);
300
+ }
301
+ };
302
+ }
303
+ function ut(n) {
304
+ let e, t = (
305
+ /*$_*/
306
+ n[17]("otpExpiredMessage") + ""
307
+ ), l;
308
+ return {
309
+ c() {
310
+ e = k("p"), l = T(t), r(e, "class", "OtpNoticeMessage"), r(e, "role", "alert");
311
+ },
312
+ m(o, a) {
313
+ S(o, e, a), u(e, l);
314
+ },
315
+ p(o, a) {
316
+ a[0] & /*$_*/
317
+ 131072 && t !== (t = /*$_*/
318
+ o[17]("otpExpiredMessage") + "") && D(l, t);
319
+ },
320
+ d(o) {
321
+ o && E(e);
322
+ }
323
+ };
324
+ }
325
+ function dt(n) {
326
+ let e = (
327
+ /*$_*/
328
+ n[17]("popupMessage") + ""
329
+ ), t;
330
+ return {
331
+ c() {
332
+ t = T(e);
333
+ },
334
+ m(l, o) {
335
+ S(l, t, o);
336
+ },
337
+ p(l, o) {
338
+ o[0] & /*$_*/
339
+ 131072 && e !== (e = /*$_*/
340
+ l[17]("popupMessage") + "") && D(t, e);
341
+ },
342
+ d(l) {
343
+ l && E(t);
344
+ }
345
+ };
346
+ }
347
+ function ft(n) {
348
+ let e = (
349
+ /*$_*/
350
+ n[17]("popupMessageLastWarning") + ""
351
+ ), t;
352
+ return {
353
+ c() {
354
+ t = T(e);
355
+ },
356
+ m(l, o) {
357
+ S(l, t, o);
358
+ },
359
+ p(l, o) {
360
+ o[0] & /*$_*/
361
+ 131072 && e !== (e = /*$_*/
362
+ l[17]("popupMessageLastWarning") + "") && D(t, e);
363
+ },
364
+ d(l) {
365
+ l && E(t);
366
+ }
367
+ };
368
+ }
369
+ function Le(n) {
370
+ let e, t;
371
+ return {
372
+ c() {
373
+ e = k("p"), t = T(
374
+ /*errorMessage*/
375
+ n[8]
376
+ ), r(e, "class", "OtpErrorMessage"), r(e, "role", "alert");
377
+ },
378
+ m(l, o) {
379
+ S(l, e, o), u(e, t);
380
+ },
381
+ p(l, o) {
382
+ o[0] & /*errorMessage*/
383
+ 256 && D(
384
+ t,
385
+ /*errorMessage*/
386
+ l[8]
387
+ );
388
+ },
389
+ d(l) {
390
+ l && E(e);
391
+ }
392
+ };
393
+ }
394
+ function Te(n) {
395
+ let e, t, l, o;
396
+ function a(d, f) {
397
+ return (
398
+ /*currentChannelTimer*/
399
+ d[15] > 0 ? ht : mt
400
+ );
401
+ }
402
+ let p = a(n), s = p(n);
403
+ return {
404
+ c() {
405
+ e = k("button"), s.c(), r(e, "class", "OtpButton"), e.disabled = t = !/*canSubmitChannel*/
406
+ n[16], Q(e, "disabled", !/*canSubmitChannel*/
407
+ n[16]);
408
+ },
409
+ m(d, f) {
410
+ S(d, e, f), s.m(e, null), l || (o = te(
411
+ e,
412
+ "click",
413
+ /*handleChannelSubmit*/
414
+ n[20]
415
+ ), l = !0);
416
+ },
417
+ p(d, f) {
418
+ p === (p = a(d)) && s ? s.p(d, f) : (s.d(1), s = p(d), s && (s.c(), s.m(e, null))), f[0] & /*canSubmitChannel*/
419
+ 65536 && t !== (t = !/*canSubmitChannel*/
420
+ d[16]) && (e.disabled = t), f[0] & /*canSubmitChannel*/
421
+ 65536 && Q(e, "disabled", !/*canSubmitChannel*/
422
+ d[16]);
423
+ },
424
+ d(d) {
425
+ d && E(e), s.d(), l = !1, o();
426
+ }
427
+ };
428
+ }
429
+ function mt(n) {
430
+ let e = (
431
+ /*$_*/
432
+ n[17]("sendCode") + ""
433
+ ), t;
434
+ return {
435
+ c() {
436
+ t = T(e);
437
+ },
438
+ m(l, o) {
439
+ S(l, t, o);
440
+ },
441
+ p(l, o) {
442
+ o[0] & /*$_*/
443
+ 131072 && e !== (e = /*$_*/
444
+ l[17]("sendCode") + "") && D(t, e);
445
+ },
446
+ d(l) {
447
+ l && E(t);
448
+ }
449
+ };
450
+ }
451
+ function ht(n) {
452
+ let e = (
453
+ /*$_*/
454
+ n[17]("waitSeconds") + ""
455
+ ), t, l, o, a;
456
+ return {
457
+ c() {
458
+ t = T(e), l = T(" ("), o = T(
459
+ /*currentChannelTimer*/
460
+ n[15]
461
+ ), a = T("s)");
462
+ },
463
+ m(p, s) {
464
+ S(p, t, s), S(p, l, s), S(p, o, s), S(p, a, s);
465
+ },
466
+ p(p, s) {
467
+ s[0] & /*$_*/
468
+ 131072 && e !== (e = /*$_*/
469
+ p[17]("waitSeconds") + "") && D(t, e), s[0] & /*currentChannelTimer*/
470
+ 32768 && D(
471
+ o,
472
+ /*currentChannelTimer*/
473
+ p[15]
474
+ );
475
+ },
476
+ d(p) {
477
+ p && (E(t), E(l), E(o), E(a));
478
+ }
479
+ };
480
+ }
481
+ function gt(n) {
482
+ let e, t, l = (
483
+ /*$_*/
484
+ n[17]("timeRemaining") + ""
485
+ ), o, a, p = (
486
+ /*formatTime*/
487
+ n[21](
488
+ /*timeLeft*/
489
+ n[5]
490
+ ) + ""
491
+ ), s, d, f = (
492
+ /*$_*/
493
+ n[17]("minutes") + ""
494
+ ), _, b, L, M = Oe(
495
+ /*otp*/
496
+ n[2]
497
+ ), w = [];
498
+ for (let m = 0; m < M.length; m += 1)
499
+ w[m] = Ie(Me(n, M, m));
500
+ return {
501
+ c() {
502
+ e = k("div"), t = k("div"), o = T(l), a = P(), s = T(p), d = P(), _ = T(f), b = P(), L = k("div");
503
+ for (let m = 0; m < w.length; m += 1)
504
+ w[m].c();
505
+ r(t, "class", "OtpTimer"), r(L, "class", "OtpField"), r(e, "class", "OtpFieldWrapper");
506
+ },
507
+ m(m, y) {
508
+ S(m, e, y), u(e, t), u(t, o), u(t, a), u(t, s), u(t, d), u(t, _), u(e, b), u(e, L);
509
+ for (let C = 0; C < w.length; C += 1)
510
+ w[C] && w[C].m(L, null);
511
+ },
512
+ p(m, y) {
513
+ if (y[0] & /*$_*/
514
+ 131072 && l !== (l = /*$_*/
515
+ m[17]("timeRemaining") + "") && D(o, l), y[0] & /*timeLeft*/
516
+ 32 && p !== (p = /*formatTime*/
517
+ m[21](
518
+ /*timeLeft*/
519
+ m[5]
520
+ ) + "") && D(s, p), y[0] & /*$_*/
521
+ 131072 && f !== (f = /*$_*/
522
+ m[17]("minutes") + "") && D(_, f), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
523
+ 29378580) {
524
+ M = Oe(
525
+ /*otp*/
526
+ m[2]
527
+ );
528
+ let C;
529
+ for (C = 0; C < M.length; C += 1) {
530
+ const A = Me(m, M, C);
531
+ w[C] ? w[C].p(A, y) : (w[C] = Ie(A), w[C].c(), w[C].m(L, null));
532
+ }
533
+ for (; C < w.length; C += 1)
534
+ w[C].d(1);
535
+ w.length = M.length;
536
+ }
537
+ },
538
+ d(m) {
539
+ m && E(e), $e(w, m);
540
+ }
541
+ };
542
+ }
543
+ function wt(n) {
544
+ let e;
545
+ return {
546
+ c() {
547
+ e = k("div"), e.innerHTML = '<span class="OtpLoader"></span>', r(e, "class", "OtpLoaderContainer");
548
+ },
549
+ m(t, l) {
550
+ S(t, e, l);
551
+ },
552
+ p: we,
553
+ d(t) {
554
+ t && E(e);
555
+ }
556
+ };
557
+ }
558
+ function Ie(n) {
559
+ let e, t, l, o = (
560
+ /*index*/
561
+ n[69]
562
+ ), a, p;
563
+ const s = () => (
564
+ /*input_binding*/
565
+ n[39](e, o)
566
+ ), d = () => (
567
+ /*input_binding*/
568
+ n[39](null, o)
569
+ );
570
+ function f(...b) {
571
+ return (
572
+ /*input_handler*/
573
+ n[40](
574
+ /*index*/
575
+ n[69],
576
+ ...b
577
+ )
578
+ );
579
+ }
580
+ function _(...b) {
581
+ return (
582
+ /*keydown_handler*/
583
+ n[41](
584
+ /*index*/
585
+ n[69],
586
+ ...b
587
+ )
588
+ );
589
+ }
590
+ return {
591
+ c() {
592
+ e = k("input"), r(e, "id", `otp-input-${/*index*/
593
+ n[69]}`), r(e, "type", "text"), r(e, "class", t = `otp-box ${/*config*/
594
+ n[4].inputLength % 2 === 0 && /*index*/
595
+ n[69] === /*config*/
596
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), r(e, "maxlength", 1), e.value = l = /*char*/
597
+ n[67], r(e, "inputmode", "numeric"), e.disabled = /*inputDisabled*/
598
+ n[11], r(e, "autocomplete", "off");
599
+ },
600
+ m(b, L) {
601
+ S(b, e, L), s(), a || (p = [
602
+ te(e, "input", f),
603
+ te(e, "keydown", _),
604
+ te(
605
+ e,
606
+ "paste",
607
+ /*handleOnPasteOtp*/
608
+ n[22]
609
+ )
610
+ ], a = !0);
611
+ },
612
+ p(b, L) {
613
+ n = b, L[0] & /*config*/
614
+ 16 && t !== (t = `otp-box ${/*config*/
615
+ n[4].inputLength % 2 === 0 && /*index*/
616
+ n[69] === /*config*/
617
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(e, "class", t), L[0] & /*otp*/
618
+ 4 && l !== (l = /*char*/
619
+ n[67]) && e.value !== l && (e.value = l), L[0] & /*inputDisabled*/
620
+ 2048 && (e.disabled = /*inputDisabled*/
621
+ n[11]), o !== /*index*/
622
+ n[69] && (d(), o = /*index*/
623
+ n[69], s());
624
+ },
625
+ d(b) {
626
+ b && E(e), d(), a = !1, Ae(p);
627
+ }
628
+ };
629
+ }
630
+ function bt(n) {
631
+ let e, t = (
632
+ /*$_*/
633
+ n[17]("submit") + ""
634
+ ), l, o, a, p;
635
+ return {
636
+ c() {
637
+ e = k("button"), l = T(t), r(e, "class", "OtpButton"), e.disabled = o = /*otp*/
638
+ n[2].join("").length !== /*config*/
639
+ n[4].inputLength || /*isSubmitting*/
640
+ n[13];
641
+ },
642
+ m(s, d) {
643
+ S(s, e, d), u(e, l), a || (p = te(
644
+ e,
645
+ "click",
646
+ /*submitOtp*/
647
+ n[27]
648
+ ), a = !0);
649
+ },
650
+ p(s, d) {
651
+ d[0] & /*$_*/
652
+ 131072 && t !== (t = /*$_*/
653
+ s[17]("submit") + "") && D(l, t), d[0] & /*otp, config, isSubmitting*/
654
+ 8212 && o !== (o = /*otp*/
655
+ s[2].join("").length !== /*config*/
656
+ s[4].inputLength || /*isSubmitting*/
657
+ s[13]) && (e.disabled = o);
658
+ },
659
+ d(s) {
660
+ s && E(e), a = !1, p();
661
+ }
662
+ };
663
+ }
664
+ function _t(n) {
665
+ let e, t = (
666
+ /*$_*/
667
+ n[17]("resendOtp") + ""
668
+ ), l, o, a;
669
+ return {
670
+ c() {
671
+ e = k("button"), l = T(t), r(e, "class", "OtpButton");
672
+ },
673
+ m(p, s) {
674
+ S(p, e, s), u(e, l), o || (a = te(
675
+ e,
676
+ "click",
677
+ /*handleResendOtp*/
678
+ n[25]
679
+ ), o = !0);
680
+ },
681
+ p(p, s) {
682
+ s[0] & /*$_*/
683
+ 131072 && t !== (t = /*$_*/
684
+ p[17]("resendOtp") + "") && D(l, t);
685
+ },
686
+ d(p) {
687
+ p && E(e), o = !1, a();
688
+ }
689
+ };
690
+ }
691
+ function yt(n) {
692
+ let e;
693
+ function t(a, p) {
694
+ return (
695
+ /*hasConfigErrors*/
696
+ a[7] ? at : st
697
+ );
698
+ }
699
+ let l = t(n), o = l(n);
700
+ return {
701
+ c() {
702
+ e = k("div"), o.c(), r(e, "class", "OtpContent");
703
+ },
704
+ m(a, p) {
705
+ S(a, e, p), o.m(e, null), n[42](e);
706
+ },
707
+ p(a, p) {
708
+ l === (l = t(a)) && o ? o.p(a, p) : (o.d(1), o = l(a), o && (o.c(), o.m(e, null)));
709
+ },
710
+ i: we,
711
+ o: we,
712
+ d(a) {
713
+ a && E(e), o.d(), n[42](null);
714
+ }
715
+ };
716
+ }
717
+ function kt(n, e, t) {
718
+ let l, o, a;
719
+ Je(n, ot, (i) => t(17, a = i));
720
+ let { clientstyling: p = "" } = e, { clientstylingurl: s = "" } = e, { mbsource: d } = e, { lang: f = "en" } = e, { endpoint: _ } = e, { session: b } = e, { translationurl: L } = e, { templateid: M } = e, w = [], m = !0, y = null, C = 0, A = "", q = "", W = !1, B = !1, x = "", ne = "", F = "", Z = !1, ie = !1, $ = !1, O = "", I = {}, V = null, re = !1, se = !1, ae = "", U, X = [], H = null, ee = 0;
721
+ const G = { SMS: "sms", EMAIL: "email" }, ce = {
722
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
723
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
724
+ MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
725
+ };
726
+ Object.keys(Se).forEach((i) => {
727
+ Ee(i, Se[i]);
728
+ });
729
+ const fe = () => {
730
+ it(f);
731
+ }, me = () => {
732
+ fetch(L).then((i) => i.json()).then((i) => {
733
+ Object.keys(i).forEach((h) => {
734
+ Ee(h, i[h]);
735
+ });
736
+ }).catch((i) => {
737
+ console.log(i);
738
+ });
739
+ }, pe = async (i) => {
740
+ if (i.detail?.["x-step-up-required"]) {
741
+ if (t(7, B = !1), t(6, W = !1), t(8, x = ""), ne = i.detail["x-step-up-token"], F = i.detail.flow, !ne || !F) {
742
+ t(3, m = !1), t(7, B = !0), t(8, x = a("configError"));
743
+ return;
744
+ }
745
+ t(12, re = !1), t(3, m = !1);
746
+ }
747
+ }, K = () => {
748
+ H && (clearInterval(H), H = null), V && (clearInterval(V), V = null), t(6, W = !1), t(7, B = !1), t(8, x = ""), t(10, ie = !1), t(2, w = []), t(4, y = null), t(3, m = !0), t(0, O = ""), t(12, re = !1), t(36, I = {});
749
+ }, j = () => {
750
+ K();
751
+ }, ue = () => new Promise((i, h) => {
752
+ const g = new URL(`${_}/api/pam/v1/mfa/challenge/${ne}`), N = new Headers();
753
+ N.append("accept", "application/json"), N.append("Content-Type", "application/json"), N.append("X-SessionId", `${b}`);
754
+ const ge = {
755
+ method: "PATCH",
756
+ headers: N,
757
+ body: JSON.stringify({
758
+ channel: O,
759
+ templateId: M
760
+ })
761
+ };
762
+ fetch(g, ge).then((ve) => ve.json()).then(() => {
763
+ Y(), z(), i();
764
+ }).catch((ve) => {
765
+ h();
766
+ });
767
+ }), le = () => {
768
+ V && clearInterval(V), V = setInterval(
769
+ () => {
770
+ const i = { ...I };
771
+ let h = !1;
772
+ Object.keys(i).forEach((g) => {
773
+ i[g] > 0 && (i[g]--, h = !0);
774
+ }), t(36, I = i), !h && V && (clearInterval(V), V = null);
775
+ },
776
+ 1e3
777
+ );
778
+ }, R = (i) => {
779
+ t(0, O = i);
780
+ }, he = async () => {
781
+ if (!(!O || I[O] && I[O] > 0)) {
782
+ t(3, m = !0), M && M.startsWith("2fa-") && t(28, M = `2fa-${O}`);
783
+ try {
784
+ await ue(), await ke(), t(36, I = {
785
+ ...I,
786
+ [O]: 30
787
+ }), le(), t(12, re = !0), Y(), z();
788
+ } catch (i) {
789
+ console.error("Error submitting channel:", i), t(6, W = !0), t(8, x = a("submissionError"));
790
+ } finally {
791
+ t(3, m = !1);
792
+ }
793
+ }
794
+ }, Y = () => {
795
+ const i = new Date(A), h = new Date(q), g = /* @__PURE__ */ new Date(), N = h.getTime() - g.getTime();
796
+ ee = i.getTime() - N;
797
+ const de = Date.now(), ge = Math.max(0, Math.floor((ee - de) / 1e3));
798
+ t(5, C = ge);
799
+ }, z = () => {
800
+ H && clearInterval(H), H = setInterval(
801
+ () => {
802
+ const i = Date.now(), h = Math.max(0, Math.floor((ee - i) / 1e3));
803
+ t(5, C = h), t(11, $ = h <= 0), h <= 0 && (clearInterval(H), H = null, t(9, Z = !0), t(6, W = !1), t(10, ie = !1));
804
+ },
805
+ 1e3
806
+ );
807
+ }, c = (i) => {
808
+ const h = Math.floor(i / 60), g = i % 60;
809
+ return `${h.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`;
810
+ }, v = (i, h) => {
811
+ const g = [...w];
812
+ g[i] = h.toUpperCase(), t(2, w = g), g.join("") !== ae && t(13, se = !1);
813
+ }, xe = (i) => {
814
+ i.preventDefault();
815
+ const g = (i.clipboardData?.getData("text")?.trim() || "").slice(0, y.inputLength).split("");
816
+ t(2, w = [...g, ...Array(y.inputLength - g.length).fill("")]), X[g.length]?.focus(), g.length === y.inputLength && ye();
817
+ }, be = (i, h) => {
818
+ const g = i.target, N = g.value;
819
+ /^[a-z0-9]$/i.test(N) && (v(h, N), X[h + 1]?.focus()), g.value = "";
820
+ }, _e = (i, h) => {
821
+ const g = i.key, N = i.ctrlKey || i.metaKey;
822
+ if (/^[a-z0-9]$/i.test(g)) {
823
+ if (N && g.toLowerCase() === "v")
824
+ return;
825
+ i.preventDefault(), v(h, g), X[h + 1]?.focus();
826
+ } else
827
+ g === "Backspace" && (i.preventDefault(), w[h] !== "" && v(h, ""), X[h - 1]?.focus());
828
+ }, Re = () => {
829
+ F == "stateful" && (ue(), t(9, Z = !1));
830
+ const i = new CustomEvent("otpResendRequested");
831
+ window.dispatchEvent(i);
832
+ }, ze = (i) => {
833
+ window.dispatchEvent(new CustomEvent(
834
+ "otpSubmitted",
835
+ {
836
+ detail: {
837
+ code: i,
838
+ maxAttempts: y.maxValidationAttempts,
839
+ validatedAttempts: y.numberOfValidateAttempts
840
+ }
841
+ }
842
+ ));
843
+ }, Pe = async (i) => {
844
+ const h = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/validate`, _);
845
+ h.searchParams.append("input", i);
846
+ try {
847
+ const g = await fetch(h.href, { method: "POST" });
848
+ if (g.status === 200) {
849
+ De();
850
+ return;
851
+ }
852
+ const N = await g.json();
853
+ throw new Error(N.message);
854
+ } catch (g) {
855
+ if (g.message === ce.INTERNAL_SERVER_ERROR) {
856
+ if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
857
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
858
+ {
859
+ type: "WidgetNotification",
860
+ data: {
861
+ type: "error",
862
+ message: a("accountBlocked")
863
+ }
864
+ },
865
+ window.location.href
866
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
867
+ return;
868
+ }
869
+ t(6, W = !0), t(8, x = a("invalidOtp")), ke();
870
+ return;
871
+ }
872
+ g.message === ce.MAX_INVALIDATE && (t(6, W = !0), t(8, x = a("invalidOtp"))), console.error("OTP submission failed:", g), t(6, W = !0), t(8, x = a("submissionError"));
873
+ } finally {
874
+ t(3, m = !1);
875
+ }
876
+ }, De = () => {
877
+ window.dispatchEvent(new CustomEvent(
878
+ "otpSuccess",
879
+ {
880
+ detail: {
881
+ message: "User successfully authenticated"
882
+ }
883
+ }
884
+ ));
885
+ }, je = () => {
886
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
887
+ }, ye = async () => {
888
+ if (w.join("").length !== y.inputLength) {
889
+ t(6, W = !0), t(8, x = a("invalidOtp"));
890
+ return;
891
+ }
892
+ const i = w.join("");
893
+ t(13, se = !0), ae = i, t(3, m = !0), t(6, W = !1), t(8, x = ""), F === "stateless" && ze(i), F === "stateful" && await Pe(i);
894
+ }, ke = async () => {
895
+ if (_)
896
+ try {
897
+ t(3, m = !0);
898
+ const i = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/config`, _), h = await fetch(i.href), g = await h.json();
899
+ if (h.ok)
900
+ t(4, y = g), t(2, w = Array(y.inputLength).fill("")), t(9, Z = !1), A = y.expirationTime, q = y.serverTime, y.numberOfValidateAttempts !== 0 && (t(6, W = !0), t(8, x = a("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && t(10, ie = !0), t(3, m = !1), Y(), z();
901
+ else if (g && g.details === ce.MAX_ATTEMPTS_EXCEEDED)
902
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
903
+ else {
904
+ const N = g && g.message || `Failed to load config. Status: ${h.status}`;
905
+ throw new Error(N);
906
+ }
907
+ } catch (i) {
908
+ t(3, m = !1), t(7, B = !0), t(8, x = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", i);
909
+ }
910
+ };
911
+ Qe(() => (window.addEventListener("stepUpAuthRequired", pe, !1), window.addEventListener("closePopup", j, !1), () => {
912
+ window.removeEventListener("stepUpAuthRequired", pe), window.removeEventListener("closePopup", j, !1), H && clearInterval(H), V && clearInterval(V);
913
+ }));
914
+ const Be = () => R(G.SMS), He = () => R(G.EMAIL);
915
+ function Ne(i, h) {
916
+ Ce[i ? "unshift" : "push"](() => {
917
+ X[h] = i, t(14, X);
918
+ });
919
+ }
920
+ const Ve = (i, h) => be(h, i), We = (i, h) => _e(h, i);
921
+ function Fe(i) {
922
+ Ce[i ? "unshift" : "push"](() => {
923
+ U = i, t(1, U);
924
+ });
925
+ }
926
+ return n.$$set = (i) => {
927
+ "clientstyling" in i && t(29, p = i.clientstyling), "clientstylingurl" in i && t(30, s = i.clientstylingurl), "mbsource" in i && t(31, d = i.mbsource), "lang" in i && t(32, f = i.lang), "endpoint" in i && t(33, _ = i.endpoint), "session" in i && t(34, b = i.session), "translationurl" in i && t(35, L = i.translationurl), "templateid" in i && t(28, M = i.templateid);
928
+ }, n.$$.update = () => {
929
+ n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
930
+ 536870914 && p && U && et(U, p), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
931
+ 1073741826 && s && U && tt(U, s), n.$$.dirty[0] & /*customStylingContainer*/
932
+ 2 | n.$$.dirty[1] & /*mbsource*/
933
+ 1 && d && U && nt(U, `${d}.Style`), n.$$.dirty[1] & /*lang*/
934
+ 2 && f && fe(), n.$$.dirty[1] & /*lang, translationurl*/
935
+ 18 && f && L && me(), n.$$.dirty[0] & /*selectedChannel*/
936
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
937
+ 32 && t(16, l = O && (!I[O] || I[O] === 0)), n.$$.dirty[0] & /*selectedChannel*/
938
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
939
+ 32 && t(15, o = O && I[O] || 0);
940
+ }, [
941
+ O,
942
+ U,
943
+ w,
944
+ m,
945
+ y,
946
+ C,
947
+ W,
948
+ B,
949
+ x,
950
+ Z,
951
+ ie,
952
+ $,
953
+ re,
954
+ se,
955
+ X,
956
+ o,
957
+ l,
958
+ a,
959
+ G,
960
+ R,
961
+ he,
962
+ c,
963
+ xe,
964
+ be,
965
+ _e,
966
+ Re,
967
+ je,
968
+ ye,
969
+ M,
970
+ p,
971
+ s,
972
+ d,
973
+ f,
974
+ _,
975
+ b,
976
+ L,
977
+ I,
978
+ Be,
979
+ He,
980
+ Ne,
981
+ Ve,
982
+ We,
983
+ Fe
984
+ ];
985
+ }
986
+ class vt extends Ke {
987
+ constructor(e) {
988
+ super(), Xe(
989
+ this,
990
+ e,
991
+ kt,
992
+ yt,
993
+ Ge,
994
+ {
995
+ clientstyling: 29,
996
+ clientstylingurl: 30,
997
+ mbsource: 31,
998
+ lang: 32,
999
+ endpoint: 33,
1000
+ session: 34,
1001
+ translationurl: 35,
1002
+ templateid: 28
1003
+ },
1004
+ rt,
1005
+ [-1, -1, -1]
1006
+ );
1007
+ }
1008
+ get clientstyling() {
1009
+ return this.$$.ctx[29];
1010
+ }
1011
+ set clientstyling(e) {
1012
+ this.$$set({ clientstyling: e }), oe();
1013
+ }
1014
+ get clientstylingurl() {
1015
+ return this.$$.ctx[30];
1016
+ }
1017
+ set clientstylingurl(e) {
1018
+ this.$$set({ clientstylingurl: e }), oe();
1019
+ }
1020
+ get mbsource() {
1021
+ return this.$$.ctx[31];
1022
+ }
1023
+ set mbsource(e) {
1024
+ this.$$set({ mbsource: e }), oe();
1025
+ }
1026
+ get lang() {
1027
+ return this.$$.ctx[32];
1028
+ }
1029
+ set lang(e) {
1030
+ this.$$set({ lang: e }), oe();
1031
+ }
1032
+ get endpoint() {
1033
+ return this.$$.ctx[33];
1034
+ }
1035
+ set endpoint(e) {
1036
+ this.$$set({ endpoint: e }), oe();
1037
+ }
1038
+ get session() {
1039
+ return this.$$.ctx[34];
1040
+ }
1041
+ set session(e) {
1042
+ this.$$set({ session: e }), oe();
1043
+ }
1044
+ get translationurl() {
1045
+ return this.$$.ctx[35];
1046
+ }
1047
+ set translationurl(e) {
1048
+ this.$$set({ translationurl: e }), oe();
1049
+ }
1050
+ get templateid() {
1051
+ return this.$$.ctx[28];
1052
+ }
1053
+ set templateid(e) {
1054
+ this.$$set({ templateid: e }), oe();
1055
+ }
1056
+ }
1057
+ lt(vt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1058
+ export {
1059
+ vt as default
1060
+ };