choco-one-click-payment 1.1.46 → 1.1.47

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.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.choco-one-click-widget{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999999;font-family:Sirius,sans-serif;--choco-widget-accent-color: #2F2F2F;pointer-events:none}.choco-one-click-widget--embedded{position:static;top:auto;left:auto;right:auto;bottom:auto;z-index:auto;pointer-events:auto;min-height:1px}.choco-one-click-widget--embedded .choco-widget-bottom-bar{position:static;box-shadow:none;border-radius:24px}.choco-one-click-widget--embedded .choco-widget-payment-sheet{position:fixed}.choco-one-click-widget *{box-sizing:border-box;font-family:Sirius,sans-serif}.choco-one-click-widget .choco-widget-bottom-bar{opacity:0;transform:translateY(16px)}.choco-one-click-widget .choco-widget-balance-section,.choco-one-click-widget .choco-widget-payment-info{opacity:0;transform:translateY(8px)}.choco-one-click-widget--visible .choco-widget-bottom-bar,.choco-one-click-widget--visible .choco-widget-balance-section,.choco-one-click-widget--visible .choco-widget-payment-info{opacity:1;transform:translateY(0)}.choco-widget-bottom-bar{position:absolute;bottom:0;left:0;right:0;background:#fff;border-radius:24px 24px 0 0;padding:16px;box-shadow:0 -4px 20px #0000001a;transition:transform .24s cubic-bezier(.4,0,.2,1),opacity .2s ease;pointer-events:auto}.choco-widget-payment-info{display:flex;flex-direction:column;gap:12px;align-items:stretch;transition:transform .22s ease,opacity .2s ease}.choco-widget-payment-info-main{display:flex;gap:12px;align-items:center}.choco-widget-payment-method{gap:12px;background:#f1f2f7;border-radius:16px;padding:5px 8px;cursor:pointer;transition:background .2s ease;border:none;font-family:inherit;text-align:left;width:100%;position:relative;height:46px}.choco-widget-payment-method:disabled{cursor:not-allowed;pointer-events:none;opacity:.5}.choco-widget-payment-method.google_pay,.choco-widget-payment-method.apple_pay{max-width:140px}.choco-widget-method-icon-placeholder{font-size:24px}.choco-widget-method-details{flex:1}.choco-widget-method-label{font-size:14px;color:#000}.choco-widget-method-value{font-size:14px;font-weight:600;color:#000;display:flex;align-items:center;gap:4px}.choco-widget-method-icon-wrapper svg{display:block;width:100%;max-width:29px;max-height:18px;margin-top:2px}.choco-widget-method-icon-wrapper:empty{display:none}.choco-widget-method-icon-wrapper.google_pay svg{height:17px;max-width:35px;border:1px solid #3C4043;padding:3px 4px 2px;border-radius:8px}.choco-widget-method-name{font-size:14px;font-weight:700}.choco-widget-method-name.google_pay,.choco-widget-method-name.apple_pay{display:none}.choco-widget-method-chevron{position:absolute;right:5px;top:0;bottom:0;margin:auto 0;width:24px;height:24px}.choco-widget-freedom-card-btn{width:100%;height:46px;padding:0 13px;background:linear-gradient(to right,#17678d,#00ca82);border:none;border-radius:16px;font-size:16px;font-weight:700;font-family:inherit;color:#fff;cursor:pointer}.choco-widget-freedom-card-btn:disabled{opacity:.5;pointer-events:none}.choco-widget-pay-button{background:var(--choco-widget-accent-color);color:#fff;border:none;border-radius:16px;height:46px;padding:0 16px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease;white-space:nowrap;width:100%;overflow:hidden}.choco-widget-pay-button--loading{cursor:not-allowed;pointer-events:none;position:relative}.choco-widget-pay-button--loading:before{content:"";display:block;width:16px;height:16px;border:2px solid #ffffff;border-top:2px solid transparent;border-radius:50%;animation:choco-spin 1s linear infinite;position:absolute;left:0;right:0;margin:0 auto;z-index:2}.choco-widget-pay-button--loading:after{content:"";display:block;width:100%;height:100%;background:#2f2f2f;position:absolute;left:0;top:0}.choco-widget-pay-button:disabled{opacity:.5;pointer-events:none}.choco-widget-pay-button--hidden{display:none}.choco-widget-google-pay-amount{min-width:124px;height:46px;display:flex;flex-direction:column;justify-content:center;text-align:right;width:100%}.choco-widget-google-pay-amount--hidden{display:none}.choco-widget-google-pay-amount-label{font-size:20px;font-weight:700;line-height:24px;color:#1d1d1d}.choco-widget-google-pay-amount-value{font-size:14px;line-height:18px;color:#1d1d1d;white-space:nowrap;opacity:.5}.choco-widget-google-pay-amount-value--hidden{display:none}.choco-widget-google-pay-amount-value-number{text-decoration:line-through}.choco-widget-google-pay-row--hidden{display:none}.choco-widget-wallet-blocked{pointer-events:none;opacity:.6}.choco-widget-google-pay-button-slot{width:100%}.choco-widget-google-pay-button-slot>button{width:100%!important;height:52px;min-height:52px;border-radius:12px!important;font-size:16px!important}.choco-widget-apple-pay-row--hidden{display:none}.choco-widget-apple-pay-button-slot{width:100%}.choco-widget-apple-pay-button-wrapper{position:relative;width:100%;height:52px}.choco-widget-apple-pay-button{width:100%;height:52px;min-height:52px;border:0;border-radius:12px;cursor:pointer;background:#000;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 16px}.choco-widget-apple-pay-button--native{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:52px;opacity:.01;z-index:2}.choco-widget-apple-pay-button-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;gap:8px;background:#000;border-radius:12px;pointer-events:none;z-index:1}.choco-widget-apple-pay-button-text{font-size:16px;line-height:20px;font-weight:600;color:#fff}.choco-widget-apple-pay-button-icon{display:inline-flex;align-items:center;justify-content:center}.choco-widget-payment-sheet{position:absolute;bottom:0;left:0;right:0;top:0;background:#00000080;display:flex;align-items:flex-end;opacity:0;pointer-events:none;transition:opacity .3s ease}.choco-widget-payment-sheet--open{opacity:1;pointer-events:auto}.choco-widget-payment-sheet--open .choco-widget-sheet-content{transform:translateY(0)}.choco-widget-sheet-content{background:#fff;border-radius:24px 24px 0 0;width:100%;max-height:70vh;overflow-y:auto;transform:translateY(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);padding:8px 16px 16px;position:relative;will-change:transform}.choco-widget-sheet-content--dragging{transition:none}.choco-widget-sheet-grabber{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;margin-bottom:8px;-webkit-user-select:none;user-select:none}.choco-widget-sheet-grabber:active{cursor:grabbing}.choco-widget-sheet-grabber:before{content:"";width:72px;height:6px;background:#e5e5e7;border-radius:42px}.choco-widget-sheet-content{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.choco-widget-sheet-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;position:relative}.choco-widget-sheet-title{font-size:20px;font-weight:700;color:#000;margin:0;flex:1;text-align:center}.choco-widget-payment-sheet--edit .choco-widget-sheet-title{padding-left:30px}.choco-widget-payment-sheet--no-cards .choco-widget-sheet-title{padding-right:30px}.choco-widget-payment-sheet--delete-confirm .choco-widget-sheet-title{padding:0}.choco-widget-sheet-button{background:none;border:none;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.choco-widget-sheet-button svg{color:#000}.choco-widget-sheet-delete-confirm{display:none;padding-top:16px}.choco-widget-payment-sheet--delete-confirm .choco-widget-payment-methods,.choco-widget-payment-sheet--delete-confirm .choco-widget-cashback-section{display:none!important}.choco-widget-payment-sheet--delete-confirm .choco-widget-sheet-delete-confirm{display:block}.choco-widget-sheet-delete-confirm-text{margin:0 0 24px;font-size:16px;line-height:1.4;color:#242424;text-align:center}.choco-widget-sheet-delete-confirm-actions{display:flex;gap:12px}.choco-widget-delete-confirm-btn{flex:1;padding:14px 20px;font-size:16px;font-weight:600;font-family:inherit;border-radius:16px;border:none;cursor:pointer;transition:background .2s ease,opacity .2s ease}.choco-widget-delete-confirm-btn--cancel{background:#f1f2f7;color:#242424}.choco-widget-delete-confirm-btn--delete{background:var(--choco-widget-accent-color);color:#fff}.choco-widget-delete-confirm-btn--loading{cursor:not-allowed;pointer-events:none;position:relative}.choco-widget-sheet-delete-confirm-actions.choco-widget-sheet-delete-confirm-actions--loading .choco-widget-delete-confirm-btn{pointer-events:none;cursor:not-allowed;opacity:.7}.choco-widget-delete-confirm-btn--delete.choco-widget-delete-confirm-btn--loading:before{content:"";display:block;width:16px;height:16px;border:2px solid #ffffff;border-top:2px solid transparent;border-radius:50%;animation:choco-spin 1s linear infinite;position:absolute;left:0;right:0;margin:0 auto;z-index:2}.choco-widget-delete-confirm-btn--delete.choco-widget-delete-confirm-btn--loading:after{content:"";display:block;width:100%;height:100%;background:#cc3434;position:absolute;left:0;top:0;border-radius:16px}.choco-widget-add-card-sheet{align-items:stretch}.choco-widget-add-card-sheet .choco-widget-add-card-sheet-content{max-height:none;height:100%;display:flex;flex-direction:column;transform:none;border-radius:0;padding:0}.choco-widget-add-card-sheet--open .choco-widget-add-card-sheet-content{transform:none}.choco-widget-add-card-sheet .choco-widget-sheet-header{flex-shrink:0;margin-bottom:0;padding:12px 0;border-bottom:1px solid #eee}.choco-widget-add-card-iframe-wrapper{flex:1;min-height:0;background:#fff}.choco-widget-add-card-iframe{width:100%;height:100%;border:none;display:block}.choco-widget-balance-section{margin-bottom:12px;padding:12px 8px;background:#f1f2f7;border-radius:12px;transition:transform .22s ease,opacity .2s ease}.choco-widget-balance-section.disabled{opacity:.5;pointer-events:none}.choco-widget-balance-toggle{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:4px 0}.choco-widget-balance-toggle:last-child{margin-bottom:0}.choco-widget-balance-toggle--disabled{opacity:.5;pointer-events:none}.choco-widget-balance-info{display:flex;align-items:center;gap:12px}.choco-widget-balance-text{display:flex;flex-direction:column}.choco-widget-balance-label-wrapper{display:flex;align-items:center;gap:8px}.choco-widget-balance-label{font-size:16px;font-weight:500}.choco-widget-balance-sublabel{font-size:12px;color:#767485;margin-top:2px}.choco-widget-balance-icon{width:22px;height:22px}.choco-widget-balance-amount{font-size:16px;font-weight:500;color:#000;white-space:nowrap}.choco-widget-toggle{position:relative;display:inline-block;width:42px;height:26px}.choco-widget-toggle input{opacity:0;width:0;height:0}.choco-widget-toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#d4d3df;transition:.3s;border-radius:28px}.choco-widget-toggle-slider:before{position:absolute;content:"";height:22px;width:22px;left:2px;bottom:0;top:0;margin:auto;background-color:#fff;transition:.3s;border-radius:50%}.choco-widget-toggle input:checked+.choco-widget-toggle-slider{background-color:var(--choco-widget-accent-color)}.choco-widget-toggle input:checked+.choco-widget-toggle-slider:before{transform:translate(16px)}.choco-widget-cashback-section{margin-top:20px;padding-top:20px;border-top:1px solid #f0f0f0}.choco-widget-cashback-info{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#fff5ee;border-radius:12px;font-size:14px;color:#ff6b00}.choco-widget-cashback-icon{font-size:20px}.choco-widget-cashback-text strong{font-weight:700}.choco-widget-payment-methods{display:flex;flex-direction:column;gap:8px}.choco-widget-method-item{display:flex;align-items:center;gap:12px;padding:10px 0;cursor:pointer;transition:all .2s ease;border:2px solid transparent;width:100%;border:0;background:none;text-align:left;font-family:inherit;font-size:inherit}.choco-widget-method-item-icon-wrapper{width:37px}.choco-widget-method-item-icon-wrapper svg{display:block;width:100%;max-width:29px;height:29px;margin:0 auto}.choco-widget-method-item-icon-wrapper.google_pay{outline:1px solid #3C4043;padding:3px 5px 2px;border-radius:15px}.choco-widget-method-item-icon-wrapper.google_pay svg{height:15px;max-width:29px}.choco-widget-method-item-label{flex:1;font-size:16px;color:#000}.choco-widget-method-item-check,.choco-widget-method-item-trash-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:6px;margin:-6px 0 -6px 6px;background:none;border:none;cursor:pointer;border-radius:8px;-webkit-tap-highlight-color:transparent}.choco-widget-method-item-check{height:30px;width:30px}.choco-widget-method-item-trash-btn:hover{background:#cc343414}.choco-widget-method-item-trash{flex-shrink:0;width:20px;height:20px}.choco-widget-bottom-bar-prerender{position:absolute;bottom:0;left:0;right:0;background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -4px 20px #0000001a;transition:transform .3s cubic-bezier(.4,0,.2,1);height:78px}.choco-widget-payment-loading{width:30px;height:30px;animation:choco-spin 1s linear infinite;border:3px solid var(--choco-widget-accent-color);border-top:3px solid transparent;border-radius:50%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}@keyframes choco-spin{to{transform:rotate(360deg)}}@keyframes choco-fade-in{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@media(max-width:768px){.choco-widget-bottom-bar{padding:16px 16px 20px}.choco-widget-sheet-content{max-height:80vh}.choco-widget-sheet-title{font-size:18px}.choco-widget-method-item-label{font-size:17px}}@media(max-width:768px)and (min-height:812px){.choco-widget-bottom-bar,.choco-widget-sheet-content{padding-bottom:calc(20px + env(safe-area-inset-bottom,20px))}}@supports (padding: env(safe-area-inset-bottom)){.choco-widget-bottom-bar{padding-bottom:calc(16px + env(safe-area-inset-bottom))}.choco-widget-sheet-content{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- const mr = {
2
+ const Cr = {
3
3
  ru: {
4
4
  paymentMethod: "Способ оплаты",
5
5
  selectMethod: "Выберите метод",
@@ -156,42 +156,42 @@ const mr = {
156
156
  errorWidgetInit: "ვიჯეტის ინიციალიზაციის შეცდომა",
157
157
  errorPaymentProcess: "გადახდის შეცდომა"
158
158
  }
159
- }, Cr = {
159
+ }, br = {
160
160
  KZT: "₸",
161
161
  GEL: "₾"
162
162
  };
163
- function br(e) {
163
+ function Er(e) {
164
164
  return e === "production" ? "https://api-proxy.choco.kz" : "https://api-proxy.chocodev.kz";
165
165
  }
166
166
  let Le;
167
- const Er = new Uint8Array(16);
168
- function vr() {
167
+ const vr = new Uint8Array(16);
168
+ function Ir() {
169
169
  if (!Le && (Le = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Le))
170
170
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
171
- return Le(Er);
171
+ return Le(vr);
172
172
  }
173
173
  const H = [];
174
174
  for (let e = 0; e < 256; ++e)
175
175
  H.push((e + 256).toString(16).slice(1));
176
- function Ir(e, t = 0) {
176
+ function Br(e, t = 0) {
177
177
  return H[e[t + 0]] + H[e[t + 1]] + H[e[t + 2]] + H[e[t + 3]] + "-" + H[e[t + 4]] + H[e[t + 5]] + "-" + H[e[t + 6]] + H[e[t + 7]] + "-" + H[e[t + 8]] + H[e[t + 9]] + "-" + H[e[t + 10]] + H[e[t + 11]] + H[e[t + 12]] + H[e[t + 13]] + H[e[t + 14]] + H[e[t + 15]];
178
178
  }
179
- const Br = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Yt = {
180
- randomUUID: Br
179
+ const Sr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Yt = {
180
+ randomUUID: Sr
181
181
  };
182
182
  function Ve(e, t, n) {
183
183
  if (Yt.randomUUID && !e)
184
184
  return Yt.randomUUID();
185
185
  e = e || {};
186
- const r = e.random || (e.rng || vr)();
187
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Ir(r);
186
+ const r = e.random || (e.rng || Ir)();
187
+ return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Br(r);
188
188
  }
189
189
  const Vt = "choco_device_id";
190
190
  function $(e, t = "ru", n = "KZT") {
191
191
  const r = Number(e), o = t === "ru" ? "ru-RU" : "en-US";
192
- return `${r.toLocaleString(o)} ${Cr[n]}`;
192
+ return `${r.toLocaleString(o)} ${br[n]}`;
193
193
  }
194
- function Rn() {
194
+ function On() {
195
195
  let e = localStorage.getItem(Vt);
196
196
  return e || (e = Ve(), localStorage.setItem(Vt, e)), e;
197
197
  }
@@ -200,7 +200,7 @@ function Je() {
200
200
  const e = window.safari !== void 0, t = window.navigator.userAgent || "", n = !!t.match(/iPad/i) || !!t.match(/iPhone/i), r = !!t.match(/WebKit/i), o = n && r && !t.match(/CriOS/i);
201
201
  return e || o;
202
202
  }
203
- function On() {
203
+ function Nn() {
204
204
  if (typeof navigator > "u") return 0;
205
205
  const e = navigator.userAgent || "", t = e.indexOf("OS");
206
206
  return (e.indexOf("iPhone") > -1 || e.indexOf("iPad") > -1) && t > -1 ? Number(e.substring(t + 3, t + 6).replace("_", ".")) : 0;
@@ -221,15 +221,15 @@ function ze(e) {
221
221
  const t = e === "apple_pay" ? "disableApplePay" : e === "google_pay" ? "disableGooglePay" : null;
222
222
  return t ? sessionStorage.getItem(t) === "true" : !1;
223
223
  }
224
- function Sr(e) {
224
+ function _r(e) {
225
225
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
226
226
  }
227
- var Fe = { exports: {} }, _r = Fe.exports, Zt;
228
- function Qr() {
227
+ var Fe = { exports: {} }, Qr = Fe.exports, Zt;
228
+ function kr() {
229
229
  return Zt || (Zt = 1, (function(e, t) {
230
230
  (function(r, o) {
231
231
  e.exports = o();
232
- })(_r, function() {
232
+ })(Qr, function() {
233
233
  return (
234
234
  /******/
235
235
  (function() {
@@ -241,16 +241,16 @@ function Qr() {
241
241
  Object.defineProperty(u, "__esModule", {
242
242
  value: !0
243
243
  }), u.Centrifuge = void 0;
244
- var h = I(l(187)), y = I(l(471)), C = l(147), b = l(853);
244
+ var h = I(l(187)), y = I(l(471)), m = l(147), b = l(853);
245
245
  function I(g) {
246
246
  return g && g.__esModule ? g : { default: g };
247
247
  }
248
248
  function B(g) {
249
249
  "@babel/helpers - typeof";
250
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? B = function(m) {
251
- return typeof m;
252
- } : B = function(m) {
253
- return m && typeof Symbol == "function" && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m;
250
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? B = function(C) {
251
+ return typeof C;
252
+ } : B = function(C) {
253
+ return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C;
254
254
  }, B(g);
255
255
  }
256
256
  function Q(g, p) {
@@ -258,12 +258,12 @@ function Qr() {
258
258
  throw new TypeError("Cannot call a class as a function");
259
259
  }
260
260
  function S(g, p) {
261
- for (var m = 0; m < p.length; m++) {
262
- var d = p[m];
261
+ for (var C = 0; C < p.length; C++) {
262
+ var d = p[C];
263
263
  d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(g, d.key, d);
264
264
  }
265
265
  }
266
- function P(g, p, m) {
266
+ function P(g, p, C) {
267
267
  return p && S(g.prototype, p), g;
268
268
  }
269
269
  function k(g, p) {
@@ -311,16 +311,16 @@ function Qr() {
311
311
  }
312
312
  }
313
313
  function z(g) {
314
- return z = Object.setPrototypeOf ? Object.getPrototypeOf : function(m) {
315
- return m.__proto__ || Object.getPrototypeOf(m);
314
+ return z = Object.setPrototypeOf ? Object.getPrototypeOf : function(C) {
315
+ return C.__proto__ || Object.getPrototypeOf(C);
316
316
  }, z(g);
317
317
  }
318
318
  var J = "timeout", M = "connection closed", v = /* @__PURE__ */ (function(g) {
319
- k(m, g);
320
- var p = L(m);
321
- function m(d, s) {
319
+ k(C, g);
320
+ var p = L(C);
321
+ function C(d, s) {
322
322
  var a;
323
- return Q(this, m), a = p.call(this), a._url = d, a._websocket = null, a._sockjs = null, a._isSockjs = !1, a._xmlhttprequest = null, a._binary = !1, a._methodType = null, a._pushType = null, a._encoder = null, a._decoder = null, a._status = "disconnected", a._reconnect = !0, a._reconnecting = !1, a._transport = null, a._transportName = null, a._transportClosed = !0, a._messageId = 0, a._clientID = null, a._refreshRequired = !1, a._subs = {}, a._serverSubs = {}, a._lastSeq = {}, a._lastGen = {}, a._lastOffset = {}, a._lastEpoch = {}, a._messages = [], a._isBatching = !1, a._isSubscribeBatching = !1, a._privateChannels = {}, a._numRefreshFailed = 0, a._refreshTimeout = null, a._pingTimeout = null, a._pongTimeout = null, a._subRefreshTimeouts = {}, a._retries = 0, a._callbacks = {}, a._latency = null, a._latencyStart = null, a._connectData = null, a._token = null, a._xhrID = 0, a._xhrs = {}, a._dispatchPromise = Promise.resolve(), a._protocol = "", a._config = {
323
+ return Q(this, C), a = p.call(this), a._url = d, a._websocket = null, a._sockjs = null, a._isSockjs = !1, a._xmlhttprequest = null, a._binary = !1, a._methodType = null, a._pushType = null, a._encoder = null, a._decoder = null, a._status = "disconnected", a._reconnect = !0, a._reconnecting = !1, a._transport = null, a._transportName = null, a._transportClosed = !0, a._messageId = 0, a._clientID = null, a._refreshRequired = !1, a._subs = {}, a._serverSubs = {}, a._lastSeq = {}, a._lastGen = {}, a._lastOffset = {}, a._lastEpoch = {}, a._messages = [], a._isBatching = !1, a._isSubscribeBatching = !1, a._privateChannels = {}, a._numRefreshFailed = 0, a._refreshTimeout = null, a._pingTimeout = null, a._pongTimeout = null, a._subRefreshTimeouts = {}, a._retries = 0, a._callbacks = {}, a._latency = null, a._latencyStart = null, a._connectData = null, a._token = null, a._xhrID = 0, a._xhrs = {}, a._dispatchPromise = Promise.resolve(), a._protocol = "", a._config = {
324
324
  protocol: "",
325
325
  debug: !1,
326
326
  name: "js",
@@ -355,7 +355,7 @@ function Qr() {
355
355
  disableWithCredentials: !1
356
356
  }, a._configure(s), a;
357
357
  }
358
- return P(m, [{
358
+ return P(C, [{
359
359
  key: "setToken",
360
360
  value: function(s) {
361
361
  this._token = s;
@@ -449,7 +449,7 @@ function Qr() {
449
449
  if (!this._formatOverride(s)) {
450
450
  if (s === "protobuf")
451
451
  throw new Error("not implemented by JSON only Centrifuge client – use client with Protobuf");
452
- this._binary = !1, this._methodType = C.JsonMethodType, this._pushType = C.JsonPushType, this._encoder = new C.JsonEncoder(), this._decoder = new C.JsonDecoder();
452
+ this._binary = !1, this._methodType = m.JsonMethodType, this._pushType = m.JsonPushType, this._encoder = new m.JsonEncoder(), this._decoder = new m.JsonDecoder();
453
453
  }
454
454
  }
455
455
  }, {
@@ -1482,7 +1482,7 @@ function Qr() {
1482
1482
  s._isBatching || (s.startBatching(), jt = !0);
1483
1483
  for (var Jt in A)
1484
1484
  if (A.hasOwnProperty(Jt)) {
1485
- var yr = (function() {
1485
+ var mr = (function() {
1486
1486
  var Z = A[Jt], qt = Te[Z];
1487
1487
  if (qt) {
1488
1488
  var ye = {
@@ -1515,7 +1515,7 @@ function Qr() {
1515
1515
  } else
1516
1516
  return s._subscribeError(Z, s._createErrorObject("permission denied", 103)), "continue";
1517
1517
  })();
1518
- if (yr === "continue") continue;
1518
+ if (mr === "continue") continue;
1519
1519
  }
1520
1520
  jt && s.stopBatching();
1521
1521
  }
@@ -1543,7 +1543,7 @@ function Qr() {
1543
1543
  var E = new y.default(this, s, a);
1544
1544
  return this._subs[s] = E, E.subscribe(A), E;
1545
1545
  }
1546
- }]), m;
1546
+ }]), C;
1547
1547
  })(h.default);
1548
1548
  u.Centrifuge = v;
1549
1549
  })
@@ -1579,7 +1579,7 @@ function Qr() {
1579
1579
  function y(Q, S, P) {
1580
1580
  return S && h(Q.prototype, S), Q;
1581
1581
  }
1582
- var C = {
1582
+ var m = {
1583
1583
  CONNECT: 0,
1584
1584
  SUBSCRIBE: 1,
1585
1585
  UNSUBSCRIBE: 2,
@@ -1593,7 +1593,7 @@ function Qr() {
1593
1593
  REFRESH: 10,
1594
1594
  SUB_REFRESH: 11
1595
1595
  };
1596
- u.JsonMethodType = C;
1596
+ u.JsonMethodType = m;
1597
1597
  var b = {
1598
1598
  PUBLICATION: 0,
1599
1599
  JOIN: 1,
@@ -1667,38 +1667,38 @@ function Qr() {
1667
1667
  Object.defineProperty(u, "__esModule", {
1668
1668
  value: !0
1669
1669
  }), u.default = void 0;
1670
- var y = b(l(187)), C = l(853);
1670
+ var y = b(l(187)), m = l(853);
1671
1671
  function b(p) {
1672
1672
  return p && p.__esModule ? p : { default: p };
1673
1673
  }
1674
- function I(p, m) {
1675
- if (!(p instanceof m))
1674
+ function I(p, C) {
1675
+ if (!(p instanceof C))
1676
1676
  throw new TypeError("Cannot call a class as a function");
1677
1677
  }
1678
- function B(p, m) {
1679
- for (var d = 0; d < m.length; d++) {
1680
- var s = m[d];
1678
+ function B(p, C) {
1679
+ for (var d = 0; d < C.length; d++) {
1680
+ var s = C[d];
1681
1681
  s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(p, s.key, s);
1682
1682
  }
1683
1683
  }
1684
- function Q(p, m, d) {
1685
- return m && B(p.prototype, m), p;
1684
+ function Q(p, C, d) {
1685
+ return C && B(p.prototype, C), p;
1686
1686
  }
1687
- function S(p, m) {
1688
- if (typeof m != "function" && m !== null)
1687
+ function S(p, C) {
1688
+ if (typeof C != "function" && C !== null)
1689
1689
  throw new TypeError("Super expression must either be null or a function");
1690
- p.prototype = Object.create(m && m.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), m && P(p, m);
1690
+ p.prototype = Object.create(C && C.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), C && P(p, C);
1691
1691
  }
1692
- function P(p, m) {
1692
+ function P(p, C) {
1693
1693
  return P = Object.setPrototypeOf || function(s, a) {
1694
1694
  return s.__proto__ = a, s;
1695
- }, P(p, m);
1695
+ }, P(p, C);
1696
1696
  }
1697
1697
  function k(p) {
1698
- var m = q();
1698
+ var C = q();
1699
1699
  return function() {
1700
1700
  var s = D(p), a;
1701
- if (m) {
1701
+ if (C) {
1702
1702
  var A = D(this).constructor;
1703
1703
  a = Reflect.construct(s, arguments, A);
1704
1704
  } else
@@ -1706,10 +1706,10 @@ function Qr() {
1706
1706
  return R(this, a);
1707
1707
  };
1708
1708
  }
1709
- function R(p, m) {
1710
- if (m && (h(m) === "object" || typeof m == "function"))
1711
- return m;
1712
- if (m !== void 0)
1709
+ function R(p, C) {
1710
+ if (C && (h(C) === "object" || typeof C == "function"))
1711
+ return C;
1712
+ if (C !== void 0)
1713
1713
  throw new TypeError("Derived constructors may only return object or undefined");
1714
1714
  return L(p);
1715
1715
  }
@@ -1735,10 +1735,10 @@ function Qr() {
1735
1735
  }
1736
1736
  var K = 0, z = 1, J = 2, M = 3, v = 4, g = /* @__PURE__ */ (function(p) {
1737
1737
  S(d, p);
1738
- var m = k(d);
1738
+ var C = k(d);
1739
1739
  function d(s, a, A) {
1740
1740
  var f;
1741
- return I(this, d), f = m.call(this), f.channel = a, f._centrifuge = s, f._status = K, f._error = null, f._isResubscribe = !1, f._ready = !1, f._subscriptionPromise = null, f._noResubscribe = !1, f._recoverable = !1, f._recover = !1, f._setEvents(A), f._initializePromise(), f._promises = {}, f._promiseId = 0, f._subscribeData = null, f.on("error", function(E) {
1741
+ return I(this, d), f = C.call(this), f.channel = a, f._centrifuge = s, f._status = K, f._error = null, f._isResubscribe = !1, f._ready = !1, f._subscriptionPromise = null, f._noResubscribe = !1, f._recoverable = !1, f._recover = !1, f._setEvents(A), f._initializePromise(), f._promises = {}, f._promiseId = 0, f._subscribeData = null, f.on("error", function(E) {
1742
1742
  this._centrifuge._debug("subscription error", E);
1743
1743
  }), f;
1744
1744
  }
@@ -1775,7 +1775,7 @@ function Qr() {
1775
1775
  key: "_setEvents",
1776
1776
  value: function(a) {
1777
1777
  if (a) {
1778
- if ((0, C.isFunction)(a))
1778
+ if ((0, m.isFunction)(a))
1779
1779
  this.on("publish", a);
1780
1780
  else if (Object.prototype.toString.call(a) === Object.prototype.toString.call({}))
1781
1781
  for (var A = ["publish", "join", "leave", "unsubscribe", "subscribe", "error"], f = 0, E = A.length; f < E; f++) {
@@ -1967,14 +1967,14 @@ function Qr() {
1967
1967
  (function(c, u, l) {
1968
1968
  Object.defineProperty(u, "__esModule", {
1969
1969
  value: !0
1970
- }), u.backoff = b, u.errorExists = I, u.extend = B, u.isFunction = y, u.log = C, u.startsWith = h;
1970
+ }), u.backoff = b, u.errorExists = I, u.extend = B, u.isFunction = y, u.log = m, u.startsWith = h;
1971
1971
  function h(Q, S) {
1972
1972
  return Q.lastIndexOf(S, 0) === 0;
1973
1973
  }
1974
1974
  function y(Q) {
1975
1975
  return Q == null ? !1 : typeof Q == "function";
1976
1976
  }
1977
- function C(Q, S) {
1977
+ function m(Q, S) {
1978
1978
  if (l.g.console) {
1979
1979
  var P = l.g.console[Q];
1980
1980
  y(P) && P.apply(l.g.console, S);
@@ -1998,8 +1998,8 @@ function Qr() {
1998
1998
  187: (
1999
1999
  /***/
2000
2000
  (function(c) {
2001
- var u = typeof Reflect == "object" ? Reflect : null, l = u && typeof u.apply == "function" ? u.apply : function(g, p, m) {
2002
- return Function.prototype.apply.call(g, p, m);
2001
+ var u = typeof Reflect == "object" ? Reflect : null, l = u && typeof u.apply == "function" ? u.apply : function(g, p, C) {
2002
+ return Function.prototype.apply.call(g, p, C);
2003
2003
  }, h;
2004
2004
  u && typeof u.ownKeys == "function" ? h = u.ownKeys : Object.getOwnPropertySymbols ? h = function(g) {
2005
2005
  return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g));
@@ -2009,7 +2009,7 @@ function Qr() {
2009
2009
  function y(v) {
2010
2010
  console && console.warn && console.warn(v);
2011
2011
  }
2012
- var C = Number.isNaN || function(g) {
2012
+ var m = Number.isNaN || function(g) {
2013
2013
  return g !== g;
2014
2014
  };
2015
2015
  function b() {
@@ -2027,14 +2027,14 @@ function Qr() {
2027
2027
  return I;
2028
2028
  },
2029
2029
  set: function(v) {
2030
- if (typeof v != "number" || v < 0 || C(v))
2030
+ if (typeof v != "number" || v < 0 || m(v))
2031
2031
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + v + ".");
2032
2032
  I = v;
2033
2033
  }
2034
2034
  }), b.init = function() {
2035
2035
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
2036
2036
  }, b.prototype.setMaxListeners = function(g) {
2037
- if (typeof g != "number" || g < 0 || C(g))
2037
+ if (typeof g != "number" || g < 0 || m(g))
2038
2038
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + g + ".");
2039
2039
  return this._maxListeners = g, this;
2040
2040
  };
@@ -2044,7 +2044,7 @@ function Qr() {
2044
2044
  b.prototype.getMaxListeners = function() {
2045
2045
  return Q(this);
2046
2046
  }, b.prototype.emit = function(g) {
2047
- for (var p = [], m = 1; m < arguments.length; m++) p.push(arguments[m]);
2047
+ for (var p = [], C = 1; C < arguments.length; C++) p.push(arguments[C]);
2048
2048
  var d = g === "error", s = this._events;
2049
2049
  if (s !== void 0)
2050
2050
  d = d && s.error === void 0;
@@ -2063,11 +2063,11 @@ function Qr() {
2063
2063
  if (typeof f == "function")
2064
2064
  l(f, this, p);
2065
2065
  else
2066
- for (var E = f.length, _ = q(f, E), m = 0; m < E; ++m)
2067
- l(_[m], this, p);
2066
+ for (var E = f.length, _ = q(f, E), C = 0; C < E; ++C)
2067
+ l(_[C], this, p);
2068
2068
  return !0;
2069
2069
  };
2070
- function S(v, g, p, m) {
2070
+ function S(v, g, p, C) {
2071
2071
  var d, s, a;
2072
2072
  if (B(p), s = v._events, s === void 0 ? (s = v._events = /* @__PURE__ */ Object.create(null), v._eventsCount = 0) : (s.newListener !== void 0 && (v.emit(
2073
2073
  "newListener",
@@ -2075,7 +2075,7 @@ function Qr() {
2075
2075
  p.listener ? p.listener : p
2076
2076
  ), s = v._events), a = s[g]), a === void 0)
2077
2077
  a = s[g] = p, ++v._eventsCount;
2078
- else if (typeof a == "function" ? a = s[g] = m ? [p, a] : [a, p] : m ? a.unshift(p) : a.push(p), d = Q(v), d > 0 && a.length > d && !a.warned) {
2078
+ else if (typeof a == "function" ? a = s[g] = C ? [p, a] : [a, p] : C ? a.unshift(p) : a.push(p), d = Q(v), d > 0 && a.length > d && !a.warned) {
2079
2079
  a.warned = !0;
2080
2080
  var A = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(g) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2081
2081
  A.name = "MaxListenersExceededWarning", A.emitter = v, A.type = g, A.count = a.length, y(A);
@@ -2092,45 +2092,45 @@ function Qr() {
2092
2092
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
2093
2093
  }
2094
2094
  function k(v, g, p) {
2095
- var m = { fired: !1, wrapFn: void 0, target: v, type: g, listener: p }, d = P.bind(m);
2096
- return d.listener = p, m.wrapFn = d, d;
2095
+ var C = { fired: !1, wrapFn: void 0, target: v, type: g, listener: p }, d = P.bind(C);
2096
+ return d.listener = p, C.wrapFn = d, d;
2097
2097
  }
2098
2098
  b.prototype.once = function(g, p) {
2099
2099
  return B(p), this.on(g, k(this, g, p)), this;
2100
2100
  }, b.prototype.prependOnceListener = function(g, p) {
2101
2101
  return B(p), this.prependListener(g, k(this, g, p)), this;
2102
2102
  }, b.prototype.removeListener = function(g, p) {
2103
- var m, d, s, a, A;
2103
+ var C, d, s, a, A;
2104
2104
  if (B(p), d = this._events, d === void 0)
2105
2105
  return this;
2106
- if (m = d[g], m === void 0)
2106
+ if (C = d[g], C === void 0)
2107
2107
  return this;
2108
- if (m === p || m.listener === p)
2109
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete d[g], d.removeListener && this.emit("removeListener", g, m.listener || p));
2110
- else if (typeof m != "function") {
2111
- for (s = -1, a = m.length - 1; a >= 0; a--)
2112
- if (m[a] === p || m[a].listener === p) {
2113
- A = m[a].listener, s = a;
2108
+ if (C === p || C.listener === p)
2109
+ --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete d[g], d.removeListener && this.emit("removeListener", g, C.listener || p));
2110
+ else if (typeof C != "function") {
2111
+ for (s = -1, a = C.length - 1; a >= 0; a--)
2112
+ if (C[a] === p || C[a].listener === p) {
2113
+ A = C[a].listener, s = a;
2114
2114
  break;
2115
2115
  }
2116
2116
  if (s < 0)
2117
2117
  return this;
2118
- s === 0 ? m.shift() : D(m, s), m.length === 1 && (d[g] = m[0]), d.removeListener !== void 0 && this.emit("removeListener", g, A || p);
2118
+ s === 0 ? C.shift() : D(C, s), C.length === 1 && (d[g] = C[0]), d.removeListener !== void 0 && this.emit("removeListener", g, A || p);
2119
2119
  }
2120
2120
  return this;
2121
2121
  }, b.prototype.off = b.prototype.removeListener, b.prototype.removeAllListeners = function(g) {
2122
- var p, m, d;
2123
- if (m = this._events, m === void 0)
2122
+ var p, C, d;
2123
+ if (C = this._events, C === void 0)
2124
2124
  return this;
2125
- if (m.removeListener === void 0)
2126
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : m[g] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete m[g]), this;
2125
+ if (C.removeListener === void 0)
2126
+ return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : C[g] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete C[g]), this;
2127
2127
  if (arguments.length === 0) {
2128
- var s = Object.keys(m), a;
2128
+ var s = Object.keys(C), a;
2129
2129
  for (d = 0; d < s.length; ++d)
2130
2130
  a = s[d], a !== "removeListener" && this.removeAllListeners(a);
2131
2131
  return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
2132
2132
  }
2133
- if (p = m[g], typeof p == "function")
2133
+ if (p = C[g], typeof p == "function")
2134
2134
  this.removeListener(g, p);
2135
2135
  else if (p !== void 0)
2136
2136
  for (d = p.length - 1; d >= 0; d--)
@@ -2138,10 +2138,10 @@ function Qr() {
2138
2138
  return this;
2139
2139
  };
2140
2140
  function R(v, g, p) {
2141
- var m = v._events;
2142
- if (m === void 0)
2141
+ var C = v._events;
2142
+ if (C === void 0)
2143
2143
  return [];
2144
- var d = m[g];
2144
+ var d = C[g];
2145
2145
  return d === void 0 ? [] : typeof d == "function" ? p ? [d.listener || d] : [d] : p ? K(d) : q(d, d.length);
2146
2146
  }
2147
2147
  b.prototype.listeners = function(g) {
@@ -2166,8 +2166,8 @@ function Qr() {
2166
2166
  return this._eventsCount > 0 ? h(this._events) : [];
2167
2167
  };
2168
2168
  function q(v, g) {
2169
- for (var p = new Array(g), m = 0; m < g; ++m)
2170
- p[m] = v[m];
2169
+ for (var p = new Array(g), C = 0; C < g; ++C)
2170
+ p[C] = v[C];
2171
2171
  return p;
2172
2172
  }
2173
2173
  function D(v, g) {
@@ -2181,9 +2181,9 @@ function Qr() {
2181
2181
  return g;
2182
2182
  }
2183
2183
  function z(v, g) {
2184
- return new Promise(function(p, m) {
2184
+ return new Promise(function(p, C) {
2185
2185
  function d(a) {
2186
- v.removeListener(g, s), m(a);
2186
+ v.removeListener(g, s), C(a);
2187
2187
  }
2188
2188
  function s() {
2189
2189
  typeof v.removeListener == "function" && v.removeListener("error", d), p([].slice.call(arguments));
@@ -2194,12 +2194,12 @@ function Qr() {
2194
2194
  function J(v, g, p) {
2195
2195
  typeof v.on == "function" && M(v, "error", g, p);
2196
2196
  }
2197
- function M(v, g, p, m) {
2197
+ function M(v, g, p, C) {
2198
2198
  if (typeof v.on == "function")
2199
- m.once ? v.once(g, p) : v.on(g, p);
2199
+ C.once ? v.once(g, p) : v.on(g, p);
2200
2200
  else if (typeof v.addEventListener == "function")
2201
2201
  v.addEventListener(g, function d(s) {
2202
- m.once && v.removeEventListener(g, d), p(s);
2202
+ C.once && v.removeEventListener(g, d), p(s);
2203
2203
  });
2204
2204
  else
2205
2205
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof v);
@@ -2240,8 +2240,8 @@ function Qr() {
2240
2240
  });
2241
2241
  })(Fe)), Fe.exports;
2242
2242
  }
2243
- var kr = Qr();
2244
- const Pr = /* @__PURE__ */ Sr(kr);
2243
+ var Pr = kr();
2244
+ const wr = /* @__PURE__ */ _r(Pr);
2245
2245
  let Re = null;
2246
2246
  function $t(e, t) {
2247
2247
  if (!(e != null && e.client_url) || !(e != null && e.token) || !(e != null && e.channel))
@@ -2256,13 +2256,13 @@ function $t(e, t) {
2256
2256
  Re = null;
2257
2257
  }
2258
2258
  console.log("[Centrifuge] Creating new instance:", n);
2259
- const i = new Pr(n);
2259
+ const i = new wr(n);
2260
2260
  return i.setToken(r), i.on("connect", (c) => {
2261
2261
  console.log("[Centrifuge] Connected", c), console.log("[Centrifuge] Subscribing to channel:", o);
2262
2262
  const u = i.subscribe(o);
2263
2263
  u.on("publish", (l) => {
2264
2264
  console.log("[Centrifuge] Publish event received:", l);
2265
- const h = wr(l);
2265
+ const h = Tr(l);
2266
2266
  h && t(h);
2267
2267
  }), u.on("subscribe", (l) => {
2268
2268
  console.log("[Centrifuge] ✅ Channel subscribed successfully:", o, l);
@@ -2273,7 +2273,7 @@ function $t(e, t) {
2273
2273
  });
2274
2274
  }), i.on("disconnect", (c) => console.log("[Centrifuge] Disconnected", c)), i.on("error", (c) => console.error("[Centrifuge] Error", c)), console.log("[Centrifuge] Calling connect()..."), i.connect(), Re = i, { centrifuge: i };
2275
2275
  }
2276
- function wr(e) {
2276
+ function Tr(e) {
2277
2277
  var n, r, o;
2278
2278
  if (console.log("[Centrifuge] Raw message received:", JSON.stringify(e)), !(e != null && e.data))
2279
2279
  return console.warn("[Centrifuge] Empty or invalid response"), null;
@@ -2287,11 +2287,11 @@ const Ae = {
2287
2287
  iconType: "kaspi_pay",
2288
2288
  label: "Kaspi.kz",
2289
2289
  type: "kaspi_pay"
2290
- }, Nn = {
2290
+ }, Dn = {
2291
2291
  iconType: "apple_pay",
2292
2292
  label: "Apple Pay",
2293
2293
  type: "apple_pay"
2294
- }, Dn = {
2294
+ }, Mn = {
2295
2295
  iconType: "google_pay",
2296
2296
  label: "Google Pay",
2297
2297
  type: "google_pay"
@@ -2304,7 +2304,7 @@ function en(e) {
2304
2304
  let t = String(e).trim().toLowerCase();
2305
2305
  return t.startsWith("payment_method_") && (t = t.replace("payment_method_", "")), t === "kaspi" ? "kaspi_pay" : t === "apple" ? "apple_pay" : t === "google" ? "google_pay" : t === "newcard" ? "new_card" : t === "card" ? "card" : ["kaspi_pay", "apple_pay", "google_pay", "new_card"].includes(t) ? t : null;
2306
2306
  }
2307
- function Tr(e) {
2307
+ function Lr(e) {
2308
2308
  var i, c, u;
2309
2309
  const t = e, n = ((i = t == null ? void 0 : t.context) == null ? void 0 : i.last_payment_method) ?? (t == null ? void 0 : t.last_payment_method) ?? ((c = t == null ? void 0 : t.attributes) == null ? void 0 : c.last_payment_method);
2310
2310
  if (!n) return null;
@@ -2317,10 +2317,10 @@ function Tr(e) {
2317
2317
  cardId: o != null ? String(o) : null
2318
2318
  };
2319
2319
  }
2320
- function Lr(e, t, n = {}) {
2320
+ function Rr(e, t, n = {}) {
2321
2321
  var S, P, k, R;
2322
- const r = [], o = (S = e == null ? void 0 : e.kaspi) == null ? void 0 : S.data, i = ((P = e == null ? void 0 : e.cards_v2) == null ? void 0 : P.data) || [], c = ((R = (k = e == null ? void 0 : e.payment_methods) == null ? void 0 : k.data) == null ? void 0 : R.attributes) || {}, u = ee(c.payment_method_kaspi), l = ee(c.payment_method_card), h = typeof window < "u" && window.self === window.top, C = Lt() === "ios", b = !!(n != null && n.onlyKaspiAvailable), I = !!(n != null && n.disableKaspi);
2323
- return o != null && o.isKaspiOnly && u && !I ? [Ae] : b ? o != null && o.isAvailable && u && !I ? [Ae] : [] : (ee(c.payment_method_apple_pay) && !ze("apple_pay") && (Je() && h || qe() || C || On() === 16) && r.push(Nn), o != null && o.isAvailable && u && !I && r.push(Ae), l && i.filter((L) => !L.isExpired).forEach((L) => {
2322
+ const r = [], o = (S = e == null ? void 0 : e.kaspi) == null ? void 0 : S.data, i = ((P = e == null ? void 0 : e.cards_v2) == null ? void 0 : P.data) || [], c = ((R = (k = e == null ? void 0 : e.payment_methods) == null ? void 0 : k.data) == null ? void 0 : R.attributes) || {}, u = ee(c.payment_method_kaspi), l = ee(c.payment_method_card), h = typeof window < "u" && window.self === window.top, m = Lt() === "ios", b = !!(n != null && n.onlyKaspiAvailable), I = !!(n != null && n.disableKaspi);
2323
+ return o != null && o.isKaspiOnly && u && !I ? [Ae] : b ? o != null && o.isAvailable && u && !I ? [Ae] : [] : (ee(c.payment_method_apple_pay) && !ze("apple_pay") && (Je() && h || qe() || m || Nn() === 16) && r.push(Dn), o != null && o.isAvailable && u && !I && r.push(Ae), l && i.filter((L) => !L.isExpired).forEach((L) => {
2324
2324
  r.push({
2325
2325
  iconType: Xe(L.attributes.mask),
2326
2326
  type: "card",
@@ -2329,7 +2329,7 @@ function Lr(e, t, n = {}) {
2329
2329
  cardType: L.type,
2330
2330
  isDefault: L.attributes.isDefault
2331
2331
  });
2332
- }), ee(c.payment_method_google_pay) && !ze("google_pay") && !(n != null && n.disableGooglePay) && !Je() && !qe() && r.push(Dn), ee(c.payment_method_new_card) && r.push({
2332
+ }), ee(c.payment_method_google_pay) && !ze("google_pay") && !(n != null && n.disableGooglePay) && !Je() && !qe() && r.push(Mn), ee(c.payment_method_new_card) && r.push({
2333
2333
  iconType: "new_card",
2334
2334
  type: "new_card",
2335
2335
  label: t ? t("newCard") : "Оплата новой картой"
@@ -2337,14 +2337,14 @@ function Lr(e, t, n = {}) {
2337
2337
  }
2338
2338
  function yt(e, t = {}) {
2339
2339
  var Q, S, P, k;
2340
- const n = (Q = e == null ? void 0 : e.kaspi) == null ? void 0 : Q.data, r = ((S = e == null ? void 0 : e.cards_v2) == null ? void 0 : S.data) || [], o = ((k = (P = e == null ? void 0 : e.payment_methods) == null ? void 0 : P.data) == null ? void 0 : k.attributes) || {}, i = ee(o.payment_method_kaspi), c = ee(o.payment_method_card), u = !!(t != null && t.disableKaspi), l = typeof window < "u" && window.self === window.top, y = Lt() === "ios", C = ee(o.payment_method_apple_pay) && !ze("apple_pay") && (Je() && l || qe() || y || On() === 16), b = ee(o.payment_method_google_pay) && !ze("google_pay") && !(t != null && t.disableGooglePay) && !Je() && !qe();
2340
+ const n = (Q = e == null ? void 0 : e.kaspi) == null ? void 0 : Q.data, r = ((S = e == null ? void 0 : e.cards_v2) == null ? void 0 : S.data) || [], o = ((k = (P = e == null ? void 0 : e.payment_methods) == null ? void 0 : P.data) == null ? void 0 : k.attributes) || {}, i = ee(o.payment_method_kaspi), c = ee(o.payment_method_card), u = !!(t != null && t.disableKaspi), l = typeof window < "u" && window.self === window.top, y = Lt() === "ios", m = ee(o.payment_method_apple_pay) && !ze("apple_pay") && (Je() && l || qe() || y || Nn() === 16), b = ee(o.payment_method_google_pay) && !ze("google_pay") && !(t != null && t.disableGooglePay) && !Je() && !qe();
2341
2341
  if (n != null && n.isKaspiOnly && i && !u || t != null && t.onlyKaspiAvailable && (n != null && n.isAvailable) && i && !u)
2342
2342
  return Ae;
2343
- const I = Tr(e);
2343
+ const I = Lr(e);
2344
2344
  if ((I == null ? void 0 : I.type) === "kaspi_pay" && (n != null && n.isAvailable) && i && !u)
2345
2345
  return Ae;
2346
- if ((I == null ? void 0 : I.type) === "apple_pay" && C) return Nn;
2347
- if ((I == null ? void 0 : I.type) === "google_pay" && b) return Dn;
2346
+ if ((I == null ? void 0 : I.type) === "apple_pay" && m) return Dn;
2347
+ if ((I == null ? void 0 : I.type) === "google_pay" && b) return Mn;
2348
2348
  if ((I == null ? void 0 : I.type) === "new_card" && ee(o.payment_method_new_card))
2349
2349
  return { iconType: "new_card", type: "new_card", label: "Оплата новой картой" };
2350
2350
  if ((I == null ? void 0 : I.type) === "card" && c) {
@@ -2382,7 +2382,7 @@ function yt(e, t = {}) {
2382
2382
  cardType: B.type
2383
2383
  } : null;
2384
2384
  }
2385
- function Mn(e) {
2385
+ function xn(e) {
2386
2386
  if (typeof localStorage > "u") return null;
2387
2387
  try {
2388
2388
  return localStorage.getItem(e);
@@ -2404,7 +2404,7 @@ function Ke(e) {
2404
2404
  } catch {
2405
2405
  }
2406
2406
  }
2407
- async function Rr(e, t) {
2407
+ async function Or(e, t) {
2408
2408
  var n;
2409
2409
  try {
2410
2410
  const r = await e.json(), o = (n = r == null ? void 0 : r.errors) == null ? void 0 : n[0];
@@ -2414,7 +2414,7 @@ async function Rr(e, t) {
2414
2414
  }
2415
2415
  }
2416
2416
  async function ue(e, t) {
2417
- const n = await Rr(e, t);
2417
+ const n = await Or(e, t);
2418
2418
  throw Object.assign(new Error(n), { status: e.status });
2419
2419
  }
2420
2420
  function Ze(e, t, n = {}) {
@@ -2456,14 +2456,14 @@ async function et(e, t, n, r, o) {
2456
2456
  });
2457
2457
  return i.ok || await ue(i, o), i.json();
2458
2458
  }
2459
- async function Or(e, t, n) {
2459
+ async function Nr(e, t, n) {
2460
2460
  var u, l, h, y;
2461
2461
  const r = await fetch(`${e}/api/v2/oauth2/tokens`, {
2462
2462
  method: "POST",
2463
2463
  headers: {
2464
2464
  "Content-Type": "application/json",
2465
2465
  "X-Idempotency-Key": Ve(),
2466
- "X-Fingerprint": Rn()
2466
+ "X-Fingerprint": On()
2467
2467
  },
2468
2468
  body: JSON.stringify({
2469
2469
  client_id: t,
@@ -2476,7 +2476,7 @@ async function Or(e, t, n) {
2476
2476
  if (!i) throw new Error("В ответе отсутствует access_token");
2477
2477
  return { access_token: i, refresh_token: c };
2478
2478
  }
2479
- async function Nr(e, t, n) {
2479
+ async function Dr(e, t, n) {
2480
2480
  var u, l, h, y;
2481
2481
  const r = await fetch(`${e}/api/v2/oauth2/tokens`, {
2482
2482
  method: "POST",
@@ -2511,7 +2511,7 @@ async function Ct(e, t) {
2511
2511
  });
2512
2512
  return n.ok || await ue(n, "Ошибка получения контекста оплаты"), n.json();
2513
2513
  }
2514
- async function Dr(e, t, n) {
2514
+ async function Mr(e, t, n) {
2515
2515
  const r = await fetch(`${e}/payment-gateway/v1/cards/${n}`, {
2516
2516
  method: "DELETE",
2517
2517
  headers: {
@@ -2521,7 +2521,7 @@ async function Dr(e, t, n) {
2521
2521
  });
2522
2522
  return r.ok || await ue(r, "Не удалось удалить карту"), r.json().catch(() => ({}));
2523
2523
  }
2524
- async function Mr(e, t, n) {
2524
+ async function xr(e, t, n) {
2525
2525
  const r = await fetch(
2526
2526
  `${e}/payment-gateway/v1/cards/${n}/mark_as_default`,
2527
2527
  {
@@ -2534,7 +2534,7 @@ async function Mr(e, t, n) {
2534
2534
  );
2535
2535
  return r.ok || await ue(r, "Не удалось отметить карту как основную"), r.json().catch(() => ({}));
2536
2536
  }
2537
- async function xr(e, t, n) {
2537
+ async function Ur(e, t, n) {
2538
2538
  const r = await fetch(`${e}/orders/v1/orders/${n}/status`, {
2539
2539
  method: "GET",
2540
2540
  headers: {
@@ -2567,7 +2567,7 @@ async function tn(e, t, n, r, o = {}) {
2567
2567
  "Ошибка создания заказа"
2568
2568
  );
2569
2569
  }
2570
- async function Ur(e, t, n, r = {}) {
2570
+ async function Fr(e, t, n, r = {}) {
2571
2571
  const { checkoutAmount: o, checkoutPaymentMethod: i, useBalanceFlag: c, voucher: u } = Ze(
2572
2572
  t,
2573
2573
  { type: "new_card" },
@@ -2581,7 +2581,7 @@ async function Ur(e, t, n, r = {}) {
2581
2581
  "Ошибка создания заказа для новой карты"
2582
2582
  );
2583
2583
  }
2584
- async function Fr(e, t) {
2584
+ async function Xr(e, t) {
2585
2585
  const n = await fetch(
2586
2586
  `${e}/loyalty/v6/coupons/by_terminal/${t.terminalId}/at_payment?order_pay_amount=${t.amount}`,
2587
2587
  {
@@ -2594,7 +2594,7 @@ async function Fr(e, t) {
2594
2594
  );
2595
2595
  return n.ok || await ue(n, "Ошибка получения купонов"), n.json();
2596
2596
  }
2597
- async function Xr(e, t, n) {
2597
+ async function nn(e, t, n) {
2598
2598
  const r = window.location.hostname, o = await fetch(`${e}/payment-gateway/v1/apple/session`, {
2599
2599
  method: "POST",
2600
2600
  headers: {
@@ -2620,7 +2620,7 @@ async function Hr(e, t, n, r, o = {}) {
2620
2620
  "Ошибка создания заказа с Apple Pay"
2621
2621
  );
2622
2622
  }
2623
- async function xn(e, t, n, r, o = {}) {
2623
+ async function Un(e, t, n, r, o = {}) {
2624
2624
  const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = Ze(
2625
2625
  t,
2626
2626
  { type: "google_pay", data: r },
@@ -2685,7 +2685,7 @@ function tt(e, t, n) {
2685
2685
  const r = n || j, o = r.__SENTRY__ = r.__SENTRY__ || {}, i = o[fe] = o[fe] || {};
2686
2686
  return i[e] || (i[e] = t());
2687
2687
  }
2688
- const Rt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Jr = "Sentry Logger ", nn = [
2688
+ const Rt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Jr = "Sentry Logger ", rn = [
2689
2689
  "debug",
2690
2690
  "info",
2691
2691
  "warn",
@@ -2693,13 +2693,13 @@ const Rt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Jr = "Sentry Logge
2693
2693
  "log",
2694
2694
  "assert",
2695
2695
  "trace"
2696
- ], rn = {};
2696
+ ], on = {};
2697
2697
  function nt(e) {
2698
2698
  if (!("console" in j))
2699
2699
  return e();
2700
- const t = j.console, n = {}, r = Object.keys(rn);
2700
+ const t = j.console, n = {}, r = Object.keys(on);
2701
2701
  r.forEach((o) => {
2702
- const i = rn[o];
2702
+ const i = on[o];
2703
2703
  n[o] = t[o], t[o] = i;
2704
2704
  });
2705
2705
  try {
@@ -2721,18 +2721,18 @@ function qr() {
2721
2721
  },
2722
2722
  isEnabled: () => e
2723
2723
  };
2724
- return Rt ? nn.forEach((n) => {
2724
+ return Rt ? rn.forEach((n) => {
2725
2725
  t[n] = (...r) => {
2726
2726
  e && nt(() => {
2727
2727
  j.console[n](`${Jr}[${n}]:`, ...r);
2728
2728
  });
2729
2729
  };
2730
- }) : nn.forEach((n) => {
2730
+ }) : rn.forEach((n) => {
2731
2731
  t[n] = () => {
2732
2732
  };
2733
2733
  }), t;
2734
2734
  }
2735
- const N = tt("logger", qr), Un = 50, be = "?", on = /\(error: (.*)\)/, sn = /captureMessage|captureException/;
2735
+ const N = tt("logger", qr), Fn = 50, be = "?", sn = /\(error: (.*)\)/, an = /captureMessage|captureException/;
2736
2736
  function zr(...e) {
2737
2737
  const t = e.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
2738
2738
  return (n, r = 0, o = 0) => {
@@ -2742,16 +2742,16 @@ function zr(...e) {
2742
2742
  const l = c[u];
2743
2743
  if (l.length > 1024)
2744
2744
  continue;
2745
- const h = on.test(l) ? l.replace(on, "$1") : l;
2745
+ const h = sn.test(l) ? l.replace(sn, "$1") : l;
2746
2746
  if (!h.match(/\S*Error: /)) {
2747
2747
  for (const y of t) {
2748
- const C = y(h);
2749
- if (C) {
2750
- i.push(C);
2748
+ const m = y(h);
2749
+ if (m) {
2750
+ i.push(m);
2751
2751
  break;
2752
2752
  }
2753
2753
  }
2754
- if (i.length >= Un + o)
2754
+ if (i.length >= Fn + o)
2755
2755
  break;
2756
2756
  }
2757
2757
  }
@@ -2762,7 +2762,7 @@ function Kr(e) {
2762
2762
  if (!e.length)
2763
2763
  return [];
2764
2764
  const t = Array.from(e);
2765
- return /sentryWrapped/.test(Oe(t).function || "") && t.pop(), t.reverse(), sn.test(Oe(t).function || "") && (t.pop(), sn.test(Oe(t).function || "") && t.pop()), t.slice(0, Un).map((n) => ({
2765
+ return /sentryWrapped/.test(Oe(t).function || "") && t.pop(), t.reverse(), an.test(Oe(t).function || "") && (t.pop(), an.test(Oe(t).function || "") && t.pop()), t.slice(0, Fn).map((n) => ({
2766
2766
  ...n,
2767
2767
  filename: n.filename || Oe(t).filename,
2768
2768
  function: n.function || be
@@ -2786,9 +2786,9 @@ function Nt(e) {
2786
2786
  const t = e.__SENTRY__ = e.__SENTRY__ || {};
2787
2787
  return t.version = t.version || fe, t[fe] = t[fe] || {};
2788
2788
  }
2789
- const Fn = Object.prototype.toString;
2790
- function Xn(e) {
2791
- switch (Fn.call(e)) {
2789
+ const Xn = Object.prototype.toString;
2790
+ function Hn(e) {
2791
+ switch (Xn.call(e)) {
2792
2792
  case "[object Error]":
2793
2793
  case "[object Exception]":
2794
2794
  case "[object DOMException]":
@@ -2799,18 +2799,18 @@ function Xn(e) {
2799
2799
  }
2800
2800
  }
2801
2801
  function Pe(e, t) {
2802
- return Fn.call(e) === `[object ${t}]`;
2802
+ return Xn.call(e) === `[object ${t}]`;
2803
2803
  }
2804
- function Hn(e) {
2804
+ function jn(e) {
2805
2805
  return Pe(e, "ErrorEvent");
2806
2806
  }
2807
- function an(e) {
2807
+ function cn(e) {
2808
2808
  return Pe(e, "DOMError");
2809
2809
  }
2810
2810
  function Wr(e) {
2811
2811
  return Pe(e, "DOMException");
2812
2812
  }
2813
- function jn(e) {
2813
+ function Jn(e) {
2814
2814
  return Pe(e, "String");
2815
2815
  }
2816
2816
  function Dt(e) {
@@ -2854,8 +2854,8 @@ function no(e, t = {}) {
2854
2854
  let i = 0, c = 0;
2855
2855
  const u = " > ", l = u.length;
2856
2856
  let h;
2857
- const y = Array.isArray(t) ? t : t.keyAttrs, C = !Array.isArray(t) && t.maxStringLength || to;
2858
- for (; n && i++ < r && (h = ro(n, y), !(h === "html" || i > 1 && c + o.length * l + h.length >= C)); )
2857
+ const y = Array.isArray(t) ? t : t.keyAttrs, m = !Array.isArray(t) && t.maxStringLength || to;
2858
+ for (; n && i++ < r && (h = ro(n, y), !(h === "html" || i > 1 && c + o.length * l + h.length >= m)); )
2859
2859
  o.push(h), c += h.length, n = n.parentNode;
2860
2860
  return o.reverse().join(u);
2861
2861
  } catch {
@@ -2881,7 +2881,7 @@ function ro(e, t) {
2881
2881
  else {
2882
2882
  n.id && r.push(`#${n.id}`);
2883
2883
  const c = n.className;
2884
- if (c && jn(c)) {
2884
+ if (c && Jn(c)) {
2885
2885
  const u = c.split(/\s+/);
2886
2886
  for (const l of u)
2887
2887
  r.push(`.${l}`);
@@ -2897,7 +2897,7 @@ function ro(e, t) {
2897
2897
  function Se(e, t = 0) {
2898
2898
  return typeof e != "string" || t === 0 || e.length <= t ? e : `${e.slice(0, t)}...`;
2899
2899
  }
2900
- function Jn(e, t, n) {
2900
+ function qn(e, t, n) {
2901
2901
  try {
2902
2902
  Object.defineProperty(e, t, {
2903
2903
  // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
@@ -2909,33 +2909,33 @@ function Jn(e, t, n) {
2909
2909
  Rt && N.log(`Failed to add non-enumerable property "${t}" to object`, e);
2910
2910
  }
2911
2911
  }
2912
- function qn(e) {
2913
- if (Xn(e))
2912
+ function zn(e) {
2913
+ if (Hn(e))
2914
2914
  return {
2915
2915
  message: e.message,
2916
2916
  name: e.name,
2917
2917
  stack: e.stack,
2918
- ...un(e)
2918
+ ...ln(e)
2919
2919
  };
2920
2920
  if (rt(e)) {
2921
2921
  const t = {
2922
2922
  type: e.type,
2923
- target: cn(e.target),
2924
- currentTarget: cn(e.currentTarget),
2925
- ...un(e)
2923
+ target: un(e.target),
2924
+ currentTarget: un(e.currentTarget),
2925
+ ...ln(e)
2926
2926
  };
2927
2927
  return typeof CustomEvent < "u" && st(e, CustomEvent) && (t.detail = e.detail), t;
2928
2928
  } else
2929
2929
  return e;
2930
2930
  }
2931
- function cn(e) {
2931
+ function un(e) {
2932
2932
  try {
2933
2933
  return Vr(e) ? no(e) : Object.prototype.toString.call(e);
2934
2934
  } catch {
2935
2935
  return "<unknown>";
2936
2936
  }
2937
2937
  }
2938
- function un(e) {
2938
+ function ln(e) {
2939
2939
  if (typeof e == "object" && e !== null) {
2940
2940
  const t = {};
2941
2941
  for (const n in e)
@@ -2945,7 +2945,7 @@ function un(e) {
2945
2945
  return {};
2946
2946
  }
2947
2947
  function oo(e, t = 40) {
2948
- const n = Object.keys(qn(e));
2948
+ const n = Object.keys(zn(e));
2949
2949
  n.sort();
2950
2950
  const r = n[0];
2951
2951
  if (!r)
@@ -2994,18 +2994,18 @@ function so(e) {
2994
2994
  return !0;
2995
2995
  }
2996
2996
  }
2997
- const zn = 1e3;
2997
+ const Kn = 1e3;
2998
2998
  function it() {
2999
- return Date.now() / zn;
2999
+ return Date.now() / Kn;
3000
3000
  }
3001
3001
  function io() {
3002
3002
  const { performance: e } = j;
3003
3003
  if (!e || !e.now)
3004
3004
  return it;
3005
3005
  const t = Date.now() - e.now(), n = e.timeOrigin == null ? t : e.timeOrigin;
3006
- return () => (n + e.now()) / zn;
3006
+ return () => (n + e.now()) / Kn;
3007
3007
  }
3008
- const Kn = io();
3008
+ const Gn = io();
3009
3009
  (() => {
3010
3010
  const { performance: e } = j;
3011
3011
  if (!e || !e.now)
@@ -3036,7 +3036,7 @@ function te() {
3036
3036
  function ao(e) {
3037
3037
  return e.exception && e.exception.values ? e.exception.values[0] : void 0;
3038
3038
  }
3039
- function ln(e, t, n) {
3039
+ function An(e, t, n) {
3040
3040
  const r = e.exception = e.exception || {}, o = r.values = r.values || [], i = o[0] = o[0] || {};
3041
3041
  i.value || (i.value = t || ""), i.type || (i.type = "Error");
3042
3042
  }
@@ -3050,11 +3050,11 @@ function _e(e, t) {
3050
3050
  n.mechanism.data = i;
3051
3051
  }
3052
3052
  }
3053
- function An(e) {
3053
+ function dn(e) {
3054
3054
  if (co(e))
3055
3055
  return !0;
3056
3056
  try {
3057
- Jn(e, "__sentry_captured__", !0);
3057
+ qn(e, "__sentry_captured__", !0);
3058
3058
  } catch {
3059
3059
  }
3060
3060
  return !1;
@@ -3181,7 +3181,7 @@ class G {
3181
3181
  }
3182
3182
  }
3183
3183
  function Et(e, t = {}) {
3184
- if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), !e.did && !t.did && (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || Kn(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : te()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration)
3184
+ if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), !e.did && !t.did && (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || Gn(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : te()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration)
3185
3185
  e.duration = void 0;
3186
3186
  else if (typeof t.duration == "number")
3187
3187
  e.duration = t.duration;
@@ -3191,7 +3191,7 @@ function Et(e, t = {}) {
3191
3191
  }
3192
3192
  t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status);
3193
3193
  }
3194
- function dn() {
3194
+ function fn() {
3195
3195
  return te();
3196
3196
  }
3197
3197
  function vt() {
@@ -3208,10 +3208,10 @@ function at(e, t, n = 2) {
3208
3208
  return r;
3209
3209
  }
3210
3210
  const It = "_sentrySpan";
3211
- function fn(e, t) {
3212
- t ? Jn(e, It, t) : delete e[It];
3211
+ function hn(e, t) {
3212
+ t ? qn(e, It, t) : delete e[It];
3213
3213
  }
3214
- function hn(e) {
3214
+ function pn(e) {
3215
3215
  return e[It];
3216
3216
  }
3217
3217
  const uo = 100;
@@ -3246,7 +3246,7 @@ class Mt {
3246
3246
  // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
3247
3247
  constructor() {
3248
3248
  this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = {
3249
- traceId: dn(),
3249
+ traceId: fn(),
3250
3250
  spanId: vt()
3251
3251
  };
3252
3252
  }
@@ -3257,7 +3257,7 @@ class Mt {
3257
3257
  const t = new Mt();
3258
3258
  return t._breadcrumbs = [...this._breadcrumbs], t._tags = { ...this._tags }, t._extra = { ...this._extra }, t._contexts = { ...this._contexts }, this._contexts.flags && (t._contexts.flags = {
3259
3259
  values: [...this._contexts.flags.values]
3260
- }), t._user = this._user, t._level = this._level, t._session = this._session, t._transactionName = this._transactionName, t._fingerprint = this._fingerprint, t._eventProcessors = [...this._eventProcessors], t._requestSession = this._requestSession, t._attachments = [...this._attachments], t._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, t._propagationContext = { ...this._propagationContext }, t._client = this._client, t._lastEventId = this._lastEventId, fn(t, hn(this)), t;
3260
+ }), t._user = this._user, t._level = this._level, t._session = this._session, t._transactionName = this._transactionName, t._fingerprint = this._fingerprint, t._eventProcessors = [...this._eventProcessors], t._requestSession = this._requestSession, t._attachments = [...this._attachments], t._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, t._propagationContext = { ...this._propagationContext }, t._client = this._client, t._lastEventId = this._lastEventId, hn(t, pn(this)), t;
3261
3261
  }
3262
3262
  /**
3263
3263
  * @inheritDoc
@@ -3409,14 +3409,14 @@ class Mt {
3409
3409
  const n = typeof t == "function" ? t(this) : t, [r, o] = n instanceof ce ? (
3410
3410
  // eslint-disable-next-line deprecation/deprecation
3411
3411
  [n.getScopeData(), n.getRequestSession()]
3412
- ) : Ee(n) ? [t, t.requestSession] : [], { tags: i, extra: c, user: u, contexts: l, level: h, fingerprint: y = [], propagationContext: C } = r || {};
3413
- return this._tags = { ...this._tags, ...i }, this._extra = { ...this._extra, ...c }, this._contexts = { ...this._contexts, ...l }, u && Object.keys(u).length && (this._user = u), h && (this._level = h), y.length && (this._fingerprint = y), C && (this._propagationContext = C), o && (this._requestSession = o), this;
3412
+ ) : Ee(n) ? [t, t.requestSession] : [], { tags: i, extra: c, user: u, contexts: l, level: h, fingerprint: y = [], propagationContext: m } = r || {};
3413
+ return this._tags = { ...this._tags, ...i }, this._extra = { ...this._extra, ...c }, this._contexts = { ...this._contexts, ...l }, u && Object.keys(u).length && (this._user = u), h && (this._level = h), y.length && (this._fingerprint = y), m && (this._propagationContext = m), o && (this._requestSession = o), this;
3414
3414
  }
3415
3415
  /**
3416
3416
  * @inheritDoc
3417
3417
  */
3418
3418
  clear() {
3419
- return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, fn(this, void 0), this._attachments = [], this.setPropagationContext({ traceId: dn() }), this._notifyScopeListeners(), this;
3419
+ return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, hn(this, void 0), this._attachments = [], this.setPropagationContext({ traceId: fn() }), this._notifyScopeListeners(), this;
3420
3420
  }
3421
3421
  /**
3422
3422
  * @inheritDoc
@@ -3470,7 +3470,7 @@ class Mt {
3470
3470
  propagationContext: this._propagationContext,
3471
3471
  sdkProcessingMetadata: this._sdkProcessingMetadata,
3472
3472
  transactionName: this._transactionName,
3473
- span: hn(this)
3473
+ span: pn(this)
3474
3474
  };
3475
3475
  }
3476
3476
  /**
@@ -3634,36 +3634,36 @@ function po(e, t) {
3634
3634
  const n = ve();
3635
3635
  return n.withScope(() => (n.getStackTop().scope = e, t(e)));
3636
3636
  }
3637
- function pn(e) {
3637
+ function gn(e) {
3638
3638
  return ve().withScope(() => e(ve().getIsolationScope()));
3639
3639
  }
3640
3640
  function go() {
3641
3641
  return {
3642
- withIsolationScope: pn,
3642
+ withIsolationScope: gn,
3643
3643
  withScope: ho,
3644
3644
  withSetScope: po,
3645
- withSetIsolationScope: (e, t) => pn(t),
3645
+ withSetIsolationScope: (e, t) => gn(t),
3646
3646
  getCurrentScope: () => ve().getScope(),
3647
3647
  getIsolationScope: () => ve().getIsolationScope()
3648
3648
  };
3649
3649
  }
3650
- function Gn(e) {
3650
+ function Wn(e) {
3651
3651
  const t = Nt(e);
3652
3652
  return t.acs ? t.acs : go();
3653
3653
  }
3654
- function Wn() {
3654
+ function Yn() {
3655
3655
  const e = Ot();
3656
- return Gn(e).getCurrentScope();
3656
+ return Wn(e).getCurrentScope();
3657
3657
  }
3658
3658
  function yo() {
3659
3659
  const e = Ot();
3660
- return Gn(e).getIsolationScope();
3660
+ return Wn(e).getIsolationScope();
3661
3661
  }
3662
3662
  function mo() {
3663
3663
  return tt("globalScope", () => new ce());
3664
3664
  }
3665
3665
  function xt() {
3666
- return Wn().getClient();
3666
+ return Yn().getClient();
3667
3667
  }
3668
3668
  function Co(e) {
3669
3669
  const t = e.getPropagationContext(), { traceId: n, spanId: r, parentSpanId: o } = t;
@@ -3699,19 +3699,19 @@ function wo(e) {
3699
3699
  return n;
3700
3700
  }
3701
3701
  function To(e) {
3702
- if (!(!e || !jn(e) && !Array.isArray(e)))
3702
+ if (!(!e || !Jn(e) && !Array.isArray(e)))
3703
3703
  return Array.isArray(e) ? e.reduce((t, n) => {
3704
- const r = gn(n);
3704
+ const r = yn(n);
3705
3705
  return Object.entries(r).forEach(([o, i]) => {
3706
3706
  t[o] = i;
3707
3707
  }), t;
3708
- }, {}) : gn(e);
3708
+ }, {}) : yn(e);
3709
3709
  }
3710
- function gn(e) {
3710
+ function yn(e) {
3711
3711
  return e.split(",").map((t) => t.split("=").map((n) => decodeURIComponent(n.trim()))).reduce((t, [n, r]) => (n && r && (t[n] = r), t), {});
3712
3712
  }
3713
3713
  const Lo = 1;
3714
- let yn = !1;
3714
+ let mn = !1;
3715
3715
  function Ro(e) {
3716
3716
  const { spanId: t, traceId: n, isRemote: r } = e.spanContext(), o = r ? t : Ut(e).parent_span_id, i = r ? vt() : t;
3717
3717
  return V({
@@ -3720,10 +3720,10 @@ function Ro(e) {
3720
3720
  trace_id: n
3721
3721
  });
3722
3722
  }
3723
- function mn(e) {
3724
- return typeof e == "number" ? Cn(e) : Array.isArray(e) ? e[0] + e[1] / 1e9 : e instanceof Date ? Cn(e.getTime()) : Kn();
3725
- }
3726
3723
  function Cn(e) {
3724
+ return typeof e == "number" ? bn(e) : Array.isArray(e) ? e[0] + e[1] / 1e9 : e instanceof Date ? bn(e.getTime()) : Gn();
3725
+ }
3726
+ function bn(e) {
3727
3727
  return e > 9999999999 ? e / 1e3 : e;
3728
3728
  }
3729
3729
  function Ut(e) {
@@ -3739,9 +3739,9 @@ function Ut(e) {
3739
3739
  data: r,
3740
3740
  description: i,
3741
3741
  parent_span_id: u,
3742
- start_timestamp: mn(o),
3742
+ start_timestamp: Cn(o),
3743
3743
  // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
3744
- timestamp: mn(c) || void 0,
3744
+ timestamp: Cn(c) || void 0,
3745
3745
  status: Mo(l),
3746
3746
  op: r[Bo],
3747
3747
  origin: r[So],
@@ -3772,15 +3772,15 @@ function Mo(e) {
3772
3772
  return e.code === Qo ? "ok" : e.message || "unknown_error";
3773
3773
  }
3774
3774
  const xo = "_sentryRootSpan";
3775
- function Yn(e) {
3775
+ function Vn(e) {
3776
3776
  return e[xo] || e;
3777
3777
  }
3778
3778
  function Uo() {
3779
- yn || (nt(() => {
3779
+ mn || (nt(() => {
3780
3780
  console.warn(
3781
3781
  "[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly."
3782
3782
  );
3783
- }), yn = !0);
3783
+ }), mn = !0);
3784
3784
  }
3785
3785
  function Fo(e) {
3786
3786
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
@@ -3788,10 +3788,10 @@ function Fo(e) {
3788
3788
  const t = xt(), n = t && t.getOptions();
3789
3789
  return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
3790
3790
  }
3791
- const Vn = "production", Xo = "_frozenDsc";
3792
- function Zn(e, t) {
3791
+ const Zn = "production", Xo = "_frozenDsc";
3792
+ function $n(e, t) {
3793
3793
  const n = t.getOptions(), { publicKey: r } = t.getDsn() || {}, o = V({
3794
- environment: n.environment || Vn,
3794
+ environment: n.environment || Zn,
3795
3795
  release: n.release,
3796
3796
  public_key: r,
3797
3797
  trace_id: e
@@ -3800,22 +3800,22 @@ function Zn(e, t) {
3800
3800
  }
3801
3801
  function Ho(e, t) {
3802
3802
  const n = t.getPropagationContext();
3803
- return n.dsc || Zn(n.traceId, e);
3803
+ return n.dsc || $n(n.traceId, e);
3804
3804
  }
3805
3805
  function jo(e) {
3806
3806
  const t = xt();
3807
3807
  if (!t)
3808
3808
  return {};
3809
- const n = Yn(e), r = n[Xo];
3809
+ const n = Vn(e), r = n[Xo];
3810
3810
  if (r)
3811
3811
  return r;
3812
3812
  const o = n.spanContext().traceState, i = o && o.get("sentry.dsc"), c = i && wo(i);
3813
3813
  if (c)
3814
3814
  return c;
3815
- const u = Zn(e.spanContext().traceId, t), l = Ut(n), h = l.data || {}, y = h[Io];
3815
+ const u = $n(e.spanContext().traceId, t), l = Ut(n), h = l.data || {}, y = h[Io];
3816
3816
  y != null && (u.sample_rate = `${y}`);
3817
- const C = h[vo], b = l.description;
3818
- return C !== "url" && b && (u.transaction = b), Fo() && (u.sampled = String(Do(n))), t.emit("createDsc", u, n), u;
3817
+ const m = h[vo], b = l.description;
3818
+ return m !== "url" && b && (u.transaction = b), Fo() && (u.sampled = String(Do(n))), t.emit("createDsc", u, n), u;
3819
3819
  }
3820
3820
  function Jo(e) {
3821
3821
  if (typeof e == "boolean")
@@ -3851,12 +3851,12 @@ function Ko(e) {
3851
3851
  let l = "", h = u;
3852
3852
  const y = h.split("/");
3853
3853
  if (y.length > 1 && (l = y.slice(0, -1).join("/"), h = y.pop()), h) {
3854
- const C = h.match(/^\d+/);
3855
- C && (h = C[0]);
3854
+ const m = h.match(/^\d+/);
3855
+ m && (h = m[0]);
3856
3856
  }
3857
- return $n({ host: i, pass: o, path: l, projectId: h, port: c, protocol: n, publicKey: r });
3857
+ return er({ host: i, pass: o, path: l, projectId: h, port: c, protocol: n, publicKey: r });
3858
3858
  }
3859
- function $n(e) {
3859
+ function er(e) {
3860
3860
  return {
3861
3861
  protocol: e.protocol,
3862
3862
  publicKey: e.publicKey || "",
@@ -3874,7 +3874,7 @@ function Go(e) {
3874
3874
  return ["protocol", "publicKey", "host", "projectId"].find((c) => e[c] ? !1 : (N.error(`Invalid Sentry Dsn: ${c} missing`), !0)) ? !1 : n.match(/^\d+$/) ? zo(r) ? t && isNaN(parseInt(t, 10)) ? (N.error(`Invalid Sentry Dsn: Invalid port ${t}`), !1) : !0 : (N.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (N.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
3875
3875
  }
3876
3876
  function Wo(e) {
3877
- const t = typeof e == "string" ? Ko(e) : $n(e);
3877
+ const t = typeof e == "string" ? Ko(e) : er(e);
3878
3878
  if (!(!t || !Go(t)))
3879
3879
  return t;
3880
3880
  }
@@ -3907,9 +3907,9 @@ function oe(e, t = 100, n = 1 / 0) {
3907
3907
  return { ERROR: `**non-serializable** (${r})` };
3908
3908
  }
3909
3909
  }
3910
- function er(e, t = 3, n = 100 * 1024) {
3910
+ function tr(e, t = 3, n = 100 * 1024) {
3911
3911
  const r = oe(e, t);
3912
- return es(r) > n ? er(e, t - 1, n) : r;
3912
+ return es(r) > n ? tr(e, t - 1, n) : r;
3913
3913
  }
3914
3914
  function Bt(e, t, n = 1 / 0, r = 1 / 0, o = Yo()) {
3915
3915
  const [i, c] = o;
@@ -3934,17 +3934,17 @@ function Bt(e, t, n = 1 / 0, r = 1 / 0, o = Yo()) {
3934
3934
  } catch {
3935
3935
  }
3936
3936
  const y = Array.isArray(t) ? [] : {};
3937
- let C = 0;
3938
- const b = qn(t);
3937
+ let m = 0;
3938
+ const b = zn(t);
3939
3939
  for (const I in b) {
3940
3940
  if (!Object.prototype.hasOwnProperty.call(b, I))
3941
3941
  continue;
3942
- if (C >= r) {
3942
+ if (m >= r) {
3943
3943
  y[I] = "[MaxProperties ~]";
3944
3944
  break;
3945
3945
  }
3946
3946
  const B = b[I];
3947
- y[I] = Bt(I, B, l - 1, r, o), C++;
3947
+ y[I] = Bt(I, B, l - 1, r, o), m++;
3948
3948
  }
3949
3949
  return c(t), y;
3950
3950
  }
@@ -3995,7 +3995,7 @@ function ts(e, t) {
3995
3995
  const [n, r] = e;
3996
3996
  return [n, [...r, t]];
3997
3997
  }
3998
- function bn(e, t) {
3998
+ function En(e, t) {
3999
3999
  const n = e[1];
4000
4000
  for (const r of n) {
4001
4001
  const o = r[0].type;
@@ -4069,10 +4069,10 @@ const ss = {
4069
4069
  statsd: "metric_bucket",
4070
4070
  raw_security: "security"
4071
4071
  };
4072
- function En(e) {
4072
+ function vn(e) {
4073
4073
  return ss[e];
4074
4074
  }
4075
- function tr(e) {
4075
+ function nr(e) {
4076
4076
  if (!e || !e.sdk)
4077
4077
  return;
4078
4078
  const { name: t, version: n } = e.sdk;
@@ -4094,7 +4094,7 @@ function as(e, t) {
4094
4094
  return t && (e.sdk = e.sdk || {}, e.sdk.name = e.sdk.name || t.name, e.sdk.version = e.sdk.version || t.version, e.sdk.integrations = [...e.sdk.integrations || [], ...t.integrations || []], e.sdk.packages = [...e.sdk.packages || [], ...t.packages || []]), e;
4095
4095
  }
4096
4096
  function cs(e, t, n, r) {
4097
- const o = tr(n), i = {
4097
+ const o = nr(n), i = {
4098
4098
  sent_at: (/* @__PURE__ */ new Date()).toISOString(),
4099
4099
  ...o && { sdk: o },
4100
4100
  ...!!r && t && { dsn: ct(t) }
@@ -4102,7 +4102,7 @@ function cs(e, t, n, r) {
4102
4102
  return we(i, [c]);
4103
4103
  }
4104
4104
  function us(e, t, n, r) {
4105
- const o = tr(n), i = e.type && e.type !== "replay_event" ? e.type : "event";
4105
+ const o = nr(n), i = e.type && e.type !== "replay_event" ? e.type : "event";
4106
4106
  as(e, n && n.sdk);
4107
4107
  const c = is(e, o, r, t);
4108
4108
  return delete e.sdkProcessingMetadata, we(c, [[{ type: i }, e]]);
@@ -4118,13 +4118,13 @@ function _t(e, t, n, r = 0) {
4118
4118
  }
4119
4119
  });
4120
4120
  }
4121
- let Ne, vn, De;
4121
+ let Ne, In, De;
4122
4122
  function ls(e) {
4123
4123
  const t = j._sentryDebugIds;
4124
4124
  if (!t)
4125
4125
  return {};
4126
4126
  const n = Object.keys(t);
4127
- return De && n.length === vn || (vn = n.length, De = n.reduce((r, o) => {
4127
+ return De && n.length === In || (In = n.length, De = n.reduce((r, o) => {
4128
4128
  Ne || (Ne = {});
4129
4129
  const i = Ne[o];
4130
4130
  if (i)
@@ -4146,7 +4146,7 @@ function As(e, t) {
4146
4146
  const { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: i } = t;
4147
4147
  ds(e, t), r && ps(e, r), gs(e, n), fs(e, o), hs(e, i);
4148
4148
  }
4149
- function In(e, t) {
4149
+ function Bn(e, t) {
4150
4150
  const {
4151
4151
  extra: n,
4152
4152
  tags: r,
@@ -4157,12 +4157,12 @@ function In(e, t) {
4157
4157
  breadcrumbs: l,
4158
4158
  fingerprint: h,
4159
4159
  eventProcessors: y,
4160
- attachments: C,
4160
+ attachments: m,
4161
4161
  propagationContext: b,
4162
4162
  transactionName: I,
4163
4163
  span: B
4164
4164
  } = t;
4165
- Me(e, "extra", n), Me(e, "tags", r), Me(e, "user", o), Me(e, "contexts", i), e.sdkProcessingMetadata = at(e.sdkProcessingMetadata, u, 2), c && (e.level = c), I && (e.transactionName = I), B && (e.span = B), l.length && (e.breadcrumbs = [...e.breadcrumbs, ...l]), h.length && (e.fingerprint = [...e.fingerprint, ...h]), y.length && (e.eventProcessors = [...e.eventProcessors, ...y]), C.length && (e.attachments = [...e.attachments, ...C]), e.propagationContext = { ...e.propagationContext, ...b };
4165
+ Me(e, "extra", n), Me(e, "tags", r), Me(e, "user", o), Me(e, "contexts", i), e.sdkProcessingMetadata = at(e.sdkProcessingMetadata, u, 2), c && (e.level = c), I && (e.transactionName = I), B && (e.span = B), l.length && (e.breadcrumbs = [...e.breadcrumbs, ...l]), h.length && (e.fingerprint = [...e.fingerprint, ...h]), y.length && (e.eventProcessors = [...e.eventProcessors, ...y]), m.length && (e.attachments = [...e.attachments, ...m]), e.propagationContext = { ...e.propagationContext, ...b };
4166
4166
  }
4167
4167
  function Me(e, t, n) {
4168
4168
  e[t] = at(e[t], n, 1);
@@ -4174,8 +4174,8 @@ function ds(e, t) {
4174
4174
  h && Object.keys(h).length && (e.tags = { ...h, ...e.tags });
4175
4175
  const y = V(o);
4176
4176
  y && Object.keys(y).length && (e.user = { ...y, ...e.user });
4177
- const C = V(i);
4178
- C && Object.keys(C).length && (e.contexts = { ...C, ...e.contexts }), c && (e.level = c), u && e.type !== "transaction" && (e.transaction = u);
4177
+ const m = V(i);
4178
+ m && Object.keys(m).length && (e.contexts = { ...m, ...e.contexts }), c && (e.level = c), u && e.type !== "transaction" && (e.transaction = u);
4179
4179
  }
4180
4180
  function fs(e, t) {
4181
4181
  const n = [...e.breadcrumbs || [], ...t];
@@ -4195,7 +4195,7 @@ function ps(e, t) {
4195
4195
  dynamicSamplingContext: jo(t),
4196
4196
  ...e.sdkProcessingMetadata
4197
4197
  };
4198
- const n = Yn(t), r = Ut(n).description;
4198
+ const n = Vn(t), r = Ut(n).description;
4199
4199
  r && !e.transaction && e.type === "transaction" && (e.transaction = r);
4200
4200
  }
4201
4201
  function gs(e, t) {
@@ -4210,19 +4210,19 @@ function ys(e, t, n, r, o, i) {
4210
4210
  ms(l, e), Es(l, h), o && o.emit("applyFrameMetadata", t), t.type === void 0 && Cs(l, e.stackParser);
4211
4211
  const y = Is(r, n.captureContext);
4212
4212
  n.mechanism && _e(l, n.mechanism);
4213
- const C = o ? o.getEventProcessors() : [], b = mo().getScopeData();
4213
+ const m = o ? o.getEventProcessors() : [], b = mo().getScopeData();
4214
4214
  if (i) {
4215
4215
  const S = i.getScopeData();
4216
- In(b, S);
4216
+ Bn(b, S);
4217
4217
  }
4218
4218
  if (y) {
4219
4219
  const S = y.getScopeData();
4220
- In(b, S);
4220
+ Bn(b, S);
4221
4221
  }
4222
4222
  const I = [...n.attachments || [], ...b.attachments];
4223
4223
  I.length && (n.attachments = I), As(l, b);
4224
4224
  const B = [
4225
- ...C,
4225
+ ...m,
4226
4226
  // Run scope event processors _after_ all other processors
4227
4227
  ...b.eventProcessors
4228
4228
  ];
@@ -4230,7 +4230,7 @@ function ys(e, t, n, r, o, i) {
4230
4230
  }
4231
4231
  function ms(e, t) {
4232
4232
  const { environment: n, release: r, dist: o, maxValueLength: i = 250 } = t;
4233
- e.environment = e.environment || n || Vn, !e.release && r && (e.release = r), !e.dist && o && (e.dist = o), e.message && (e.message = Se(e.message, i));
4233
+ e.environment = e.environment || n || Zn, !e.release && r && (e.release = r), !e.dist && o && (e.dist = o), e.message && (e.message = Se(e.message, i));
4234
4234
  const c = e.exception && e.exception.values && e.exception.values[0];
4235
4235
  c && c.value && (c.value = Se(c.value, i));
4236
4236
  const u = e.request;
@@ -4325,23 +4325,23 @@ function Qs(e, t) {
4325
4325
  function ks(e, t, n) {
4326
4326
  return t || `${_s(e)}?${Qs(e, n)}`;
4327
4327
  }
4328
- const Bn = [];
4328
+ const Sn = [];
4329
4329
  function Ps(e, t) {
4330
4330
  const n = {};
4331
4331
  return t.forEach((r) => {
4332
- r && nr(e, r, n);
4332
+ r && rr(e, r, n);
4333
4333
  }), n;
4334
4334
  }
4335
- function Sn(e, t) {
4335
+ function _n(e, t) {
4336
4336
  for (const n of t)
4337
4337
  n && n.afterAllSetup && n.afterAllSetup(e);
4338
4338
  }
4339
- function nr(e, t, n) {
4339
+ function rr(e, t, n) {
4340
4340
  if (n[t.name]) {
4341
4341
  U && N.log(`Integration skipped because it was already installed: ${t.name}`);
4342
4342
  return;
4343
4343
  }
4344
- if (n[t.name] = t, Bn.indexOf(t.name) === -1 && typeof t.setupOnce == "function" && (t.setupOnce(), Bn.push(t.name)), t.setup && typeof t.setup == "function" && t.setup(e), typeof t.preprocessEvent == "function") {
4344
+ if (n[t.name] = t, Sn.indexOf(t.name) === -1 && typeof t.setupOnce == "function" && (t.setupOnce(), Sn.push(t.name)), t.setup && typeof t.setup == "function" && t.setup(e), typeof t.preprocessEvent == "function") {
4345
4345
  const r = t.preprocessEvent.bind(t);
4346
4346
  e.on("preprocessEvent", (o, i) => r(o, i, e));
4347
4347
  }
@@ -4368,7 +4368,7 @@ class Y extends Error {
4368
4368
  super(t), this.message = t, this.logLevel = n;
4369
4369
  }
4370
4370
  }
4371
- const _n = "Not capturing exception because it's already been captured.";
4371
+ const Qn = "Not capturing exception because it's already been captured.";
4372
4372
  class Ts {
4373
4373
  /** Options passed to the SDK. */
4374
4374
  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
@@ -4407,8 +4407,8 @@ class Ts {
4407
4407
  */
4408
4408
  captureException(t, n, r) {
4409
4409
  const o = te();
4410
- if (An(t))
4411
- return U && N.log(_n), o;
4410
+ if (dn(t))
4411
+ return U && N.log(Qn), o;
4412
4412
  const i = {
4413
4413
  event_id: o,
4414
4414
  ...n
@@ -4434,8 +4434,8 @@ class Ts {
4434
4434
  */
4435
4435
  captureEvent(t, n, r) {
4436
4436
  const o = te();
4437
- if (n && n.originalException && An(n.originalException))
4438
- return U && N.log(_n), o;
4437
+ if (n && n.originalException && dn(n.originalException))
4438
+ return U && N.log(Qn), o;
4439
4439
  const i = {
4440
4440
  event_id: o,
4441
4441
  ...n
@@ -4517,7 +4517,7 @@ class Ts {
4517
4517
  */
4518
4518
  addIntegration(t) {
4519
4519
  const n = this._integrations[t.name];
4520
- nr(this, t, this._integrations), n || Sn(this, [t]);
4520
+ rr(this, t, this._integrations), n || _n(this, [t]);
4521
4521
  }
4522
4522
  /**
4523
4523
  * @inheritDoc
@@ -4573,7 +4573,7 @@ class Ts {
4573
4573
  /** Setup integrations for this client. */
4574
4574
  _setupIntegrations() {
4575
4575
  const { integrations: t } = this._options;
4576
- this._integrations = Ps(this, t), Sn(this, t);
4576
+ this._integrations = Ps(this, t), _n(this, t);
4577
4577
  }
4578
4578
  /** Updates existing session based on the provided event */
4579
4579
  _updateSessionFromEvent(t, n) {
@@ -4631,7 +4631,7 @@ class Ts {
4631
4631
  * @param currentScope A scope containing event metadata.
4632
4632
  * @returns A new event with more information.
4633
4633
  */
4634
- _prepareEvent(t, n, r = Wn(), o = yo()) {
4634
+ _prepareEvent(t, n, r = Yn(), o = yo()) {
4635
4635
  const i = this.getOptions(), c = Object.keys(this._integrations);
4636
4636
  return !n.integrations && c.length > 0 && (n.integrations = c), this.emit("preprocessEvent", t, n), t.type || o.setLastEventId(t.event_id || n.event_id), ys(i, t, n, r, this, o).then((u) => {
4637
4637
  if (u === null)
@@ -4675,7 +4675,7 @@ class Ts {
4675
4675
  * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
4676
4676
  */
4677
4677
  _processEvent(t, n, r) {
4678
- const o = this.getOptions(), { sampleRate: i } = o, c = or(t), u = rr(t), l = t.type || "error", h = `before send for type \`${l}\``, y = typeof i > "u" ? void 0 : Jo(i);
4678
+ const o = this.getOptions(), { sampleRate: i } = o, c = sr(t), u = or(t), l = t.type || "error", h = `before send for type \`${l}\``, y = typeof i > "u" ? void 0 : Jo(i);
4679
4679
  if (u && typeof y == "number" && Math.random() > y)
4680
4680
  return this.recordDroppedEvent("sample_rate", "error", t), Ge(
4681
4681
  new Y(
@@ -4683,17 +4683,17 @@ class Ts {
4683
4683
  "log"
4684
4684
  )
4685
4685
  );
4686
- const C = l === "replay_event" ? "replay" : l, I = (t.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
4686
+ const m = l === "replay_event" ? "replay" : l, I = (t.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
4687
4687
  return this._prepareEvent(t, n, r, I).then((B) => {
4688
4688
  if (B === null)
4689
- throw this.recordDroppedEvent("event_processor", C, t), new Y("An event processor returned `null`, will not send event.", "log");
4689
+ throw this.recordDroppedEvent("event_processor", m, t), new Y("An event processor returned `null`, will not send event.", "log");
4690
4690
  if (n.data && n.data.__sentry__ === !0)
4691
4691
  return B;
4692
4692
  const S = Rs(this, o, B, n);
4693
4693
  return Ls(S, h);
4694
4694
  }).then((B) => {
4695
4695
  if (B === null) {
4696
- if (this.recordDroppedEvent("before_send", C, t), c) {
4696
+ if (this.recordDroppedEvent("before_send", m, t), c) {
4697
4697
  const k = 1 + (t.spans || []).length;
4698
4698
  this.recordDroppedEvent("before_send", "span", k);
4699
4699
  }
@@ -4789,9 +4789,9 @@ function Ls(e, t) {
4789
4789
  }
4790
4790
  function Rs(e, t, n, r) {
4791
4791
  const { beforeSend: o, beforeSendTransaction: i, beforeSendSpan: c } = t;
4792
- if (rr(n) && o)
4792
+ if (or(n) && o)
4793
4793
  return o(n, r);
4794
- if (or(n)) {
4794
+ if (sr(n)) {
4795
4795
  if (n.spans && c) {
4796
4796
  const u = [];
4797
4797
  for (const l of n.spans) {
@@ -4813,10 +4813,10 @@ function Rs(e, t, n, r) {
4813
4813
  }
4814
4814
  return n;
4815
4815
  }
4816
- function rr(e) {
4816
+ function or(e) {
4817
4817
  return e.type === void 0;
4818
4818
  }
4819
- function or(e) {
4819
+ function sr(e) {
4820
4820
  return e.type === "transaction";
4821
4821
  }
4822
4822
  function Os(e) {
@@ -4845,8 +4845,8 @@ function Os(e) {
4845
4845
  const y = setTimeout(() => {
4846
4846
  c && c > 0 && u(!1);
4847
4847
  }, c);
4848
- t.forEach((C) => {
4849
- he(C).then(() => {
4848
+ t.forEach((m) => {
4849
+ he(m).then(() => {
4850
4850
  --h || (clearTimeout(y), u(!0));
4851
4851
  }, l);
4852
4852
  });
@@ -4878,7 +4878,7 @@ function Us(e, { statusCode: t, headers: n }, r = Date.now()) {
4878
4878
  }, i = n && n["x-sentry-rate-limits"], c = n && n["retry-after"];
4879
4879
  if (i)
4880
4880
  for (const u of i.trim().split(",")) {
4881
- const [l, h, , , y] = u.split(":", 5), C = parseInt(l, 10), b = (isNaN(C) ? 60 : C) * 1e3;
4881
+ const [l, h, , , y] = u.split(":", 5), m = parseInt(l, 10), b = (isNaN(m) ? 60 : m) * 1e3;
4882
4882
  if (!h)
4883
4883
  o.all = r + b;
4884
4884
  else
@@ -4896,32 +4896,32 @@ function Xs(e, t, n = Os(
4896
4896
  const o = (c) => n.drain(c);
4897
4897
  function i(c) {
4898
4898
  const u = [];
4899
- if (bn(c, (C, b) => {
4900
- const I = En(b);
4899
+ if (En(c, (m, b) => {
4900
+ const I = vn(b);
4901
4901
  if (xs(r, I)) {
4902
- const B = Qn(C, b);
4902
+ const B = kn(m, b);
4903
4903
  e.recordDroppedEvent("ratelimit_backoff", I, B);
4904
4904
  } else
4905
- u.push(C);
4905
+ u.push(m);
4906
4906
  }), u.length === 0)
4907
4907
  return he({});
4908
- const l = we(c[0], u), h = (C) => {
4909
- bn(l, (b, I) => {
4910
- const B = Qn(b, I);
4911
- e.recordDroppedEvent(C, En(I), B);
4908
+ const l = we(c[0], u), h = (m) => {
4909
+ En(l, (b, I) => {
4910
+ const B = kn(b, I);
4911
+ e.recordDroppedEvent(m, vn(I), B);
4912
4912
  });
4913
4913
  }, y = () => t({ body: ns(l) }).then(
4914
- (C) => (C.statusCode !== void 0 && (C.statusCode < 200 || C.statusCode >= 300) && U && N.warn(`Sentry responded with status code ${C.statusCode} to sent event.`), r = Us(r, C), C),
4915
- (C) => {
4916
- throw h("network_error"), C;
4914
+ (m) => (m.statusCode !== void 0 && (m.statusCode < 200 || m.statusCode >= 300) && U && N.warn(`Sentry responded with status code ${m.statusCode} to sent event.`), r = Us(r, m), m),
4915
+ (m) => {
4916
+ throw h("network_error"), m;
4917
4917
  }
4918
4918
  );
4919
4919
  return n.add(y).then(
4920
- (C) => C,
4921
- (C) => {
4922
- if (C instanceof Y)
4920
+ (m) => m,
4921
+ (m) => {
4922
+ if (m instanceof Y)
4923
4923
  return U && N.error("Skipped sending event because buffer is full."), h("queue_overflow"), he({});
4924
- throw C;
4924
+ throw m;
4925
4925
  }
4926
4926
  );
4927
4927
  }
@@ -4930,7 +4930,7 @@ function Xs(e, t, n = Os(
4930
4930
  flush: o
4931
4931
  };
4932
4932
  }
4933
- function Qn(e, t) {
4933
+ function kn(e, t) {
4934
4934
  if (!(t !== "event" && t !== "transaction"))
4935
4935
  return Array.isArray(e) ? e[1] : void 0;
4936
4936
  }
@@ -4952,7 +4952,7 @@ function Js() {
4952
4952
  return "npm";
4953
4953
  }
4954
4954
  const xe = j, qs = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
4955
- function sr(e, t) {
4955
+ function ir(e, t) {
4956
4956
  const n = Ft(e, t), r = {
4957
4957
  type: Ys(t),
4958
4958
  value: Vs(t)
@@ -4961,12 +4961,12 @@ function sr(e, t) {
4961
4961
  }
4962
4962
  function zs(e, t, n, r) {
4963
4963
  const o = xt(), i = o && o.getOptions().normalizeDepth, c = ri(t), u = {
4964
- __serialized__: er(t, i)
4964
+ __serialized__: tr(t, i)
4965
4965
  };
4966
4966
  if (c)
4967
4967
  return {
4968
4968
  exception: {
4969
- values: [sr(e, c)]
4969
+ values: [ir(e, c)]
4970
4970
  },
4971
4971
  extra: u
4972
4972
  };
@@ -4990,7 +4990,7 @@ function zs(e, t, n, r) {
4990
4990
  function ht(e, t) {
4991
4991
  return {
4992
4992
  exception: {
4993
- values: [sr(e, t)]
4993
+ values: [ir(e, t)]
4994
4994
  }
4995
4995
  };
4996
4996
  }
@@ -5009,16 +5009,16 @@ function Gs(e) {
5009
5009
  function Ws(e) {
5010
5010
  return typeof e.framesToPop == "number" ? e.framesToPop : 0;
5011
5011
  }
5012
- function ir(e) {
5012
+ function ar(e) {
5013
5013
  return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? e instanceof WebAssembly.Exception : !1;
5014
5014
  }
5015
5015
  function Ys(e) {
5016
5016
  const t = e && e.name;
5017
- return !t && ir(e) ? e.message && Array.isArray(e.message) && e.message.length == 2 ? e.message[0] : "WebAssembly.Exception" : t;
5017
+ return !t && ar(e) ? e.message && Array.isArray(e.message) && e.message.length == 2 ? e.message[0] : "WebAssembly.Exception" : t;
5018
5018
  }
5019
5019
  function Vs(e) {
5020
5020
  const t = e && e.message;
5021
- return t ? t.error && typeof t.error.message == "string" ? t.error.message : ir(e) && Array.isArray(e.message) && e.message.length == 2 ? e.message[1] : t : "No error message";
5021
+ return t ? t.error && typeof t.error.message == "string" ? t.error.message : ar(e) && Array.isArray(e.message) && e.message.length == 2 ? e.message[1] : t : "No error message";
5022
5022
  }
5023
5023
  function Zs(e, t, n, r) {
5024
5024
  const o = n && n.syntheticException || void 0, i = ei(e, t, o, r);
@@ -5030,21 +5030,21 @@ function $s(e, t, n = "info", r, o) {
5030
5030
  }
5031
5031
  function ei(e, t, n, r, o) {
5032
5032
  let i;
5033
- if (Hn(t) && t.error)
5033
+ if (jn(t) && t.error)
5034
5034
  return ht(e, t.error);
5035
- if (an(t) || Wr(t)) {
5035
+ if (cn(t) || Wr(t)) {
5036
5036
  const c = t;
5037
5037
  if ("stack" in t)
5038
5038
  i = ht(e, t);
5039
5039
  else {
5040
- const u = c.name || (an(c) ? "DOMError" : "DOMException"), l = c.message ? `${u}: ${c.message}` : u;
5041
- i = Qt(e, l, n, r), ln(i, l);
5040
+ const u = c.name || (cn(c) ? "DOMError" : "DOMException"), l = c.message ? `${u}: ${c.message}` : u;
5041
+ i = Qt(e, l, n, r), An(i, l);
5042
5042
  }
5043
5043
  return "code" in c && (i.tags = { ...i.tags, "DOMException.code": `${c.code}` }), i;
5044
5044
  }
5045
- return Xn(t) ? ht(e, t) : Ee(t) || rt(t) ? (i = zs(e, t, n, o), _e(i, {
5045
+ return Hn(t) ? ht(e, t) : Ee(t) || rt(t) ? (i = zs(e, t, n, o), _e(i, {
5046
5046
  synthetic: !0
5047
- }), i) : (i = Qt(e, t, n, r), ln(i, `${t}`), _e(i, {
5047
+ }), i) : (i = Qt(e, t, n, r), An(i, `${t}`), _e(i, {
5048
5048
  synthetic: !0
5049
5049
  }), i);
5050
5050
  }
@@ -5067,7 +5067,7 @@ function Qt(e, t, n, r) {
5067
5067
  }
5068
5068
  function ti(e, { isUnhandledRejection: t }) {
5069
5069
  const n = oo(e), r = "exception";
5070
- return Hn(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : rt(e) ? `Event \`${ni(e)}\` (type=${e.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
5070
+ return jn(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : rt(e) ? `Event \`${ni(e)}\` (type=${e.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
5071
5071
  }
5072
5072
  function ni(e) {
5073
5073
  try {
@@ -5179,7 +5179,7 @@ function ci(e) {
5179
5179
  }
5180
5180
  return n && (He[e] = n.bind(Ue));
5181
5181
  }
5182
- function kn(e) {
5182
+ function Pn(e) {
5183
5183
  He[e] = void 0;
5184
5184
  }
5185
5185
  function ui(e, t = ci("fetch")) {
@@ -5207,7 +5207,7 @@ function ui(e, t = ci("fetch")) {
5207
5207
  ...e.fetchOptions
5208
5208
  };
5209
5209
  if (!t)
5210
- return kn("fetch"), Ge("No fetch implementation available");
5210
+ return Pn("fetch"), Ge("No fetch implementation available");
5211
5211
  try {
5212
5212
  return t(e.url, u).then((l) => (n -= c, r--, {
5213
5213
  statusCode: l.status,
@@ -5217,7 +5217,7 @@ function ui(e, t = ci("fetch")) {
5217
5217
  }
5218
5218
  }));
5219
5219
  } catch (l) {
5220
- return kn("fetch"), n -= c, r--, Ge(l);
5220
+ return Pn("fetch"), n -= c, r--, Ge(l);
5221
5221
  }
5222
5222
  }
5223
5223
  return Xs(e, o);
@@ -5244,7 +5244,7 @@ const di = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, fi = /^\s*at (?:(.+?\)(?: \
5244
5244
  const c = hi.exec(n[2]);
5245
5245
  c && (n[2] = c[1], n[3] = c[2], n[4] = c[3]);
5246
5246
  }
5247
- const [o, i] = ar(n[1] || be, n[2]);
5247
+ const [o, i] = cr(n[1] || be, n[2]);
5248
5248
  return kt(i, o, n[3] ? +n[3] : void 0, n[4] ? +n[4] : void 0);
5249
5249
  }
5250
5250
  }, gi = [li, pi], yi = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, mi = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, Ci = (e) => {
@@ -5255,9 +5255,9 @@ const di = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, fi = /^\s*at (?:(.+?\)(?: \
5255
5255
  i && (t[1] = t[1] || "eval", t[3] = i[1], t[4] = i[2], t[5] = "");
5256
5256
  }
5257
5257
  let r = t[3], o = t[1] || be;
5258
- return [o, r] = ar(o, r), kt(r, o, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
5258
+ return [o, r] = cr(o, r), kt(r, o, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
5259
5259
  }
5260
- }, bi = [Ai, Ci], Ei = [gi, bi], vi = zr(...Ei), ar = (e, t) => {
5260
+ }, bi = [Ai, Ci], Ei = [gi, bi], vi = zr(...Ei), cr = (e, t) => {
5261
5261
  const n = e.indexOf("safari-extension") !== -1, r = e.indexOf("safari-web-extension") !== -1;
5262
5262
  return n || r ? [
5263
5263
  e.indexOf("@") !== -1 ? e.split("@")[0] : be,
@@ -5271,7 +5271,7 @@ function Bi(e) {
5271
5271
  transport: ui,
5272
5272
  stackParser: vi,
5273
5273
  integrations: [],
5274
- release: "1.1.46",
5274
+ release: "1.1.47",
5275
5275
  environment: e.environment || "production"
5276
5276
  }), n = new ce();
5277
5277
  n.setClient(t), n.setTags(e), t.init(), Pt = n;
@@ -5285,14 +5285,14 @@ function se(e, t) {
5285
5285
  function wt(e, t) {
5286
5286
  mt("webPayToken", e), t && mt("webPayRefreshToken", t);
5287
5287
  }
5288
- function Pn() {
5288
+ function wn() {
5289
5289
  Ke("webPayToken"), Ke("webPayRefreshToken");
5290
5290
  }
5291
5291
  async function Si(e) {
5292
- const t = Mn("webPayRefreshToken");
5292
+ const t = xn("webPayRefreshToken");
5293
5293
  if (t && e.config.clientId)
5294
5294
  try {
5295
- const r = await Nr(
5295
+ const r = await Dr(
5296
5296
  e.apiUrl,
5297
5297
  e.config.clientId,
5298
5298
  t
@@ -5306,7 +5306,7 @@ async function Si(e) {
5306
5306
  e.config.onError({ attributes: { message: e.t("errorMissingTrackClient") } });
5307
5307
  return;
5308
5308
  }
5309
- const n = await Or(
5309
+ const n = await Nr(
5310
5310
  e.apiUrl,
5311
5311
  e.config.clientId,
5312
5312
  e.config.trackId
@@ -5389,7 +5389,7 @@ const Xt = `<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="h
5389
5389
  function We(e) {
5390
5390
  return Ri(e == null ? void 0 : e.iconType);
5391
5391
  }
5392
- function cr(e, t, n, r = {}) {
5392
+ function ur(e, t, n, r = {}) {
5393
5393
  const { editMode: o = !1 } = r;
5394
5394
  return (o ? e.filter((c) => c.type === "card") : e).map((c) => {
5395
5395
  const u = !o && !!t && t.type === c.type && t.cardId === c.cardId, l = JSON.stringify(c).replace(/'/g, "&apos;");
@@ -5528,7 +5528,7 @@ function Fi(e) {
5528
5528
  useBalance: l,
5529
5529
  bonuses: h,
5530
5530
  useBonuses: y,
5531
- coupon: C,
5531
+ coupon: m,
5532
5532
  useCoupon: b,
5533
5533
  couponDisabled: I,
5534
5534
  cashbackFormatted: B,
@@ -5539,7 +5539,7 @@ function Fi(e) {
5539
5539
  freedomAmountFormatted: R,
5540
5540
  t: L,
5541
5541
  currency: q
5542
- } = e, D = (o == null ? void 0 : o.label) ?? L("selectMethod"), K = We(o), z = cr(i, c), J = xi(u, l, h, y, C, b, I, L, q), M = Ui(B, L), v = (c == null ? void 0 : c.type) === "google_pay", g = (c == null ? void 0 : c.type) === "apple_pay", p = v || g;
5542
+ } = e, D = (o == null ? void 0 : o.label) ?? L("selectMethod"), K = We(o), z = ur(i, c), J = xi(u, l, h, y, m, b, I, L, q), M = Ui(B, L), v = (c == null ? void 0 : c.type) === "google_pay", g = (c == null ? void 0 : c.type) === "apple_pay", p = v || g;
5543
5543
  return `
5544
5544
  <div class="choco-widget-bottom-bar" role="region" aria-label="${L("paymentMethod")}">
5545
5545
  ${J}
@@ -5676,7 +5676,7 @@ function Xi() {
5676
5676
  `;
5677
5677
  }
5678
5678
  function Hi(e, t, n, r = {}) {
5679
- return cr(e, t, n, r);
5679
+ return ur(e, t, n, r);
5680
5680
  }
5681
5681
  function ji(e) {
5682
5682
  return We(e);
@@ -5690,20 +5690,20 @@ function Ji(e) {
5690
5690
  }
5691
5691
  return { mountTarget: document.body, isEmbedded: !1 };
5692
5692
  }
5693
- function ur(e) {
5693
+ function lr(e) {
5694
5694
  if (typeof document > "u") return !1;
5695
5695
  e.container || (e.container = document.createElement("div"), e.container.id = "choco-one-click-widget", e.container.className = "choco-one-click-widget");
5696
5696
  const { mountTarget: t, isEmbedded: n } = Ji(e);
5697
5697
  return t ? (e.container.parentElement !== t && t.appendChild(e.container), e.container.classList.toggle("choco-one-click-widget--embedded", n), !0) : !1;
5698
5698
  }
5699
5699
  function qi(e) {
5700
- ur(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = Xi());
5700
+ lr(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = Xi());
5701
5701
  }
5702
5702
  function zi(e) {
5703
- var y, C, b, I, B;
5704
- if (e._destroyed || !ur(e)) return;
5703
+ var y, m, b, I, B;
5704
+ if (e._destroyed || !lr(e)) return;
5705
5705
  e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.classList.remove("choco-one-click-widget--visible");
5706
- const t = e.getAvailablePaymentMethods(), n = (y = e.checkoutContext) == null ? void 0 : y.data, r = e.config.currency || "KZT", o = (I = (b = (C = n == null ? void 0 : n.balance) == null ? void 0 : C.data) == null ? void 0 : b.money) == null ? void 0 : I[r], i = !e.config.disableUseBalance && o > 0 ? $(o, e.config.locale, e.config.currency) : null, c = (B = n == null ? void 0 : n.cashback) == null ? void 0 : B.data, u = (c == null ? void 0 : c.cashbackAmount) > 0 ? $(c.cashbackAmount, e.config.locale, e.config.currency) : null, l = e._getPayableAmount(), h = l < e.config.amount;
5706
+ const t = e.getAvailablePaymentMethods(), n = (y = e.checkoutContext) == null ? void 0 : y.data, r = e.config.currency || "KZT", o = (I = (b = (m = n == null ? void 0 : n.balance) == null ? void 0 : m.data) == null ? void 0 : b.money) == null ? void 0 : I[r], i = !e.config.disableUseBalance && o > 0 ? $(o, e.config.locale, e.config.currency) : null, c = (B = n == null ? void 0 : n.cashback) == null ? void 0 : B.data, u = (c == null ? void 0 : c.cashbackAmount) > 0 ? $(c.cashbackAmount, e.config.locale, e.config.currency) : null, l = e._getPayableAmount(), h = l < e.config.amount;
5707
5707
  e.container.innerHTML = Fi({
5708
5708
  amountFormatted: $(l, e.config.locale, e.config.currency),
5709
5709
  originalAmountFormatted: $(
@@ -5769,20 +5769,20 @@ function Qe(e) {
5769
5769
  const c = JSON.parse(
5770
5770
  i.currentTarget.getAttribute("data-method") || "{}"
5771
5771
  );
5772
- fr(e, c);
5772
+ hr(e, c);
5773
5773
  });
5774
5774
  });
5775
5775
  }
5776
- function lr(e) {
5776
+ function Ar(e) {
5777
5777
  var o, i, c;
5778
5778
  const t = (o = e.container) == null ? void 0 : o.querySelector(".choco-widget-payment-method"), n = (i = e.container) == null ? void 0 : i.querySelector(".choco-widget-method-name"), r = (c = e.container) == null ? void 0 : c.querySelector(
5779
5779
  ".choco-widget-method-icon-wrapper"
5780
5780
  );
5781
- t && e.selectedPaymentMethod && (t.className = `choco-widget-payment-method ${e.selectedPaymentMethod.type}`), n && e.selectedPaymentMethod && (n.className = `choco-widget-method-name ${e.selectedPaymentMethod.type}`, n.textContent = e.selectedPaymentMethod.label), r && e.selectedPaymentMethod && (r.className = `choco-widget-method-icon-wrapper ${e.selectedPaymentMethod.type}`, r.innerHTML = ji(e.selectedPaymentMethod)), Ar(e);
5781
+ t && e.selectedPaymentMethod && (t.className = `choco-widget-payment-method ${e.selectedPaymentMethod.type}`), n && e.selectedPaymentMethod && (n.className = `choco-widget-method-name ${e.selectedPaymentMethod.type}`, n.textContent = e.selectedPaymentMethod.label), r && e.selectedPaymentMethod && (r.className = `choco-widget-method-icon-wrapper ${e.selectedPaymentMethod.type}`, r.innerHTML = ji(e.selectedPaymentMethod)), dr(e);
5782
5782
  }
5783
5783
  function je(e) {
5784
- var C, b, I, B, Q, S;
5785
- const t = (C = e.container) == null ? void 0 : C.querySelector(".choco-widget-pay-button"), n = (b = e.container) == null ? void 0 : b.querySelector(
5784
+ var m, b, I, B, Q, S;
5785
+ const t = (m = e.container) == null ? void 0 : m.querySelector(".choco-widget-pay-button"), n = (b = e.container) == null ? void 0 : b.querySelector(
5786
5786
  ".choco-widget-google-pay-amount"
5787
5787
  ), r = (I = e.container) == null ? void 0 : I.querySelector(
5788
5788
  ".choco-widget-google-pay-amount-label"
@@ -5810,9 +5810,9 @@ function je(e) {
5810
5810
  ".choco-widget-google-pay-amount-value-number"
5811
5811
  )), i ? i.textContent = h : o && (o.textContent = `${e.t("instead")} ${h}`);
5812
5812
  }
5813
- function Ar(e) {
5814
- var l, h, y, C, b, I, B, Q, S, P;
5815
- const t = ((l = e.selectedPaymentMethod) == null ? void 0 : l.type) === "google_pay", n = ((h = e.selectedPaymentMethod) == null ? void 0 : h.type) === "apple_pay", r = t || n, o = (y = e.container) == null ? void 0 : y.querySelector(".choco-widget-pay-button"), i = (C = e.container) == null ? void 0 : C.querySelector(
5813
+ function dr(e) {
5814
+ var l, h, y, m, b, I, B, Q, S, P;
5815
+ const t = ((l = e.selectedPaymentMethod) == null ? void 0 : l.type) === "google_pay", n = ((h = e.selectedPaymentMethod) == null ? void 0 : h.type) === "apple_pay", r = t || n, o = (y = e.container) == null ? void 0 : y.querySelector(".choco-widget-pay-button"), i = (m = e.container) == null ? void 0 : m.querySelector(
5816
5816
  ".choco-widget-google-pay-amount"
5817
5817
  ), c = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-google-pay-row"), u = (I = e.container) == null ? void 0 : I.querySelector(".choco-widget-apple-pay-row");
5818
5818
  if (o == null || o.classList.toggle("choco-widget-pay-button--hidden", r), i == null || i.classList.toggle(
@@ -5868,8 +5868,8 @@ async function Ki(e) {
5868
5868
  buttonLocale: e.config.locale || "ru",
5869
5869
  buttonSizeMode: "fill"
5870
5870
  });
5871
- i.classList.add("choco-widget-google-pay-button"), i.style.setProperty("width", "100%", "important"), i.style.setProperty("height", "52px", "important"), i.style.setProperty("min-height", "52px", "important"), i.style.setProperty("border-radius", "12px", "important"), i.style.setProperty("font-size", "16px", "important"), i.style.setProperty("font-weight", "bold", "important"), i.querySelectorAll("*").forEach((C) => {
5872
- C.style.setProperty("border-radius", "12px", "important"), C.style.setProperty("font-weight", "bold", "important"), C.style.setProperty("font-size", "16px", "important");
5871
+ i.classList.add("choco-widget-google-pay-button"), i.style.setProperty("width", "100%", "important"), i.style.setProperty("height", "52px", "important"), i.style.setProperty("min-height", "52px", "important"), i.style.setProperty("border-radius", "12px", "important"), i.style.setProperty("font-size", "16px", "important"), i.style.setProperty("font-weight", "bold", "important"), i.querySelectorAll("*").forEach((m) => {
5872
+ m.style.setProperty("border-radius", "12px", "important"), m.style.setProperty("font-weight", "bold", "important"), m.style.setProperty("font-size", "16px", "important");
5873
5873
  }), t.appendChild(i), ie(e);
5874
5874
  }
5875
5875
  function Gi(e) {
@@ -5899,7 +5899,7 @@ function Gi(e) {
5899
5899
  </span>
5900
5900
  `, n.appendChild(r), n.appendChild(o), t.appendChild(n), ie(e);
5901
5901
  }
5902
- function wn(e) {
5902
+ function Tn(e) {
5903
5903
  var o;
5904
5904
  if (!e.selectedCoupon) return;
5905
5905
  const t = e._isCouponDisabled();
@@ -5914,9 +5914,9 @@ function pe(e) {
5914
5914
  e.loading = !0, ie(e);
5915
5915
  }
5916
5916
  function W(e) {
5917
- var C, b, I, B, Q, S, P, k;
5917
+ var m, b, I, B, Q, S, P, k;
5918
5918
  e.loading = !1;
5919
- const t = (C = e.container) == null ? void 0 : C.querySelector(".choco-widget-payment-method"), n = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), r = (I = e.container) == null ? void 0 : I.querySelector(
5919
+ const t = (m = e.container) == null ? void 0 : m.querySelector(".choco-widget-payment-method"), n = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), r = (I = e.container) == null ? void 0 : I.querySelector(
5920
5920
  ".choco-widget-google-pay-button-slot button"
5921
5921
  ), o = (B = e.container) == null ? void 0 : B.querySelector(
5922
5922
  ".choco-widget-apple-pay-button-slot button"
@@ -5937,10 +5937,10 @@ function ie(e) {
5937
5937
  ".choco-widget-google-pay-amount"
5938
5938
  ), u = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-google-pay-row"), l = (R = e.container) == null ? void 0 : R.querySelector(".choco-widget-apple-pay-row"), h = (L = e.container) == null ? void 0 : L.querySelector(
5939
5939
  ".choco-widget-balance-section"
5940
- ), y = e._isInteractionBlocked(), C = e.paymentMethodDisabled || y;
5941
- h == null || h.classList.toggle("disabled", y), t && (t.disabled = C), n && (n.disabled = y, n.classList.toggle("choco-widget-pay-button--loading", e.loading)), r && (r.disabled = y), o && (o.disabled = y), i && (i.disabled = y), c == null || c.classList.toggle("choco-widget-wallet-blocked", y), c == null || c.setAttribute("aria-disabled", String(y)), u == null || u.classList.toggle("choco-widget-wallet-blocked", y), u == null || u.setAttribute("aria-disabled", String(y)), l == null || l.classList.toggle("choco-widget-wallet-blocked", y), l == null || l.setAttribute("aria-disabled", String(y));
5940
+ ), y = e._isInteractionBlocked(), m = e.paymentMethodDisabled || y;
5941
+ h == null || h.classList.toggle("disabled", y), t && (t.disabled = m), n && (n.disabled = y, n.classList.toggle("choco-widget-pay-button--loading", e.loading)), r && (r.disabled = y), o && (o.disabled = y), i && (i.disabled = y), c == null || c.classList.toggle("choco-widget-wallet-blocked", y), c == null || c.setAttribute("aria-disabled", String(y)), u == null || u.classList.toggle("choco-widget-wallet-blocked", y), u == null || u.setAttribute("aria-disabled", String(y)), l == null || l.classList.toggle("choco-widget-wallet-blocked", y), l == null || l.setAttribute("aria-disabled", String(y));
5942
5942
  }
5943
- function dr(e) {
5943
+ function fr(e) {
5944
5944
  var n;
5945
5945
  if (e._isInteractionBlocked()) return;
5946
5946
  const t = (n = e.container) == null ? void 0 : n.querySelector('[data-sheet="payment"]');
@@ -6016,20 +6016,20 @@ async function Zi(e, t) {
6016
6016
  const n = t == null ? void 0 : t.cardId;
6017
6017
  if (!(!n || (t == null ? void 0 : t.type) !== "card"))
6018
6018
  try {
6019
- await Dr(e.apiUrl, e._getApiConfig(), n), e.checkoutContext = await Ct(
6019
+ await Mr(e.apiUrl, e._getApiConfig(), n), e.checkoutContext = await Ct(
6020
6020
  e.apiUrl,
6021
6021
  e._getApiConfig()
6022
6022
  ), ((r = e.selectedPaymentMethod) == null ? void 0 : r.type) === "card" && ((o = e.selectedPaymentMethod) == null ? void 0 : o.cardId) === n && (e.selectedPaymentMethod = yt(
6023
6023
  e.checkoutContext.data,
6024
6024
  e._getKaspiOptions()
6025
- ), e._emitPaymentMethodSelected(), lr(e)), Qe(e), e.config.onSuccess({ message: e.t("cardDeleted") }), e.config.onCardDeleted && e.config.onCardDeleted({ cardId: n });
6025
+ ), e._emitPaymentMethodSelected(), Ar(e)), Qe(e), e.config.onSuccess({ message: e.t("cardDeleted") }), e.config.onCardDeleted && e.config.onCardDeleted({ cardId: n });
6026
6026
  } catch (i) {
6027
6027
  e.config.onError({
6028
6028
  attributes: { message: (i == null ? void 0 : i.message) || e.t("paymentError") }
6029
6029
  });
6030
6030
  }
6031
6031
  }
6032
- function fr(e, t) {
6032
+ function hr(e, t) {
6033
6033
  if (!e._isInteractionBlocked()) {
6034
6034
  if (e.selectedPaymentMethod = t, e._emitPaymentMethodSelected(), t.type === "new_card") {
6035
6035
  e._emitUserEvent("one_click_pay_method_resolved", { payment_method: t.type }), ae(e), e.handlePayment();
@@ -6037,10 +6037,10 @@ function fr(e, t) {
6037
6037
  }
6038
6038
  e._emitUserEvent("one_click_pay_method_resolved", {
6039
6039
  payment_method: e._getPaymentMethodForUserEvent()
6040
- }), Qe(e), ae(e), lr(e);
6040
+ }), Qe(e), ae(e), Ar(e);
6041
6041
  }
6042
6042
  }
6043
- function Tn(e, t) {
6043
+ function Ln(e, t) {
6044
6044
  var r;
6045
6045
  const n = t.type || ((r = t.data) == null ? void 0 : r.type);
6046
6046
  if (!n) {
@@ -6049,10 +6049,10 @@ function Tn(e, t) {
6049
6049
  }
6050
6050
  switch (n) {
6051
6051
  case "order.paid":
6052
- e._orderStatusResolved = !0, de(e), pr(e, t);
6052
+ e._orderStatusResolved = !0, de(e), gr(e, t);
6053
6053
  break;
6054
6054
  case "order.failed":
6055
- e._orderStatusResolved = !0, de(e), gr(e, t);
6055
+ e._orderStatusResolved = !0, de(e), yr(e, t);
6056
6056
  break;
6057
6057
  case "order.action_required":
6058
6058
  $i(e, t);
@@ -6078,19 +6078,19 @@ function Be(e, t) {
6078
6078
  }
6079
6079
  o += 1;
6080
6080
  try {
6081
- const { data: c } = await xr(
6081
+ const { data: c } = await Ur(
6082
6082
  e.apiUrl,
6083
6083
  e._getApiConfig(),
6084
6084
  String(t)
6085
6085
  ), u = c == null ? void 0 : c.status, l = (c == null ? void 0 : c.payload) || {};
6086
6086
  if (u === "success") {
6087
- e._orderStatusResolved = !0, de(e), pr(e, {
6087
+ e._orderStatusResolved = !0, de(e), gr(e, {
6088
6088
  id: String(l.id || t),
6089
6089
  attributes: { amount: l.amount, paid_at: l.paid_at || "" }
6090
6090
  });
6091
6091
  return;
6092
6092
  }
6093
- u === "fail" && (e._orderStatusResolved = !0, de(e), gr(e, {
6093
+ u === "fail" && (e._orderStatusResolved = !0, de(e), yr(e, {
6094
6094
  id: String(l.id || t),
6095
6095
  attributes: { message: l.message || e.t("paymentError") }
6096
6096
  }));
@@ -6104,15 +6104,15 @@ function Be(e, t) {
6104
6104
  function Ht() {
6105
6105
  return typeof document > "u" ? !1 : document.hidden || document.visibilityState === "hidden";
6106
6106
  }
6107
- function hr(e, t) {
6107
+ function pr(e, t) {
6108
6108
  W(e), e.config.onSuccess(t);
6109
6109
  }
6110
6110
  function gt(e) {
6111
6111
  if (!e._pendingSuccessPayload || Ht()) return;
6112
6112
  const t = e._pendingSuccessPayload;
6113
- e._pendingSuccessPayload = null, hr(e, t);
6113
+ e._pendingSuccessPayload = null, pr(e, t);
6114
6114
  }
6115
- function pr(e, t) {
6115
+ function gr(e, t) {
6116
6116
  var o, i;
6117
6117
  e.isAddCardViewOpen && Ie(e);
6118
6118
  const n = t.attributes || ((o = t.data) == null ? void 0 : o.attributes) || {}, r = { id: t.id || ((i = t.data) == null ? void 0 : i.id), attributes: n };
@@ -6120,9 +6120,9 @@ function pr(e, t) {
6120
6120
  e._pendingSuccessPayload = r;
6121
6121
  return;
6122
6122
  }
6123
- hr(e, r);
6123
+ pr(e, r);
6124
6124
  }
6125
- function gr(e, t) {
6125
+ function yr(e, t) {
6126
6126
  var r, o;
6127
6127
  e.isAddCardViewOpen && Ie(e), W(e);
6128
6128
  const n = t.attributes || ((r = t.data) == null ? void 0 : r.attributes) || {};
@@ -6172,7 +6172,7 @@ async function ea(e) {
6172
6172
  e.selectedPaymentMethod,
6173
6173
  t
6174
6174
  );
6175
- await Ln(e);
6175
+ await Rn(e);
6176
6176
  const l = (u == null ? void 0 : u.id) ?? ((n = u == null ? void 0 : u.data) == null ? void 0 : n.id);
6177
6177
  return l && Be(e, String(l)), u;
6178
6178
  } catch (u) {
@@ -6202,15 +6202,15 @@ async function ea(e) {
6202
6202
  e.selectedPaymentMethod,
6203
6203
  t
6204
6204
  );
6205
- await Ln(e);
6205
+ await Rn(e);
6206
6206
  const l = (u == null ? void 0 : u.id) ?? ((r = u == null ? void 0 : u.data) == null ? void 0 : r.id);
6207
6207
  if (l && Be(e, String(l)), ((o = e.selectedPaymentMethod) == null ? void 0 : o.type) === "kaspi_pay") {
6208
- const h = (u == null ? void 0 : u.attributes) || ((i = u == null ? void 0 : u.data) == null ? void 0 : i.attributes) || {}, y = h.action_link || h.action_url, C = h.action_url_type || h.action_type || "redirect";
6208
+ const h = (u == null ? void 0 : u.attributes) || ((i = u == null ? void 0 : u.data) == null ? void 0 : i.attributes) || {}, y = h.action_link || h.action_url, m = h.action_url_type || h.action_type || "redirect";
6209
6209
  if (y)
6210
6210
  return typeof e.config.onKaspiLink == "function" ? (e.config.onKaspiLink({
6211
6211
  action_link: y,
6212
6212
  action_url: y,
6213
- action_type: C,
6213
+ action_type: m,
6214
6214
  event: u
6215
6215
  }), u) : (window.location.href = y, u);
6216
6216
  }
@@ -6219,11 +6219,11 @@ async function ea(e) {
6219
6219
  throw W(e), se(u, { paymentMethod: ((c = e.selectedPaymentMethod) == null ? void 0 : c.type) || "card" }), e.config.onError({ message: e._resolveErrorMessage(u) }), u;
6220
6220
  }
6221
6221
  }
6222
- async function Ln(e) {
6222
+ async function Rn(e) {
6223
6223
  var t, n;
6224
6224
  if (!(((t = e.selectedPaymentMethod) == null ? void 0 : t.type) !== "card" || !((n = e.selectedPaymentMethod) != null && n.cardId)))
6225
6225
  try {
6226
- await Mr(
6226
+ await xr(
6227
6227
  e.apiUrl,
6228
6228
  e._getApiConfig(),
6229
6229
  e.selectedPaymentMethod.cardId
@@ -6235,7 +6235,7 @@ async function Ln(e) {
6235
6235
  async function ta(e, t) {
6236
6236
  pe(e), e.waitingForNewCardAction = !0, e._setNewCardActionTimeout();
6237
6237
  try {
6238
- await Ur(
6238
+ await Fr(
6239
6239
  e.apiUrl,
6240
6240
  e._getApiConfig(),
6241
6241
  e.deviceId,
@@ -6275,11 +6275,24 @@ async function na(e, t) {
6275
6275
  me = o, o.onvalidatemerchant = async (i) => {
6276
6276
  var c, u;
6277
6277
  try {
6278
- const l = await Xr(
6279
- e.apiUrl,
6280
- e._getApiConfig(),
6281
- i.validationURL
6282
- ), h = ((u = (c = l == null ? void 0 : l.data) == null ? void 0 : c.attributes) == null ? void 0 : u.session) || l, y = JSON.parse(atob(h));
6278
+ let l;
6279
+ try {
6280
+ l = await nn(
6281
+ e.apiUrl,
6282
+ e._getApiConfig(),
6283
+ i.validationURL
6284
+ );
6285
+ } catch (m) {
6286
+ if (m.status === 401)
6287
+ await e._obtainTokenByRefreshOrTrackId(), l = await nn(
6288
+ e.apiUrl,
6289
+ e._getApiConfig(),
6290
+ i.validationURL
6291
+ );
6292
+ else
6293
+ throw m;
6294
+ }
6295
+ const h = ((u = (c = l == null ? void 0 : l.data) == null ? void 0 : c.attributes) == null ? void 0 : u.session) || l, y = JSON.parse(atob(h));
6283
6296
  o.completeMerchantValidation(y);
6284
6297
  } catch (l) {
6285
6298
  console.error("Apple Pay session error:", l), se(l, { paymentMethod: "apple_pay", phase: "merchant_validation" }), o.abort(), e.config.onError({ attributes: { message: e.t("errorApplePayInit") } });
@@ -6337,7 +6350,7 @@ async function ra(e, t) {
6337
6350
  await oa(e, t, { gateway: c, gatewayMerchantId: u });
6338
6351
  return;
6339
6352
  }
6340
- const C = Number(e._getCheckoutAmount()).toFixed(2);
6353
+ const m = Number(e._getCheckoutAmount()).toFixed(2);
6341
6354
  try {
6342
6355
  await e._loadGooglePaySdk();
6343
6356
  } catch (D) {
@@ -6369,7 +6382,7 @@ async function ra(e, t) {
6369
6382
  transactionInfo: {
6370
6383
  totalPriceStatus: "FINAL",
6371
6384
  totalPriceLabel: "Итого",
6372
- totalPrice: C,
6385
+ totalPrice: m,
6373
6386
  currencyCode: e.config.currency,
6374
6387
  countryCode: e.config.currency === "GEL" ? "GE" : "KZ"
6375
6388
  },
@@ -6390,7 +6403,7 @@ async function ra(e, t) {
6390
6403
  pe(e);
6391
6404
  const K = await Q.loadPaymentData(B), z = (L = (R = K == null ? void 0 : K.paymentMethodData) == null ? void 0 : R.tokenizationData) == null ? void 0 : L.token;
6392
6405
  if (!z) throw new Error(e.t("errorGooglePayPayment"));
6393
- const J = JSON.parse(z), M = await xn(
6406
+ const J = JSON.parse(z), M = await Un(
6394
6407
  e.apiUrl,
6395
6408
  e._getApiConfig(),
6396
6409
  e.deviceId,
@@ -6418,7 +6431,7 @@ async function oa(e, t, n) {
6418
6431
  amount: Number(e._getCheckoutAmount()),
6419
6432
  gateway: n.gateway,
6420
6433
  gatewayMerchantId: n.gatewayMerchantId
6421
- }), i = JSON.parse(o), c = await xn(
6434
+ }), i = JSON.parse(o), c = await Un(
6422
6435
  e.apiUrl,
6423
6436
  e._getApiConfig(),
6424
6437
  e.deviceId,
@@ -6435,15 +6448,15 @@ async function oa(e, t, n) {
6435
6448
  }
6436
6449
  }
6437
6450
  function sa(e) {
6438
- var c, u, l, h, y, C, b, I, B, Q, S, P;
6451
+ var c, u, l, h, y, m, b, I, B, Q, S, P;
6439
6452
  const t = e.container;
6440
6453
  (c = t.querySelector('[data-action="freedom-card"]')) == null || c.addEventListener("click", () => {
6441
6454
  e.config.onFreedomLink && e.config.onFreedomLink();
6442
- }), (u = t.querySelector('[data-action="pay"]')) == null || u.addEventListener("click", () => e.handlePayment()), (l = t.querySelector('[data-action="change-method"]')) == null || l.addEventListener("click", () => dr(e)), t.querySelectorAll('[data-action="close"]').forEach((k) => k.addEventListener("click", () => e.close())), (h = t.querySelector('[data-action="close-sheet"]')) == null || h.addEventListener("click", () => {
6455
+ }), (u = t.querySelector('[data-action="pay"]')) == null || u.addEventListener("click", () => e.handlePayment()), (l = t.querySelector('[data-action="change-method"]')) == null || l.addEventListener("click", () => fr(e)), t.querySelectorAll('[data-action="close"]').forEach((k) => k.addEventListener("click", () => e.close())), (h = t.querySelector('[data-action="close-sheet"]')) == null || h.addEventListener("click", () => {
6443
6456
  e._pendingDeleteMethod ? Ye(e) : ae(e);
6444
6457
  }), (y = t.querySelector('[data-action="edit-sheet"]')) == null || y.addEventListener("click", () => {
6445
6458
  e.isPaymentSheetEditMode = !0, Qe(e), ke(e);
6446
- }), (C = t.querySelector('[data-action="previous-sheet"]')) == null || C.addEventListener("click", () => {
6459
+ }), (m = t.querySelector('[data-action="previous-sheet"]')) == null || m.addEventListener("click", () => {
6447
6460
  e.isPaymentSheetEditMode = !1, Qe(e), ke(e);
6448
6461
  }), (b = t.querySelector('[data-action="close-add-card"]')) == null || b.addEventListener("click", () => Ie(e)), (I = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || I.addEventListener("click", () => Ye(e)), (B = t.querySelector('[data-action="confirm-delete-submit"]')) == null || B.addEventListener("click", () => {
6449
6462
  if (e._pendingDeleteMethod) {
@@ -6455,7 +6468,7 @@ function sa(e) {
6455
6468
  const L = JSON.parse(
6456
6469
  R.currentTarget.getAttribute("data-method") || "{}"
6457
6470
  );
6458
- fr(e, L);
6471
+ hr(e, L);
6459
6472
  });
6460
6473
  });
6461
6474
  const n = t.querySelector('[data-sheet="payment"]');
@@ -6464,16 +6477,16 @@ function sa(e) {
6464
6477
  }), aa(e, n));
6465
6478
  const r = t.querySelector('[data-action="toggle-balance"]');
6466
6479
  r && ((Q = r.querySelector("input[type='checkbox']")) == null || Q.addEventListener("change", (k) => {
6467
- e.useBalance = k.target.checked, wn(e), e._updatePayButtonAmount();
6480
+ e.useBalance = k.target.checked, Tn(e), e._updatePayButtonAmount();
6468
6481
  }));
6469
6482
  const o = t.querySelector('[data-action="toggle-bonuses"]');
6470
6483
  o && ((S = o.querySelector("input[type='checkbox']")) == null || S.addEventListener("change", (k) => {
6471
- e.useBonuses = k.target.checked, e.config.onAppliedBonus(e.useBonuses), wn(e), e._updatePayButtonAmount();
6484
+ e.useBonuses = k.target.checked, e.config.onAppliedBonus(e.useBonuses), Tn(e), e._updatePayButtonAmount();
6472
6485
  }));
6473
6486
  const i = t.querySelector('[data-action="toggle-coupon"]');
6474
6487
  i && ((P = i.querySelector("input[type='checkbox']")) == null || P.addEventListener("change", (k) => {
6475
6488
  e.useCoupon = k.target.checked, e._updatePayButtonAmount();
6476
- })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), Ar(e);
6489
+ })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), dr(e);
6477
6490
  }
6478
6491
  function ia(e, t) {
6479
6492
  var n, r;
@@ -6493,10 +6506,10 @@ function aa(e, t) {
6493
6506
  const y = Math.max(0, c - i);
6494
6507
  if (r.classList.remove("choco-widget-sheet-content--dragging"), y >= o) {
6495
6508
  r.style.transform = "translateY(100%)";
6496
- const C = () => {
6497
- r.removeEventListener("transitionend", C), r.style.transform = "", ae(e);
6509
+ const m = () => {
6510
+ r.removeEventListener("transitionend", m), r.style.transform = "", ae(e);
6498
6511
  };
6499
- r.addEventListener("transitionend", C);
6512
+ r.addEventListener("transitionend", m);
6500
6513
  } else
6501
6514
  r.style.transform = "";
6502
6515
  };
@@ -6507,7 +6520,7 @@ function aa(e, t) {
6507
6520
  class Ce {
6508
6521
  // ─── Статические методы / logout ─────────────────────────────────────────────
6509
6522
  static _getAuthStorageValue(t) {
6510
- return Mn(t);
6523
+ return xn(t);
6511
6524
  }
6512
6525
  static _setAuthStorageValue(t, n) {
6513
6526
  mt(t, n);
@@ -6516,11 +6529,11 @@ class Ce {
6516
6529
  Ke(t);
6517
6530
  }
6518
6531
  static async logout() {
6519
- Pn();
6532
+ wn();
6520
6533
  }
6521
6534
  // ─── Конструктор ──────────────────────────────────────────────────────────────
6522
6535
  constructor(t) {
6523
- this.config = jr(t), this.accessToken = null, this.deviceId = Rn(), this.apiUrl = br(this.config.environment), this.translations = mr, this.checkoutContext = null, this.centrifuge = null, this.selectedPaymentMethod = null, this.selectedCoupon = null, this.useCoupon = !1, this.container = null, this.isOpen = !1, this.isPaymentSheetOpen = !1, this.isPaymentSheetEditMode = !1, this.loading = !1, this.disabled = !1, this.paymentMethodDisabled = !1, this.useBalance = !1, this.useBonuses = !1, this.addCardActionUrl = null, this.isAddCardViewOpen = !1, this.waitingForNewCardAction = !1, this.newCardActionRequiredTimeoutId = null, this._googlePayScriptPromise = null, this._googlePayButtonRenderVersion = 0, this._orderStatusPollingId = null, this._orderStatusResolved = !1, this._pendingDeleteMethod = null, this._pendingSuccessPayload = null, this._lifecycleListenersAttached = !1, this._destroyed = !1, this._boundAddCardMessage = null, this._boundKeyDown = (n) => ia(this, n), this._boundVisibilityChange = () => this._onVisibilityChange(), this._boundWindowFocus = () => this._onWindowFocus(), this._boundPageShow = () => this._onPageShow(), Bi({
6536
+ this.config = jr(t), this.accessToken = null, this.deviceId = On(), this.apiUrl = Er(this.config.environment), this.translations = Cr, this.checkoutContext = null, this.centrifuge = null, this.selectedPaymentMethod = null, this.selectedCoupon = null, this.useCoupon = !1, this.container = null, this.isOpen = !1, this.isPaymentSheetOpen = !1, this.isPaymentSheetEditMode = !1, this.loading = !1, this.disabled = !1, this.paymentMethodDisabled = !1, this.useBalance = !1, this.useBonuses = !1, this.addCardActionUrl = null, this.isAddCardViewOpen = !1, this.waitingForNewCardAction = !1, this.newCardActionRequiredTimeoutId = null, this._googlePayScriptPromise = null, this._googlePayButtonRenderVersion = 0, this._orderStatusPollingId = null, this._orderStatusResolved = !1, this._pendingDeleteMethod = null, this._pendingSuccessPayload = null, this._lifecycleListenersAttached = !1, this._destroyed = !1, this._boundAddCardMessage = null, this._boundKeyDown = (n) => ia(this, n), this._boundVisibilityChange = () => this._onVisibilityChange(), this._boundWindowFocus = () => this._onWindowFocus(), this._boundPageShow = () => this._onPageShow(), Bi({
6524
6537
  clientId: String(this.config.clientId),
6525
6538
  terminalId: String(this.config.terminalId),
6526
6539
  environment: this.config.environment
@@ -6571,7 +6584,7 @@ class Ce {
6571
6584
  return Number.isFinite(t) && t > 0 ? t : 0;
6572
6585
  }
6573
6586
  _getPaymentBreakdown() {
6574
- const t = this.config.amount, n = this._getBalanceAmount(), r = this.useBalance ? Math.min(n, t) : 0, o = t - r, i = this.useBalance && r >= t, c = this.useBonuses ? this._getAvailableBonus() : 0, u = Math.max(o - c, 0), l = this._getCouponDiscount(), h = Math.max(u - l, 0), y = this.useBalance ? t : h, C = this.useBalance && !i, I = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
6587
+ const t = this.config.amount, n = this._getBalanceAmount(), r = this.useBalance ? Math.min(n, t) : 0, o = t - r, i = this.useBalance && r >= t, c = this.useBonuses ? this._getAvailableBonus() : 0, u = Math.max(o - c, 0), l = this._getCouponDiscount(), h = Math.max(u - l, 0), y = this.useBalance ? t : h, m = this.useBalance && !i, I = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
6575
6588
  id: this.selectedCoupon.voucher_id,
6576
6589
  template_id: this.selectedCoupon.template_id,
6577
6590
  type: this.selectedCoupon.type
@@ -6581,7 +6594,7 @@ class Ce {
6581
6594
  checkoutOptions: {
6582
6595
  checkoutAmount: y,
6583
6596
  forceBalanceMethod: i,
6584
- useBalance: C,
6597
+ useBalance: m,
6585
6598
  voucher: I
6586
6599
  }
6587
6600
  };
@@ -6642,7 +6655,7 @@ class Ce {
6642
6655
  wt(t, n);
6643
6656
  }
6644
6657
  _clearAuthStorage() {
6645
- Pn();
6658
+ wn();
6646
6659
  }
6647
6660
  _getAuthStorageValue(t) {
6648
6661
  return Ce._getAuthStorageValue(t);
@@ -6713,7 +6726,7 @@ class Ce {
6713
6726
  }
6714
6727
  async _fetchCoupons() {
6715
6728
  try {
6716
- const t = await Fr(this.apiUrl, this._getApiConfig()), r = (Array.isArray(t) ? t : Array.isArray(t == null ? void 0 : t.data) ? t.data : []).filter((o) => Number(o.reward_amount) > 0).sort((o, i) => o.sort_weight - i.sort_weight);
6729
+ const t = await Xr(this.apiUrl, this._getApiConfig()), r = (Array.isArray(t) ? t : Array.isArray(t == null ? void 0 : t.data) ? t.data : []).filter((o) => Number(o.reward_amount) > 0).sort((o, i) => o.sort_weight - i.sort_weight);
6717
6730
  this.selectedCoupon = r.length > 0 ? r[0] : null, this.useCoupon = !1;
6718
6731
  } catch {
6719
6732
  this.selectedCoupon = null, this.useCoupon = !1;
@@ -6751,7 +6764,7 @@ class Ce {
6751
6764
  if (this._destroyed || (await this._fetchCoupons(), this._destroyed)) return !1;
6752
6765
  const r = $t(
6753
6766
  (n = (t = this.checkoutContext) == null ? void 0 : t.data) == null ? void 0 : n.socket_connections,
6754
- (o) => Tn(this, o)
6767
+ (o) => Ln(this, o)
6755
6768
  );
6756
6769
  return r && (this.centrifuge = r.centrifuge), this.selectedPaymentMethod = yt(
6757
6770
  this.checkoutContext.data,
@@ -6774,7 +6787,7 @@ class Ce {
6774
6787
  }
6775
6788
  getAvailablePaymentMethods() {
6776
6789
  var t;
6777
- return (t = this.checkoutContext) != null && t.data ? Lr(
6790
+ return (t = this.checkoutContext) != null && t.data ? Rr(
6778
6791
  this.checkoutContext.data,
6779
6792
  (n) => this.t(n),
6780
6793
  this._getKaspiOptions()
@@ -6807,7 +6820,7 @@ class Ce {
6807
6820
  }
6808
6821
  }
6809
6822
  openPaymentSheet() {
6810
- dr(this);
6823
+ fr(this);
6811
6824
  }
6812
6825
  closePaymentSheet() {
6813
6826
  ae(this);
@@ -6876,7 +6889,7 @@ class Ce {
6876
6889
  await this._fetchCoupons(), this.centrifuge && (this.centrifuge.disconnect(), this.centrifuge = null);
6877
6890
  const o = $t(
6878
6891
  (r = (n = this.checkoutContext) == null ? void 0 : n.data) == null ? void 0 : r.socket_connections,
6879
- (i) => Tn(this, i)
6892
+ (i) => Ln(this, i)
6880
6893
  );
6881
6894
  return o && (this.centrifuge = o.centrifuge), this.selectedPaymentMethod = yt(
6882
6895
  this.checkoutContext.data,