choco-one-click-payment 1.1.47 → 1.1.48

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 Cr = {
2
+ const br = {
3
3
  ru: {
4
4
  paymentMethod: "Способ оплаты",
5
5
  selectMethod: "Выберите метод",
@@ -156,51 +156,51 @@ const Cr = {
156
156
  errorWidgetInit: "ვიჯეტის ინიციალიზაციის შეცდომა",
157
157
  errorPaymentProcess: "გადახდის შეცდომა"
158
158
  }
159
- }, br = {
159
+ }, Er = {
160
160
  KZT: "₸",
161
161
  GEL: "₾"
162
162
  };
163
- function Er(e) {
163
+ function vr(e) {
164
164
  return e === "production" ? "https://api-proxy.choco.kz" : "https://api-proxy.chocodev.kz";
165
165
  }
166
166
  let Le;
167
- const vr = new Uint8Array(16);
168
- function Ir() {
167
+ const Ir = new Uint8Array(16);
168
+ function Br() {
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(vr);
171
+ return Le(Ir);
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 Br(e, t = 0) {
176
+ function Sr(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 Sr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Yt = {
180
- randomUUID: Sr
179
+ const _r = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Yt = {
180
+ randomUUID: _r
181
181
  };
182
- function Ve(e, t, n) {
182
+ function Ze(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 || Ir)();
187
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Br(r);
186
+ const r = e.random || (e.rng || Br)();
187
+ return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Sr(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)} ${br[n]}`;
192
+ return `${r.toLocaleString(o)} ${Er[n]}`;
193
193
  }
194
- function On() {
194
+ function Nn() {
195
195
  let e = localStorage.getItem(Vt);
196
- return e || (e = Ve(), localStorage.setItem(Vt, e)), e;
196
+ return e || (e = Ze(), localStorage.setItem(Vt, e)), e;
197
197
  }
198
- function Je() {
198
+ function qe() {
199
199
  if (typeof window > "u") return !1;
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 Nn() {
203
+ function Dn() {
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;
@@ -211,25 +211,25 @@ function Lt() {
211
211
  const e = (navigator.userAgent || navigator.vendor || "").toLowerCase(), t = (navigator.platform || "").toLowerCase(), n = (((i = navigator.userAgentData) == null ? void 0 : i.platform) || "").toLowerCase(), r = `${e} ${t} ${n}`;
212
212
  return /iphone|ipad|ipod/.test(r) || r.includes("macintosh") && typeof document < "u" && "ontouchend" in document ? "ios" : r.includes("android") ? "android" : r.includes("windows") ? "windows" : r.includes("mac") ? "macos" : "other";
213
213
  }
214
- function qe() {
214
+ function ze() {
215
215
  if (typeof navigator > "u") return !1;
216
216
  const e = navigator.userAgentData;
217
217
  return e != null && e.platform && ["iOS", "iPadOS"].includes(e.platform) || Lt() === "ios" ? !0 : (navigator.userAgent || "").includes("Macintosh") && typeof document < "u" && "ontouchend" in document;
218
218
  }
219
- function ze(e) {
219
+ function Ke(e) {
220
220
  if (typeof sessionStorage > "u") return !1;
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 _r(e) {
224
+ function Qr(e) {
225
225
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
226
226
  }
227
- var Fe = { exports: {} }, Qr = Fe.exports, Zt;
228
- function kr() {
227
+ var Fe = { exports: {} }, kr = Fe.exports, Zt;
228
+ function Pr() {
229
229
  return Zt || (Zt = 1, (function(e, t) {
230
230
  (function(r, o) {
231
231
  e.exports = o();
232
- })(Qr, function() {
232
+ })(kr, function() {
233
233
  return (
234
234
  /******/
235
235
  (function() {
@@ -948,14 +948,14 @@ function kr() {
948
948
  }
949
949
  var ge = F[s];
950
950
  if (ge) {
951
- var ut = {
951
+ var lt = {
952
952
  method: a._methodType.SUB_REFRESH,
953
953
  params: {
954
954
  channel: s,
955
955
  token: ge
956
956
  }
957
957
  }, Te = a._getSub(s);
958
- Te !== null && a._call(ut).then(function(ne) {
958
+ Te !== null && a._call(lt).then(function(ne) {
959
959
  a._subRefreshResponse(s, a._decoder.decodeCommandResult(a._methodType.SUB_REFRESH, ne.result)), ne.next && ne.next();
960
960
  }, function(ne) {
961
961
  a._subRefreshError(s, ne.error), ne.next && ne.next();
@@ -1467,22 +1467,22 @@ function kr() {
1467
1467
  s._debug("authorization request failed");
1468
1468
  for (var ge in A)
1469
1469
  if (A.hasOwnProperty(ge)) {
1470
- var ut = A[ge];
1471
- s._subscribeError(ut, s._createErrorObject("authorization request failed"));
1470
+ var lt = A[ge];
1471
+ s._subscribeError(lt, s._createErrorObject("authorization request failed"));
1472
1472
  }
1473
1473
  return;
1474
1474
  }
1475
1475
  var Te = {};
1476
1476
  if (x.data.channels)
1477
1477
  for (var ne in x.data.channels) {
1478
- var lt = x.data.channels[ne];
1479
- lt.channel && (Te[lt.channel] = lt.token);
1478
+ var At = x.data.channels[ne];
1479
+ At.channel && (Te[At.channel] = At.token);
1480
1480
  }
1481
1481
  var jt = !1;
1482
1482
  s._isBatching || (s.startBatching(), jt = !0);
1483
1483
  for (var Jt in A)
1484
1484
  if (A.hasOwnProperty(Jt)) {
1485
- var mr = (function() {
1485
+ var Cr = (function() {
1486
1486
  var Z = A[Jt], qt = Te[Z];
1487
1487
  if (qt) {
1488
1488
  var ye = {
@@ -1497,9 +1497,9 @@ function kr() {
1497
1497
  var Kt = zt._needRecover();
1498
1498
  if (Kt === !0) {
1499
1499
  ye.params.recover = !0;
1500
- var At = s._getLastSeq(Z), dt = s._getLastGen(Z);
1501
- if (At || dt)
1502
- At && (ye.params.seq = At), dt && (ye.params.gen = dt);
1500
+ var dt = s._getLastSeq(Z), ft = s._getLastGen(Z);
1501
+ if (dt || ft)
1502
+ dt && (ye.params.seq = dt), ft && (ye.params.gen = ft);
1503
1503
  else {
1504
1504
  var Gt = s._getLastOffset(Z);
1505
1505
  Gt && (ye.params.offset = Gt);
@@ -1515,7 +1515,7 @@ function kr() {
1515
1515
  } else
1516
1516
  return s._subscribeError(Z, s._createErrorObject("permission denied", 103)), "continue";
1517
1517
  })();
1518
- if (mr === "continue") continue;
1518
+ if (Cr === "continue") continue;
1519
1519
  }
1520
1520
  jt && s.stopBatching();
1521
1521
  }
@@ -2240,8 +2240,8 @@ function kr() {
2240
2240
  });
2241
2241
  })(Fe)), Fe.exports;
2242
2242
  }
2243
- var Pr = kr();
2244
- const wr = /* @__PURE__ */ _r(Pr);
2243
+ var wr = Pr();
2244
+ const Tr = /* @__PURE__ */ Qr(wr);
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 wr(n);
2259
+ const i = new Tr(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 = Tr(l);
2265
+ const h = Lr(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 Tr(e) {
2276
+ function Lr(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
- }, Dn = {
2290
+ }, Mn = {
2291
2291
  iconType: "apple_pay",
2292
2292
  label: "Apple Pay",
2293
2293
  type: "apple_pay"
2294
- }, Mn = {
2294
+ }, xn = {
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 Lr(e) {
2307
+ function Rr(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 Lr(e) {
2317
2317
  cardId: o != null ? String(o) : null
2318
2318
  };
2319
2319
  }
2320
- function Rr(e, t, n = {}) {
2320
+ function Or(e, t, n = {}) {
2321
2321
  var S, P, k, R;
2322
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) => {
2323
+ return o != null && o.isKaspiOnly && u && !I ? [Ae] : b ? o != null && o.isAvailable && u && !I ? [Ae] : [] : (ee(c.payment_method_apple_pay) && !Ke("apple_pay") && (qe() && h || ze() || m || Dn() === 16) && r.push(Mn), 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,22 +2329,22 @@ function Rr(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(Mn), ee(c.payment_method_new_card) && r.push({
2332
+ }), ee(c.payment_method_google_pay) && !Ke("google_pay") && !(n != null && n.disableGooglePay) && !qe() && !ze() && r.push(xn), ee(c.payment_method_new_card) && r.push({
2333
2333
  iconType: "new_card",
2334
2334
  type: "new_card",
2335
2335
  label: t ? t("newCard") : "Оплата новой картой"
2336
2336
  }), r);
2337
2337
  }
2338
- function yt(e, t = {}) {
2338
+ function mt(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", 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();
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) && !Ke("apple_pay") && (qe() && l || ze() || y || Dn() === 16), b = ee(o.payment_method_google_pay) && !Ke("google_pay") && !(t != null && t.disableGooglePay) && !qe() && !ze();
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 = Lr(e);
2343
+ const I = Rr(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" && m) return Dn;
2347
- if ((I == null ? void 0 : I.type) === "google_pay" && b) return Mn;
2346
+ if ((I == null ? void 0 : I.type) === "apple_pay" && m) return Mn;
2347
+ if ((I == null ? void 0 : I.type) === "google_pay" && b) return xn;
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 xn(e) {
2385
+ function Un(e) {
2386
2386
  if (typeof localStorage > "u") return null;
2387
2387
  try {
2388
2388
  return localStorage.getItem(e);
@@ -2390,21 +2390,21 @@ function xn(e) {
2390
2390
  return null;
2391
2391
  }
2392
2392
  }
2393
- function mt(e, t) {
2393
+ function Ct(e, t) {
2394
2394
  if (!(typeof localStorage > "u"))
2395
2395
  try {
2396
2396
  localStorage.setItem(e, t);
2397
2397
  } catch {
2398
2398
  }
2399
2399
  }
2400
- function Ke(e) {
2400
+ function Ge(e) {
2401
2401
  if (!(typeof localStorage > "u"))
2402
2402
  try {
2403
2403
  localStorage.removeItem(e);
2404
2404
  } catch {
2405
2405
  }
2406
2406
  }
2407
- async function Or(e, t) {
2407
+ async function Nr(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,10 +2414,10 @@ async function Or(e, t) {
2414
2414
  }
2415
2415
  }
2416
2416
  async function ue(e, t) {
2417
- const n = await Or(e, t);
2417
+ const n = await Nr(e, t);
2418
2418
  throw Object.assign(new Error(n), { status: e.status });
2419
2419
  }
2420
- function Ze(e, t, n = {}) {
2420
+ function $e(e, t, n = {}) {
2421
2421
  const r = Number.isFinite(n.checkoutAmount) && n.checkoutAmount >= 0 ? Number(n.checkoutAmount) : e.amount, o = !!n.forceBalanceMethod, i = !!n.useBalance, c = n.voucher;
2422
2422
  return {
2423
2423
  checkoutAmount: r,
@@ -2426,7 +2426,7 @@ function Ze(e, t, n = {}) {
2426
2426
  voucher: c
2427
2427
  };
2428
2428
  }
2429
- function $e(e, t, n, r, o) {
2429
+ function et(e, t, n, r, o) {
2430
2430
  return {
2431
2431
  preorder_id: e.preorderId,
2432
2432
  terminal_id: e.terminalId,
@@ -2442,13 +2442,13 @@ function $e(e, t, n, r, o) {
2442
2442
  ...e.isFridge && { is_fridge: !0 }
2443
2443
  };
2444
2444
  }
2445
- async function et(e, t, n, r, o) {
2445
+ async function tt(e, t, n, r, o) {
2446
2446
  const i = await fetch(`${e}/orders/v1/checkout`, {
2447
2447
  method: "POST",
2448
2448
  headers: {
2449
2449
  "Content-Type": "application/json",
2450
2450
  Authorization: `Bearer ${t.accessToken}`,
2451
- "X-Idempotency-Key": t.idempotencyKey ?? Ve(),
2451
+ "X-Idempotency-Key": t.idempotencyKey ?? Ze(),
2452
2452
  "X-Device-Id": n,
2453
2453
  "X-OS": "WEB"
2454
2454
  },
@@ -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 Nr(e, t, n) {
2459
+ async function tn(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
- "X-Idempotency-Key": Ve(),
2466
- "X-Fingerprint": On()
2465
+ "X-Idempotency-Key": Ze(),
2466
+ "X-Fingerprint": Nn()
2467
2467
  },
2468
2468
  body: JSON.stringify({
2469
2469
  client_id: t,
@@ -2492,13 +2492,13 @@ async function Dr(e, t, n) {
2492
2492
  if (!i) throw new Error("В ответе отсутствует access_token");
2493
2493
  return { access_token: i, refresh_token: c };
2494
2494
  }
2495
- async function Ct(e, t) {
2495
+ async function bt(e, t) {
2496
2496
  const n = await fetch(`${e}/orders/v1/checkout/context`, {
2497
2497
  method: "POST",
2498
2498
  headers: {
2499
2499
  "Content-Type": "application/json",
2500
2500
  Authorization: `Bearer ${t.accessToken}`,
2501
- "X-Idempotency-Key": Ve()
2501
+ "X-Idempotency-Key": Ze()
2502
2502
  },
2503
2503
  body: JSON.stringify({
2504
2504
  terminal_id: t.terminalId,
@@ -2550,8 +2550,8 @@ async function Ur(e, t, n) {
2550
2550
  const o = await r.json(), i = (o == null ? void 0 : o.data) ?? o;
2551
2551
  return { data: { status: i == null ? void 0 : i.status, payload: (i == null ? void 0 : i.payload) ?? {} } };
2552
2552
  }
2553
- async function tn(e, t, n, r, o = {}) {
2554
- const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = Ze(
2553
+ async function nn(e, t, n, r, o = {}) {
2554
+ const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = $e(
2555
2555
  t,
2556
2556
  {
2557
2557
  type: r.type,
@@ -2559,25 +2559,25 @@ async function tn(e, t, n, r, o = {}) {
2559
2559
  },
2560
2560
  o
2561
2561
  );
2562
- return et(
2562
+ return tt(
2563
2563
  e,
2564
2564
  t,
2565
2565
  n,
2566
- $e(t, c, i, u, l),
2566
+ et(t, c, i, u, l),
2567
2567
  "Ошибка создания заказа"
2568
2568
  );
2569
2569
  }
2570
2570
  async function Fr(e, t, n, r = {}) {
2571
- const { checkoutAmount: o, checkoutPaymentMethod: i, useBalanceFlag: c, voucher: u } = Ze(
2571
+ const { checkoutAmount: o, checkoutPaymentMethod: i, useBalanceFlag: c, voucher: u } = $e(
2572
2572
  t,
2573
2573
  { type: "new_card" },
2574
2574
  r
2575
2575
  );
2576
- return et(
2576
+ return tt(
2577
2577
  e,
2578
2578
  t,
2579
2579
  n,
2580
- $e(t, i, o, c, u),
2580
+ et(t, i, o, c, u),
2581
2581
  "Ошибка создания заказа для новой карты"
2582
2582
  );
2583
2583
  }
@@ -2594,7 +2594,7 @@ async function Xr(e, t) {
2594
2594
  );
2595
2595
  return n.ok || await ue(n, "Ошибка получения купонов"), n.json();
2596
2596
  }
2597
- async function nn(e, t, n) {
2597
+ async function rn(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: {
@@ -2607,30 +2607,30 @@ async function nn(e, t, n) {
2607
2607
  return o.ok || await ue(o, "Ошибка получения Apple Pay сессии"), o.json();
2608
2608
  }
2609
2609
  async function Hr(e, t, n, r, o = {}) {
2610
- const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = Ze(
2610
+ const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = $e(
2611
2611
  t,
2612
2612
  { type: "apple_pay", data: r },
2613
2613
  o
2614
2614
  );
2615
- return et(
2615
+ return tt(
2616
2616
  e,
2617
2617
  t,
2618
2618
  n,
2619
- $e(t, c, i, u, l),
2619
+ et(t, c, i, u, l),
2620
2620
  "Ошибка создания заказа с Apple Pay"
2621
2621
  );
2622
2622
  }
2623
- async function Un(e, t, n, r, o = {}) {
2624
- const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = Ze(
2623
+ async function Fn(e, t, n, r, o = {}) {
2624
+ const { checkoutAmount: i, checkoutPaymentMethod: c, useBalanceFlag: u, voucher: l } = $e(
2625
2625
  t,
2626
2626
  { type: "google_pay", data: r },
2627
2627
  o
2628
2628
  );
2629
- return et(
2629
+ return tt(
2630
2630
  e,
2631
2631
  t,
2632
2632
  n,
2633
- $e(t, c, i, u, l),
2633
+ et(t, c, i, u, l),
2634
2634
  "Ошибка создания заказа с Google Pay"
2635
2635
  );
2636
2636
  }
@@ -2667,6 +2667,7 @@ function jr(e) {
2667
2667
  onUserEvent: typeof e.onUserEvent == "function" ? e.onUserEvent : null,
2668
2668
  onBeforeCheckout: typeof e.onBeforeCheckout == "function" ? e.onBeforeCheckout : null,
2669
2669
  onFreedomLink: typeof e.onFreedomLink == "function" ? e.onFreedomLink : null,
2670
+ onRequestNewTrackId: typeof e.onRequestNewTrackId == "function" ? e.onRequestNewTrackId : null,
2670
2671
  idempotencyKey: e.idempotencyKey,
2671
2672
  locale: e.locale || "ru",
2672
2673
  containerSelector: typeof e.containerSelector == "string" ? e.containerSelector.trim() : "",
@@ -2681,11 +2682,11 @@ function jr(e) {
2681
2682
  };
2682
2683
  }
2683
2684
  const U = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, fe = "8.55.2", j = globalThis;
2684
- function tt(e, t, n) {
2685
+ function nt(e, t, n) {
2685
2686
  const r = n || j, o = r.__SENTRY__ = r.__SENTRY__ || {}, i = o[fe] = o[fe] || {};
2686
2687
  return i[e] || (i[e] = t());
2687
2688
  }
2688
- const Rt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Jr = "Sentry Logger ", rn = [
2689
+ const Rt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Jr = "Sentry Logger ", on = [
2689
2690
  "debug",
2690
2691
  "info",
2691
2692
  "warn",
@@ -2693,13 +2694,13 @@ const Rt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Jr = "Sentry Logge
2693
2694
  "log",
2694
2695
  "assert",
2695
2696
  "trace"
2696
- ], on = {};
2697
- function nt(e) {
2697
+ ], sn = {};
2698
+ function rt(e) {
2698
2699
  if (!("console" in j))
2699
2700
  return e();
2700
- const t = j.console, n = {}, r = Object.keys(on);
2701
+ const t = j.console, n = {}, r = Object.keys(sn);
2701
2702
  r.forEach((o) => {
2702
- const i = on[o];
2703
+ const i = sn[o];
2703
2704
  n[o] = t[o], t[o] = i;
2704
2705
  });
2705
2706
  try {
@@ -2721,18 +2722,18 @@ function qr() {
2721
2722
  },
2722
2723
  isEnabled: () => e
2723
2724
  };
2724
- return Rt ? rn.forEach((n) => {
2725
+ return Rt ? on.forEach((n) => {
2725
2726
  t[n] = (...r) => {
2726
- e && nt(() => {
2727
+ e && rt(() => {
2727
2728
  j.console[n](`${Jr}[${n}]:`, ...r);
2728
2729
  });
2729
2730
  };
2730
- }) : rn.forEach((n) => {
2731
+ }) : on.forEach((n) => {
2731
2732
  t[n] = () => {
2732
2733
  };
2733
2734
  }), t;
2734
2735
  }
2735
- const N = tt("logger", qr), Fn = 50, be = "?", sn = /\(error: (.*)\)/, an = /captureMessage|captureException/;
2736
+ const N = nt("logger", qr), Xn = 50, be = "?", an = /\(error: (.*)\)/, cn = /captureMessage|captureException/;
2736
2737
  function zr(...e) {
2737
2738
  const t = e.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
2738
2739
  return (n, r = 0, o = 0) => {
@@ -2742,7 +2743,7 @@ function zr(...e) {
2742
2743
  const l = c[u];
2743
2744
  if (l.length > 1024)
2744
2745
  continue;
2745
- const h = sn.test(l) ? l.replace(sn, "$1") : l;
2746
+ const h = an.test(l) ? l.replace(an, "$1") : l;
2746
2747
  if (!h.match(/\S*Error: /)) {
2747
2748
  for (const y of t) {
2748
2749
  const m = y(h);
@@ -2751,7 +2752,7 @@ function zr(...e) {
2751
2752
  break;
2752
2753
  }
2753
2754
  }
2754
- if (i.length >= Fn + o)
2755
+ if (i.length >= Xn + o)
2755
2756
  break;
2756
2757
  }
2757
2758
  }
@@ -2762,7 +2763,7 @@ function Kr(e) {
2762
2763
  if (!e.length)
2763
2764
  return [];
2764
2765
  const t = Array.from(e);
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
+ return /sentryWrapped/.test(Oe(t).function || "") && t.pop(), t.reverse(), cn.test(Oe(t).function || "") && (t.pop(), cn.test(Oe(t).function || "") && t.pop()), t.slice(0, Xn).map((n) => ({
2766
2767
  ...n,
2767
2768
  filename: n.filename || Oe(t).filename,
2768
2769
  function: n.function || be
@@ -2771,12 +2772,12 @@ function Kr(e) {
2771
2772
  function Oe(e) {
2772
2773
  return e[e.length - 1] || {};
2773
2774
  }
2774
- const ft = "<anonymous>";
2775
+ const ht = "<anonymous>";
2775
2776
  function Gr(e) {
2776
2777
  try {
2777
- return !e || typeof e != "function" ? ft : e.name || ft;
2778
+ return !e || typeof e != "function" ? ht : e.name || ht;
2778
2779
  } catch {
2779
- return ft;
2780
+ return ht;
2780
2781
  }
2781
2782
  }
2782
2783
  function Ot() {
@@ -2786,31 +2787,31 @@ function Nt(e) {
2786
2787
  const t = e.__SENTRY__ = e.__SENTRY__ || {};
2787
2788
  return t.version = t.version || fe, t[fe] = t[fe] || {};
2788
2789
  }
2789
- const Xn = Object.prototype.toString;
2790
- function Hn(e) {
2791
- switch (Xn.call(e)) {
2790
+ const Hn = Object.prototype.toString;
2791
+ function jn(e) {
2792
+ switch (Hn.call(e)) {
2792
2793
  case "[object Error]":
2793
2794
  case "[object Exception]":
2794
2795
  case "[object DOMException]":
2795
2796
  case "[object WebAssembly.Exception]":
2796
2797
  return !0;
2797
2798
  default:
2798
- return st(e, Error);
2799
+ return it(e, Error);
2799
2800
  }
2800
2801
  }
2801
2802
  function Pe(e, t) {
2802
- return Xn.call(e) === `[object ${t}]`;
2803
+ return Hn.call(e) === `[object ${t}]`;
2803
2804
  }
2804
- function jn(e) {
2805
+ function Jn(e) {
2805
2806
  return Pe(e, "ErrorEvent");
2806
2807
  }
2807
- function cn(e) {
2808
+ function un(e) {
2808
2809
  return Pe(e, "DOMError");
2809
2810
  }
2810
2811
  function Wr(e) {
2811
2812
  return Pe(e, "DOMException");
2812
2813
  }
2813
- function Jn(e) {
2814
+ function qn(e) {
2814
2815
  return Pe(e, "String");
2815
2816
  }
2816
2817
  function Dt(e) {
@@ -2822,19 +2823,19 @@ function Yr(e) {
2822
2823
  function Ee(e) {
2823
2824
  return Pe(e, "Object");
2824
2825
  }
2825
- function rt(e) {
2826
- return typeof Event < "u" && st(e, Event);
2826
+ function ot(e) {
2827
+ return typeof Event < "u" && it(e, Event);
2827
2828
  }
2828
2829
  function Vr(e) {
2829
- return typeof Element < "u" && st(e, Element);
2830
+ return typeof Element < "u" && it(e, Element);
2830
2831
  }
2831
- function ot(e) {
2832
+ function st(e) {
2832
2833
  return !!(e && e.then && typeof e.then == "function");
2833
2834
  }
2834
2835
  function Zr(e) {
2835
2836
  return Ee(e) && "nativeEvent" in e && "preventDefault" in e && "stopPropagation" in e;
2836
2837
  }
2837
- function st(e, t) {
2838
+ function it(e, t) {
2838
2839
  try {
2839
2840
  return e instanceof t;
2840
2841
  } catch {
@@ -2881,7 +2882,7 @@ function ro(e, t) {
2881
2882
  else {
2882
2883
  n.id && r.push(`#${n.id}`);
2883
2884
  const c = n.className;
2884
- if (c && Jn(c)) {
2885
+ if (c && qn(c)) {
2885
2886
  const u = c.split(/\s+/);
2886
2887
  for (const l of u)
2887
2888
  r.push(`.${l}`);
@@ -2897,7 +2898,7 @@ function ro(e, t) {
2897
2898
  function Se(e, t = 0) {
2898
2899
  return typeof e != "string" || t === 0 || e.length <= t ? e : `${e.slice(0, t)}...`;
2899
2900
  }
2900
- function qn(e, t, n) {
2901
+ function zn(e, t, n) {
2901
2902
  try {
2902
2903
  Object.defineProperty(e, t, {
2903
2904
  // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
@@ -2909,33 +2910,33 @@ function qn(e, t, n) {
2909
2910
  Rt && N.log(`Failed to add non-enumerable property "${t}" to object`, e);
2910
2911
  }
2911
2912
  }
2912
- function zn(e) {
2913
- if (Hn(e))
2913
+ function Kn(e) {
2914
+ if (jn(e))
2914
2915
  return {
2915
2916
  message: e.message,
2916
2917
  name: e.name,
2917
2918
  stack: e.stack,
2918
- ...ln(e)
2919
+ ...An(e)
2919
2920
  };
2920
- if (rt(e)) {
2921
+ if (ot(e)) {
2921
2922
  const t = {
2922
2923
  type: e.type,
2923
- target: un(e.target),
2924
- currentTarget: un(e.currentTarget),
2925
- ...ln(e)
2924
+ target: ln(e.target),
2925
+ currentTarget: ln(e.currentTarget),
2926
+ ...An(e)
2926
2927
  };
2927
- return typeof CustomEvent < "u" && st(e, CustomEvent) && (t.detail = e.detail), t;
2928
+ return typeof CustomEvent < "u" && it(e, CustomEvent) && (t.detail = e.detail), t;
2928
2929
  } else
2929
2930
  return e;
2930
2931
  }
2931
- function un(e) {
2932
+ function ln(e) {
2932
2933
  try {
2933
2934
  return Vr(e) ? no(e) : Object.prototype.toString.call(e);
2934
2935
  } catch {
2935
2936
  return "<unknown>";
2936
2937
  }
2937
2938
  }
2938
- function ln(e) {
2939
+ function An(e) {
2939
2940
  if (typeof e == "object" && e !== null) {
2940
2941
  const t = {};
2941
2942
  for (const n in e)
@@ -2945,7 +2946,7 @@ function ln(e) {
2945
2946
  return {};
2946
2947
  }
2947
2948
  function oo(e, t = 40) {
2948
- const n = Object.keys(zn(e));
2949
+ const n = Object.keys(Kn(e));
2949
2950
  n.sort();
2950
2951
  const r = n[0];
2951
2952
  if (!r)
@@ -2960,9 +2961,9 @@ function oo(e, t = 40) {
2960
2961
  return "";
2961
2962
  }
2962
2963
  function V(e) {
2963
- return bt(e, /* @__PURE__ */ new Map());
2964
+ return Et(e, /* @__PURE__ */ new Map());
2964
2965
  }
2965
- function bt(e, t) {
2966
+ function Et(e, t) {
2966
2967
  if (so(e)) {
2967
2968
  const n = t.get(e);
2968
2969
  if (n !== void 0)
@@ -2970,7 +2971,7 @@ function bt(e, t) {
2970
2971
  const r = {};
2971
2972
  t.set(e, r);
2972
2973
  for (const o of Object.getOwnPropertyNames(e))
2973
- typeof e[o] < "u" && (r[o] = bt(e[o], t));
2974
+ typeof e[o] < "u" && (r[o] = Et(e[o], t));
2974
2975
  return r;
2975
2976
  }
2976
2977
  if (Array.isArray(e)) {
@@ -2979,7 +2980,7 @@ function bt(e, t) {
2979
2980
  return n;
2980
2981
  const r = [];
2981
2982
  return t.set(e, r), e.forEach((o) => {
2982
- r.push(bt(o, t));
2983
+ r.push(Et(o, t));
2983
2984
  }), r;
2984
2985
  }
2985
2986
  return e;
@@ -2994,18 +2995,18 @@ function so(e) {
2994
2995
  return !0;
2995
2996
  }
2996
2997
  }
2997
- const Kn = 1e3;
2998
- function it() {
2999
- return Date.now() / Kn;
2998
+ const Gn = 1e3;
2999
+ function at() {
3000
+ return Date.now() / Gn;
3000
3001
  }
3001
3002
  function io() {
3002
3003
  const { performance: e } = j;
3003
3004
  if (!e || !e.now)
3004
- return it;
3005
+ return at;
3005
3006
  const t = Date.now() - e.now(), n = e.timeOrigin == null ? t : e.timeOrigin;
3006
- return () => (n + e.now()) / Kn;
3007
+ return () => (n + e.now()) / Gn;
3007
3008
  }
3008
- const Gn = io();
3009
+ const Wn = io();
3009
3010
  (() => {
3010
3011
  const { performance: e } = j;
3011
3012
  if (!e || !e.now)
@@ -3036,7 +3037,7 @@ function te() {
3036
3037
  function ao(e) {
3037
3038
  return e.exception && e.exception.values ? e.exception.values[0] : void 0;
3038
3039
  }
3039
- function An(e, t, n) {
3040
+ function dn(e, t, n) {
3040
3041
  const r = e.exception = e.exception || {}, o = r.values = r.values || [], i = o[0] = o[0] || {};
3041
3042
  i.value || (i.value = t || ""), i.type || (i.type = "Error");
3042
3043
  }
@@ -3050,11 +3051,11 @@ function _e(e, t) {
3050
3051
  n.mechanism.data = i;
3051
3052
  }
3052
3053
  }
3053
- function dn(e) {
3054
+ function fn(e) {
3054
3055
  if (co(e))
3055
3056
  return !0;
3056
3057
  try {
3057
- qn(e, "__sentry_captured__", !0);
3058
+ zn(e, "__sentry_captured__", !0);
3058
3059
  } catch {
3059
3060
  }
3060
3061
  return !1;
@@ -3078,7 +3079,7 @@ function he(e) {
3078
3079
  t(e);
3079
3080
  });
3080
3081
  }
3081
- function Ge(e) {
3082
+ function We(e) {
3082
3083
  return new G((t, n) => {
3083
3084
  n(e);
3084
3085
  });
@@ -3160,7 +3161,7 @@ class G {
3160
3161
  __init3() {
3161
3162
  this._setResult = (t, n) => {
3162
3163
  if (this._state === re.PENDING) {
3163
- if (ot(n)) {
3164
+ if (st(n)) {
3164
3165
  n.then(this._resolve, this._reject);
3165
3166
  return;
3166
3167
  }
@@ -3180,8 +3181,8 @@ class G {
3180
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 || 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)
3184
+ function vt(e, t = {}) {
3185
+ 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 || Wn(), 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
3186
  e.duration = void 0;
3186
3187
  else if (typeof t.duration == "number")
3187
3188
  e.duration = t.duration;
@@ -3191,28 +3192,28 @@ function Et(e, t = {}) {
3191
3192
  }
3192
3193
  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
3194
  }
3194
- function fn() {
3195
+ function hn() {
3195
3196
  return te();
3196
3197
  }
3197
- function vt() {
3198
+ function It() {
3198
3199
  return te().substring(16);
3199
3200
  }
3200
- function at(e, t, n = 2) {
3201
+ function ct(e, t, n = 2) {
3201
3202
  if (!t || typeof t != "object" || n <= 0)
3202
3203
  return t;
3203
3204
  if (e && t && Object.keys(t).length === 0)
3204
3205
  return e;
3205
3206
  const r = { ...e };
3206
3207
  for (const o in t)
3207
- Object.prototype.hasOwnProperty.call(t, o) && (r[o] = at(r[o], t[o], n - 1));
3208
+ Object.prototype.hasOwnProperty.call(t, o) && (r[o] = ct(r[o], t[o], n - 1));
3208
3209
  return r;
3209
3210
  }
3210
- const It = "_sentrySpan";
3211
- function hn(e, t) {
3212
- t ? qn(e, It, t) : delete e[It];
3211
+ const Bt = "_sentrySpan";
3212
+ function pn(e, t) {
3213
+ t ? zn(e, Bt, t) : delete e[Bt];
3213
3214
  }
3214
- function pn(e) {
3215
- return e[It];
3215
+ function gn(e) {
3216
+ return e[Bt];
3216
3217
  }
3217
3218
  const uo = 100;
3218
3219
  class Mt {
@@ -3246,8 +3247,8 @@ class Mt {
3246
3247
  // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
3247
3248
  constructor() {
3248
3249
  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: fn(),
3250
- spanId: vt()
3250
+ traceId: hn(),
3251
+ spanId: It()
3251
3252
  };
3252
3253
  }
3253
3254
  /**
@@ -3257,7 +3258,7 @@ class Mt {
3257
3258
  const t = new Mt();
3258
3259
  return t._breadcrumbs = [...this._breadcrumbs], t._tags = { ...this._tags }, t._extra = { ...this._extra }, t._contexts = { ...this._contexts }, this._contexts.flags && (t._contexts.flags = {
3259
3260
  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, hn(t, pn(this)), t;
3261
+ }), 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, pn(t, gn(this)), t;
3261
3262
  }
3262
3263
  /**
3263
3264
  * @inheritDoc
@@ -3304,7 +3305,7 @@ class Mt {
3304
3305
  id: void 0,
3305
3306
  ip_address: void 0,
3306
3307
  username: void 0
3307
- }, this._session && Et(this._session, { user: t }), this._notifyScopeListeners(), this;
3308
+ }, this._session && vt(this._session, { user: t }), this._notifyScopeListeners(), this;
3308
3309
  }
3309
3310
  /**
3310
3311
  * @inheritDoc
@@ -3416,7 +3417,7 @@ class Mt {
3416
3417
  * @inheritDoc
3417
3418
  */
3418
3419
  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, hn(this, void 0), this._attachments = [], this.setPropagationContext({ traceId: fn() }), this._notifyScopeListeners(), this;
3420
+ 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, pn(this, void 0), this._attachments = [], this.setPropagationContext({ traceId: hn() }), this._notifyScopeListeners(), this;
3420
3421
  }
3421
3422
  /**
3422
3423
  * @inheritDoc
@@ -3426,7 +3427,7 @@ class Mt {
3426
3427
  if (r <= 0)
3427
3428
  return this;
3428
3429
  const o = {
3429
- timestamp: it(),
3430
+ timestamp: at(),
3430
3431
  ...t
3431
3432
  };
3432
3433
  return this._breadcrumbs.push(o), this._breadcrumbs.length > r && (this._breadcrumbs = this._breadcrumbs.slice(-r), this._client && this._client.recordDroppedEvent("buffer_overflow", "log_item")), this._notifyScopeListeners(), this;
@@ -3470,14 +3471,14 @@ class Mt {
3470
3471
  propagationContext: this._propagationContext,
3471
3472
  sdkProcessingMetadata: this._sdkProcessingMetadata,
3472
3473
  transactionName: this._transactionName,
3473
- span: pn(this)
3474
+ span: gn(this)
3474
3475
  };
3475
3476
  }
3476
3477
  /**
3477
3478
  * @inheritDoc
3478
3479
  */
3479
3480
  setSDKProcessingMetadata(t) {
3480
- return this._sdkProcessingMetadata = at(this._sdkProcessingMetadata, t, 2), this;
3481
+ return this._sdkProcessingMetadata = ct(this._sdkProcessingMetadata, t, 2), this;
3481
3482
  }
3482
3483
  /**
3483
3484
  * @inheritDoc
@@ -3485,7 +3486,7 @@ class Mt {
3485
3486
  setPropagationContext(t) {
3486
3487
  return this._propagationContext = {
3487
3488
  // eslint-disable-next-line deprecation/deprecation
3488
- spanId: vt(),
3489
+ spanId: It(),
3489
3490
  ...t
3490
3491
  }, this;
3491
3492
  }
@@ -3552,10 +3553,10 @@ class Mt {
3552
3553
  }
3553
3554
  const ce = Mt;
3554
3555
  function lo() {
3555
- return tt("defaultCurrentScope", () => new ce());
3556
+ return nt("defaultCurrentScope", () => new ce());
3556
3557
  }
3557
3558
  function Ao() {
3558
- return tt("defaultIsolationScope", () => new ce());
3559
+ return nt("defaultIsolationScope", () => new ce());
3559
3560
  }
3560
3561
  class fo {
3561
3562
  constructor(t, n) {
@@ -3575,7 +3576,7 @@ class fo {
3575
3576
  } catch (o) {
3576
3577
  throw this._popScope(), o;
3577
3578
  }
3578
- return ot(r) ? r.then(
3579
+ return st(r) ? r.then(
3579
3580
  (o) => (this._popScope(), o),
3580
3581
  (o) => {
3581
3582
  throw this._popScope(), o;
@@ -3634,36 +3635,36 @@ function po(e, t) {
3634
3635
  const n = ve();
3635
3636
  return n.withScope(() => (n.getStackTop().scope = e, t(e)));
3636
3637
  }
3637
- function gn(e) {
3638
+ function yn(e) {
3638
3639
  return ve().withScope(() => e(ve().getIsolationScope()));
3639
3640
  }
3640
3641
  function go() {
3641
3642
  return {
3642
- withIsolationScope: gn,
3643
+ withIsolationScope: yn,
3643
3644
  withScope: ho,
3644
3645
  withSetScope: po,
3645
- withSetIsolationScope: (e, t) => gn(t),
3646
+ withSetIsolationScope: (e, t) => yn(t),
3646
3647
  getCurrentScope: () => ve().getScope(),
3647
3648
  getIsolationScope: () => ve().getIsolationScope()
3648
3649
  };
3649
3650
  }
3650
- function Wn(e) {
3651
+ function Yn(e) {
3651
3652
  const t = Nt(e);
3652
3653
  return t.acs ? t.acs : go();
3653
3654
  }
3654
- function Yn() {
3655
+ function Vn() {
3655
3656
  const e = Ot();
3656
- return Wn(e).getCurrentScope();
3657
+ return Yn(e).getCurrentScope();
3657
3658
  }
3658
3659
  function yo() {
3659
3660
  const e = Ot();
3660
- return Wn(e).getIsolationScope();
3661
+ return Yn(e).getIsolationScope();
3661
3662
  }
3662
3663
  function mo() {
3663
- return tt("globalScope", () => new ce());
3664
+ return nt("globalScope", () => new ce());
3664
3665
  }
3665
3666
  function xt() {
3666
- return Yn().getClient();
3667
+ return Vn().getClient();
3667
3668
  }
3668
3669
  function Co(e) {
3669
3670
  const t = e.getPropagationContext(), { traceId: n, spanId: r, parentSpanId: o } = t;
@@ -3699,31 +3700,31 @@ function wo(e) {
3699
3700
  return n;
3700
3701
  }
3701
3702
  function To(e) {
3702
- if (!(!e || !Jn(e) && !Array.isArray(e)))
3703
+ if (!(!e || !qn(e) && !Array.isArray(e)))
3703
3704
  return Array.isArray(e) ? e.reduce((t, n) => {
3704
- const r = yn(n);
3705
+ const r = mn(n);
3705
3706
  return Object.entries(r).forEach(([o, i]) => {
3706
3707
  t[o] = i;
3707
3708
  }), t;
3708
- }, {}) : yn(e);
3709
+ }, {}) : mn(e);
3709
3710
  }
3710
- function yn(e) {
3711
+ function mn(e) {
3711
3712
  return e.split(",").map((t) => t.split("=").map((n) => decodeURIComponent(n.trim()))).reduce((t, [n, r]) => (n && r && (t[n] = r), t), {});
3712
3713
  }
3713
3714
  const Lo = 1;
3714
- let mn = !1;
3715
+ let Cn = !1;
3715
3716
  function Ro(e) {
3716
- const { spanId: t, traceId: n, isRemote: r } = e.spanContext(), o = r ? t : Ut(e).parent_span_id, i = r ? vt() : t;
3717
+ const { spanId: t, traceId: n, isRemote: r } = e.spanContext(), o = r ? t : Ut(e).parent_span_id, i = r ? It() : t;
3717
3718
  return V({
3718
3719
  parent_span_id: o,
3719
3720
  span_id: i,
3720
3721
  trace_id: n
3721
3722
  });
3722
3723
  }
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
3724
  function bn(e) {
3725
+ return typeof e == "number" ? En(e) : Array.isArray(e) ? e[0] + e[1] / 1e9 : e instanceof Date ? En(e.getTime()) : Wn();
3726
+ }
3727
+ function En(e) {
3727
3728
  return e > 9999999999 ? e / 1e3 : e;
3728
3729
  }
3729
3730
  function Ut(e) {
@@ -3739,9 +3740,9 @@ function Ut(e) {
3739
3740
  data: r,
3740
3741
  description: i,
3741
3742
  parent_span_id: u,
3742
- start_timestamp: Cn(o),
3743
+ start_timestamp: bn(o),
3743
3744
  // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
3744
- timestamp: Cn(c) || void 0,
3745
+ timestamp: bn(c) || void 0,
3745
3746
  status: Mo(l),
3746
3747
  op: r[Bo],
3747
3748
  origin: r[So],
@@ -3772,15 +3773,15 @@ function Mo(e) {
3772
3773
  return e.code === Qo ? "ok" : e.message || "unknown_error";
3773
3774
  }
3774
3775
  const xo = "_sentryRootSpan";
3775
- function Vn(e) {
3776
+ function Zn(e) {
3776
3777
  return e[xo] || e;
3777
3778
  }
3778
3779
  function Uo() {
3779
- mn || (nt(() => {
3780
+ Cn || (rt(() => {
3780
3781
  console.warn(
3781
3782
  "[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
3783
  );
3783
- }), mn = !0);
3784
+ }), Cn = !0);
3784
3785
  }
3785
3786
  function Fo(e) {
3786
3787
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
@@ -3788,10 +3789,10 @@ function Fo(e) {
3788
3789
  const t = xt(), n = t && t.getOptions();
3789
3790
  return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
3790
3791
  }
3791
- const Zn = "production", Xo = "_frozenDsc";
3792
- function $n(e, t) {
3792
+ const $n = "production", Xo = "_frozenDsc";
3793
+ function er(e, t) {
3793
3794
  const n = t.getOptions(), { publicKey: r } = t.getDsn() || {}, o = V({
3794
- environment: n.environment || Zn,
3795
+ environment: n.environment || $n,
3795
3796
  release: n.release,
3796
3797
  public_key: r,
3797
3798
  trace_id: e
@@ -3800,19 +3801,19 @@ function $n(e, t) {
3800
3801
  }
3801
3802
  function Ho(e, t) {
3802
3803
  const n = t.getPropagationContext();
3803
- return n.dsc || $n(n.traceId, e);
3804
+ return n.dsc || er(n.traceId, e);
3804
3805
  }
3805
3806
  function jo(e) {
3806
3807
  const t = xt();
3807
3808
  if (!t)
3808
3809
  return {};
3809
- const n = Vn(e), r = n[Xo];
3810
+ const n = Zn(e), r = n[Xo];
3810
3811
  if (r)
3811
3812
  return r;
3812
3813
  const o = n.spanContext().traceState, i = o && o.get("sentry.dsc"), c = i && wo(i);
3813
3814
  if (c)
3814
3815
  return c;
3815
- const u = $n(e.spanContext().traceId, t), l = Ut(n), h = l.data || {}, y = h[Io];
3816
+ const u = er(e.spanContext().traceId, t), l = Ut(n), h = l.data || {}, y = h[Io];
3816
3817
  y != null && (u.sample_rate = `${y}`);
3817
3818
  const m = h[vo], b = l.description;
3818
3819
  return m !== "url" && b && (u.transaction = b), Fo() && (u.sampled = String(Do(n))), t.emit("createDsc", u, n), u;
@@ -3835,14 +3836,14 @@ const qo = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
3835
3836
  function zo(e) {
3836
3837
  return e === "http" || e === "https";
3837
3838
  }
3838
- function ct(e, t = !1) {
3839
+ function ut(e, t = !1) {
3839
3840
  const { host: n, path: r, pass: o, port: i, projectId: c, protocol: u, publicKey: l } = e;
3840
3841
  return `${u}://${l}${t && o ? `:${o}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${c}`;
3841
3842
  }
3842
3843
  function Ko(e) {
3843
3844
  const t = qo.exec(e);
3844
3845
  if (!t) {
3845
- nt(() => {
3846
+ rt(() => {
3846
3847
  console.error(`Invalid Sentry Dsn: ${e}`);
3847
3848
  });
3848
3849
  return;
@@ -3854,9 +3855,9 @@ function Ko(e) {
3854
3855
  const m = h.match(/^\d+/);
3855
3856
  m && (h = m[0]);
3856
3857
  }
3857
- return er({ host: i, pass: o, path: l, projectId: h, port: c, protocol: n, publicKey: r });
3858
+ return tr({ host: i, pass: o, path: l, projectId: h, port: c, protocol: n, publicKey: r });
3858
3859
  }
3859
- function er(e) {
3860
+ function tr(e) {
3860
3861
  return {
3861
3862
  protocol: e.protocol,
3862
3863
  publicKey: e.publicKey || "",
@@ -3874,7 +3875,7 @@ function Go(e) {
3874
3875
  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
3876
  }
3876
3877
  function Wo(e) {
3877
- const t = typeof e == "string" ? Ko(e) : er(e);
3878
+ const t = typeof e == "string" ? Ko(e) : tr(e);
3878
3879
  if (!(!t || !Go(t)))
3879
3880
  return t;
3880
3881
  }
@@ -3902,16 +3903,16 @@ function Yo() {
3902
3903
  }
3903
3904
  function oe(e, t = 100, n = 1 / 0) {
3904
3905
  try {
3905
- return Bt("", e, t, n);
3906
+ return St("", e, t, n);
3906
3907
  } catch (r) {
3907
3908
  return { ERROR: `**non-serializable** (${r})` };
3908
3909
  }
3909
3910
  }
3910
- function tr(e, t = 3, n = 100 * 1024) {
3911
+ function nr(e, t = 3, n = 100 * 1024) {
3911
3912
  const r = oe(e, t);
3912
- return es(r) > n ? tr(e, t - 1, n) : r;
3913
+ return es(r) > n ? nr(e, t - 1, n) : r;
3913
3914
  }
3914
- function Bt(e, t, n = 1 / 0, r = 1 / 0, o = Yo()) {
3915
+ function St(e, t, n = 1 / 0, r = 1 / 0, o = Yo()) {
3915
3916
  const [i, c] = o;
3916
3917
  if (t == null || // this matches null and undefined -> eqeq not eqeqeq
3917
3918
  ["boolean", "string"].includes(typeof t) || typeof t == "number" && Number.isFinite(t))
@@ -3930,12 +3931,12 @@ function Bt(e, t, n = 1 / 0, r = 1 / 0, o = Yo()) {
3930
3931
  if (h && typeof h.toJSON == "function")
3931
3932
  try {
3932
3933
  const I = h.toJSON();
3933
- return Bt("", I, l - 1, r, o);
3934
+ return St("", I, l - 1, r, o);
3934
3935
  } catch {
3935
3936
  }
3936
3937
  const y = Array.isArray(t) ? [] : {};
3937
3938
  let m = 0;
3938
- const b = zn(t);
3939
+ const b = Kn(t);
3939
3940
  for (const I in b) {
3940
3941
  if (!Object.prototype.hasOwnProperty.call(b, I))
3941
3942
  continue;
@@ -3944,7 +3945,7 @@ function Bt(e, t, n = 1 / 0, r = 1 / 0, o = Yo()) {
3944
3945
  break;
3945
3946
  }
3946
3947
  const B = b[I];
3947
- y[I] = Bt(I, B, l - 1, r, o), m++;
3948
+ y[I] = St(I, B, l - 1, r, o), m++;
3948
3949
  }
3949
3950
  return c(t), y;
3950
3951
  }
@@ -3995,7 +3996,7 @@ function ts(e, t) {
3995
3996
  const [n, r] = e;
3996
3997
  return [n, [...r, t]];
3997
3998
  }
3998
- function En(e, t) {
3999
+ function vn(e, t) {
3999
4000
  const n = e[1];
4000
4001
  for (const r of n) {
4001
4002
  const o = r[0].type;
@@ -4004,14 +4005,14 @@ function En(e, t) {
4004
4005
  }
4005
4006
  return !1;
4006
4007
  }
4007
- function St(e) {
4008
+ function _t(e) {
4008
4009
  return j.__SENTRY__ && j.__SENTRY__.encodePolyfill ? j.__SENTRY__.encodePolyfill(e) : new TextEncoder().encode(e);
4009
4010
  }
4010
4011
  function ns(e) {
4011
4012
  const [t, n] = e;
4012
4013
  let r = JSON.stringify(t);
4013
4014
  function o(i) {
4014
- typeof r == "string" ? r = typeof i == "string" ? r + i : [St(r), i] : r.push(typeof i == "string" ? St(i) : i);
4015
+ typeof r == "string" ? r = typeof i == "string" ? r + i : [_t(r), i] : r.push(typeof i == "string" ? _t(i) : i);
4015
4016
  }
4016
4017
  for (const i of n) {
4017
4018
  const [c, u] = i;
@@ -4039,7 +4040,7 @@ function rs(e) {
4039
4040
  return n;
4040
4041
  }
4041
4042
  function os(e) {
4042
- const t = typeof e.data == "string" ? St(e.data) : e.data;
4043
+ const t = typeof e.data == "string" ? _t(e.data) : e.data;
4043
4044
  return [
4044
4045
  V({
4045
4046
  type: "attachment",
@@ -4069,10 +4070,10 @@ const ss = {
4069
4070
  statsd: "metric_bucket",
4070
4071
  raw_security: "security"
4071
4072
  };
4072
- function vn(e) {
4073
+ function In(e) {
4073
4074
  return ss[e];
4074
4075
  }
4075
- function nr(e) {
4076
+ function rr(e) {
4076
4077
  if (!e || !e.sdk)
4077
4078
  return;
4078
4079
  const { name: t, version: n } = e.sdk;
@@ -4084,7 +4085,7 @@ function is(e, t, n, r) {
4084
4085
  event_id: e.event_id,
4085
4086
  sent_at: (/* @__PURE__ */ new Date()).toISOString(),
4086
4087
  ...t && { sdk: t },
4087
- ...!!n && r && { dsn: ct(r) },
4088
+ ...!!n && r && { dsn: ut(r) },
4088
4089
  ...o && {
4089
4090
  trace: V({ ...o })
4090
4091
  }
@@ -4094,37 +4095,37 @@ function as(e, t) {
4094
4095
  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
4096
  }
4096
4097
  function cs(e, t, n, r) {
4097
- const o = nr(n), i = {
4098
+ const o = rr(n), i = {
4098
4099
  sent_at: (/* @__PURE__ */ new Date()).toISOString(),
4099
4100
  ...o && { sdk: o },
4100
- ...!!r && t && { dsn: ct(t) }
4101
+ ...!!r && t && { dsn: ut(t) }
4101
4102
  }, c = "aggregates" in e ? [{ type: "sessions" }, e] : [{ type: "session" }, e.toJSON()];
4102
4103
  return we(i, [c]);
4103
4104
  }
4104
4105
  function us(e, t, n, r) {
4105
- const o = nr(n), i = e.type && e.type !== "replay_event" ? e.type : "event";
4106
+ const o = rr(n), i = e.type && e.type !== "replay_event" ? e.type : "event";
4106
4107
  as(e, n && n.sdk);
4107
4108
  const c = is(e, o, r, t);
4108
4109
  return delete e.sdkProcessingMetadata, we(c, [[{ type: i }, e]]);
4109
4110
  }
4110
- function _t(e, t, n, r = 0) {
4111
+ function Qt(e, t, n, r = 0) {
4111
4112
  return new G((o, i) => {
4112
4113
  const c = e[r];
4113
4114
  if (t === null || typeof c != "function")
4114
4115
  o(t);
4115
4116
  else {
4116
4117
  const u = c({ ...t }, n);
4117
- U && c.id && u === null && N.log(`Event processor "${c.id}" dropped event`), ot(u) ? u.then((l) => _t(e, l, n, r + 1).then(o)).then(null, i) : _t(e, u, n, r + 1).then(o).then(null, i);
4118
+ U && c.id && u === null && N.log(`Event processor "${c.id}" dropped event`), st(u) ? u.then((l) => Qt(e, l, n, r + 1).then(o)).then(null, i) : Qt(e, u, n, r + 1).then(o).then(null, i);
4118
4119
  }
4119
4120
  });
4120
4121
  }
4121
- let Ne, In, De;
4122
+ let Ne, Bn, De;
4122
4123
  function ls(e) {
4123
4124
  const t = j._sentryDebugIds;
4124
4125
  if (!t)
4125
4126
  return {};
4126
4127
  const n = Object.keys(t);
4127
- return De && n.length === In || (In = n.length, De = n.reduce((r, o) => {
4128
+ return De && n.length === Bn || (Bn = n.length, De = n.reduce((r, o) => {
4128
4129
  Ne || (Ne = {});
4129
4130
  const i = Ne[o];
4130
4131
  if (i)
@@ -4146,7 +4147,7 @@ function As(e, t) {
4146
4147
  const { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: i } = t;
4147
4148
  ds(e, t), r && ps(e, r), gs(e, n), fs(e, o), hs(e, i);
4148
4149
  }
4149
- function Bn(e, t) {
4150
+ function Sn(e, t) {
4150
4151
  const {
4151
4152
  extra: n,
4152
4153
  tags: r,
@@ -4162,10 +4163,10 @@ function Bn(e, t) {
4162
4163
  transactionName: I,
4163
4164
  span: B
4164
4165
  } = 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]), m.length && (e.attachments = [...e.attachments, ...m]), e.propagationContext = { ...e.propagationContext, ...b };
4166
+ Me(e, "extra", n), Me(e, "tags", r), Me(e, "user", o), Me(e, "contexts", i), e.sdkProcessingMetadata = ct(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
4167
  }
4167
4168
  function Me(e, t, n) {
4168
- e[t] = at(e[t], n, 1);
4169
+ e[t] = ct(e[t], n, 1);
4169
4170
  }
4170
4171
  function ds(e, t) {
4171
4172
  const { extra: n, tags: r, user: o, contexts: i, level: c, transactionName: u } = t, l = V(n);
@@ -4195,7 +4196,7 @@ function ps(e, t) {
4195
4196
  dynamicSamplingContext: jo(t),
4196
4197
  ...e.sdkProcessingMetadata
4197
4198
  };
4198
- const n = Vn(t), r = Ut(n).description;
4199
+ const n = Zn(t), r = Ut(n).description;
4199
4200
  r && !e.transaction && e.type === "transaction" && (e.transaction = r);
4200
4201
  }
4201
4202
  function gs(e, t) {
@@ -4205,7 +4206,7 @@ function ys(e, t, n, r, o, i) {
4205
4206
  const { normalizeDepth: c = 3, normalizeMaxBreadth: u = 1e3 } = e, l = {
4206
4207
  ...t,
4207
4208
  event_id: t.event_id || n.event_id || te(),
4208
- timestamp: t.timestamp || it()
4209
+ timestamp: t.timestamp || at()
4209
4210
  }, h = n.integrations || e.integrations.map((S) => S.name);
4210
4211
  ms(l, e), Es(l, h), o && o.emit("applyFrameMetadata", t), t.type === void 0 && Cs(l, e.stackParser);
4211
4212
  const y = Is(r, n.captureContext);
@@ -4213,11 +4214,11 @@ function ys(e, t, n, r, o, i) {
4213
4214
  const m = o ? o.getEventProcessors() : [], b = mo().getScopeData();
4214
4215
  if (i) {
4215
4216
  const S = i.getScopeData();
4216
- Bn(b, S);
4217
+ Sn(b, S);
4217
4218
  }
4218
4219
  if (y) {
4219
4220
  const S = y.getScopeData();
4220
- Bn(b, S);
4221
+ Sn(b, S);
4221
4222
  }
4222
4223
  const I = [...n.attachments || [], ...b.attachments];
4223
4224
  I.length && (n.attachments = I), As(l, b);
@@ -4226,11 +4227,11 @@ function ys(e, t, n, r, o, i) {
4226
4227
  // Run scope event processors _after_ all other processors
4227
4228
  ...b.eventProcessors
4228
4229
  ];
4229
- return _t(B, l, n).then((S) => (S && bs(S), typeof c == "number" && c > 0 ? vs(S, c, u) : S));
4230
+ return Qt(B, l, n).then((S) => (S && bs(S), typeof c == "number" && c > 0 ? vs(S, c, u) : S));
4230
4231
  }
4231
4232
  function ms(e, t) {
4232
4233
  const { environment: n, release: r, dist: o, maxValueLength: i = 250 } = t;
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
+ e.environment = e.environment || n || $n, !e.release && r && (e.release = r), !e.dist && o && (e.dist = o), e.message && (e.message = Se(e.message, i));
4234
4235
  const c = e.exception && e.exception.values && e.exception.values[0];
4235
4236
  c && c.value && (c.value = Se(c.value, i));
4236
4237
  const u = e.request;
@@ -4325,23 +4326,23 @@ function Qs(e, t) {
4325
4326
  function ks(e, t, n) {
4326
4327
  return t || `${_s(e)}?${Qs(e, n)}`;
4327
4328
  }
4328
- const Sn = [];
4329
+ const _n = [];
4329
4330
  function Ps(e, t) {
4330
4331
  const n = {};
4331
4332
  return t.forEach((r) => {
4332
- r && rr(e, r, n);
4333
+ r && or(e, r, n);
4333
4334
  }), n;
4334
4335
  }
4335
- function _n(e, t) {
4336
+ function Qn(e, t) {
4336
4337
  for (const n of t)
4337
4338
  n && n.afterAllSetup && n.afterAllSetup(e);
4338
4339
  }
4339
- function rr(e, t, n) {
4340
+ function or(e, t, n) {
4340
4341
  if (n[t.name]) {
4341
4342
  U && N.log(`Integration skipped because it was already installed: ${t.name}`);
4342
4343
  return;
4343
4344
  }
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
+ if (n[t.name] = t, _n.indexOf(t.name) === -1 && typeof t.setupOnce == "function" && (t.setupOnce(), _n.push(t.name)), t.setup && typeof t.setup == "function" && t.setup(e), typeof t.preprocessEvent == "function") {
4345
4346
  const r = t.preprocessEvent.bind(t);
4346
4347
  e.on("preprocessEvent", (o, i) => r(o, i, e));
4347
4348
  }
@@ -4357,7 +4358,7 @@ function ws(e, t, n) {
4357
4358
  const r = [
4358
4359
  { type: "client_report" },
4359
4360
  {
4360
- timestamp: it(),
4361
+ timestamp: at(),
4361
4362
  discarded_events: e
4362
4363
  }
4363
4364
  ];
@@ -4368,7 +4369,7 @@ class Y extends Error {
4368
4369
  super(t), this.message = t, this.logLevel = n;
4369
4370
  }
4370
4371
  }
4371
- const Qn = "Not capturing exception because it's already been captured.";
4372
+ const kn = "Not capturing exception because it's already been captured.";
4372
4373
  class Ts {
4373
4374
  /** Options passed to the SDK. */
4374
4375
  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
@@ -4396,7 +4397,7 @@ class Ts {
4396
4397
  });
4397
4398
  }
4398
4399
  const r = ["enableTracing", "tracesSampleRate", "tracesSampler"].find((o) => o in t && t[o] == null);
4399
- r && nt(() => {
4400
+ r && rt(() => {
4400
4401
  console.warn(
4401
4402
  `[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`
4402
4403
  );
@@ -4407,8 +4408,8 @@ class Ts {
4407
4408
  */
4408
4409
  captureException(t, n, r) {
4409
4410
  const o = te();
4410
- if (dn(t))
4411
- return U && N.log(Qn), o;
4411
+ if (fn(t))
4412
+ return U && N.log(kn), o;
4412
4413
  const i = {
4413
4414
  event_id: o,
4414
4415
  ...n
@@ -4434,8 +4435,8 @@ class Ts {
4434
4435
  */
4435
4436
  captureEvent(t, n, r) {
4436
4437
  const o = te();
4437
- if (n && n.originalException && dn(n.originalException))
4438
- return U && N.log(Qn), o;
4438
+ if (n && n.originalException && fn(n.originalException))
4439
+ return U && N.log(kn), o;
4439
4440
  const i = {
4440
4441
  event_id: o,
4441
4442
  ...n
@@ -4446,7 +4447,7 @@ class Ts {
4446
4447
  * @inheritDoc
4447
4448
  */
4448
4449
  captureSession(t) {
4449
- typeof t.release != "string" ? U && N.warn("Discarded session because of missing or non-string release") : (this.sendSession(t), Et(t, { init: !1 }));
4450
+ typeof t.release != "string" ? U && N.warn("Discarded session because of missing or non-string release") : (this.sendSession(t), vt(t, { init: !1 }));
4450
4451
  }
4451
4452
  /**
4452
4453
  * @inheritDoc
@@ -4517,7 +4518,7 @@ class Ts {
4517
4518
  */
4518
4519
  addIntegration(t) {
4519
4520
  const n = this._integrations[t.name];
4520
- rr(this, t, this._integrations), n || _n(this, [t]);
4521
+ or(this, t, this._integrations), n || Qn(this, [t]);
4521
4522
  }
4522
4523
  /**
4523
4524
  * @inheritDoc
@@ -4573,7 +4574,7 @@ class Ts {
4573
4574
  /** Setup integrations for this client. */
4574
4575
  _setupIntegrations() {
4575
4576
  const { integrations: t } = this._options;
4576
- this._integrations = Ps(this, t), _n(this, t);
4577
+ this._integrations = Ps(this, t), Qn(this, t);
4577
4578
  }
4578
4579
  /** Updates existing session based on the provided event */
4579
4580
  _updateSessionFromEvent(t, n) {
@@ -4590,7 +4591,7 @@ class Ts {
4590
4591
  }
4591
4592
  }
4592
4593
  const c = t.status === "ok";
4593
- (c && t.errors === 0 || c && r) && (Et(t, {
4594
+ (c && t.errors === 0 || c && r) && (vt(t, {
4594
4595
  ...r && { status: "crashed" },
4595
4596
  errors: t.errors || Number(o || r)
4596
4597
  }), this.captureSession(t));
@@ -4631,7 +4632,7 @@ class Ts {
4631
4632
  * @param currentScope A scope containing event metadata.
4632
4633
  * @returns A new event with more information.
4633
4634
  */
4634
- _prepareEvent(t, n, r = Yn(), o = yo()) {
4635
+ _prepareEvent(t, n, r = Vn(), o = yo()) {
4635
4636
  const i = this.getOptions(), c = Object.keys(this._integrations);
4636
4637
  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
4638
  if (u === null)
@@ -4675,9 +4676,9 @@ class Ts {
4675
4676
  * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
4676
4677
  */
4677
4678
  _processEvent(t, n, r) {
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
+ const o = this.getOptions(), { sampleRate: i } = o, c = ir(t), u = sr(t), l = t.type || "error", h = `before send for type \`${l}\``, y = typeof i > "u" ? void 0 : Jo(i);
4679
4680
  if (u && typeof y == "number" && Math.random() > y)
4680
- return this.recordDroppedEvent("sample_rate", "error", t), Ge(
4681
+ return this.recordDroppedEvent("sample_rate", "error", t), We(
4681
4682
  new Y(
4682
4683
  `Discarding event because it's not included in the random sample (sampling rate = ${i})`,
4683
4684
  "log"
@@ -4763,7 +4764,7 @@ Reason: ${B}`
4763
4764
  return;
4764
4765
  }
4765
4766
  U && N.log("Sending outcomes:", t);
4766
- const n = ws(t, this._options.tunnel && ct(this._dsn));
4767
+ const n = ws(t, this._options.tunnel && ut(this._dsn));
4767
4768
  this.sendEnvelope(n);
4768
4769
  }
4769
4770
  /**
@@ -4772,7 +4773,7 @@ Reason: ${B}`
4772
4773
  }
4773
4774
  function Ls(e, t) {
4774
4775
  const n = `${t} must return \`null\` or a valid event.`;
4775
- if (ot(e))
4776
+ if (st(e))
4776
4777
  return e.then(
4777
4778
  (r) => {
4778
4779
  if (!Ee(r) && r !== null)
@@ -4789,9 +4790,9 @@ function Ls(e, t) {
4789
4790
  }
4790
4791
  function Rs(e, t, n, r) {
4791
4792
  const { beforeSend: o, beforeSendTransaction: i, beforeSendSpan: c } = t;
4792
- if (or(n) && o)
4793
+ if (sr(n) && o)
4793
4794
  return o(n, r);
4794
- if (sr(n)) {
4795
+ if (ir(n)) {
4795
4796
  if (n.spans && c) {
4796
4797
  const u = [];
4797
4798
  for (const l of n.spans) {
@@ -4813,10 +4814,10 @@ function Rs(e, t, n, r) {
4813
4814
  }
4814
4815
  return n;
4815
4816
  }
4816
- function or(e) {
4817
+ function sr(e) {
4817
4818
  return e.type === void 0;
4818
4819
  }
4819
- function sr(e) {
4820
+ function ir(e) {
4820
4821
  return e.type === "transaction";
4821
4822
  }
4822
4823
  function Os(e) {
@@ -4829,7 +4830,7 @@ function Os(e) {
4829
4830
  }
4830
4831
  function o(c) {
4831
4832
  if (!n())
4832
- return Ge(new Y("Not adding Promise because buffer limit was reached."));
4833
+ return We(new Y("Not adding Promise because buffer limit was reached."));
4833
4834
  const u = c();
4834
4835
  return t.indexOf(u) === -1 && t.push(u), u.then(() => r(u)).then(
4835
4836
  null,
@@ -4896,19 +4897,19 @@ function Xs(e, t, n = Os(
4896
4897
  const o = (c) => n.drain(c);
4897
4898
  function i(c) {
4898
4899
  const u = [];
4899
- if (En(c, (m, b) => {
4900
- const I = vn(b);
4900
+ if (vn(c, (m, b) => {
4901
+ const I = In(b);
4901
4902
  if (xs(r, I)) {
4902
- const B = kn(m, b);
4903
+ const B = Pn(m, b);
4903
4904
  e.recordDroppedEvent("ratelimit_backoff", I, B);
4904
4905
  } else
4905
4906
  u.push(m);
4906
4907
  }), u.length === 0)
4907
4908
  return he({});
4908
4909
  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);
4910
+ vn(l, (b, I) => {
4911
+ const B = Pn(b, I);
4912
+ e.recordDroppedEvent(m, In(I), B);
4912
4913
  });
4913
4914
  }, y = () => t({ body: ns(l) }).then(
4914
4915
  (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),
@@ -4930,7 +4931,7 @@ function Xs(e, t, n = Os(
4930
4931
  flush: o
4931
4932
  };
4932
4933
  }
4933
- function kn(e, t) {
4934
+ function Pn(e, t) {
4934
4935
  if (!(t !== "event" && t !== "transaction"))
4935
4936
  return Array.isArray(e) ? e[1] : void 0;
4936
4937
  }
@@ -4952,7 +4953,7 @@ function Js() {
4952
4953
  return "npm";
4953
4954
  }
4954
4955
  const xe = j, qs = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
4955
- function ir(e, t) {
4956
+ function ar(e, t) {
4956
4957
  const n = Ft(e, t), r = {
4957
4958
  type: Ys(t),
4958
4959
  value: Vs(t)
@@ -4961,12 +4962,12 @@ function ir(e, t) {
4961
4962
  }
4962
4963
  function zs(e, t, n, r) {
4963
4964
  const o = xt(), i = o && o.getOptions().normalizeDepth, c = ri(t), u = {
4964
- __serialized__: tr(t, i)
4965
+ __serialized__: nr(t, i)
4965
4966
  };
4966
4967
  if (c)
4967
4968
  return {
4968
4969
  exception: {
4969
- values: [ir(e, c)]
4970
+ values: [ar(e, c)]
4970
4971
  },
4971
4972
  extra: u
4972
4973
  };
@@ -4974,7 +4975,7 @@ function zs(e, t, n, r) {
4974
4975
  exception: {
4975
4976
  values: [
4976
4977
  {
4977
- type: rt(t) ? t.constructor.name : r ? "UnhandledRejection" : "Error",
4978
+ type: ot(t) ? t.constructor.name : r ? "UnhandledRejection" : "Error",
4978
4979
  value: ti(t, { isUnhandledRejection: r })
4979
4980
  }
4980
4981
  ]
@@ -4987,10 +4988,10 @@ function zs(e, t, n, r) {
4987
4988
  }
4988
4989
  return l;
4989
4990
  }
4990
- function ht(e, t) {
4991
+ function pt(e, t) {
4991
4992
  return {
4992
4993
  exception: {
4993
- values: [ir(e, t)]
4994
+ values: [ar(e, t)]
4994
4995
  }
4995
4996
  };
4996
4997
  }
@@ -5009,46 +5010,46 @@ function Gs(e) {
5009
5010
  function Ws(e) {
5010
5011
  return typeof e.framesToPop == "number" ? e.framesToPop : 0;
5011
5012
  }
5012
- function ar(e) {
5013
+ function cr(e) {
5013
5014
  return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? e instanceof WebAssembly.Exception : !1;
5014
5015
  }
5015
5016
  function Ys(e) {
5016
5017
  const t = e && e.name;
5017
- return !t && ar(e) ? e.message && Array.isArray(e.message) && e.message.length == 2 ? e.message[0] : "WebAssembly.Exception" : t;
5018
+ return !t && cr(e) ? e.message && Array.isArray(e.message) && e.message.length == 2 ? e.message[0] : "WebAssembly.Exception" : t;
5018
5019
  }
5019
5020
  function Vs(e) {
5020
5021
  const t = e && e.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
+ return t ? t.error && typeof t.error.message == "string" ? t.error.message : cr(e) && Array.isArray(e.message) && e.message.length == 2 ? e.message[1] : t : "No error message";
5022
5023
  }
5023
5024
  function Zs(e, t, n, r) {
5024
5025
  const o = n && n.syntheticException || void 0, i = ei(e, t, o, r);
5025
5026
  return _e(i), i.level = "error", n && n.event_id && (i.event_id = n.event_id), he(i);
5026
5027
  }
5027
5028
  function $s(e, t, n = "info", r, o) {
5028
- const i = r && r.syntheticException || void 0, c = Qt(e, t, i, o);
5029
+ const i = r && r.syntheticException || void 0, c = kt(e, t, i, o);
5029
5030
  return c.level = n, r && r.event_id && (c.event_id = r.event_id), he(c);
5030
5031
  }
5031
5032
  function ei(e, t, n, r, o) {
5032
5033
  let i;
5033
- if (jn(t) && t.error)
5034
- return ht(e, t.error);
5035
- if (cn(t) || Wr(t)) {
5034
+ if (Jn(t) && t.error)
5035
+ return pt(e, t.error);
5036
+ if (un(t) || Wr(t)) {
5036
5037
  const c = t;
5037
5038
  if ("stack" in t)
5038
- i = ht(e, t);
5039
+ i = pt(e, t);
5039
5040
  else {
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);
5041
+ const u = c.name || (un(c) ? "DOMError" : "DOMException"), l = c.message ? `${u}: ${c.message}` : u;
5042
+ i = kt(e, l, n, r), dn(i, l);
5042
5043
  }
5043
5044
  return "code" in c && (i.tags = { ...i.tags, "DOMException.code": `${c.code}` }), i;
5044
5045
  }
5045
- return Hn(t) ? ht(e, t) : Ee(t) || rt(t) ? (i = zs(e, t, n, o), _e(i, {
5046
+ return jn(t) ? pt(e, t) : Ee(t) || ot(t) ? (i = zs(e, t, n, o), _e(i, {
5046
5047
  synthetic: !0
5047
- }), i) : (i = Qt(e, t, n, r), An(i, `${t}`), _e(i, {
5048
+ }), i) : (i = kt(e, t, n, r), dn(i, `${t}`), _e(i, {
5048
5049
  synthetic: !0
5049
5050
  }), i);
5050
5051
  }
5051
- function Qt(e, t, n, r) {
5052
+ function kt(e, t, n, r) {
5052
5053
  const o = {};
5053
5054
  if (r && n) {
5054
5055
  const i = Ft(e, n);
@@ -5067,7 +5068,7 @@ function Qt(e, t, n, r) {
5067
5068
  }
5068
5069
  function ti(e, { isUnhandledRejection: t }) {
5069
5070
  const n = oo(e), r = "exception";
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
+ return Jn(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : ot(e) ? `Event \`${ni(e)}\` (type=${e.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
5071
5072
  }
5072
5073
  function ni(e) {
5073
5074
  try {
@@ -5098,7 +5099,7 @@ function oi(e, {
5098
5099
  version: t.sdk.version
5099
5100
  }
5100
5101
  },
5101
- ...!!n && !!r && { dsn: ct(r) }
5102
+ ...!!n && !!r && { dsn: ut(r) }
5102
5103
  }, i = si(e);
5103
5104
  return we(o, [i]);
5104
5105
  }
@@ -5179,7 +5180,7 @@ function ci(e) {
5179
5180
  }
5180
5181
  return n && (He[e] = n.bind(Ue));
5181
5182
  }
5182
- function Pn(e) {
5183
+ function wn(e) {
5183
5184
  He[e] = void 0;
5184
5185
  }
5185
5186
  function ui(e, t = ci("fetch")) {
@@ -5207,7 +5208,7 @@ function ui(e, t = ci("fetch")) {
5207
5208
  ...e.fetchOptions
5208
5209
  };
5209
5210
  if (!t)
5210
- return Pn("fetch"), Ge("No fetch implementation available");
5211
+ return wn("fetch"), We("No fetch implementation available");
5211
5212
  try {
5212
5213
  return t(e.url, u).then((l) => (n -= c, r--, {
5213
5214
  statusCode: l.status,
@@ -5217,13 +5218,13 @@ function ui(e, t = ci("fetch")) {
5217
5218
  }
5218
5219
  }));
5219
5220
  } catch (l) {
5220
- return Pn("fetch"), n -= c, r--, Ge(l);
5221
+ return wn("fetch"), n -= c, r--, We(l);
5221
5222
  }
5222
5223
  }
5223
5224
  return Xs(e, o);
5224
5225
  }
5225
5226
  const li = 30, Ai = 50;
5226
- function kt(e, t, n, r) {
5227
+ function Pt(e, t, n, r) {
5227
5228
  const o = {
5228
5229
  filename: e,
5229
5230
  function: t === "<anonymous>" ? be : t,
@@ -5236,7 +5237,7 @@ const di = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, fi = /^\s*at (?:(.+?\)(?: \
5236
5237
  const t = di.exec(e);
5237
5238
  if (t) {
5238
5239
  const [, r, o, i] = t;
5239
- return kt(r, be, +o, +i);
5240
+ return Pt(r, be, +o, +i);
5240
5241
  }
5241
5242
  const n = fi.exec(e);
5242
5243
  if (n) {
@@ -5244,8 +5245,8 @@ const di = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, fi = /^\s*at (?:(.+?\)(?: \
5244
5245
  const c = hi.exec(n[2]);
5245
5246
  c && (n[2] = c[1], n[3] = c[2], n[4] = c[3]);
5246
5247
  }
5247
- const [o, i] = cr(n[1] || be, n[2]);
5248
- return kt(i, o, n[3] ? +n[3] : void 0, n[4] ? +n[4] : void 0);
5248
+ const [o, i] = ur(n[1] || be, n[2]);
5249
+ return Pt(i, o, n[3] ? +n[3] : void 0, n[4] ? +n[4] : void 0);
5249
5250
  }
5250
5251
  }, 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) => {
5251
5252
  const t = yi.exec(e);
@@ -5255,63 +5256,80 @@ const di = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, fi = /^\s*at (?:(.+?\)(?: \
5255
5256
  i && (t[1] = t[1] || "eval", t[3] = i[1], t[4] = i[2], t[5] = "");
5256
5257
  }
5257
5258
  let r = t[3], o = t[1] || be;
5258
- return [o, r] = cr(o, r), kt(r, o, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
5259
+ return [o, r] = ur(o, r), Pt(r, o, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
5259
5260
  }
5260
- }, bi = [Ai, Ci], Ei = [gi, bi], vi = zr(...Ei), cr = (e, t) => {
5261
+ }, bi = [Ai, Ci], Ei = [gi, bi], vi = zr(...Ei), ur = (e, t) => {
5261
5262
  const n = e.indexOf("safari-extension") !== -1, r = e.indexOf("safari-web-extension") !== -1;
5262
5263
  return n || r ? [
5263
5264
  e.indexOf("@") !== -1 ? e.split("@")[0] : be,
5264
5265
  n ? `safari-extension:${t}` : `safari-web-extension:${t}`
5265
5266
  ] : [e, t];
5266
5267
  }, Ii = "https://bbed26c9265c425abb56ff9d3728183e@sentry.chocodev.kz/302";
5267
- let Pt = null;
5268
+ let wt = null;
5268
5269
  function Bi(e) {
5269
5270
  const t = new ii({
5270
5271
  dsn: Ii,
5271
5272
  transport: ui,
5272
5273
  stackParser: vi,
5273
5274
  integrations: [],
5274
- release: "1.1.47",
5275
+ release: "1.1.48",
5275
5276
  environment: e.environment || "production"
5276
5277
  }), n = new ce();
5277
- n.setClient(t), n.setTags(e), t.init(), Pt = n;
5278
+ n.setClient(t), n.setTags(e), t.init(), wt = n;
5278
5279
  }
5279
5280
  function se(e, t) {
5280
- Pt && Pt.captureException(
5281
+ wt && wt.captureException(
5281
5282
  e,
5282
5283
  t ? { captureContext: { extra: t } } : void 0
5283
5284
  );
5284
5285
  }
5285
- function wt(e, t) {
5286
- mt("webPayToken", e), t && mt("webPayRefreshToken", t);
5286
+ function je(e, t) {
5287
+ Ct("webPayToken", e), t && Ct("webPayRefreshToken", t);
5287
5288
  }
5288
- function wn() {
5289
- Ke("webPayToken"), Ke("webPayRefreshToken");
5289
+ function Tn() {
5290
+ Ge("webPayToken"), Ge("webPayRefreshToken");
5290
5291
  }
5291
5292
  async function Si(e) {
5292
- const t = xn("webPayRefreshToken");
5293
+ const t = Un("webPayRefreshToken");
5293
5294
  if (t && e.config.clientId)
5294
5295
  try {
5295
- const r = await Dr(
5296
+ const n = await Dr(
5296
5297
  e.apiUrl,
5297
5298
  e.config.clientId,
5298
5299
  t
5299
5300
  );
5300
- wt(r.access_token, r.refresh_token), e.accessToken = r.access_token;
5301
+ je(n.access_token, n.refresh_token), e.accessToken = n.access_token;
5301
5302
  return;
5302
5303
  } catch {
5303
- Ke("webPayRefreshToken");
5304
+ Ge("webPayRefreshToken");
5304
5305
  }
5305
- if (!e.config.trackId || !e.config.clientId) {
5306
+ if (!e.config.clientId) {
5306
5307
  e.config.onError({ attributes: { message: e.t("errorMissingTrackClient") } });
5307
5308
  return;
5308
5309
  }
5309
- const n = await Nr(
5310
- e.apiUrl,
5311
- e.config.clientId,
5312
- e.config.trackId
5313
- );
5314
- wt(n.access_token, n.refresh_token), e.accessToken = n.access_token;
5310
+ if (!e.config.trackId && typeof e.config.onRequestNewTrackId == "function" && (e.config.trackId = await e.config.onRequestNewTrackId()), !e.config.trackId) {
5311
+ e.config.onError({ attributes: { message: e.t("errorMissingTrackClient") } });
5312
+ return;
5313
+ }
5314
+ try {
5315
+ const n = await tn(
5316
+ e.apiUrl,
5317
+ e.config.clientId,
5318
+ e.config.trackId
5319
+ );
5320
+ je(n.access_token, n.refresh_token), e.accessToken = n.access_token;
5321
+ } catch (n) {
5322
+ if (typeof e.config.onRequestNewTrackId == "function") {
5323
+ e.config.trackId = await e.config.onRequestNewTrackId();
5324
+ const r = await tn(
5325
+ e.apiUrl,
5326
+ e.config.clientId,
5327
+ e.config.trackId
5328
+ );
5329
+ je(r.access_token, r.refresh_token), e.accessToken = r.access_token;
5330
+ } else
5331
+ throw n;
5332
+ }
5315
5333
  }
5316
5334
  const _i = `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
5317
5335
  <path fill-rule="evenodd" clip-rule="evenodd" d="M8.89711 8.50443C10.4185 8.72365 10.6242 9.56386 10.7471 10.3459L10.7816 10.5699L10.8557 11.0301C11.0006 11.9088 11.303 13.7327 11.303 14.6845C11.303 14.9224 11.2806 15.105 11.2396 15.2053C11.1713 15.3599 10.9724 15.5082 10.6978 15.6319C10.0332 15.7846 9.33863 15.8671 8.62315 15.8671C8.54739 15.8671 8.47285 15.8637 8.39805 15.8616C8.10889 15.785 7.89156 15.657 7.77649 15.4821C7.42905 14.9542 7.40812 13.7781 7.40116 12.4037L7.40037 12.2443L7.39755 11.8324C7.38623 10.3774 7.37651 9.1229 7.94288 8.67272C8.16223 8.49957 8.47392 8.44225 8.89711 8.50443ZM5.58009 11.6722C5.90978 11.6548 6.12181 13.1684 6.16441 14.3162C6.19427 15.1152 6.10438 15.4439 5.96084 15.5619C5.79833 15.5113 5.63864 15.4565 5.48128 15.397C5.3763 15.219 5.29607 14.9389 5.2451 14.5721C5.08947 13.4193 5.22466 11.6925 5.58009 11.6722ZM13.8455 13.934C13.825 14.0391 13.796 14.1204 13.7602 14.1889C13.4783 14.4 13.1821 14.5938 12.872 14.7682C12.7733 14.7837 12.6856 14.7729 12.6427 14.7053C12.2318 14.0314 12.0775 11.9173 12.4752 11.7333C12.9936 11.4995 13.9224 13.5685 13.8455 13.934ZM8.50042 0C13.1296 0 16.8941 3.42166 16.9979 7.67934L17 7.82651V7.89454C16.9915 9.81778 16.2332 11.5773 14.9839 12.9392C14.9386 12.918 14.8559 12.8486 14.7062 12.6395C14.5512 12.4293 13.2148 10.5096 13.2148 8.30946C13.2148 7.87768 13.8816 7.20318 14.4717 6.61114C14.9128 6.16562 15.3306 5.74539 15.4845 5.4151C15.6804 4.98892 15.5433 4.69134 15.3265 4.59047C15.1302 4.50082 14.8355 4.56621 14.6287 4.90904C14.2893 5.46389 14.1805 5.56758 13.6855 5.93882C13.1984 6.30986 12.424 6.68338 12.424 6.19988C12.424 5.93882 12.8553 5.34757 13.0684 4.93314C13.286 4.51408 13.0515 4.21072 12.6022 4.21072C11.7198 4.21072 11.1341 5.2598 11.1341 5.62326C11.1341 5.98642 11.3229 6.03813 11.3229 6.46104C11.3229 6.88713 10.3548 7.4398 9.44281 7.4398C8.56481 7.4398 8.05566 7.27394 7.8447 6.80665L7.81777 6.74105L7.75678 6.57266C7.54046 5.98255 7.38528 5.55458 7.11514 5.10733C6.9717 4.87081 6.75038 4.70684 6.55897 4.56257C6.30881 4.38121 6.17902 4.21421 6.15193 4.08967C6.12696 3.96611 6.11352 3.73326 6.54117 3.19648C6.96793 2.66277 7.02775 2.25958 6.81418 2.05153C6.73678 1.97752 6.60482 1.93011 6.43535 1.93011C6.13562 1.93011 5.71912 2.07834 5.2899 2.48551C4.62267 3.12364 5.00146 3.72951 5.00146 3.99548C5.00146 4.26127 4.87922 4.41162 4.47882 4.77323C4.07547 5.13644 3.93627 5.44783 3.89014 6.69935C3.87247 7.3442 3.75079 7.71539 3.64156 8.04453C3.54718 8.33302 3.46038 8.60425 3.45569 8.99611C3.44822 9.43038 3.52566 9.71023 3.61604 10.0331C3.70477 10.3316 3.79902 10.6736 3.8594 11.2456C3.95544 12.1312 3.92205 12.8792 3.74744 13.6437L3.70084 13.8353L3.68995 13.8903C3.65419 14.0247 3.61168 14.1879 3.55423 14.249C1.4029 12.8228 0 10.4936 0 7.86072C0 3.51974 3.80561 0 8.50042 0Z" fill="#F14635"/>
@@ -5386,10 +5404,10 @@ const Xt = `<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="h
5386
5404
  <path d="M19.7045 10.7313C15.0567 10.7313 11.2687 6.94328 11.2687 2.26866C11.2687 2.10746 11.1612 2 11 2C10.8388 2 10.7313 2.10746 10.7313 2.26866C10.7313 6.94328 6.94328 10.7313 2.26866 10.7313C2.10746 10.7313 2 10.8388 2 11C2 11.1612 2.10746 11.2687 2.26866 11.2687C6.94328 11.2687 10.7313 15.0567 10.7313 19.7313C10.7313 19.8925 10.8388 20 11 20C11.1612 20 11.2687 19.8925 11.2687 19.7313C11.2687 15.0567 15.0567 11.2687 19.7313 11.2687C19.8925 11.2687 20 11.1612 20 11C20 10.8388 19.8657 10.7313 19.7045 10.7313Z" fill="#2F2F2F"/>
5387
5405
  </svg>
5388
5406
  `, Oi = '<svg class="choco-widget-method-item-trash" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.16663 5.83317H15.8333" stroke="#CC3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 5.8335V15.0002C15 15.921 14.2542 16.6668 13.3333 16.6668H6.66667C5.74583 16.6668 5 15.921 5 15.0002V5.8335" stroke="#CC3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.5 3.12516H7.5" stroke="#CC3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.33329 9.1665V13.3332" stroke="#CC3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.6667 9.1665V13.3332" stroke="#CC3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>', Ni = '<svg class="choco-widget-method-item-check" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.3333 4.3335L5.99996 11.6668L2.66663 8.3335" stroke="#242424" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
5389
- function We(e) {
5407
+ function Ye(e) {
5390
5408
  return Ri(e == null ? void 0 : e.iconType);
5391
5409
  }
5392
- function ur(e, t, n, r = {}) {
5410
+ function lr(e, t, n, r = {}) {
5393
5411
  const { editMode: o = !1 } = r;
5394
5412
  return (o ? e.filter((c) => c.type === "card") : e).map((c) => {
5395
5413
  const u = !o && !!t && t.type === c.type && t.cardId === c.cardId, l = JSON.stringify(c).replace(/'/g, "&apos;");
@@ -5398,7 +5416,7 @@ function ur(e, t, n, r = {}) {
5398
5416
  class="choco-widget-method-item choco-widget-method-item--edit"
5399
5417
  role="listitem"
5400
5418
  >
5401
- <div class="choco-widget-method-item-icon-wrapper" aria-hidden="true">${We(c)}</div>
5419
+ <div class="choco-widget-method-item-icon-wrapper" aria-hidden="true">${Ye(c)}</div>
5402
5420
  <div class="choco-widget-method-item-label">${c.label}</div>
5403
5421
  <button
5404
5422
  type="button"
@@ -5419,7 +5437,7 @@ function ur(e, t, n, r = {}) {
5419
5437
  aria-label="${c.label}${u ? " (выбрано)" : ""}"
5420
5438
  type="button"
5421
5439
  >
5422
- <div class="choco-widget-method-item-icon-wrapper ${c.type}" aria-hidden="true">${We(c)}</div>
5440
+ <div class="choco-widget-method-item-icon-wrapper ${c.type}" aria-hidden="true">${Ye(c)}</div>
5423
5441
  <div class="choco-widget-method-item-label">${c.label}</div>
5424
5442
  ${u ? Ni : ""}
5425
5443
  </button>
@@ -5539,7 +5557,7 @@ function Fi(e) {
5539
5557
  freedomAmountFormatted: R,
5540
5558
  t: L,
5541
5559
  currency: q
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;
5560
+ } = e, D = (o == null ? void 0 : o.label) ?? L("selectMethod"), K = Ye(o), z = lr(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
5561
  return `
5544
5562
  <div class="choco-widget-bottom-bar" role="region" aria-label="${L("paymentMethod")}">
5545
5563
  ${J}
@@ -5676,10 +5694,10 @@ function Xi() {
5676
5694
  `;
5677
5695
  }
5678
5696
  function Hi(e, t, n, r = {}) {
5679
- return ur(e, t, n, r);
5697
+ return lr(e, t, n, r);
5680
5698
  }
5681
5699
  function ji(e) {
5682
- return We(e);
5700
+ return Ye(e);
5683
5701
  }
5684
5702
  function Ji(e) {
5685
5703
  if (typeof document > "u") return { mountTarget: null, isEmbedded: !1 };
@@ -5690,18 +5708,18 @@ function Ji(e) {
5690
5708
  }
5691
5709
  return { mountTarget: document.body, isEmbedded: !1 };
5692
5710
  }
5693
- function lr(e) {
5711
+ function Ar(e) {
5694
5712
  if (typeof document > "u") return !1;
5695
5713
  e.container || (e.container = document.createElement("div"), e.container.id = "choco-one-click-widget", e.container.className = "choco-one-click-widget");
5696
5714
  const { mountTarget: t, isEmbedded: n } = Ji(e);
5697
5715
  return t ? (e.container.parentElement !== t && t.appendChild(e.container), e.container.classList.toggle("choco-one-click-widget--embedded", n), !0) : !1;
5698
5716
  }
5699
5717
  function qi(e) {
5700
- lr(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = Xi());
5718
+ Ar(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = Xi());
5701
5719
  }
5702
5720
  function zi(e) {
5703
5721
  var y, m, b, I, B;
5704
- if (e._destroyed || !lr(e)) return;
5722
+ if (e._destroyed || !Ar(e)) return;
5705
5723
  e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.classList.remove("choco-one-click-widget--visible");
5706
5724
  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
5725
  e.container.innerHTML = Fi({
@@ -5769,18 +5787,18 @@ function Qe(e) {
5769
5787
  const c = JSON.parse(
5770
5788
  i.currentTarget.getAttribute("data-method") || "{}"
5771
5789
  );
5772
- hr(e, c);
5790
+ pr(e, c);
5773
5791
  });
5774
5792
  });
5775
5793
  }
5776
- function Ar(e) {
5794
+ function dr(e) {
5777
5795
  var o, i, c;
5778
5796
  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
5797
  ".choco-widget-method-icon-wrapper"
5780
5798
  );
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);
5799
+ 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)), fr(e);
5782
5800
  }
5783
- function je(e) {
5801
+ function Je(e) {
5784
5802
  var m, b, I, B, Q, S;
5785
5803
  const t = (m = e.container) == null ? void 0 : m.querySelector(".choco-widget-pay-button"), n = (b = e.container) == null ? void 0 : b.querySelector(
5786
5804
  ".choco-widget-google-pay-amount"
@@ -5810,7 +5828,7 @@ function je(e) {
5810
5828
  ".choco-widget-google-pay-amount-value-number"
5811
5829
  )), i ? i.textContent = h : o && (o.textContent = `${e.t("instead")} ${h}`);
5812
5830
  }
5813
- function dr(e) {
5831
+ function fr(e) {
5814
5832
  var l, h, y, m, b, I, B, Q, S, P;
5815
5833
  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
5834
  ".choco-widget-google-pay-amount"
@@ -5839,7 +5857,7 @@ function dr(e) {
5839
5857
  );
5840
5858
  k && (k.innerHTML = ""), R && (R.innerHTML = "");
5841
5859
  }
5842
- je(e), ie(e);
5860
+ Je(e), ie(e);
5843
5861
  }
5844
5862
  async function Ki(e) {
5845
5863
  var c, u, l, h, y;
@@ -5899,7 +5917,7 @@ function Gi(e) {
5899
5917
  </span>
5900
5918
  `, n.appendChild(r), n.appendChild(o), t.appendChild(n), ie(e);
5901
5919
  }
5902
- function Tn(e) {
5920
+ function Ln(e) {
5903
5921
  var o;
5904
5922
  if (!e.selectedCoupon) return;
5905
5923
  const t = e._isCouponDisabled();
@@ -5940,7 +5958,7 @@ function ie(e) {
5940
5958
  ), y = e._isInteractionBlocked(), m = e.paymentMethodDisabled || y;
5941
5959
  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
5960
  }
5943
- function fr(e) {
5961
+ function hr(e) {
5944
5962
  var n;
5945
5963
  if (e._isInteractionBlocked()) return;
5946
5964
  const t = (n = e.container) == null ? void 0 : n.querySelector('[data-sheet="payment"]');
@@ -5950,7 +5968,7 @@ function ae(e) {
5950
5968
  var n;
5951
5969
  const t = (n = e.container) == null ? void 0 : n.querySelector('[data-sheet="payment"]');
5952
5970
  if (t) {
5953
- Ye(e);
5971
+ Ve(e);
5954
5972
  const r = t.querySelector(".choco-widget-sheet-content");
5955
5973
  r && (r.style.transform = "", r.classList.remove("choco-widget-sheet-content--dragging")), t.classList.remove("choco-widget-payment-sheet--open"), e.isPaymentSheetOpen = !1, e.isPaymentSheetEditMode && (e.isPaymentSheetEditMode = !1, Qe(e), ke(e));
5956
5974
  }
@@ -5962,7 +5980,7 @@ function ke(e) {
5962
5980
  const n = t.querySelector(".choco-widget-sheet-title"), r = t.querySelector('[data-action="close-sheet"]'), o = t.querySelector('[data-action="edit-sheet"]'), i = t.querySelector('[data-action="previous-sheet"]'), u = e.getAvailablePaymentMethods().some((h) => h.type === "card");
5963
5981
  e.isPaymentSheetEditMode ? (t.classList.add("choco-widget-payment-sheet--edit"), n && (n.textContent = e.t("editCards")), r && (r.style.display = "none"), o && (o.style.display = "none"), i && (i.style.display = "")) : (t.classList.remove("choco-widget-payment-sheet--edit"), t.classList.toggle("choco-widget-payment-sheet--no-cards", !u), n && (n.textContent = e.t("paymentMethods")), r && (r.style.display = ""), o && (o.style.display = u ? "" : "none"), i && (i.style.display = "none"));
5964
5982
  }
5965
- function pt(e) {
5983
+ function gt(e) {
5966
5984
  if (!e.addCardActionUrl || !e.container) return;
5967
5985
  const t = e.container.querySelector('[data-sheet="add-card"]'), n = e.container.querySelector(
5968
5986
  "#choco-widget-add-card-iframe"
@@ -5994,7 +6012,7 @@ function Vi(e, t) {
5994
6012
  const r = n.querySelector(".choco-widget-sheet-title"), o = n.querySelector('[data-action="edit-sheet"]'), i = n.querySelector('[data-action="previous-sheet"]');
5995
6013
  r && (r.textContent = e.t("confirmDeleteCard")), o && (o.style.display = "none"), i && (i.style.display = "none");
5996
6014
  }
5997
- function Ye(e) {
6015
+ function Ve(e) {
5998
6016
  var n;
5999
6017
  e._pendingDeleteMethod = null, Tt(e, !1);
6000
6018
  const t = (n = e.container) == null ? void 0 : n.querySelector('[data-sheet="payment"]');
@@ -6016,20 +6034,20 @@ async function Zi(e, t) {
6016
6034
  const n = t == null ? void 0 : t.cardId;
6017
6035
  if (!(!n || (t == null ? void 0 : t.type) !== "card"))
6018
6036
  try {
6019
- await Mr(e.apiUrl, e._getApiConfig(), n), e.checkoutContext = await Ct(
6037
+ await Mr(e.apiUrl, e._getApiConfig(), n), e.checkoutContext = await bt(
6020
6038
  e.apiUrl,
6021
6039
  e._getApiConfig()
6022
- ), ((r = e.selectedPaymentMethod) == null ? void 0 : r.type) === "card" && ((o = e.selectedPaymentMethod) == null ? void 0 : o.cardId) === n && (e.selectedPaymentMethod = yt(
6040
+ ), ((r = e.selectedPaymentMethod) == null ? void 0 : r.type) === "card" && ((o = e.selectedPaymentMethod) == null ? void 0 : o.cardId) === n && (e.selectedPaymentMethod = mt(
6023
6041
  e.checkoutContext.data,
6024
6042
  e._getKaspiOptions()
6025
- ), e._emitPaymentMethodSelected(), Ar(e)), Qe(e), e.config.onSuccess({ message: e.t("cardDeleted") }), e.config.onCardDeleted && e.config.onCardDeleted({ cardId: n });
6043
+ ), e._emitPaymentMethodSelected(), dr(e)), Qe(e), e.config.onSuccess({ message: e.t("cardDeleted") }), e.config.onCardDeleted && e.config.onCardDeleted({ cardId: n });
6026
6044
  } catch (i) {
6027
6045
  e.config.onError({
6028
6046
  attributes: { message: (i == null ? void 0 : i.message) || e.t("paymentError") }
6029
6047
  });
6030
6048
  }
6031
6049
  }
6032
- function hr(e, t) {
6050
+ function pr(e, t) {
6033
6051
  if (!e._isInteractionBlocked()) {
6034
6052
  if (e.selectedPaymentMethod = t, e._emitPaymentMethodSelected(), t.type === "new_card") {
6035
6053
  e._emitUserEvent("one_click_pay_method_resolved", { payment_method: t.type }), ae(e), e.handlePayment();
@@ -6037,10 +6055,10 @@ function hr(e, t) {
6037
6055
  }
6038
6056
  e._emitUserEvent("one_click_pay_method_resolved", {
6039
6057
  payment_method: e._getPaymentMethodForUserEvent()
6040
- }), Qe(e), ae(e), Ar(e);
6058
+ }), Qe(e), ae(e), dr(e);
6041
6059
  }
6042
6060
  }
6043
- function Ln(e, t) {
6061
+ function Rn(e, t) {
6044
6062
  var r;
6045
6063
  const n = t.type || ((r = t.data) == null ? void 0 : r.type);
6046
6064
  if (!n) {
@@ -6049,10 +6067,10 @@ function Ln(e, t) {
6049
6067
  }
6050
6068
  switch (n) {
6051
6069
  case "order.paid":
6052
- e._orderStatusResolved = !0, de(e), gr(e, t);
6070
+ e._orderStatusResolved = !0, de(e), yr(e, t);
6053
6071
  break;
6054
6072
  case "order.failed":
6055
- e._orderStatusResolved = !0, de(e), yr(e, t);
6073
+ e._orderStatusResolved = !0, de(e), mr(e, t);
6056
6074
  break;
6057
6075
  case "order.action_required":
6058
6076
  $i(e, t);
@@ -6084,13 +6102,13 @@ function Be(e, t) {
6084
6102
  String(t)
6085
6103
  ), u = c == null ? void 0 : c.status, l = (c == null ? void 0 : c.payload) || {};
6086
6104
  if (u === "success") {
6087
- e._orderStatusResolved = !0, de(e), gr(e, {
6105
+ e._orderStatusResolved = !0, de(e), yr(e, {
6088
6106
  id: String(l.id || t),
6089
6107
  attributes: { amount: l.amount, paid_at: l.paid_at || "" }
6090
6108
  });
6091
6109
  return;
6092
6110
  }
6093
- u === "fail" && (e._orderStatusResolved = !0, de(e), yr(e, {
6111
+ u === "fail" && (e._orderStatusResolved = !0, de(e), mr(e, {
6094
6112
  id: String(l.id || t),
6095
6113
  attributes: { message: l.message || e.t("paymentError") }
6096
6114
  }));
@@ -6104,15 +6122,15 @@ function Be(e, t) {
6104
6122
  function Ht() {
6105
6123
  return typeof document > "u" ? !1 : document.hidden || document.visibilityState === "hidden";
6106
6124
  }
6107
- function pr(e, t) {
6125
+ function gr(e, t) {
6108
6126
  W(e), e.config.onSuccess(t);
6109
6127
  }
6110
- function gt(e) {
6128
+ function yt(e) {
6111
6129
  if (!e._pendingSuccessPayload || Ht()) return;
6112
6130
  const t = e._pendingSuccessPayload;
6113
- e._pendingSuccessPayload = null, pr(e, t);
6131
+ e._pendingSuccessPayload = null, gr(e, t);
6114
6132
  }
6115
- function gr(e, t) {
6133
+ function yr(e, t) {
6116
6134
  var o, i;
6117
6135
  e.isAddCardViewOpen && Ie(e);
6118
6136
  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 +6138,9 @@ function gr(e, t) {
6120
6138
  e._pendingSuccessPayload = r;
6121
6139
  return;
6122
6140
  }
6123
- pr(e, r);
6141
+ gr(e, r);
6124
6142
  }
6125
- function yr(e, t) {
6143
+ function mr(e, t) {
6126
6144
  var r, o;
6127
6145
  e.isAddCardViewOpen && Ie(e), W(e);
6128
6146
  const n = t.attributes || ((r = t.data) == null ? void 0 : r.attributes) || {};
@@ -6165,14 +6183,14 @@ async function ea(e) {
6165
6183
  if (e._isBalanceFullyCoveringAmount()) {
6166
6184
  pe(e);
6167
6185
  try {
6168
- const u = await tn(
6186
+ const u = await nn(
6169
6187
  e.apiUrl,
6170
6188
  e._getApiConfig(),
6171
6189
  e.deviceId,
6172
6190
  e.selectedPaymentMethod,
6173
6191
  t
6174
6192
  );
6175
- await Rn(e);
6193
+ await On(e);
6176
6194
  const l = (u == null ? void 0 : u.id) ?? ((n = u == null ? void 0 : u.data) == null ? void 0 : n.id);
6177
6195
  return l && Be(e, String(l)), u;
6178
6196
  } catch (u) {
@@ -6195,14 +6213,14 @@ async function ea(e) {
6195
6213
  }
6196
6214
  pe(e);
6197
6215
  try {
6198
- const u = await tn(
6216
+ const u = await nn(
6199
6217
  e.apiUrl,
6200
6218
  e._getApiConfig(),
6201
6219
  e.deviceId,
6202
6220
  e.selectedPaymentMethod,
6203
6221
  t
6204
6222
  );
6205
- await Rn(e);
6223
+ await On(e);
6206
6224
  const l = (u == null ? void 0 : u.id) ?? ((r = u == null ? void 0 : u.data) == null ? void 0 : r.id);
6207
6225
  if (l && Be(e, String(l)), ((o = e.selectedPaymentMethod) == null ? void 0 : o.type) === "kaspi_pay") {
6208
6226
  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";
@@ -6219,7 +6237,7 @@ async function ea(e) {
6219
6237
  throw W(e), se(u, { paymentMethod: ((c = e.selectedPaymentMethod) == null ? void 0 : c.type) || "card" }), e.config.onError({ message: e._resolveErrorMessage(u) }), u;
6220
6238
  }
6221
6239
  }
6222
- async function Rn(e) {
6240
+ async function On(e) {
6223
6241
  var t, n;
6224
6242
  if (!(((t = e.selectedPaymentMethod) == null ? void 0 : t.type) !== "card" || !((n = e.selectedPaymentMethod) != null && n.cardId)))
6225
6243
  try {
@@ -6277,14 +6295,14 @@ async function na(e, t) {
6277
6295
  try {
6278
6296
  let l;
6279
6297
  try {
6280
- l = await nn(
6298
+ l = await rn(
6281
6299
  e.apiUrl,
6282
6300
  e._getApiConfig(),
6283
6301
  i.validationURL
6284
6302
  );
6285
6303
  } catch (m) {
6286
6304
  if (m.status === 401)
6287
- await e._obtainTokenByRefreshOrTrackId(), l = await nn(
6305
+ await e._obtainTokenByRefreshOrTrackId(), l = await rn(
6288
6306
  e.apiUrl,
6289
6307
  e._getApiConfig(),
6290
6308
  i.validationURL
@@ -6403,7 +6421,7 @@ async function ra(e, t) {
6403
6421
  pe(e);
6404
6422
  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;
6405
6423
  if (!z) throw new Error(e.t("errorGooglePayPayment"));
6406
- const J = JSON.parse(z), M = await Un(
6424
+ const J = JSON.parse(z), M = await Fn(
6407
6425
  e.apiUrl,
6408
6426
  e._getApiConfig(),
6409
6427
  e.deviceId,
@@ -6431,7 +6449,7 @@ async function oa(e, t, n) {
6431
6449
  amount: Number(e._getCheckoutAmount()),
6432
6450
  gateway: n.gateway,
6433
6451
  gatewayMerchantId: n.gatewayMerchantId
6434
- }), i = JSON.parse(o), c = await Un(
6452
+ }), i = JSON.parse(o), c = await Fn(
6435
6453
  e.apiUrl,
6436
6454
  e._getApiConfig(),
6437
6455
  e.deviceId,
@@ -6452,13 +6470,13 @@ function sa(e) {
6452
6470
  const t = e.container;
6453
6471
  (c = t.querySelector('[data-action="freedom-card"]')) == null || c.addEventListener("click", () => {
6454
6472
  e.config.onFreedomLink && e.config.onFreedomLink();
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", () => {
6456
- e._pendingDeleteMethod ? Ye(e) : ae(e);
6473
+ }), (u = t.querySelector('[data-action="pay"]')) == null || u.addEventListener("click", () => e.handlePayment()), (l = t.querySelector('[data-action="change-method"]')) == null || l.addEventListener("click", () => hr(e)), t.querySelectorAll('[data-action="close"]').forEach((k) => k.addEventListener("click", () => e.close())), (h = t.querySelector('[data-action="close-sheet"]')) == null || h.addEventListener("click", () => {
6474
+ e._pendingDeleteMethod ? Ve(e) : ae(e);
6457
6475
  }), (y = t.querySelector('[data-action="edit-sheet"]')) == null || y.addEventListener("click", () => {
6458
6476
  e.isPaymentSheetEditMode = !0, Qe(e), ke(e);
6459
6477
  }), (m = t.querySelector('[data-action="previous-sheet"]')) == null || m.addEventListener("click", () => {
6460
6478
  e.isPaymentSheetEditMode = !1, Qe(e), ke(e);
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", () => {
6479
+ }), (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", () => Ve(e)), (B = t.querySelector('[data-action="confirm-delete-submit"]')) == null || B.addEventListener("click", () => {
6462
6480
  if (e._pendingDeleteMethod) {
6463
6481
  const k = e._pendingDeleteMethod;
6464
6482
  Tt(e, !0), Zi(e, k).then(() => ae(e)).finally(() => Tt(e, !1));
@@ -6468,7 +6486,7 @@ function sa(e) {
6468
6486
  const L = JSON.parse(
6469
6487
  R.currentTarget.getAttribute("data-method") || "{}"
6470
6488
  );
6471
- hr(e, L);
6489
+ pr(e, L);
6472
6490
  });
6473
6491
  });
6474
6492
  const n = t.querySelector('[data-sheet="payment"]');
@@ -6477,20 +6495,20 @@ function sa(e) {
6477
6495
  }), aa(e, n));
6478
6496
  const r = t.querySelector('[data-action="toggle-balance"]');
6479
6497
  r && ((Q = r.querySelector("input[type='checkbox']")) == null || Q.addEventListener("change", (k) => {
6480
- e.useBalance = k.target.checked, Tn(e), e._updatePayButtonAmount();
6498
+ e.useBalance = k.target.checked, Ln(e), e._updatePayButtonAmount();
6481
6499
  }));
6482
6500
  const o = t.querySelector('[data-action="toggle-bonuses"]');
6483
6501
  o && ((S = o.querySelector("input[type='checkbox']")) == null || S.addEventListener("change", (k) => {
6484
- e.useBonuses = k.target.checked, e.config.onAppliedBonus(e.useBonuses), Tn(e), e._updatePayButtonAmount();
6502
+ e.useBonuses = k.target.checked, e.config.onAppliedBonus(e.useBonuses), Ln(e), e._updatePayButtonAmount();
6485
6503
  }));
6486
6504
  const i = t.querySelector('[data-action="toggle-coupon"]');
6487
6505
  i && ((P = i.querySelector("input[type='checkbox']")) == null || P.addEventListener("change", (k) => {
6488
6506
  e.useCoupon = k.target.checked, e._updatePayButtonAmount();
6489
- })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), dr(e);
6507
+ })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), fr(e);
6490
6508
  }
6491
6509
  function ia(e, t) {
6492
6510
  var n, r;
6493
- e.isOpen && (t.key === "Escape" && (t.preventDefault(), e._pendingDeleteMethod ? Ye(e) : e.isAddCardViewOpen ? Ie(e) : e.isPaymentSheetOpen ? ae(e) : e.close()), t.key === "Enter" && ((r = (n = t.target) == null ? void 0 : n.dataset) == null ? void 0 : r.action) === "pay" && (t.preventDefault(), e.handlePayment()));
6511
+ e.isOpen && (t.key === "Escape" && (t.preventDefault(), e._pendingDeleteMethod ? Ve(e) : e.isAddCardViewOpen ? Ie(e) : e.isPaymentSheetOpen ? ae(e) : e.close()), t.key === "Enter" && ((r = (n = t.target) == null ? void 0 : n.dataset) == null ? void 0 : r.action) === "pay" && (t.preventDefault(), e.handlePayment()));
6494
6512
  }
6495
6513
  function aa(e, t) {
6496
6514
  const n = t.querySelector('[data-action="sheet-drag-handle"]'), r = t.querySelector(".choco-widget-sheet-content");
@@ -6520,20 +6538,20 @@ function aa(e, t) {
6520
6538
  class Ce {
6521
6539
  // ─── Статические методы / logout ─────────────────────────────────────────────
6522
6540
  static _getAuthStorageValue(t) {
6523
- return xn(t);
6541
+ return Un(t);
6524
6542
  }
6525
6543
  static _setAuthStorageValue(t, n) {
6526
- mt(t, n);
6544
+ Ct(t, n);
6527
6545
  }
6528
6546
  static _removeAuthStorageValue(t) {
6529
- Ke(t);
6547
+ Ge(t);
6530
6548
  }
6531
6549
  static async logout() {
6532
- wn();
6550
+ Tn();
6533
6551
  }
6534
6552
  // ─── Конструктор ──────────────────────────────────────────────────────────────
6535
6553
  constructor(t) {
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({
6554
+ this.config = jr(t), this.accessToken = null, this.deviceId = Nn(), this.apiUrl = vr(this.config.environment), this.translations = br, 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({
6537
6555
  clientId: String(this.config.clientId),
6538
6556
  terminalId: String(this.config.terminalId),
6539
6557
  environment: this.config.environment
@@ -6631,10 +6649,10 @@ class Ce {
6631
6649
  sa(this);
6632
6650
  }
6633
6651
  _updatePayButtonAmount() {
6634
- je(this);
6652
+ Je(this);
6635
6653
  }
6636
6654
  _showAddCardView() {
6637
- pt(this);
6655
+ gt(this);
6638
6656
  }
6639
6657
  _closeAddCardView() {
6640
6658
  Ie(this);
@@ -6652,10 +6670,10 @@ class Ce {
6652
6670
  }
6653
6671
  // ─── Хранение токенов ────────────────────────────────────────────────────────
6654
6672
  _saveTokensToStorage(t, n) {
6655
- wt(t, n);
6673
+ je(t, n);
6656
6674
  }
6657
6675
  _clearAuthStorage() {
6658
- wn();
6676
+ Tn();
6659
6677
  }
6660
6678
  _getAuthStorageValue(t) {
6661
6679
  return Ce._getAuthStorageValue(t);
@@ -6696,13 +6714,13 @@ class Ce {
6696
6714
  this._lifecycleListenersAttached && (document.removeEventListener("visibilitychange", this._boundVisibilityChange), window.removeEventListener("focus", this._boundWindowFocus), window.removeEventListener("pageshow", this._boundPageShow), this._lifecycleListenersAttached = !1);
6697
6715
  }
6698
6716
  _onVisibilityChange() {
6699
- Ht() || gt(this);
6717
+ Ht() || yt(this);
6700
6718
  }
6701
6719
  _onWindowFocus() {
6702
- gt(this);
6720
+ yt(this);
6703
6721
  }
6704
6722
  _onPageShow() {
6705
- gt(this);
6723
+ yt(this);
6706
6724
  }
6707
6725
  // ─── Авторизация (приватная) ──────────────────────────────────────────────────
6708
6726
  async _obtainTokenByRefreshOrTrackId() {
@@ -6710,13 +6728,13 @@ class Ce {
6710
6728
  }
6711
6729
  async _fetchCheckoutContextWithRetry() {
6712
6730
  try {
6713
- this.checkoutContext = await Ct(
6731
+ this.checkoutContext = await bt(
6714
6732
  this.apiUrl,
6715
6733
  this._getApiConfig()
6716
6734
  );
6717
6735
  } catch (t) {
6718
6736
  if (t.status === 401)
6719
- this._removeAuthStorageValue("webPayToken"), await this._obtainTokenByRefreshOrTrackId(), this.checkoutContext = await Ct(
6737
+ this._removeAuthStorageValue("webPayToken"), await this._obtainTokenByRefreshOrTrackId(), this.checkoutContext = await bt(
6720
6738
  this.apiUrl,
6721
6739
  this._getApiConfig()
6722
6740
  );
@@ -6764,9 +6782,9 @@ class Ce {
6764
6782
  if (this._destroyed || (await this._fetchCoupons(), this._destroyed)) return !1;
6765
6783
  const r = $t(
6766
6784
  (n = (t = this.checkoutContext) == null ? void 0 : t.data) == null ? void 0 : n.socket_connections,
6767
- (o) => Ln(this, o)
6785
+ (o) => Rn(this, o)
6768
6786
  );
6769
- return r && (this.centrifuge = r.centrifuge), this.selectedPaymentMethod = yt(
6787
+ return r && (this.centrifuge = r.centrifuge), this.selectedPaymentMethod = mt(
6770
6788
  this.checkoutContext.data,
6771
6789
  this._getKaspiOptions()
6772
6790
  ), this._emitPaymentMethodSelected(), this._render(), !0;
@@ -6787,7 +6805,7 @@ class Ce {
6787
6805
  }
6788
6806
  getAvailablePaymentMethods() {
6789
6807
  var t;
6790
- return (t = this.checkoutContext) != null && t.data ? Rr(
6808
+ return (t = this.checkoutContext) != null && t.data ? Or(
6791
6809
  this.checkoutContext.data,
6792
6810
  (n) => this.t(n),
6793
6811
  this._getKaspiOptions()
@@ -6820,7 +6838,7 @@ class Ce {
6820
6838
  }
6821
6839
  }
6822
6840
  openPaymentSheet() {
6823
- fr(this);
6841
+ hr(this);
6824
6842
  }
6825
6843
  closePaymentSheet() {
6826
6844
  ae(this);
@@ -6835,15 +6853,15 @@ class Ce {
6835
6853
  const i = (n = this.container) == null ? void 0 : n.querySelector('[data-sheet="payment"]');
6836
6854
  i && (i.classList.add("choco-widget-payment-sheet--open"), this.isPaymentSheetOpen = !0);
6837
6855
  }
6838
- o && pt(this);
6856
+ o && gt(this);
6839
6857
  return;
6840
6858
  }
6841
- je(this);
6859
+ Je(this);
6842
6860
  }
6843
6861
  async updateAvailableBonus(t) {
6844
6862
  if (typeof t != "number" || !Number.isFinite(t) || t < 0)
6845
6863
  throw new Error("availableBonus must be a non-negative number");
6846
- this.config.bonuses && (this.config.bonuses.availableBonus = t), je(this);
6864
+ this.config.bonuses && (this.config.bonuses.availableBonus = t), Je(this);
6847
6865
  }
6848
6866
  async updateLocale(t) {
6849
6867
  if (typeof t != "string" || !this.translations[t])
@@ -6854,7 +6872,7 @@ class Ce {
6854
6872
  const o = this.container.querySelector('[data-sheet="payment"]');
6855
6873
  o && (o.classList.add("choco-widget-payment-sheet--open"), this.isPaymentSheetOpen = !0);
6856
6874
  }
6857
- r && pt(this);
6875
+ r && gt(this);
6858
6876
  }
6859
6877
  async setLoading(t) {
6860
6878
  this.loading = !!t, ie(this);
@@ -6889,9 +6907,9 @@ class Ce {
6889
6907
  await this._fetchCoupons(), this.centrifuge && (this.centrifuge.disconnect(), this.centrifuge = null);
6890
6908
  const o = $t(
6891
6909
  (r = (n = this.checkoutContext) == null ? void 0 : n.data) == null ? void 0 : r.socket_connections,
6892
- (i) => Ln(this, i)
6910
+ (i) => Rn(this, i)
6893
6911
  );
6894
- return o && (this.centrifuge = o.centrifuge), this.selectedPaymentMethod = yt(
6912
+ return o && (this.centrifuge = o.centrifuge), this.selectedPaymentMethod = mt(
6895
6913
  this.checkoutContext.data,
6896
6914
  this._getKaspiOptions()
6897
6915
  ), this._emitPaymentMethodSelected(), this.paymentMethodDisabled = !1, this._render(), !0;