@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,1099 @@
1
+ var Ye = Object.defineProperty, Je = Object.defineProperties;
2
+ var Qe = Object.getOwnPropertyDescriptors;
3
+ var Ee = Object.getOwnPropertySymbols;
4
+ var Ze = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
5
+ var Se = (n, e, t) => e in n ? Ye(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, be = (n, e) => {
6
+ for (var t in e || (e = {}))
7
+ Ze.call(e, t) && Se(n, t, e[t]);
8
+ if (Ee)
9
+ for (var t of Ee(e))
10
+ $e.call(e, t) && Se(n, t, e[t]);
11
+ return n;
12
+ }, Me = (n, e) => Je(n, Qe(e));
13
+ var fe = (n, e, t) => new Promise((l, o) => {
14
+ var a = (c) => {
15
+ try {
16
+ s(t.next(c));
17
+ } catch (f) {
18
+ o(f);
19
+ }
20
+ }, p = (c) => {
21
+ try {
22
+ s(t.throw(c));
23
+ } catch (f) {
24
+ o(f);
25
+ }
26
+ }, s = (c) => c.done ? l(c.value) : Promise.resolve(c.value).then(a, p);
27
+ s((t = t.apply(n, e)).next());
28
+ });
29
+ import { a as et, $ as tt, S as nt, b as lt, s as ot, f as ie, c as it, G as _e, e as E, k as S, m as k, o as r, p as rt, q as st, y as Le, v as j, l as d, x as ne, X as Q, n as D, w as T, a0 as De, W as Z, r as at, Y as Te, a4 as ct, B as pt, C as ut, D as dt, E as ft, F as mt } from "./CashierCarousel-D8MiOwuE.js";
30
+ function Ae(n, e) {
31
+ et(n, e);
32
+ }
33
+ function ht(n) {
34
+ tt.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, you will be logged out and blocked temporarily.",
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, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",
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: "Select verification method",
77
+ selectChannelMessage: "Choose how you would like to receive your verification code",
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
+ };
84
+ function gt(n) {
85
+ it(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}}');
86
+ }
87
+ function Re(n, e, t) {
88
+ const l = n.slice();
89
+ return l[67] = e[t], l[68] = e, l[69] = t, l;
90
+ }
91
+ function wt(n) {
92
+ let e, t, l, o, a, p, s, c, f, _, b, L, M, w, m, y, C, R = (
93
+ /*$_*/
94
+ n[17]("channelSMS") + ""
95
+ ), K, F, N, z, le, U, $, re, ee, O, A, W, se, ae, ce = (
96
+ /*$_*/
97
+ n[17]("channelEmail") + ""
98
+ ), q, G, V, te, Y, pe, he;
99
+ function ge(u, v) {
100
+ return (
101
+ /*showResendOtp*/
102
+ u[9] ? kt : (
103
+ /*showOtpInput*/
104
+ u[12] ? _t : yt
105
+ )
106
+ );
107
+ }
108
+ let ue = ge(n), X = ue(n), B = (
109
+ /*selectedChannel*/
110
+ n[0] && xe(n)
111
+ );
112
+ function me(u, v) {
113
+ if (
114
+ /*isLoading*/
115
+ u[3] && /*showOtpInput*/
116
+ u[12]
117
+ )
118
+ return Mt;
119
+ if (
120
+ /*showOtpInput*/
121
+ u[12] && /*config*/
122
+ u[4]
123
+ )
124
+ return St;
125
+ }
126
+ let oe = me(n), x = oe && oe(n);
127
+ function we(u, v) {
128
+ if (
129
+ /*showResendOtp*/
130
+ u[9]
131
+ )
132
+ return Tt;
133
+ if (
134
+ /*showOtpInput*/
135
+ u[12] && /*config*/
136
+ u[4]
137
+ )
138
+ return Lt;
139
+ }
140
+ let J = we(n), P = J && J(n);
141
+ return {
142
+ c() {
143
+ e = k("div"), X.c(), t = D(), l = k("div"), o = k("label"), a = k("div"), p = D(), s = k("input"), f = D(), _ = k("div"), b = Q("svg"), L = Q("path"), M = Q("circle"), w = Q("circle"), m = Q("circle"), y = D(), C = k("span"), K = T(R), F = D(), N = k("label"), z = k("div"), le = D(), U = k("input"), re = D(), ee = k("div"), O = Q("svg"), A = Q("rect"), W = Q("path"), se = D(), ae = k("span"), q = T(ce), G = D(), B && B.c(), V = D(), x && x.c(), te = D(), Y = k("div"), P && P.c(), r(e, "class", "OtpDescription"), r(a, "class", "RadioIndicator"), Z(
144
+ a,
145
+ "checked",
146
+ /*selectedChannel*/
147
+ n[0] === /*channels*/
148
+ n[18].SMS
149
+ ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
150
+ n[18].SMS, s.checked = c = /*selectedChannel*/
151
+ n[0] === /*channels*/
152
+ 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"), Z(
153
+ o,
154
+ "selected",
155
+ /*selectedChannel*/
156
+ n[0] === /*channels*/
157
+ n[18].SMS
158
+ ), r(z, "class", "RadioIndicator"), Z(
159
+ z,
160
+ "checked",
161
+ /*selectedChannel*/
162
+ n[0] === /*channels*/
163
+ n[18].EMAIL
164
+ ), r(U, "type", "radio"), r(U, "name", "channel"), U.value = /*channels*/
165
+ n[18].EMAIL, U.checked = $ = /*selectedChannel*/
166
+ n[0] === /*channels*/
167
+ n[18].EMAIL, r(A, "x", "2"), r(A, "y", "4"), r(A, "width", "20"), r(A, "height", "16"), r(A, "rx", "2"), r(W, "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(ee, "class", "ChannelContent"), r(N, "class", "ChannelCheckbox"), Z(
168
+ N,
169
+ "selected",
170
+ /*selectedChannel*/
171
+ n[0] === /*channels*/
172
+ n[18].EMAIL
173
+ ), r(l, "class", "ChannelSelection"), r(Y, "class", "OtpActionButtons");
174
+ },
175
+ m(u, v) {
176
+ S(u, e, v), X.m(e, null), S(u, t, v), S(u, l, v), d(l, o), d(o, a), d(o, p), d(o, s), d(o, f), d(o, _), d(_, b), d(b, L), d(b, M), d(b, w), d(b, m), d(_, y), d(_, C), d(C, K), d(l, F), d(l, N), d(N, z), d(N, le), d(N, U), d(N, re), d(N, ee), d(ee, O), d(O, A), d(O, W), d(ee, se), d(ee, ae), d(ae, q), S(u, G, v), B && B.m(u, v), S(u, V, v), x && x.m(u, v), S(u, te, v), S(u, Y, v), P && P.m(Y, null), pe || (he = [
177
+ ne(
178
+ s,
179
+ "change",
180
+ /*change_handler*/
181
+ n[37]
182
+ ),
183
+ ne(
184
+ U,
185
+ "change",
186
+ /*change_handler_1*/
187
+ n[38]
188
+ )
189
+ ], pe = !0);
190
+ },
191
+ p(u, v) {
192
+ ue === (ue = ge(u)) && X ? X.p(u, v) : (X.d(1), X = ue(u), X && (X.c(), X.m(e, null))), v[0] & /*selectedChannel, channels*/
193
+ 262145 && Z(
194
+ a,
195
+ "checked",
196
+ /*selectedChannel*/
197
+ u[0] === /*channels*/
198
+ u[18].SMS
199
+ ), v[0] & /*selectedChannel*/
200
+ 1 && c !== (c = /*selectedChannel*/
201
+ u[0] === /*channels*/
202
+ u[18].SMS) && (s.checked = c), v[0] & /*$_*/
203
+ 131072 && R !== (R = /*$_*/
204
+ u[17]("channelSMS") + "") && j(K, R), v[0] & /*selectedChannel, channels*/
205
+ 262145 && Z(
206
+ o,
207
+ "selected",
208
+ /*selectedChannel*/
209
+ u[0] === /*channels*/
210
+ u[18].SMS
211
+ ), v[0] & /*selectedChannel, channels*/
212
+ 262145 && Z(
213
+ z,
214
+ "checked",
215
+ /*selectedChannel*/
216
+ u[0] === /*channels*/
217
+ u[18].EMAIL
218
+ ), v[0] & /*selectedChannel*/
219
+ 1 && $ !== ($ = /*selectedChannel*/
220
+ u[0] === /*channels*/
221
+ u[18].EMAIL) && (U.checked = $), v[0] & /*$_*/
222
+ 131072 && ce !== (ce = /*$_*/
223
+ u[17]("channelEmail") + "") && j(q, ce), v[0] & /*selectedChannel, channels*/
224
+ 262145 && Z(
225
+ N,
226
+ "selected",
227
+ /*selectedChannel*/
228
+ u[0] === /*channels*/
229
+ u[18].EMAIL
230
+ ), /*selectedChannel*/
231
+ u[0] ? B ? B.p(u, v) : (B = xe(u), B.c(), B.m(V.parentNode, V)) : B && (B.d(1), B = null), oe === (oe = me(u)) && x ? x.p(u, v) : (x && x.d(1), x = oe && oe(u), x && (x.c(), x.m(te.parentNode, te))), J === (J = we(u)) && P ? P.p(u, v) : (P && P.d(1), P = J && J(u), P && (P.c(), P.m(Y, null)));
232
+ },
233
+ d(u) {
234
+ u && (E(e), E(t), E(l), E(G), E(V), E(te), E(Y)), X.d(), B && B.d(u), x && x.d(u), P && P.d(), pe = !1, De(he);
235
+ }
236
+ };
237
+ }
238
+ function bt(n) {
239
+ let e, t, l, o, a, p, s = (
240
+ /*$_*/
241
+ n[17]("errorHeader") + ""
242
+ ), c, f, _, b, L, M, w = (
243
+ /*$_*/
244
+ n[17]("close") + ""
245
+ ), m, y, C;
246
+ return {
247
+ c() {
248
+ e = k("div"), t = k("div"), l = Q("svg"), o = Q("path"), a = D(), p = k("h2"), c = T(s), f = D(), _ = k("p"), b = T(
249
+ /*errorMessage*/
250
+ n[8]
251
+ ), L = D(), 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");
252
+ },
253
+ m(R, K) {
254
+ S(R, e, K), d(e, t), d(t, l), d(l, o), d(t, a), d(t, p), d(p, c), d(e, f), d(e, _), d(_, b), d(e, L), d(e, M), d(M, m), y || (C = ne(
255
+ M,
256
+ "click",
257
+ /*manualClosePopup*/
258
+ n[26]
259
+ ), y = !0);
260
+ },
261
+ p(R, K) {
262
+ K[0] & /*$_*/
263
+ 131072 && s !== (s = /*$_*/
264
+ R[17]("errorHeader") + "") && j(c, s), K[0] & /*errorMessage*/
265
+ 256 && j(
266
+ b,
267
+ /*errorMessage*/
268
+ R[8]
269
+ ), K[0] & /*$_*/
270
+ 131072 && w !== (w = /*$_*/
271
+ R[17]("close") + "") && j(m, w);
272
+ },
273
+ d(R) {
274
+ R && E(e), y = !1, C();
275
+ }
276
+ };
277
+ }
278
+ function _t(n) {
279
+ let e, t, l, o;
280
+ function a(f, _) {
281
+ return (
282
+ /*isLastWarning*/
283
+ f[10] ? Ct : vt
284
+ );
285
+ }
286
+ let p = a(n), s = p(n), c = (
287
+ /*hasErrors*/
288
+ n[6] && ze(n)
289
+ );
290
+ return {
291
+ c() {
292
+ e = k("p"), s.c(), l = D(), c && c.c(), o = at(), r(e, "class", t = /*isLastWarning*/
293
+ n[10] ? "LastWarningMessage" : "");
294
+ },
295
+ m(f, _) {
296
+ S(f, e, _), s.m(e, null), S(f, l, _), c && c.m(f, _), S(f, o, _);
297
+ },
298
+ p(f, _) {
299
+ p === (p = a(f)) && s ? s.p(f, _) : (s.d(1), s = p(f), s && (s.c(), s.m(e, null))), _[0] & /*isLastWarning*/
300
+ 1024 && t !== (t = /*isLastWarning*/
301
+ f[10] ? "LastWarningMessage" : "") && r(e, "class", t), /*hasErrors*/
302
+ f[6] ? c ? c.p(f, _) : (c = ze(f), c.c(), c.m(o.parentNode, o)) : c && (c.d(1), c = null);
303
+ },
304
+ d(f) {
305
+ f && (E(e), E(l), E(o)), s.d(), c && c.d(f);
306
+ }
307
+ };
308
+ }
309
+ function yt(n) {
310
+ let e, t = (
311
+ /*$_*/
312
+ (n[17]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
313
+ ), l;
314
+ return {
315
+ c() {
316
+ e = k("p"), l = T(t);
317
+ },
318
+ m(o, a) {
319
+ S(o, e, a), d(e, l);
320
+ },
321
+ p(o, a) {
322
+ a[0] & /*$_*/
323
+ 131072 && t !== (t = /*$_*/
324
+ (o[17]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && j(l, t);
325
+ },
326
+ d(o) {
327
+ o && E(e);
328
+ }
329
+ };
330
+ }
331
+ function kt(n) {
332
+ let e, t = (
333
+ /*$_*/
334
+ n[17]("otpExpiredMessage") + ""
335
+ ), l;
336
+ return {
337
+ c() {
338
+ e = k("p"), l = T(t), r(e, "class", "OtpNoticeMessage"), r(e, "role", "alert");
339
+ },
340
+ m(o, a) {
341
+ S(o, e, a), d(e, l);
342
+ },
343
+ p(o, a) {
344
+ a[0] & /*$_*/
345
+ 131072 && t !== (t = /*$_*/
346
+ o[17]("otpExpiredMessage") + "") && j(l, t);
347
+ },
348
+ d(o) {
349
+ o && E(e);
350
+ }
351
+ };
352
+ }
353
+ function vt(n) {
354
+ let e = (
355
+ /*$_*/
356
+ n[17]("popupMessage") + ""
357
+ ), t;
358
+ return {
359
+ c() {
360
+ t = T(e);
361
+ },
362
+ m(l, o) {
363
+ S(l, t, o);
364
+ },
365
+ p(l, o) {
366
+ o[0] & /*$_*/
367
+ 131072 && e !== (e = /*$_*/
368
+ l[17]("popupMessage") + "") && j(t, e);
369
+ },
370
+ d(l) {
371
+ l && E(t);
372
+ }
373
+ };
374
+ }
375
+ function Ct(n) {
376
+ let e = (
377
+ /*$_*/
378
+ n[17]("popupMessageLastWarning") + ""
379
+ ), t;
380
+ return {
381
+ c() {
382
+ t = T(e);
383
+ },
384
+ m(l, o) {
385
+ S(l, t, o);
386
+ },
387
+ p(l, o) {
388
+ o[0] & /*$_*/
389
+ 131072 && e !== (e = /*$_*/
390
+ l[17]("popupMessageLastWarning") + "") && j(t, e);
391
+ },
392
+ d(l) {
393
+ l && E(t);
394
+ }
395
+ };
396
+ }
397
+ function ze(n) {
398
+ let e, t;
399
+ return {
400
+ c() {
401
+ e = k("p"), t = T(
402
+ /*errorMessage*/
403
+ n[8]
404
+ ), r(e, "class", "OtpErrorMessage"), r(e, "role", "alert");
405
+ },
406
+ m(l, o) {
407
+ S(l, e, o), d(e, t);
408
+ },
409
+ p(l, o) {
410
+ o[0] & /*errorMessage*/
411
+ 256 && j(
412
+ t,
413
+ /*errorMessage*/
414
+ l[8]
415
+ );
416
+ },
417
+ d(l) {
418
+ l && E(e);
419
+ }
420
+ };
421
+ }
422
+ function xe(n) {
423
+ let e, t, l, o;
424
+ function a(c, f) {
425
+ return (
426
+ /*currentChannelTimer*/
427
+ c[15] > 0 ? Et : Ot
428
+ );
429
+ }
430
+ let p = a(n), s = p(n);
431
+ return {
432
+ c() {
433
+ e = k("button"), s.c(), r(e, "class", "OtpButton"), e.disabled = t = !/*canSubmitChannel*/
434
+ n[16], Z(e, "disabled", !/*canSubmitChannel*/
435
+ n[16]);
436
+ },
437
+ m(c, f) {
438
+ S(c, e, f), s.m(e, null), l || (o = ne(
439
+ e,
440
+ "click",
441
+ /*handleChannelSubmit*/
442
+ n[20]
443
+ ), l = !0);
444
+ },
445
+ p(c, f) {
446
+ p === (p = a(c)) && s ? s.p(c, f) : (s.d(1), s = p(c), s && (s.c(), s.m(e, null))), f[0] & /*canSubmitChannel*/
447
+ 65536 && t !== (t = !/*canSubmitChannel*/
448
+ c[16]) && (e.disabled = t), f[0] & /*canSubmitChannel*/
449
+ 65536 && Z(e, "disabled", !/*canSubmitChannel*/
450
+ c[16]);
451
+ },
452
+ d(c) {
453
+ c && E(e), s.d(), l = !1, o();
454
+ }
455
+ };
456
+ }
457
+ function Ot(n) {
458
+ let e = (
459
+ /*$_*/
460
+ n[17]("sendCode") + ""
461
+ ), t;
462
+ return {
463
+ c() {
464
+ t = T(e);
465
+ },
466
+ m(l, o) {
467
+ S(l, t, o);
468
+ },
469
+ p(l, o) {
470
+ o[0] & /*$_*/
471
+ 131072 && e !== (e = /*$_*/
472
+ l[17]("sendCode") + "") && j(t, e);
473
+ },
474
+ d(l) {
475
+ l && E(t);
476
+ }
477
+ };
478
+ }
479
+ function Et(n) {
480
+ let e = (
481
+ /*$_*/
482
+ n[17]("waitSeconds") + ""
483
+ ), t, l, o, a;
484
+ return {
485
+ c() {
486
+ t = T(e), l = T(" ("), o = T(
487
+ /*currentChannelTimer*/
488
+ n[15]
489
+ ), a = T("s)");
490
+ },
491
+ m(p, s) {
492
+ S(p, t, s), S(p, l, s), S(p, o, s), S(p, a, s);
493
+ },
494
+ p(p, s) {
495
+ s[0] & /*$_*/
496
+ 131072 && e !== (e = /*$_*/
497
+ p[17]("waitSeconds") + "") && j(t, e), s[0] & /*currentChannelTimer*/
498
+ 32768 && j(
499
+ o,
500
+ /*currentChannelTimer*/
501
+ p[15]
502
+ );
503
+ },
504
+ d(p) {
505
+ p && (E(t), E(l), E(o), E(a));
506
+ }
507
+ };
508
+ }
509
+ function St(n) {
510
+ let e, t, l = (
511
+ /*$_*/
512
+ n[17]("timeRemaining") + ""
513
+ ), o, a, p = (
514
+ /*formatTime*/
515
+ n[21](
516
+ /*timeLeft*/
517
+ n[5]
518
+ ) + ""
519
+ ), s, c, f = (
520
+ /*$_*/
521
+ n[17]("minutes") + ""
522
+ ), _, b, L, M = Te(
523
+ /*otp*/
524
+ n[2]
525
+ ), w = [];
526
+ for (let m = 0; m < M.length; m += 1)
527
+ w[m] = Pe(Re(n, M, m));
528
+ return {
529
+ c() {
530
+ e = k("div"), t = k("div"), o = T(l), a = D(), s = T(p), c = D(), _ = T(f), b = D(), L = k("div");
531
+ for (let m = 0; m < w.length; m += 1)
532
+ w[m].c();
533
+ r(t, "class", "OtpTimer"), r(L, "class", "OtpField"), r(e, "class", "OtpFieldWrapper");
534
+ },
535
+ m(m, y) {
536
+ S(m, e, y), d(e, t), d(t, o), d(t, a), d(t, s), d(t, c), d(t, _), d(e, b), d(e, L);
537
+ for (let C = 0; C < w.length; C += 1)
538
+ w[C] && w[C].m(L, null);
539
+ },
540
+ p(m, y) {
541
+ if (y[0] & /*$_*/
542
+ 131072 && l !== (l = /*$_*/
543
+ m[17]("timeRemaining") + "") && j(o, l), y[0] & /*timeLeft*/
544
+ 32 && p !== (p = /*formatTime*/
545
+ m[21](
546
+ /*timeLeft*/
547
+ m[5]
548
+ ) + "") && j(s, p), y[0] & /*$_*/
549
+ 131072 && f !== (f = /*$_*/
550
+ m[17]("minutes") + "") && j(_, f), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
551
+ 29378580) {
552
+ M = Te(
553
+ /*otp*/
554
+ m[2]
555
+ );
556
+ let C;
557
+ for (C = 0; C < M.length; C += 1) {
558
+ const R = Re(m, M, C);
559
+ w[C] ? w[C].p(R, y) : (w[C] = Pe(R), w[C].c(), w[C].m(L, null));
560
+ }
561
+ for (; C < w.length; C += 1)
562
+ w[C].d(1);
563
+ w.length = M.length;
564
+ }
565
+ },
566
+ d(m) {
567
+ m && E(e), ct(w, m);
568
+ }
569
+ };
570
+ }
571
+ function Mt(n) {
572
+ let e;
573
+ return {
574
+ c() {
575
+ e = k("div"), e.innerHTML = '<span class="OtpLoader"></span>', r(e, "class", "OtpLoaderContainer");
576
+ },
577
+ m(t, l) {
578
+ S(t, e, l);
579
+ },
580
+ p: _e,
581
+ d(t) {
582
+ t && E(e);
583
+ }
584
+ };
585
+ }
586
+ function Pe(n) {
587
+ let e, t, l, o = (
588
+ /*index*/
589
+ n[69]
590
+ ), a, p;
591
+ const s = () => (
592
+ /*input_binding*/
593
+ n[39](e, o)
594
+ ), c = () => (
595
+ /*input_binding*/
596
+ n[39](null, o)
597
+ );
598
+ function f(...b) {
599
+ return (
600
+ /*input_handler*/
601
+ n[40](
602
+ /*index*/
603
+ n[69],
604
+ ...b
605
+ )
606
+ );
607
+ }
608
+ function _(...b) {
609
+ return (
610
+ /*keydown_handler*/
611
+ n[41](
612
+ /*index*/
613
+ n[69],
614
+ ...b
615
+ )
616
+ );
617
+ }
618
+ return {
619
+ c() {
620
+ e = k("input"), r(e, "id", `otp-input-${/*index*/
621
+ n[69]}`), r(e, "type", "text"), r(e, "class", t = `otp-box ${/*config*/
622
+ n[4].inputLength % 2 === 0 && /*index*/
623
+ n[69] === /*config*/
624
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), r(e, "maxlength", 1), e.value = l = /*char*/
625
+ n[67], r(e, "inputmode", "numeric"), e.disabled = /*inputDisabled*/
626
+ n[11], r(e, "autocomplete", "off");
627
+ },
628
+ m(b, L) {
629
+ S(b, e, L), s(), a || (p = [
630
+ ne(e, "input", f),
631
+ ne(e, "keydown", _),
632
+ ne(
633
+ e,
634
+ "paste",
635
+ /*handleOnPasteOtp*/
636
+ n[22]
637
+ )
638
+ ], a = !0);
639
+ },
640
+ p(b, L) {
641
+ n = b, L[0] & /*config*/
642
+ 16 && t !== (t = `otp-box ${/*config*/
643
+ n[4].inputLength % 2 === 0 && /*index*/
644
+ n[69] === /*config*/
645
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(e, "class", t), L[0] & /*otp*/
646
+ 4 && l !== (l = /*char*/
647
+ n[67]) && e.value !== l && (e.value = l), L[0] & /*inputDisabled*/
648
+ 2048 && (e.disabled = /*inputDisabled*/
649
+ n[11]), o !== /*index*/
650
+ n[69] && (c(), o = /*index*/
651
+ n[69], s());
652
+ },
653
+ d(b) {
654
+ b && E(e), c(), a = !1, De(p);
655
+ }
656
+ };
657
+ }
658
+ function Lt(n) {
659
+ let e, t = (
660
+ /*$_*/
661
+ n[17]("submit") + ""
662
+ ), l, o, a, p;
663
+ return {
664
+ c() {
665
+ e = k("button"), l = T(t), r(e, "class", "OtpButton"), e.disabled = o = /*otp*/
666
+ n[2].join("").length !== /*config*/
667
+ n[4].inputLength || /*isSubmitting*/
668
+ n[13];
669
+ },
670
+ m(s, c) {
671
+ S(s, e, c), d(e, l), a || (p = ne(
672
+ e,
673
+ "click",
674
+ /*submitOtp*/
675
+ n[27]
676
+ ), a = !0);
677
+ },
678
+ p(s, c) {
679
+ c[0] & /*$_*/
680
+ 131072 && t !== (t = /*$_*/
681
+ s[17]("submit") + "") && j(l, t), c[0] & /*otp, config, isSubmitting*/
682
+ 8212 && o !== (o = /*otp*/
683
+ s[2].join("").length !== /*config*/
684
+ s[4].inputLength || /*isSubmitting*/
685
+ s[13]) && (e.disabled = o);
686
+ },
687
+ d(s) {
688
+ s && E(e), a = !1, p();
689
+ }
690
+ };
691
+ }
692
+ function Tt(n) {
693
+ let e, t = (
694
+ /*$_*/
695
+ n[17]("resendOtp") + ""
696
+ ), l, o, a;
697
+ return {
698
+ c() {
699
+ e = k("button"), l = T(t), r(e, "class", "OtpButton");
700
+ },
701
+ m(p, s) {
702
+ S(p, e, s), d(e, l), o || (a = ne(
703
+ e,
704
+ "click",
705
+ /*handleResendOtp*/
706
+ n[25]
707
+ ), o = !0);
708
+ },
709
+ p(p, s) {
710
+ s[0] & /*$_*/
711
+ 131072 && t !== (t = /*$_*/
712
+ p[17]("resendOtp") + "") && j(l, t);
713
+ },
714
+ d(p) {
715
+ p && E(e), o = !1, a();
716
+ }
717
+ };
718
+ }
719
+ function At(n) {
720
+ let e;
721
+ function t(a, p) {
722
+ return (
723
+ /*hasConfigErrors*/
724
+ a[7] ? bt : wt
725
+ );
726
+ }
727
+ let l = t(n), o = l(n);
728
+ return {
729
+ c() {
730
+ e = k("div"), o.c(), r(e, "class", "OtpContent");
731
+ },
732
+ m(a, p) {
733
+ S(a, e, p), o.m(e, null), n[42](e);
734
+ },
735
+ p(a, p) {
736
+ l === (l = t(a)) && o ? o.p(a, p) : (o.d(1), o = l(a), o && (o.c(), o.m(e, null)));
737
+ },
738
+ i: _e,
739
+ o: _e,
740
+ d(a) {
741
+ a && E(e), o.d(), n[42](null);
742
+ }
743
+ };
744
+ }
745
+ function It(n, e, t) {
746
+ let l, o, a;
747
+ rt(n, mt, (i) => t(17, a = i));
748
+ let { clientstyling: p = "" } = e, { clientstylingurl: s = "" } = e, { mbsource: c } = e, { lang: f = "en" } = e, { endpoint: _ } = e, { session: b } = e, { translationurl: L } = e, { templateid: M } = e, w = [], m = !0, y = null, C = 0, R = "", K = "", F = !1, N = !1, z = "", le = "", U = "", $ = !1, re = !1, ee = !1, O = "", A = {}, W = null, se = !1, ae = !1, ce = "", q, G = [], V = null, te = 0;
749
+ const Y = { SMS: "sms", EMAIL: "email" }, pe = {
750
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
751
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
752
+ MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
753
+ };
754
+ Object.keys(Ie).forEach((i) => {
755
+ Ae(i, Ie[i]);
756
+ });
757
+ const he = () => {
758
+ ht(f);
759
+ }, ge = () => {
760
+ fetch(L).then((i) => i.json()).then((i) => {
761
+ Object.keys(i).forEach((h) => {
762
+ Ae(h, i[h]);
763
+ });
764
+ }).catch((i) => {
765
+ console.log(i);
766
+ });
767
+ }, ue = (i) => fe(this, null, function* () {
768
+ var h;
769
+ if ((h = i.detail) != null && h["x-step-up-required"]) {
770
+ if (t(7, N = !1), t(6, F = !1), t(8, z = ""), le = i.detail["x-step-up-token"], U = i.detail.flow, !le || !U) {
771
+ t(3, m = !1), t(7, N = !0), t(8, z = a("configError"));
772
+ return;
773
+ }
774
+ t(12, se = !1), t(3, m = !1);
775
+ }
776
+ }), X = () => {
777
+ V && (clearInterval(V), V = null), W && (clearInterval(W), W = null), t(6, F = !1), t(7, N = !1), t(8, z = ""), t(10, re = !1), t(2, w = []), t(4, y = null), t(3, m = !0), t(0, O = ""), t(12, se = !1), t(36, A = {});
778
+ }, B = () => {
779
+ X();
780
+ }, me = () => new Promise((i, h) => {
781
+ const g = new URL(`${_}/api/pam/v1/mfa/challenge/${le}`), I = new Headers();
782
+ I.append("accept", "application/json"), I.append("Content-Type", "application/json"), I.append("X-SessionId", `${b}`);
783
+ const de = {
784
+ method: "PATCH",
785
+ headers: I,
786
+ body: JSON.stringify({
787
+ channel: O,
788
+ templateId: M
789
+ })
790
+ };
791
+ fetch(g, de).then((Oe) => Oe.json()).then(() => {
792
+ J(), P(), i();
793
+ }).catch((Oe) => {
794
+ h();
795
+ });
796
+ }), oe = () => {
797
+ W && clearInterval(W), W = setInterval(
798
+ () => {
799
+ const i = be({}, A);
800
+ let h = !1;
801
+ Object.keys(i).forEach((g) => {
802
+ i[g] > 0 && (i[g]--, h = !0);
803
+ }), t(36, A = i), !h && W && (clearInterval(W), W = null);
804
+ },
805
+ 1e3
806
+ );
807
+ }, x = (i) => {
808
+ t(0, O = i);
809
+ }, we = () => fe(this, null, function* () {
810
+ if (!(!O || A[O] && A[O] > 0)) {
811
+ t(3, m = !0), M && M.startsWith("2fa-") && t(28, M = `2fa-${O}`);
812
+ try {
813
+ yield me(), yield Ce(), t(36, A = Me(be({}, A), {
814
+ [O]: 30
815
+ })), oe(), t(12, se = !0), J(), P();
816
+ } catch (i) {
817
+ console.error("Error submitting channel:", i), t(6, F = !0), t(8, z = a("submissionError"));
818
+ } finally {
819
+ t(3, m = !1);
820
+ }
821
+ }
822
+ }), J = () => {
823
+ const i = new Date(R), h = new Date(K), g = /* @__PURE__ */ new Date(), I = h.getTime() - g.getTime();
824
+ te = i.getTime() - I;
825
+ const H = Date.now(), de = Math.max(0, Math.floor((te - H) / 1e3));
826
+ t(5, C = de);
827
+ }, P = () => {
828
+ V && clearInterval(V), V = setInterval(
829
+ () => {
830
+ const i = Date.now(), h = Math.max(0, Math.floor((te - i) / 1e3));
831
+ t(5, C = h), t(11, ee = h <= 0), h <= 0 && (clearInterval(V), V = null, t(9, $ = !0), t(6, F = !1), t(10, re = !1));
832
+ },
833
+ 1e3
834
+ );
835
+ }, u = (i) => {
836
+ const h = Math.floor(i / 60), g = i % 60;
837
+ return `${h.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`;
838
+ }, v = (i, h) => {
839
+ const g = [...w];
840
+ g[i] = h.toUpperCase(), t(2, w = g), g.join("") !== ce && t(13, ae = !1);
841
+ }, je = (i) => {
842
+ var I, H, de;
843
+ i.preventDefault();
844
+ const g = (((H = (I = i.clipboardData) == null ? void 0 : I.getData("text")) == null ? void 0 : H.trim()) || "").slice(0, y.inputLength).split("");
845
+ t(2, w = [...g, ...Array(y.inputLength - g.length).fill("")]), (de = G[g.length]) == null || de.focus(), g.length === y.inputLength && ve();
846
+ }, ye = (i, h) => {
847
+ const g = i.target, I = g.value;
848
+ if (/^[a-z0-9]$/i.test(I)) {
849
+ v(h, I);
850
+ const H = G[h + 1];
851
+ H == null || H.focus();
852
+ }
853
+ g.value = "";
854
+ }, ke = (i, h) => {
855
+ const g = i.key, I = i.ctrlKey || i.metaKey;
856
+ if (/^[a-z0-9]$/i.test(g)) {
857
+ if (I && g.toLowerCase() === "v")
858
+ return;
859
+ i.preventDefault(), v(h, g);
860
+ const H = G[h + 1];
861
+ H == null || H.focus();
862
+ } else if (g === "Backspace") {
863
+ i.preventDefault(), w[h] !== "" && v(h, "");
864
+ const H = G[h - 1];
865
+ H == null || H.focus();
866
+ }
867
+ }, Be = () => {
868
+ U == "stateful" && (me(), t(9, $ = !1));
869
+ const i = new CustomEvent("otpResendRequested");
870
+ window.dispatchEvent(i);
871
+ }, He = (i) => {
872
+ window.dispatchEvent(new CustomEvent(
873
+ "otpSubmitted",
874
+ {
875
+ detail: {
876
+ code: i,
877
+ maxAttempts: y.maxValidationAttempts,
878
+ validatedAttempts: y.numberOfValidateAttempts
879
+ }
880
+ }
881
+ ));
882
+ }, Ne = (i) => fe(this, null, function* () {
883
+ const h = new URL(`/api/nwa/api/v1/mfa/challenge/${le}/validate`, _);
884
+ h.searchParams.append("input", i);
885
+ try {
886
+ const g = yield fetch(h.href, { method: "POST" });
887
+ if (g.status === 200) {
888
+ Ve();
889
+ return;
890
+ }
891
+ const I = yield g.json();
892
+ throw new Error(I.message);
893
+ } catch (g) {
894
+ if (g.message === pe.INTERNAL_SERVER_ERROR) {
895
+ if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
896
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
897
+ {
898
+ type: "WidgetNotification",
899
+ data: {
900
+ type: "error",
901
+ message: a("accountBlocked")
902
+ }
903
+ },
904
+ window.location.href
905
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
906
+ return;
907
+ }
908
+ t(6, F = !0), t(8, z = a("invalidOtp")), Ce();
909
+ return;
910
+ }
911
+ g.message === pe.MAX_INVALIDATE && (t(6, F = !0), t(8, z = a("invalidOtp"))), console.error("OTP submission failed:", g), t(6, F = !0), t(8, z = a("submissionError"));
912
+ } finally {
913
+ t(3, m = !1);
914
+ }
915
+ }), Ve = () => {
916
+ window.dispatchEvent(new CustomEvent(
917
+ "otpSuccess",
918
+ {
919
+ detail: {
920
+ message: "User successfully authenticated"
921
+ }
922
+ }
923
+ ));
924
+ }, We = () => {
925
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
926
+ }, ve = () => fe(this, null, function* () {
927
+ if (w.join("").length !== y.inputLength) {
928
+ t(6, F = !0), t(8, z = a("invalidOtp"));
929
+ return;
930
+ }
931
+ const i = w.join("");
932
+ t(13, ae = !0), ce = i, t(3, m = !0), t(6, F = !1), t(8, z = ""), U === "stateless" && He(i), U === "stateful" && (yield Ne(i));
933
+ }), Ce = () => fe(this, null, function* () {
934
+ if (_)
935
+ try {
936
+ t(3, m = !0);
937
+ const i = new URL(`/api/nwa/api/v1/mfa/challenge/${le}/config`, _), h = yield fetch(i.href), g = yield h.json();
938
+ if (h.ok)
939
+ t(4, y = g), t(2, w = Array(y.inputLength).fill("")), t(9, $ = !1), R = y.expirationTime, K = y.serverTime, y.numberOfValidateAttempts !== 0 && (t(6, F = !0), t(8, z = a("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && t(10, re = !0), t(3, m = !1), J(), P();
940
+ else if (g && g.details === pe.MAX_ATTEMPTS_EXCEEDED)
941
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
942
+ else {
943
+ const I = g && g.message || `Failed to load config. Status: ${h.status}`;
944
+ throw new Error(I);
945
+ }
946
+ } catch (i) {
947
+ t(3, m = !1), t(7, N = !0), t(8, z = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", i);
948
+ }
949
+ });
950
+ st(() => (window.addEventListener("stepUpAuthRequired", ue, !1), window.addEventListener("closePopup", B, !1), () => {
951
+ window.removeEventListener("stepUpAuthRequired", ue), window.removeEventListener("closePopup", B, !1), V && clearInterval(V), W && clearInterval(W);
952
+ }));
953
+ const Fe = () => x(Y.SMS), Ue = () => x(Y.EMAIL);
954
+ function qe(i, h) {
955
+ Le[i ? "unshift" : "push"](() => {
956
+ G[h] = i, t(14, G);
957
+ });
958
+ }
959
+ const Ke = (i, h) => ye(h, i), Xe = (i, h) => ke(h, i);
960
+ function Ge(i) {
961
+ Le[i ? "unshift" : "push"](() => {
962
+ q = i, t(1, q);
963
+ });
964
+ }
965
+ return n.$$set = (i) => {
966
+ "clientstyling" in i && t(29, p = i.clientstyling), "clientstylingurl" in i && t(30, s = i.clientstylingurl), "mbsource" in i && t(31, c = 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);
967
+ }, n.$$.update = () => {
968
+ n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
969
+ 536870914 && p && q && pt(q, p), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
970
+ 1073741826 && s && q && ut(q, s), n.$$.dirty[0] & /*customStylingContainer*/
971
+ 2 | n.$$.dirty[1] & /*mbsource*/
972
+ 1 && c && q && dt(q, `${c}.Style`), n.$$.dirty[1] & /*lang*/
973
+ 2 && f && he(), n.$$.dirty[1] & /*lang, translationurl*/
974
+ 18 && f && L && ge(), n.$$.dirty[0] & /*selectedChannel*/
975
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
976
+ 32 && t(16, l = O && (!A[O] || A[O] === 0)), n.$$.dirty[0] & /*selectedChannel*/
977
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
978
+ 32 && t(15, o = O && A[O] || 0);
979
+ }, [
980
+ O,
981
+ q,
982
+ w,
983
+ m,
984
+ y,
985
+ C,
986
+ F,
987
+ N,
988
+ z,
989
+ $,
990
+ re,
991
+ ee,
992
+ se,
993
+ ae,
994
+ G,
995
+ o,
996
+ l,
997
+ a,
998
+ Y,
999
+ x,
1000
+ we,
1001
+ u,
1002
+ je,
1003
+ ye,
1004
+ ke,
1005
+ Be,
1006
+ We,
1007
+ ve,
1008
+ M,
1009
+ p,
1010
+ s,
1011
+ c,
1012
+ f,
1013
+ _,
1014
+ b,
1015
+ L,
1016
+ A,
1017
+ Fe,
1018
+ Ue,
1019
+ qe,
1020
+ Ke,
1021
+ Xe,
1022
+ Ge
1023
+ ];
1024
+ }
1025
+ class Rt extends nt {
1026
+ constructor(e) {
1027
+ super(), lt(
1028
+ this,
1029
+ e,
1030
+ It,
1031
+ At,
1032
+ ot,
1033
+ {
1034
+ clientstyling: 29,
1035
+ clientstylingurl: 30,
1036
+ mbsource: 31,
1037
+ lang: 32,
1038
+ endpoint: 33,
1039
+ session: 34,
1040
+ translationurl: 35,
1041
+ templateid: 28
1042
+ },
1043
+ gt,
1044
+ [-1, -1, -1]
1045
+ );
1046
+ }
1047
+ get clientstyling() {
1048
+ return this.$$.ctx[29];
1049
+ }
1050
+ set clientstyling(e) {
1051
+ this.$$set({ clientstyling: e }), ie();
1052
+ }
1053
+ get clientstylingurl() {
1054
+ return this.$$.ctx[30];
1055
+ }
1056
+ set clientstylingurl(e) {
1057
+ this.$$set({ clientstylingurl: e }), ie();
1058
+ }
1059
+ get mbsource() {
1060
+ return this.$$.ctx[31];
1061
+ }
1062
+ set mbsource(e) {
1063
+ this.$$set({ mbsource: e }), ie();
1064
+ }
1065
+ get lang() {
1066
+ return this.$$.ctx[32];
1067
+ }
1068
+ set lang(e) {
1069
+ this.$$set({ lang: e }), ie();
1070
+ }
1071
+ get endpoint() {
1072
+ return this.$$.ctx[33];
1073
+ }
1074
+ set endpoint(e) {
1075
+ this.$$set({ endpoint: e }), ie();
1076
+ }
1077
+ get session() {
1078
+ return this.$$.ctx[34];
1079
+ }
1080
+ set session(e) {
1081
+ this.$$set({ session: e }), ie();
1082
+ }
1083
+ get translationurl() {
1084
+ return this.$$.ctx[35];
1085
+ }
1086
+ set translationurl(e) {
1087
+ this.$$set({ translationurl: e }), ie();
1088
+ }
1089
+ get templateid() {
1090
+ return this.$$.ctx[28];
1091
+ }
1092
+ set templateid(e) {
1093
+ this.$$set({ templateid: e }), ie();
1094
+ }
1095
+ }
1096
+ ft(Rt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1097
+ export {
1098
+ Rt as default
1099
+ };