@everymatrix/cashier-page 1.87.26 → 1.87.102

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 (139) hide show
  1. package/components/{CashierCarousel-DsekS1gS.js → CashierCarousel-BS_3salc.js} +1328 -1321
  2. package/components/CashierCarousel-BhLbwlL5.js +5736 -0
  3. package/components/CashierCarousel-Bwhda3Gl.js +5774 -0
  4. package/components/CashierCarousel-CfPrrhkY.cjs +23 -0
  5. package/components/{CashierCarousel-BJw_SNG2.js → CashierCarousel-CyAfjImL.js} +1172 -1166
  6. package/components/CashierCarousel-GM1WPyu3.cjs +23 -0
  7. package/components/CashierError-BN1XW0cs.cjs +1 -0
  8. package/components/{CashierError-B1WXlDdK.js → CashierError-CDBKwx0N.js} +212 -206
  9. package/components/{CashierError-40KPQU2s.js → CashierError-CV6Kq3fN.js} +212 -206
  10. package/components/CashierError-CXcO-Kju.js +415 -0
  11. package/components/CashierError-CXwvUOLy.js +415 -0
  12. package/components/CashierError-D4Au4WNB.cjs +1 -0
  13. package/components/{CashierHeader-BZvqRar_.js → CashierHeader-BgAqvq1Q.js} +74 -81
  14. package/components/CashierHeader-BhGRQhkm.cjs +1 -0
  15. package/components/CashierHeader-C_Mz7ISU.js +397 -0
  16. package/components/CashierHeader-CaV1gcjZ.js +397 -0
  17. package/components/CashierHeader-CmAjJv-w.cjs +1 -0
  18. package/components/{CashierHeader-BfpTyZmQ.js → CashierHeader-DRj1BUdj.js} +78 -85
  19. package/components/{CashierIframeRedirect-CyI4soMo.js → CashierIframeRedirect-7uZKKZOy.js} +68 -68
  20. package/components/CashierIframeRedirect-B76kjw0o.js +389 -0
  21. package/components/{CashierIframeRedirect-DBSuyK9E.cjs → CashierIframeRedirect-BU-0tKNo.cjs} +1 -1
  22. package/components/{CashierIframeRedirect-2CfxTUrh.js → CashierIframeRedirect-BkvkX6Ih.js} +68 -68
  23. package/components/CashierIframeRedirect-Ddt7NW02.cjs +1 -0
  24. package/components/CashierIframeRedirect-DmvuwOL2.js +389 -0
  25. package/components/{CashierMethodDetails-U6L33HpX.cjs → CashierMethodDetails-BEykktuA.cjs} +4 -4
  26. package/components/CashierMethodDetails-BX_W3rwH.js +9887 -0
  27. package/components/{CashierMethodDetails-CuQYMgbw.js → CashierMethodDetails-Bdko0TrB.js} +1574 -1574
  28. package/components/{CashierMethodDetails-DFXMp3df.js → CashierMethodDetails-C0EaNINa.js} +1611 -1611
  29. package/components/CashierMethodDetails-DmvyMFjk.cjs +85 -0
  30. package/components/CashierMethodDetails-i7grZPp4.js +9927 -0
  31. package/components/CashierMethodsList-B6tMxcnh.js +794 -0
  32. package/components/{CashierMethodsList-tRbJ56Bk.js → CashierMethodsList-CRWXDpa-.js} +263 -263
  33. package/components/{CashierMethodsList-CshlP6d7.js → CashierMethodsList-CVSYKCiY.js} +153 -153
  34. package/components/CashierMethodsList-DSq72RRw.js +809 -0
  35. package/components/CashierMethodsList-GOTxtR6r.cjs +1 -0
  36. package/components/CashierMethodsList-LHoZgwVR.cjs +1 -0
  37. package/components/{CashierModal-BCs-hvy-.js → CashierModal-B7N_nPHW.js} +162 -146
  38. package/components/CashierModal-C845c3D0.cjs +1 -0
  39. package/components/CashierModal-CTYxaPKG.js +366 -0
  40. package/components/{CashierModal-DdvNZLqY.cjs → CashierModal-Cd1uDEwu.cjs} +1 -1
  41. package/components/{CashierModal-Cyn1bRtX.js → CashierModal-KhxltwKt.js} +123 -139
  42. package/components/CashierModal-ndVMjksn.js +382 -0
  43. package/components/{CashierNotifications-CkRmBcgx.js → CashierNotifications-BmarDqdP.js} +34 -34
  44. package/components/{CashierNotifications-DfV8x-rA.js → CashierNotifications-Bp4KJnpm.js} +34 -34
  45. package/components/CashierNotifications-D4fUbROm.js +129 -0
  46. package/components/CashierNotifications-JNstA5Yb.js +129 -0
  47. package/components/{CashierNotifications-B93HkTiJ.cjs → CashierNotifications-bGhd7Jsw.cjs} +1 -1
  48. package/components/CashierNotifications-tfTPEiSk.cjs +1 -0
  49. package/components/CashierPage-4nTfbT_j.js +3994 -0
  50. package/components/{CashierPage--A8w0jWY.js → CashierPage-BSByd5RU.js} +79 -79
  51. package/components/CashierPage-Bd71Nhaq.js +4020 -0
  52. package/components/CashierPage-CHtYMgc0.cjs +1 -0
  53. package/components/{CashierPage-DJxPlCxY.js → CashierPage-CZ4TSJkx.js} +81 -81
  54. package/components/{CashierPage-kf1tVNZU.cjs → CashierPage-DfrmhWzm.cjs} +1 -1
  55. package/components/{CashierReceiptPage-CZbWQvvv.js → CashierReceiptPage-BD3aDt3T.js} +492 -492
  56. package/components/{CashierReceiptPage-Bp7jFvov.cjs → CashierReceiptPage-BQpEnTyU.cjs} +2 -2
  57. package/components/CashierReceiptPage-CnyLmUmL.js +1694 -0
  58. package/components/CashierReceiptPage-DV7Iz4wR.js +1690 -0
  59. package/components/{CashierReceiptPage-CofNGFj1.js → CashierReceiptPage-DgxlKvM2.js} +518 -518
  60. package/components/CashierReceiptPage-HRthn--H.cjs +28 -0
  61. package/components/CashierSessionExpirationModal-B98EEWed.js +1198 -0
  62. package/components/CashierSessionExpirationModal-CYcBByMT.cjs +2 -0
  63. package/components/CashierSessionExpirationModal-Ckhir3qN.cjs +2 -0
  64. package/components/{CashierSessionExpirationModal-Ckh0MnJn.js → CashierSessionExpirationModal-CvYI4jUg.js} +129 -128
  65. package/components/CashierSessionExpirationModal-D6FwiFE-.js +1198 -0
  66. package/components/{CashierSessionExpirationModal-CqqS70E7.js → CashierSessionExpirationModal-DM8-SPd3.js} +131 -130
  67. package/components/CashierSpinner-C0P8ZCtD.js +78 -0
  68. package/components/{CashierSpinner-BTDAq-Gk.js → CashierSpinner-CeX51xPH.js} +17 -17
  69. package/components/CashierSpinner-CikMZBzw.cjs +1 -0
  70. package/components/CashierSpinner-DJTUb5NI.js +78 -0
  71. package/components/{CashierSpinner-yhu6RHaO.cjs → CashierSpinner-ODmoTC6W.cjs} +1 -1
  72. package/components/{CashierSpinner-C8tFNM39.js → CashierSpinner-a2VW8q1r.js} +17 -17
  73. package/components/CashierStepUp-5um8gbUX.js +1068 -0
  74. package/components/{CashierStepUp-CHNRsm-i.js → CashierStepUp-Bk5fP7qd.js} +243 -243
  75. package/components/CashierStepUp-CjnvqYJo.cjs +1 -0
  76. package/components/CashierStepUp-CxawlCYf.cjs +1 -0
  77. package/components/CashierStepUp-CyO7gmgP.js +1107 -0
  78. package/components/{CashierStepUp-BTxHmTK2.js → CashierStepUp-DS-UsgrI.js} +294 -294
  79. package/components/CashierTransactionHistory-5JNtVHcj.js +1305 -0
  80. package/components/{CashierTransactionHistory-HclQq8wA.cjs → CashierTransactionHistory-Bwc0I09a.cjs} +1 -1
  81. package/components/CashierTransactionHistory-Cm3ikVPK.js +1305 -0
  82. package/components/CashierTransactionHistory-CmgO6bXN.cjs +1 -0
  83. package/components/{CashierTransactionHistory-DTAdYC2Y.js → CashierTransactionHistory-CoqckbJ2.js} +231 -231
  84. package/components/{CashierTransactionHistory-Bd7CEoaj.js → CashierTransactionHistory-DO6C0I1a.js} +420 -420
  85. package/components/{CashierVerifications-fPErTC9e.js → CashierVerifications-B8fkVYVD.js} +88 -88
  86. package/components/CashierVerifications-BmZYiJaN.js +578 -0
  87. package/components/{CashierVerifications-b9Eeag80.js → CashierVerifications-CuX4vrPf.js} +95 -95
  88. package/components/CashierVerifications-DkayuISY.cjs +1 -0
  89. package/components/CashierVerifications-hID6hjDs.js +582 -0
  90. package/components/{CashierVerifications--VdCm0A0.cjs → CashierVerifications-mSpdNrML.cjs} +1 -1
  91. package/components/{TxnStatusIcon-Dm5lj3fd.js → TxnStatusIcon-BDnNMhFD.js} +19 -19
  92. package/components/{TxnStatusIcon-DRLLqFXC.js → TxnStatusIcon-BZMSpoHv.js} +19 -19
  93. package/components/{TxnStatusIcon-C8lEFNJK.cjs → TxnStatusIcon-C8bPyggx.cjs} +1 -1
  94. package/components/TxnStatusIcon-HrmfQdAc.js +142 -0
  95. package/components/TxnStatusIcon-Le-TBKNh.cjs +1 -0
  96. package/components/TxnStatusIcon-VvYGYLio.js +142 -0
  97. package/components/{TxnTypeIcons-CFpm5fsz.cjs → TxnTypeIcons-Cc7Yt6gg.cjs} +1 -1
  98. package/components/{TxnTypeIcons-B32Qcanf.js → TxnTypeIcons-DZRNYWUy.js} +14 -14
  99. package/components/{TxnTypeIcons-Dwfdotxd.js → TxnTypeIcons-__im0AE_.js} +14 -14
  100. package/components/TxnTypeIcons-lKki7AUK.js +101 -0
  101. package/components/TxnTypeIcons-sZUo9qa8.cjs +1 -0
  102. package/components/TxnTypeIcons-zM86UKOx.js +101 -0
  103. package/es2015/cashier-page.cjs +1 -1
  104. package/es2015/cashier-page.js +1 -1
  105. package/esnext/cashier-page.js +1 -1
  106. package/package.json +1 -1
  107. package/stencil/index-97d17652-DvplcHtm.js +558 -0
  108. package/stencil/index-97d17652-ILzgTtTR.cjs +1 -0
  109. package/stencil/index-97d17652-p-iQtjus.js +542 -0
  110. package/stencil/index-b2193545-Bvpy7mp9.js +503 -0
  111. package/stencil/index-b2193545-DxDmFccl.js +519 -0
  112. package/stencil/index-b2193545-P1qvDl70.cjs +1 -0
  113. package/stencil/{ui-image-CNaRr0ax.js → ui-image-BIr_PDb-.js} +1 -1
  114. package/stencil/{ui-image-IJc7Zz_R.cjs → ui-image-CEbrFHSD.cjs} +1 -1
  115. package/stencil/{ui-image-BsYHwNhO.js → ui-image-D69wsX4B.js} +1 -1
  116. package/stencil/{ui-image-b7b48fe5-BKRtoUuG.js → ui-image-b7b48fe5-CBB2FKRZ.js} +1 -1
  117. package/stencil/{ui-image-b7b48fe5-MC0x5ZQd.cjs → ui-image-b7b48fe5-DjCO-ZF4.cjs} +1 -1
  118. package/stencil/{ui-image-b7b48fe5-HA45CrsG.js → ui-image-b7b48fe5-rCWcyktd.js} +1 -1
  119. package/stencil/{ui-image_2-Daq38JGa.js → ui-image_2-BESQEo1l.js} +2 -2
  120. package/stencil/{ui-image_2-CmVho0dS.js → ui-image_2-BfZmduAK.js} +2 -2
  121. package/stencil/{ui-image_2-CyqE6j_W.cjs → ui-image_2-ZFidgTXM.cjs} +1 -1
  122. package/stencil/{ui-skeleton-UxIIZ8UD.cjs → ui-skeleton-CTOStr1f.cjs} +1 -1
  123. package/stencil/{ui-skeleton-CQ-FgYMx.js → ui-skeleton-UELn0TdO.js} +2 -2
  124. package/stencil/{ui-skeleton-ed169f8f-BEwquWmd.cjs → ui-skeleton-ed169f8f-6tILWWI7.cjs} +1 -1
  125. package/stencil/{ui-skeleton-ed169f8f-BMrkXoR5.js → ui-skeleton-ed169f8f-DU5yFWqG.js} +1 -1
  126. package/stencil/{ui-skeleton-ed169f8f-BNn31z1X.js → ui-skeleton-ed169f8f-DmzkEnLt.js} +1 -1
  127. package/stencil/{ui-skeleton-B9YTz-WD.js → ui-skeleton-i8axfHXy.js} +2 -2
  128. package/components/CashierCarousel-Uqj8lOn9.cjs +0 -23
  129. package/components/CashierError-BOmVvy3N.cjs +0 -1
  130. package/components/CashierHeader-B7XYr24D.cjs +0 -1
  131. package/components/CashierMethodsList-DueBSlwx.cjs +0 -1
  132. package/components/CashierSessionExpirationModal-kLS8veZV.cjs +0 -2
  133. package/components/CashierStepUp-FR5Znqdo.cjs +0 -1
  134. package/stencil/index-97d17652-B6BYeRne.js +0 -542
  135. package/stencil/index-97d17652-BOr4KAqq.js +0 -558
  136. package/stencil/index-97d17652-zTl06Vn9.cjs +0 -1
  137. package/stencil/index-b2193545-B5Q7rnAU.cjs +0 -1
  138. package/stencil/index-b2193545-CF_fVoFe.js +0 -519
  139. package/stencil/index-b2193545-DfttkCgg.js +0 -503
