choco-one-click-payment 1.1.42 → 1.1.44

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
@@ -4,6 +4,7 @@ const bt = {
4
4
  paymentMethod: "Способ оплаты",
5
5
  selectMethod: "Выберите метод",
6
6
  pay: "Оплатить",
7
+ login: "Войти",
7
8
  paymentSuccess: "Оплата прошла успешно!",
8
9
  paymentError: "Ошибка оплаты",
9
10
  paymentMethods: "Способ оплаты",
@@ -42,6 +43,7 @@ const bt = {
42
43
  paymentMethod: "Payment method",
43
44
  selectMethod: "Select method",
44
45
  pay: "Pay",
46
+ login: "Sign in",
45
47
  paymentSuccess: "Payment successful!",
46
48
  paymentError: "Payment error",
47
49
  paymentMethods: "Payment method",
@@ -80,6 +82,7 @@ const bt = {
80
82
  paymentMethod: "Төлем әдісі",
81
83
  selectMethod: "Әдісті таңдаңыз",
82
84
  pay: "Төлеу",
85
+ login: "Кіру",
83
86
  paymentSuccess: "Төлем сәтті өтті!",
84
87
  paymentError: "Төлем қатесі",
85
88
  paymentMethods: "Төлем әдісі",
@@ -118,6 +121,7 @@ const bt = {
118
121
  paymentMethod: "გადახდის მეთოდი",
119
122
  selectMethod: "აირჩიეთ მეთოდი",
120
123
  pay: "გადახდა",
124
+ login: "შესვლა",
121
125
  paymentSuccess: "გადახდა წარმატებით შესრულდა!",
122
126
  paymentError: "გადახდის შეცდომა",
123
127
  paymentMethods: "გადახდის მეთოდი",
@@ -183,7 +187,7 @@ function Be(e, t, o) {
183
187
  return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Qt(i);
184
188
  }
185
189
  const Ve = "choco_device_id";
186
- function V(e, t = "ru", o = "KZT") {
190
+ function K(e, t = "ru", o = "KZT") {
187
191
  const i = Number(e), s = t === "ru" ? "ru-RU" : "en-US";
188
192
  return `${i.toLocaleString(s)} ${Et[o]}`;
189
193
  }
@@ -237,32 +241,32 @@ function wt() {
237
241
  Object.defineProperty(l, "__esModule", {
238
242
  value: !0
239
243
  }), l.Centrifuge = void 0;
240
- var C = S(f(187)), v = S(f(471)), _ = f(147), b = f(853);
241
- function S(g) {
244
+ var C = P(f(187)), B = P(f(471)), _ = f(147), b = f(853);
245
+ function P(g) {
242
246
  return g && g.__esModule ? g : { default: g };
243
247
  }
244
- function T(g) {
248
+ function L(g) {
245
249
  "@babel/helpers - typeof";
246
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? T = function(p) {
250
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? L = function(p) {
247
251
  return typeof p;
248
- } : T = function(p) {
252
+ } : L = function(p) {
249
253
  return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
250
- }, T(g);
254
+ }, L(g);
251
255
  }
252
- function I(g, h) {
256
+ function v(g, h) {
253
257
  if (!(g instanceof h))
254
258
  throw new TypeError("Cannot call a class as a function");
255
259
  }
256
- function w(g, h) {
260
+ function S(g, h) {
257
261
  for (var p = 0; p < h.length; p++) {
258
262
  var A = h[p];
259
263
  A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(g, A.key, A);
260
264
  }
261
265
  }
262
266
  function k(g, h, p) {
263
- return h && w(g.prototype, h), g;
267
+ return h && S(g.prototype, h), g;
264
268
  }
265
- function B(g, h) {
269
+ function I(g, h) {
266
270
  if (typeof h != "function" && h !== null)
267
271
  throw new TypeError("Super expression must either be null or a function");
268
272
  g.prototype = Object.create(h && h.prototype, { constructor: { value: g, writable: !0, configurable: !0 } }), h && R(g, h);
@@ -272,7 +276,7 @@ function wt() {
272
276
  return A.__proto__ = n, A;
273
277
  }, R(g, h);
274
278
  }
275
- function L(g) {
279
+ function T(g) {
276
280
  var h = q();
277
281
  return function() {
278
282
  var A = J(g), n;
@@ -285,7 +289,7 @@ function wt() {
285
289
  };
286
290
  }
287
291
  function x(g, h) {
288
- if (h && (T(h) === "object" || typeof h == "function"))
292
+ if (h && (L(h) === "object" || typeof h == "function"))
289
293
  return h;
290
294
  if (h !== void 0)
291
295
  throw new TypeError("Derived constructors may only return object or undefined");
@@ -312,11 +316,11 @@ function wt() {
312
316
  }, J(g);
313
317
  }
314
318
  var F = "timeout", M = "connection closed", m = /* @__PURE__ */ (function(g) {
315
- B(p, g);
316
- var h = L(p);
319
+ I(p, g);
320
+ var h = T(p);
317
321
  function p(A, n) {
318
322
  var r;
319
- return I(this, p), r = h.call(this), r._url = A, r._websocket = null, r._sockjs = null, r._isSockjs = !1, r._xmlhttprequest = null, r._binary = !1, r._methodType = null, r._pushType = null, r._encoder = null, r._decoder = null, r._status = "disconnected", r._reconnect = !0, r._reconnecting = !1, r._transport = null, r._transportName = null, r._transportClosed = !0, r._messageId = 0, r._clientID = null, r._refreshRequired = !1, r._subs = {}, r._serverSubs = {}, r._lastSeq = {}, r._lastGen = {}, r._lastOffset = {}, r._lastEpoch = {}, r._messages = [], r._isBatching = !1, r._isSubscribeBatching = !1, r._privateChannels = {}, r._numRefreshFailed = 0, r._refreshTimeout = null, r._pingTimeout = null, r._pongTimeout = null, r._subRefreshTimeouts = {}, r._retries = 0, r._callbacks = {}, r._latency = null, r._latencyStart = null, r._connectData = null, r._token = null, r._xhrID = 0, r._xhrs = {}, r._dispatchPromise = Promise.resolve(), r._protocol = "", r._config = {
323
+ return v(this, p), r = h.call(this), r._url = A, r._websocket = null, r._sockjs = null, r._isSockjs = !1, r._xmlhttprequest = null, r._binary = !1, r._methodType = null, r._pushType = null, r._encoder = null, r._decoder = null, r._status = "disconnected", r._reconnect = !0, r._reconnecting = !1, r._transport = null, r._transportName = null, r._transportClosed = !0, r._messageId = 0, r._clientID = null, r._refreshRequired = !1, r._subs = {}, r._serverSubs = {}, r._lastSeq = {}, r._lastGen = {}, r._lastOffset = {}, r._lastEpoch = {}, r._messages = [], r._isBatching = !1, r._isSubscribeBatching = !1, r._privateChannels = {}, r._numRefreshFailed = 0, r._refreshTimeout = null, r._pingTimeout = null, r._pongTimeout = null, r._subRefreshTimeouts = {}, r._retries = 0, r._callbacks = {}, r._latency = null, r._latencyStart = null, r._connectData = null, r._token = null, r._xhrID = 0, r._xhrs = {}, r._dispatchPromise = Promise.resolve(), r._protocol = "", r._config = {
320
324
  protocol: "",
321
325
  debug: !1,
322
326
  name: "js",
@@ -389,13 +393,13 @@ function wt() {
389
393
  }, {
390
394
  key: "_ajax",
391
395
  value: function(n, r, c, d, y) {
392
- var E = this, P = "";
396
+ var E = this, w = "";
393
397
  this._debug("sending AJAX request to", n, "with data", JSON.stringify(d));
394
398
  var Q;
395
399
  this._xmlhttprequest !== null ? Q = new this._xmlhttprequest() : Q = f.g.XMLHttpRequest ? new f.g.XMLHttpRequest() : new f.g.ActiveXObject("Microsoft.XMLHTTP");
396
400
  for (var O in r)
397
- r.hasOwnProperty(O) && (P.length > 0 && (P += "&"), P += encodeURIComponent(O) + "=" + encodeURIComponent(r[O]));
398
- P.length > 0 && (P = "?" + P), Q.open("POST", n + P, !0), "withCredentials" in Q && (Q.withCredentials = !this._config.disableWithCredentials), Q.setRequestHeader("X-Requested-With", "XMLHttpRequest"), Q.setRequestHeader("Content-Type", "application/json");
401
+ r.hasOwnProperty(O) && (w.length > 0 && (w += "&"), w += encodeURIComponent(O) + "=" + encodeURIComponent(r[O]));
402
+ w.length > 0 && (w = "?" + w), Q.open("POST", n + w, !0), "withCredentials" in Q && (Q.withCredentials = !this._config.disableWithCredentials), Q.setRequestHeader("X-Requested-With", "XMLHttpRequest"), Q.setRequestHeader("Content-Type", "application/json");
399
403
  for (var X in c)
400
404
  c.hasOwnProperty(X) && Q.setRequestHeader(X, c[X]);
401
405
  return Q.onreadystatechange = function() {
@@ -437,7 +441,7 @@ function wt() {
437
441
  }, {
438
442
  key: "_websocketSupported",
439
443
  value: function() {
440
- return this._config.websocket !== null ? !0 : !(typeof WebSocket != "function" && (typeof WebSocket > "u" ? "undefined" : T(WebSocket)) !== "object");
444
+ return this._config.websocket !== null ? !0 : !(typeof WebSocket != "function" && (typeof WebSocket > "u" ? "undefined" : L(WebSocket)) !== "object");
441
445
  }
442
446
  }, {
443
447
  key: "_setFormat",
@@ -550,8 +554,8 @@ function wt() {
550
554
  n ? (E._isSuccess() && (E._triggerUnsubscribe(), E._recover = !0), E._shouldResubscribe() && E._setSubscribing()) : E._setUnsubscribed();
551
555
  }
552
556
  this._abortInflightXHRs(), this._refreshTimeout !== null && (clearTimeout(this._refreshTimeout), this._refreshTimeout = null);
553
- for (var P in this._subRefreshTimeouts)
554
- this._subRefreshTimeouts.hasOwnProperty(P) && this._subRefreshTimeouts[P] && this._clearSubRefreshTimeout(P);
557
+ for (var w in this._subRefreshTimeouts)
558
+ this._subRefreshTimeouts.hasOwnProperty(w) && this._subRefreshTimeouts[w] && this._clearSubRefreshTimeout(w);
555
559
  this._subRefreshTimeouts = {}, this._reconnect || (this._subs = {});
556
560
  }
557
561
  }, {
@@ -610,13 +614,13 @@ function wt() {
610
614
  };
611
615
  (n._token || n._connectData || n._config.name || n._config.version) && (d.params = {}), n._token && (d.params.token = n._token), n._connectData && (d.params.data = n._connectData), n._config.name && (d.params.name = n._config.name), n._config.version && (d.params.version = n._config.version);
612
616
  var y = {}, E = !1;
613
- for (var P in n._serverSubs)
614
- if (n._serverSubs.hasOwnProperty(P) && n._serverSubs[P].recoverable) {
617
+ for (var w in n._serverSubs)
618
+ if (n._serverSubs.hasOwnProperty(w) && n._serverSubs[w].recoverable) {
615
619
  E = !0;
616
620
  var Q = {
617
621
  recover: !0
618
622
  };
619
- n._serverSubs[P].seq || n._serverSubs[P].gen ? (n._serverSubs[P].seq && (Q.seq = n._serverSubs[P].seq), n._serverSubs[P].gen && (Q.gen = n._serverSubs[P].gen)) : n._serverSubs[P].offset && (Q.offset = n._serverSubs[P].offset), n._serverSubs[P].epoch && (Q.epoch = n._serverSubs[P].epoch), y[P] = Q;
623
+ n._serverSubs[w].seq || n._serverSubs[w].gen ? (n._serverSubs[w].seq && (Q.seq = n._serverSubs[w].seq), n._serverSubs[w].gen && (Q.gen = n._serverSubs[w].gen)) : n._serverSubs[w].offset && (Q.offset = n._serverSubs[w].offset), n._serverSubs[w].epoch && (Q.epoch = n._serverSubs[w].epoch), y[w] = Q;
620
624
  }
621
625
  E && (d.params || (d.params = {}), d.params.subs = y), n._latencyStart = /* @__PURE__ */ new Date(), n._call(d).then(function(O) {
622
626
  n._connectResponse(n._decoder.decodeCommandResult(n._methodType.CONNECT, O.result), E), O.next && O.next();
@@ -631,8 +635,8 @@ function wt() {
631
635
  var y = M, E = !0;
632
636
  if (d && "reason" in d && d.reason)
633
637
  try {
634
- var P = JSON.parse(d.reason);
635
- n._debug("reason is an advice object", P), y = P.reason, E = P.reconnect;
638
+ var w = JSON.parse(d.reason);
639
+ n._debug("reason is an advice object", w), y = w.reason, E = w.reconnect;
636
640
  } catch {
637
641
  y = d.reason, n._debug("reason is a plain string", y);
638
642
  }
@@ -951,10 +955,10 @@ function wt() {
951
955
  token: re
952
956
  }
953
957
  }, le = r._getSub(n);
954
- le !== null && r._call(Pe).then(function(W) {
955
- r._subRefreshResponse(n, r._decoder.decodeCommandResult(r._methodType.SUB_REFRESH, W.result)), W.next && W.next();
956
- }, function(W) {
957
- r._subRefreshError(n, W.error), W.next && W.next();
958
+ le !== null && r._call(Pe).then(function(V) {
959
+ r._subRefreshResponse(n, r._decoder.decodeCommandResult(r._methodType.SUB_REFRESH, V.result)), V.next && V.next();
960
+ }, function(V) {
961
+ r._subRefreshError(n, V.error), V.next && V.next();
958
962
  });
959
963
  }
960
964
  }
@@ -967,8 +971,8 @@ function wt() {
967
971
  data: E
968
972
  }, y);
969
973
  else {
970
- var P = this._ajax(this._config.subscribeEndpoint, this._config.subscribeParams, this._config.subscribeHeaders, E, y);
971
- this._xhrs[d] = P;
974
+ var w = this._ajax(this._config.subscribeEndpoint, this._config.subscribeParams, this._config.subscribeHeaders, E, y);
975
+ this._xhrs[d] = w;
972
976
  }
973
977
  }
974
978
  }, {
@@ -1025,9 +1029,9 @@ function wt() {
1025
1029
  var E = n._needRecover();
1026
1030
  if (E === !0) {
1027
1031
  y.params.recover = !0;
1028
- var P = this._getLastSeq(d), Q = this._getLastGen(d);
1029
- if (P || Q)
1030
- P && (y.params.seq = P), Q && (y.params.gen = Q);
1032
+ var w = this._getLastSeq(d), Q = this._getLastGen(d);
1033
+ if (w || Q)
1034
+ w && (y.params.seq = w), Q && (y.params.gen = Q);
1031
1035
  else {
1032
1036
  var O = this._getLastOffset(d);
1033
1037
  O && (y.params.offset = O);
@@ -1087,12 +1091,12 @@ function wt() {
1087
1091
  E._shouldResubscribe() && this._subscribe(E, d);
1088
1092
  }
1089
1093
  this.stopSubscribeBatching(), this.stopBatching(), this._startPing();
1090
- var P = {
1094
+ var w = {
1091
1095
  client: n.client,
1092
1096
  transport: this._transportName,
1093
1097
  latency: this._latency
1094
1098
  };
1095
- n.data && (P.data = n.data), this.emit("connect", P), n.subs && this._processServerSubs(n.subs);
1099
+ n.data && (w.data = n.data), this.emit("connect", w), n.subs && this._processServerSubs(n.subs);
1096
1100
  }
1097
1101
  }
1098
1102
  }, {
@@ -1108,9 +1112,9 @@ function wt() {
1108
1112
  }
1109
1113
  for (var E in n)
1110
1114
  if (n.hasOwnProperty(E)) {
1111
- var P = n[E];
1112
- if (P.recovered) {
1113
- var Q = P.publications;
1115
+ var w = n[E];
1116
+ if (w.recovered) {
1117
+ var Q = w.publications;
1114
1118
  if (Q && Q.length > 0) {
1115
1119
  Q.length > 1 && (!Q[0].offset || Q[0].offset > Q[1].offset) && (Q = Q.reverse());
1116
1120
  for (var O in Q)
@@ -1118,11 +1122,11 @@ function wt() {
1118
1122
  }
1119
1123
  }
1120
1124
  this._serverSubs[E] = {
1121
- seq: P.seq,
1122
- gen: P.gen,
1123
- offset: P.offset,
1124
- epoch: P.epoch,
1125
- recoverable: P.recoverable
1125
+ seq: w.seq,
1126
+ gen: w.gen,
1127
+ offset: w.offset,
1128
+ epoch: w.epoch,
1129
+ recoverable: w.recoverable
1126
1130
  };
1127
1131
  }
1128
1132
  }
@@ -1186,8 +1190,8 @@ function wt() {
1186
1190
  var E = c.publications;
1187
1191
  if (E && E.length > 0) {
1188
1192
  E.length >= 2 && !E[0].offset && !E[1].offset && (E = E.reverse());
1189
- for (var P in E)
1190
- E.hasOwnProperty(P) && this._handlePublication(n, E[P]);
1193
+ for (var w in E)
1194
+ E.hasOwnProperty(w) && this._handlePublication(n, E[w]);
1191
1195
  }
1192
1196
  if (c.recoverable && (!r || !c.recovered) && (this._lastSeq[n] = c.seq || 0, this._lastGen[n] = c.gen || 0, this._lastOffset[n] = c.offset || 0), this._lastEpoch[n] = c.epoch || "", c.recoverable && (y._recoverable = !0), c.expires === !0) {
1193
1197
  var Q = setTimeout(function() {
@@ -1207,13 +1211,13 @@ function wt() {
1207
1211
  }
1208
1212
  var y = this._callbacks[c];
1209
1213
  if (clearTimeout(this._callbacks[c].timeout), delete this._callbacks[c], (0, b.errorExists)(n)) {
1210
- var P = y.errback;
1211
- if (!P) {
1214
+ var w = y.errback;
1215
+ if (!w) {
1212
1216
  r();
1213
1217
  return;
1214
1218
  }
1215
1219
  var Q = n.error;
1216
- P({
1220
+ w({
1217
1221
  error: Q,
1218
1222
  next: r
1219
1223
  });
@@ -1307,8 +1311,8 @@ function wt() {
1307
1311
  var E = this._decoder.decodePushData(this._pushType.PUBLICATION, c.data);
1308
1312
  this._handlePublication(y, E);
1309
1313
  } else if (d === this._pushType.MESSAGE) {
1310
- var P = this._decoder.decodePushData(this._pushType.MESSAGE, c.data);
1311
- this._handleMessage(P);
1314
+ var w = this._decoder.decodePushData(this._pushType.MESSAGE, c.data);
1315
+ this._handleMessage(w);
1312
1316
  } else if (d === this._pushType.JOIN) {
1313
1317
  var Q = this._decoder.decodePushData(this._pushType.JOIN, c.data);
1314
1318
  this._handleJoin(y, Q);
@@ -1457,8 +1461,8 @@ function wt() {
1457
1461
  var E = {
1458
1462
  client: this._clientID,
1459
1463
  channels: c
1460
- }, P = this._clientID, Q = this._newXHRID(), O = function(D) {
1461
- if (Q in n._xhrs && delete n._xhrs[Q], n._clientID === P) {
1464
+ }, w = this._clientID, Q = this._newXHRID(), O = function(D) {
1465
+ if (Q in n._xhrs && delete n._xhrs[Q], n._clientID === w) {
1462
1466
  if (D.error || D.status !== 200) {
1463
1467
  n._debug("authorization request failed");
1464
1468
  for (var re in c)
@@ -1470,8 +1474,8 @@ function wt() {
1470
1474
  }
1471
1475
  var le = {};
1472
1476
  if (D.data.channels)
1473
- for (var W in D.data.channels) {
1474
- var ke = D.data.channels[W];
1477
+ for (var V in D.data.channels) {
1478
+ var ke = D.data.channels[V];
1475
1479
  ke.channel && (le[ke.channel] = ke.token);
1476
1480
  }
1477
1481
  var Fe = !1;
@@ -1536,7 +1540,7 @@ function wt() {
1536
1540
  var d = this._getSub(n);
1537
1541
  if (d !== null)
1538
1542
  return d._setEvents(r), d._isUnsubscribed() && d.subscribe(c), d;
1539
- var y = new v.default(this, n, r);
1543
+ var y = new B.default(this, n, r);
1540
1544
  return this._subs[n] = y, y.subscribe(c), y;
1541
1545
  }
1542
1546
  }]), p;
@@ -1551,8 +1555,8 @@ function wt() {
1551
1555
  Object.defineProperty(l, "__esModule", {
1552
1556
  value: !0
1553
1557
  }), l.default = void 0;
1554
- var C = f(382), v = C.Centrifuge;
1555
- l.default = v, a.exports = l.default;
1558
+ var C = f(382), B = C.Centrifuge;
1559
+ l.default = B, a.exports = l.default;
1556
1560
  })
1557
1561
  ),
1558
1562
  /***/
@@ -1562,18 +1566,18 @@ function wt() {
1562
1566
  Object.defineProperty(l, "__esModule", {
1563
1567
  value: !0
1564
1568
  }), l.JsonPushType = l.JsonMethodType = l.JsonEncoder = l.JsonDecoder = void 0;
1565
- function f(I, w) {
1566
- if (!(I instanceof w))
1569
+ function f(v, S) {
1570
+ if (!(v instanceof S))
1567
1571
  throw new TypeError("Cannot call a class as a function");
1568
1572
  }
1569
- function C(I, w) {
1570
- for (var k = 0; k < w.length; k++) {
1571
- var B = w[k];
1572
- B.enumerable = B.enumerable || !1, B.configurable = !0, "value" in B && (B.writable = !0), Object.defineProperty(I, B.key, B);
1573
+ function C(v, S) {
1574
+ for (var k = 0; k < S.length; k++) {
1575
+ var I = S[k];
1576
+ I.enumerable = I.enumerable || !1, I.configurable = !0, "value" in I && (I.writable = !0), Object.defineProperty(v, I.key, I);
1573
1577
  }
1574
1578
  }
1575
- function v(I, w, k) {
1576
- return w && C(I.prototype, w), I;
1579
+ function B(v, S, k) {
1580
+ return S && C(v.prototype, S), v;
1577
1581
  }
1578
1582
  var _ = {
1579
1583
  CONNECT: 0,
@@ -1599,39 +1603,39 @@ function wt() {
1599
1603
  SUBSCRIBE: 5
1600
1604
  };
1601
1605
  l.JsonPushType = b;
1602
- var S = /* @__PURE__ */ (function() {
1603
- function I() {
1604
- f(this, I);
1606
+ var P = /* @__PURE__ */ (function() {
1607
+ function v() {
1608
+ f(this, v);
1605
1609
  }
1606
- return v(I, [{
1610
+ return B(v, [{
1607
1611
  key: "encodeCommands",
1608
1612
  value: function(k) {
1609
- return k.map(function(B) {
1610
- return JSON.stringify(B);
1613
+ return k.map(function(I) {
1614
+ return JSON.stringify(I);
1611
1615
  }).join(`
1612
1616
  `);
1613
1617
  }
1614
- }]), I;
1618
+ }]), v;
1615
1619
  })();
1616
- l.JsonEncoder = S;
1617
- var T = /* @__PURE__ */ (function() {
1618
- function I() {
1619
- f(this, I);
1620
+ l.JsonEncoder = P;
1621
+ var L = /* @__PURE__ */ (function() {
1622
+ function v() {
1623
+ f(this, v);
1620
1624
  }
1621
- return v(I, [{
1625
+ return B(v, [{
1622
1626
  key: "decodeReplies",
1623
1627
  value: function(k) {
1624
1628
  return k.split(`
1625
- `).filter(function(B) {
1626
- return B !== "";
1627
- }).map(function(B) {
1628
- return JSON.parse(B);
1629
+ `).filter(function(I) {
1630
+ return I !== "";
1631
+ }).map(function(I) {
1632
+ return JSON.parse(I);
1629
1633
  });
1630
1634
  }
1631
1635
  }, {
1632
1636
  key: "decodeCommandResult",
1633
- value: function(k, B) {
1634
- return B;
1637
+ value: function(k, I) {
1638
+ return I;
1635
1639
  }
1636
1640
  }, {
1637
1641
  key: "decodePush",
@@ -1640,12 +1644,12 @@ function wt() {
1640
1644
  }
1641
1645
  }, {
1642
1646
  key: "decodePushData",
1643
- value: function(k, B) {
1644
- return B;
1647
+ value: function(k, I) {
1648
+ return I;
1645
1649
  }
1646
- }]), I;
1650
+ }]), v;
1647
1651
  })();
1648
- l.JsonDecoder = T;
1652
+ l.JsonDecoder = L;
1649
1653
  })
1650
1654
  ),
1651
1655
  /***/
@@ -1663,24 +1667,24 @@ function wt() {
1663
1667
  Object.defineProperty(l, "__esModule", {
1664
1668
  value: !0
1665
1669
  }), l.default = void 0;
1666
- var v = b(f(187)), _ = f(853);
1670
+ var B = b(f(187)), _ = f(853);
1667
1671
  function b(h) {
1668
1672
  return h && h.__esModule ? h : { default: h };
1669
1673
  }
1670
- function S(h, p) {
1674
+ function P(h, p) {
1671
1675
  if (!(h instanceof p))
1672
1676
  throw new TypeError("Cannot call a class as a function");
1673
1677
  }
1674
- function T(h, p) {
1678
+ function L(h, p) {
1675
1679
  for (var A = 0; A < p.length; A++) {
1676
1680
  var n = p[A];
1677
1681
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(h, n.key, n);
1678
1682
  }
1679
1683
  }
1680
- function I(h, p, A) {
1681
- return p && T(h.prototype, p), h;
1684
+ function v(h, p, A) {
1685
+ return p && L(h.prototype, p), h;
1682
1686
  }
1683
- function w(h, p) {
1687
+ function S(h, p) {
1684
1688
  if (typeof p != "function" && p !== null)
1685
1689
  throw new TypeError("Super expression must either be null or a function");
1686
1690
  h.prototype = Object.create(p && p.prototype, { constructor: { value: h, writable: !0, configurable: !0 } }), p && k(h, p);
@@ -1690,7 +1694,7 @@ function wt() {
1690
1694
  return n.__proto__ = r, n;
1691
1695
  }, k(h, p);
1692
1696
  }
1693
- function B(h) {
1697
+ function I(h) {
1694
1698
  var p = x();
1695
1699
  return function() {
1696
1700
  var n = N(h), r;
@@ -1707,9 +1711,9 @@ function wt() {
1707
1711
  return p;
1708
1712
  if (p !== void 0)
1709
1713
  throw new TypeError("Derived constructors may only return object or undefined");
1710
- return L(h);
1714
+ return T(h);
1711
1715
  }
1712
- function L(h) {
1716
+ function T(h) {
1713
1717
  if (h === void 0)
1714
1718
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1715
1719
  return h;
@@ -1730,15 +1734,15 @@ function wt() {
1730
1734
  }, N(h);
1731
1735
  }
1732
1736
  var q = 0, J = 1, F = 2, M = 3, m = 4, g = /* @__PURE__ */ (function(h) {
1733
- w(A, h);
1734
- var p = B(A);
1737
+ S(A, h);
1738
+ var p = I(A);
1735
1739
  function A(n, r, c) {
1736
1740
  var d;
1737
- return S(this, A), d = p.call(this), d.channel = r, d._centrifuge = n, d._status = q, d._error = null, d._isResubscribe = !1, d._ready = !1, d._subscriptionPromise = null, d._noResubscribe = !1, d._recoverable = !1, d._recover = !1, d._setEvents(c), d._initializePromise(), d._promises = {}, d._promiseId = 0, d._subscribeData = null, d.on("error", function(y) {
1741
+ return P(this, A), d = p.call(this), d.channel = r, d._centrifuge = n, d._status = q, d._error = null, d._isResubscribe = !1, d._ready = !1, d._subscriptionPromise = null, d._noResubscribe = !1, d._recoverable = !1, d._recover = !1, d._setEvents(c), d._initializePromise(), d._promises = {}, d._promiseId = 0, d._subscribeData = null, d.on("error", function(y) {
1738
1742
  this._centrifuge._debug("subscription error", y);
1739
1743
  }), d;
1740
1744
  }
1741
- return I(A, [{
1745
+ return v(A, [{
1742
1746
  key: "_nextPromiseId",
1743
1747
  value: function() {
1744
1748
  return ++this._promiseId;
@@ -1953,7 +1957,7 @@ function wt() {
1953
1957
  });
1954
1958
  }
1955
1959
  }]), A;
1956
- })(v.default);
1960
+ })(B.default);
1957
1961
  l.default = g, a.exports = l.default;
1958
1962
  })
1959
1963
  ),
@@ -1963,30 +1967,30 @@ function wt() {
1963
1967
  (function(a, l, f) {
1964
1968
  Object.defineProperty(l, "__esModule", {
1965
1969
  value: !0
1966
- }), l.backoff = b, l.errorExists = S, l.extend = T, l.isFunction = v, l.log = _, l.startsWith = C;
1967
- function C(I, w) {
1968
- return I.lastIndexOf(w, 0) === 0;
1970
+ }), l.backoff = b, l.errorExists = P, l.extend = L, l.isFunction = B, l.log = _, l.startsWith = C;
1971
+ function C(v, S) {
1972
+ return v.lastIndexOf(S, 0) === 0;
1969
1973
  }
1970
- function v(I) {
1971
- return I == null ? !1 : typeof I == "function";
1974
+ function B(v) {
1975
+ return v == null ? !1 : typeof v == "function";
1972
1976
  }
1973
- function _(I, w) {
1977
+ function _(v, S) {
1974
1978
  if (f.g.console) {
1975
- var k = f.g.console[I];
1976
- v(k) && k.apply(f.g.console, w);
1979
+ var k = f.g.console[v];
1980
+ B(k) && k.apply(f.g.console, S);
1977
1981
  }
1978
1982
  }
1979
- function b(I, w, k) {
1980
- var B = 0.5 * Math.random(), R = Math.min(k, w * Math.pow(2, I + 1));
1981
- return Math.floor((1 - B) * R);
1983
+ function b(v, S, k) {
1984
+ var I = 0.5 * Math.random(), R = Math.min(k, S * Math.pow(2, v + 1));
1985
+ return Math.floor((1 - I) * R);
1982
1986
  }
1983
- function S(I) {
1984
- return "error" in I && I.error !== null;
1987
+ function P(v) {
1988
+ return "error" in v && v.error !== null;
1985
1989
  }
1986
- function T(I, w) {
1987
- for (var k in w)
1988
- w.hasOwnProperty(k) && (I[k] = w[k]);
1989
- return I;
1990
+ function L(v, S) {
1991
+ for (var k in S)
1992
+ S.hasOwnProperty(k) && (v[k] = S[k]);
1993
+ return v;
1990
1994
  }
1991
1995
  })
1992
1996
  ),
@@ -2002,7 +2006,7 @@ function wt() {
2002
2006
  } : C = function(g) {
2003
2007
  return Object.getOwnPropertyNames(g);
2004
2008
  };
2005
- function v(m) {
2009
+ function B(m) {
2006
2010
  console && console.warn && console.warn(m);
2007
2011
  }
2008
2012
  var _ = Number.isNaN || function(g) {
@@ -2012,20 +2016,20 @@ function wt() {
2012
2016
  b.init.call(this);
2013
2017
  }
2014
2018
  a.exports = b, a.exports.once = J, b.EventEmitter = b, b.prototype._events = void 0, b.prototype._eventsCount = 0, b.prototype._maxListeners = void 0;
2015
- var S = 10;
2016
- function T(m) {
2019
+ var P = 10;
2020
+ function L(m) {
2017
2021
  if (typeof m != "function")
2018
2022
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof m);
2019
2023
  }
2020
2024
  Object.defineProperty(b, "defaultMaxListeners", {
2021
2025
  enumerable: !0,
2022
2026
  get: function() {
2023
- return S;
2027
+ return P;
2024
2028
  },
2025
2029
  set: function(m) {
2026
2030
  if (typeof m != "number" || m < 0 || _(m))
2027
2031
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + m + ".");
2028
- S = m;
2032
+ P = m;
2029
2033
  }
2030
2034
  }), b.init = function() {
2031
2035
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
@@ -2034,11 +2038,11 @@ function wt() {
2034
2038
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + g + ".");
2035
2039
  return this._maxListeners = g, this;
2036
2040
  };
2037
- function I(m) {
2041
+ function v(m) {
2038
2042
  return m._maxListeners === void 0 ? b.defaultMaxListeners : m._maxListeners;
2039
2043
  }
2040
2044
  b.prototype.getMaxListeners = function() {
2041
- return I(this);
2045
+ return v(this);
2042
2046
  }, b.prototype.emit = function(g) {
2043
2047
  for (var h = [], p = 1; p < arguments.length; p++) h.push(arguments[p]);
2044
2048
  var A = g === "error", n = this._events;
@@ -2063,41 +2067,41 @@ function wt() {
2063
2067
  f(E[p], this, h);
2064
2068
  return !0;
2065
2069
  };
2066
- function w(m, g, h, p) {
2070
+ function S(m, g, h, p) {
2067
2071
  var A, n, r;
2068
- if (T(h), n = m._events, n === void 0 ? (n = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (n.newListener !== void 0 && (m.emit(
2072
+ if (L(h), n = m._events, n === void 0 ? (n = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (n.newListener !== void 0 && (m.emit(
2069
2073
  "newListener",
2070
2074
  g,
2071
2075
  h.listener ? h.listener : h
2072
2076
  ), n = m._events), r = n[g]), r === void 0)
2073
2077
  r = n[g] = h, ++m._eventsCount;
2074
- else if (typeof r == "function" ? r = n[g] = p ? [h, r] : [r, h] : p ? r.unshift(h) : r.push(h), A = I(m), A > 0 && r.length > A && !r.warned) {
2078
+ else if (typeof r == "function" ? r = n[g] = p ? [h, r] : [r, h] : p ? r.unshift(h) : r.push(h), A = v(m), A > 0 && r.length > A && !r.warned) {
2075
2079
  r.warned = !0;
2076
2080
  var c = new Error("Possible EventEmitter memory leak detected. " + r.length + " " + String(g) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2077
- c.name = "MaxListenersExceededWarning", c.emitter = m, c.type = g, c.count = r.length, v(c);
2081
+ c.name = "MaxListenersExceededWarning", c.emitter = m, c.type = g, c.count = r.length, B(c);
2078
2082
  }
2079
2083
  return m;
2080
2084
  }
2081
2085
  b.prototype.addListener = function(g, h) {
2082
- return w(this, g, h, !1);
2086
+ return S(this, g, h, !1);
2083
2087
  }, b.prototype.on = b.prototype.addListener, b.prototype.prependListener = function(g, h) {
2084
- return w(this, g, h, !0);
2088
+ return S(this, g, h, !0);
2085
2089
  };
2086
2090
  function k() {
2087
2091
  if (!this.fired)
2088
2092
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
2089
2093
  }
2090
- function B(m, g, h) {
2094
+ function I(m, g, h) {
2091
2095
  var p = { fired: !1, wrapFn: void 0, target: m, type: g, listener: h }, A = k.bind(p);
2092
2096
  return A.listener = h, p.wrapFn = A, A;
2093
2097
  }
2094
2098
  b.prototype.once = function(g, h) {
2095
- return T(h), this.on(g, B(this, g, h)), this;
2099
+ return L(h), this.on(g, I(this, g, h)), this;
2096
2100
  }, b.prototype.prependOnceListener = function(g, h) {
2097
- return T(h), this.prependListener(g, B(this, g, h)), this;
2101
+ return L(h), this.prependListener(g, I(this, g, h)), this;
2098
2102
  }, b.prototype.removeListener = function(g, h) {
2099
2103
  var p, A, n, r, c;
2100
- if (T(h), A = this._events, A === void 0)
2104
+ if (L(h), A = this._events, A === void 0)
2101
2105
  return this;
2102
2106
  if (p = A[g], p === void 0)
2103
2107
  return this;
@@ -2145,9 +2149,9 @@ function wt() {
2145
2149
  }, b.prototype.rawListeners = function(g) {
2146
2150
  return R(this, g, !1);
2147
2151
  }, b.listenerCount = function(m, g) {
2148
- return typeof m.listenerCount == "function" ? m.listenerCount(g) : L.call(m, g);
2149
- }, b.prototype.listenerCount = L;
2150
- function L(m) {
2152
+ return typeof m.listenerCount == "function" ? m.listenerCount(g) : T.call(m, g);
2153
+ }, b.prototype.listenerCount = T;
2154
+ function T(m) {
2151
2155
  var g = this._events;
2152
2156
  if (g !== void 0) {
2153
2157
  var h = g[m];
@@ -2292,7 +2296,7 @@ const ee = {
2292
2296
  label: "Google Pay",
2293
2297
  type: "google_pay"
2294
2298
  };
2295
- function K(e) {
2299
+ function W(e) {
2296
2300
  return e === "enabled" || e === !0;
2297
2301
  }
2298
2302
  function Ze(e) {
@@ -2314,37 +2318,37 @@ function Rt(e) {
2314
2318
  };
2315
2319
  }
2316
2320
  function Ot(e, t, o = {}) {
2317
- var w, k, B, R;
2318
- const i = [], s = (w = e == null ? void 0 : e.kaspi) == null ? void 0 : w.data, u = ((k = e == null ? void 0 : e.cards_v2) == null ? void 0 : k.data) || [], a = ((R = (B = e == null ? void 0 : e.payment_methods) == null ? void 0 : B.data) == null ? void 0 : R.attributes) || {}, l = K(a.payment_method_kaspi), f = K(a.payment_method_card), C = typeof window < "u" && window.self === window.top, _ = Xe() === "ios", b = !!(o != null && o.onlyKaspiAvailable), S = !!(o != null && o.disableKaspi);
2319
- return s != null && s.isKaspiOnly && l && !S ? [ee] : b ? s != null && s.isAvailable && l && !S ? [ee] : [] : (K(a.payment_method_apple_pay) && !me("apple_pay") && (Ce() && C || ye() || _ || st() === 16) && i.push(it), s != null && s.isAvailable && l && !S && i.push(ee), f && u.filter((L) => !L.isExpired).forEach((L) => {
2321
+ var S, k, I, R;
2322
+ const i = [], s = (S = e == null ? void 0 : e.kaspi) == null ? void 0 : S.data, u = ((k = e == null ? void 0 : e.cards_v2) == null ? void 0 : k.data) || [], a = ((R = (I = e == null ? void 0 : e.payment_methods) == null ? void 0 : I.data) == null ? void 0 : R.attributes) || {}, l = W(a.payment_method_kaspi), f = W(a.payment_method_card), C = typeof window < "u" && window.self === window.top, _ = Xe() === "ios", b = !!(o != null && o.onlyKaspiAvailable), P = !!(o != null && o.disableKaspi);
2323
+ return s != null && s.isKaspiOnly && l && !P ? [ee] : b ? s != null && s.isAvailable && l && !P ? [ee] : [] : (W(a.payment_method_apple_pay) && !me("apple_pay") && (Ce() && C || ye() || _ || st() === 16) && i.push(it), s != null && s.isAvailable && l && !P && i.push(ee), f && u.filter((T) => !T.isExpired).forEach((T) => {
2320
2324
  i.push({
2321
- iconType: ge(L.attributes.mask),
2325
+ iconType: ge(T.attributes.mask),
2322
2326
  type: "card",
2323
- cardId: L.id,
2324
- label: `•••• ${L.attributes.mask.slice(-4)}`,
2325
- cardType: L.type,
2326
- isDefault: L.attributes.isDefault
2327
+ cardId: T.id,
2328
+ label: `•••• ${T.attributes.mask.slice(-4)}`,
2329
+ cardType: T.type,
2330
+ isDefault: T.attributes.isDefault
2327
2331
  });
2328
- }), K(a.payment_method_google_pay) && !me("google_pay") && !(o != null && o.disableGooglePay) && !Ce() && !ye() && i.push(at), K(a.payment_method_new_card) && i.push({
2332
+ }), W(a.payment_method_google_pay) && !me("google_pay") && !(o != null && o.disableGooglePay) && !Ce() && !ye() && i.push(at), W(a.payment_method_new_card) && i.push({
2329
2333
  iconType: "new_card",
2330
2334
  type: "new_card",
2331
2335
  label: t ? t("newCard") : "Оплата новой картой"
2332
2336
  }), i);
2333
2337
  }
2334
2338
  function Re(e, t = {}) {
2335
- var I, w, k, B;
2336
- const o = (I = e == null ? void 0 : e.kaspi) == null ? void 0 : I.data, i = ((w = e == null ? void 0 : e.cards_v2) == null ? void 0 : w.data) || [], s = ((B = (k = e == null ? void 0 : e.payment_methods) == null ? void 0 : k.data) == null ? void 0 : B.attributes) || {}, u = K(s.payment_method_kaspi), a = K(s.payment_method_card), l = !!(t != null && t.disableKaspi), f = typeof window < "u" && window.self === window.top, v = Xe() === "ios", _ = K(s.payment_method_apple_pay) && !me("apple_pay") && (Ce() && f || ye() || v || st() === 16), b = K(s.payment_method_google_pay) && !me("google_pay") && !(t != null && t.disableGooglePay) && !Ce() && !ye();
2339
+ var v, S, k, I;
2340
+ const o = (v = e == null ? void 0 : e.kaspi) == null ? void 0 : v.data, i = ((S = e == null ? void 0 : e.cards_v2) == null ? void 0 : S.data) || [], s = ((I = (k = e == null ? void 0 : e.payment_methods) == null ? void 0 : k.data) == null ? void 0 : I.attributes) || {}, u = W(s.payment_method_kaspi), a = W(s.payment_method_card), l = !!(t != null && t.disableKaspi), f = typeof window < "u" && window.self === window.top, B = Xe() === "ios", _ = W(s.payment_method_apple_pay) && !me("apple_pay") && (Ce() && f || ye() || B || st() === 16), b = W(s.payment_method_google_pay) && !me("google_pay") && !(t != null && t.disableGooglePay) && !Ce() && !ye();
2337
2341
  if (o != null && o.isKaspiOnly && u && !l || t != null && t.onlyKaspiAvailable && (o != null && o.isAvailable) && u && !l)
2338
2342
  return ee;
2339
- const S = Rt(e);
2340
- if ((S == null ? void 0 : S.type) === "kaspi_pay" && (o != null && o.isAvailable) && u && !l)
2343
+ const P = Rt(e);
2344
+ if ((P == null ? void 0 : P.type) === "kaspi_pay" && (o != null && o.isAvailable) && u && !l)
2341
2345
  return ee;
2342
- if ((S == null ? void 0 : S.type) === "apple_pay" && _) return it;
2343
- if ((S == null ? void 0 : S.type) === "google_pay" && b) return at;
2344
- if ((S == null ? void 0 : S.type) === "new_card" && K(s.payment_method_new_card))
2346
+ if ((P == null ? void 0 : P.type) === "apple_pay" && _) return it;
2347
+ if ((P == null ? void 0 : P.type) === "google_pay" && b) return at;
2348
+ if ((P == null ? void 0 : P.type) === "new_card" && W(s.payment_method_new_card))
2345
2349
  return { iconType: "new_card", type: "new_card", label: "Оплата новой картой" };
2346
- if ((S == null ? void 0 : S.type) === "card" && a) {
2347
- const R = S.cardId != null ? i.find((L) => !L.isExpired && String(L.id) === S.cardId) : null;
2350
+ if ((P == null ? void 0 : P.type) === "card" && a) {
2351
+ const R = P.cardId != null ? i.find((T) => !T.isExpired && String(T.id) === P.cardId) : null;
2348
2352
  if (R)
2349
2353
  return {
2350
2354
  iconType: ge(R.attributes.mask),
@@ -2355,9 +2359,9 @@ function Re(e, t = {}) {
2355
2359
  };
2356
2360
  }
2357
2361
  if (a) {
2358
- const R = i.find((L) => {
2362
+ const R = i.find((T) => {
2359
2363
  var x;
2360
- return ((x = L.attributes) == null ? void 0 : x.isDefault) && !L.isExpired;
2364
+ return ((x = T.attributes) == null ? void 0 : x.isDefault) && !T.isExpired;
2361
2365
  });
2362
2366
  if (R)
2363
2367
  return {
@@ -2369,13 +2373,13 @@ function Re(e, t = {}) {
2369
2373
  };
2370
2374
  }
2371
2375
  if (o != null && o.isAvailable && u && !l) return ee;
2372
- const T = a ? i.find((R) => !R.isExpired) : null;
2373
- return T ? {
2374
- iconType: ge(T.attributes.mask),
2376
+ const L = a ? i.find((R) => !R.isExpired) : null;
2377
+ return L ? {
2378
+ iconType: ge(L.attributes.mask),
2375
2379
  type: "card",
2376
- cardId: T.id,
2377
- label: `••••${T.attributes.mask.slice(-4)}`,
2378
- cardType: T.type
2380
+ cardId: L.id,
2381
+ label: `••••${L.attributes.mask.slice(-4)}`,
2382
+ cardType: L.type
2379
2383
  } : null;
2380
2384
  }
2381
2385
  function ct(e) {
@@ -2453,7 +2457,7 @@ async function Se(e, t, o, i, s) {
2453
2457
  return u.ok || await Z(u, s), u.json();
2454
2458
  }
2455
2459
  async function Nt(e, t, o) {
2456
- var l, f, C, v;
2460
+ var l, f, C, B;
2457
2461
  const i = await fetch(`${e}/api/v2/oauth2/tokens`, {
2458
2462
  method: "POST",
2459
2463
  headers: {
@@ -2468,12 +2472,12 @@ async function Nt(e, t, o) {
2468
2472
  })
2469
2473
  });
2470
2474
  i.ok || await Z(i, "Не удалось авторизоваться через track_id");
2471
- const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((v = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : v.refresh_token) ?? null;
2475
+ const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((B = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : B.refresh_token) ?? null;
2472
2476
  if (!u) throw new Error("В ответе отсутствует access_token");
2473
2477
  return { access_token: u, refresh_token: a };
2474
2478
  }
2475
2479
  async function Dt(e, t, o) {
2476
- var l, f, C, v;
2480
+ var l, f, C, B;
2477
2481
  const i = await fetch(`${e}/api/v2/oauth2/tokens`, {
2478
2482
  method: "POST",
2479
2483
  headers: { "Content-Type": "application/json" },
@@ -2484,7 +2488,7 @@ async function Dt(e, t, o) {
2484
2488
  })
2485
2489
  });
2486
2490
  i.ok || await Z(i, "Не удалось обновить токен по refresh_token");
2487
- const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((v = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : v.refresh_token) ?? null;
2491
+ const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((B = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : B.refresh_token) ?? null;
2488
2492
  if (!u) throw new Error("В ответе отсутствует access_token");
2489
2493
  return { access_token: u, refresh_token: a };
2490
2494
  }
@@ -2834,7 +2838,7 @@ function rn(e, t, o, i) {
2834
2838
  <div class="choco-widget-balance-icon">
2835
2839
  ${Ue}
2836
2840
  </div>
2837
- <div class="choco-widget-balance-amount">${s ? V(e.amount, "ru", i) : 0}</div>
2841
+ <div class="choco-widget-balance-amount">${s ? K(e.amount, "ru", i) : 0}</div>
2838
2842
  <label class="choco-widget-toggle">
2839
2843
  <input type="checkbox" ${t ? "checked" : ""} />
2840
2844
  <span class="choco-widget-toggle-slider"></span>
@@ -2845,7 +2849,7 @@ function rn(e, t, o, i) {
2845
2849
  }
2846
2850
  function on(e, t, o, i, s) {
2847
2851
  if (!e) return "";
2848
- const u = new Date(e.expires_at), a = isNaN(u.getTime()) ? "" : `${String(u.getDate()).padStart(2, "0")}.${String(u.getMonth() + 1).padStart(2, "0")}`, l = a ? i("couponUntil", { date: a }) : "", f = Number(e.reward_amount), C = Number.isFinite(f) && f > 0 ? V(f, "ru", s) : null;
2852
+ const u = new Date(e.expires_at), a = isNaN(u.getTime()) ? "" : `${String(u.getDate()).padStart(2, "0")}.${String(u.getMonth() + 1).padStart(2, "0")}`, l = a ? i("couponUntil", { date: a }) : "", f = Number(e.reward_amount), C = Number.isFinite(f) && f > 0 ? K(f, "ru", s) : null;
2849
2853
  return `
2850
2854
  <div class="choco-widget-balance-toggle${o ? " choco-widget-balance-toggle--disabled" : ""}" data-action="toggle-coupon">
2851
2855
  <div class="choco-widget-balance-info">
@@ -2920,29 +2924,29 @@ function cn(e) {
2920
2924
  balanceFormatted: l,
2921
2925
  useBalance: f,
2922
2926
  bonuses: C,
2923
- useBonuses: v,
2927
+ useBonuses: B,
2924
2928
  coupon: _,
2925
2929
  useCoupon: b,
2926
- couponDisabled: S,
2927
- cashbackFormatted: T,
2928
- disabled: I,
2929
- paymentMethodDisabled: w = !1,
2930
+ couponDisabled: P,
2931
+ cashbackFormatted: L,
2932
+ disabled: v,
2933
+ paymentMethodDisabled: S = !1,
2930
2934
  loading: k,
2931
- showFreedomBtn: B,
2935
+ showFreedomBtn: I,
2932
2936
  freedomAmountFormatted: R,
2933
- t: L,
2937
+ t: T,
2934
2938
  currency: x
2935
- } = e, N = (s == null ? void 0 : s.label) ?? L("selectMethod"), q = Ee(s), J = ut(u, a), F = sn(l, f, C, v, _, b, S, L, x), M = an(T, L), m = (a == null ? void 0 : a.type) === "google_pay", g = (a == null ? void 0 : a.type) === "apple_pay", h = m || g;
2939
+ } = e, N = (s == null ? void 0 : s.label) ?? T("selectMethod"), q = Ee(s), J = ut(u, a), F = sn(l, f, C, B, _, b, P, T, x), M = an(L, T), m = (a == null ? void 0 : a.type) === "google_pay", g = (a == null ? void 0 : a.type) === "apple_pay", h = m || g;
2936
2940
  return `
2937
- <div class="choco-widget-bottom-bar" role="region" aria-label="${L("paymentMethod")}">
2941
+ <div class="choco-widget-bottom-bar" role="region" aria-label="${T("paymentMethod")}">
2938
2942
  ${F}
2939
2943
  <div class="choco-widget-payment-info">
2940
- ${B ? `
2944
+ ${I ? `
2941
2945
  <button
2942
2946
  class="choco-widget-freedom-card-btn"
2943
2947
  data-action="freedom-card"
2944
2948
  type="button"
2945
- ${I || k ? "disabled" : ""}
2949
+ ${v || k ? "disabled" : ""}
2946
2950
  >
2947
2951
  от ${R} по карте Freedom
2948
2952
  </button>
@@ -2951,11 +2955,11 @@ function cn(e) {
2951
2955
  <button
2952
2956
  class="choco-widget-payment-method ${(s == null ? void 0 : s.type) || ""}"
2953
2957
  data-action="change-method"
2954
- aria-label="${L("paymentMethod")}: ${N}"
2958
+ aria-label="${T("paymentMethod")}: ${N}"
2955
2959
  type="button"
2956
- ${w || I || k ? "disabled" : ""}
2960
+ ${S || v || k ? "disabled" : ""}
2957
2961
  >
2958
- <div class="choco-widget-method-label">${L("paymentMethod")}</div>
2962
+ <div class="choco-widget-method-label">${T("paymentMethod")}</div>
2959
2963
  <div class="choco-widget-method-value">
2960
2964
  <div class="choco-widget-method-icon-wrapper ${s == null ? void 0 : s.type}" aria-hidden="true">${q}</div>
2961
2965
  <div class="choco-widget-method-details">
@@ -2969,17 +2973,17 @@ function cn(e) {
2969
2973
  </div>
2970
2974
  </button>
2971
2975
  <div class="choco-widget-google-pay-amount ${h ? "" : "choco-widget-google-pay-amount--hidden"}" aria-live="polite">
2972
- <div class="choco-widget-google-pay-amount-label">${L("total")} ${t}</div>
2973
- ${i ? `<div class="choco-widget-google-pay-amount-value">${L("instead")} <span class="choco-widget-google-pay-amount-value-number">${o || ""}</span></div>` : ""}
2976
+ <div class="choco-widget-google-pay-amount-label">${T("total")} ${t}</div>
2977
+ ${i ? `<div class="choco-widget-google-pay-amount-value">${T("instead")} <span class="choco-widget-google-pay-amount-value-number">${o || ""}</span></div>` : ""}
2974
2978
  </div>
2975
2979
  <button
2976
2980
  class="choco-widget-pay-button ${k ? "choco-widget-pay-button--loading" : ""} ${h ? "choco-widget-pay-button--hidden" : ""}"
2977
2981
  data-action="pay"
2978
- aria-label="${L("pay")} ${t}"
2982
+ aria-label="${S ? T("login") : `${T("pay")} ${t}`}"
2979
2983
  type="button"
2980
- ${I || k ? "disabled" : ""}
2984
+ ${v || k ? "disabled" : ""}
2981
2985
  >
2982
- ${L("pay")} ${t}
2986
+ ${S ? T("login") : `${T("pay")} ${t}`}
2983
2987
  </button>
2984
2988
  </div>
2985
2989
  <div class="choco-widget-google-pay-row ${m ? "" : "choco-widget-google-pay-row--hidden"}">
@@ -3011,7 +3015,7 @@ function cn(e) {
3011
3015
  <path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3012
3016
  </svg>
3013
3017
  </button>
3014
- <h3 class="choco-widget-sheet-title" id="choco-sheet-title">${L("paymentMethods")}</h3>
3018
+ <h3 class="choco-widget-sheet-title" id="choco-sheet-title">${T("paymentMethods")}</h3>
3015
3019
  <button
3016
3020
  class="choco-widget-sheet-button choco-widget-sheet-button--edit"
3017
3021
  data-action="edit-sheet"
@@ -3026,7 +3030,7 @@ function cn(e) {
3026
3030
  <button
3027
3031
  class="choco-widget-sheet-button choco-widget-sheet-button--previous"
3028
3032
  data-action="previous-sheet"
3029
- aria-label="${L("back")}"
3033
+ aria-label="${T("back")}"
3030
3034
  type="button"
3031
3035
  style="display: none;"
3032
3036
  >
@@ -3041,8 +3045,8 @@ function cn(e) {
3041
3045
  </div>
3042
3046
  <div class="choco-widget-sheet-delete-confirm" data-delete-confirm="content" aria-hidden="true">
3043
3047
  <div class="choco-widget-sheet-delete-confirm-actions">
3044
- <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--cancel" data-action="confirm-delete-cancel">${L("cancel")}</button>
3045
- <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--delete" data-action="confirm-delete-submit">${L("delete")}</button>
3048
+ <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--cancel" data-action="confirm-delete-cancel">${T("cancel")}</button>
3049
+ <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--delete" data-action="confirm-delete-submit">${T("delete")}</button>
3046
3050
  </div>
3047
3051
  </div>
3048
3052
  ${M}
@@ -3052,10 +3056,10 @@ function cn(e) {
3052
3056
  <div class="choco-widget-add-card-sheet choco-widget-payment-sheet" data-sheet="add-card" aria-hidden="true" style="display: none;">
3053
3057
  <div class="choco-widget-sheet-content choco-widget-add-card-sheet-content">
3054
3058
  <div class="choco-widget-sheet-header">
3055
- <h3 class="choco-widget-sheet-title">${L("addCard")}</h3>
3059
+ <h3 class="choco-widget-sheet-title">${T("addCard")}</h3>
3056
3060
  </div>
3057
3061
  <div class="choco-widget-add-card-iframe-wrapper">
3058
- <iframe id="choco-widget-add-card-iframe" class="choco-widget-add-card-iframe" title="${L("addCard")}" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
3062
+ <iframe id="choco-widget-add-card-iframe" class="choco-widget-add-card-iframe" title="${T("addCard")}" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
3059
3063
  </div>
3060
3064
  </div>
3061
3065
  </div>
@@ -3093,13 +3097,13 @@ function hn(e) {
3093
3097
  lt(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = An());
3094
3098
  }
3095
3099
  function fn(e) {
3096
- var v, _, b, S, T;
3100
+ var B, _, b, P, L;
3097
3101
  if (e._destroyed || !lt(e)) return;
3098
3102
  e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.classList.remove("choco-one-click-widget--visible");
3099
- const t = e.getAvailablePaymentMethods(), o = (v = e.checkoutContext) == null ? void 0 : v.data, i = e.config.currency || "KZT", s = (S = (b = (_ = o == null ? void 0 : o.balance) == null ? void 0 : _.data) == null ? void 0 : b.money) == null ? void 0 : S[i], u = s > 0 ? V(s, e.config.locale, e.config.currency) : null, a = (T = o == null ? void 0 : o.cashback) == null ? void 0 : T.data, l = (a == null ? void 0 : a.cashbackAmount) > 0 ? V(a.cashbackAmount, e.config.locale, e.config.currency) : null, f = e._getPayableAmount(), C = f < e.config.amount;
3103
+ const t = e.getAvailablePaymentMethods(), o = (B = e.checkoutContext) == null ? void 0 : B.data, i = e.config.currency || "KZT", s = (P = (b = (_ = o == null ? void 0 : o.balance) == null ? void 0 : _.data) == null ? void 0 : b.money) == null ? void 0 : P[i], u = s > 0 ? K(s, e.config.locale, e.config.currency) : null, a = (L = o == null ? void 0 : o.cashback) == null ? void 0 : L.data, l = (a == null ? void 0 : a.cashbackAmount) > 0 ? K(a.cashbackAmount, e.config.locale, e.config.currency) : null, f = e._getPayableAmount(), C = f < e.config.amount;
3100
3104
  e.container.innerHTML = cn({
3101
- amountFormatted: V(f, e.config.locale, e.config.currency),
3102
- originalAmountFormatted: V(
3105
+ amountFormatted: K(f, e.config.locale, e.config.currency),
3106
+ originalAmountFormatted: K(
3103
3107
  e.config.amount,
3104
3108
  e.config.locale,
3105
3109
  e.config.currency
@@ -3120,12 +3124,12 @@ function fn(e) {
3120
3124
  paymentMethodDisabled: e.paymentMethodDisabled,
3121
3125
  loading: e.loading,
3122
3126
  showFreedomBtn: !e.config.isFridge && e.config.onFreedomLink !== null,
3123
- freedomAmountFormatted: V(
3124
- Math.round(e.config.amount * 0.84),
3127
+ freedomAmountFormatted: K(
3128
+ Math.round(f * 0.84),
3125
3129
  e.config.locale,
3126
3130
  e.config.currency
3127
3131
  ),
3128
- t: (I, w) => e.t(I, w),
3132
+ t: (v, S) => e.t(v, S),
3129
3133
  currency: i
3130
3134
  }), e._attachEventListeners(), e.isOpen = !0, e._emitUserEvent("one_click_pay_cta_rendered", {
3131
3135
  terminal_id: e.config.terminalId,
@@ -3134,8 +3138,8 @@ function fn(e) {
3134
3138
  payment_method: e._getPaymentMethodForUserEvent()
3135
3139
  }), requestAnimationFrame(() => {
3136
3140
  requestAnimationFrame(() => {
3137
- var I;
3138
- e._destroyed || (I = e.container) == null || I.classList.add("choco-one-click-widget--visible");
3141
+ var v;
3142
+ e._destroyed || (v = e.container) == null || v.classList.add("choco-one-click-widget--visible");
3139
3143
  });
3140
3144
  });
3141
3145
  }
@@ -3174,23 +3178,28 @@ function dt(e) {
3174
3178
  t && e.selectedPaymentMethod && (t.className = `choco-widget-payment-method ${e.selectedPaymentMethod.type}`), o && e.selectedPaymentMethod && (o.className = `choco-widget-method-name ${e.selectedPaymentMethod.type}`, o.textContent = e.selectedPaymentMethod.label), i && e.selectedPaymentMethod && (i.className = `choco-widget-method-icon-wrapper ${e.selectedPaymentMethod.type}`, i.innerHTML = ln(e.selectedPaymentMethod)), ht(e);
3175
3179
  }
3176
3180
  function pe(e) {
3177
- var v, _, b, S, T;
3178
- const t = (v = e.container) == null ? void 0 : v.querySelector(".choco-widget-pay-button"), o = (_ = e.container) == null ? void 0 : _.querySelector(
3181
+ var _, b, P, L, v, S;
3182
+ const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-pay-button"), o = (b = e.container) == null ? void 0 : b.querySelector(
3179
3183
  ".choco-widget-google-pay-amount"
3180
- ), i = (b = e.container) == null ? void 0 : b.querySelector(
3184
+ ), i = (P = e.container) == null ? void 0 : P.querySelector(
3181
3185
  ".choco-widget-google-pay-amount-label"
3182
3186
  );
3183
- let s = (S = e.container) == null ? void 0 : S.querySelector(
3187
+ let s = (L = e.container) == null ? void 0 : L.querySelector(
3184
3188
  ".choco-widget-google-pay-amount-value"
3185
- ), u = (T = e.container) == null ? void 0 : T.querySelector(
3189
+ ), u = (v = e.container) == null ? void 0 : v.querySelector(
3186
3190
  ".choco-widget-google-pay-amount-value-number"
3187
3191
  );
3188
- const a = e._getPayableAmount(), l = V(a, e.config.locale, e.config.currency), f = a < e.config.amount, C = V(
3192
+ const a = e._getPayableAmount(), l = K(a, e.config.locale, e.config.currency), f = a < e.config.amount, C = K(
3189
3193
  e.config.amount,
3190
3194
  e.config.locale,
3191
3195
  e.config.currency
3192
3196
  );
3193
- if (t && (t.textContent = `${e.t("pay")} ${l}`, t.setAttribute("aria-label", `${e.t("pay")} ${l}`)), i && (i.textContent = `${e.t("total")} ${l}`), !f) {
3197
+ if (t) {
3198
+ const k = e.paymentMethodDisabled ? e.t("login") : `${e.t("pay")} ${l}`;
3199
+ t.textContent = k, t.setAttribute("aria-label", k);
3200
+ }
3201
+ const B = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-freedom-card-btn");
3202
+ if (B && (B.textContent = `от ${K(Math.round(a * 0.84), e.config.locale, e.config.currency)} по карте Freedom`), i && (i.textContent = `${e.t("total")} ${l}`), !f) {
3194
3203
  s == null || s.remove();
3195
3204
  return;
3196
3205
  }
@@ -3199,38 +3208,38 @@ function pe(e) {
3199
3208
  )), u ? u.textContent = C : s && (s.textContent = `${e.t("instead")} ${C}`);
3200
3209
  }
3201
3210
  function ht(e) {
3202
- var f, C, v, _, b, S, T, I, w, k;
3203
- const t = ((f = e.selectedPaymentMethod) == null ? void 0 : f.type) === "google_pay", o = ((C = e.selectedPaymentMethod) == null ? void 0 : C.type) === "apple_pay", i = t || o, s = (v = e.container) == null ? void 0 : v.querySelector(".choco-widget-pay-button"), u = (_ = e.container) == null ? void 0 : _.querySelector(
3211
+ var f, C, B, _, b, P, L, v, S, k;
3212
+ const t = ((f = e.selectedPaymentMethod) == null ? void 0 : f.type) === "google_pay", o = ((C = e.selectedPaymentMethod) == null ? void 0 : C.type) === "apple_pay", i = t || o, s = (B = e.container) == null ? void 0 : B.querySelector(".choco-widget-pay-button"), u = (_ = e.container) == null ? void 0 : _.querySelector(
3204
3213
  ".choco-widget-google-pay-amount"
3205
- ), a = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-google-pay-row"), l = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-apple-pay-row");
3214
+ ), a = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-google-pay-row"), l = (P = e.container) == null ? void 0 : P.querySelector(".choco-widget-apple-pay-row");
3206
3215
  if (s == null || s.classList.toggle("choco-widget-pay-button--hidden", i), u == null || u.classList.toggle(
3207
3216
  "choco-widget-google-pay-amount--hidden",
3208
3217
  !i
3209
3218
  ), a == null || a.classList.toggle("choco-widget-google-pay-row--hidden", !t), l == null || l.classList.toggle("choco-widget-apple-pay-row--hidden", !o), t) {
3210
3219
  gn(e);
3211
- const B = (T = e.container) == null ? void 0 : T.querySelector(
3220
+ const I = (L = e.container) == null ? void 0 : L.querySelector(
3212
3221
  '[data-action="apple-pay-button-slot"]'
3213
3222
  );
3214
- B && (B.innerHTML = "");
3223
+ I && (I.innerHTML = "");
3215
3224
  } else if (o) {
3216
3225
  e._googlePayButtonRenderVersion += 1;
3217
- const B = (I = e.container) == null ? void 0 : I.querySelector(
3226
+ const I = (v = e.container) == null ? void 0 : v.querySelector(
3218
3227
  '[data-action="google-pay-button-slot"]'
3219
3228
  );
3220
- B && (B.innerHTML = ""), pn(e);
3229
+ I && (I.innerHTML = ""), pn(e);
3221
3230
  } else {
3222
3231
  e._googlePayButtonRenderVersion += 1;
3223
- const B = (w = e.container) == null ? void 0 : w.querySelector(
3232
+ const I = (S = e.container) == null ? void 0 : S.querySelector(
3224
3233
  '[data-action="google-pay-button-slot"]'
3225
3234
  ), R = (k = e.container) == null ? void 0 : k.querySelector(
3226
3235
  '[data-action="apple-pay-button-slot"]'
3227
3236
  );
3228
- B && (B.innerHTML = ""), R && (R.innerHTML = "");
3237
+ I && (I.innerHTML = ""), R && (R.innerHTML = "");
3229
3238
  }
3230
3239
  pe(e), Y(e);
3231
3240
  }
3232
3241
  async function gn(e) {
3233
- var a, l, f, C, v;
3242
+ var a, l, f, C, B;
3234
3243
  const t = (a = e.container) == null ? void 0 : a.querySelector(
3235
3244
  '[data-action="google-pay-button-slot"]'
3236
3245
  );
@@ -3243,7 +3252,7 @@ async function gn(e) {
3243
3252
  return;
3244
3253
  }
3245
3254
  if (o !== e._googlePayButtonRenderVersion) return;
3246
- if (!((v = (C = (f = window.google) == null ? void 0 : f.payments) == null ? void 0 : C.api) != null && v.PaymentsClient)) {
3255
+ if (!((B = (C = (f = window.google) == null ? void 0 : f.payments) == null ? void 0 : C.api) != null && B.PaymentsClient)) {
3247
3256
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3248
3257
  return;
3249
3258
  }
@@ -3302,31 +3311,31 @@ function ne(e) {
3302
3311
  e.loading = !0, Y(e);
3303
3312
  }
3304
3313
  function j(e) {
3305
- var _, b, S, T, I, w, k, B;
3314
+ var _, b, P, L, v, S, k, I;
3306
3315
  e.loading = !1;
3307
- const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (S = e.container) == null ? void 0 : S.querySelector(
3316
+ const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (P = e.container) == null ? void 0 : P.querySelector(
3308
3317
  ".choco-widget-google-pay-button-slot button"
3309
- ), s = (T = e.container) == null ? void 0 : T.querySelector(
3318
+ ), s = (L = e.container) == null ? void 0 : L.querySelector(
3310
3319
  ".choco-widget-apple-pay-button-slot button"
3311
- ), u = (I = e.container) == null ? void 0 : I.querySelector(
3320
+ ), u = (v = e.container) == null ? void 0 : v.querySelector(
3312
3321
  ".choco-widget-google-pay-amount"
3313
- ), a = (w = e.container) == null ? void 0 : w.querySelector(".choco-widget-google-pay-row"), l = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-apple-pay-row"), f = (B = e.container) == null ? void 0 : B.querySelector(
3322
+ ), a = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-google-pay-row"), l = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-apple-pay-row"), f = (I = e.container) == null ? void 0 : I.querySelector(
3314
3323
  ".choco-widget-balance-section"
3315
- ), C = e._isInteractionBlocked(), v = e.paymentMethodDisabled || C;
3316
- t && (t.disabled = v), o && (o.disabled = C, o.classList.remove("choco-widget-pay-button--loading")), i && (i.disabled = C), s && (s.disabled = C), u == null || u.classList.toggle("choco-widget-wallet-blocked", C), u == null || u.setAttribute("aria-disabled", String(C)), a == null || a.classList.toggle("choco-widget-wallet-blocked", C), a == null || a.setAttribute("aria-disabled", String(C)), l == null || l.classList.toggle("choco-widget-wallet-blocked", C), l == null || l.setAttribute("aria-disabled", String(C)), f == null || f.classList.remove("disabled");
3324
+ ), C = e._isInteractionBlocked(), B = e.paymentMethodDisabled || C;
3325
+ t && (t.disabled = B), o && (o.disabled = C, o.classList.remove("choco-widget-pay-button--loading")), i && (i.disabled = C), s && (s.disabled = C), u == null || u.classList.toggle("choco-widget-wallet-blocked", C), u == null || u.setAttribute("aria-disabled", String(C)), a == null || a.classList.toggle("choco-widget-wallet-blocked", C), a == null || a.setAttribute("aria-disabled", String(C)), l == null || l.classList.toggle("choco-widget-wallet-blocked", C), l == null || l.setAttribute("aria-disabled", String(C)), f == null || f.classList.remove("disabled");
3317
3326
  }
3318
3327
  function Y(e) {
3319
- var b, S, T, I, w, k, B, R, L;
3320
- const t = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-payment-method"), o = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-pay-button"), i = (T = e.container) == null ? void 0 : T.querySelector(".choco-widget-freedom-card-btn"), s = (I = e.container) == null ? void 0 : I.querySelector(
3328
+ var b, P, L, v, S, k, I, R, T;
3329
+ const t = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-payment-method"), o = (P = e.container) == null ? void 0 : P.querySelector(".choco-widget-pay-button"), i = (L = e.container) == null ? void 0 : L.querySelector(".choco-widget-freedom-card-btn"), s = (v = e.container) == null ? void 0 : v.querySelector(
3321
3330
  ".choco-widget-google-pay-button-slot button"
3322
- ), u = (w = e.container) == null ? void 0 : w.querySelector(
3331
+ ), u = (S = e.container) == null ? void 0 : S.querySelector(
3323
3332
  ".choco-widget-apple-pay-button-slot button"
3324
3333
  ), a = (k = e.container) == null ? void 0 : k.querySelector(
3325
3334
  ".choco-widget-google-pay-amount"
3326
- ), l = (B = e.container) == null ? void 0 : B.querySelector(".choco-widget-google-pay-row"), f = (R = e.container) == null ? void 0 : R.querySelector(".choco-widget-apple-pay-row"), C = (L = e.container) == null ? void 0 : L.querySelector(
3335
+ ), l = (I = e.container) == null ? void 0 : I.querySelector(".choco-widget-google-pay-row"), f = (R = e.container) == null ? void 0 : R.querySelector(".choco-widget-apple-pay-row"), C = (T = e.container) == null ? void 0 : T.querySelector(
3327
3336
  ".choco-widget-balance-section"
3328
- ), v = e._isInteractionBlocked(), _ = e.paymentMethodDisabled || v;
3329
- C == null || C.classList.toggle("disabled", v), t && (t.disabled = _), o && (o.disabled = v, o.classList.toggle("choco-widget-pay-button--loading", e.loading)), i && (i.disabled = v), s && (s.disabled = v), u && (u.disabled = v), a == null || a.classList.toggle("choco-widget-wallet-blocked", v), a == null || a.setAttribute("aria-disabled", String(v)), l == null || l.classList.toggle("choco-widget-wallet-blocked", v), l == null || l.setAttribute("aria-disabled", String(v)), f == null || f.classList.toggle("choco-widget-wallet-blocked", v), f == null || f.setAttribute("aria-disabled", String(v));
3337
+ ), B = e._isInteractionBlocked(), _ = e.paymentMethodDisabled || B;
3338
+ C == null || C.classList.toggle("disabled", B), t && (t.disabled = _), o && (o.disabled = B, o.classList.toggle("choco-widget-pay-button--loading", e.loading)), i && (i.disabled = B), s && (s.disabled = B), u && (u.disabled = B), a == null || a.classList.toggle("choco-widget-wallet-blocked", B), a == null || a.setAttribute("aria-disabled", String(B)), l == null || l.classList.toggle("choco-widget-wallet-blocked", B), l == null || l.setAttribute("aria-disabled", String(B)), f == null || f.classList.toggle("choco-widget-wallet-blocked", B), f == null || f.setAttribute("aria-disabled", String(B));
3330
3339
  }
3331
3340
  function ft(e) {
3332
3341
  var o;
@@ -3593,12 +3602,12 @@ async function vn(e) {
3593
3602
  await rt(e);
3594
3603
  const l = (a == null ? void 0 : a.id) ?? ((i = a == null ? void 0 : a.data) == null ? void 0 : i.id);
3595
3604
  if (l && ce(e, String(l)), ((s = e.selectedPaymentMethod) == null ? void 0 : s.type) === "kaspi_pay") {
3596
- const f = (a == null ? void 0 : a.attributes) || ((u = a == null ? void 0 : a.data) == null ? void 0 : u.attributes) || {}, C = f.action_link || f.action_url, v = f.action_url_type || f.action_type || "redirect";
3605
+ const f = (a == null ? void 0 : a.attributes) || ((u = a == null ? void 0 : a.data) == null ? void 0 : u.attributes) || {}, C = f.action_link || f.action_url, B = f.action_url_type || f.action_type || "redirect";
3597
3606
  if (C)
3598
3607
  return typeof e.config.onKaspiLink == "function" ? (e.config.onKaspiLink({
3599
3608
  action_link: C,
3600
3609
  action_url: C,
3601
- action_type: v,
3610
+ action_type: B,
3602
3611
  event: a
3603
3612
  }), a) : (window.location.href = C, a);
3604
3613
  }
@@ -3667,8 +3676,8 @@ async function In(e, t) {
3667
3676
  e.apiUrl,
3668
3677
  e._getApiConfig(),
3669
3678
  u.validationURL
3670
- ), C = ((l = (a = f == null ? void 0 : f.data) == null ? void 0 : a.attributes) == null ? void 0 : l.session) || f, v = JSON.parse(atob(C));
3671
- s.completeMerchantValidation(v);
3679
+ ), C = ((l = (a = f == null ? void 0 : f.data) == null ? void 0 : a.attributes) == null ? void 0 : l.session) || f, B = JSON.parse(atob(C));
3680
+ s.completeMerchantValidation(B);
3672
3681
  } catch (f) {
3673
3682
  console.error("Apple Pay session error:", f), s.abort(), e.config.onError({ attributes: { message: e.t("errorApplePayInit") } });
3674
3683
  }
@@ -3701,8 +3710,8 @@ async function In(e, t) {
3701
3710
  }, s.begin();
3702
3711
  }
3703
3712
  async function Qn(e, t) {
3704
- var w, k, B, R, L, x;
3705
- const o = (w = e.checkoutContext) == null ? void 0 : w.data, i = ((B = (k = o == null ? void 0 : o.payment_methods) == null ? void 0 : k.data) == null ? void 0 : B.attributes) || {}, s = i.google_pay_settings || {};
3713
+ var S, k, I, R, T, x;
3714
+ const o = (S = e.checkoutContext) == null ? void 0 : S.data, i = ((I = (k = o == null ? void 0 : o.payment_methods) == null ? void 0 : k.data) == null ? void 0 : I.attributes) || {}, s = i.google_pay_settings || {};
3706
3715
  if (!(i.payment_method_google_pay === "enabled" || i.payment_method_google_pay === !0)) {
3707
3716
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3708
3717
  return;
@@ -3714,8 +3723,8 @@ async function Qn(e, t) {
3714
3723
  });
3715
3724
  return;
3716
3725
  }
3717
- const f = e.config.environment === "production", C = (s == null ? void 0 : s.merchant_name) || "Choco", v = s == null ? void 0 : s.google_merchant_id;
3718
- if (f && !v) {
3726
+ const f = e.config.environment === "production", C = (s == null ? void 0 : s.merchant_name) || "Choco", B = s == null ? void 0 : s.google_merchant_id;
3727
+ if (f && !B) {
3719
3728
  e.config.onError({
3720
3729
  attributes: { message: e.t("errorGooglePaySettingsUnavailable") }
3721
3730
  });
@@ -3737,7 +3746,7 @@ async function Qn(e, t) {
3737
3746
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3738
3747
  return;
3739
3748
  }
3740
- const S = [
3749
+ const P = [
3741
3750
  {
3742
3751
  type: "CARD",
3743
3752
  parameters: {
@@ -3750,10 +3759,10 @@ async function Qn(e, t) {
3750
3759
  parameters: { gateway: a, gatewayMerchantId: l }
3751
3760
  }
3752
3761
  }
3753
- ], T = {
3762
+ ], L = {
3754
3763
  apiVersion: 2,
3755
3764
  apiVersionMinor: 0,
3756
- allowedPaymentMethods: S,
3765
+ allowedPaymentMethods: P,
3757
3766
  transactionInfo: {
3758
3767
  totalPriceStatus: "FINAL",
3759
3768
  totalPriceLabel: "Итого",
@@ -3761,22 +3770,22 @@ async function Qn(e, t) {
3761
3770
  currencyCode: e.config.currency,
3762
3771
  countryCode: e.config.currency === "GEL" ? "GE" : "KZ"
3763
3772
  },
3764
- merchantInfo: f ? { merchantId: v, merchantName: C } : { merchantName: C }
3765
- }, I = new b.payments.api.PaymentsClient({
3773
+ merchantInfo: f ? { merchantId: B, merchantName: C } : { merchantName: C }
3774
+ }, v = new b.payments.api.PaymentsClient({
3766
3775
  environment: f ? "PRODUCTION" : "TEST"
3767
3776
  });
3768
3777
  try {
3769
- const N = await I.isReadyToPay({
3778
+ const N = await v.isReadyToPay({
3770
3779
  apiVersion: 2,
3771
3780
  apiVersionMinor: 0,
3772
- allowedPaymentMethods: S
3781
+ allowedPaymentMethods: P
3773
3782
  });
3774
3783
  if (!(N != null && N.result)) {
3775
3784
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3776
3785
  return;
3777
3786
  }
3778
3787
  ne(e);
3779
- const q = await I.loadPaymentData(T), J = (L = (R = q == null ? void 0 : q.paymentMethodData) == null ? void 0 : R.tokenizationData) == null ? void 0 : L.token;
3788
+ const q = await v.loadPaymentData(L), J = (T = (R = q == null ? void 0 : q.paymentMethodData) == null ? void 0 : R.tokenizationData) == null ? void 0 : T.token;
3780
3789
  if (!J) throw new Error(e.t("errorGooglePayPayment"));
3781
3790
  const F = JSON.parse(J), M = await At(
3782
3791
  e.apiUrl,
@@ -3823,44 +3832,44 @@ async function Sn(e, t, o) {
3823
3832
  }
3824
3833
  }
3825
3834
  function Pn(e) {
3826
- var a, l, f, C, v, _, b, S, T, I, w, k;
3835
+ var a, l, f, C, B, _, b, P, L, v, S, k;
3827
3836
  const t = e.container;
3828
3837
  (a = t.querySelector('[data-action="freedom-card"]')) == null || a.addEventListener("click", () => {
3829
3838
  e.config.onFreedomLink && e.config.onFreedomLink();
3830
- }), (l = t.querySelector('[data-action="pay"]')) == null || l.addEventListener("click", () => e.handlePayment()), (f = t.querySelector('[data-action="change-method"]')) == null || f.addEventListener("click", () => ft(e)), t.querySelectorAll('[data-action="close"]').forEach((B) => B.addEventListener("click", () => e.close())), (C = t.querySelector('[data-action="close-sheet"]')) == null || C.addEventListener("click", () => {
3839
+ }), (l = t.querySelector('[data-action="pay"]')) == null || l.addEventListener("click", () => e.handlePayment()), (f = t.querySelector('[data-action="change-method"]')) == null || f.addEventListener("click", () => ft(e)), t.querySelectorAll('[data-action="close"]').forEach((I) => I.addEventListener("click", () => e.close())), (C = t.querySelector('[data-action="close-sheet"]')) == null || C.addEventListener("click", () => {
3831
3840
  e._pendingDeleteMethod ? ve(e) : G(e);
3832
- }), (v = t.querySelector('[data-action="edit-sheet"]')) == null || v.addEventListener("click", () => {
3841
+ }), (B = t.querySelector('[data-action="edit-sheet"]')) == null || B.addEventListener("click", () => {
3833
3842
  e.isPaymentSheetEditMode = !0, Ae(e), ue(e);
3834
3843
  }), (_ = t.querySelector('[data-action="previous-sheet"]')) == null || _.addEventListener("click", () => {
3835
3844
  e.isPaymentSheetEditMode = !1, Ae(e), ue(e);
3836
- }), (b = t.querySelector('[data-action="close-add-card"]')) == null || b.addEventListener("click", () => ae(e)), (S = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || S.addEventListener("click", () => ve(e)), (T = t.querySelector('[data-action="confirm-delete-submit"]')) == null || T.addEventListener("click", () => {
3845
+ }), (b = t.querySelector('[data-action="close-add-card"]')) == null || b.addEventListener("click", () => ae(e)), (P = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || P.addEventListener("click", () => ve(e)), (L = t.querySelector('[data-action="confirm-delete-submit"]')) == null || L.addEventListener("click", () => {
3837
3846
  if (e._pendingDeleteMethod) {
3838
- const B = e._pendingDeleteMethod;
3839
- De(e, !0), bn(e, B).then(() => G(e)).finally(() => De(e, !1));
3847
+ const I = e._pendingDeleteMethod;
3848
+ De(e, !0), bn(e, I).then(() => G(e)).finally(() => De(e, !1));
3840
3849
  }
3841
- }), t.querySelectorAll(".choco-widget-method-item").forEach((B) => {
3842
- B.addEventListener("click", (R) => {
3843
- const L = JSON.parse(
3850
+ }), t.querySelectorAll(".choco-widget-method-item").forEach((I) => {
3851
+ I.addEventListener("click", (R) => {
3852
+ const T = JSON.parse(
3844
3853
  R.currentTarget.getAttribute("data-method") || "{}"
3845
3854
  );
3846
- gt(e, L);
3855
+ gt(e, T);
3847
3856
  });
3848
3857
  });
3849
3858
  const o = t.querySelector('[data-sheet="payment"]');
3850
- o && (o.addEventListener("click", (B) => {
3851
- B.target === o && G(e);
3859
+ o && (o.addEventListener("click", (I) => {
3860
+ I.target === o && G(e);
3852
3861
  }), wn(e, o));
3853
3862
  const i = t.querySelector('[data-action="toggle-balance"]');
3854
- i && ((I = i.querySelector("input[type='checkbox']")) == null || I.addEventListener("change", (B) => {
3855
- e.useBalance = B.target.checked, tt(e), e._updatePayButtonAmount();
3863
+ i && ((v = i.querySelector("input[type='checkbox']")) == null || v.addEventListener("change", (I) => {
3864
+ e.useBalance = I.target.checked, tt(e), e._updatePayButtonAmount();
3856
3865
  }));
3857
3866
  const s = t.querySelector('[data-action="toggle-bonuses"]');
3858
- s && ((w = s.querySelector("input[type='checkbox']")) == null || w.addEventListener("change", (B) => {
3859
- e.useBonuses = B.target.checked, e.config.onAppliedBonus(e.useBonuses), tt(e), e._updatePayButtonAmount();
3867
+ s && ((S = s.querySelector("input[type='checkbox']")) == null || S.addEventListener("change", (I) => {
3868
+ e.useBonuses = I.target.checked, e.config.onAppliedBonus(e.useBonuses), tt(e), e._updatePayButtonAmount();
3860
3869
  }));
3861
3870
  const u = t.querySelector('[data-action="toggle-coupon"]');
3862
- u && ((k = u.querySelector("input[type='checkbox']")) == null || k.addEventListener("change", (B) => {
3863
- e.useCoupon = B.target.checked, e._updatePayButtonAmount();
3871
+ u && ((k = u.querySelector("input[type='checkbox']")) == null || k.addEventListener("change", (I) => {
3872
+ e.useCoupon = I.target.checked, e._updatePayButtonAmount();
3864
3873
  })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), ht(e);
3865
3874
  }
3866
3875
  function kn(e, t) {
@@ -3874,12 +3883,12 @@ function wn(e, t) {
3874
3883
  let u = 0, a = 0;
3875
3884
  const l = (C) => {
3876
3885
  a = C.clientY;
3877
- const v = Math.max(0, a - u);
3878
- i.style.transform = `translateY(${v}px)`;
3886
+ const B = Math.max(0, a - u);
3887
+ i.style.transform = `translateY(${B}px)`;
3879
3888
  }, f = (C) => {
3880
3889
  o.releasePointerCapture(C.pointerId), o.removeEventListener("pointermove", l), o.removeEventListener("pointerup", f), o.removeEventListener("pointercancel", f);
3881
- const v = Math.max(0, a - u);
3882
- if (i.classList.remove("choco-widget-sheet-content--dragging"), v >= s) {
3890
+ const B = Math.max(0, a - u);
3891
+ if (i.classList.remove("choco-widget-sheet-content--dragging"), B >= s) {
3883
3892
  i.style.transform = "translateY(100%)";
3884
3893
  const _ = () => {
3885
3894
  i.removeEventListener("transitionend", _), i.style.transform = "", G(e);
@@ -3955,7 +3964,7 @@ class ie {
3955
3964
  return Number.isFinite(t) && t > 0 ? t : 0;
3956
3965
  }
3957
3966
  _getPaymentBreakdown() {
3958
- const t = this.config.amount, o = this._getBalanceAmount(), i = this.useBalance ? Math.min(o, t) : 0, s = t - i, u = this.useBalance && i >= t, a = this.useBonuses ? this._getAvailableBonus() : 0, l = Math.max(s - a, 0), f = this._getCouponDiscount(), C = Math.max(l - f, 0), v = this.useBalance ? t : C, _ = this.useBalance && !u, S = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
3967
+ const t = this.config.amount, o = this._getBalanceAmount(), i = this.useBalance ? Math.min(o, t) : 0, s = t - i, u = this.useBalance && i >= t, a = this.useBonuses ? this._getAvailableBonus() : 0, l = Math.max(s - a, 0), f = this._getCouponDiscount(), C = Math.max(l - f, 0), B = this.useBalance ? t : C, _ = this.useBalance && !u, P = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
3959
3968
  id: this.selectedCoupon.voucher_id,
3960
3969
  template_id: this.selectedCoupon.template_id,
3961
3970
  type: this.selectedCoupon.type
@@ -3963,10 +3972,10 @@ class ie {
3963
3972
  return {
3964
3973
  payableAmount: C,
3965
3974
  checkoutOptions: {
3966
- checkoutAmount: v,
3975
+ checkoutAmount: B,
3967
3976
  forceBalanceMethod: u,
3968
3977
  useBalance: _,
3969
- voucher: S
3978
+ voucher: P
3970
3979
  }
3971
3980
  };
3972
3981
  }