@everymatrix/cashier-page 1.85.17 → 1.85.19

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 (82) hide show
  1. package/components/{CashierCarousel-D9RhCULN.js → CashierCarousel-Cf2c1vPp.js} +1938 -1376
  2. package/components/{CashierCarousel-C-jIotRi.js → CashierCarousel-CsnmOP94.js} +1961 -1398
  3. package/components/CashierCarousel-DHmjrgBC.cjs +23 -0
  4. package/components/CashierError-BDmChuIE.js +438 -0
  5. package/components/CashierError-BIiEXbdF.js +438 -0
  6. package/components/CashierError-CLWqWwfU.cjs +1 -0
  7. package/components/CashierHeader-CP7RROYr.cjs +1 -0
  8. package/components/{CashierHeader-CK_NVBvX.js → CashierHeader-Cecv5g56.js} +51 -51
  9. package/components/{CashierHeader-Z4vR_fbH.js → CashierHeader-Dd5b4-yJ.js} +47 -47
  10. package/components/CashierIframeRedirect-BXrhvi-f.cjs +1 -0
  11. package/components/{CashierIframeRedirect-Cae_sEXq.js → CashierIframeRedirect-DMYVav-v.js} +51 -51
  12. package/components/{CashierIframeRedirect-Cs3dAZqE.js → CashierIframeRedirect-reE-yTgQ.js} +45 -45
  13. package/components/CashierMethodDetails-DMWm-2jm.js +9918 -0
  14. package/components/CashierMethodDetails-Dqye22rm.cjs +85 -0
  15. package/components/CashierMethodDetails-wpPiw7iF.js +9878 -0
  16. package/components/CashierMethodsList-3cUFLT6G.js +825 -0
  17. package/components/CashierMethodsList-Cu_kh22f.cjs +1 -0
  18. package/components/CashierMethodsList-DLD2m0bS.js +810 -0
  19. package/components/CashierModal-C-jze_SD.js +342 -0
  20. package/components/CashierModal-DVeVHCTj.cjs +1 -0
  21. package/components/CashierModal-Dclaqxyx.js +358 -0
  22. package/components/{CashierNotifications-64xrf21d.js → CashierNotifications-BVUb_REU.js} +13 -13
  23. package/components/{CashierNotifications-Cot8tKyV.js → CashierNotifications-COlT367w.js} +13 -13
  24. package/components/{CashierNotifications-o1UTpxCw.cjs → CashierNotifications-DdrhkPqp.cjs} +1 -1
  25. package/components/CashierPage-BZrMKgWP.js +3848 -0
  26. package/components/CashierPage-CNxxSYGB.cjs +1 -0
  27. package/components/CashierPage-DXq4FlWN.js +3822 -0
  28. package/components/{CashierReceiptPage-ctSAsYol.js → CashierReceiptPage-BDZFgJSl.js} +894 -744
  29. package/components/{CashierReceiptPage-xNlmU_u-.js → CashierReceiptPage-aqMEl6Er.js} +887 -737
  30. package/components/CashierReceiptPage-fKiQGusu.cjs +26 -0
  31. package/components/{CashierSessionExpirationModal-DbkIQJ-J.js → CashierSessionExpirationModal-BqgXO3EK.js} +238 -238
  32. package/components/CashierSessionExpirationModal-UM35srIk.cjs +2 -0
  33. package/components/{CashierSessionExpirationModal-DJxx7PT2.js → CashierSessionExpirationModal-lONAKt8s.js} +202 -202
  34. package/components/{CashierSpinner-fUvoz21a.js → CashierSpinner-BQWOaYce.js} +8 -8
  35. package/components/{CashierSpinner-DOCzNsD8.cjs → CashierSpinner-D5McPkCt.cjs} +1 -1
  36. package/components/{CashierSpinner-CIpXwm9I.js → CashierSpinner-DZSuVNPM.js} +6 -6
  37. package/components/CashierStepUp-DWd3cylJ.cjs +1 -0
  38. package/components/CashierStepUp-DyfuU9cc.js +1109 -0
  39. package/components/CashierStepUp-sBUhsV5t.js +1070 -0
  40. package/components/CashierTransactionHistory-DG7eCAHQ.js +1305 -0
  41. package/components/CashierTransactionHistory-EZ0xgsVJ.js +1305 -0
  42. package/components/CashierTransactionHistory-MUYg9ooO.cjs +1 -0
  43. package/components/CashierVerifications-BbUQaFnO.cjs +1 -0
  44. package/components/{CashierVerifications-DyEtjk9T.js → CashierVerifications-Cz6b5MUe.js} +159 -159
  45. package/components/{CashierVerifications-OqNAPlvP.js → CashierVerifications-kIOoUzVh.js} +144 -144
  46. package/components/{TxnStatusIcon-Dx4SpBKR.cjs → TxnStatusIcon-BhtPQm1B.cjs} +1 -1
  47. package/components/{TxnStatusIcon-C5YEVJGC.js → TxnStatusIcon-DMKCkAXd.js} +1 -1
  48. package/components/{TxnStatusIcon-Cdbn57Qc.js → TxnStatusIcon-ty2g5_He.js} +1 -1
  49. package/components/{TxnTypeIcons-DaYTcY0u.js → TxnTypeIcons-B5CYl9NW.js} +1 -1
  50. package/components/{TxnTypeIcons-D-p9WLvQ.cjs → TxnTypeIcons-CyHXLkXz.cjs} +1 -1
  51. package/components/{TxnTypeIcons-Dl8aWDV4.js → TxnTypeIcons-D_bSXM7r.js} +1 -1
  52. package/es2015/cashier-page.cjs +1 -1
  53. package/es2015/cashier-page.js +2 -2
  54. package/esnext/cashier-page.js +2 -2
  55. package/package.json +1 -1
  56. package/stencil/{index-b2193545-CEVSYa3a.cjs → index-b2193545-B5Q7rnAU.cjs} +1 -1
  57. package/stencil/{ui-skeleton-CjyC3-3H.cjs → ui-skeleton-UxIIZ8UD.cjs} +1 -1
  58. package/stencil/{ui-skeleton-ed169f8f-Cb3lsf1V.cjs → ui-skeleton-ed169f8f-BEwquWmd.cjs} +1 -1
  59. package/components/CashierCarousel-DXPbv83E.cjs +0 -23
  60. package/components/CashierError-BrNzlEVN.js +0 -478
  61. package/components/CashierError-C8pJvoqH.cjs +0 -1
  62. package/components/CashierError-eoaZt-lY.js +0 -478
  63. package/components/CashierHeader-B3IckLiD.cjs +0 -1
  64. package/components/CashierIframeRedirect-CdQkuIPa.cjs +0 -1
  65. package/components/CashierMethodDetails-C-vMOTBK.cjs +0 -85
  66. package/components/CashierMethodDetails-CHTQD5q8.js +0 -9014
  67. package/components/CashierMethodDetails-nseWnQWW.js +0 -8995
  68. package/components/CashierMethodsList-Bk6wZ8bj.js +0 -733
  69. package/components/CashierMethodsList-CDXei8fp.cjs +0 -1
  70. package/components/CashierMethodsList-DmYBXQ0H.js +0 -745
  71. package/components/CashierModal-By3PyyVz.js +0 -268
  72. package/components/CashierModal-D2cxw8Kv.cjs +0 -1
  73. package/components/CashierModal-pKGYmx2d.js +0 -268
  74. package/components/CashierPage-Bvp8N4fC.cjs +0 -1
  75. package/components/CashierPage-DYIYpRj6.js +0 -2619
  76. package/components/CashierPage-Ddeo-vHf.js +0 -2619
  77. package/components/CashierReceiptPage-C0VpFZGT.cjs +0 -26
  78. package/components/CashierSessionExpirationModal-DgpP9ZIj.cjs +0 -2
  79. package/components/CashierTransactionHistory-8T01T0tU.js +0 -1305
  80. package/components/CashierTransactionHistory-CIy5cCml.cjs +0 -1
  81. package/components/CashierTransactionHistory-Cd8u6Bhf.js +0 -1305
  82. package/components/CashierVerifications-5x8_YW9j.cjs +0 -1