@@ -0,0 +1,1068 @@
1
+ import { a as Xe, $ as Ke, S as Ge, b as Ye, f as oe, c as Je, s as Qe, d as Ze, g as k, j as r, k as O, G as _e, p as S, q as $e, r as et, v as tt, A as nt, B as Ee, C as lt, D as ot, h as x, R as J, x as L, T as Q, l as f, z as ne, y as z, a1 as Re, w as it, Y as Oe, a3 as rt } from "./CashierCarousel-BhLbwlL5.js";
2
+ function Se(n, t) {
3
+ Xe(n, t);
4
+ }
5
+ function st(n) {
6
+ Ke.set(n);
7
+ }
8
+ const Me = {
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 at(n) {
57
+ Ze(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, t, e) {
60
+ const l = n.slice();
61
+ return l[69] = t[e], l[70] = t, l[71] = e, l;
62
+ }
63
+ function ct(n) {
64
+ let t, e, l, o, a, p, s, u, d, _, b, T, M, w, m, y, C, I = (
65
+ /*$_*/
66
+ n[19]("channelSMS") + ""
67
+ ), q, W, j, R, le, F, Z, ie, $, E, A, V, re, se, ae = (
68
+ /*$_*/
69
+ n[19]("channelEmail") + ""
70
+ ), U, K, B, ee, G, ce, ue;
71
+ function pe(c, v) {
72
+ return (
73
+ /*showResendOtp*/
74
+ c[9] ? dt : (
75
+ /*showOtpInput*/
76
+ c[12] ? ut : ft
77
+ )
78
+ );
79
+ }
80
+ let fe = pe(n), X = fe(n), P = (
81
+ /*selectedChannel*/
82
+ n[0] && Ae(n)
83
+ );
84
+ function me(c, v) {
85
+ if (
86
+ /*isLoading*/
87
+ c[3] && /*showOtpInput*/
88
+ c[12]
89
+ )
90
+ return _t;
91
+ if (
92
+ /*showOtpInput*/
93
+ c[12] && /*config*/
94
+ c[4]
95
+ )
96
+ return bt;
97
+ }
98
+ let te = me(n), D = te && te(n);
99
+ function he(c, v) {
100
+ if (
101
+ /*showResendOtp*/
102
+ c[9]
103
+ )
104
+ return kt;
105
+ if (
106
+ /*showOtpInput*/
107
+ c[12] && /*config*/
108
+ c[4]
109
+ )
110
+ return yt;
111
+ }
112
+ let Y = he(n), H = Y && Y(n);
113
+ return {
114
+ c() {
115
+ t = k("div"), X.c(), e = x(), l = k("div"), o = k("label"), a = k("div"), p = x(), s = k("input"), d = x(), _ = k("div"), b = J("svg"), T = J("path"), M = J("circle"), w = J("circle"), m = J("circle"), y = x(), C = k("span"), q = L(I), W = x(), j = k("label"), R = k("div"), le = x(), F = k("input"), ie = x(), $ = k("div"), E = J("svg"), A = J("rect"), V = J("path"), re = x(), se = k("span"), U = L(ae), K = x(), P && P.c(), B = x(), D && D.c(), ee = x(), G = k("div"), H && H.c(), r(t, "class", "OtpDescription"), r(a, "class", "RadioIndicator"), Q(
116
+ a,
117
+ "checked",
118
+ /*selectedChannel*/
119
+ n[0] === /*channels*/
120
+ n[20].SMS
121
+ ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
122
+ n[20].SMS, s.checked = u = /*selectedChannel*/
123
+ n[0] === /*channels*/
124
+ n[20].SMS, r(T, "d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"), r(M, "cx", "9"), r(M, "cy", "11"), r(M, "r", "0.5"), r(M, "fill", "currentColor"), r(w, "cx", "12"), r(w, "cy", "11"), r(w, "r", "0.5"), r(w, "fill", "currentColor"), r(m, "cx", "15"), r(m, "cy", "11"), r(m, "r", "0.5"), r(m, "fill", "currentColor"), r(b, "xmlns", "http://www.w3.org/2000/svg"), r(b, "width", "24"), r(b, "height", "24"), r(b, "viewBox", "0 0 24 24"), r(b, "fill", "none"), r(b, "stroke", "currentColor"), r(b, "stroke-width", "2"), r(b, "stroke-linecap", "round"), r(b, "stroke-linejoin", "round"), r(_, "class", "ChannelContent"), r(o, "class", "ChannelCheckbox"), Q(
125
+ o,
126
+ "selected",
127
+ /*selectedChannel*/
128
+ n[0] === /*channels*/
129
+ n[20].SMS
130
+ ), r(R, "class", "RadioIndicator"), Q(
131
+ R,
132
+ "checked",
133
+ /*selectedChannel*/
134
+ n[0] === /*channels*/
135
+ n[20].EMAIL
136
+ ), r(F, "type", "radio"), r(F, "name", "channel"), F.value = /*channels*/
137
+ n[20].EMAIL, F.checked = Z = /*selectedChannel*/
138
+ n[0] === /*channels*/
139
+ n[20].EMAIL, r(A, "x", "2"), r(A, "y", "4"), r(A, "width", "20"), r(A, "height", "16"), r(A, "rx", "2"), r(V, "d", "m2 7 10 6 10-6"), r(E, "xmlns", "http://www.w3.org/2000/svg"), r(E, "width", "24"), r(E, "height", "24"), r(E, "viewBox", "0 0 24 24"), r(E, "fill", "none"), r(E, "stroke", "currentColor"), r(E, "stroke-width", "2"), r(E, "stroke-linecap", "round"), r(E, "stroke-linejoin", "round"), r($, "class", "ChannelContent"), r(j, "class", "ChannelCheckbox"), Q(
140
+ j,
141
+ "selected",
142
+ /*selectedChannel*/
143
+ n[0] === /*channels*/
144
+ n[20].EMAIL
145
+ ), r(l, "class", "ChannelSelection"), r(G, "class", "OtpActionButtons");
146
+ },
147
+ m(c, v) {
148
+ O(c, t, v), X.m(t, null), O(c, e, v), O(c, l, v), f(l, o), f(o, a), f(o, p), f(o, s), f(o, d), f(o, _), f(_, b), f(b, T), f(b, M), f(b, w), f(b, m), f(_, y), f(_, C), f(C, q), f(l, W), f(l, j), f(j, R), f(j, le), f(j, F), f(j, ie), f(j, $), f($, E), f(E, A), f(E, V), f($, re), f($, se), f(se, U), O(c, K, v), P && P.m(c, v), O(c, B, v), D && D.m(c, v), O(c, ee, v), O(c, G, v), H && H.m(G, null), ce || (ue = [
149
+ ne(
150
+ s,
151
+ "change",
152
+ /*change_handler*/
153
+ n[39]
154
+ ),
155
+ ne(
156
+ F,
157
+ "change",
158
+ /*change_handler_1*/
159
+ n[40]
160
+ )
161
+ ], ce = !0);
162
+ },
163
+ p(c, v) {
164
+ fe === (fe = pe(c)) && X ? X.p(c, v) : (X.d(1), X = fe(c), X && (X.c(), X.m(t, null))), v[0] & /*selectedChannel, channels*/
165
+ 1048577 && Q(
166
+ a,
167
+ "checked",
168
+ /*selectedChannel*/
169
+ c[0] === /*channels*/
170
+ c[20].SMS
171
+ ), v[0] & /*selectedChannel*/
172
+ 1 && u !== (u = /*selectedChannel*/
173
+ c[0] === /*channels*/
174
+ c[20].SMS) && (s.checked = u), v[0] & /*$_*/
175
+ 524288 && I !== (I = /*$_*/
176
+ c[19]("channelSMS") + "") && z(q, I), v[0] & /*selectedChannel, channels*/
177
+ 1048577 && Q(
178
+ o,
179
+ "selected",
180
+ /*selectedChannel*/
181
+ c[0] === /*channels*/
182
+ c[20].SMS
183
+ ), v[0] & /*selectedChannel, channels*/
184
+ 1048577 && Q(
185
+ R,
186
+ "checked",
187
+ /*selectedChannel*/
188
+ c[0] === /*channels*/
189
+ c[20].EMAIL
190
+ ), v[0] & /*selectedChannel*/
191
+ 1 && Z !== (Z = /*selectedChannel*/
192
+ c[0] === /*channels*/
193
+ c[20].EMAIL) && (F.checked = Z), v[0] & /*$_*/
194
+ 524288 && ae !== (ae = /*$_*/
195
+ c[19]("channelEmail") + "") && z(U, ae), v[0] & /*selectedChannel, channels*/
196
+ 1048577 && Q(
197
+ j,
198
+ "selected",
199
+ /*selectedChannel*/
200
+ c[0] === /*channels*/
201
+ c[20].EMAIL
202
+ ), /*selectedChannel*/
203
+ c[0] ? P ? P.p(c, v) : (P = Ae(c), P.c(), P.m(B.parentNode, B)) : P && (P.d(1), P = null), te === (te = me(c)) && D ? D.p(c, v) : (D && D.d(1), D = te && te(c), D && (D.c(), D.m(ee.parentNode, ee))), Y === (Y = he(c)) && H ? H.p(c, v) : (H && H.d(1), H = Y && Y(c), H && (H.c(), H.m(G, null)));
204
+ },
205
+ d(c) {
206
+ c && (S(t), S(e), S(l), S(K), S(B), S(ee), S(G)), X.d(), P && P.d(c), D && D.d(c), H && H.d(), ce = !1, Re(ue);
207
+ }
208
+ };
209
+ }
210
+ function pt(n) {
211
+ let t, e, l, o, a, p, s = (
212
+ /*$_*/
213
+ n[19]("errorHeader") + ""
214
+ ), u, d, _, b, T, M, w = (
215
+ /*$_*/
216
+ n[19]("close") + ""
217
+ ), m, y, C;
218
+ return {
219
+ c() {
220
+ t = k("div"), e = k("div"), l = J("svg"), o = J("path"), a = x(), p = k("h2"), u = L(s), d = x(), _ = k("p"), b = L(
221
+ /*errorMessage*/
222
+ n[8]
223
+ ), T = x(), M = k("button"), m = L(w), r(o, "d", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"), r(l, "xmlns", "http://www.w3.org/2000/svg"), r(l, "viewBox", "0 0 512 512"), r(e, "class", "OtpErrorHeader"), r(M, "class", "OtpButton error"), r(t, "class", "OtpError");
224
+ },
225
+ m(I, q) {
226
+ O(I, t, q), f(t, e), f(e, l), f(l, o), f(e, a), f(e, p), f(p, u), f(t, d), f(t, _), f(_, b), f(t, T), f(t, M), f(M, m), y || (C = ne(
227
+ M,
228
+ "click",
229
+ /*manualClosePopup*/
230
+ n[28]
231
+ ), y = !0);
232
+ },
233
+ p(I, q) {
234
+ q[0] & /*$_*/
235
+ 524288 && s !== (s = /*$_*/
236
+ I[19]("errorHeader") + "") && z(u, s), q[0] & /*errorMessage*/
237
+ 256 && z(
238
+ b,
239
+ /*errorMessage*/
240
+ I[8]
241
+ ), q[0] & /*$_*/
242
+ 524288 && w !== (w = /*$_*/
243
+ I[19]("close") + "") && z(m, w);
244
+ },
245
+ d(I) {
246
+ I && S(t), y = !1, C();
247
+ }
248
+ };
249
+ }
250
+ function ut(n) {
251
+ let t, e, l, o;
252
+ function a(d, _) {
253
+ return (
254
+ /*isLastWarning*/
255
+ d[10] ? ht : mt
256
+ );
257
+ }
258
+ let p = a(n), s = p(n), u = (
259
+ /*hasErrors*/
260
+ n[6] && Le(n)
261
+ );
262
+ return {
263
+ c() {
264
+ t = k("p"), s.c(), l = x(), u && u.c(), o = it(), r(t, "class", e = /*isLastWarning*/
265
+ n[10] ? "LastWarningMessage" : "");
266
+ },
267
+ m(d, _) {
268
+ O(d, t, _), s.m(t, null), O(d, l, _), u && u.m(d, _), O(d, o, _);
269
+ },
270
+ p(d, _) {
271
+ p === (p = a(d)) && s ? s.p(d, _) : (s.d(1), s = p(d), s && (s.c(), s.m(t, null))), _[0] & /*isLastWarning*/
272
+ 1024 && e !== (e = /*isLastWarning*/
273
+ d[10] ? "LastWarningMessage" : "") && r(t, "class", e), /*hasErrors*/
274
+ d[6] ? u ? u.p(d, _) : (u = Le(d), u.c(), u.m(o.parentNode, o)) : u && (u.d(1), u = null);
275
+ },
276
+ d(d) {
277
+ d && (S(t), S(l), S(o)), s.d(), u && u.d(d);
278
+ }
279
+ };
280
+ }
281
+ function ft(n) {
282
+ let t, e = (
283
+ /*$_*/
284
+ (n[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
285
+ ), l;
286
+ return {
287
+ c() {
288
+ t = k("p"), l = L(e);
289
+ },
290
+ m(o, a) {
291
+ O(o, t, a), f(t, l);
292
+ },
293
+ p(o, a) {
294
+ a[0] & /*$_*/
295
+ 524288 && e !== (e = /*$_*/
296
+ (o[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && z(l, e);
297
+ },
298
+ d(o) {
299
+ o && S(t);
300
+ }
301
+ };
302
+ }
303
+ function dt(n) {
304
+ let t, e = (
305
+ /*$_*/
306
+ n[19]("otpExpiredMessage") + ""
307
+ ), l;
308
+ return {
309
+ c() {
310
+ t = k("p"), l = L(e), r(t, "class", "OtpNoticeMessage"), r(t, "role", "alert");
311
+ },
312
+ m(o, a) {
313
+ O(o, t, a), f(t, l);
314
+ },
315
+ p(o, a) {
316
+ a[0] & /*$_*/
317
+ 524288 && e !== (e = /*$_*/
318
+ o[19]("otpExpiredMessage") + "") && z(l, e);
319
+ },
320
+ d(o) {
321
+ o && S(t);
322
+ }
323
+ };
324
+ }
325
+ function mt(n) {
326
+ let t = (
327
+ /*$_*/
328
+ n[19]("popupMessage") + ""
329
+ ), e;
330
+ return {
331
+ c() {
332
+ e = L(t);
333
+ },
334
+ m(l, o) {
335
+ O(l, e, o);
336
+ },
337
+ p(l, o) {
338
+ o[0] & /*$_*/
339
+ 524288 && t !== (t = /*$_*/
340
+ l[19]("popupMessage") + "") && z(e, t);
341
+ },
342
+ d(l) {
343
+ l && S(e);
344
+ }
345
+ };
346
+ }
347
+ function ht(n) {
348
+ let t = (
349
+ /*$_*/
350
+ n[19]("popupMessageLastWarning") + ""
351
+ ), e;
352
+ return {
353
+ c() {
354
+ e = L(t);
355
+ },
356
+ m(l, o) {
357
+ O(l, e, o);
358
+ },
359
+ p(l, o) {
360
+ o[0] & /*$_*/
361
+ 524288 && t !== (t = /*$_*/
362
+ l[19]("popupMessageLastWarning") + "") && z(e, t);
363
+ },
364
+ d(l) {
365
+ l && S(e);
366
+ }
367
+ };
368
+ }
369
+ function Le(n) {
370
+ let t, e;
371
+ return {
372
+ c() {
373
+ t = k("p"), e = L(
374
+ /*errorMessage*/
375
+ n[8]
376
+ ), r(t, "class", "OtpErrorMessage"), r(t, "role", "alert");
377
+ },
378
+ m(l, o) {
379
+ O(l, t, o), f(t, e);
380
+ },
381
+ p(l, o) {
382
+ o[0] & /*errorMessage*/
383
+ 256 && z(
384
+ e,
385
+ /*errorMessage*/
386
+ l[8]
387
+ );
388
+ },
389
+ d(l) {
390
+ l && S(t);
391
+ }
392
+ };
393
+ }
394
+ function Ae(n) {
395
+ let t, e, l, o;
396
+ function a(u, d) {
397
+ return (
398
+ /*currentChannelTimer*/
399
+ u[17] > 0 ? wt : gt
400
+ );
401
+ }
402
+ let p = a(n), s = p(n);
403
+ return {
404
+ c() {
405
+ t = k("button"), s.c(), r(t, "class", "OtpButton"), t.disabled = e = !/*canSubmitChannel*/
406
+ n[18], Q(t, "disabled", !/*canSubmitChannel*/
407
+ n[18] || /*waitingForConfig*/
408
+ n[16]);
409
+ },
410
+ m(u, d) {
411
+ O(u, t, d), s.m(t, null), l || (o = ne(
412
+ t,
413
+ "click",
414
+ /*handleChannelSubmit*/
415
+ n[22]
416
+ ), l = !0);
417
+ },
418
+ p(u, d) {
419
+ p === (p = a(u)) && s ? s.p(u, d) : (s.d(1), s = p(u), s && (s.c(), s.m(t, null))), d[0] & /*canSubmitChannel*/
420
+ 262144 && e !== (e = !/*canSubmitChannel*/
421
+ u[18]) && (t.disabled = e), d[0] & /*canSubmitChannel, waitingForConfig*/
422
+ 327680 && Q(t, "disabled", !/*canSubmitChannel*/
423
+ u[18] || /*waitingForConfig*/
424
+ u[16]);
425
+ },
426
+ d(u) {
427
+ u && S(t), s.d(), l = !1, o();
428
+ }
429
+ };
430
+ }
431
+ function gt(n) {
432
+ let t = (
433
+ /*$_*/
434
+ n[19]("sendCode") + ""
435
+ ), e;
436
+ return {
437
+ c() {
438
+ e = L(t);
439
+ },
440
+ m(l, o) {
441
+ O(l, e, o);
442
+ },
443
+ p(l, o) {
444
+ o[0] & /*$_*/
445
+ 524288 && t !== (t = /*$_*/
446
+ l[19]("sendCode") + "") && z(e, t);
447
+ },
448
+ d(l) {
449
+ l && S(e);
450
+ }
451
+ };
452
+ }
453
+ function wt(n) {
454
+ let t = (
455
+ /*$_*/
456
+ n[19]("waitSeconds") + ""
457
+ ), e, l, o, a;
458
+ return {
459
+ c() {
460
+ e = L(t), l = L(" ("), o = L(
461
+ /*currentChannelTimer*/
462
+ n[17]
463
+ ), a = L("s)");
464
+ },
465
+ m(p, s) {
466
+ O(p, e, s), O(p, l, s), O(p, o, s), O(p, a, s);
467
+ },
468
+ p(p, s) {
469
+ s[0] & /*$_*/
470
+ 524288 && t !== (t = /*$_*/
471
+ p[19]("waitSeconds") + "") && z(e, t), s[0] & /*currentChannelTimer*/
472
+ 131072 && z(
473
+ o,
474
+ /*currentChannelTimer*/
475
+ p[17]
476
+ );
477
+ },
478
+ d(p) {
479
+ p && (S(e), S(l), S(o), S(a));
480
+ }
481
+ };
482
+ }
483
+ function bt(n) {
484
+ let t, e, l = (
485
+ /*$_*/
486
+ n[19]("timeRemaining") + ""
487
+ ), o, a, p = (
488
+ /*formatTime*/
489
+ n[23](
490
+ /*timeLeft*/
491
+ n[5]
492
+ ) + ""
493
+ ), s, u, d = (
494
+ /*$_*/
495
+ n[19]("minutes") + ""
496
+ ), _, b, T, M = Oe(
497
+ /*otp*/
498
+ n[2]
499
+ ), w = [];
500
+ for (let m = 0; m < M.length; m += 1)
501
+ w[m] = Ie(Te(n, M, m));
502
+ return {
503
+ c() {
504
+ t = k("div"), e = k("div"), o = L(l), a = x(), s = L(p), u = x(), _ = L(d), b = x(), T = k("div");
505
+ for (let m = 0; m < w.length; m += 1)
506
+ w[m].c();
507
+ r(e, "class", "OtpTimer"), r(T, "class", "OtpField"), r(t, "class", "OtpFieldWrapper");
508
+ },
509
+ m(m, y) {
510
+ O(m, t, y), f(t, e), f(e, o), f(e, a), f(e, s), f(e, u), f(e, _), f(t, b), f(t, T);
511
+ for (let C = 0; C < w.length; C += 1)
512
+ w[C] && w[C].m(T, null);
513
+ },
514
+ p(m, y) {
515
+ if (y[0] & /*$_*/
516
+ 524288 && l !== (l = /*$_*/
517
+ m[19]("timeRemaining") + "") && z(o, l), y[0] & /*timeLeft*/
518
+ 32 && p !== (p = /*formatTime*/
519
+ m[23](
520
+ /*timeLeft*/
521
+ m[5]
522
+ ) + "") && z(s, p), y[0] & /*$_*/
523
+ 524288 && d !== (d = /*$_*/
524
+ m[19]("minutes") + "") && z(_, d), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
525
+ 117458964) {
526
+ M = Oe(
527
+ /*otp*/
528
+ m[2]
529
+ );
530
+ let C;
531
+ for (C = 0; C < M.length; C += 1) {
532
+ const I = Te(m, M, C);
533
+ w[C] ? w[C].p(I, y) : (w[C] = Ie(I), w[C].c(), w[C].m(T, null));
534
+ }
535
+ for (; C < w.length; C += 1)
536
+ w[C].d(1);
537
+ w.length = M.length;
538
+ }
539
+ },
540
+ d(m) {
541
+ m && S(t), rt(w, m);
542
+ }
543
+ };
544
+ }
545
+ function _t(n) {
546
+ let t;
547
+ return {
548
+ c() {
549
+ t = k("div"), t.innerHTML = '<span class="OtpLoader"></span>', r(t, "class", "OtpLoaderContainer");
550
+ },
551
+ m(e, l) {
552
+ O(e, t, l);
553
+ },
554
+ p: _e,
555
+ d(e) {
556
+ e && S(t);
557
+ }
558
+ };
559
+ }
560
+ function Ie(n) {
561
+ let t, e, l, o = (
562
+ /*index*/
563
+ n[71]
564
+ ), a, p;
565
+ const s = () => (
566
+ /*input_binding*/
567
+ n[41](t, o)
568
+ ), u = () => (
569
+ /*input_binding*/
570
+ n[41](null, o)
571
+ );
572
+ function d(...b) {
573
+ return (
574
+ /*input_handler*/
575
+ n[42](
576
+ /*index*/
577
+ n[71],
578
+ ...b
579
+ )
580
+ );
581
+ }
582
+ function _(...b) {
583
+ return (
584
+ /*keydown_handler*/
585
+ n[43](
586
+ /*index*/
587
+ n[71],
588
+ ...b
589
+ )
590
+ );
591
+ }
592
+ return {
593
+ c() {
594
+ t = k("input"), r(t, "id", `otp-input-${/*index*/
595
+ n[71]}`), r(t, "type", "text"), r(t, "class", e = `otp-box ${/*config*/
596
+ n[4].inputLength % 2 === 0 && /*index*/
597
+ n[71] === /*config*/
598
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), r(t, "maxlength", 1), t.value = l = /*char*/
599
+ n[69], r(t, "inputmode", "numeric"), t.disabled = /*inputDisabled*/
600
+ n[11], r(t, "autocomplete", "off");
601
+ },
602
+ m(b, T) {
603
+ O(b, t, T), s(), a || (p = [
604
+ ne(t, "input", d),
605
+ ne(t, "keydown", _),
606
+ ne(
607
+ t,
608
+ "paste",
609
+ /*handleOnPasteOtp*/
610
+ n[24]
611
+ )
612
+ ], a = !0);
613
+ },
614
+ p(b, T) {
615
+ n = b, T[0] & /*config*/
616
+ 16 && e !== (e = `otp-box ${/*config*/
617
+ n[4].inputLength % 2 === 0 && /*index*/
618
+ n[71] === /*config*/
619
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(t, "class", e), T[0] & /*otp*/
620
+ 4 && l !== (l = /*char*/
621
+ n[69]) && t.value !== l && (t.value = l), T[0] & /*inputDisabled*/
622
+ 2048 && (t.disabled = /*inputDisabled*/
623
+ n[11]), o !== /*index*/
624
+ n[71] && (u(), o = /*index*/
625
+ n[71], s());
626
+ },
627
+ d(b) {
628
+ b && S(t), u(), a = !1, Re(p);
629
+ }
630
+ };
631
+ }
632
+ function yt(n) {
633
+ let t, e = (
634
+ /*$_*/
635
+ n[19]("submit") + ""
636
+ ), l, o, a, p;
637
+ return {
638
+ c() {
639
+ t = k("button"), l = L(e), r(t, "class", "OtpButton"), t.disabled = o = /*otp*/
640
+ n[2].join("").length !== /*config*/
641
+ n[4].inputLength || /*isSubmitting*/
642
+ n[13] || /*maxAttempts*/
643
+ n[15];
644
+ },
645
+ m(s, u) {
646
+ O(s, t, u), f(t, l), a || (p = ne(
647
+ t,
648
+ "click",
649
+ /*submitOtp*/
650
+ n[29]
651
+ ), a = !0);
652
+ },
653
+ p(s, u) {
654
+ u[0] & /*$_*/
655
+ 524288 && e !== (e = /*$_*/
656
+ s[19]("submit") + "") && z(l, e), u[0] & /*otp, config, isSubmitting, maxAttempts*/
657
+ 40980 && o !== (o = /*otp*/
658
+ s[2].join("").length !== /*config*/
659
+ s[4].inputLength || /*isSubmitting*/
660
+ s[13] || /*maxAttempts*/
661
+ s[15]) && (t.disabled = o);
662
+ },
663
+ d(s) {
664
+ s && S(t), a = !1, p();
665
+ }
666
+ };
667
+ }
668
+ function kt(n) {
669
+ let t, e = (
670
+ /*$_*/
671
+ n[19]("resendOtp") + ""
672
+ ), l, o, a;
673
+ return {
674
+ c() {
675
+ t = k("button"), l = L(e), r(t, "class", "OtpButton");
676
+ },
677
+ m(p, s) {
678
+ O(p, t, s), f(t, l), o || (a = ne(
679
+ t,
680
+ "click",
681
+ /*handleResendOtp*/
682
+ n[27]
683
+ ), o = !0);
684
+ },
685
+ p(p, s) {
686
+ s[0] & /*$_*/
687
+ 524288 && e !== (e = /*$_*/
688
+ p[19]("resendOtp") + "") && z(l, e);
689
+ },
690
+ d(p) {
691
+ p && S(t), o = !1, a();
692
+ }
693
+ };
694
+ }
695
+ function vt(n) {
696
+ let t;
697
+ function e(a, p) {
698
+ return (
699
+ /*hasConfigErrors*/
700
+ a[7] ? pt : ct
701
+ );
702
+ }
703
+ let l = e(n), o = l(n);
704
+ return {
705
+ c() {
706
+ t = k("div"), o.c(), r(t, "class", "OtpContent");
707
+ },
708
+ m(a, p) {
709
+ O(a, t, p), o.m(t, null), n[44](t);
710
+ },
711
+ p(a, p) {
712
+ l === (l = e(a)) && o ? o.p(a, p) : (o.d(1), o = l(a), o && (o.c(), o.m(t, null)));
713
+ },
714
+ i: _e,
715
+ o: _e,
716
+ d(a) {
717
+ a && S(t), o.d(), n[44](null);
718
+ }
719
+ };
720
+ }
721
+ function Ct(n, t, e) {
722
+ let l, o, a;
723
+ $e(n, nt, (i) => e(19, a = i));
724
+ let { clientstyling: p = "" } = t, { clientstylingurl: s = "" } = t, { mbsource: u } = t, { lang: d = "en" } = t, { endpoint: _ } = t, { session: b } = t, { translationurl: T } = t, { templateid: M } = t, w = [], m = !0, y = null, C = 0, I = "", q = "", W = !1, j = !1, R = "", le = "", F = "", Z = !1, ie = !1, $ = !1, E = "", A = {}, V = null, re = !1, se = !1, ae = "", U, K = [], B = null, ee = 0, G = !1, ce = !1;
725
+ const ue = { SMS: "sms", EMAIL: "email" }, pe = {
726
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
727
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
728
+ MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
729
+ };
730
+ Object.keys(Me).forEach((i) => {
731
+ Se(i, Me[i]);
732
+ });
733
+ const fe = () => {
734
+ st(d);
735
+ }, X = () => {
736
+ fetch(T).then((i) => i.json()).then((i) => {
737
+ Object.keys(i).forEach((h) => {
738
+ Se(h, i[h]);
739
+ });
740
+ }).catch((i) => {
741
+ console.log(i);
742
+ });
743
+ }, P = async (i) => {
744
+ if (i.detail?.["x-step-up-required"]) {
745
+ if (e(7, j = !1), e(6, W = !1), e(8, R = ""), le = i.detail["x-step-up-token"], F = i.detail.flow, !le || !F) {
746
+ e(3, m = !1), e(7, j = !0), e(8, R = a("configError"));
747
+ return;
748
+ }
749
+ e(12, re = !1), e(3, m = !1);
750
+ }
751
+ }, me = () => {
752
+ B && (clearInterval(B), B = null), V && (clearInterval(V), V = null), e(6, W = !1), e(7, j = !1), e(8, R = ""), e(10, ie = !1), e(2, w = []), e(4, y = null), e(3, m = !0), e(0, E = ""), e(12, re = !1), e(38, A = {});
753
+ }, te = () => {
754
+ me();
755
+ }, D = () => new Promise((i, h) => {
756
+ const g = new URL(`${_}/api/pam/v1/mfa/challenge/${le}`), N = new Headers();
757
+ N.append("accept", "application/json"), N.append("Content-Type", "application/json"), N.append("X-SessionId", `${b}`), e(16, ce = !0);
758
+ const be = {
759
+ method: "PATCH",
760
+ headers: N,
761
+ body: JSON.stringify({
762
+ channel: E,
763
+ templateId: M
764
+ })
765
+ };
766
+ fetch(g, be).then((Ce) => Ce.json()).then(() => {
767
+ e(15, G = !1), c(), v(), i();
768
+ }).catch((Ce) => {
769
+ h();
770
+ });
771
+ }), he = () => {
772
+ V && clearInterval(V), V = setInterval(
773
+ () => {
774
+ const i = { ...A };
775
+ let h = !1;
776
+ Object.keys(i).forEach((g) => {
777
+ i[g] > 0 && (i[g]--, h = !0);
778
+ }), e(38, A = i), !h && V && (clearInterval(V), V = null);
779
+ },
780
+ 1e3
781
+ );
782
+ }, Y = (i) => {
783
+ e(0, E = i);
784
+ }, H = async () => {
785
+ if (!(!E || A[E] && A[E] > 0)) {
786
+ e(3, m = !0), M && M.startsWith("2fa-") && e(30, M = `2fa-${E}`);
787
+ try {
788
+ await D(), await we(), e(38, A = {
789
+ ...A,
790
+ [E]: 30
791
+ }), he(), e(12, re = !0), c(), v();
792
+ } catch (i) {
793
+ console.error("Error submitting channel:", i), e(6, W = !0), e(8, R = a("submissionError"));
794
+ } finally {
795
+ e(3, m = !1);
796
+ }
797
+ }
798
+ }, c = () => {
799
+ const i = new Date(I), h = new Date(q), g = /* @__PURE__ */ new Date(), N = h.getTime() - g.getTime();
800
+ ee = i.getTime() - N;
801
+ const de = Date.now(), be = Math.max(0, Math.floor((ee - de) / 1e3));
802
+ e(5, C = be);
803
+ }, v = () => {
804
+ B && clearInterval(B), B = setInterval(
805
+ () => {
806
+ const i = Date.now(), h = Math.max(0, Math.floor((ee - i) / 1e3));
807
+ e(5, C = h), e(11, $ = h <= 0), h <= 0 && (clearInterval(B), B = null, e(9, Z = !0), e(6, W = !1), e(10, ie = !1));
808
+ },
809
+ 1e3
810
+ );
811
+ }, xe = (i) => {
812
+ const h = Math.floor(i / 60), g = i % 60;
813
+ return `${h.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`;
814
+ }, ge = (i, h) => {
815
+ const g = [...w];
816
+ g[i] = h.toUpperCase(), e(2, w = g), g.join("") !== ae && e(13, se = !1);
817
+ }, ze = (i) => {
818
+ i.preventDefault();
819
+ const g = (i.clipboardData?.getData("text")?.trim() || "").slice(0, y.inputLength).split("");
820
+ e(2, w = [...g, ...Array(y.inputLength - g.length).fill("")]), K[g.length]?.focus(), g.length === y.inputLength && ve();
821
+ }, ye = (i, h) => {
822
+ const g = i.target, N = g.value;
823
+ /^[a-z0-9]$/i.test(N) && (ge(h, N), K[h + 1]?.focus()), g.value = "";
824
+ }, ke = (i, h) => {
825
+ const g = i.key, N = i.ctrlKey || i.metaKey;
826
+ if (/^[a-z0-9]$/i.test(g)) {
827
+ if (N && g.toLowerCase() === "v")
828
+ return;
829
+ i.preventDefault(), ge(h, g), K[h + 1]?.focus();
830
+ } else
831
+ g === "Backspace" && (i.preventDefault(), w[h] !== "" && ge(h, ""), K[h - 1]?.focus());
832
+ }, Pe = () => {
833
+ F == "stateful" && (D(), e(9, Z = !1));
834
+ const i = new CustomEvent("otpResendRequested");
835
+ window.dispatchEvent(i);
836
+ }, De = (i) => {
837
+ window.dispatchEvent(new CustomEvent(
838
+ "otpSubmitted",
839
+ {
840
+ detail: {
841
+ code: i,
842
+ maxAttempts: y.maxValidationAttempts,
843
+ validatedAttempts: y.numberOfValidateAttempts
844
+ }
845
+ }
846
+ ));
847
+ }, je = async (i) => {
848
+ const h = new URL(`/api/nwa/api/v1/mfa/challenge/${le}/validate`, _);
849
+ h.searchParams.append("input", i);
850
+ try {
851
+ const g = await fetch(h.href, { method: "POST" });
852
+ if (g.status === 200) {
853
+ Be();
854
+ return;
855
+ }
856
+ const N = await g.json();
857
+ throw new Error(N.message);
858
+ } catch (g) {
859
+ if (await we(), g.message === pe.INTERNAL_SERVER_ERROR) {
860
+ if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
861
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
862
+ {
863
+ type: "WidgetNotification",
864
+ data: {
865
+ type: "error",
866
+ message: a("accountBlocked")
867
+ }
868
+ },
869
+ window.location.href
870
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
871
+ return;
872
+ }
873
+ e(6, W = !0), e(8, R = a("invalidOtp")), we();
874
+ return;
875
+ }
876
+ g.message === pe.MAX_INVALIDATE && (e(6, W = !0), e(8, R = a("invalidOtp"))), g.details === pe.MAX_ATTEMPTS_EXCEEDED && e(15, G = !0), console.error("OTP submission failed:", g), e(6, W = !0), e(8, R = a("submissionError"));
877
+ } finally {
878
+ e(3, m = !1);
879
+ }
880
+ }, Be = () => {
881
+ window.dispatchEvent(new CustomEvent(
882
+ "otpSuccess",
883
+ {
884
+ detail: {
885
+ message: "User successfully authenticated"
886
+ }
887
+ }
888
+ ));
889
+ }, He = () => {
890
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
891
+ }, ve = async () => {
892
+ if (w.join("").length !== y.inputLength) {
893
+ e(6, W = !0), e(8, R = a("invalidOtp"));
894
+ return;
895
+ }
896
+ const i = w.join("");
897
+ e(13, se = !0), ae = i, e(3, m = !0), e(6, W = !1), e(8, R = ""), F === "stateless" && De(i), F === "stateful" && await je(i);
898
+ }, we = async () => {
899
+ if (_)
900
+ try {
901
+ e(3, m = !0);
902
+ const i = new URL(`/api/nwa/api/v1/mfa/challenge/${le}/config`, _), h = await fetch(i.href), g = await h.json();
903
+ if (h.ok)
904
+ e(4, y = g), e(2, w = Array(y.inputLength).fill("")), e(9, Z = !1), I = y.expirationTime, q = y.serverTime, y.numberOfValidateAttempts !== 0 && (e(6, W = !0), e(8, R = a("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && e(10, ie = !0), e(3, m = !1), c(), v(), e(16, ce = !1);
905
+ else if (g && g.details === pe.MAX_ATTEMPTS_EXCEEDED)
906
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
907
+ else {
908
+ const N = g && g.message || `Failed to load config. Status: ${h.status}`;
909
+ throw new Error(N);
910
+ }
911
+ } catch (i) {
912
+ e(3, m = !1), e(7, j = !0), e(8, R = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", i);
913
+ }
914
+ };
915
+ et(() => (window.addEventListener("stepUpAuthRequired", P, !1), window.addEventListener("closePopup", te, !1), () => {
916
+ window.removeEventListener("stepUpAuthRequired", P), window.removeEventListener("closePopup", te, !1), B && clearInterval(B), V && clearInterval(V);
917
+ }));
918
+ const Ne = () => Y(ue.SMS), Ve = () => Y(ue.EMAIL);
919
+ function We(i, h) {
920
+ Ee[i ? "unshift" : "push"](() => {
921
+ K[h] = i, e(14, K);
922
+ });
923
+ }
924
+ const Fe = (i, h) => ye(h, i), Ue = (i, h) => ke(h, i);
925
+ function qe(i) {
926
+ Ee[i ? "unshift" : "push"](() => {
927
+ U = i, e(1, U);
928
+ });
929
+ }
930
+ return n.$$set = (i) => {
931
+ "clientstyling" in i && e(31, p = i.clientstyling), "clientstylingurl" in i && e(32, s = i.clientstylingurl), "mbsource" in i && e(33, u = i.mbsource), "lang" in i && e(34, d = i.lang), "endpoint" in i && e(35, _ = i.endpoint), "session" in i && e(36, b = i.session), "translationurl" in i && e(37, T = i.translationurl), "templateid" in i && e(30, M = i.templateid);
932
+ }, n.$$.update = () => {
933
+ n.$$.dirty[0] & /*customStylingContainer*/
934
+ 2 | n.$$.dirty[1] & /*clientstyling*/
935
+ 1 && p && U && lt(U, p), n.$$.dirty[0] & /*customStylingContainer*/
936
+ 2 | n.$$.dirty[1] & /*clientstylingurl*/
937
+ 2 && s && U && ot(U, s), n.$$.dirty[0] & /*customStylingContainer*/
938
+ 2 | n.$$.dirty[1] & /*mbsource*/
939
+ 4 && u && U && tt(U, `${u}.Style`), n.$$.dirty[1] & /*lang*/
940
+ 8 && d && fe(), n.$$.dirty[1] & /*lang, translationurl*/
941
+ 72 && d && T && X(), n.$$.dirty[0] & /*selectedChannel*/
942
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
943
+ 128 && e(18, l = E && (!A[E] || A[E] === 0)), n.$$.dirty[0] & /*selectedChannel*/
944
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
945
+ 128 && e(17, o = E && A[E] || 0);
946
+ }, [
947
+ E,
948
+ U,
949
+ w,
950
+ m,
951
+ y,
952
+ C,
953
+ W,
954
+ j,
955
+ R,
956
+ Z,
957
+ ie,
958
+ $,
959
+ re,
960
+ se,
961
+ K,
962
+ G,
963
+ ce,
964
+ o,
965
+ l,
966
+ a,
967
+ ue,
968
+ Y,
969
+ H,
970
+ xe,
971
+ ze,
972
+ ye,
973
+ ke,
974
+ Pe,
975
+ He,
976
+ ve,
977
+ M,
978
+ p,
979
+ s,
980
+ u,
981
+ d,
982
+ _,
983
+ b,
984
+ T,
985
+ A,
986
+ Ne,
987
+ Ve,
988
+ We,
989
+ Fe,
990
+ Ue,
991
+ qe
992
+ ];
993
+ }
994
+ class Et extends Ge {
995
+ constructor(t) {
996
+ super(), Ye(
997
+ this,
998
+ t,
999
+ Ct,
1000
+ vt,
1001
+ Qe,
1002
+ {
1003
+ clientstyling: 31,
1004
+ clientstylingurl: 32,
1005
+ mbsource: 33,
1006
+ lang: 34,
1007
+ endpoint: 35,
1008
+ session: 36,
1009
+ translationurl: 37,
1010
+ templateid: 30
1011
+ },
1012
+ at,
1013
+ [-1, -1, -1]
1014
+ );
1015
+ }
1016
+ get clientstyling() {
1017
+ return this.$$.ctx[31];
1018
+ }
1019
+ set clientstyling(t) {
1020
+ this.$$set({ clientstyling: t }), oe();
1021
+ }
1022
+ get clientstylingurl() {
1023
+ return this.$$.ctx[32];
1024
+ }
1025
+ set clientstylingurl(t) {
1026
+ this.$$set({ clientstylingurl: t }), oe();
1027
+ }
1028
+ get mbsource() {
1029
+ return this.$$.ctx[33];
1030
+ }
1031
+ set mbsource(t) {
1032
+ this.$$set({ mbsource: t }), oe();
1033
+ }
1034
+ get lang() {
1035
+ return this.$$.ctx[34];
1036
+ }
1037
+ set lang(t) {
1038
+ this.$$set({ lang: t }), oe();
1039
+ }
1040
+ get endpoint() {
1041
+ return this.$$.ctx[35];
1042
+ }
1043
+ set endpoint(t) {
1044
+ this.$$set({ endpoint: t }), oe();
1045
+ }
1046
+ get session() {
1047
+ return this.$$.ctx[36];
1048
+ }
1049
+ set session(t) {
1050
+ this.$$set({ session: t }), oe();
1051
+ }
1052
+ get translationurl() {
1053
+ return this.$$.ctx[37];
1054
+ }
1055
+ set translationurl(t) {
1056
+ this.$$set({ translationurl: t }), oe();
1057
+ }
1058
+ get templateid() {
1059
+ return this.$$.ctx[30];
1060
+ }
1061
+ set templateid(t) {
1062
+ this.$$set({ templateid: t }), oe();
1063
+ }
1064
+ }
1065
+ Je(Et, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1066
+ export {
1067
+ Et as default
1068
+ };