@everymatrix/cashier-page 1.69.94 → 1.69.123

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 (97) hide show
  1. package/components/CashierCarousel-Bmkxhtnm.cjs +23 -0
  2. package/components/{CashierCarousel-BdYVF6QV.js → CashierCarousel-D_wSKCMs.js} +1400 -1318
  3. package/components/{CashierCarousel-P8JOEAdW.js → CashierCarousel-U2ysEkZo.js} +1425 -1343
  4. package/components/{CashierError-BHR0wCX8.cjs → CashierError-Cwm9eY8c.cjs} +1 -1
  5. package/components/{CashierError-CV3sSdTA.js → CashierError-D2jZsClG.js} +2 -2
  6. package/components/{CashierError-Dc97Q3ia.js → CashierError-ZLpQCZ7N.js} +2 -2
  7. package/components/{CashierHeader-CNnGcxHX.js → CashierHeader-BCCA_87T.js} +4 -4
  8. package/components/CashierHeader-D40gryOj.cjs +1 -0
  9. package/components/{CashierHeader-BvRwyGj-.js → CashierHeader-DyFARvnF.js} +4 -4
  10. package/components/CashierIframeRedirect-BKExS9o2.cjs +1 -0
  11. package/components/{CashierIframeRedirect-CyxYgQXl.js → CashierIframeRedirect-BMGvaxHv.js} +29 -29
  12. package/components/{CashierIframeRedirect-Tyfog0B-.js → CashierIframeRedirect-Hz0t-XHA.js} +29 -29
  13. package/components/CashierMethodDetails-D0wpum5b.js +9564 -0
  14. package/components/CashierMethodDetails-FeiyXoHw.js +9523 -0
  15. package/components/CashierMethodDetails-ziUU0Tui.cjs +85 -0
  16. package/components/CashierMethodsList-CI_1-_NW.js +737 -0
  17. package/components/CashierMethodsList-PbOH7p79.cjs +1 -0
  18. package/components/CashierMethodsList-WQndorD0.js +725 -0
  19. package/components/CashierModal-Bm1ZHiKF.js +337 -0
  20. package/components/CashierModal-CZXS870r.cjs +1 -0
  21. package/components/CashierModal-DA9pYzjv.js +353 -0
  22. package/components/{CashierNotifications-B1_IvWSx.cjs → CashierNotifications-AE1W98Am.cjs} +1 -1
  23. package/components/{CashierNotifications-C7E0y8oy.js → CashierNotifications-BKEjPFOe.js} +1 -1
  24. package/components/{CashierNotifications-CV5fK-_h.js → CashierNotifications-BhTVfc_q.js} +1 -1
  25. package/components/CashierPage-B2478cGI.cjs +1 -0
  26. package/components/CashierPage-Bu-Q7zGW.js +3202 -0
  27. package/components/CashierPage-DRqoyxvy.js +3202 -0
  28. package/components/{CashierReceiptPage-CtOCAaLC.js → CashierReceiptPage-BCdXtAQy.js} +847 -767
  29. package/components/CashierReceiptPage-BTnWWxrf.cjs +26 -0
  30. package/components/{CashierReceiptPage-C6wwbN8P.js → CashierReceiptPage-mprh7bxR.js} +871 -767
  31. package/components/CashierSessionExpirationModal-CO21pLuC.cjs +2 -0
  32. package/components/{CashierSessionExpirationModal-DZ6cbZMo.js → CashierSessionExpirationModal-Cf9kV9t-.js} +36 -36
  33. package/components/{CashierSessionExpirationModal-CH7OH5eP.js → CashierSessionExpirationModal-DmelwHmk.js} +64 -64
  34. package/components/{CashierSpinner-CyPuIakf.js → CashierSpinner-BafoqXXx.js} +1 -1
  35. package/components/{CashierSpinner-DN8Xti3l.js → CashierSpinner-BoT5LgPd.js} +1 -1
  36. package/components/{CashierSpinner-CL3BxNa3.cjs → CashierSpinner-d2hvjlSo.cjs} +1 -1
  37. package/components/CashierStepUp-DAwEA9m8.js +1118 -0
  38. package/components/CashierStepUp-DHD1RjqN.js +1079 -0
  39. package/components/CashierStepUp-DPLCXGpo.cjs +1 -0
  40. package/components/{CashierTransactionHistory-DUJ7uEPo.js → CashierTransactionHistory-BKgkxlMX.js} +28 -28
  41. package/components/{CashierTransactionHistory-D7x8iV5o.js → CashierTransactionHistory-C8ds2Zwi.js} +28 -28
  42. package/components/CashierTransactionHistory-CBn28kTC.cjs +1 -0
  43. package/components/{CashierVerifications-dsnZ9UGl.js → CashierVerifications-B5x1jg3q.js} +124 -124
  44. package/components/CashierVerifications-Hi5EfxuQ.cjs +1 -0
  45. package/components/{CashierVerifications-D98F06Sz.js → CashierVerifications-fksQOX8S.js} +94 -94
  46. package/components/{TxnStatusIcon-DKrjQDkn.cjs → TxnStatusIcon-Bs5XHdDd.cjs} +1 -1
  47. package/components/{TxnStatusIcon-Bjzryymo.js → TxnStatusIcon-Ck-w1f1a.js} +1 -1
  48. package/components/{TxnStatusIcon-BnNOvKNP.js → TxnStatusIcon-ZhJG6FAv.js} +1 -1
  49. package/components/{TxnTypeIcons-CdJDWKBc.js → TxnTypeIcons-BJMvuKXL.js} +1 -1
  50. package/components/{TxnTypeIcons-DUFNEYZT.cjs → TxnTypeIcons-CPhGhukx.cjs} +1 -1
  51. package/components/{TxnTypeIcons-CgvUMv-Q.js → TxnTypeIcons-OgWLkxli.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/stencil/{index-97d17652--F7PvMq9.js → index-97d17652-B6BYeRne.js} +1 -1
  57. package/stencil/{index-97d17652-CCFHkzJw.js → index-97d17652-BOr4KAqq.js} +1 -1
  58. package/stencil/{index-97d17652-BhLhk_xz.cjs → index-97d17652-zTl06Vn9.cjs} +1 -1
  59. package/stencil/{index-b2193545-B8kMF2bI.cjs → index-b2193545-B5Q7rnAU.cjs} +1 -1
  60. package/stencil/{index-b2193545-BoSqyMpB.js → index-b2193545-CF_fVoFe.js} +1 -1
  61. package/stencil/{index-b2193545-D4dOaNlR.js → index-b2193545-DfttkCgg.js} +1 -1
  62. package/stencil/{ui-image-DIEeZy5u.js → ui-image-BsYHwNhO.js} +1 -1
  63. package/stencil/{ui-image-BWJXFWH1.js → ui-image-CNaRr0ax.js} +1 -1
  64. package/stencil/{ui-image-ByEXiBzx.cjs → ui-image-IJc7Zz_R.cjs} +1 -1
  65. package/stencil/{ui-image-b7b48fe5-ByRuJtdE.js → ui-image-b7b48fe5-BKRtoUuG.js} +1 -1
  66. package/stencil/{ui-image-b7b48fe5-D6iig_uN.js → ui-image-b7b48fe5-HA45CrsG.js} +1 -1
  67. package/stencil/{ui-image-b7b48fe5-DG83WzAo.cjs → ui-image-b7b48fe5-MC0x5ZQd.cjs} +1 -1
  68. package/stencil/{ui-image_2-qO3reSlr.js → ui-image_2-CmVho0dS.js} +13 -13
  69. package/stencil/ui-image_2-CyqE6j_W.cjs +55 -0
  70. package/stencil/{ui-skeleton-ae35c6f2-8tYGV8SR.js → ui-image_2-Daq38JGa.js} +14 -12
  71. package/stencil/{ui-skeleton-9boHSjtG.js → ui-skeleton-B9YTz-WD.js} +2 -2
  72. package/stencil/{ui-skeleton-4-zrLsIW.js → ui-skeleton-CQ-FgYMx.js} +2 -2
  73. package/stencil/{ui-skeleton-_yJvAdAL.cjs → ui-skeleton-UxIIZ8UD.cjs} +1 -1
  74. package/stencil/ui-skeleton-ed169f8f-BEwquWmd.cjs +55 -0
  75. package/stencil/{ui-image_2-Bm97-wkj.js → ui-skeleton-ed169f8f-BMrkXoR5.js} +12 -14
  76. package/stencil/{ui-skeleton-ae35c6f2-IN_dPA5_.js → ui-skeleton-ed169f8f-BNn31z1X.js} +12 -12
  77. package/components/CashierCarousel-HRUJt7XK.cjs +0 -23
  78. package/components/CashierHeader-Dq5rXKEy.cjs +0 -1
  79. package/components/CashierIframeRedirect-C7g6aYiD.cjs +0 -1
  80. package/components/CashierMethodDetails-BQQkicL5.js +0 -8999
  81. package/components/CashierMethodDetails-Cw3bppxA.js +0 -8978
  82. package/components/CashierMethodDetails-vl9WpFW-.cjs +0 -85
  83. package/components/CashierMethodsList-Bi29u-3T.js +0 -733
  84. package/components/CashierMethodsList-Dnurtmpq.js +0 -745
  85. package/components/CashierMethodsList-MWY8DbQT.cjs +0 -1
  86. package/components/CashierModal-7LneBvzD.cjs +0 -1
  87. package/components/CashierModal-ChoubLYy.js +0 -268
  88. package/components/CashierModal-DCTbhFou.js +0 -268
  89. package/components/CashierPage-CPBTVmCF.js +0 -2724
  90. package/components/CashierPage-DOxt1V6T.cjs +0 -1
  91. package/components/CashierPage-TX2t-xAH.js +0 -2724
  92. package/components/CashierReceiptPage-BdQL3__D.cjs +0 -26
  93. package/components/CashierSessionExpirationModal-wp_kWVca.cjs +0 -2
  94. package/components/CashierTransactionHistory-DbJgP2OJ.cjs +0 -1
  95. package/components/CashierVerifications-BzbSPCl7.cjs +0 -1
  96. package/stencil/ui-image_2-DdFjzzNO.cjs +0 -55
  97. package/stencil/ui-skeleton-ae35c6f2-CKgUXOQC.cjs +0 -55
@@ -0,0 +1,1079 @@
1
+ import { a as Ue, $ as qe, S as Ke, b as Ge, s as Xe, f as Z, c as Ye, G as re, e as S, k as M, m as E, o as r, p as Je, q as Qe, y as me, v as z, l as d, x as Q, Q as X, n as P, w as A, W as Ce, V as Y, r as Ee, R as he, Z as Ze, B as $e, C as et, D as tt, E as nt, F as lt } from "./CashierCarousel-D_wSKCMs.js";
2
+ function ge(n, e) {
3
+ Ue(n, e);
4
+ }
5
+ function ot(n) {
6
+ qe.set(n);
7
+ }
8
+ const be = {
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",
51
+ channelEmail: "Email",
52
+ sendCode: "Kodu gönder",
53
+ waitSeconds: "Tekrar göndermeden önce lütfen bekleyin:"
54
+ }
55
+ };
56
+ function it(n) {
57
+ Ye(n, "svelte-puc9uq", '*,*::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}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.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)}.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)}.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}.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:var(--emw--spacing-small, 12px);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}.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)}.ChannelCheckbox:hover:not(.selected){background:var(--emw--color-background-hover, rgba(255, 255, 255, 0.15));border-color:var(--emw--color-primary, #f9c408)}.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 we(n, e, t) {
60
+ const l = n.slice();
61
+ return l[65] = e[t], l[66] = e, l[67] = t, l;
62
+ }
63
+ function rt(n) {
64
+ let e, t, l = (
65
+ /*$_*/
66
+ n[16]("otpTitle") + ""
67
+ ), i, s, u, a, p, c;
68
+ function v(f, L) {
69
+ return (
70
+ /*showResendOtp*/
71
+ f[9] ? ut : (
72
+ /*showOtpInput*/
73
+ f[12] ? at : ct
74
+ )
75
+ );
76
+ }
77
+ let C = v(n), w = C(n), g = !/*showOtpInput*/
78
+ n[12] && ye(n);
79
+ function _(f, L) {
80
+ if (
81
+ /*isLoading*/
82
+ f[3] && /*showOtpInput*/
83
+ f[12]
84
+ )
85
+ return gt;
86
+ if (
87
+ /*showOtpInput*/
88
+ f[12] && /*config*/
89
+ f[4]
90
+ )
91
+ return ht;
92
+ }
93
+ let h = _(n), m = h && h(n);
94
+ function O(f, L) {
95
+ if (
96
+ /*showResendOtp*/
97
+ f[9]
98
+ )
99
+ return wt;
100
+ if (
101
+ /*showOtpInput*/
102
+ f[12] && /*config*/
103
+ f[4]
104
+ )
105
+ return bt;
106
+ }
107
+ let I = O(n), k = I && I(n);
108
+ return {
109
+ c() {
110
+ e = E("div"), t = E("div"), i = A(l), s = P(), w.c(), u = P(), g && g.c(), a = P(), m && m.c(), p = P(), c = E("div"), k && k.c(), r(t, "class", "Title"), r(e, "class", "OtpDescription"), r(c, "class", "OtpActionButtons");
111
+ },
112
+ m(f, L) {
113
+ M(f, e, L), d(e, t), d(t, i), d(e, s), w.m(e, null), M(f, u, L), g && g.m(f, L), M(f, a, L), m && m.m(f, L), M(f, p, L), M(f, c, L), k && k.m(c, null);
114
+ },
115
+ p(f, L) {
116
+ L[0] & /*$_*/
117
+ 65536 && l !== (l = /*$_*/
118
+ f[16]("otpTitle") + "") && z(i, l), C === (C = v(f)) && w ? w.p(f, L) : (w.d(1), w = C(f), w && (w.c(), w.m(e, null))), /*showOtpInput*/
119
+ f[12] ? g && (g.d(1), g = null) : g ? g.p(f, L) : (g = ye(f), g.c(), g.m(a.parentNode, a)), h === (h = _(f)) && m ? m.p(f, L) : (m && m.d(1), m = h && h(f), m && (m.c(), m.m(p.parentNode, p))), I === (I = O(f)) && k ? k.p(f, L) : (k && k.d(1), k = I && I(f), k && (k.c(), k.m(c, null)));
120
+ },
121
+ d(f) {
122
+ f && (S(e), S(u), S(a), S(p), S(c)), w.d(), g && g.d(f), m && m.d(f), k && k.d();
123
+ }
124
+ };
125
+ }
126
+ function st(n) {
127
+ let e, t, l, i, s, u, a = (
128
+ /*$_*/
129
+ n[16]("errorHeader") + ""
130
+ ), p, c, v, C, w, g, _ = (
131
+ /*$_*/
132
+ n[16]("close") + ""
133
+ ), h, m, O;
134
+ return {
135
+ c() {
136
+ e = E("div"), t = E("div"), l = X("svg"), i = X("path"), s = P(), u = E("h2"), p = A(a), c = P(), v = E("p"), C = A(
137
+ /*errorMessage*/
138
+ n[8]
139
+ ), w = P(), g = E("button"), h = A(_), r(i, "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(g, "class", "OtpButton error"), r(e, "class", "OtpError");
140
+ },
141
+ m(I, k) {
142
+ M(I, e, k), d(e, t), d(t, l), d(l, i), d(t, s), d(t, u), d(u, p), d(e, c), d(e, v), d(v, C), d(e, w), d(e, g), d(g, h), m || (O = Q(
143
+ g,
144
+ "click",
145
+ /*manualClosePopup*/
146
+ n[25]
147
+ ), m = !0);
148
+ },
149
+ p(I, k) {
150
+ k[0] & /*$_*/
151
+ 65536 && a !== (a = /*$_*/
152
+ I[16]("errorHeader") + "") && z(p, a), k[0] & /*errorMessage*/
153
+ 256 && z(
154
+ C,
155
+ /*errorMessage*/
156
+ I[8]
157
+ ), k[0] & /*$_*/
158
+ 65536 && _ !== (_ = /*$_*/
159
+ I[16]("close") + "") && z(h, _);
160
+ },
161
+ d(I) {
162
+ I && S(e), m = !1, O();
163
+ }
164
+ };
165
+ }
166
+ function at(n) {
167
+ let e, t, l, i;
168
+ function s(c, v) {
169
+ return (
170
+ /*isLastWarning*/
171
+ c[10] ? dt : pt
172
+ );
173
+ }
174
+ let u = s(n), a = u(n), p = (
175
+ /*hasErrors*/
176
+ n[6] && _e(n)
177
+ );
178
+ return {
179
+ c() {
180
+ e = E("p"), a.c(), l = P(), p && p.c(), i = Ee(), r(e, "class", t = /*isLastWarning*/
181
+ n[10] ? "LastWarningMessage" : "");
182
+ },
183
+ m(c, v) {
184
+ M(c, e, v), a.m(e, null), M(c, l, v), p && p.m(c, v), M(c, i, v);
185
+ },
186
+ p(c, v) {
187
+ u === (u = s(c)) && a ? a.p(c, v) : (a.d(1), a = u(c), a && (a.c(), a.m(e, null))), v[0] & /*isLastWarning*/
188
+ 1024 && t !== (t = /*isLastWarning*/
189
+ c[10] ? "LastWarningMessage" : "") && r(e, "class", t), /*hasErrors*/
190
+ c[6] ? p ? p.p(c, v) : (p = _e(c), p.c(), p.m(i.parentNode, i)) : p && (p.d(1), p = null);
191
+ },
192
+ d(c) {
193
+ c && (S(e), S(l), S(i)), a.d(), p && p.d(c);
194
+ }
195
+ };
196
+ }
197
+ function ct(n) {
198
+ let e, t = (
199
+ /*$_*/
200
+ (n[16]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
201
+ ), l;
202
+ return {
203
+ c() {
204
+ e = E("p"), l = A(t);
205
+ },
206
+ m(i, s) {
207
+ M(i, e, s), d(e, l);
208
+ },
209
+ p(i, s) {
210
+ s[0] & /*$_*/
211
+ 65536 && t !== (t = /*$_*/
212
+ (i[16]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && z(l, t);
213
+ },
214
+ d(i) {
215
+ i && S(e);
216
+ }
217
+ };
218
+ }
219
+ function ut(n) {
220
+ let e, t = (
221
+ /*$_*/
222
+ n[16]("otpExpiredMessage") + ""
223
+ ), l;
224
+ return {
225
+ c() {
226
+ e = E("p"), l = A(t), r(e, "class", "OtpNoticeMessage"), r(e, "role", "alert");
227
+ },
228
+ m(i, s) {
229
+ M(i, e, s), d(e, l);
230
+ },
231
+ p(i, s) {
232
+ s[0] & /*$_*/
233
+ 65536 && t !== (t = /*$_*/
234
+ i[16]("otpExpiredMessage") + "") && z(l, t);
235
+ },
236
+ d(i) {
237
+ i && S(e);
238
+ }
239
+ };
240
+ }
241
+ function pt(n) {
242
+ let e = (
243
+ /*$_*/
244
+ n[16]("popupMessage") + ""
245
+ ), t;
246
+ return {
247
+ c() {
248
+ t = A(e);
249
+ },
250
+ m(l, i) {
251
+ M(l, t, i);
252
+ },
253
+ p(l, i) {
254
+ i[0] & /*$_*/
255
+ 65536 && e !== (e = /*$_*/
256
+ l[16]("popupMessage") + "") && z(t, e);
257
+ },
258
+ d(l) {
259
+ l && S(t);
260
+ }
261
+ };
262
+ }
263
+ function dt(n) {
264
+ let e = (
265
+ /*$_*/
266
+ n[16]("popupMessageLastWarning") + ""
267
+ ), t;
268
+ return {
269
+ c() {
270
+ t = A(e);
271
+ },
272
+ m(l, i) {
273
+ M(l, t, i);
274
+ },
275
+ p(l, i) {
276
+ i[0] & /*$_*/
277
+ 65536 && e !== (e = /*$_*/
278
+ l[16]("popupMessageLastWarning") + "") && z(t, e);
279
+ },
280
+ d(l) {
281
+ l && S(t);
282
+ }
283
+ };
284
+ }
285
+ function _e(n) {
286
+ let e, t;
287
+ return {
288
+ c() {
289
+ e = E("p"), t = A(
290
+ /*errorMessage*/
291
+ n[8]
292
+ ), r(e, "class", "OtpErrorMessage"), r(e, "role", "alert");
293
+ },
294
+ m(l, i) {
295
+ M(l, e, i), d(e, t);
296
+ },
297
+ p(l, i) {
298
+ i[0] & /*errorMessage*/
299
+ 256 && z(
300
+ t,
301
+ /*errorMessage*/
302
+ l[8]
303
+ );
304
+ },
305
+ d(l) {
306
+ l && S(e);
307
+ }
308
+ };
309
+ }
310
+ function ye(n) {
311
+ let e, t, l, i, s, u, a, p, c, v, C, w, g, _, h, m = (
312
+ /*$_*/
313
+ n[16]("channelSMS") + ""
314
+ ), O, I, k, f, L, R, q, $, K, x, G, D, V, N, J = (
315
+ /*$_*/
316
+ n[16]("channelEmail") + ""
317
+ ), F, U, B, ee, te, j = (
318
+ /*selectedChannel*/
319
+ n[0] && ke(n)
320
+ );
321
+ return {
322
+ c() {
323
+ e = E("div"), t = E("label"), l = E("div"), i = P(), s = E("input"), a = P(), p = E("div"), c = X("svg"), v = X("path"), C = X("circle"), w = X("circle"), g = X("circle"), _ = P(), h = E("span"), O = A(m), I = P(), k = E("label"), f = E("div"), L = P(), R = E("input"), $ = P(), K = E("div"), x = X("svg"), G = X("rect"), D = X("path"), V = P(), N = E("span"), F = A(J), U = P(), j && j.c(), B = Ee(), r(l, "class", "RadioIndicator"), Y(
324
+ l,
325
+ "checked",
326
+ /*selectedChannel*/
327
+ n[0] === /*channels*/
328
+ n[17].SMS
329
+ ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
330
+ n[17].SMS, s.checked = u = /*selectedChannel*/
331
+ n[0] === /*channels*/
332
+ n[17].SMS, r(v, "d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"), r(C, "cx", "9"), r(C, "cy", "11"), r(C, "r", "0.5"), r(C, "fill", "currentColor"), r(w, "cx", "12"), r(w, "cy", "11"), r(w, "r", "0.5"), r(w, "fill", "currentColor"), r(g, "cx", "15"), r(g, "cy", "11"), r(g, "r", "0.5"), r(g, "fill", "currentColor"), r(c, "xmlns", "http://www.w3.org/2000/svg"), r(c, "width", "24"), r(c, "height", "24"), r(c, "viewBox", "0 0 24 24"), r(c, "fill", "none"), r(c, "stroke", "currentColor"), r(c, "stroke-width", "2"), r(c, "stroke-linecap", "round"), r(c, "stroke-linejoin", "round"), r(p, "class", "ChannelContent"), r(t, "class", "ChannelCheckbox"), Y(
333
+ t,
334
+ "selected",
335
+ /*selectedChannel*/
336
+ n[0] === /*channels*/
337
+ n[17].SMS
338
+ ), r(f, "class", "RadioIndicator"), Y(
339
+ f,
340
+ "checked",
341
+ /*selectedChannel*/
342
+ n[0] === /*channels*/
343
+ n[17].EMAIL
344
+ ), r(R, "type", "radio"), r(R, "name", "channel"), R.value = /*channels*/
345
+ n[17].EMAIL, R.checked = q = /*selectedChannel*/
346
+ n[0] === /*channels*/
347
+ n[17].EMAIL, r(G, "x", "2"), r(G, "y", "4"), r(G, "width", "20"), r(G, "height", "16"), r(G, "rx", "2"), r(D, "d", "m2 7 10 6 10-6"), r(x, "xmlns", "http://www.w3.org/2000/svg"), r(x, "width", "24"), r(x, "height", "24"), r(x, "viewBox", "0 0 24 24"), r(x, "fill", "none"), r(x, "stroke", "currentColor"), r(x, "stroke-width", "2"), r(x, "stroke-linecap", "round"), r(x, "stroke-linejoin", "round"), r(K, "class", "ChannelContent"), r(k, "class", "ChannelCheckbox"), Y(
348
+ k,
349
+ "selected",
350
+ /*selectedChannel*/
351
+ n[0] === /*channels*/
352
+ n[17].EMAIL
353
+ ), r(e, "class", "ChannelSelection");
354
+ },
355
+ m(T, H) {
356
+ M(T, e, H), d(e, t), d(t, l), d(t, i), d(t, s), d(t, a), d(t, p), d(p, c), d(c, v), d(c, C), d(c, w), d(c, g), d(p, _), d(p, h), d(h, O), d(e, I), d(e, k), d(k, f), d(k, L), d(k, R), d(k, $), d(k, K), d(K, x), d(x, G), d(x, D), d(K, V), d(K, N), d(N, F), M(T, U, H), j && j.m(T, H), M(T, B, H), ee || (te = [
357
+ Q(
358
+ s,
359
+ "change",
360
+ /*change_handler*/
361
+ n[36]
362
+ ),
363
+ Q(
364
+ R,
365
+ "change",
366
+ /*change_handler_1*/
367
+ n[37]
368
+ )
369
+ ], ee = !0);
370
+ },
371
+ p(T, H) {
372
+ H[0] & /*selectedChannel, channels*/
373
+ 131073 && Y(
374
+ l,
375
+ "checked",
376
+ /*selectedChannel*/
377
+ T[0] === /*channels*/
378
+ T[17].SMS
379
+ ), H[0] & /*selectedChannel*/
380
+ 1 && u !== (u = /*selectedChannel*/
381
+ T[0] === /*channels*/
382
+ T[17].SMS) && (s.checked = u), H[0] & /*$_*/
383
+ 65536 && m !== (m = /*$_*/
384
+ T[16]("channelSMS") + "") && z(O, m), H[0] & /*selectedChannel, channels*/
385
+ 131073 && Y(
386
+ t,
387
+ "selected",
388
+ /*selectedChannel*/
389
+ T[0] === /*channels*/
390
+ T[17].SMS
391
+ ), H[0] & /*selectedChannel, channels*/
392
+ 131073 && Y(
393
+ f,
394
+ "checked",
395
+ /*selectedChannel*/
396
+ T[0] === /*channels*/
397
+ T[17].EMAIL
398
+ ), H[0] & /*selectedChannel*/
399
+ 1 && q !== (q = /*selectedChannel*/
400
+ T[0] === /*channels*/
401
+ T[17].EMAIL) && (R.checked = q), H[0] & /*$_*/
402
+ 65536 && J !== (J = /*$_*/
403
+ T[16]("channelEmail") + "") && z(F, J), H[0] & /*selectedChannel, channels*/
404
+ 131073 && Y(
405
+ k,
406
+ "selected",
407
+ /*selectedChannel*/
408
+ T[0] === /*channels*/
409
+ T[17].EMAIL
410
+ ), /*selectedChannel*/
411
+ T[0] ? j ? j.p(T, H) : (j = ke(T), j.c(), j.m(B.parentNode, B)) : j && (j.d(1), j = null);
412
+ },
413
+ d(T) {
414
+ T && (S(e), S(U), S(B)), j && j.d(T), ee = !1, Ce(te);
415
+ }
416
+ };
417
+ }
418
+ function ke(n) {
419
+ let e, t, l, i;
420
+ function s(p, c) {
421
+ return (
422
+ /*currentChannelTimer*/
423
+ p[14] > 0 ? mt : ft
424
+ );
425
+ }
426
+ let u = s(n), a = u(n);
427
+ return {
428
+ c() {
429
+ e = E("button"), a.c(), r(e, "class", "OtpButton"), e.disabled = t = !/*canSubmitChannel*/
430
+ n[15], Y(e, "disabled", !/*canSubmitChannel*/
431
+ n[15]);
432
+ },
433
+ m(p, c) {
434
+ M(p, e, c), a.m(e, null), l || (i = Q(
435
+ e,
436
+ "click",
437
+ /*handleChannelSubmit*/
438
+ n[19]
439
+ ), l = !0);
440
+ },
441
+ p(p, c) {
442
+ u === (u = s(p)) && a ? a.p(p, c) : (a.d(1), a = u(p), a && (a.c(), a.m(e, null))), c[0] & /*canSubmitChannel*/
443
+ 32768 && t !== (t = !/*canSubmitChannel*/
444
+ p[15]) && (e.disabled = t), c[0] & /*canSubmitChannel*/
445
+ 32768 && Y(e, "disabled", !/*canSubmitChannel*/
446
+ p[15]);
447
+ },
448
+ d(p) {
449
+ p && S(e), a.d(), l = !1, i();
450
+ }
451
+ };
452
+ }
453
+ function ft(n) {
454
+ let e = (
455
+ /*$_*/
456
+ n[16]("sendCode") + ""
457
+ ), t;
458
+ return {
459
+ c() {
460
+ t = A(e);
461
+ },
462
+ m(l, i) {
463
+ M(l, t, i);
464
+ },
465
+ p(l, i) {
466
+ i[0] & /*$_*/
467
+ 65536 && e !== (e = /*$_*/
468
+ l[16]("sendCode") + "") && z(t, e);
469
+ },
470
+ d(l) {
471
+ l && S(t);
472
+ }
473
+ };
474
+ }
475
+ function mt(n) {
476
+ let e = (
477
+ /*$_*/
478
+ n[16]("waitSeconds") + ""
479
+ ), t, l, i, s;
480
+ return {
481
+ c() {
482
+ t = A(e), l = A(" ("), i = A(
483
+ /*currentChannelTimer*/
484
+ n[14]
485
+ ), s = A("s)");
486
+ },
487
+ m(u, a) {
488
+ M(u, t, a), M(u, l, a), M(u, i, a), M(u, s, a);
489
+ },
490
+ p(u, a) {
491
+ a[0] & /*$_*/
492
+ 65536 && e !== (e = /*$_*/
493
+ u[16]("waitSeconds") + "") && z(t, e), a[0] & /*currentChannelTimer*/
494
+ 16384 && z(
495
+ i,
496
+ /*currentChannelTimer*/
497
+ u[14]
498
+ );
499
+ },
500
+ d(u) {
501
+ u && (S(t), S(l), S(i), S(s));
502
+ }
503
+ };
504
+ }
505
+ function ht(n) {
506
+ let e, t, l = (
507
+ /*$_*/
508
+ n[16]("timeRemaining") + ""
509
+ ), i, s, u = (
510
+ /*formatTime*/
511
+ n[20](
512
+ /*timeLeft*/
513
+ n[5]
514
+ ) + ""
515
+ ), a, p, c = (
516
+ /*$_*/
517
+ n[16]("minutes") + ""
518
+ ), v, C, w, g = he(
519
+ /*otp*/
520
+ n[2]
521
+ ), _ = [];
522
+ for (let h = 0; h < g.length; h += 1)
523
+ _[h] = ve(we(n, g, h));
524
+ return {
525
+ c() {
526
+ e = E("div"), t = E("div"), i = A(l), s = P(), a = A(u), p = P(), v = A(c), C = P(), w = E("div");
527
+ for (let h = 0; h < _.length; h += 1)
528
+ _[h].c();
529
+ r(t, "class", "OtpTimer"), r(w, "class", "OtpField"), r(e, "class", "OtpFieldWrapper");
530
+ },
531
+ m(h, m) {
532
+ M(h, e, m), d(e, t), d(t, i), d(t, s), d(t, a), d(t, p), d(t, v), d(e, C), d(e, w);
533
+ for (let O = 0; O < _.length; O += 1)
534
+ _[O] && _[O].m(w, null);
535
+ },
536
+ p(h, m) {
537
+ if (m[0] & /*$_*/
538
+ 65536 && l !== (l = /*$_*/
539
+ h[16]("timeRemaining") + "") && z(i, l), m[0] & /*timeLeft*/
540
+ 32 && u !== (u = /*formatTime*/
541
+ h[20](
542
+ /*timeLeft*/
543
+ h[5]
544
+ ) + "") && z(a, u), m[0] & /*$_*/
545
+ 65536 && c !== (c = /*$_*/
546
+ h[16]("minutes") + "") && z(v, c), m[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
547
+ 14690324) {
548
+ g = he(
549
+ /*otp*/
550
+ h[2]
551
+ );
552
+ let O;
553
+ for (O = 0; O < g.length; O += 1) {
554
+ const I = we(h, g, O);
555
+ _[O] ? _[O].p(I, m) : (_[O] = ve(I), _[O].c(), _[O].m(w, null));
556
+ }
557
+ for (; O < _.length; O += 1)
558
+ _[O].d(1);
559
+ _.length = g.length;
560
+ }
561
+ },
562
+ d(h) {
563
+ h && S(e), Ze(_, h);
564
+ }
565
+ };
566
+ }
567
+ function gt(n) {
568
+ let e;
569
+ return {
570
+ c() {
571
+ e = E("div"), e.innerHTML = '<span class="OtpLoader"></span>', r(e, "class", "OtpLoaderContainer");
572
+ },
573
+ m(t, l) {
574
+ M(t, e, l);
575
+ },
576
+ p: re,
577
+ d(t) {
578
+ t && S(e);
579
+ }
580
+ };
581
+ }
582
+ function ve(n) {
583
+ let e, t, l, i = (
584
+ /*index*/
585
+ n[67]
586
+ ), s, u;
587
+ const a = () => (
588
+ /*input_binding*/
589
+ n[38](e, i)
590
+ ), p = () => (
591
+ /*input_binding*/
592
+ n[38](null, i)
593
+ );
594
+ function c(...C) {
595
+ return (
596
+ /*input_handler*/
597
+ n[39](
598
+ /*index*/
599
+ n[67],
600
+ ...C
601
+ )
602
+ );
603
+ }
604
+ function v(...C) {
605
+ return (
606
+ /*keydown_handler*/
607
+ n[40](
608
+ /*index*/
609
+ n[67],
610
+ ...C
611
+ )
612
+ );
613
+ }
614
+ return {
615
+ c() {
616
+ e = E("input"), r(e, "id", `otp-input-${/*index*/
617
+ n[67]}`), r(e, "type", "text"), r(e, "class", t = `otp-box ${/*config*/
618
+ n[4].inputLength % 2 === 0 && /*index*/
619
+ n[67] === /*config*/
620
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), r(e, "maxlength", 1), e.value = l = /*char*/
621
+ n[65], e.disabled = /*inputDisabled*/
622
+ n[11], r(e, "autocomplete", "off");
623
+ },
624
+ m(C, w) {
625
+ M(C, e, w), a(), s || (u = [
626
+ Q(e, "input", c),
627
+ Q(e, "keydown", v),
628
+ Q(
629
+ e,
630
+ "paste",
631
+ /*handleOnPasteOtp*/
632
+ n[21]
633
+ )
634
+ ], s = !0);
635
+ },
636
+ p(C, w) {
637
+ n = C, w[0] & /*config*/
638
+ 16 && t !== (t = `otp-box ${/*config*/
639
+ n[4].inputLength % 2 === 0 && /*index*/
640
+ n[67] === /*config*/
641
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(e, "class", t), w[0] & /*otp*/
642
+ 4 && l !== (l = /*char*/
643
+ n[65]) && e.value !== l && (e.value = l), w[0] & /*inputDisabled*/
644
+ 2048 && (e.disabled = /*inputDisabled*/
645
+ n[11]), i !== /*index*/
646
+ n[67] && (p(), i = /*index*/
647
+ n[67], a());
648
+ },
649
+ d(C) {
650
+ C && S(e), p(), s = !1, Ce(u);
651
+ }
652
+ };
653
+ }
654
+ function bt(n) {
655
+ let e, t = (
656
+ /*$_*/
657
+ n[16]("submit") + ""
658
+ ), l, i, s, u;
659
+ return {
660
+ c() {
661
+ e = E("button"), l = A(t), r(e, "class", "OtpButton"), e.disabled = i = /*otp*/
662
+ n[2].join("").length !== /*config*/
663
+ n[4].inputLength;
664
+ },
665
+ m(a, p) {
666
+ M(a, e, p), d(e, l), s || (u = Q(
667
+ e,
668
+ "click",
669
+ /*submitOtp*/
670
+ n[26]
671
+ ), s = !0);
672
+ },
673
+ p(a, p) {
674
+ p[0] & /*$_*/
675
+ 65536 && t !== (t = /*$_*/
676
+ a[16]("submit") + "") && z(l, t), p[0] & /*otp, config*/
677
+ 20 && i !== (i = /*otp*/
678
+ a[2].join("").length !== /*config*/
679
+ a[4].inputLength) && (e.disabled = i);
680
+ },
681
+ d(a) {
682
+ a && S(e), s = !1, u();
683
+ }
684
+ };
685
+ }
686
+ function wt(n) {
687
+ let e, t = (
688
+ /*$_*/
689
+ n[16]("resendOtp") + ""
690
+ ), l, i, s;
691
+ return {
692
+ c() {
693
+ e = E("button"), l = A(t), r(e, "class", "OtpButton");
694
+ },
695
+ m(u, a) {
696
+ M(u, e, a), d(e, l), i || (s = Q(
697
+ e,
698
+ "click",
699
+ /*handleResendOtp*/
700
+ n[24]
701
+ ), i = !0);
702
+ },
703
+ p(u, a) {
704
+ a[0] & /*$_*/
705
+ 65536 && t !== (t = /*$_*/
706
+ u[16]("resendOtp") + "") && z(l, t);
707
+ },
708
+ d(u) {
709
+ u && S(e), i = !1, s();
710
+ }
711
+ };
712
+ }
713
+ function _t(n) {
714
+ let e;
715
+ function t(s, u) {
716
+ return (
717
+ /*hasConfigErrors*/
718
+ s[7] ? st : rt
719
+ );
720
+ }
721
+ let l = t(n), i = l(n);
722
+ return {
723
+ c() {
724
+ e = E("div"), i.c(), r(e, "class", "OtpContent");
725
+ },
726
+ m(s, u) {
727
+ M(s, e, u), i.m(e, null), n[41](e);
728
+ },
729
+ p(s, u) {
730
+ l === (l = t(s)) && i ? i.p(s, u) : (i.d(1), i = l(s), i && (i.c(), i.m(e, null)));
731
+ },
732
+ i: re,
733
+ o: re,
734
+ d(s) {
735
+ s && S(e), i.d(), n[41](null);
736
+ }
737
+ };
738
+ }
739
+ function yt(n, e, t) {
740
+ let l, i, s;
741
+ Je(n, lt, (o) => t(16, s = o));
742
+ let { clientstyling: u = "" } = e, { clientstylingurl: a = "" } = e, { mbsource: p } = e, { lang: c = "en" } = e, { endpoint: v } = e, { session: C } = e, { translationurl: w } = e, { templateid: g } = e, _ = [], h = !0, m = null, O = 0, I = "", k = "", f = !1, L = !1, R = "", q = "", $ = "", K = !1, x = !1, G = !1, D = "", V = {}, N = null, J = !1, F, U = [], B = null, ee = 0;
743
+ const te = { SMS: "sms", EMAIL: "email" }, j = {
744
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
745
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error"
746
+ };
747
+ Object.keys(be).forEach((o) => {
748
+ ge(o, be[o]);
749
+ });
750
+ const T = () => {
751
+ ot(c);
752
+ }, H = () => {
753
+ fetch(w).then((o) => o.json()).then((o) => {
754
+ Object.keys(o).forEach((b) => {
755
+ ge(b, o[b]);
756
+ });
757
+ }).catch((o) => {
758
+ console.log(o);
759
+ });
760
+ }, se = async (o) => {
761
+ if (o.detail?.["x-step-up-required"]) {
762
+ if (t(7, L = !1), t(6, f = !1), t(8, R = ""), q = o.detail["x-step-up-token"], $ = o.detail.flow, !q || !$) {
763
+ t(3, h = !1), t(7, L = !0), t(8, R = s("configError"));
764
+ return;
765
+ }
766
+ t(12, J = !1), t(3, h = !1);
767
+ }
768
+ }, Oe = () => {
769
+ B && (clearInterval(B), B = null), N && (clearInterval(N), N = null), t(6, f = !1), t(7, L = !1), t(8, R = ""), t(10, x = !1), t(2, _ = []), t(4, m = null), t(3, h = !0), t(0, D = ""), t(12, J = !1), t(35, V = {});
770
+ }, ae = () => {
771
+ Oe();
772
+ }, Se = () => new Promise((o, b) => {
773
+ const y = new URL(`${v}/api/pam/v1/mfa/challenge/${q}`), W = new Headers();
774
+ W.append("accept", "application/json"), W.append("Content-Type", "application/json"), W.append("X-SessionId", `${C}`);
775
+ const ie = {
776
+ method: "PATCH",
777
+ headers: W,
778
+ body: JSON.stringify({
779
+ channel: D,
780
+ templateId: g
781
+ })
782
+ };
783
+ fetch(y, ie).then((fe) => fe.json()).then(() => {
784
+ o();
785
+ }).catch((fe) => {
786
+ b();
787
+ });
788
+ }), Me = () => {
789
+ N && clearInterval(N), N = setInterval(
790
+ () => {
791
+ const o = { ...V };
792
+ let b = !1;
793
+ Object.keys(o).forEach((y) => {
794
+ o[y] > 0 && (o[y]--, b = !0);
795
+ }), t(35, V = o), !b && N && (clearInterval(N), N = null);
796
+ },
797
+ 1e3
798
+ );
799
+ }, le = (o) => {
800
+ t(0, D = o);
801
+ }, Te = async () => {
802
+ if (!(!D || V[D] && V[D] > 0)) {
803
+ t(3, h = !0), g && g.startsWith("2fa-") && t(27, g = `2fa-${D}`);
804
+ try {
805
+ await Se(), await de(), t(35, V = {
806
+ ...V,
807
+ [D]: 30
808
+ }), Me(), t(12, J = !0), Ie();
809
+ } catch (o) {
810
+ console.error("Error submitting channel:", o), t(6, f = !0), t(8, R = s("submissionError"));
811
+ } finally {
812
+ t(3, h = !1);
813
+ }
814
+ }
815
+ }, Le = () => {
816
+ const o = new Date(I), b = new Date(k), y = /* @__PURE__ */ new Date(), W = b.getTime() - y.getTime();
817
+ ee = o.getTime() - W;
818
+ const ne = Date.now(), ie = Math.max(0, Math.floor((ee - ne) / 1e3));
819
+ t(5, O = ie);
820
+ }, Ie = () => {
821
+ B && clearInterval(B), B = setInterval(
822
+ () => {
823
+ const o = Date.now(), b = Math.max(0, Math.floor((ee - o) / 1e3));
824
+ t(5, O = b), t(11, G = b <= 0), b <= 0 && (clearInterval(B), B = null, t(9, K = !0), t(6, f = !1), t(10, x = !1));
825
+ },
826
+ 1e3
827
+ );
828
+ }, Ae = (o) => {
829
+ const b = Math.floor(o / 60), y = o % 60;
830
+ return `${b.toString().padStart(2, "0")}:${y.toString().padStart(2, "0")}`;
831
+ }, oe = (o, b) => {
832
+ const y = [..._];
833
+ y[o] = b.toUpperCase(), t(2, _ = y);
834
+ }, Re = (o) => {
835
+ o.preventDefault();
836
+ const y = (o.clipboardData?.getData("text")?.trim() || "").slice(0, m.inputLength).split("");
837
+ t(2, _ = [...y, ...Array(m.inputLength - y.length).fill("")]), U[y.length]?.focus(), y.length === m.inputLength && pe();
838
+ }, ce = (o, b) => {
839
+ const y = o.target, W = y.value;
840
+ /^[a-z0-9]$/i.test(W) && (oe(b, W), U[b + 1]?.focus()), y.value = "";
841
+ }, ue = (o, b) => {
842
+ const y = o.key, W = o.ctrlKey || o.metaKey;
843
+ if (/^[a-z0-9]$/i.test(y)) {
844
+ if (W && y.toLowerCase() === "v")
845
+ return;
846
+ o.preventDefault(), oe(b, y), U[b + 1]?.focus();
847
+ } else
848
+ y === "Backspace" && (o.preventDefault(), _[b] !== "" && oe(b, ""), U[b - 1]?.focus());
849
+ }, Pe = () => {
850
+ const o = new CustomEvent("otpResendRequested");
851
+ window.dispatchEvent(o);
852
+ }, ze = (o) => {
853
+ window.dispatchEvent(new CustomEvent(
854
+ "otpSubmitted",
855
+ {
856
+ detail: {
857
+ code: o,
858
+ maxAttempts: m.maxValidationAttempts,
859
+ validatedAttempts: m.numberOfValidateAttempts
860
+ }
861
+ }
862
+ ));
863
+ }, xe = async (o) => {
864
+ const b = new URL(`/api/nwa/api/v1/mfa/challenge/${q}/validate`, v);
865
+ b.searchParams.append("input", o);
866
+ try {
867
+ const y = await fetch(b.href, { method: "POST" });
868
+ if (y.status === 200) {
869
+ De();
870
+ return;
871
+ }
872
+ const W = await y.json();
873
+ throw new Error(W.message);
874
+ } catch (y) {
875
+ if (y.message === j.INTERNAL_SERVER_ERROR) {
876
+ if (m.numberOfValidateAttempts === m.maxValidationAttempts - 1) {
877
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
878
+ {
879
+ type: "WidgetNotification",
880
+ data: {
881
+ type: "error",
882
+ message: s("accountBlocked")
883
+ }
884
+ },
885
+ window.location.href
886
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
887
+ return;
888
+ }
889
+ t(6, f = !0), t(8, R = s("invalidOtp")), de();
890
+ return;
891
+ }
892
+ console.error("OTP submission failed:", y), t(6, f = !0), t(8, R = s("submissionError"));
893
+ } finally {
894
+ t(3, h = !1);
895
+ }
896
+ }, De = () => {
897
+ window.dispatchEvent(new CustomEvent(
898
+ "otpSuccess",
899
+ {
900
+ detail: {
901
+ message: "User successfully authenticated"
902
+ }
903
+ }
904
+ ));
905
+ }, je = () => {
906
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
907
+ }, pe = async () => {
908
+ if (_.join("").length !== m.inputLength) {
909
+ t(6, f = !0), t(8, R = s("invalidOtp"));
910
+ return;
911
+ }
912
+ t(3, h = !0), t(6, f = !1), t(8, R = "");
913
+ const o = _.join("");
914
+ $ === "stateless" && ze(o), $ === "stateful" && await xe(o);
915
+ }, de = async () => {
916
+ if (v)
917
+ try {
918
+ t(3, h = !0);
919
+ const o = new URL(`/api/nwa/api/v1/mfa/challenge/${q}/config`, v), b = await fetch(o.href), y = await b.json();
920
+ if (b.ok)
921
+ t(4, m = y), t(2, _ = Array(m.inputLength).fill("")), t(9, K = !1), I = m.expirationTime, k = m.serverTime, m.numberOfValidateAttempts !== 0 && (t(6, f = !0), t(8, R = s("invalidOtp"))), m.numberOfValidateAttempts === m.maxValidationAttempts - 1 && t(10, x = !0), t(3, h = !1), Le();
922
+ else if (y && y.details === j.MAX_ATTEMPTS_EXCEEDED)
923
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
924
+ else {
925
+ const W = y && y.message || `Failed to load config. Status: ${b.status}`;
926
+ throw new Error(W);
927
+ }
928
+ } catch (o) {
929
+ t(3, h = !1), t(7, L = !0), t(8, R = s("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", o);
930
+ }
931
+ };
932
+ Qe(() => (window.addEventListener("stepUpAuthRequired", se, !1), window.addEventListener("closePopup", ae, !1), () => {
933
+ window.removeEventListener("stepUpAuthRequired", se), window.removeEventListener("closePopup", ae, !1), B && clearInterval(B), N && clearInterval(N);
934
+ }));
935
+ const Be = () => le(te.SMS), He = () => le(te.EMAIL);
936
+ function Ne(o, b) {
937
+ me[o ? "unshift" : "push"](() => {
938
+ U[b] = o, t(13, U);
939
+ });
940
+ }
941
+ const We = (o, b) => ce(b, o), Ve = (o, b) => ue(b, o);
942
+ function Fe(o) {
943
+ me[o ? "unshift" : "push"](() => {
944
+ F = o, t(1, F);
945
+ });
946
+ }
947
+ return n.$$set = (o) => {
948
+ "clientstyling" in o && t(28, u = o.clientstyling), "clientstylingurl" in o && t(29, a = o.clientstylingurl), "mbsource" in o && t(30, p = o.mbsource), "lang" in o && t(31, c = o.lang), "endpoint" in o && t(32, v = o.endpoint), "session" in o && t(33, C = o.session), "translationurl" in o && t(34, w = o.translationurl), "templateid" in o && t(27, g = o.templateid);
949
+ }, n.$$.update = () => {
950
+ n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
951
+ 268435458 && u && F && $e(F, u), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
952
+ 536870914 && a && F && et(F, a), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
953
+ 1073741826 && p && F && tt(F, `${p}.Style`), n.$$.dirty[1] & /*lang*/
954
+ 1 && c && T(), n.$$.dirty[1] & /*lang, translationurl*/
955
+ 9 && c && w && H(), n.$$.dirty[0] & /*selectedChannel*/
956
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
957
+ 16 && t(15, l = D && (!V[D] || V[D] === 0)), n.$$.dirty[0] & /*selectedChannel*/
958
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
959
+ 16 && t(14, i = D && V[D] || 0);
960
+ }, [
961
+ D,
962
+ F,
963
+ _,
964
+ h,
965
+ m,
966
+ O,
967
+ f,
968
+ L,
969
+ R,
970
+ K,
971
+ x,
972
+ G,
973
+ J,
974
+ U,
975
+ i,
976
+ l,
977
+ s,
978
+ te,
979
+ le,
980
+ Te,
981
+ Ae,
982
+ Re,
983
+ ce,
984
+ ue,
985
+ Pe,
986
+ je,
987
+ pe,
988
+ g,
989
+ u,
990
+ a,
991
+ p,
992
+ c,
993
+ v,
994
+ C,
995
+ w,
996
+ V,
997
+ Be,
998
+ He,
999
+ Ne,
1000
+ We,
1001
+ Ve,
1002
+ Fe
1003
+ ];
1004
+ }
1005
+ class kt extends Ke {
1006
+ constructor(e) {
1007
+ super(), Ge(
1008
+ this,
1009
+ e,
1010
+ yt,
1011
+ _t,
1012
+ Xe,
1013
+ {
1014
+ clientstyling: 28,
1015
+ clientstylingurl: 29,
1016
+ mbsource: 30,
1017
+ lang: 31,
1018
+ endpoint: 32,
1019
+ session: 33,
1020
+ translationurl: 34,
1021
+ templateid: 27
1022
+ },
1023
+ it,
1024
+ [-1, -1, -1]
1025
+ );
1026
+ }
1027
+ get clientstyling() {
1028
+ return this.$$.ctx[28];
1029
+ }
1030
+ set clientstyling(e) {
1031
+ this.$$set({ clientstyling: e }), Z();
1032
+ }
1033
+ get clientstylingurl() {
1034
+ return this.$$.ctx[29];
1035
+ }
1036
+ set clientstylingurl(e) {
1037
+ this.$$set({ clientstylingurl: e }), Z();
1038
+ }
1039
+ get mbsource() {
1040
+ return this.$$.ctx[30];
1041
+ }
1042
+ set mbsource(e) {
1043
+ this.$$set({ mbsource: e }), Z();
1044
+ }
1045
+ get lang() {
1046
+ return this.$$.ctx[31];
1047
+ }
1048
+ set lang(e) {
1049
+ this.$$set({ lang: e }), Z();
1050
+ }
1051
+ get endpoint() {
1052
+ return this.$$.ctx[32];
1053
+ }
1054
+ set endpoint(e) {
1055
+ this.$$set({ endpoint: e }), Z();
1056
+ }
1057
+ get session() {
1058
+ return this.$$.ctx[33];
1059
+ }
1060
+ set session(e) {
1061
+ this.$$set({ session: e }), Z();
1062
+ }
1063
+ get translationurl() {
1064
+ return this.$$.ctx[34];
1065
+ }
1066
+ set translationurl(e) {
1067
+ this.$$set({ translationurl: e }), Z();
1068
+ }
1069
+ get templateid() {
1070
+ return this.$$.ctx[27];
1071
+ }
1072
+ set templateid(e) {
1073
+ this.$$set({ templateid: e }), Z();
1074
+ }
1075
+ }
1076
+ nt(kt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1077
+ export {
1078
+ kt as default
1079
+ };