@@ -0,0 +1,1070 @@
1
+ import { a as Ue, $ as qe, S as Ke, b as Xe, s as Ge, f as re, c as Ye, G as ve, e as E, k as S, l as c, x as ee, m as v, X, n as A, o as i, p as Je, q as Ze, y as Ee, v as x, w as T, a0 as Re, W as $, r as Qe, Y as Se, a4 as $e, B as et, C as tt, D as nt, E as lt, F as ot } from "./CashierCarousel-Cf2c1vPp.js";
2
+ function Me(n, e) {
3
+ Ue(n, e);
4
+ }
5
+ function it(n) {
6
+ qe.set(n);
7
+ }
8
+ const Le = {
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 st(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 Te(n, e, t) {
60
+ const l = n.slice();
61
+ return l[67] = e[t], l[68] = e, l[69] = t, l;
62
+ }
63
+ function rt(n) {
64
+ let e, t, l = (
65
+ /*$_*/
66
+ n[17]("otpTitle") + ""
67
+ ), s, d, u, r, a, m, h, w, C, L, _, f, y, k, I, N, W, te, R = (
68
+ /*$_*/
69
+ n[17]("channelSMS") + ""
70
+ ), ne, oe, V, Y, he, M, D, F, G, z, J, K, Z, U, ie = (
71
+ /*$_*/
72
+ n[17]("channelEmail") + ""
73
+ ), ae, ce, pe, ue, le, ge, we;
74
+ function be(p, O) {
75
+ return (
76
+ /*showResendOtp*/
77
+ p[9] ? ut : (
78
+ /*showOtpInput*/
79
+ p[12] ? ct : pt
80
+ )
81
+ );
82
+ }
83
+ let de = be(n), q = de(n), B = (
84
+ /*selectedChannel*/
85
+ n[0] && Ae(n)
86
+ );
87
+ function fe(p, O) {
88
+ if (
89
+ /*isLoading*/
90
+ p[3] && /*showOtpInput*/
91
+ p[12]
92
+ )
93
+ return wt;
94
+ if (
95
+ /*showOtpInput*/
96
+ p[12] && /*config*/
97
+ p[4]
98
+ )
99
+ return gt;
100
+ }
101
+ let Q = fe(n), j = Q && Q(n);
102
+ function me(p, O) {
103
+ if (
104
+ /*showResendOtp*/
105
+ p[9]
106
+ )
107
+ return _t;
108
+ if (
109
+ /*showOtpInput*/
110
+ p[12] && /*config*/
111
+ p[4]
112
+ )
113
+ return bt;
114
+ }
115
+ let se = me(n), P = se && se(n);
116
+ return {
117
+ c() {
118
+ e = v("div"), t = v("div"), s = T(l), d = A(), q.c(), u = A(), r = v("div"), a = v("label"), m = v("div"), h = A(), w = v("input"), L = A(), _ = v("div"), f = X("svg"), y = X("path"), k = X("circle"), I = X("circle"), N = X("circle"), W = A(), te = v("span"), ne = T(R), oe = A(), V = v("label"), Y = v("div"), he = A(), M = v("input"), F = A(), G = v("div"), z = X("svg"), J = X("rect"), K = X("path"), Z = A(), U = v("span"), ae = T(ie), ce = A(), B && B.c(), pe = A(), j && j.c(), ue = A(), le = v("div"), P && P.c(), i(t, "class", "Title"), i(e, "class", "OtpDescription"), i(m, "class", "RadioIndicator"), $(
119
+ m,
120
+ "checked",
121
+ /*selectedChannel*/
122
+ n[0] === /*channels*/
123
+ n[18].SMS
124
+ ), i(w, "type", "radio"), i(w, "name", "channel"), w.value = /*channels*/
125
+ n[18].SMS, w.checked = C = /*selectedChannel*/
126
+ n[0] === /*channels*/
127
+ n[18].SMS, i(y, "d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"), i(k, "cx", "9"), i(k, "cy", "11"), i(k, "r", "0.5"), i(k, "fill", "currentColor"), i(I, "cx", "12"), i(I, "cy", "11"), i(I, "r", "0.5"), i(I, "fill", "currentColor"), i(N, "cx", "15"), i(N, "cy", "11"), i(N, "r", "0.5"), i(N, "fill", "currentColor"), i(f, "xmlns", "http://www.w3.org/2000/svg"), i(f, "width", "24"), i(f, "height", "24"), i(f, "viewBox", "0 0 24 24"), i(f, "fill", "none"), i(f, "stroke", "currentColor"), i(f, "stroke-width", "2"), i(f, "stroke-linecap", "round"), i(f, "stroke-linejoin", "round"), i(_, "class", "ChannelContent"), i(a, "class", "ChannelCheckbox"), $(
128
+ a,
129
+ "selected",
130
+ /*selectedChannel*/
131
+ n[0] === /*channels*/
132
+ n[18].SMS
133
+ ), i(Y, "class", "RadioIndicator"), $(
134
+ Y,
135
+ "checked",
136
+ /*selectedChannel*/
137
+ n[0] === /*channels*/
138
+ n[18].EMAIL
139
+ ), i(M, "type", "radio"), i(M, "name", "channel"), M.value = /*channels*/
140
+ n[18].EMAIL, M.checked = D = /*selectedChannel*/
141
+ n[0] === /*channels*/
142
+ n[18].EMAIL, i(J, "x", "2"), i(J, "y", "4"), i(J, "width", "20"), i(J, "height", "16"), i(J, "rx", "2"), i(K, "d", "m2 7 10 6 10-6"), i(z, "xmlns", "http://www.w3.org/2000/svg"), i(z, "width", "24"), i(z, "height", "24"), i(z, "viewBox", "0 0 24 24"), i(z, "fill", "none"), i(z, "stroke", "currentColor"), i(z, "stroke-width", "2"), i(z, "stroke-linecap", "round"), i(z, "stroke-linejoin", "round"), i(G, "class", "ChannelContent"), i(V, "class", "ChannelCheckbox"), $(
143
+ V,
144
+ "selected",
145
+ /*selectedChannel*/
146
+ n[0] === /*channels*/
147
+ n[18].EMAIL
148
+ ), i(r, "class", "ChannelSelection"), i(le, "class", "OtpActionButtons");
149
+ },
150
+ m(p, O) {
151
+ S(p, e, O), c(e, t), c(t, s), c(e, d), q.m(e, null), S(p, u, O), S(p, r, O), c(r, a), c(a, m), c(a, h), c(a, w), c(a, L), c(a, _), c(_, f), c(f, y), c(f, k), c(f, I), c(f, N), c(_, W), c(_, te), c(te, ne), c(r, oe), c(r, V), c(V, Y), c(V, he), c(V, M), c(V, F), c(V, G), c(G, z), c(z, J), c(z, K), c(G, Z), c(G, U), c(U, ae), S(p, ce, O), B && B.m(p, O), S(p, pe, O), j && j.m(p, O), S(p, ue, O), S(p, le, O), P && P.m(le, null), ge || (we = [
152
+ ee(
153
+ w,
154
+ "change",
155
+ /*change_handler*/
156
+ n[37]
157
+ ),
158
+ ee(
159
+ M,
160
+ "change",
161
+ /*change_handler_1*/
162
+ n[38]
163
+ )
164
+ ], ge = !0);
165
+ },
166
+ p(p, O) {
167
+ O[0] & /*$_*/
168
+ 131072 && l !== (l = /*$_*/
169
+ p[17]("otpTitle") + "") && x(s, l), de === (de = be(p)) && q ? q.p(p, O) : (q.d(1), q = de(p), q && (q.c(), q.m(e, null))), O[0] & /*selectedChannel, channels*/
170
+ 262145 && $(
171
+ m,
172
+ "checked",
173
+ /*selectedChannel*/
174
+ p[0] === /*channels*/
175
+ p[18].SMS
176
+ ), O[0] & /*selectedChannel*/
177
+ 1 && C !== (C = /*selectedChannel*/
178
+ p[0] === /*channels*/
179
+ p[18].SMS) && (w.checked = C), O[0] & /*$_*/
180
+ 131072 && R !== (R = /*$_*/
181
+ p[17]("channelSMS") + "") && x(ne, R), O[0] & /*selectedChannel, channels*/
182
+ 262145 && $(
183
+ a,
184
+ "selected",
185
+ /*selectedChannel*/
186
+ p[0] === /*channels*/
187
+ p[18].SMS
188
+ ), O[0] & /*selectedChannel, channels*/
189
+ 262145 && $(
190
+ Y,
191
+ "checked",
192
+ /*selectedChannel*/
193
+ p[0] === /*channels*/
194
+ p[18].EMAIL
195
+ ), O[0] & /*selectedChannel*/
196
+ 1 && D !== (D = /*selectedChannel*/
197
+ p[0] === /*channels*/
198
+ p[18].EMAIL) && (M.checked = D), O[0] & /*$_*/
199
+ 131072 && ie !== (ie = /*$_*/
200
+ p[17]("channelEmail") + "") && x(ae, ie), O[0] & /*selectedChannel, channels*/
201
+ 262145 && $(
202
+ V,
203
+ "selected",
204
+ /*selectedChannel*/
205
+ p[0] === /*channels*/
206
+ p[18].EMAIL
207
+ ), /*selectedChannel*/
208
+ p[0] ? B ? B.p(p, O) : (B = Ae(p), B.c(), B.m(pe.parentNode, pe)) : B && (B.d(1), B = null), Q === (Q = fe(p)) && j ? j.p(p, O) : (j && j.d(1), j = Q && Q(p), j && (j.c(), j.m(ue.parentNode, ue))), se === (se = me(p)) && P ? P.p(p, O) : (P && P.d(1), P = se && se(p), P && (P.c(), P.m(le, null)));
209
+ },
210
+ d(p) {
211
+ p && (E(e), E(u), E(r), E(ce), E(pe), E(ue), E(le)), q.d(), B && B.d(p), j && j.d(p), P && P.d(), ge = !1, Re(we);
212
+ }
213
+ };
214
+ }
215
+ function at(n) {
216
+ let e, t, l, s, d, u, r = (
217
+ /*$_*/
218
+ n[17]("errorHeader") + ""
219
+ ), a, m, h, w, C, L, _ = (
220
+ /*$_*/
221
+ n[17]("close") + ""
222
+ ), f, y, k;
223
+ return {
224
+ c() {
225
+ e = v("div"), t = v("div"), l = X("svg"), s = X("path"), d = A(), u = v("h2"), a = T(r), m = A(), h = v("p"), w = T(
226
+ /*errorMessage*/
227
+ n[8]
228
+ ), C = A(), L = v("button"), f = T(_), i(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"), i(l, "xmlns", "http://www.w3.org/2000/svg"), i(l, "viewBox", "0 0 512 512"), i(t, "class", "OtpErrorHeader"), i(L, "class", "OtpButton error"), i(e, "class", "OtpError");
229
+ },
230
+ m(I, N) {
231
+ S(I, e, N), c(e, t), c(t, l), c(l, s), c(t, d), c(t, u), c(u, a), c(e, m), c(e, h), c(h, w), c(e, C), c(e, L), c(L, f), y || (k = ee(
232
+ L,
233
+ "click",
234
+ /*manualClosePopup*/
235
+ n[26]
236
+ ), y = !0);
237
+ },
238
+ p(I, N) {
239
+ N[0] & /*$_*/
240
+ 131072 && r !== (r = /*$_*/
241
+ I[17]("errorHeader") + "") && x(a, r), N[0] & /*errorMessage*/
242
+ 256 && x(
243
+ w,
244
+ /*errorMessage*/
245
+ I[8]
246
+ ), N[0] & /*$_*/
247
+ 131072 && _ !== (_ = /*$_*/
248
+ I[17]("close") + "") && x(f, _);
249
+ },
250
+ d(I) {
251
+ I && E(e), y = !1, k();
252
+ }
253
+ };
254
+ }
255
+ function ct(n) {
256
+ let e, t, l, s;
257
+ function d(m, h) {
258
+ return (
259
+ /*isLastWarning*/
260
+ m[10] ? ft : dt
261
+ );
262
+ }
263
+ let u = d(n), r = u(n), a = (
264
+ /*hasErrors*/
265
+ n[6] && Ie(n)
266
+ );
267
+ return {
268
+ c() {
269
+ e = v("p"), r.c(), l = A(), a && a.c(), s = Qe(), i(e, "class", t = /*isLastWarning*/
270
+ n[10] ? "LastWarningMessage" : "");
271
+ },
272
+ m(m, h) {
273
+ S(m, e, h), r.m(e, null), S(m, l, h), a && a.m(m, h), S(m, s, h);
274
+ },
275
+ p(m, h) {
276
+ u === (u = d(m)) && r ? r.p(m, h) : (r.d(1), r = u(m), r && (r.c(), r.m(e, null))), h[0] & /*isLastWarning*/
277
+ 1024 && t !== (t = /*isLastWarning*/
278
+ m[10] ? "LastWarningMessage" : "") && i(e, "class", t), /*hasErrors*/
279
+ m[6] ? a ? a.p(m, h) : (a = Ie(m), a.c(), a.m(s.parentNode, s)) : a && (a.d(1), a = null);
280
+ },
281
+ d(m) {
282
+ m && (E(e), E(l), E(s)), r.d(), a && a.d(m);
283
+ }
284
+ };
285
+ }
286
+ function pt(n) {
287
+ let e, t = (
288
+ /*$_*/
289
+ (n[17]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
290
+ ), l;
291
+ return {
292
+ c() {
293
+ e = v("p"), l = T(t);
294
+ },
295
+ m(s, d) {
296
+ S(s, e, d), c(e, l);
297
+ },
298
+ p(s, d) {
299
+ d[0] & /*$_*/
300
+ 131072 && t !== (t = /*$_*/
301
+ (s[17]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && x(l, t);
302
+ },
303
+ d(s) {
304
+ s && E(e);
305
+ }
306
+ };
307
+ }
308
+ function ut(n) {
309
+ let e, t = (
310
+ /*$_*/
311
+ n[17]("otpExpiredMessage") + ""
312
+ ), l;
313
+ return {
314
+ c() {
315
+ e = v("p"), l = T(t), i(e, "class", "OtpNoticeMessage"), i(e, "role", "alert");
316
+ },
317
+ m(s, d) {
318
+ S(s, e, d), c(e, l);
319
+ },
320
+ p(s, d) {
321
+ d[0] & /*$_*/
322
+ 131072 && t !== (t = /*$_*/
323
+ s[17]("otpExpiredMessage") + "") && x(l, t);
324
+ },
325
+ d(s) {
326
+ s && E(e);
327
+ }
328
+ };
329
+ }
330
+ function dt(n) {
331
+ let e = (
332
+ /*$_*/
333
+ n[17]("popupMessage") + ""
334
+ ), t;
335
+ return {
336
+ c() {
337
+ t = T(e);
338
+ },
339
+ m(l, s) {
340
+ S(l, t, s);
341
+ },
342
+ p(l, s) {
343
+ s[0] & /*$_*/
344
+ 131072 && e !== (e = /*$_*/
345
+ l[17]("popupMessage") + "") && x(t, e);
346
+ },
347
+ d(l) {
348
+ l && E(t);
349
+ }
350
+ };
351
+ }
352
+ function ft(n) {
353
+ let e = (
354
+ /*$_*/
355
+ n[17]("popupMessageLastWarning") + ""
356
+ ), t;
357
+ return {
358
+ c() {
359
+ t = T(e);
360
+ },
361
+ m(l, s) {
362
+ S(l, t, s);
363
+ },
364
+ p(l, s) {
365
+ s[0] & /*$_*/
366
+ 131072 && e !== (e = /*$_*/
367
+ l[17]("popupMessageLastWarning") + "") && x(t, e);
368
+ },
369
+ d(l) {
370
+ l && E(t);
371
+ }
372
+ };
373
+ }
374
+ function Ie(n) {
375
+ let e, t;
376
+ return {
377
+ c() {
378
+ e = v("p"), t = T(
379
+ /*errorMessage*/
380
+ n[8]
381
+ ), i(e, "class", "OtpErrorMessage"), i(e, "role", "alert");
382
+ },
383
+ m(l, s) {
384
+ S(l, e, s), c(e, t);
385
+ },
386
+ p(l, s) {
387
+ s[0] & /*errorMessage*/
388
+ 256 && x(
389
+ t,
390
+ /*errorMessage*/
391
+ l[8]
392
+ );
393
+ },
394
+ d(l) {
395
+ l && E(e);
396
+ }
397
+ };
398
+ }
399
+ function Ae(n) {
400
+ let e, t, l, s;
401
+ function d(a, m) {
402
+ return (
403
+ /*currentChannelTimer*/
404
+ a[15] > 0 ? ht : mt
405
+ );
406
+ }
407
+ let u = d(n), r = u(n);
408
+ return {
409
+ c() {
410
+ e = v("button"), r.c(), i(e, "class", "OtpButton"), e.disabled = t = !/*canSubmitChannel*/
411
+ n[16], $(e, "disabled", !/*canSubmitChannel*/
412
+ n[16]);
413
+ },
414
+ m(a, m) {
415
+ S(a, e, m), r.m(e, null), l || (s = ee(
416
+ e,
417
+ "click",
418
+ /*handleChannelSubmit*/
419
+ n[20]
420
+ ), l = !0);
421
+ },
422
+ p(a, m) {
423
+ u === (u = d(a)) && r ? r.p(a, m) : (r.d(1), r = u(a), r && (r.c(), r.m(e, null))), m[0] & /*canSubmitChannel*/
424
+ 65536 && t !== (t = !/*canSubmitChannel*/
425
+ a[16]) && (e.disabled = t), m[0] & /*canSubmitChannel*/
426
+ 65536 && $(e, "disabled", !/*canSubmitChannel*/
427
+ a[16]);
428
+ },
429
+ d(a) {
430
+ a && E(e), r.d(), l = !1, s();
431
+ }
432
+ };
433
+ }
434
+ function mt(n) {
435
+ let e = (
436
+ /*$_*/
437
+ n[17]("sendCode") + ""
438
+ ), t;
439
+ return {
440
+ c() {
441
+ t = T(e);
442
+ },
443
+ m(l, s) {
444
+ S(l, t, s);
445
+ },
446
+ p(l, s) {
447
+ s[0] & /*$_*/
448
+ 131072 && e !== (e = /*$_*/
449
+ l[17]("sendCode") + "") && x(t, e);
450
+ },
451
+ d(l) {
452
+ l && E(t);
453
+ }
454
+ };
455
+ }
456
+ function ht(n) {
457
+ let e = (
458
+ /*$_*/
459
+ n[17]("waitSeconds") + ""
460
+ ), t, l, s, d;
461
+ return {
462
+ c() {
463
+ t = T(e), l = T(" ("), s = T(
464
+ /*currentChannelTimer*/
465
+ n[15]
466
+ ), d = T("s)");
467
+ },
468
+ m(u, r) {
469
+ S(u, t, r), S(u, l, r), S(u, s, r), S(u, d, r);
470
+ },
471
+ p(u, r) {
472
+ r[0] & /*$_*/
473
+ 131072 && e !== (e = /*$_*/
474
+ u[17]("waitSeconds") + "") && x(t, e), r[0] & /*currentChannelTimer*/
475
+ 32768 && x(
476
+ s,
477
+ /*currentChannelTimer*/
478
+ u[15]
479
+ );
480
+ },
481
+ d(u) {
482
+ u && (E(t), E(l), E(s), E(d));
483
+ }
484
+ };
485
+ }
486
+ function gt(n) {
487
+ let e, t, l = (
488
+ /*$_*/
489
+ n[17]("timeRemaining") + ""
490
+ ), s, d, u = (
491
+ /*formatTime*/
492
+ n[21](
493
+ /*timeLeft*/
494
+ n[5]
495
+ ) + ""
496
+ ), r, a, m = (
497
+ /*$_*/
498
+ n[17]("minutes") + ""
499
+ ), h, w, C, L = Se(
500
+ /*otp*/
501
+ n[2]
502
+ ), _ = [];
503
+ for (let f = 0; f < L.length; f += 1)
504
+ _[f] = xe(Te(n, L, f));
505
+ return {
506
+ c() {
507
+ e = v("div"), t = v("div"), s = T(l), d = A(), r = T(u), a = A(), h = T(m), w = A(), C = v("div");
508
+ for (let f = 0; f < _.length; f += 1)
509
+ _[f].c();
510
+ i(t, "class", "OtpTimer"), i(C, "class", "OtpField"), i(e, "class", "OtpFieldWrapper");
511
+ },
512
+ m(f, y) {
513
+ S(f, e, y), c(e, t), c(t, s), c(t, d), c(t, r), c(t, a), c(t, h), c(e, w), c(e, C);
514
+ for (let k = 0; k < _.length; k += 1)
515
+ _[k] && _[k].m(C, null);
516
+ },
517
+ p(f, y) {
518
+ if (y[0] & /*$_*/
519
+ 131072 && l !== (l = /*$_*/
520
+ f[17]("timeRemaining") + "") && x(s, l), y[0] & /*timeLeft*/
521
+ 32 && u !== (u = /*formatTime*/
522
+ f[21](
523
+ /*timeLeft*/
524
+ f[5]
525
+ ) + "") && x(r, u), y[0] & /*$_*/
526
+ 131072 && m !== (m = /*$_*/
527
+ f[17]("minutes") + "") && x(h, m), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
528
+ 29378580) {
529
+ L = Se(
530
+ /*otp*/
531
+ f[2]
532
+ );
533
+ let k;
534
+ for (k = 0; k < L.length; k += 1) {
535
+ const I = Te(f, L, k);
536
+ _[k] ? _[k].p(I, y) : (_[k] = xe(I), _[k].c(), _[k].m(C, null));
537
+ }
538
+ for (; k < _.length; k += 1)
539
+ _[k].d(1);
540
+ _.length = L.length;
541
+ }
542
+ },
543
+ d(f) {
544
+ f && E(e), $e(_, f);
545
+ }
546
+ };
547
+ }
548
+ function wt(n) {
549
+ let e;
550
+ return {
551
+ c() {
552
+ e = v("div"), e.innerHTML = '<span class="OtpLoader"></span>', i(e, "class", "OtpLoaderContainer");
553
+ },
554
+ m(t, l) {
555
+ S(t, e, l);
556
+ },
557
+ p: ve,
558
+ d(t) {
559
+ t && E(e);
560
+ }
561
+ };
562
+ }
563
+ function xe(n) {
564
+ let e, t, l, s = (
565
+ /*index*/
566
+ n[69]
567
+ ), d, u;
568
+ const r = () => (
569
+ /*input_binding*/
570
+ n[39](e, s)
571
+ ), a = () => (
572
+ /*input_binding*/
573
+ n[39](null, s)
574
+ );
575
+ function m(...w) {
576
+ return (
577
+ /*input_handler*/
578
+ n[40](
579
+ /*index*/
580
+ n[69],
581
+ ...w
582
+ )
583
+ );
584
+ }
585
+ function h(...w) {
586
+ return (
587
+ /*keydown_handler*/
588
+ n[41](
589
+ /*index*/
590
+ n[69],
591
+ ...w
592
+ )
593
+ );
594
+ }
595
+ return {
596
+ c() {
597
+ e = v("input"), i(e, "id", `otp-input-${/*index*/
598
+ n[69]}`), i(e, "type", "text"), i(e, "class", t = `otp-box ${/*config*/
599
+ n[4].inputLength % 2 === 0 && /*index*/
600
+ n[69] === /*config*/
601
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), i(e, "maxlength", 1), e.value = l = /*char*/
602
+ n[67], i(e, "inputmode", "numeric"), e.disabled = /*inputDisabled*/
603
+ n[11], i(e, "autocomplete", "off");
604
+ },
605
+ m(w, C) {
606
+ S(w, e, C), r(), d || (u = [
607
+ ee(e, "input", m),
608
+ ee(e, "keydown", h),
609
+ ee(
610
+ e,
611
+ "paste",
612
+ /*handleOnPasteOtp*/
613
+ n[22]
614
+ )
615
+ ], d = !0);
616
+ },
617
+ p(w, C) {
618
+ n = w, C[0] & /*config*/
619
+ 16 && t !== (t = `otp-box ${/*config*/
620
+ n[4].inputLength % 2 === 0 && /*index*/
621
+ n[69] === /*config*/
622
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && i(e, "class", t), C[0] & /*otp*/
623
+ 4 && l !== (l = /*char*/
624
+ n[67]) && e.value !== l && (e.value = l), C[0] & /*inputDisabled*/
625
+ 2048 && (e.disabled = /*inputDisabled*/
626
+ n[11]), s !== /*index*/
627
+ n[69] && (a(), s = /*index*/
628
+ n[69], r());
629
+ },
630
+ d(w) {
631
+ w && E(e), a(), d = !1, Re(u);
632
+ }
633
+ };
634
+ }
635
+ function bt(n) {
636
+ let e, t = (
637
+ /*$_*/
638
+ n[17]("submit") + ""
639
+ ), l, s, d, u;
640
+ return {
641
+ c() {
642
+ e = v("button"), l = T(t), i(e, "class", "OtpButton"), e.disabled = s = /*otp*/
643
+ n[2].join("").length !== /*config*/
644
+ n[4].inputLength || /*isSubmitting*/
645
+ n[13];
646
+ },
647
+ m(r, a) {
648
+ S(r, e, a), c(e, l), d || (u = ee(
649
+ e,
650
+ "click",
651
+ /*submitOtp*/
652
+ n[27]
653
+ ), d = !0);
654
+ },
655
+ p(r, a) {
656
+ a[0] & /*$_*/
657
+ 131072 && t !== (t = /*$_*/
658
+ r[17]("submit") + "") && x(l, t), a[0] & /*otp, config, isSubmitting*/
659
+ 8212 && s !== (s = /*otp*/
660
+ r[2].join("").length !== /*config*/
661
+ r[4].inputLength || /*isSubmitting*/
662
+ r[13]) && (e.disabled = s);
663
+ },
664
+ d(r) {
665
+ r && E(e), d = !1, u();
666
+ }
667
+ };
668
+ }
669
+ function _t(n) {
670
+ let e, t = (
671
+ /*$_*/
672
+ n[17]("resendOtp") + ""
673
+ ), l, s, d;
674
+ return {
675
+ c() {
676
+ e = v("button"), l = T(t), i(e, "class", "OtpButton");
677
+ },
678
+ m(u, r) {
679
+ S(u, e, r), c(e, l), s || (d = ee(
680
+ e,
681
+ "click",
682
+ /*handleResendOtp*/
683
+ n[25]
684
+ ), s = !0);
685
+ },
686
+ p(u, r) {
687
+ r[0] & /*$_*/
688
+ 131072 && t !== (t = /*$_*/
689
+ u[17]("resendOtp") + "") && x(l, t);
690
+ },
691
+ d(u) {
692
+ u && E(e), s = !1, d();
693
+ }
694
+ };
695
+ }
696
+ function yt(n) {
697
+ let e, t, l, s, d, u, r;
698
+ function a(w, C) {
699
+ return (
700
+ /*hasConfigErrors*/
701
+ w[7] ? at : rt
702
+ );
703
+ }
704
+ let m = a(n), h = m(n);
705
+ return {
706
+ c() {
707
+ e = v("div"), t = v("div"), l = X("svg"), s = X("path"), d = A(), h.c(), i(s, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), i(l, "xmlns", "http://www.w3.org/2000/svg"), i(l, "viewBox", "0 0 13 13"), i(l, "fill", "none"), i(l, "class", "CloseButton"), i(t, "class", "ModalCloseIcon"), i(e, "class", "OtpContent");
708
+ },
709
+ m(w, C) {
710
+ S(w, e, C), c(e, t), c(t, l), c(l, s), c(e, d), h.m(e, null), n[42](e), u || (r = ee(
711
+ l,
712
+ "click",
713
+ /*manualClosePopup*/
714
+ n[26]
715
+ ), u = !0);
716
+ },
717
+ p(w, C) {
718
+ m === (m = a(w)) && h ? h.p(w, C) : (h.d(1), h = m(w), h && (h.c(), h.m(e, null)));
719
+ },
720
+ i: ve,
721
+ o: ve,
722
+ d(w) {
723
+ w && E(e), h.d(), n[42](null), u = !1, r();
724
+ }
725
+ };
726
+ }
727
+ function vt(n, e, t) {
728
+ let l, s, d;
729
+ Je(n, ot, (o) => t(17, d = o));
730
+ let { clientstyling: u = "" } = e, { clientstylingurl: r = "" } = e, { mbsource: a } = e, { lang: m = "en" } = e, { endpoint: h } = e, { session: w } = e, { translationurl: C } = e, { templateid: L } = e, _ = [], f = !0, y = null, k = 0, I = "", N = "", W = !1, te = !1, R = "", ne = "", oe = "", V = !1, Y = !1, he = !1, M = "", D = {}, F = null, G = !1, z = !1, J = "", K, Z = [], U = null, ie = 0;
731
+ const ae = { SMS: "sms", EMAIL: "email" }, ce = {
732
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
733
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
734
+ MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
735
+ };
736
+ Object.keys(Le).forEach((o) => {
737
+ Me(o, Le[o]);
738
+ });
739
+ const pe = () => {
740
+ it(m);
741
+ }, ue = () => {
742
+ fetch(C).then((o) => o.json()).then((o) => {
743
+ Object.keys(o).forEach((g) => {
744
+ Me(g, o[g]);
745
+ });
746
+ }).catch((o) => {
747
+ console.log(o);
748
+ });
749
+ }, le = async (o) => {
750
+ if (o.detail?.["x-step-up-required"]) {
751
+ if (t(7, te = !1), t(6, W = !1), t(8, R = ""), ne = o.detail["x-step-up-token"], oe = o.detail.flow, !ne || !oe) {
752
+ t(3, f = !1), t(7, te = !0), t(8, R = d("configError"));
753
+ return;
754
+ }
755
+ t(12, G = !1), t(3, f = !1);
756
+ }
757
+ }, ge = () => {
758
+ U && (clearInterval(U), U = null), F && (clearInterval(F), F = null), t(6, W = !1), t(7, te = !1), t(8, R = ""), t(10, Y = !1), t(2, _ = []), t(4, y = null), t(3, f = !0), t(0, M = ""), t(12, G = !1), t(36, D = {});
759
+ }, we = () => {
760
+ ge();
761
+ }, be = () => new Promise((o, g) => {
762
+ const b = new URL(`${h}/api/pam/v1/mfa/challenge/${ne}`), H = new Headers();
763
+ H.append("accept", "application/json"), H.append("Content-Type", "application/json"), H.append("X-SessionId", `${w}`);
764
+ const ye = {
765
+ method: "PATCH",
766
+ headers: H,
767
+ body: JSON.stringify({
768
+ channel: M,
769
+ templateId: L
770
+ })
771
+ };
772
+ fetch(b, ye).then((Oe) => Oe.json()).then(() => {
773
+ fe(), Q(), o();
774
+ }).catch((Oe) => {
775
+ g();
776
+ });
777
+ }), de = () => {
778
+ F && clearInterval(F), F = setInterval(
779
+ () => {
780
+ const o = { ...D };
781
+ let g = !1;
782
+ Object.keys(o).forEach((b) => {
783
+ o[b] > 0 && (o[b]--, g = !0);
784
+ }), t(36, D = o), !g && F && (clearInterval(F), F = null);
785
+ },
786
+ 1e3
787
+ );
788
+ }, q = (o) => {
789
+ t(0, M = o);
790
+ }, B = async () => {
791
+ if (!(!M || D[M] && D[M] > 0)) {
792
+ t(3, f = !0), L && L.startsWith("2fa-") && t(28, L = `2fa-${M}`);
793
+ try {
794
+ await be(), await Ce(), t(36, D = {
795
+ ...D,
796
+ [M]: 30
797
+ }), de(), t(12, G = !0), fe(), Q();
798
+ } catch (o) {
799
+ console.error("Error submitting channel:", o), t(6, W = !0), t(8, R = d("submissionError"));
800
+ } finally {
801
+ t(3, f = !1);
802
+ }
803
+ }
804
+ }, fe = () => {
805
+ const o = new Date(I), g = new Date(N), b = /* @__PURE__ */ new Date(), H = g.getTime() - b.getTime();
806
+ ie = o.getTime() - H;
807
+ const _e = Date.now(), ye = Math.max(0, Math.floor((ie - _e) / 1e3));
808
+ t(5, k = ye);
809
+ }, Q = () => {
810
+ U && clearInterval(U), U = setInterval(
811
+ () => {
812
+ const o = Date.now(), g = Math.max(0, Math.floor((ie - o) / 1e3));
813
+ t(5, k = g), t(11, he = g <= 0), g <= 0 && (clearInterval(U), U = null, t(9, V = !0), t(6, W = !1), t(10, Y = !1));
814
+ },
815
+ 1e3
816
+ );
817
+ }, j = (o) => {
818
+ const g = Math.floor(o / 60), b = o % 60;
819
+ return `${g.toString().padStart(2, "0")}:${b.toString().padStart(2, "0")}`;
820
+ }, me = (o, g) => {
821
+ const b = [..._];
822
+ b[o] = g.toUpperCase(), t(2, _ = b), b.join("") !== J && t(13, z = !1);
823
+ }, se = (o) => {
824
+ o.preventDefault();
825
+ const b = (o.clipboardData?.getData("text")?.trim() || "").slice(0, y.inputLength).split("");
826
+ t(2, _ = [...b, ...Array(y.inputLength - b.length).fill("")]), Z[b.length]?.focus(), b.length === y.inputLength && ke();
827
+ }, P = (o, g) => {
828
+ const b = o.target, H = b.value;
829
+ /^[a-z0-9]$/i.test(H) && (me(g, H), Z[g + 1]?.focus()), b.value = "";
830
+ }, p = (o, g) => {
831
+ const b = o.key, H = o.ctrlKey || o.metaKey;
832
+ if (/^[a-z0-9]$/i.test(b)) {
833
+ if (H && b.toLowerCase() === "v")
834
+ return;
835
+ o.preventDefault(), me(g, b), Z[g + 1]?.focus();
836
+ } else
837
+ b === "Backspace" && (o.preventDefault(), _[g] !== "" && me(g, ""), Z[g - 1]?.focus());
838
+ }, O = () => {
839
+ oe == "stateful" && (be(), t(9, V = !1));
840
+ const o = new CustomEvent("otpResendRequested");
841
+ window.dispatchEvent(o);
842
+ }, ze = (o) => {
843
+ window.dispatchEvent(new CustomEvent(
844
+ "otpSubmitted",
845
+ {
846
+ detail: {
847
+ code: o,
848
+ maxAttempts: y.maxValidationAttempts,
849
+ validatedAttempts: y.numberOfValidateAttempts
850
+ }
851
+ }
852
+ ));
853
+ }, Pe = async (o) => {
854
+ const g = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/validate`, h);
855
+ g.searchParams.append("input", o);
856
+ try {
857
+ const b = await fetch(g.href, { method: "POST" });
858
+ if (b.status === 200) {
859
+ De();
860
+ return;
861
+ }
862
+ const H = await b.json();
863
+ throw new Error(H.message);
864
+ } catch (b) {
865
+ if (b.message === ce.INTERNAL_SERVER_ERROR) {
866
+ if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
867
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
868
+ {
869
+ type: "WidgetNotification",
870
+ data: {
871
+ type: "error",
872
+ message: d("accountBlocked")
873
+ }
874
+ },
875
+ window.location.href
876
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
877
+ return;
878
+ }
879
+ t(6, W = !0), t(8, R = d("invalidOtp")), Ce();
880
+ return;
881
+ }
882
+ b.message === ce.MAX_INVALIDATE && (t(6, W = !0), t(8, R = d("invalidOtp"))), console.error("OTP submission failed:", b), t(6, W = !0), t(8, R = d("submissionError"));
883
+ } finally {
884
+ t(3, f = !1);
885
+ }
886
+ }, De = () => {
887
+ window.dispatchEvent(new CustomEvent(
888
+ "otpSuccess",
889
+ {
890
+ detail: {
891
+ message: "User successfully authenticated"
892
+ }
893
+ }
894
+ ));
895
+ }, Be = () => {
896
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
897
+ }, ke = async () => {
898
+ if (_.join("").length !== y.inputLength) {
899
+ t(6, W = !0), t(8, R = d("invalidOtp"));
900
+ return;
901
+ }
902
+ const o = _.join("");
903
+ t(13, z = !0), J = o, t(3, f = !0), t(6, W = !1), t(8, R = ""), oe === "stateless" && ze(o), oe === "stateful" && await Pe(o);
904
+ }, Ce = async () => {
905
+ if (h)
906
+ try {
907
+ t(3, f = !0);
908
+ const o = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/config`, h), g = await fetch(o.href), b = await g.json();
909
+ if (g.ok)
910
+ t(4, y = b), t(2, _ = Array(y.inputLength).fill("")), t(9, V = !1), I = y.expirationTime, N = y.serverTime, y.numberOfValidateAttempts !== 0 && (t(6, W = !0), t(8, R = d("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && t(10, Y = !0), t(3, f = !1), fe(), Q();
911
+ else if (b && b.details === ce.MAX_ATTEMPTS_EXCEEDED)
912
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
913
+ else {
914
+ const H = b && b.message || `Failed to load config. Status: ${g.status}`;
915
+ throw new Error(H);
916
+ }
917
+ } catch (o) {
918
+ t(3, f = !1), t(7, te = !0), t(8, R = d("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", o);
919
+ }
920
+ };
921
+ Ze(() => (window.addEventListener("stepUpAuthRequired", le, !1), window.addEventListener("closePopup", we, !1), () => {
922
+ window.removeEventListener("stepUpAuthRequired", le), window.removeEventListener("closePopup", we, !1), U && clearInterval(U), F && clearInterval(F);
923
+ }));
924
+ const je = () => q(ae.SMS), He = () => q(ae.EMAIL);
925
+ function Ne(o, g) {
926
+ Ee[o ? "unshift" : "push"](() => {
927
+ Z[g] = o, t(14, Z);
928
+ });
929
+ }
930
+ const Ve = (o, g) => P(g, o), We = (o, g) => p(g, o);
931
+ function Fe(o) {
932
+ Ee[o ? "unshift" : "push"](() => {
933
+ K = o, t(1, K);
934
+ });
935
+ }
936
+ return n.$$set = (o) => {
937
+ "clientstyling" in o && t(29, u = o.clientstyling), "clientstylingurl" in o && t(30, r = o.clientstylingurl), "mbsource" in o && t(31, a = o.mbsource), "lang" in o && t(32, m = o.lang), "endpoint" in o && t(33, h = o.endpoint), "session" in o && t(34, w = o.session), "translationurl" in o && t(35, C = o.translationurl), "templateid" in o && t(28, L = o.templateid);
938
+ }, n.$$.update = () => {
939
+ n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
940
+ 536870914 && u && K && et(K, u), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
941
+ 1073741826 && r && K && tt(K, r), n.$$.dirty[0] & /*customStylingContainer*/
942
+ 2 | n.$$.dirty[1] & /*mbsource*/
943
+ 1 && a && K && nt(K, `${a}.Style`), n.$$.dirty[1] & /*lang*/
944
+ 2 && m && pe(), n.$$.dirty[1] & /*lang, translationurl*/
945
+ 18 && m && C && ue(), n.$$.dirty[0] & /*selectedChannel*/
946
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
947
+ 32 && t(16, l = M && (!D[M] || D[M] === 0)), n.$$.dirty[0] & /*selectedChannel*/
948
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
949
+ 32 && t(15, s = M && D[M] || 0);
950
+ }, [
951
+ M,
952
+ K,
953
+ _,
954
+ f,
955
+ y,
956
+ k,
957
+ W,
958
+ te,
959
+ R,
960
+ V,
961
+ Y,
962
+ he,
963
+ G,
964
+ z,
965
+ Z,
966
+ s,
967
+ l,
968
+ d,
969
+ ae,
970
+ q,
971
+ B,
972
+ j,
973
+ se,
974
+ P,
975
+ p,
976
+ O,
977
+ Be,
978
+ ke,
979
+ L,
980
+ u,
981
+ r,
982
+ a,
983
+ m,
984
+ h,
985
+ w,
986
+ C,
987
+ D,
988
+ je,
989
+ He,
990
+ Ne,
991
+ Ve,
992
+ We,
993
+ Fe
994
+ ];
995
+ }
996
+ class kt extends Ke {
997
+ constructor(e) {
998
+ super(), Xe(
999
+ this,
1000
+ e,
1001
+ vt,
1002
+ yt,
1003
+ Ge,
1004
+ {
1005
+ clientstyling: 29,
1006
+ clientstylingurl: 30,
1007
+ mbsource: 31,
1008
+ lang: 32,
1009
+ endpoint: 33,
1010
+ session: 34,
1011
+ translationurl: 35,
1012
+ templateid: 28
1013
+ },
1014
+ st,
1015
+ [-1, -1, -1]
1016
+ );
1017
+ }
1018
+ get clientstyling() {
1019
+ return this.$$.ctx[29];
1020
+ }
1021
+ set clientstyling(e) {
1022
+ this.$$set({ clientstyling: e }), re();
1023
+ }
1024
+ get clientstylingurl() {
1025
+ return this.$$.ctx[30];
1026
+ }
1027
+ set clientstylingurl(e) {
1028
+ this.$$set({ clientstylingurl: e }), re();
1029
+ }
1030
+ get mbsource() {
1031
+ return this.$$.ctx[31];
1032
+ }
1033
+ set mbsource(e) {
1034
+ this.$$set({ mbsource: e }), re();
1035
+ }
1036
+ get lang() {
1037
+ return this.$$.ctx[32];
1038
+ }
1039
+ set lang(e) {
1040
+ this.$$set({ lang: e }), re();
1041
+ }
1042
+ get endpoint() {
1043
+ return this.$$.ctx[33];
1044
+ }
1045
+ set endpoint(e) {
1046
+ this.$$set({ endpoint: e }), re();
1047
+ }
1048
+ get session() {
1049
+ return this.$$.ctx[34];
1050
+ }
1051
+ set session(e) {
1052
+ this.$$set({ session: e }), re();
1053
+ }
1054
+ get translationurl() {
1055
+ return this.$$.ctx[35];
1056
+ }
1057
+ set translationurl(e) {
1058
+ this.$$set({ translationurl: e }), re();
1059
+ }
1060
+ get templateid() {
1061
+ return this.$$.ctx[28];
1062
+ }
1063
+ set templateid(e) {
1064
+ this.$$set({ templateid: e }), re();
1065
+ }
1066
+ }
1067
+ lt(kt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1068
+ export {
1069
+ kt as default
1070
+ };