@everymatrix/cashier-page-nd 1.69.111 → 1.69.113

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 (63) hide show
  1. package/components/{CashierCarousel-D77wRYrP.js → CashierCarousel-2AotVxhB.js} +164 -160
  2. package/components/CashierCarousel-Bmkxhtnm.cjs +23 -0
  3. package/components/{CashierCarousel-8HuPK_WY.js → CashierCarousel-Cm5G9dJd.js} +171 -167
  4. package/components/{CashierError-Dnk0H5ib.js → CashierError-BkWwLoWt.js} +1 -1
  5. package/components/{CashierError-DFOslnwl.js → CashierError-CO7-9OnG.js} +1 -1
  6. package/components/{CashierError-BJv9Ma-S.cjs → CashierError-Cwm9eY8c.cjs} +1 -1
  7. package/components/{CashierHeader-Dr5EUw02.js → CashierHeader-BOEVulz3.js} +1 -1
  8. package/components/{CashierHeader-C4luE8Rt.js → CashierHeader-CTZl2NGQ.js} +1 -1
  9. package/components/{CashierHeader-D_pRK2ix.cjs → CashierHeader-D40gryOj.cjs} +1 -1
  10. package/components/{CashierIframeRedirect-CiTWXkv1.cjs → CashierIframeRedirect-BKExS9o2.cjs} +1 -1
  11. package/components/{CashierIframeRedirect-DAAmzCia.js → CashierIframeRedirect-CFYNnH6I.js} +3 -3
  12. package/components/{CashierIframeRedirect-C2UPjyTE.js → CashierIframeRedirect-DCJH25FN.js} +3 -3
  13. package/components/{CashierMethodDetails-BcL5uTl0.cjs → CashierMethodDetails-B9yThWJd.cjs} +4 -4
  14. package/components/{CashierMethodDetails-CxzHJpNT.js → CashierMethodDetails-BvIuXYaF.js} +541 -537
  15. package/components/{CashierMethodDetails-C_ILvlcp.js → CashierMethodDetails-CrNz38mk.js} +380 -376
  16. package/components/{CashierMethodsList-D1-4p9Fo.js → CashierMethodsList-BE8SmqSJ.js} +2 -2
  17. package/components/{CashierMethodsList-CdZFk5wU.js → CashierMethodsList-BN2dT78W.js} +2 -2
  18. package/components/{CashierMethodsList-CEZVckvw.cjs → CashierMethodsList-DkmiAf3O.cjs} +1 -1
  19. package/components/CashierModal-BE_2P0FX.js +336 -0
  20. package/components/CashierModal-fcLWE2y3.cjs +1 -0
  21. package/components/CashierModal-whn0174R.js +336 -0
  22. package/components/{CashierNotifications-pGgsWSdS.cjs → CashierNotifications-AE1W98Am.cjs} +1 -1
  23. package/components/{CashierNotifications-C4esiIE1.js → CashierNotifications-DvukNd9l.js} +1 -1
  24. package/components/{CashierNotifications-HbBlW919.js → CashierNotifications-h-sC7KWl.js} +1 -1
  25. package/components/{CashierPage-BhXnLqVP.js → CashierPage-B0SFLnbl.js} +525 -533
  26. package/components/{CashierPage-Cu_FfnAW.js → CashierPage-BqLJ1Za1.js} +521 -529
  27. package/components/CashierPage-DIrw7Ur0.cjs +1 -0
  28. package/components/{CashierReceiptPage-C1pvLNPQ.js → CashierReceiptPage-B1GE254E.js} +2 -2
  29. package/components/{CashierReceiptPage-4EMwW_oF.cjs → CashierReceiptPage-BqrdBMp3.cjs} +1 -1
  30. package/components/{CashierReceiptPage-CzCxraC4.js → CashierReceiptPage-OE7gpibk.js} +2 -2
  31. package/components/{CashierSessionExpirationModal-DC3xtfId.cjs → CashierSessionExpirationModal-BAZy0IPX.cjs} +1 -1
  32. package/components/{CashierSessionExpirationModal-DOAn1f7Q.js → CashierSessionExpirationModal-CNBDiaWq.js} +3 -3
  33. package/components/{CashierSessionExpirationModal-wcX6WNwx.js → CashierSessionExpirationModal-D1lAoUuI.js} +3 -3
  34. package/components/{CashierSpinner-1V0fFMq0.js → CashierSpinner-Dc_apDAz.js} +1 -1
  35. package/components/{CashierSpinner-CPWKt5dY.cjs → CashierSpinner-d2hvjlSo.cjs} +1 -1
  36. package/components/{CashierSpinner-Cx52pbwV.js → CashierSpinner-viEKbLWC.js} +1 -1
  37. package/components/CashierStepUp-BLCOLltJ.js +786 -0
  38. package/components/CashierStepUp-B_HWgCcn.cjs +1 -0
  39. package/components/CashierStepUp-CeqsqBhX.js +814 -0
  40. package/components/{CashierTransactionHistory-DnPl2II3.js → CashierTransactionHistory-Bod4CZm1.js} +5 -5
  41. package/components/{CashierTransactionHistory-CfPdd7w-.cjs → CashierTransactionHistory-CicwRm4P.cjs} +1 -1
  42. package/components/{CashierTransactionHistory-BU9zzhMH.js → CashierTransactionHistory-Ck-a7FJf.js} +5 -5
  43. package/components/{CashierVerifications-DBaC7Yq5.js → CashierVerifications-66ej7eXN.js} +2 -2
  44. package/components/{CashierVerifications-Cl0o1vbf.js → CashierVerifications-Cg5TE5jO.js} +2 -2
  45. package/components/{CashierVerifications-CR73ohxW.cjs → CashierVerifications-D5bq7j2I.cjs} +1 -1
  46. package/components/{TxnStatusIcon-CmFT6r06.cjs → TxnStatusIcon-Bs5XHdDd.cjs} +1 -1
  47. package/components/{TxnStatusIcon-C9c7Vat6.js → TxnStatusIcon-CvoyaPHp.js} +1 -1
  48. package/components/{TxnStatusIcon-CuygBt_X.js → TxnStatusIcon-DB7vrGws.js} +1 -1
  49. package/components/{TxnTypeIcons-BubLyQlU.js → TxnTypeIcons-BVU-p7ld.js} +1 -1
  50. package/components/{TxnTypeIcons-CwWZ2MoD.cjs → TxnTypeIcons-CPhGhukx.cjs} +1 -1
  51. package/components/{TxnTypeIcons-Cpt8i9KB.js → TxnTypeIcons-lKOKRAjP.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/CashierCarousel-BkoYZVP7.cjs +0 -23
  57. package/components/CashierModal-CJf0aCey.cjs +0 -1
  58. package/components/CashierModal-Cpef67LD.js +0 -239
  59. package/components/CashierModal-VPZkXwtJ.js +0 -239
  60. package/components/CashierPage-CJVbHJ9b.cjs +0 -1
  61. package/components/CashierStepUp-CjnkMvDj.js +0 -834
  62. package/components/CashierStepUp-Ck5JQ0Nm.cjs +0 -1
  63. package/components/CashierStepUp-Cy8j5UPe.js +0 -806
@@ -1,834 +0,0 @@
1
- var I = (n, t, e) => new Promise((i, s) => {
2
- var p = (l) => {
3
- try {
4
- r(e.next(l));
5
- } catch (c) {
6
- s(c);
7
- }
8
- }, a = (l) => {
9
- try {
10
- r(e.throw(l));
11
- } catch (c) {
12
- s(c);
13
- }
14
- }, r = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(p, a);
15
- r((e = e.apply(n, t)).next());
16
- });
17
- import { a as Le, $ as xe, S as Me, b as Pe, s as Se, f as U, c as Ce, G as Y, e as x, k as M, m as T, p as Re, q as Ae, l as b, o as w, y as ne, v as A, x as V, P as ie, n as B, w as z, r as ze, R as oe, Z as De, W as je, B as Be, C as He, D as We, E as Fe, F as Ne } from "./CashierCarousel-8HuPK_WY.js";
18
- function se(n, t) {
19
- Le(n, t);
20
- }
21
- function Ue(n) {
22
- xe.set(n);
23
- }
24
- const re = {
25
- en: {
26
- otpTitle: "Code verification is required",
27
- popupMessage: "Please enter the security code received on your SMS/email address to perform the update.",
28
- popupMessageLastWarning: "If the next validation attempt is failed, you will be logged out and blocked temporarily.",
29
- minutes: "minutes",
30
- errorHeader: "Error",
31
- configError: "Unable to load OTP data. Please try again later.",
32
- otpHeading: "Enter OTP",
33
- resendOtp: "Resent OTP",
34
- submit: "Submit",
35
- close: "Close",
36
- invalidOtp: "The code you've sent is not valid. Please try again.",
37
- accountBlocked: "Too many attempts for OTP. Your account has been blocked for one hour.",
38
- submissionError: "Something went wrong. Please try again.",
39
- otpExpiredMessage: "Validation code has expired, please request a new one to continue.",
40
- timeRemaining: "Code expires in:"
41
- },
42
- tr: {
43
- otpTitle: "Kod doğrulaması gereklidir",
44
- popupMessage: "Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",
45
- popupMessageLastWarning: "Bir sonraki doğrulama denemesi başarısız olursa, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",
46
- minutes: "dakika",
47
- errorHeader: "Hata",
48
- configError: "OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",
49
- otpHeading: "OTP Girin",
50
- resendOtp: "OTP'yi Yeniden Gönder",
51
- submit: "Gönder",
52
- close: "Kapat",
53
- invalidOtp: "Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",
54
- accountBlocked: "OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",
55
- submissionError: "Bir şeyler ters gitti. Lütfen tekrar deneyin.",
56
- otpExpiredMessage: "Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",
57
- timeRemaining: "Kodun süresi doluyor:"
58
- }
59
- };
60
- function Ve(n) {
61
- Ce(n, "svelte-1a5juhv", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}@container (max-width: 500px){.OtpPopupOverlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--emw--color-overlay, rgba(0, 0, 0, 0.5));display:flex;align-items:center}}@container (min-width: 500px){.OtpPopupOverlay{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center}}.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]{filter:saturate(50%);opacity:0.5;cursor:auto;pointer-events:none}.OtpButton:hover{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}.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-size-big, 20px);font-weight:var(--emw--font-weight-medium, 600)}@container (max-width: 500px){.OtpPopupContent{width:100%;height:100%;justify-content:flex-start}}@container (min-width: 500px){.OtpPopupContent{justify-content:center}}.OtpPopupContent{background:var(--emw--color-cashier-bg);display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px);position:relative;padding:var(--emw--spacing-medium, 20px);border-radius:var(--mmw--border-radius-large-plus, 10px);z-index:1;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);animation:modalSlideScaleIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)}.OtpPopupContent::before{content:"";position:absolute;inset:0;opacity:0.2;z-index:-1;pointer-events:none;border-radius:10px;background:linear-gradient(140deg, var(--emw--color-primary, #f9c405) 5%, var(--emw--color-black, #12191f) 65%)}.OtpPopupContent .OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpPopupContent .OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px}.OtpPopupContent .OtpError h2{margin:0}.OtpPopupContent .OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.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}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center}.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}');
62
- }
63
- function le(n, t, e) {
64
- const i = n.slice();
65
- return i[51] = t[e], i[52] = t, i[53] = e, i;
66
- }
67
- function ae(n) {
68
- let t, e;
69
- function i(a, r) {
70
- return (
71
- /*hasConfigErrors*/
72
- a[7] ? Ie : qe
73
- );
74
- }
75
- let s = i(n), p = s(n);
76
- return {
77
- c() {
78
- t = T("div"), e = T("div"), p.c(), w(e, "class", "OtpPopupContent"), w(t, "class", "OtpPopupOverlay");
79
- },
80
- m(a, r) {
81
- M(a, t, r), b(t, e), p.m(e, null);
82
- },
83
- p(a, r) {
84
- s === (s = i(a)) && p ? p.p(a, r) : (p.d(1), p = s(a), p && (p.c(), p.m(e, null)));
85
- },
86
- d(a) {
87
- a && x(t), p.d();
88
- }
89
- };
90
- }
91
- function qe(n) {
92
- let t, e, i = (
93
- /*$_*/
94
- n[13]("otpTitle") + ""
95
- ), s, p, a, r, l, c, _, v = (
96
- /*$_*/
97
- n[13]("close") + ""
98
- ), y, k, u;
99
- function g(m, C) {
100
- return (
101
- /*showResendOtp*/
102
- m[9] ? Ge : Ke
103
- );
104
- }
105
- let L = g(n), d = L(n);
106
- function E(m, C) {
107
- if (
108
- /*isLoading*/
109
- m[3]
110
- )
111
- return Je;
112
- if (
113
- /*config*/
114
- m[4]
115
- )
116
- return Ze;
117
- }
118
- let P = E(n), O = P && P(n);
119
- function F(m, C) {
120
- if (
121
- /*showResendOtp*/
122
- m[9]
123
- )
124
- return $e;
125
- if (
126
- /*config*/
127
- m[4]
128
- )
129
- return Qe;
130
- }
131
- let j = F(n), S = j && j(n);
132
- return {
133
- c() {
134
- t = T("div"), e = T("div"), s = z(i), p = B(), d.c(), a = B(), O && O.c(), r = B(), l = T("div"), S && S.c(), c = B(), _ = T("button"), y = z(v), w(e, "class", "Title"), w(t, "class", "OtpDescription"), w(_, "class", "OtpButton"), w(l, "class", "OtpActionButtons");
135
- },
136
- m(m, C) {
137
- M(m, t, C), b(t, e), b(e, s), b(t, p), d.m(t, null), M(m, a, C), O && O.m(m, C), M(m, r, C), M(m, l, C), S && S.m(l, null), b(l, c), b(l, _), b(_, y), k || (u = V(
138
- _,
139
- "click",
140
- /*manualClosePopup*/
141
- n[19]
142
- ), k = !0);
143
- },
144
- p(m, C) {
145
- C[0] & /*$_*/
146
- 8192 && i !== (i = /*$_*/
147
- m[13]("otpTitle") + "") && A(s, i), L === (L = g(m)) && d ? d.p(m, C) : (d.d(1), d = L(m), d && (d.c(), d.m(t, null))), P === (P = E(m)) && O ? O.p(m, C) : (O && O.d(1), O = P && P(m), O && (O.c(), O.m(r.parentNode, r))), j === (j = F(m)) && S ? S.p(m, C) : (S && S.d(1), S = j && j(m), S && (S.c(), S.m(l, c))), C[0] & /*$_*/
148
- 8192 && v !== (v = /*$_*/
149
- m[13]("close") + "") && A(y, v);
150
- },
151
- d(m) {
152
- m && (x(t), x(a), x(r), x(l)), d.d(), O && O.d(m), S && S.d(), k = !1, u();
153
- }
154
- };
155
- }
156
- function Ie(n) {
157
- let t, e, i, s, p, a, r = (
158
- /*$_*/
159
- n[13]("errorHeader") + ""
160
- ), l, c, _, v, y, k, u = (
161
- /*$_*/
162
- n[13]("close") + ""
163
- ), g, L, d;
164
- return {
165
- c() {
166
- t = T("div"), e = T("div"), i = ie("svg"), s = ie("path"), p = B(), a = T("h2"), l = z(r), c = B(), _ = T("p"), v = z(
167
- /*errorMessage*/
168
- n[8]
169
- ), y = B(), k = T("button"), g = z(u), w(s, "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"), w(i, "xmlns", "http://www.w3.org/2000/svg"), w(i, "viewBox", "0 0 512 512"), w(e, "class", "OtpErrorHeader"), w(k, "class", "OtpButton error"), w(t, "class", "OtpError");
170
- },
171
- m(E, P) {
172
- M(E, t, P), b(t, e), b(e, i), b(i, s), b(e, p), b(e, a), b(a, l), b(t, c), b(t, _), b(_, v), b(t, y), b(t, k), b(k, g), L || (d = V(
173
- k,
174
- "click",
175
- /*manualClosePopup*/
176
- n[19]
177
- ), L = !0);
178
- },
179
- p(E, P) {
180
- P[0] & /*$_*/
181
- 8192 && r !== (r = /*$_*/
182
- E[13]("errorHeader") + "") && A(l, r), P[0] & /*errorMessage*/
183
- 256 && A(
184
- v,
185
- /*errorMessage*/
186
- E[8]
187
- ), P[0] & /*$_*/
188
- 8192 && u !== (u = /*$_*/
189
- E[13]("close") + "") && A(g, u);
190
- },
191
- d(E) {
192
- E && x(t), L = !1, d();
193
- }
194
- };
195
- }
196
- function Ke(n) {
197
- let t, e, i, s;
198
- function p(c, _) {
199
- return (
200
- /*isLastWarning*/
201
- c[10] ? Ye : Xe
202
- );
203
- }
204
- let a = p(n), r = a(n), l = (
205
- /*hasErrors*/
206
- n[6] && pe(n)
207
- );
208
- return {
209
- c() {
210
- t = T("p"), r.c(), i = B(), l && l.c(), s = ze(), w(t, "class", e = /*isLastWarning*/
211
- n[10] ? "LastWarningMessage" : "");
212
- },
213
- m(c, _) {
214
- M(c, t, _), r.m(t, null), M(c, i, _), l && l.m(c, _), M(c, s, _);
215
- },
216
- p(c, _) {
217
- a === (a = p(c)) && r ? r.p(c, _) : (r.d(1), r = a(c), r && (r.c(), r.m(t, null))), _[0] & /*isLastWarning*/
218
- 1024 && e !== (e = /*isLastWarning*/
219
- c[10] ? "LastWarningMessage" : "") && w(t, "class", e), /*hasErrors*/
220
- c[6] ? l ? l.p(c, _) : (l = pe(c), l.c(), l.m(s.parentNode, s)) : l && (l.d(1), l = null);
221
- },
222
- d(c) {
223
- c && (x(t), x(i), x(s)), r.d(), l && l.d(c);
224
- }
225
- };
226
- }
227
- function Ge(n) {
228
- let t, e = (
229
- /*$_*/
230
- n[13]("otpExpiredMessage") + ""
231
- ), i;
232
- return {
233
- c() {
234
- t = T("p"), i = z(e), w(t, "class", "OtpNoticeMessage"), w(t, "role", "alert");
235
- },
236
- m(s, p) {
237
- M(s, t, p), b(t, i);
238
- },
239
- p(s, p) {
240
- p[0] & /*$_*/
241
- 8192 && e !== (e = /*$_*/
242
- s[13]("otpExpiredMessage") + "") && A(i, e);
243
- },
244
- d(s) {
245
- s && x(t);
246
- }
247
- };
248
- }
249
- function Xe(n) {
250
- let t = (
251
- /*$_*/
252
- n[13]("popupMessage") + ""
253
- ), e;
254
- return {
255
- c() {
256
- e = z(t);
257
- },
258
- m(i, s) {
259
- M(i, e, s);
260
- },
261
- p(i, s) {
262
- s[0] & /*$_*/
263
- 8192 && t !== (t = /*$_*/
264
- i[13]("popupMessage") + "") && A(e, t);
265
- },
266
- d(i) {
267
- i && x(e);
268
- }
269
- };
270
- }
271
- function Ye(n) {
272
- let t = (
273
- /*$_*/
274
- n[13]("popupMessageLastWarning") + ""
275
- ), e;
276
- return {
277
- c() {
278
- e = z(t);
279
- },
280
- m(i, s) {
281
- M(i, e, s);
282
- },
283
- p(i, s) {
284
- s[0] & /*$_*/
285
- 8192 && t !== (t = /*$_*/
286
- i[13]("popupMessageLastWarning") + "") && A(e, t);
287
- },
288
- d(i) {
289
- i && x(e);
290
- }
291
- };
292
- }
293
- function pe(n) {
294
- let t, e;
295
- return {
296
- c() {
297
- t = T("p"), e = z(
298
- /*errorMessage*/
299
- n[8]
300
- ), w(t, "class", "OtpErrorMessage"), w(t, "role", "alert");
301
- },
302
- m(i, s) {
303
- M(i, t, s), b(t, e);
304
- },
305
- p(i, s) {
306
- s[0] & /*errorMessage*/
307
- 256 && A(
308
- e,
309
- /*errorMessage*/
310
- i[8]
311
- );
312
- },
313
- d(i) {
314
- i && x(t);
315
- }
316
- };
317
- }
318
- function Ze(n) {
319
- let t, e, i = (
320
- /*$_*/
321
- n[13]("timeRemaining") + ""
322
- ), s, p, a = (
323
- /*formatTime*/
324
- n[14](
325
- /*timeLeft*/
326
- n[5]
327
- ) + ""
328
- ), r, l, c = (
329
- /*$_*/
330
- n[13]("minutes") + ""
331
- ), _, v, y, k = oe(
332
- /*otp*/
333
- n[2]
334
- ), u = [];
335
- for (let g = 0; g < k.length; g += 1)
336
- u[g] = ue(le(n, k, g));
337
- return {
338
- c() {
339
- t = T("div"), e = T("div"), s = z(i), p = B(), r = z(a), l = B(), _ = z(c), v = B(), y = T("div");
340
- for (let g = 0; g < u.length; g += 1)
341
- u[g].c();
342
- w(e, "class", "OtpTimer"), w(y, "class", "OtpField"), w(t, "class", "OtpFieldWrapper");
343
- },
344
- m(g, L) {
345
- M(g, t, L), b(t, e), b(e, s), b(e, p), b(e, r), b(e, l), b(e, _), b(t, v), b(t, y);
346
- for (let d = 0; d < u.length; d += 1)
347
- u[d] && u[d].m(y, null);
348
- },
349
- p(g, L) {
350
- if (L[0] & /*$_*/
351
- 8192 && i !== (i = /*$_*/
352
- g[13]("timeRemaining") + "") && A(s, i), L[0] & /*timeLeft*/
353
- 32 && a !== (a = /*formatTime*/
354
- g[14](
355
- /*timeLeft*/
356
- g[5]
357
- ) + "") && A(r, a), L[0] & /*$_*/
358
- 8192 && c !== (c = /*$_*/
359
- g[13]("minutes") + "") && A(_, c), L[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
360
- 235540) {
361
- k = oe(
362
- /*otp*/
363
- g[2]
364
- );
365
- let d;
366
- for (d = 0; d < k.length; d += 1) {
367
- const E = le(g, k, d);
368
- u[d] ? u[d].p(E, L) : (u[d] = ue(E), u[d].c(), u[d].m(y, null));
369
- }
370
- for (; d < u.length; d += 1)
371
- u[d].d(1);
372
- u.length = k.length;
373
- }
374
- },
375
- d(g) {
376
- g && x(t), De(u, g);
377
- }
378
- };
379
- }
380
- function Je(n) {
381
- let t;
382
- return {
383
- c() {
384
- t = T("div"), t.innerHTML = '<span class="OtpLoader"></span>', w(t, "class", "OtpLoaderContainer");
385
- },
386
- m(e, i) {
387
- M(e, t, i);
388
- },
389
- p: Y,
390
- d(e) {
391
- e && x(t);
392
- }
393
- };
394
- }
395
- function ue(n) {
396
- let t, e, i, s = (
397
- /*index*/
398
- n[53]
399
- ), p, a;
400
- const r = () => (
401
- /*input_binding*/
402
- n[28](t, s)
403
- ), l = () => (
404
- /*input_binding*/
405
- n[28](null, s)
406
- );
407
- function c(...v) {
408
- return (
409
- /*input_handler*/
410
- n[29](
411
- /*index*/
412
- n[53],
413
- ...v
414
- )
415
- );
416
- }
417
- function _(...v) {
418
- return (
419
- /*keydown_handler*/
420
- n[30](
421
- /*index*/
422
- n[53],
423
- ...v
424
- )
425
- );
426
- }
427
- return {
428
- c() {
429
- t = T("input"), w(t, "id", `otp-input-${/*index*/
430
- n[53]}`), w(t, "type", "text"), w(t, "class", e = `otp-box ${/*config*/
431
- n[4].inputLength % 2 === 0 && /*index*/
432
- n[53] === /*config*/
433
- n[4].inputLength / 2 - 1 ? "space" : ""}`), w(t, "maxlength", 1), t.value = i = /*char*/
434
- n[51], t.disabled = /*inputDisabled*/
435
- n[11], w(t, "autocomplete", "off");
436
- },
437
- m(v, y) {
438
- M(v, t, y), r(), p || (a = [
439
- V(t, "input", c),
440
- V(t, "keydown", _),
441
- V(
442
- t,
443
- "paste",
444
- /*handleOnPasteOtp*/
445
- n[15]
446
- )
447
- ], p = !0);
448
- },
449
- p(v, y) {
450
- n = v, y[0] & /*config*/
451
- 16 && e !== (e = `otp-box ${/*config*/
452
- n[4].inputLength % 2 === 0 && /*index*/
453
- n[53] === /*config*/
454
- n[4].inputLength / 2 - 1 ? "space" : ""}`) && w(t, "class", e), y[0] & /*otp*/
455
- 4 && i !== (i = /*char*/
456
- n[51]) && t.value !== i && (t.value = i), y[0] & /*inputDisabled*/
457
- 2048 && (t.disabled = /*inputDisabled*/
458
- n[11]), s !== /*index*/
459
- n[53] && (l(), s = /*index*/
460
- n[53], r());
461
- },
462
- d(v) {
463
- v && x(t), l(), p = !1, je(a);
464
- }
465
- };
466
- }
467
- function Qe(n) {
468
- let t, e = (
469
- /*$_*/
470
- n[13]("submit") + ""
471
- ), i, s, p, a;
472
- return {
473
- c() {
474
- t = T("button"), i = z(e), w(t, "class", "OtpButton"), t.disabled = s = /*otp*/
475
- n[2].join("").length !== /*config*/
476
- n[4].inputLength;
477
- },
478
- m(r, l) {
479
- M(r, t, l), b(t, i), p || (a = V(
480
- t,
481
- "click",
482
- /*submitOtp*/
483
- n[20]
484
- ), p = !0);
485
- },
486
- p(r, l) {
487
- l[0] & /*$_*/
488
- 8192 && e !== (e = /*$_*/
489
- r[13]("submit") + "") && A(i, e), l[0] & /*otp, config*/
490
- 20 && s !== (s = /*otp*/
491
- r[2].join("").length !== /*config*/
492
- r[4].inputLength) && (t.disabled = s);
493
- },
494
- d(r) {
495
- r && x(t), p = !1, a();
496
- }
497
- };
498
- }
499
- function $e(n) {
500
- let t, e = (
501
- /*$_*/
502
- n[13]("resendOtp") + ""
503
- ), i, s, p;
504
- return {
505
- c() {
506
- t = T("button"), i = z(e), w(t, "class", "OtpButton");
507
- },
508
- m(a, r) {
509
- M(a, t, r), b(t, i), s || (p = V(
510
- t,
511
- "click",
512
- /*handleResendOtp*/
513
- n[18]
514
- ), s = !0);
515
- },
516
- p(a, r) {
517
- r[0] & /*$_*/
518
- 8192 && e !== (e = /*$_*/
519
- a[13]("resendOtp") + "") && A(i, e);
520
- },
521
- d(a) {
522
- a && x(t), s = !1, p();
523
- }
524
- };
525
- }
526
- function et(n) {
527
- let t, e = (
528
- /*showPopup*/
529
- n[1] && ae(n)
530
- );
531
- return {
532
- c() {
533
- t = T("div"), e && e.c();
534
- },
535
- m(i, s) {
536
- M(i, t, s), e && e.m(t, null), n[31](t);
537
- },
538
- p(i, s) {
539
- /*showPopup*/
540
- i[1] ? e ? e.p(i, s) : (e = ae(i), e.c(), e.m(t, null)) : e && (e.d(1), e = null);
541
- },
542
- i: Y,
543
- o: Y,
544
- d(i) {
545
- i && x(t), e && e.d(), n[31](null);
546
- }
547
- };
548
- }
549
- function tt(n, t, e) {
550
- let i;
551
- Re(n, Ne, (o) => e(13, i = o));
552
- let { clientstyling: s = "" } = t, { clientstylingurl: p = "" } = t, { mbsource: a } = t, { lang: r = "en" } = t, { endpoint: l } = t, { session: c } = t, { translationurl: _ } = t, v = !1, y = [], k = !0, u = null, g = 0, L = "", d = "", E = !1, P = !1, O = "", F = "", j = "", S = !1, m = !1, C = !1, H, N = [], W = null, G = 0;
553
- const Z = {
554
- MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
555
- INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error"
556
- };
557
- Object.keys(re).forEach((o) => {
558
- se(o, re[o]);
559
- });
560
- const ce = () => {
561
- Ue(r);
562
- }, fe = () => {
563
- fetch(_).then((o) => o.json()).then((o) => {
564
- Object.keys(o).forEach((f) => {
565
- se(f, o[f]);
566
- });
567
- }).catch((o) => {
568
- console.log(o);
569
- });
570
- }, J = (o) => I(this, null, function* () {
571
- var f;
572
- if ((f = o.detail) != null && f["x-step-up-required"]) {
573
- if (e(7, P = !1), e(6, E = !1), e(8, O = ""), e(1, v = !0), F = o.detail["x-step-up-token"], j = o.detail.flow, !F || !j) {
574
- e(3, k = !1), e(7, P = !0), e(8, O = i("configError"));
575
- return;
576
- }
577
- yield te();
578
- }
579
- }), q = () => {
580
- W && (clearInterval(W), W = null), e(6, E = !1), e(7, P = !1), e(8, O = ""), e(1, v = !1), e(10, m = !1);
581
- }, de = () => {
582
- const o = new Date(L), f = new Date(d), h = /* @__PURE__ */ new Date(), D = f.getTime() - h.getTime();
583
- G = o.getTime() - D;
584
- const R = Date.now(), K = Math.max(0, Math.floor((G - R) / 1e3));
585
- e(5, g = K);
586
- }, me = () => {
587
- W && clearInterval(W), W = setInterval(
588
- () => {
589
- const o = Date.now(), f = Math.max(0, Math.floor((G - o) / 1e3));
590
- e(5, g = f), e(11, C = f <= 0), f <= 0 && (clearInterval(W), W = null, e(9, S = !0), e(6, E = !1), e(10, m = !1));
591
- },
592
- 1e3
593
- );
594
- }, ge = (o) => {
595
- const f = Math.floor(o / 60), h = o % 60;
596
- return `${f.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}`;
597
- }, X = (o, f) => {
598
- const h = [...y];
599
- h[o] = f.toUpperCase(), e(2, y = h);
600
- }, he = (o) => {
601
- var D, R, K;
602
- o.preventDefault();
603
- const h = (((R = (D = o.clipboardData) == null ? void 0 : D.getData("text")) == null ? void 0 : R.trim()) || "").slice(0, u.inputLength).split("");
604
- e(2, y = [...h, ...Array(u.inputLength - h.length).fill("")]), (K = N[h.length]) == null || K.focus(), h.length === u.inputLength && ee();
605
- }, Q = (o, f) => {
606
- const h = o.target, D = h.value;
607
- if (/^[a-z0-9]$/i.test(D)) {
608
- X(f, D);
609
- const R = N[f + 1];
610
- R == null || R.focus();
611
- }
612
- h.value = "";
613
- }, $ = (o, f) => {
614
- const h = o.key, D = o.ctrlKey || o.metaKey;
615
- if (/^[a-z0-9]$/i.test(h)) {
616
- if (D && h.toLowerCase() === "v")
617
- return;
618
- o.preventDefault(), X(f, h);
619
- const R = N[f + 1];
620
- R == null || R.focus();
621
- } else if (h === "Backspace") {
622
- o.preventDefault(), y[f] !== "" && X(f, "");
623
- const R = N[f - 1];
624
- R == null || R.focus();
625
- }
626
- }, be = () => {
627
- const o = new CustomEvent("otpResendRequested");
628
- window.dispatchEvent(o);
629
- }, _e = (o) => {
630
- window.dispatchEvent(new CustomEvent(
631
- "otpSubmitted",
632
- {
633
- detail: {
634
- code: o,
635
- maxAttempts: u.maxValidationAttempts,
636
- validatedAttempts: u.numberOfValidateAttempts
637
- }
638
- }
639
- ));
640
- }, we = (o) => I(this, null, function* () {
641
- const f = new URL(`/api/nwa/api/v1/mfa/challenge/${F}/validate`, l);
642
- f.searchParams.append("input", o);
643
- try {
644
- const h = yield fetch(f.href, { method: "POST" });
645
- if (h.status === 200) {
646
- ye();
647
- return;
648
- }
649
- const D = yield h.json();
650
- throw new Error(D.message);
651
- } catch (h) {
652
- if (h.message === Z.INTERNAL_SERVER_ERROR) {
653
- if (u.numberOfValidateAttempts === u.maxValidationAttempts - 1) {
654
- window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
655
- {
656
- type: "WidgetNotification",
657
- data: {
658
- type: "error",
659
- message: i("accountBlocked")
660
- }
661
- },
662
- window.location.href
663
- ), q();
664
- return;
665
- }
666
- e(6, E = !0), e(8, O = i("invalidOtp")), te();
667
- return;
668
- }
669
- console.error("OTP submission failed:", h), e(6, E = !0), e(8, O = i("submissionError"));
670
- } finally {
671
- e(3, k = !1);
672
- }
673
- }), ye = () => {
674
- window.dispatchEvent(new CustomEvent(
675
- "otpSuccess",
676
- {
677
- detail: {
678
- message: "User successfully authenticated"
679
- }
680
- }
681
- )), q();
682
- }, ve = () => {
683
- window.dispatchEvent(new CustomEvent("manualClosePopup")), q();
684
- }, ee = () => I(this, null, function* () {
685
- if (y.join("").length !== u.inputLength) {
686
- e(6, E = !0), e(8, O = i("invalidOtp"));
687
- return;
688
- }
689
- e(3, k = !0), e(6, E = !1), e(8, O = "");
690
- const o = y.join("");
691
- j === "stateless" && _e(o), j === "stateful" && (yield we(o));
692
- }), te = () => I(this, null, function* () {
693
- if (l)
694
- try {
695
- e(3, k = !0);
696
- const o = new URL(`/api/nwa/api/v1/mfa/challenge/${F}/config`, l), f = yield fetch(o.href), h = yield f.json();
697
- if (f.ok)
698
- e(4, u = h), e(2, y = Array(u.inputLength).fill("")), e(9, S = !1), L = u.expirationTime, d = u.serverTime, u.numberOfValidateAttempts !== 0 && (e(6, E = !0), e(8, O = i("invalidOtp"))), u.numberOfValidateAttempts === u.maxValidationAttempts - 1 && e(10, m = !0), e(3, k = !1), de(), me();
699
- else if (h && h.details === Z.MAX_ATTEMPTS_EXCEEDED)
700
- q();
701
- else {
702
- const D = h && h.message || `Failed to load config. Status: ${f.status}`;
703
- throw new Error(D);
704
- }
705
- } catch (o) {
706
- e(3, k = !1), e(7, P = !0), e(8, O = i("configError")), console.error("Error loading 2FA config:", o);
707
- }
708
- });
709
- Ae(() => (window.addEventListener("stepUpAuthRequired", J, !1), window.addEventListener("closePopup", q, !1), () => {
710
- window.removeEventListener("stepUpAuthRequired", J), window.removeEventListener("closePopup", q, !1);
711
- }));
712
- function Oe(o, f) {
713
- ne[o ? "unshift" : "push"](() => {
714
- N[f] = o, e(12, N);
715
- });
716
- }
717
- const ke = (o, f) => Q(f, o), Ee = (o, f) => $(f, o);
718
- function Te(o) {
719
- ne[o ? "unshift" : "push"](() => {
720
- H = o, e(0, H);
721
- });
722
- }
723
- return n.$$set = (o) => {
724
- "clientstyling" in o && e(21, s = o.clientstyling), "clientstylingurl" in o && e(22, p = o.clientstylingurl), "mbsource" in o && e(23, a = o.mbsource), "lang" in o && e(24, r = o.lang), "endpoint" in o && e(25, l = o.endpoint), "session" in o && e(26, c = o.session), "translationurl" in o && e(27, _ = o.translationurl);
725
- }, n.$$.update = () => {
726
- n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
727
- 2097153 && s && H && Be(H, s), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
728
- 4194305 && p && H && He(H, p), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
729
- 8388609 && a && H && We(H, `${a}.Style`), n.$$.dirty[0] & /*lang*/
730
- 16777216 && r && ce(), n.$$.dirty[0] & /*lang, translationurl*/
731
- 150994944 && r && _ && fe();
732
- }, [
733
- H,
734
- v,
735
- y,
736
- k,
737
- u,
738
- g,
739
- E,
740
- P,
741
- O,
742
- S,
743
- m,
744
- C,
745
- N,
746
- i,
747
- ge,
748
- he,
749
- Q,
750
- $,
751
- be,
752
- ve,
753
- ee,
754
- s,
755
- p,
756
- a,
757
- r,
758
- l,
759
- c,
760
- _,
761
- Oe,
762
- ke,
763
- Ee,
764
- Te
765
- ];
766
- }
767
- class nt extends Me {
768
- constructor(t) {
769
- super(), Pe(
770
- this,
771
- t,
772
- tt,
773
- et,
774
- Se,
775
- {
776
- clientstyling: 21,
777
- clientstylingurl: 22,
778
- mbsource: 23,
779
- lang: 24,
780
- endpoint: 25,
781
- session: 26,
782
- translationurl: 27
783
- },
784
- Ve,
785
- [-1, -1]
786
- );
787
- }
788
- get clientstyling() {
789
- return this.$$.ctx[21];
790
- }
791
- set clientstyling(t) {
792
- this.$$set({ clientstyling: t }), U();
793
- }
794
- get clientstylingurl() {
795
- return this.$$.ctx[22];
796
- }
797
- set clientstylingurl(t) {
798
- this.$$set({ clientstylingurl: t }), U();
799
- }
800
- get mbsource() {
801
- return this.$$.ctx[23];
802
- }
803
- set mbsource(t) {
804
- this.$$set({ mbsource: t }), U();
805
- }
806
- get lang() {
807
- return this.$$.ctx[24];
808
- }
809
- set lang(t) {
810
- this.$$set({ lang: t }), U();
811
- }
812
- get endpoint() {
813
- return this.$$.ctx[25];
814
- }
815
- set endpoint(t) {
816
- this.$$set({ endpoint: t }), U();
817
- }
818
- get session() {
819
- return this.$$.ctx[26];
820
- }
821
- set session(t) {
822
- this.$$set({ session: t }), U();
823
- }
824
- get translationurl() {
825
- return this.$$.ctx[27];
826
- }
827
- set translationurl(t) {
828
- this.$$set({ translationurl: t }), U();
829
- }
830
- }
831
- Fe(nt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {} }, [], [], !0);
832
- export {
833
- nt as default
834
- };