@starfish-codes/hellgate 2.0.0-beta.6 → 3.0.0

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.
@@ -12,7 +12,7 @@ function z(e, t) {
12
12
  }
13
13
  return r;
14
14
  }
15
- function nt(e) {
15
+ function be(e) {
16
16
  if (!e.ok)
17
17
  throw e;
18
18
  return e.json();
@@ -60,6 +60,16 @@ class Yr {
60
60
  configurable: !0,
61
61
  writable: !0,
62
62
  value: void 0
63
+ }), Object.defineProperty(this, "onStartHandler", {
64
+ enumerable: !0,
65
+ configurable: !0,
66
+ writable: !0,
67
+ value: void 0
68
+ }), Object.defineProperty(this, "onFinishHandler", {
69
+ enumerable: !0,
70
+ configurable: !0,
71
+ writable: !0,
72
+ value: void 0
63
73
  }), Object.defineProperty(this, "onDecoupledAuth", {
64
74
  enumerable: !0,
65
75
  configurable: !0,
@@ -67,18 +77,33 @@ class Yr {
67
77
  value: (n) => {
68
78
  this.decoupledAuthHandlers.push(n);
69
79
  }
80
+ }), Object.defineProperty(this, "onStartChallenge", {
81
+ enumerable: !0,
82
+ configurable: !0,
83
+ writable: !0,
84
+ value: (n) => {
85
+ this.onStartHandler = n;
86
+ }
87
+ }), Object.defineProperty(this, "onChallengeFinished", {
88
+ enumerable: !0,
89
+ configurable: !0,
90
+ writable: !0,
91
+ value: (n) => {
92
+ this.onFinishHandler = n;
93
+ }
70
94
  }), Object.defineProperty(this, "sessionStateHandle", {
71
95
  enumerable: !0,
72
96
  configurable: !0,
73
97
  writable: !0,
74
98
  value: (n) => {
99
+ var s, i;
75
100
  switch (n.next_action) {
76
101
  case "3ds_check": {
77
102
  this.initCheck3DSIframes(n.data.threeds_server_callback_url, n.data.mon_url);
78
103
  break;
79
104
  }
80
105
  case "3ds_challenge": {
81
- this.disposeCheck3DSIframe(), this.startChallenge(n.data.challenge_url, n.data.result_mon_url);
106
+ (s = this.onStartHandler) == null || s.call(this), this.disposeCheck3DSIframe(), this.startChallenge(n.data.challenge_url, n.data.result_mon_url);
82
107
  break;
83
108
  }
84
109
  case "3ds_challenge_decoupled": {
@@ -86,18 +111,18 @@ class Yr {
86
111
  break;
87
112
  }
88
113
  case null: {
89
- this.dispose();
114
+ this.dispose(), (i = this.onFinishHandler) == null || i.call(this);
90
115
  break;
91
116
  }
92
117
  }
93
118
  }
94
- }), this.domContainer = r ?? ze(), this.disposers.push(this.session.onStateChange(this.sessionStateHandle));
119
+ }), this.domContainer = r ?? Ve(), this.disposers.push(this.session.onStateChange(this.sessionStateHandle));
95
120
  }
96
121
  dispose() {
97
122
  this.disposers.forEach((t) => t()), this.check3dsIframeDisposers.forEach((t) => t());
98
123
  }
99
124
  initCheck3DSIframes(t, r) {
100
- const n = ze();
125
+ const n = Ve();
101
126
  n.insertAdjacentHTML("beforeend", `<iframe id="check_3ds_${this.iframeId}" width="0" height="0" style="border:0;visibility: hidden;" src="${t}"></iframe>`);
102
127
  const s = n.querySelector(`#check_3ds_${this.iframeId}`);
103
128
  if (s) {
@@ -116,7 +141,7 @@ class Yr {
116
141
  this.check3dsIframeDisposers.forEach((t) => t()), this.check3dsIframeDisposers = [];
117
142
  }
118
143
  startChallenge(t, r) {
119
- const n = ze(), s = `<iframe id="cha_${this.iframeId}" ${this.domContainer === n ? 'width="100%" height="500" style="border:0; max-width: 800px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);' : 'width="100%" height="100%" style="border:0;'}" src="${t}"></iframe>`;
144
+ const n = Ve(), s = `<iframe id="cha_${this.iframeId}" ${this.domContainer === n ? 'width="100%" height="500" style="border:0; max-width: 800px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);' : 'width="100%" height="100%" style="border:0;'}" src="${t}"></iframe>`;
120
145
  this.domContainer.insertAdjacentHTML("beforeend", this.domContainer === n ? `<div id="cha_${this.iframeId}_wrap" style="background: #fff; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 10000;">${s}</div>` : s);
121
146
  const i = this.domContainer.querySelector(`#cha_${this.iframeId}`), a = this.domContainer.querySelector(`#cha_${this.iframeId}_wrap`);
122
147
  if (!i)
@@ -124,23 +149,23 @@ class Yr {
124
149
  this.disposers.push(() => {
125
150
  i.remove(), a == null || a.remove();
126
151
  });
127
- const o = new Promise((d) => {
152
+ const o = new Promise((f) => {
128
153
  const u = (h) => {
129
- h.source === i.contentWindow && d(h.data);
154
+ h.source === i.contentWindow && f(h.data);
130
155
  };
131
156
  window.addEventListener("message", u), this.disposers.push(() => window.removeEventListener("message", u));
132
- }), l = new Promise((d) => {
157
+ }), l = new Promise((f) => {
133
158
  const u = this.startAuthResultPolling(r, (h) => {
134
- h.event === "AuthResultReady" && (u(), d({
159
+ h.event === "AuthResultReady" && (u(), f({
135
160
  requestor_trans_id: h.threeDSRequestorTransID,
136
161
  event: h.event
137
162
  }));
138
163
  });
139
164
  });
140
- Promise.any([o, l]).then((d) => {
165
+ Promise.any([o, l]).then((f) => {
141
166
  this.session.completeAction({
142
167
  action: "3ds_challenge",
143
- result: d
168
+ result: f
144
169
  });
145
170
  });
146
171
  }
@@ -154,17 +179,17 @@ class Yr {
154
179
  });
155
180
  }
156
181
  startAuthResultPolling(t, r) {
157
- return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => nt(n)).then((n) => {
182
+ return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => be(n)).then((n) => {
158
183
  this.startAuthResultPolling(t, r), r(n);
159
184
  }).catch(() => {
160
185
  }), Jr), () => window.clearTimeout(this.resultPollingTimer);
161
186
  }
162
187
  }
163
- function ze() {
188
+ function Ve() {
164
189
  return document.body;
165
190
  }
166
191
  var Xr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
167
- function Qr(e) {
192
+ function Zr(e) {
168
193
  if (e.__esModule)
169
194
  return e;
170
195
  var t = e.default;
@@ -185,12 +210,12 @@ function Qr(e) {
185
210
  });
186
211
  }), r;
187
212
  }
188
- var Xt = {}, _e = {}, W = {};
213
+ var Xt = {}, ye = {}, W = {};
189
214
  Object.defineProperty(W, "__esModule", {
190
215
  value: !0
191
216
  });
192
217
  W.makeRequestWithoutElementsPayloadCheck = W.makeRequestWithElementsPayloadCheck = void 0;
193
- function Zr(e) {
218
+ function Qr(e) {
194
219
  function t() {
195
220
  var r = Reflect.construct(e, Array.from(arguments));
196
221
  return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
@@ -204,7 +229,7 @@ function Zr(e) {
204
229
  }
205
230
  }), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
206
231
  }
207
- class Qt extends Zr(Error) {
232
+ class Zt extends Qr(Error) {
208
233
  constructor(t) {
209
234
  super(t), this.name = "NoElementsError";
210
235
  }
@@ -213,44 +238,44 @@ const en = (e, t, r, n, s = {}) => {
213
238
  if (e != null && e.hasElement(n))
214
239
  return e.client[t](r, n, s);
215
240
  let i = "Elements not initialized.";
216
- throw e && (i = "Element not found in payload."), new Qt(`${i} Use a regular HTTP client if no elements are needed.`);
241
+ throw e && (i = "Element not found in payload."), new Zt(`${i} Use a regular HTTP client if no elements are needed.`);
217
242
  };
218
243
  W.makeRequestWithElementsPayloadCheck = en;
219
244
  const tn = (e, t, r, n = {}) => {
220
245
  if (e)
221
246
  return e.client[t](r, n);
222
- throw new Qt("Elements not initialized. Use a regular HTTP client if no elements are needed.");
247
+ throw new Zt("Elements not initialized. Use a regular HTTP client if no elements are needed.");
223
248
  };
224
249
  W.makeRequestWithoutElementsPayloadCheck = tn;
225
- var Zt = {}, ye = {}, O = {}, b = {};
226
- Object.defineProperty(b, "__esModule", {
250
+ var Qt = {}, ge = {}, S = {}, E = {};
251
+ Object.defineProperty(E, "__esModule", {
227
252
  value: !0
228
253
  });
229
- b.USER_AGENT_HEADER = b.USER_AGENT_CLIENT = b.MERGE_CONTENT_TYPE = b.DEFAULT_ELEMENTS_BASE_URL = b.DEFAULT_BASE_URL = b.CONTENT_TYPE_HEADER = b.CLIENT_USER_AGENT_HEADER = b.CLIENT_BASE_PATHS = b.BT_TRANSACTION_ID_HEADER = b.BT_TRACE_ID_HEADER = b.BT_IDEMPOTENCY_KEY_HEADER = b.BT_EXPOSE_PROXY_RESPONSE_HEADER = b.BROWSER_LIST = b.API_KEY_HEADER = void 0;
254
+ E.USER_AGENT_HEADER = E.USER_AGENT_CLIENT = E.MERGE_CONTENT_TYPE = E.DEFAULT_ELEMENTS_BASE_URL = E.DEFAULT_BASE_URL = E.CONTENT_TYPE_HEADER = E.CLIENT_USER_AGENT_HEADER = E.CLIENT_BASE_PATHS = E.BT_TRANSACTION_ID_HEADER = E.BT_TRACE_ID_HEADER = E.BT_IDEMPOTENCY_KEY_HEADER = E.BT_EXPOSE_PROXY_RESPONSE_HEADER = E.BROWSER_LIST = E.API_KEY_HEADER = void 0;
230
255
  const rn = "BT-API-KEY";
231
- b.API_KEY_HEADER = rn;
256
+ E.API_KEY_HEADER = rn;
232
257
  const nn = "bt-trace-id";
233
- b.BT_TRACE_ID_HEADER = nn;
258
+ E.BT_TRACE_ID_HEADER = nn;
234
259
  const sn = "bt-idempotency-key";
235
- b.BT_IDEMPOTENCY_KEY_HEADER = sn;
260
+ E.BT_IDEMPOTENCY_KEY_HEADER = sn;
236
261
  const an = "BT-EXPOSE-RAW-PROXY-RESPONSE";
237
- b.BT_EXPOSE_PROXY_RESPONSE_HEADER = an;
262
+ E.BT_EXPOSE_PROXY_RESPONSE_HEADER = an;
238
263
  const on = "BT-TRANSACTION-ID";
239
- b.BT_TRANSACTION_ID_HEADER = on;
264
+ E.BT_TRANSACTION_ID_HEADER = on;
240
265
  const un = "Content-Type";
241
- b.CONTENT_TYPE_HEADER = un;
266
+ E.CONTENT_TYPE_HEADER = un;
242
267
  const cn = "application/merge-patch+json";
243
- b.MERGE_CONTENT_TYPE = cn;
268
+ E.MERGE_CONTENT_TYPE = cn;
244
269
  const ln = "User-Agent";
245
- b.USER_AGENT_HEADER = ln;
270
+ E.USER_AGENT_HEADER = ln;
246
271
  const dn = "BT-CLIENT-USER-AGENT";
247
- b.CLIENT_USER_AGENT_HEADER = dn;
272
+ E.CLIENT_USER_AGENT_HEADER = dn;
248
273
  const fn = "BasisTheoryJS";
249
- b.USER_AGENT_CLIENT = fn;
274
+ E.USER_AGENT_CLIENT = fn;
250
275
  const hn = "https://api.basistheory.com";
251
- b.DEFAULT_BASE_URL = hn;
276
+ E.DEFAULT_BASE_URL = hn;
252
277
  const pn = "https://js.basistheory.com/hosted-elements";
253
- b.DEFAULT_ELEMENTS_BASE_URL = pn;
278
+ E.DEFAULT_ELEMENTS_BASE_URL = pn;
254
279
  const mn = {
255
280
  tokens: "tokens",
256
281
  tokenize: "tokenize",
@@ -265,8 +290,8 @@ const mn = {
265
290
  sessions: "sessions",
266
291
  transactions: "transactions"
267
292
  };
268
- b.CLIENT_BASE_PATHS = mn;
269
- const En = [{
293
+ E.CLIENT_BASE_PATHS = mn;
294
+ const bn = [{
270
295
  browserName: "Firefox",
271
296
  browserUA: "Firefox"
272
297
  }, {
@@ -294,17 +319,17 @@ const En = [{
294
319
  browserName: "Safari",
295
320
  browserUA: "Safari"
296
321
  }];
297
- b.BROWSER_LIST = En;
322
+ E.BROWSER_LIST = bn;
298
323
  var p = {};
299
324
  function er(e, t) {
300
325
  return function() {
301
326
  return e.apply(t, arguments);
302
327
  };
303
328
  }
304
- const { toString: bn } = Object.prototype, { getPrototypeOf: ft } = Object, ge = /* @__PURE__ */ ((e) => (t) => {
305
- const r = bn.call(t);
329
+ const { toString: En } = Object.prototype, { getPrototypeOf: ft } = Object, Te = /* @__PURE__ */ ((e) => (t) => {
330
+ const r = En.call(t);
306
331
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
307
- })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ge(t) === e), Te = (e) => (t) => typeof t === e, { isArray: J } = Array, ee = Te("undefined");
332
+ })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => Te(t) === e), Re = (e) => (t) => typeof t === e, { isArray: J } = Array, ee = Re("undefined");
308
333
  function _n(e) {
309
334
  return e !== null && !ee(e) && e.constructor !== null && !ee(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
310
335
  }
@@ -313,14 +338,14 @@ function yn(e) {
313
338
  let t;
314
339
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tr(e.buffer), t;
315
340
  }
316
- const gn = Te("string"), P = Te("function"), rr = Te("number"), Re = (e) => e !== null && typeof e == "object", Tn = (e) => e === !0 || e === !1, he = (e) => {
317
- if (ge(e) !== "object")
341
+ const gn = Re("string"), P = Re("function"), rr = Re("number"), we = (e) => e !== null && typeof e == "object", Tn = (e) => e === !0 || e === !1, he = (e) => {
342
+ if (Te(e) !== "object")
318
343
  return !1;
319
344
  const t = ft(e);
320
345
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
321
- }, Rn = x("Date"), wn = x("File"), Sn = x("Blob"), vn = x("FileList"), On = (e) => Re(e) && P(e.pipe), Cn = (e) => {
346
+ }, Rn = x("Date"), wn = x("File"), vn = x("Blob"), On = x("FileList"), Sn = (e) => we(e) && P(e.pipe), Cn = (e) => {
322
347
  let t;
323
- return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ge(e)) === "formdata" || // detect form-data instance
348
+ return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Te(e)) === "formdata" || // detect form-data instance
324
349
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
325
350
  }, Pn = x("URLSearchParams"), An = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
326
351
  function te(e, t, { allOwnKeys: r = !1 } = {}) {
@@ -436,10 +461,10 @@ const Bn = (e, t, r, { allOwnKeys: n } = {}) => (te(t, (s, i) => {
436
461
  };
437
462
  return J(e) ? n(e) : n(String(e).split(t)), r;
438
463
  }, zn = () => {
439
- }, Vn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Ve = "abcdefghijklmnopqrstuvwxyz", Pt = "0123456789", or = {
464
+ }, Vn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Ge = "abcdefghijklmnopqrstuvwxyz", Pt = "0123456789", or = {
440
465
  DIGIT: Pt,
441
- ALPHA: Ve,
442
- ALPHA_DIGIT: Ve + Ve.toUpperCase() + Pt
466
+ ALPHA: Ge,
467
+ ALPHA_DIGIT: Ge + Ge.toUpperCase() + Pt
443
468
  }, Gn = (e = 16, t = or.ALPHA_DIGIT) => {
444
469
  let r = "";
445
470
  const { length: n } = t;
@@ -452,7 +477,7 @@ function Wn(e) {
452
477
  }
453
478
  const Kn = (e) => {
454
479
  const t = new Array(10), r = (n, s) => {
455
- if (Re(n)) {
480
+ if (we(n)) {
456
481
  if (t.indexOf(n) >= 0)
457
482
  return;
458
483
  if (!("toJSON" in n)) {
@@ -467,7 +492,7 @@ const Kn = (e) => {
467
492
  return n;
468
493
  };
469
494
  return r(e, 0);
470
- }, Jn = x("AsyncFunction"), Yn = (e) => e && (Re(e) || P(e)) && P(e.then) && P(e.catch);
495
+ }, Jn = x("AsyncFunction"), Yn = (e) => e && (we(e) || P(e)) && P(e.then) && P(e.catch);
471
496
  var c = {
472
497
  isArray: J,
473
498
  isArrayBuffer: tr,
@@ -477,18 +502,18 @@ var c = {
477
502
  isString: gn,
478
503
  isNumber: rr,
479
504
  isBoolean: Tn,
480
- isObject: Re,
505
+ isObject: we,
481
506
  isPlainObject: he,
482
507
  isUndefined: ee,
483
508
  isDate: Rn,
484
509
  isFile: wn,
485
- isBlob: Sn,
510
+ isBlob: vn,
486
511
  isRegExp: qn,
487
512
  isFunction: P,
488
- isStream: On,
513
+ isStream: Sn,
489
514
  isURLSearchParams: Pn,
490
515
  isTypedArray: Mn,
491
- isFileList: vn,
516
+ isFileList: On,
492
517
  forEach: te,
493
518
  merge: st,
494
519
  extend: Bn,
@@ -496,7 +521,7 @@ var c = {
496
521
  stripBOM: jn,
497
522
  inherits: Nn,
498
523
  toFlatObject: xn,
499
- kindOf: ge,
524
+ kindOf: Te,
500
525
  kindOfTest: x,
501
526
  endsWith: Ln,
502
527
  toArray: Dn,
@@ -522,10 +547,10 @@ var c = {
522
547
  isAsyncFn: Jn,
523
548
  isThenable: Yn
524
549
  };
525
- function E(e, t, r, n, s) {
550
+ function b(e, t, r, n, s) {
526
551
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s);
527
552
  }
528
- c.inherits(E, Error, {
553
+ c.inherits(b, Error, {
529
554
  toJSON: function() {
530
555
  return {
531
556
  // Standard
@@ -546,7 +571,7 @@ c.inherits(E, Error, {
546
571
  };
547
572
  }
548
573
  });
549
- const ur = E.prototype, cr = {};
574
+ const ur = b.prototype, cr = {};
550
575
  [
551
576
  "ERR_BAD_OPTION_VALUE",
552
577
  "ERR_BAD_OPTION",
@@ -564,13 +589,13 @@ const ur = E.prototype, cr = {};
564
589
  ].forEach((e) => {
565
590
  cr[e] = { value: e };
566
591
  });
567
- Object.defineProperties(E, cr);
592
+ Object.defineProperties(b, cr);
568
593
  Object.defineProperty(ur, "isAxiosError", { value: !0 });
569
- E.from = (e, t, r, n, s, i) => {
594
+ b.from = (e, t, r, n, s, i) => {
570
595
  const a = Object.create(ur);
571
596
  return c.toFlatObject(e, a, function(l) {
572
597
  return l !== Error.prototype;
573
- }, (o) => o !== "isAxiosError"), E.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
598
+ }, (o) => o !== "isAxiosError"), b.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
574
599
  };
575
600
  var Xn = null;
576
601
  function it(e) {
@@ -584,73 +609,73 @@ function At(e, t, r) {
584
609
  return s = lr(s), !r && i ? "[" + s + "]" : s;
585
610
  }).join(r ? "." : "") : t;
586
611
  }
587
- function Qn(e) {
612
+ function Zn(e) {
588
613
  return c.isArray(e) && !e.some(it);
589
614
  }
590
- const Zn = c.toFlatObject(c, {}, null, function(t) {
615
+ const Qn = c.toFlatObject(c, {}, null, function(t) {
591
616
  return /^is[A-Z]/.test(t);
592
617
  });
593
- function we(e, t, r) {
618
+ function ve(e, t, r) {
594
619
  if (!c.isObject(e))
595
620
  throw new TypeError("target must be an object");
596
621
  t = t || new FormData(), r = c.toFlatObject(r, {
597
622
  metaTokens: !0,
598
623
  dots: !1,
599
624
  indexes: !1
600
- }, !1, function(m, S) {
601
- return !c.isUndefined(S[m]);
625
+ }, !1, function(m, v) {
626
+ return !c.isUndefined(v[m]);
602
627
  });
603
628
  const n = r.metaTokens, s = r.visitor || u, i = r.dots, a = r.indexes, l = (r.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
604
629
  if (!c.isFunction(s))
605
630
  throw new TypeError("visitor must be a function");
606
- function d(f) {
607
- if (f === null)
631
+ function f(d) {
632
+ if (d === null)
608
633
  return "";
609
- if (c.isDate(f))
610
- return f.toISOString();
611
- if (!l && c.isBlob(f))
612
- throw new E("Blob is not supported. Use a Buffer instead.");
613
- return c.isArrayBuffer(f) || c.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
614
- }
615
- function u(f, m, S) {
616
- let D = f;
617
- if (f && !S && typeof f == "object") {
634
+ if (c.isDate(d))
635
+ return d.toISOString();
636
+ if (!l && c.isBlob(d))
637
+ throw new b("Blob is not supported. Use a Buffer instead.");
638
+ return c.isArrayBuffer(d) || c.isTypedArray(d) ? l && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
639
+ }
640
+ function u(d, m, v) {
641
+ let D = d;
642
+ if (d && !v && typeof d == "object") {
618
643
  if (c.endsWith(m, "{}"))
619
- m = n ? m : m.slice(0, -2), f = JSON.stringify(f);
620
- else if (c.isArray(f) && Qn(f) || (c.isFileList(f) || c.endsWith(m, "[]")) && (D = c.toArray(f)))
644
+ m = n ? m : m.slice(0, -2), d = JSON.stringify(d);
645
+ else if (c.isArray(d) && Zn(d) || (c.isFileList(d) || c.endsWith(m, "[]")) && (D = c.toArray(d)))
621
646
  return m = lr(m), D.forEach(function(ae, Kr) {
622
647
  !(c.isUndefined(ae) || ae === null) && t.append(
623
648
  // eslint-disable-next-line no-nested-ternary
624
649
  a === !0 ? At([m], Kr, i) : a === null ? m : m + "[]",
625
- d(ae)
650
+ f(ae)
626
651
  );
627
652
  }), !1;
628
653
  }
629
- return it(f) ? !0 : (t.append(At(S, m, i), d(f)), !1);
654
+ return it(d) ? !0 : (t.append(At(v, m, i), f(d)), !1);
630
655
  }
631
- const h = [], _ = Object.assign(Zn, {
656
+ const h = [], _ = Object.assign(Qn, {
632
657
  defaultVisitor: u,
633
- convertValue: d,
658
+ convertValue: f,
634
659
  isVisitable: it
635
660
  });
636
- function w(f, m) {
637
- if (!c.isUndefined(f)) {
638
- if (h.indexOf(f) !== -1)
661
+ function R(d, m) {
662
+ if (!c.isUndefined(d)) {
663
+ if (h.indexOf(d) !== -1)
639
664
  throw Error("Circular reference detected in " + m.join("."));
640
- h.push(f), c.forEach(f, function(D, A) {
665
+ h.push(d), c.forEach(d, function(D, A) {
641
666
  (!(c.isUndefined(D) || D === null) && s.call(
642
667
  t,
643
668
  D,
644
669
  c.isString(A) ? A.trim() : A,
645
670
  m,
646
671
  _
647
- )) === !0 && w(D, m ? m.concat(A) : [A]);
672
+ )) === !0 && R(D, m ? m.concat(A) : [A]);
648
673
  }), h.pop();
649
674
  }
650
675
  }
651
676
  if (!c.isObject(e))
652
677
  throw new TypeError("data must be an object");
653
- return w(e), t;
678
+ return R(e), t;
654
679
  }
655
680
  function Bt(e) {
656
681
  const t = {
@@ -667,7 +692,7 @@ function Bt(e) {
667
692
  });
668
693
  }
669
694
  function ht(e, t) {
670
- this._pairs = [], e && we(e, this, t);
695
+ this._pairs = [], e && ve(e, this, t);
671
696
  }
672
697
  const dr = ht.prototype;
673
698
  dr.append = function(t, r) {
@@ -774,7 +799,7 @@ var us = /* @__PURE__ */ Object.freeze({
774
799
  ...is
775
800
  };
776
801
  function cs(e, t) {
777
- return we(e, new j.classes.URLSearchParams(), Object.assign({
802
+ return ve(e, new j.classes.URLSearchParams(), Object.assign({
778
803
  visitor: function(r, n, s, i) {
779
804
  return j.isNode && c.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
780
805
  }
@@ -835,7 +860,7 @@ const pt = {
835
860
  return cs(t, this.formSerializer).toString();
836
861
  if ((o = c.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
837
862
  const l = this.env && this.env.FormData;
838
- return we(
863
+ return ve(
839
864
  o ? { "files[]": t } : t,
840
865
  l && new l(),
841
866
  this.formSerializer
@@ -852,7 +877,7 @@ const pt = {
852
877
  return JSON.parse(t);
853
878
  } catch (o) {
854
879
  if (a)
855
- throw o.name === "SyntaxError" ? E.from(o, E.ERR_BAD_RESPONSE, this, null, this.response) : o;
880
+ throw o.name === "SyntaxError" ? b.from(o, b.ERR_BAD_RESPONSE, this, null, this.response) : o;
856
881
  }
857
882
  }
858
883
  return t;
@@ -925,8 +950,8 @@ function ms(e) {
925
950
  t[n[1]] = n[2];
926
951
  return t;
927
952
  }
928
- const Es = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
929
- function Ge(e, t, r, n, s) {
953
+ const bs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
954
+ function We(e, t, r, n, s) {
930
955
  if (c.isFunction(n))
931
956
  return n.call(this, t, r);
932
957
  if (s && (t = r), !!c.isString(t)) {
@@ -936,7 +961,7 @@ function Ge(e, t, r, n, s) {
936
961
  return n.test(t);
937
962
  }
938
963
  }
939
- function bs(e) {
964
+ function Es(e) {
940
965
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
941
966
  }
942
967
  function _s(e, t) {
@@ -950,21 +975,21 @@ function _s(e, t) {
950
975
  });
951
976
  });
952
977
  }
953
- class Se {
978
+ class Oe {
954
979
  constructor(t) {
955
980
  t && this.set(t);
956
981
  }
957
982
  set(t, r, n) {
958
983
  const s = this;
959
- function i(o, l, d) {
984
+ function i(o, l, f) {
960
985
  const u = Y(l);
961
986
  if (!u)
962
987
  throw new Error("header name must be a non-empty string");
963
988
  const h = c.findKey(s, u);
964
- (!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || l] = pe(o));
989
+ (!h || s[h] === void 0 || f === !0 || f === void 0 && s[h] !== !1) && (s[h || l] = pe(o));
965
990
  }
966
- const a = (o, l) => c.forEach(o, (d, u) => i(d, u, l));
967
- return c.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : c.isString(t) && (t = t.trim()) && !Es(t) ? a(ps(t), r) : t != null && i(r, t, n), this;
991
+ const a = (o, l) => c.forEach(o, (f, u) => i(f, u, l));
992
+ return c.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : c.isString(t) && (t = t.trim()) && !bs(t) ? a(ps(t), r) : t != null && i(r, t, n), this;
968
993
  }
969
994
  get(t, r) {
970
995
  if (t = Y(t), t) {
@@ -986,7 +1011,7 @@ class Se {
986
1011
  has(t, r) {
987
1012
  if (t = Y(t), t) {
988
1013
  const n = c.findKey(this, t);
989
- return !!(n && this[n] !== void 0 && (!r || Ge(this, this[n], n, r)));
1014
+ return !!(n && this[n] !== void 0 && (!r || We(this, this[n], n, r)));
990
1015
  }
991
1016
  return !1;
992
1017
  }
@@ -996,7 +1021,7 @@ class Se {
996
1021
  function i(a) {
997
1022
  if (a = Y(a), a) {
998
1023
  const o = c.findKey(n, a);
999
- o && (!r || Ge(n, n[o], o, r)) && (delete n[o], s = !0);
1024
+ o && (!r || We(n, n[o], o, r)) && (delete n[o], s = !0);
1000
1025
  }
1001
1026
  }
1002
1027
  return c.isArray(t) ? t.forEach(i) : i(t), s;
@@ -1006,7 +1031,7 @@ class Se {
1006
1031
  let n = r.length, s = !1;
1007
1032
  for (; n--; ) {
1008
1033
  const i = r[n];
1009
- (!t || Ge(this, this[i], i, t, !0)) && (delete this[i], s = !0);
1034
+ (!t || We(this, this[i], i, t, !0)) && (delete this[i], s = !0);
1010
1035
  }
1011
1036
  return s;
1012
1037
  }
@@ -1018,7 +1043,7 @@ class Se {
1018
1043
  r[a] = pe(s), delete r[i];
1019
1044
  return;
1020
1045
  }
1021
- const o = t ? bs(i) : String(i).trim();
1046
+ const o = t ? Es(i) : String(i).trim();
1022
1047
  o !== i && delete r[i], r[o] = pe(s), n[o] = !0;
1023
1048
  }), this;
1024
1049
  }
@@ -1059,8 +1084,8 @@ class Se {
1059
1084
  return c.isArray(t) ? t.forEach(i) : i(t), this;
1060
1085
  }
1061
1086
  }
1062
- Se.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1063
- c.reduceDescriptors(Se.prototype, ({ value: e }, t) => {
1087
+ Oe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1088
+ c.reduceDescriptors(Oe.prototype, ({ value: e }, t) => {
1064
1089
  let r = t[0].toUpperCase() + t.slice(1);
1065
1090
  return {
1066
1091
  get: () => e,
@@ -1069,29 +1094,29 @@ c.reduceDescriptors(Se.prototype, ({ value: e }, t) => {
1069
1094
  }
1070
1095
  };
1071
1096
  });
1072
- c.freezeMethods(Se);
1073
- var I = Se;
1074
- function We(e, t) {
1097
+ c.freezeMethods(Oe);
1098
+ var I = Oe;
1099
+ function Ke(e, t) {
1075
1100
  const r = this || mt, n = t || r, s = I.from(n.headers);
1076
1101
  let i = n.data;
1077
1102
  return c.forEach(e, function(o) {
1078
1103
  i = o.call(r, i, s.normalize(), t ? t.status : void 0);
1079
1104
  }), s.normalize(), i;
1080
1105
  }
1081
- function Er(e) {
1106
+ function br(e) {
1082
1107
  return !!(e && e.__CANCEL__);
1083
1108
  }
1084
1109
  function re(e, t, r) {
1085
- E.call(this, e ?? "canceled", E.ERR_CANCELED, t, r), this.name = "CanceledError";
1110
+ b.call(this, e ?? "canceled", b.ERR_CANCELED, t, r), this.name = "CanceledError";
1086
1111
  }
1087
- c.inherits(re, E, {
1112
+ c.inherits(re, b, {
1088
1113
  __CANCEL__: !0
1089
1114
  });
1090
1115
  function ys(e, t, r) {
1091
1116
  const n = r.config.validateStatus;
1092
- !r.status || !n || n(r.status) ? e(r) : t(new E(
1117
+ !r.status || !n || n(r.status) ? e(r) : t(new b(
1093
1118
  "Request failed with status code " + r.status,
1094
- [E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1119
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1095
1120
  r.config,
1096
1121
  r.request,
1097
1122
  r
@@ -1134,7 +1159,7 @@ function Ts(e) {
1134
1159
  function Rs(e, t) {
1135
1160
  return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
1136
1161
  }
1137
- function br(e, t) {
1162
+ function Er(e, t) {
1138
1163
  return e && !Ts(t) ? Rs(e, t) : t;
1139
1164
  }
1140
1165
  var ws = j.hasStandardBrowserEnv ? (
@@ -1169,31 +1194,31 @@ var ws = j.hasStandardBrowserEnv ? (
1169
1194
  };
1170
1195
  }()
1171
1196
  );
1172
- function Ss(e) {
1197
+ function vs(e) {
1173
1198
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1174
1199
  return t && t[1] || "";
1175
1200
  }
1176
- function vs(e, t) {
1201
+ function Os(e, t) {
1177
1202
  e = e || 10;
1178
1203
  const r = new Array(e), n = new Array(e);
1179
1204
  let s = 0, i = 0, a;
1180
1205
  return t = t !== void 0 ? t : 1e3, function(l) {
1181
- const d = Date.now(), u = n[i];
1182
- a || (a = d), r[s] = l, n[s] = d;
1206
+ const f = Date.now(), u = n[i];
1207
+ a || (a = f), r[s] = l, n[s] = f;
1183
1208
  let h = i, _ = 0;
1184
1209
  for (; h !== s; )
1185
1210
  _ += r[h++], h = h % e;
1186
- if (s = (s + 1) % e, s === i && (i = (i + 1) % e), d - a < t)
1211
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), f - a < t)
1187
1212
  return;
1188
- const w = u && d - u;
1189
- return w ? Math.round(_ * 1e3 / w) : void 0;
1213
+ const R = u && f - u;
1214
+ return R ? Math.round(_ * 1e3 / R) : void 0;
1190
1215
  };
1191
1216
  }
1192
1217
  function xt(e, t) {
1193
1218
  let r = 0;
1194
- const n = vs(50, 250);
1219
+ const n = Os(50, 250);
1195
1220
  return (s) => {
1196
- const i = s.loaded, a = s.lengthComputable ? s.total : void 0, o = i - r, l = n(o), d = i <= a;
1221
+ const i = s.loaded, a = s.lengthComputable ? s.total : void 0, o = i - r, l = n(o), f = i <= a;
1197
1222
  r = i;
1198
1223
  const u = {
1199
1224
  loaded: i,
@@ -1201,14 +1226,14 @@ function xt(e, t) {
1201
1226
  progress: a ? i / a : void 0,
1202
1227
  bytes: o,
1203
1228
  rate: l || void 0,
1204
- estimated: l && a && d ? (a - i) / l : void 0,
1229
+ estimated: l && a && f ? (a - i) / l : void 0,
1205
1230
  event: s
1206
1231
  };
1207
1232
  u[t ? "download" : "upload"] = !0, e(u);
1208
1233
  };
1209
1234
  }
1210
- const Os = typeof XMLHttpRequest < "u";
1211
- var Cs = Os && function(e) {
1235
+ const Ss = typeof XMLHttpRequest < "u";
1236
+ var Cs = Ss && function(e) {
1212
1237
  return new Promise(function(r, n) {
1213
1238
  let s = e.data;
1214
1239
  const i = I.from(e.headers).normalize(), a = e.responseType;
@@ -1216,32 +1241,32 @@ var Cs = Os && function(e) {
1216
1241
  function l() {
1217
1242
  e.cancelToken && e.cancelToken.unsubscribe(o), e.signal && e.signal.removeEventListener("abort", o);
1218
1243
  }
1219
- let d;
1244
+ let f;
1220
1245
  if (c.isFormData(s)) {
1221
1246
  if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
1222
1247
  i.setContentType(!1);
1223
- else if ((d = i.getContentType()) !== !1) {
1224
- const [f, ...m] = d ? d.split(";").map((S) => S.trim()).filter(Boolean) : [];
1225
- i.setContentType([f || "multipart/form-data", ...m].join("; "));
1248
+ else if ((f = i.getContentType()) !== !1) {
1249
+ const [d, ...m] = f ? f.split(";").map((v) => v.trim()).filter(Boolean) : [];
1250
+ i.setContentType([d || "multipart/form-data", ...m].join("; "));
1226
1251
  }
1227
1252
  }
1228
1253
  let u = new XMLHttpRequest();
1229
1254
  if (e.auth) {
1230
- const f = e.auth.username || "", m = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1231
- i.set("Authorization", "Basic " + btoa(f + ":" + m));
1255
+ const d = e.auth.username || "", m = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1256
+ i.set("Authorization", "Basic " + btoa(d + ":" + m));
1232
1257
  }
1233
- const h = br(e.baseURL, e.url);
1258
+ const h = Er(e.baseURL, e.url);
1234
1259
  u.open(e.method.toUpperCase(), fr(h, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
1235
1260
  function _() {
1236
1261
  if (!u)
1237
1262
  return;
1238
- const f = I.from(
1263
+ const d = I.from(
1239
1264
  "getAllResponseHeaders" in u && u.getAllResponseHeaders()
1240
- ), S = {
1265
+ ), v = {
1241
1266
  data: !a || a === "text" || a === "json" ? u.responseText : u.response,
1242
1267
  status: u.status,
1243
1268
  statusText: u.statusText,
1244
- headers: f,
1269
+ headers: d,
1245
1270
  config: e,
1246
1271
  request: u
1247
1272
  };
@@ -1249,35 +1274,35 @@ var Cs = Os && function(e) {
1249
1274
  r(A), l();
1250
1275
  }, function(A) {
1251
1276
  n(A), l();
1252
- }, S), u = null;
1277
+ }, v), u = null;
1253
1278
  }
1254
1279
  if ("onloadend" in u ? u.onloadend = _ : u.onreadystatechange = function() {
1255
1280
  !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(_);
1256
1281
  }, u.onabort = function() {
1257
- u && (n(new E("Request aborted", E.ECONNABORTED, e, u)), u = null);
1282
+ u && (n(new b("Request aborted", b.ECONNABORTED, e, u)), u = null);
1258
1283
  }, u.onerror = function() {
1259
- n(new E("Network Error", E.ERR_NETWORK, e, u)), u = null;
1284
+ n(new b("Network Error", b.ERR_NETWORK, e, u)), u = null;
1260
1285
  }, u.ontimeout = function() {
1261
1286
  let m = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
1262
- const S = e.transitional || hr;
1263
- e.timeoutErrorMessage && (m = e.timeoutErrorMessage), n(new E(
1287
+ const v = e.transitional || hr;
1288
+ e.timeoutErrorMessage && (m = e.timeoutErrorMessage), n(new b(
1264
1289
  m,
1265
- S.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
1290
+ v.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1266
1291
  e,
1267
1292
  u
1268
1293
  )), u = null;
1269
1294
  }, j.hasStandardBrowserEnv) {
1270
- const f = ws(h) && e.xsrfCookieName && gs.read(e.xsrfCookieName);
1271
- f && i.set(e.xsrfHeaderName, f);
1295
+ const d = ws(h) && e.xsrfCookieName && gs.read(e.xsrfCookieName);
1296
+ d && i.set(e.xsrfHeaderName, d);
1272
1297
  }
1273
- s === void 0 && i.setContentType(null), "setRequestHeader" in u && c.forEach(i.toJSON(), function(m, S) {
1274
- u.setRequestHeader(S, m);
1275
- }), c.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), a && a !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", xt(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", xt(e.onUploadProgress)), (e.cancelToken || e.signal) && (o = (f) => {
1276
- u && (n(!f || f.type ? new re(null, e, u) : f), u.abort(), u = null);
1298
+ s === void 0 && i.setContentType(null), "setRequestHeader" in u && c.forEach(i.toJSON(), function(m, v) {
1299
+ u.setRequestHeader(v, m);
1300
+ }), c.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), a && a !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", xt(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", xt(e.onUploadProgress)), (e.cancelToken || e.signal) && (o = (d) => {
1301
+ u && (n(!d || d.type ? new re(null, e, u) : d), u.abort(), u = null);
1277
1302
  }, e.cancelToken && e.cancelToken.subscribe(o), e.signal && (e.signal.aborted ? o() : e.signal.addEventListener("abort", o)));
1278
- const w = Ss(h);
1279
- if (w && j.protocols.indexOf(w) === -1) {
1280
- n(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
1303
+ const R = vs(h);
1304
+ if (R && j.protocols.indexOf(R) === -1) {
1305
+ n(new b("Unsupported protocol " + R + ":", b.ERR_BAD_REQUEST, e));
1281
1306
  return;
1282
1307
  }
1283
1308
  u.send(s || null);
@@ -1307,7 +1332,7 @@ var _r = {
1307
1332
  r = e[i];
1308
1333
  let a;
1309
1334
  if (n = r, !Ps(r) && (n = at[(a = String(r)).toLowerCase()], n === void 0))
1310
- throw new E(`Unknown adapter '${a}'`);
1335
+ throw new b(`Unknown adapter '${a}'`);
1311
1336
  if (n)
1312
1337
  break;
1313
1338
  s[a || "#" + i] = n;
@@ -1319,7 +1344,7 @@ var _r = {
1319
1344
  let a = t ? i.length > 1 ? `since :
1320
1345
  ` + i.map(Lt).join(`
1321
1346
  `) : " " + Lt(i[0]) : "as no adapter specified";
1322
- throw new E(
1347
+ throw new b(
1323
1348
  "There is no suitable adapter to dispatch the request " + a,
1324
1349
  "ERR_NOT_SUPPORT"
1325
1350
  );
@@ -1328,22 +1353,22 @@ var _r = {
1328
1353
  },
1329
1354
  adapters: at
1330
1355
  };
1331
- function Ke(e) {
1356
+ function Je(e) {
1332
1357
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1333
1358
  throw new re(null, e);
1334
1359
  }
1335
1360
  function Dt(e) {
1336
- return Ke(e), e.headers = I.from(e.headers), e.data = We.call(
1361
+ return Je(e), e.headers = I.from(e.headers), e.data = Ke.call(
1337
1362
  e,
1338
1363
  e.transformRequest
1339
1364
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), _r.getAdapter(e.adapter || mt.adapter)(e).then(function(n) {
1340
- return Ke(e), n.data = We.call(
1365
+ return Je(e), n.data = Ke.call(
1341
1366
  e,
1342
1367
  e.transformResponse,
1343
1368
  n
1344
1369
  ), n.headers = I.from(n.headers), n;
1345
1370
  }, function(n) {
1346
- return Er(n) || (Ke(e), n && n.response && (n.response.data = We.call(
1371
+ return br(n) || (Je(e), n && n.response && (n.response.data = Ke.call(
1347
1372
  e,
1348
1373
  e.transformResponse,
1349
1374
  n.response
@@ -1354,32 +1379,32 @@ const Mt = (e) => e instanceof I ? e.toJSON() : e;
1354
1379
  function K(e, t) {
1355
1380
  t = t || {};
1356
1381
  const r = {};
1357
- function n(d, u, h) {
1358
- return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless: h }, d, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1382
+ function n(f, u, h) {
1383
+ return c.isPlainObject(f) && c.isPlainObject(u) ? c.merge.call({ caseless: h }, f, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1359
1384
  }
1360
- function s(d, u, h) {
1385
+ function s(f, u, h) {
1361
1386
  if (c.isUndefined(u)) {
1362
- if (!c.isUndefined(d))
1363
- return n(void 0, d, h);
1387
+ if (!c.isUndefined(f))
1388
+ return n(void 0, f, h);
1364
1389
  } else
1365
- return n(d, u, h);
1390
+ return n(f, u, h);
1366
1391
  }
1367
- function i(d, u) {
1392
+ function i(f, u) {
1368
1393
  if (!c.isUndefined(u))
1369
1394
  return n(void 0, u);
1370
1395
  }
1371
- function a(d, u) {
1396
+ function a(f, u) {
1372
1397
  if (c.isUndefined(u)) {
1373
- if (!c.isUndefined(d))
1374
- return n(void 0, d);
1398
+ if (!c.isUndefined(f))
1399
+ return n(void 0, f);
1375
1400
  } else
1376
1401
  return n(void 0, u);
1377
1402
  }
1378
- function o(d, u, h) {
1403
+ function o(f, u, h) {
1379
1404
  if (h in t)
1380
- return n(d, u);
1405
+ return n(f, u);
1381
1406
  if (h in e)
1382
- return n(void 0, d);
1407
+ return n(void 0, f);
1383
1408
  }
1384
1409
  const l = {
1385
1410
  url: i,
@@ -1409,29 +1434,29 @@ function K(e, t) {
1409
1434
  socketPath: a,
1410
1435
  responseEncoding: a,
1411
1436
  validateStatus: o,
1412
- headers: (d, u) => s(Mt(d), Mt(u), !0)
1437
+ headers: (f, u) => s(Mt(f), Mt(u), !0)
1413
1438
  };
1414
1439
  return c.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
1415
1440
  const h = l[u] || s, _ = h(e[u], t[u], u);
1416
1441
  c.isUndefined(_) && h !== o || (r[u] = _);
1417
1442
  }), r;
1418
1443
  }
1419
- const yr = "1.6.1", Et = {};
1444
+ const yr = "1.6.1", bt = {};
1420
1445
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1421
- Et[e] = function(n) {
1446
+ bt[e] = function(n) {
1422
1447
  return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1423
1448
  };
1424
1449
  });
1425
1450
  const It = {};
1426
- Et.transitional = function(t, r, n) {
1451
+ bt.transitional = function(t, r, n) {
1427
1452
  function s(i, a) {
1428
1453
  return "[Axios v" + yr + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
1429
1454
  }
1430
1455
  return (i, a, o) => {
1431
1456
  if (t === !1)
1432
- throw new E(
1457
+ throw new b(
1433
1458
  s(a, " has been removed" + (r ? " in " + r : "")),
1434
- E.ERR_DEPRECATED
1459
+ b.ERR_DEPRECATED
1435
1460
  );
1436
1461
  return r && !It[a] && (It[a] = !0, console.warn(
1437
1462
  s(
@@ -1443,7 +1468,7 @@ Et.transitional = function(t, r, n) {
1443
1468
  };
1444
1469
  function As(e, t, r) {
1445
1470
  if (typeof e != "object")
1446
- throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
1471
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1447
1472
  const n = Object.keys(e);
1448
1473
  let s = n.length;
1449
1474
  for (; s-- > 0; ) {
@@ -1451,16 +1476,16 @@ function As(e, t, r) {
1451
1476
  if (a) {
1452
1477
  const o = e[i], l = o === void 0 || a(o, i, e);
1453
1478
  if (l !== !0)
1454
- throw new E("option " + i + " must be " + l, E.ERR_BAD_OPTION_VALUE);
1479
+ throw new b("option " + i + " must be " + l, b.ERR_BAD_OPTION_VALUE);
1455
1480
  continue;
1456
1481
  }
1457
1482
  if (r !== !0)
1458
- throw new E("Unknown option " + i, E.ERR_BAD_OPTION);
1483
+ throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
1459
1484
  }
1460
1485
  }
1461
1486
  var ot = {
1462
1487
  assertOptions: As,
1463
- validators: Et
1488
+ validators: bt
1464
1489
  };
1465
1490
  const U = ot.validators;
1466
1491
  class Ee {
@@ -1497,8 +1522,8 @@ class Ee {
1497
1522
  );
1498
1523
  i && c.forEach(
1499
1524
  ["delete", "get", "head", "post", "put", "patch", "common"],
1500
- (f) => {
1501
- delete i[f];
1525
+ (d) => {
1526
+ delete i[d];
1502
1527
  }
1503
1528
  ), r.headers = I.concat(a, i);
1504
1529
  const o = [];
@@ -1506,40 +1531,40 @@ class Ee {
1506
1531
  this.interceptors.request.forEach(function(m) {
1507
1532
  typeof m.runWhen == "function" && m.runWhen(r) === !1 || (l = l && m.synchronous, o.unshift(m.fulfilled, m.rejected));
1508
1533
  });
1509
- const d = [];
1534
+ const f = [];
1510
1535
  this.interceptors.response.forEach(function(m) {
1511
- d.push(m.fulfilled, m.rejected);
1536
+ f.push(m.fulfilled, m.rejected);
1512
1537
  });
1513
1538
  let u, h = 0, _;
1514
1539
  if (!l) {
1515
- const f = [Dt.bind(this), void 0];
1516
- for (f.unshift.apply(f, o), f.push.apply(f, d), _ = f.length, u = Promise.resolve(r); h < _; )
1517
- u = u.then(f[h++], f[h++]);
1540
+ const d = [Dt.bind(this), void 0];
1541
+ for (d.unshift.apply(d, o), d.push.apply(d, f), _ = d.length, u = Promise.resolve(r); h < _; )
1542
+ u = u.then(d[h++], d[h++]);
1518
1543
  return u;
1519
1544
  }
1520
1545
  _ = o.length;
1521
- let w = r;
1546
+ let R = r;
1522
1547
  for (h = 0; h < _; ) {
1523
- const f = o[h++], m = o[h++];
1548
+ const d = o[h++], m = o[h++];
1524
1549
  try {
1525
- w = f(w);
1526
- } catch (S) {
1527
- m.call(this, S);
1550
+ R = d(R);
1551
+ } catch (v) {
1552
+ m.call(this, v);
1528
1553
  break;
1529
1554
  }
1530
1555
  }
1531
1556
  try {
1532
- u = Dt.call(this, w);
1533
- } catch (f) {
1534
- return Promise.reject(f);
1557
+ u = Dt.call(this, R);
1558
+ } catch (d) {
1559
+ return Promise.reject(d);
1535
1560
  }
1536
- for (h = 0, _ = d.length; h < _; )
1537
- u = u.then(d[h++], d[h++]);
1561
+ for (h = 0, _ = f.length; h < _; )
1562
+ u = u.then(f[h++], f[h++]);
1538
1563
  return u;
1539
1564
  }
1540
1565
  getUri(t) {
1541
1566
  t = K(this.defaults, t);
1542
- const r = br(t.baseURL, t.url);
1567
+ const r = Er(t.baseURL, t.url);
1543
1568
  return fr(r, t.params, t.paramsSerializer);
1544
1569
  }
1545
1570
  }
@@ -1568,7 +1593,7 @@ c.forEach(["post", "put", "patch"], function(t) {
1568
1593
  Ee.prototype[t] = r(), Ee.prototype[t + "Form"] = r(!0);
1569
1594
  });
1570
1595
  var me = Ee;
1571
- class bt {
1596
+ class Et {
1572
1597
  constructor(t) {
1573
1598
  if (typeof t != "function")
1574
1599
  throw new TypeError("executor must be a function.");
@@ -1629,14 +1654,14 @@ class bt {
1629
1654
  static source() {
1630
1655
  let t;
1631
1656
  return {
1632
- token: new bt(function(s) {
1657
+ token: new Et(function(s) {
1633
1658
  t = s;
1634
1659
  }),
1635
1660
  cancel: t
1636
1661
  };
1637
1662
  }
1638
1663
  }
1639
- var Bs = bt;
1664
+ var Bs = Et;
1640
1665
  function js(e) {
1641
1666
  return function(r) {
1642
1667
  return e.apply(null, r);
@@ -1724,10 +1749,10 @@ const T = gr(mt);
1724
1749
  T.Axios = me;
1725
1750
  T.CanceledError = re;
1726
1751
  T.CancelToken = Bs;
1727
- T.isCancel = Er;
1752
+ T.isCancel = br;
1728
1753
  T.VERSION = yr;
1729
- T.toFormData = we;
1730
- T.AxiosError = E;
1754
+ T.toFormData = ve;
1755
+ T.AxiosError = b;
1731
1756
  T.Cancel = T.CanceledError;
1732
1757
  T.all = function(t) {
1733
1758
  return Promise.all(t);
@@ -1758,8 +1783,8 @@ const Rr = (e) => typeof e == "object" && e !== null, wr = Symbol("skip"), Ut =
1758
1783
  const l = t(a, o, e);
1759
1784
  if (l === wr)
1760
1785
  continue;
1761
- let [d, u, { shouldRecurse: h = !0 } = {}] = l;
1762
- d !== "__proto__" && (r.deep && h && Ut(u) && (u = Array.isArray(u) ? i(u) : ct(u, t, r, n)), s[d] = u);
1786
+ let [f, u, { shouldRecurse: h = !0 } = {}] = l;
1787
+ f !== "__proto__" && (r.deep && h && Ut(u) && (u = Array.isArray(u) ? i(u) : ct(u, t, r, n)), s[f] = u);
1763
1788
  }
1764
1789
  return s;
1765
1790
  };
@@ -1769,7 +1794,7 @@ _t.exports = (e, t, r) => {
1769
1794
  return ct(e, t, r);
1770
1795
  };
1771
1796
  _t.exports.mapObjectSkip = wr;
1772
- var Sr = _t.exports, yt = { exports: {} };
1797
+ var vr = _t.exports, yt = { exports: {} };
1773
1798
  const Ls = (e) => {
1774
1799
  let t = !1, r = !1, n = !1;
1775
1800
  for (let s = 0; s < e.length; s++) {
@@ -1777,7 +1802,7 @@ const Ls = (e) => {
1777
1802
  t && /[a-zA-Z]/.test(i) && i.toUpperCase() === i ? (e = e.slice(0, s) + "-" + e.slice(s), t = !1, n = r, r = !0, s++) : r && n && /[a-zA-Z]/.test(i) && i.toLowerCase() === i ? (e = e.slice(0, s - 1) + "-" + e.slice(s - 1), n = r, r = !1, t = !0) : (t = i.toLowerCase() === i && i.toUpperCase() !== i, n = r, r = i.toUpperCase() === i && i.toLowerCase() !== i);
1778
1803
  }
1779
1804
  return e;
1780
- }, vr = (e, t) => {
1805
+ }, Or = (e, t) => {
1781
1806
  if (!(typeof e == "string" || Array.isArray(e)))
1782
1807
  throw new TypeError("Expected the input to be `string | string[]`");
1783
1808
  t = Object.assign({
@@ -1786,8 +1811,8 @@ const Ls = (e) => {
1786
1811
  const r = (s) => t.pascalCase ? s.charAt(0).toUpperCase() + s.slice(1) : s;
1787
1812
  return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e = Ls(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (s, i) => i.toUpperCase()).replace(/\d+(\w|$)/g, (s) => s.toUpperCase()), r(e));
1788
1813
  };
1789
- yt.exports = vr;
1790
- yt.exports.default = vr;
1814
+ yt.exports = Or;
1815
+ yt.exports.default = Or;
1791
1816
  var Ds = yt.exports;
1792
1817
  class Ms {
1793
1818
  constructor(t = {}) {
@@ -1849,7 +1874,7 @@ class Ms {
1849
1874
  }
1850
1875
  }
1851
1876
  var Is = Ms;
1852
- const $t = Sr, Us = Ds, $s = Is, Hs = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), Je = new $s({ maxSize: 1e5 }), Ht = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), qt = (e, t) => {
1877
+ const $t = vr, Us = Ds, $s = Is, Hs = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), Ye = new $s({ maxSize: 1e5 }), Ht = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), qt = (e, t) => {
1853
1878
  if (!Ht(e))
1854
1879
  return e;
1855
1880
  t = {
@@ -1857,37 +1882,37 @@ const $t = Sr, Us = Ds, $s = Is, Hs = (e, t) => e.some((r) => typeof r == "strin
1857
1882
  pascalCase: !1,
1858
1883
  ...t
1859
1884
  };
1860
- const { exclude: r, pascalCase: n, stopPaths: s, deep: i } = t, a = new Set(s), o = (l) => (d, u) => {
1885
+ const { exclude: r, pascalCase: n, stopPaths: s, deep: i } = t, a = new Set(s), o = (l) => (f, u) => {
1861
1886
  if (i && Ht(u)) {
1862
- const h = l === void 0 ? d : `${l}.${d}`;
1887
+ const h = l === void 0 ? f : `${l}.${f}`;
1863
1888
  a.has(h) || (u = $t(u, o(h)));
1864
1889
  }
1865
- if (!(r && Hs(r, d))) {
1866
- const h = n ? `${d}_` : d;
1867
- if (Je.has(h))
1868
- d = Je.get(h);
1890
+ if (!(r && Hs(r, f))) {
1891
+ const h = n ? `${f}_` : f;
1892
+ if (Ye.has(h))
1893
+ f = Ye.get(h);
1869
1894
  else {
1870
- const _ = Us(d, { pascalCase: n });
1871
- d.length < 100 && Je.set(h, _), d = _;
1895
+ const _ = Us(f, { pascalCase: n });
1896
+ f.length < 100 && Ye.set(h, _), f = _;
1872
1897
  }
1873
1898
  }
1874
- return [d, u];
1899
+ return [f, u];
1875
1900
  };
1876
1901
  return $t(e, o(void 0));
1877
1902
  };
1878
- var qs = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => qt(e[r], t)) : qt(e, t), Ye, Ft;
1879
- function Or() {
1880
- return Ft || (Ft = 1, Ye = Or()), Ye;
1903
+ var qs = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => qt(e[r], t)) : qt(e, t), Xe, Ft;
1904
+ function Sr() {
1905
+ return Ft || (Ft = 1, Xe = Sr()), Xe;
1881
1906
  }
1882
- var be = function() {
1883
- return be = Object.assign || function(t) {
1907
+ var _e = function() {
1908
+ return _e = Object.assign || function(t) {
1884
1909
  for (var r, n = 1, s = arguments.length; n < s; n++) {
1885
1910
  r = arguments[n];
1886
1911
  for (var i in r)
1887
1912
  Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
1888
1913
  }
1889
1914
  return t;
1890
- }, be.apply(this, arguments);
1915
+ }, _e.apply(this, arguments);
1891
1916
  };
1892
1917
  function Fs(e) {
1893
1918
  return e.toLowerCase();
@@ -1895,11 +1920,11 @@ function Fs(e) {
1895
1920
  var ks = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], zs = /[^A-Z0-9]+/gi;
1896
1921
  function Vs(e, t) {
1897
1922
  t === void 0 && (t = {});
1898
- for (var r = t.splitRegexp, n = r === void 0 ? ks : r, s = t.stripRegexp, i = s === void 0 ? zs : s, a = t.transform, o = a === void 0 ? Fs : a, l = t.delimiter, d = l === void 0 ? " " : l, u = kt(kt(e, n, "$1\0$2"), i, "\0"), h = 0, _ = u.length; u.charAt(h) === "\0"; )
1923
+ for (var r = t.splitRegexp, n = r === void 0 ? ks : r, s = t.stripRegexp, i = s === void 0 ? zs : s, a = t.transform, o = a === void 0 ? Fs : a, l = t.delimiter, f = l === void 0 ? " " : l, u = kt(kt(e, n, "$1\0$2"), i, "\0"), h = 0, _ = u.length; u.charAt(h) === "\0"; )
1899
1924
  h++;
1900
1925
  for (; u.charAt(_ - 1) === "\0"; )
1901
1926
  _--;
1902
- return u.slice(h, _).split("\0").map(o).join(d);
1927
+ return u.slice(h, _).split("\0").map(o).join(f);
1903
1928
  }
1904
1929
  function kt(e, t, r) {
1905
1930
  return t instanceof RegExp ? e.replace(t, r) : t.reduce(function(n, s) {
@@ -1907,18 +1932,18 @@ function kt(e, t, r) {
1907
1932
  }, e);
1908
1933
  }
1909
1934
  function Gs(e, t) {
1910
- return t === void 0 && (t = {}), Vs(e, be({ delimiter: "." }, t));
1935
+ return t === void 0 && (t = {}), Vs(e, _e({ delimiter: "." }, t));
1911
1936
  }
1912
1937
  function Ws(e, t) {
1913
- return t === void 0 && (t = {}), Gs(e, be({ delimiter: "_" }, t));
1938
+ return t === void 0 && (t = {}), Gs(e, _e({ delimiter: "_" }, t));
1914
1939
  }
1915
1940
  const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1916
1941
  __proto__: null,
1917
1942
  snakeCase: Ws
1918
- }, Symbol.toStringTag, { value: "Module" })), Js = /* @__PURE__ */ Qr(Ks);
1919
- var Ys = ei, Xs = /\s/, Qs = /(_|-|\.|:)/, Zs = /([a-z][A-Z]|[A-Z][a-z])/;
1943
+ }, Symbol.toStringTag, { value: "Module" })), Js = /* @__PURE__ */ Zr(Ks);
1944
+ var Ys = ei, Xs = /\s/, Zs = /(_|-|\.|:)/, Qs = /([a-z][A-Z]|[A-Z][a-z])/;
1920
1945
  function ei(e) {
1921
- return Xs.test(e) ? e.toLowerCase() : Qs.test(e) ? (ri(e) || e).toLowerCase() : Zs.test(e) ? si(e).toLowerCase() : e.toLowerCase();
1946
+ return Xs.test(e) ? e.toLowerCase() : Zs.test(e) ? (ri(e) || e).toLowerCase() : Qs.test(e) ? si(e).toLowerCase() : e.toLowerCase();
1922
1947
  }
1923
1948
  var ti = /[\W_]+(.|$)/g;
1924
1949
  function ri(e) {
@@ -1942,7 +1967,7 @@ var ui = ai, ci = li;
1942
1967
  function li(e) {
1943
1968
  return ui(e).replace(/\s/g, "_");
1944
1969
  }
1945
- const di = Sr, fi = ci;
1970
+ const di = vr, fi = ci;
1946
1971
  var hi = function(e, t) {
1947
1972
  return t = Object.assign({ deep: !0, exclude: [] }, t), di(e, function(r, n) {
1948
1973
  return [
@@ -1985,8 +2010,8 @@ Object.defineProperty(p, "__esModule", {
1985
2010
  value: !0
1986
2011
  });
1987
2012
  p.transformTokenResponseCamelCase = p.transformTokenRequestSnakeCase = p.transformResponseCamelCase = p.transformRequestSnakeCase = p.transformReactorResponseCamelCase = p.transformReactorRequestSnakeCase = p.transformProxyResponseCamelCase = p.transformProxyRequestSnakeCase = p.proxyRaw = p.getRuntime = p.getQueryParams = p.getOSVersion = p.getBrowser = p.errorInterceptor = p.dataExtractor = p.dataAndHeadersExtractor = p.createRequestConfig = p.concatResponseTransformerWithDefault = p.concatRequestTransformerWithDefault = p.buildUserAgentString = p.buildClientUserAgentString = p.assertInit = void 0;
1988
- var Cr = ve(Tr), N = ve(qs), zt = ve(Or()), Ei = Js, se = ve(hi), bi = ne, q = b;
1989
- function ve(e) {
2013
+ var Cr = Se(Tr), N = Se(qs), zt = Se(Sr()), bi = Js, se = Se(hi), Ei = ne, q = E;
2014
+ function Se(e) {
1990
2015
  return e && e.__esModule ? e : { default: e };
1991
2016
  }
1992
2017
  const _i = (e) => {
@@ -2043,7 +2068,7 @@ const wi = (e) => {
2043
2068
  };
2044
2069
  };
2045
2070
  p.transformTokenRequestSnakeCase = wi;
2046
- const Tt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, Si = (e) => {
2071
+ const Tt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, vi = (e) => {
2047
2072
  if (!(typeof e > "u"))
2048
2073
  return Tt(e) ? {
2049
2074
  data: e.data.map((n) => ({
@@ -2072,8 +2097,8 @@ const Tt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == n
2072
2097
  } : {}
2073
2098
  };
2074
2099
  };
2075
- p.transformTokenResponseCamelCase = Si;
2076
- const vi = (e) => {
2100
+ p.transformTokenResponseCamelCase = vi;
2101
+ const Oi = (e) => {
2077
2102
  if (!(typeof e > "u"))
2078
2103
  return Tt(e) ? {
2079
2104
  data: e.data.map((n) => ({
@@ -2096,8 +2121,8 @@ const vi = (e) => {
2096
2121
  } : {}
2097
2122
  };
2098
2123
  };
2099
- p.transformReactorResponseCamelCase = vi;
2100
- const Oi = (e) => {
2124
+ p.transformReactorResponseCamelCase = Oi;
2125
+ const Si = (e) => {
2101
2126
  if (!(typeof e > "u"))
2102
2127
  return Tt(e) ? {
2103
2128
  data: e.data.map((n) => ({
@@ -2120,7 +2145,7 @@ const Oi = (e) => {
2120
2145
  } : {}
2121
2146
  };
2122
2147
  };
2123
- p.transformProxyResponseCamelCase = Oi;
2148
+ p.transformProxyResponseCamelCase = Si;
2124
2149
  const Ci = (e) => {
2125
2150
  if (!(typeof e > "u"))
2126
2151
  return (0, N.default)(e, {
@@ -2158,7 +2183,7 @@ const Bi = (e, t) => {
2158
2183
  headers: o
2159
2184
  } = e, l = r ? {
2160
2185
  [q.API_KEY_HEADER]: r
2161
- } : {}, d = n ? {
2186
+ } : {}, f = n ? {
2162
2187
  [q.BT_TRACE_ID_HEADER]: n
2163
2188
  } : {}, u = s ? {
2164
2189
  [q.BT_IDEMPOTENCY_KEY_HEADER]: s
@@ -2168,7 +2193,7 @@ const Bi = (e, t) => {
2168
2193
  return {
2169
2194
  headers: {
2170
2195
  ...l,
2171
- ...d,
2196
+ ...f,
2172
2197
  ...u,
2173
2198
  ...h,
2174
2199
  ...typeof o < "u" && {
@@ -2190,14 +2215,14 @@ p.createRequestConfig = Bi;
2190
2215
  const ji = (e) => {
2191
2216
  var t, r;
2192
2217
  const n = ((t = e.response) === null || t === void 0 ? void 0 : t.status) || -1, s = (r = e.response) === null || r === void 0 ? void 0 : r.data;
2193
- throw new bi.BasisTheoryApiError(e.message, n, s);
2218
+ throw new Ei.BasisTheoryApiError(e.message, n, s);
2194
2219
  };
2195
2220
  p.errorInterceptor = ji;
2196
2221
  const Ni = (e = {}) => {
2197
2222
  const t = Object.keys(e);
2198
2223
  if (t.length) {
2199
2224
  const r = new URLSearchParams(), n = (s, i, a = !1) => {
2200
- const o = typeof i, l = a ? s : (0, Ei.snakeCase)(s);
2225
+ const o = typeof i, l = a ? s : (0, bi.snakeCase)(s);
2201
2226
  (i === null || ["boolean", "number", "string"].includes(o)) && r.append(l, i);
2202
2227
  };
2203
2228
  return t.forEach((s) => {
@@ -2262,11 +2287,11 @@ const Di = (e) => {
2262
2287
  return e && (t.application = e), JSON.stringify((0, se.default)(t));
2263
2288
  };
2264
2289
  p.buildClientUserAgentString = Di;
2265
- var Oe = {};
2266
- Object.defineProperty(Oe, "__esModule", {
2290
+ var Ce = {};
2291
+ Object.defineProperty(Ce, "__esModule", {
2267
2292
  value: !0
2268
2293
  });
2269
- Oe.BasisTheoryValidationError = void 0;
2294
+ Ce.BasisTheoryValidationError = void 0;
2270
2295
  function Mi(e) {
2271
2296
  function t() {
2272
2297
  var r = Reflect.construct(e, Array.from(arguments));
@@ -2286,12 +2311,12 @@ class Rt extends Mi(Error) {
2286
2311
  super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this, Rt.prototype);
2287
2312
  }
2288
2313
  }
2289
- Oe.BasisTheoryValidationError = Rt;
2290
- var Ce = {};
2291
- Object.defineProperty(Ce, "__esModule", {
2314
+ Ce.BasisTheoryValidationError = Rt;
2315
+ var Pe = {};
2316
+ Object.defineProperty(Pe, "__esModule", {
2292
2317
  value: !0
2293
2318
  });
2294
- Ce.HttpClientError = void 0;
2319
+ Pe.HttpClientError = void 0;
2295
2320
  function Ii(e) {
2296
2321
  function t() {
2297
2322
  var r = Reflect.construct(e, Array.from(arguments));
@@ -2311,7 +2336,7 @@ class wt extends Ii(Error) {
2311
2336
  super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this, wt.prototype);
2312
2337
  }
2313
2338
  }
2314
- Ce.HttpClientError = wt;
2339
+ Pe.HttpClientError = wt;
2315
2340
  (function(e) {
2316
2341
  Object.defineProperty(e, "__esModule", {
2317
2342
  value: !0
@@ -2337,7 +2362,7 @@ Ce.HttpClientError = wt;
2337
2362
  return a.HttpClientError;
2338
2363
  }
2339
2364
  });
2340
- var r = b;
2365
+ var r = E;
2341
2366
  Object.keys(r).forEach(function(o) {
2342
2367
  o === "default" || o === "__esModule" || Object.prototype.hasOwnProperty.call(t, o) || o in e && e[o] === r[o] || Object.defineProperty(e, o, {
2343
2368
  enumerable: !0,
@@ -2355,14 +2380,14 @@ Ce.HttpClientError = wt;
2355
2380
  }
2356
2381
  });
2357
2382
  });
2358
- var s = ne, i = Oe, a = Ce;
2359
- })(O);
2360
- var C = {}, Ui = {}, Pe = {};
2361
- Object.defineProperty(Pe, "__esModule", {
2383
+ var s = ne, i = Ce, a = Pe;
2384
+ })(S);
2385
+ var C = {}, Ui = {}, Ae = {};
2386
+ Object.defineProperty(Ae, "__esModule", {
2362
2387
  value: !0
2363
2388
  });
2364
- Pe.BasisTheoryService = void 0;
2365
- var oe = $i(Tr), $ = O;
2389
+ Ae.BasisTheoryService = void 0;
2390
+ var oe = $i(Tr), $ = S;
2366
2391
  function $i(e) {
2367
2392
  return e && e.__esModule ? e : { default: e };
2368
2393
  }
@@ -2393,7 +2418,7 @@ class Hi {
2393
2418
  }), this.client.interceptors.response.use(void 0, $.errorInterceptor);
2394
2419
  }
2395
2420
  }
2396
- Pe.BasisTheoryService = Hi;
2421
+ Ae.BasisTheoryService = Hi;
2397
2422
  (function(e) {
2398
2423
  Object.defineProperty(e, "__esModule", {
2399
2424
  value: !0
@@ -2407,7 +2432,7 @@ Pe.BasisTheoryService = Hi;
2407
2432
  }
2408
2433
  });
2409
2434
  });
2410
- var r = Pe;
2435
+ var r = Ae;
2411
2436
  Object.keys(r).forEach(function(n) {
2412
2437
  n === "default" || n === "__esModule" || n in e && e[n] === r[n] || Object.defineProperty(e, n, {
2413
2438
  enumerable: !0,
@@ -2417,11 +2442,11 @@ Pe.BasisTheoryService = Hi;
2417
2442
  });
2418
2443
  });
2419
2444
  })(C);
2420
- Object.defineProperty(ye, "__esModule", {
2445
+ Object.defineProperty(ge, "__esModule", {
2421
2446
  value: !0
2422
2447
  });
2423
- ye.BasisTheoryTransactions = void 0;
2424
- var Xe = O, X = p, qi = C;
2448
+ ge.BasisTheoryTransactions = void 0;
2449
+ var Ze = S, X = p, qi = C;
2425
2450
  class Fi extends qi.BasisTheoryService {
2426
2451
  constructor(t) {
2427
2452
  const r = {
@@ -2430,23 +2455,23 @@ class Fi extends qi.BasisTheoryService {
2430
2455
  r.transformRequest = [].concat(X.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(X.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
2431
2456
  }
2432
2457
  create(t = {}) {
2433
- return this.client.post("/", void 0, (0, Xe.createRequestConfig)(t)).then(X.dataExtractor);
2458
+ return this.client.post("/", void 0, (0, Ze.createRequestConfig)(t)).then(X.dataExtractor);
2434
2459
  }
2435
2460
  commit(t, r = {}) {
2436
2461
  const n = `/${t}/commit`;
2437
- return this.client.post(n, void 0, (0, Xe.createRequestConfig)(r)).then(X.dataExtractor);
2462
+ return this.client.post(n, void 0, (0, Ze.createRequestConfig)(r)).then(X.dataExtractor);
2438
2463
  }
2439
2464
  rollback(t, r = {}) {
2440
2465
  const n = `/${t}/rollback`;
2441
- return this.client.post(n, void 0, (0, Xe.createRequestConfig)(r)).then(X.dataExtractor);
2466
+ return this.client.post(n, void 0, (0, Ze.createRequestConfig)(r)).then(X.dataExtractor);
2442
2467
  }
2443
2468
  }
2444
- ye.BasisTheoryTransactions = Fi;
2469
+ ge.BasisTheoryTransactions = Fi;
2445
2470
  (function(e) {
2446
2471
  Object.defineProperty(e, "__esModule", {
2447
2472
  value: !0
2448
2473
  });
2449
- var t = ye;
2474
+ var t = ge;
2450
2475
  Object.keys(t).forEach(function(r) {
2451
2476
  r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
2452
2477
  enumerable: !0,
@@ -2455,44 +2480,44 @@ ye.BasisTheoryTransactions = Fi;
2455
2480
  }
2456
2481
  });
2457
2482
  });
2458
- })(Zt);
2459
- var St = {}, Ae = {}, L = {};
2483
+ })(Qt);
2484
+ var vt = {}, Be = {}, L = {};
2460
2485
  Object.defineProperty(L, "__esModule", {
2461
2486
  value: !0
2462
2487
  });
2463
2488
  L.CrudBuilder = void 0;
2464
- var v = O;
2489
+ var O = S;
2465
2490
  const ki = (e) => class extends e {
2466
2491
  create(r, n) {
2467
- return this.client.post("/", r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
2492
+ return this.client.post("/", r, (0, O.createRequestConfig)(n)).then(O.dataExtractor);
2468
2493
  }
2469
2494
  }, zi = (e) => class extends e {
2470
2495
  retrieve(r, n) {
2471
- return this.client.get(r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
2496
+ return this.client.get(r, (0, O.createRequestConfig)(n)).then(O.dataExtractor);
2472
2497
  }
2473
2498
  }, Vi = (e) => class extends e {
2474
2499
  update(r, n, s) {
2475
- return this.client.put(r, n, (0, v.createRequestConfig)(s)).then(v.dataExtractor);
2500
+ return this.client.put(r, n, (0, O.createRequestConfig)(s)).then(O.dataExtractor);
2476
2501
  }
2477
2502
  }, Gi = (e) => class extends e {
2478
2503
  patch(r, n, s) {
2479
- const i = (0, v.createRequestConfig)(s);
2504
+ const i = (0, O.createRequestConfig)(s);
2480
2505
  return this.client.patch(r, n, {
2481
2506
  ...i,
2482
2507
  headers: {
2483
2508
  ...(i == null ? void 0 : i.headers) || {},
2484
- [v.CONTENT_TYPE_HEADER]: v.MERGE_CONTENT_TYPE
2509
+ [O.CONTENT_TYPE_HEADER]: O.MERGE_CONTENT_TYPE
2485
2510
  }
2486
- }).then(v.dataExtractor);
2511
+ }).then(O.dataExtractor);
2487
2512
  }
2488
2513
  }, Wi = (e) => class extends e {
2489
2514
  async delete(r, n) {
2490
- await this.client.delete(r, (0, v.createRequestConfig)(n));
2515
+ await this.client.delete(r, (0, O.createRequestConfig)(n));
2491
2516
  }
2492
2517
  }, Ki = (e) => class extends e {
2493
2518
  list(r = {}, n = {}) {
2494
- const s = `/${(0, v.getQueryParams)(r)}`;
2495
- return this.client.get(s, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
2519
+ const s = `/${(0, O.getQueryParams)(r)}`;
2520
+ return this.client.get(s, (0, O.createRequestConfig)(n)).then(O.dataExtractor);
2496
2521
  }
2497
2522
  };
2498
2523
  class Ji {
@@ -2522,12 +2547,12 @@ class Ji {
2522
2547
  }
2523
2548
  }
2524
2549
  L.CrudBuilder = Ji;
2525
- Object.defineProperty(Ae, "__esModule", {
2550
+ Object.defineProperty(Be, "__esModule", {
2526
2551
  value: !0
2527
2552
  });
2528
- Ae.BasisTheoryApplications = void 0;
2529
- var ue = O, Yi = C, Xi = L;
2530
- const Qi = new Xi.CrudBuilder(class extends Yi.BasisTheoryService {
2553
+ Be.BasisTheoryApplications = void 0;
2554
+ var ue = S, Yi = C, Xi = L;
2555
+ const Zi = new Xi.CrudBuilder(class extends Yi.BasisTheoryService {
2531
2556
  /**
2532
2557
  * @deprecated use {@link retrieveByKey} instead
2533
2558
  */
@@ -2541,7 +2566,7 @@ const Qi = new Xi.CrudBuilder(class extends Yi.BasisTheoryService {
2541
2566
  return this.client.post(`${t}/regenerate`, void 0, (0, ue.createRequestConfig)(r)).then(ue.dataExtractor);
2542
2567
  }
2543
2568
  }).create().retrieve().update().delete().list().build();
2544
- Ae.BasisTheoryApplications = Qi;
2569
+ Be.BasisTheoryApplications = Zi;
2545
2570
  (function(e) {
2546
2571
  Object.defineProperty(e, "__esModule", {
2547
2572
  value: !0
@@ -2551,15 +2576,15 @@ Ae.BasisTheoryApplications = Qi;
2551
2576
  return t.BasisTheoryApplications;
2552
2577
  }
2553
2578
  });
2554
- var t = Ae;
2555
- })(St);
2556
- var Nr = {}, xr = {}, Be = {}, Lr = {}, je = {};
2557
- Object.defineProperty(je, "__esModule", {
2579
+ var t = Be;
2580
+ })(vt);
2581
+ var Nr = {}, xr = {}, je = {}, Lr = {}, Ne = {};
2582
+ Object.defineProperty(Ne, "__esModule", {
2558
2583
  value: !0
2559
2584
  });
2560
- je.BasisTheoryTokenize = void 0;
2561
- var ce = O, Zi = C;
2562
- class ea extends Zi.BasisTheoryService {
2585
+ Ne.BasisTheoryTokenize = void 0;
2586
+ var ce = S, Qi = C;
2587
+ class ea extends Qi.BasisTheoryService {
2563
2588
  tokenize(t, r = {}) {
2564
2589
  return this.client.post("/", t, (0, ce.createRequestConfig)(r, {
2565
2590
  transformRequest: ce.proxyRaw,
@@ -2567,7 +2592,7 @@ class ea extends Zi.BasisTheoryService {
2567
2592
  })).then(ce.dataExtractor);
2568
2593
  }
2569
2594
  }
2570
- je.BasisTheoryTokenize = ea;
2595
+ Ne.BasisTheoryTokenize = ea;
2571
2596
  (function(e) {
2572
2597
  Object.defineProperty(e, "__esModule", {
2573
2598
  value: !0
@@ -2577,25 +2602,25 @@ je.BasisTheoryTokenize = ea;
2577
2602
  return t.BasisTheoryTokenize;
2578
2603
  }
2579
2604
  });
2580
- var t = je;
2605
+ var t = Ne;
2581
2606
  })(Lr);
2582
- Object.defineProperty(Be, "__esModule", {
2607
+ Object.defineProperty(je, "__esModule", {
2583
2608
  value: !0
2584
2609
  });
2585
- Be.delegateTokenize = void 0;
2610
+ je.delegateTokenize = void 0;
2586
2611
  var ta = Lr;
2587
2612
  const ra = (e) => class extends ta.BasisTheoryTokenize {
2588
2613
  tokenize(r, n) {
2589
2614
  return e != null && e.hasElement(r) ? e.tokenize(r, n) : super.tokenize(r, n);
2590
2615
  }
2591
2616
  };
2592
- Be.delegateTokenize = ra;
2593
- var Ne = {}, vt = {}, xe = {};
2594
- Object.defineProperty(xe, "__esModule", {
2617
+ je.delegateTokenize = ra;
2618
+ var xe = {}, Ot = {}, Le = {};
2619
+ Object.defineProperty(Le, "__esModule", {
2595
2620
  value: !0
2596
2621
  });
2597
- xe.BasisTheoryTokens = void 0;
2598
- var B = O, H = p, na = C, sa = L;
2622
+ Le.BasisTheoryTokens = void 0;
2623
+ var B = S, H = p, na = C, sa = L;
2599
2624
  const ia = new sa.CrudBuilder(class extends na.BasisTheoryService {
2600
2625
  constructor(t) {
2601
2626
  const r = t;
@@ -2635,7 +2660,7 @@ const ia = new sa.CrudBuilder(class extends na.BasisTheoryService {
2635
2660
  return this.client.post("/search", t, (0, B.createRequestConfig)(r)).then(H.dataExtractor);
2636
2661
  }
2637
2662
  }).create().delete().list().build();
2638
- xe.BasisTheoryTokens = ia;
2663
+ Le.BasisTheoryTokens = ia;
2639
2664
  (function(e) {
2640
2665
  Object.defineProperty(e, "__esModule", {
2641
2666
  value: !0
@@ -2645,13 +2670,13 @@ xe.BasisTheoryTokens = ia;
2645
2670
  return t.BasisTheoryTokens;
2646
2671
  }
2647
2672
  });
2648
- var t = xe;
2649
- })(vt);
2650
- Object.defineProperty(Ne, "__esModule", {
2673
+ var t = Le;
2674
+ })(Ot);
2675
+ Object.defineProperty(xe, "__esModule", {
2651
2676
  value: !0
2652
2677
  });
2653
- Ne.delegateTokens = void 0;
2654
- var aa = vt;
2678
+ xe.delegateTokens = void 0;
2679
+ var aa = Ot;
2655
2680
  const oa = (e) => class extends aa.BasisTheoryTokens {
2656
2681
  create(r, n) {
2657
2682
  return e != null && e.hasElement(r) ? e.tokens.create(r, n) : super.create(r, n);
@@ -2663,13 +2688,13 @@ const oa = (e) => class extends aa.BasisTheoryTokens {
2663
2688
  return e !== void 0 ? e.tokens.retrieve(r, n) : super.retrieve(r, n);
2664
2689
  }
2665
2690
  };
2666
- Ne.delegateTokens = oa;
2667
- var Le = {}, Dr = {}, De = {};
2668
- Object.defineProperty(De, "__esModule", {
2691
+ xe.delegateTokens = oa;
2692
+ var De = {}, Dr = {}, Me = {};
2693
+ Object.defineProperty(Me, "__esModule", {
2669
2694
  value: !0
2670
2695
  });
2671
- De.BasisTheoryProxy = void 0;
2672
- var M = O, ua = C;
2696
+ Me.BasisTheoryProxy = void 0;
2697
+ var M = S, ua = C;
2673
2698
  class ca extends ua.BasisTheoryService {
2674
2699
  get(t) {
2675
2700
  return this.proxyRequest("get", t);
@@ -2702,12 +2727,12 @@ class ca extends ua.BasisTheoryService {
2702
2727
  })).then(M.dataExtractor);
2703
2728
  }
2704
2729
  }
2705
- De.BasisTheoryProxy = ca;
2730
+ Me.BasisTheoryProxy = ca;
2706
2731
  (function(e) {
2707
2732
  Object.defineProperty(e, "__esModule", {
2708
2733
  value: !0
2709
2734
  });
2710
- var t = De;
2735
+ var t = Me;
2711
2736
  Object.keys(t).forEach(function(r) {
2712
2737
  r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
2713
2738
  enumerable: !0,
@@ -2717,10 +2742,10 @@ De.BasisTheoryProxy = ca;
2717
2742
  });
2718
2743
  });
2719
2744
  })(Dr);
2720
- Object.defineProperty(Le, "__esModule", {
2745
+ Object.defineProperty(De, "__esModule", {
2721
2746
  value: !0
2722
2747
  });
2723
- Le.delegateProxy = void 0;
2748
+ De.delegateProxy = void 0;
2724
2749
  var la = Dr;
2725
2750
  const da = (e) => class extends la.BasisTheoryProxy {
2726
2751
  get(r) {
@@ -2739,12 +2764,12 @@ const da = (e) => class extends la.BasisTheoryProxy {
2739
2764
  return e !== void 0 ? e.proxy.delete(r) : super.delete(r);
2740
2765
  }
2741
2766
  };
2742
- Le.delegateProxy = da;
2767
+ De.delegateProxy = da;
2743
2768
  (function(e) {
2744
2769
  Object.defineProperty(e, "__esModule", {
2745
2770
  value: !0
2746
2771
  });
2747
- var t = Be;
2772
+ var t = je;
2748
2773
  Object.keys(t).forEach(function(s) {
2749
2774
  s === "default" || s === "__esModule" || s in e && e[s] === t[s] || Object.defineProperty(e, s, {
2750
2775
  enumerable: !0,
@@ -2753,7 +2778,7 @@ Le.delegateProxy = da;
2753
2778
  }
2754
2779
  });
2755
2780
  });
2756
- var r = Ne;
2781
+ var r = xe;
2757
2782
  Object.keys(r).forEach(function(s) {
2758
2783
  s === "default" || s === "__esModule" || s in e && e[s] === r[s] || Object.defineProperty(e, s, {
2759
2784
  enumerable: !0,
@@ -2762,7 +2787,7 @@ Le.delegateProxy = da;
2762
2787
  }
2763
2788
  });
2764
2789
  });
2765
- var n = Le;
2790
+ var n = De;
2766
2791
  Object.keys(n).forEach(function(s) {
2767
2792
  s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
2768
2793
  enumerable: !0,
@@ -2788,32 +2813,32 @@ const ha = (e) => {
2788
2813
  return r.append(t), t;
2789
2814
  };
2790
2815
  F.injectScript = ha;
2791
- var Me = {}, R = {};
2792
- Object.defineProperty(R, "__esModule", {
2816
+ var Ie = {}, w = {};
2817
+ Object.defineProperty(w, "__esModule", {
2793
2818
  value: !0
2794
2819
  });
2795
- R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = R.ELEMENTS_INIT_ERROR_MESSAGE = R.CARD_ICON_POSITIONS = R.CARD_BRANDS = R.AUTOCOMPLETE_VALUES = void 0;
2820
+ w.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = w.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = w.ELEMENTS_NOM_DOM_ERROR_MESSAGE = w.ELEMENTS_INIT_ERROR_MESSAGE = w.CARD_ICON_POSITIONS = w.CARD_BRANDS = w.AUTOCOMPLETE_VALUES = void 0;
2796
2821
  const pa = "BasisTheory Elements was not properly initialized.";
2797
- R.ELEMENTS_INIT_ERROR_MESSAGE = pa;
2822
+ w.ELEMENTS_INIT_ERROR_MESSAGE = pa;
2798
2823
  const ma = "Tried to load BasisTheoryElements in a non-DOM environment.";
2799
- R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = ma;
2800
- const Ea = "Basis Theory Elements did not load properly.";
2801
- R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = Ea;
2802
- const ba = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
2803
- R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ba;
2824
+ w.ELEMENTS_NOM_DOM_ERROR_MESSAGE = ma;
2825
+ const ba = "Basis Theory Elements did not load properly.";
2826
+ w.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = ba;
2827
+ const Ea = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
2828
+ w.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = Ea;
2804
2829
  const _a = ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
2805
- R.CARD_BRANDS = _a;
2830
+ w.CARD_BRANDS = _a;
2806
2831
  const ya = ["left", "right", "none"];
2807
- R.CARD_ICON_POSITIONS = ya;
2832
+ w.CARD_ICON_POSITIONS = ya;
2808
2833
  const ga = ["off", "on"];
2809
- R.AUTOCOMPLETE_VALUES = ga;
2810
- Object.defineProperty(Me, "__esModule", {
2834
+ w.AUTOCOMPLETE_VALUES = ga;
2835
+ Object.defineProperty(Ie, "__esModule", {
2811
2836
  value: !0
2812
2837
  });
2813
- Me.loadElements = void 0;
2814
- var Qe = R, Vt = F;
2815
- let Ze;
2816
- const Ta = (e) => (Ze || (Ze = new Promise((t, r) => {
2838
+ Ie.loadElements = void 0;
2839
+ var Qe = w, Vt = F;
2840
+ let et;
2841
+ const Ta = (e) => (et || (et = new Promise((t, r) => {
2817
2842
  if (typeof window != "object") {
2818
2843
  r(new Error(Qe.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
2819
2844
  return;
@@ -2840,8 +2865,8 @@ const Ta = (e) => (Ze || (Ze = new Promise((t, r) => {
2840
2865
  r(n);
2841
2866
  return;
2842
2867
  }
2843
- })), Ze);
2844
- Me.loadElements = Ta;
2868
+ })), et);
2869
+ Ie.loadElements = Ta;
2845
2870
  (function(e) {
2846
2871
  Object.defineProperty(e, "__esModule", {
2847
2872
  value: !0
@@ -2864,7 +2889,7 @@ Me.loadElements = Ta;
2864
2889
  }
2865
2890
  });
2866
2891
  });
2867
- var n = Me;
2892
+ var n = Ie;
2868
2893
  Object.keys(n).forEach(function(s) {
2869
2894
  s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
2870
2895
  enumerable: !0,
@@ -2874,15 +2899,15 @@ Me.loadElements = Ta;
2874
2899
  });
2875
2900
  });
2876
2901
  })(Nr);
2877
- var Mr = {}, Ie = {};
2878
- Object.defineProperty(Ie, "__esModule", {
2902
+ var Mr = {}, Ue = {};
2903
+ Object.defineProperty(Ue, "__esModule", {
2879
2904
  value: !0
2880
2905
  });
2881
- Ie.BasisTheoryLogs = void 0;
2906
+ Ue.BasisTheoryLogs = void 0;
2882
2907
  var Ra = C, wa = L;
2883
- const Sa = new wa.CrudBuilder(class extends Ra.BasisTheoryService {
2908
+ const va = new wa.CrudBuilder(class extends Ra.BasisTheoryService {
2884
2909
  }).list().build();
2885
- Ie.BasisTheoryLogs = Sa;
2910
+ Ue.BasisTheoryLogs = va;
2886
2911
  (function(e) {
2887
2912
  Object.defineProperty(e, "__esModule", {
2888
2913
  value: !0
@@ -2892,20 +2917,20 @@ Ie.BasisTheoryLogs = Sa;
2892
2917
  return t.BasisTheoryLogs;
2893
2918
  }
2894
2919
  });
2895
- var t = Ie;
2920
+ var t = Ue;
2896
2921
  })(Mr);
2897
- var Ir = {}, Ue = {};
2898
- Object.defineProperty(Ue, "__esModule", {
2922
+ var Ir = {}, $e = {};
2923
+ Object.defineProperty($e, "__esModule", {
2899
2924
  value: !0
2900
2925
  });
2901
- Ue.BasisTheoryPermissions = void 0;
2902
- var Gt = O, va = C;
2903
- class Oa extends va.BasisTheoryService {
2926
+ $e.BasisTheoryPermissions = void 0;
2927
+ var Gt = S, Oa = C;
2928
+ class Sa extends Oa.BasisTheoryService {
2904
2929
  list(t) {
2905
2930
  return this.client.get("/", (0, Gt.createRequestConfig)(t)).then(Gt.dataExtractor);
2906
2931
  }
2907
2932
  }
2908
- Ue.BasisTheoryPermissions = Oa;
2933
+ $e.BasisTheoryPermissions = Sa;
2909
2934
  (function(e) {
2910
2935
  Object.defineProperty(e, "__esModule", {
2911
2936
  value: !0
@@ -2915,13 +2940,13 @@ Ue.BasisTheoryPermissions = Oa;
2915
2940
  return t.BasisTheoryPermissions;
2916
2941
  }
2917
2942
  });
2918
- var t = Ue;
2943
+ var t = $e;
2919
2944
  })(Ir);
2920
- var Ur = {}, $e = {};
2921
- Object.defineProperty($e, "__esModule", {
2945
+ var Ur = {}, He = {};
2946
+ Object.defineProperty(He, "__esModule", {
2922
2947
  value: !0
2923
2948
  });
2924
- $e.BasisTheoryProxies = void 0;
2949
+ He.BasisTheoryProxies = void 0;
2925
2950
  var Wt = p, Ca = C, Pa = L;
2926
2951
  const Aa = new Pa.CrudBuilder(class extends Ca.BasisTheoryService {
2927
2952
  constructor(t) {
@@ -2931,12 +2956,12 @@ const Aa = new Pa.CrudBuilder(class extends Ca.BasisTheoryService {
2931
2956
  r.transformRequest = [].concat(Wt.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Wt.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
2932
2957
  }
2933
2958
  }).create().retrieve().update().patch().delete().list().build();
2934
- $e.BasisTheoryProxies = Aa;
2959
+ He.BasisTheoryProxies = Aa;
2935
2960
  (function(e) {
2936
2961
  Object.defineProperty(e, "__esModule", {
2937
2962
  value: !0
2938
2963
  });
2939
- var t = $e;
2964
+ var t = He;
2940
2965
  Object.keys(t).forEach(function(r) {
2941
2966
  r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
2942
2967
  enumerable: !0,
@@ -2946,15 +2971,15 @@ $e.BasisTheoryProxies = Aa;
2946
2971
  });
2947
2972
  });
2948
2973
  })(Ur);
2949
- var $r = {}, He = {};
2950
- Object.defineProperty(He, "__esModule", {
2974
+ var $r = {}, qe = {};
2975
+ Object.defineProperty(qe, "__esModule", {
2951
2976
  value: !0
2952
2977
  });
2953
- He.BasisTheoryReactorFormulas = void 0;
2978
+ qe.BasisTheoryReactorFormulas = void 0;
2954
2979
  var Ba = C, ja = L;
2955
2980
  const Na = new ja.CrudBuilder(class extends Ba.BasisTheoryService {
2956
2981
  }).create().retrieve().update().delete().list().build();
2957
- He.BasisTheoryReactorFormulas = Na;
2982
+ qe.BasisTheoryReactorFormulas = Na;
2958
2983
  (function(e) {
2959
2984
  Object.defineProperty(e, "__esModule", {
2960
2985
  value: !0
@@ -2964,14 +2989,14 @@ He.BasisTheoryReactorFormulas = Na;
2964
2989
  return t.BasisTheoryReactorFormulas;
2965
2990
  }
2966
2991
  });
2967
- var t = He;
2992
+ var t = qe;
2968
2993
  })($r);
2969
- var Hr = {}, qe = {};
2970
- Object.defineProperty(qe, "__esModule", {
2994
+ var Hr = {}, Fe = {};
2995
+ Object.defineProperty(Fe, "__esModule", {
2971
2996
  value: !0
2972
2997
  });
2973
- qe.BasisTheoryReactors = void 0;
2974
- var le = O, Kt = p, xa = C, La = L;
2998
+ Fe.BasisTheoryReactors = void 0;
2999
+ var le = S, Kt = p, xa = C, La = L;
2975
3000
  const Da = new La.CrudBuilder(class extends xa.BasisTheoryService {
2976
3001
  constructor(t) {
2977
3002
  const r = {
@@ -2986,7 +3011,7 @@ const Da = new La.CrudBuilder(class extends xa.BasisTheoryService {
2986
3011
  })).then(le.dataExtractor);
2987
3012
  }
2988
3013
  }).create().retrieve().update().patch().delete().list().build();
2989
- qe.BasisTheoryReactors = Da;
3014
+ Fe.BasisTheoryReactors = Da;
2990
3015
  (function(e) {
2991
3016
  Object.defineProperty(e, "__esModule", {
2992
3017
  value: !0
@@ -2996,14 +3021,14 @@ qe.BasisTheoryReactors = Da;
2996
3021
  return t.BasisTheoryReactors;
2997
3022
  }
2998
3023
  });
2999
- var t = qe;
3024
+ var t = Fe;
3000
3025
  })(Hr);
3001
- var qr = {}, Fe = {};
3002
- Object.defineProperty(Fe, "__esModule", {
3026
+ var qr = {}, ke = {};
3027
+ Object.defineProperty(ke, "__esModule", {
3003
3028
  value: !0
3004
3029
  });
3005
- Fe.BasisTheorySessions = void 0;
3006
- var Jt = O, de = p, Ma = C;
3030
+ ke.BasisTheorySessions = void 0;
3031
+ var Jt = S, de = p, Ma = C;
3007
3032
  class Ia extends Ma.BasisTheoryService {
3008
3033
  constructor(t) {
3009
3034
  const r = {
@@ -3018,7 +3043,7 @@ class Ia extends Ma.BasisTheoryService {
3018
3043
  return this.client.post("/authorize", t, (0, Jt.createRequestConfig)(r)).then(de.dataExtractor);
3019
3044
  }
3020
3045
  }
3021
- Fe.BasisTheorySessions = Ia;
3046
+ ke.BasisTheorySessions = Ia;
3022
3047
  (function(e) {
3023
3048
  Object.defineProperty(e, "__esModule", {
3024
3049
  value: !0
@@ -3028,14 +3053,14 @@ Fe.BasisTheorySessions = Ia;
3028
3053
  return t.BasisTheorySessions;
3029
3054
  }
3030
3055
  });
3031
- var t = Fe;
3056
+ var t = ke;
3032
3057
  })(qr);
3033
- var Fr = {}, ke = {};
3034
- Object.defineProperty(ke, "__esModule", {
3058
+ var Fr = {}, ze = {};
3059
+ Object.defineProperty(ze, "__esModule", {
3035
3060
  value: !0
3036
3061
  });
3037
- ke.BasisTheoryTenants = void 0;
3038
- var g = O, Ua = C, $a = L;
3062
+ ze.BasisTheoryTenants = void 0;
3063
+ var g = S, Ua = C, $a = L;
3039
3064
  const Ha = new $a.CrudBuilder(class extends Ua.BasisTheoryService {
3040
3065
  retrieve(t) {
3041
3066
  return this.client.get("/", (0, g.createRequestConfig)(t)).then(g.dataExtractor);
@@ -3073,7 +3098,7 @@ const Ha = new $a.CrudBuilder(class extends Ua.BasisTheoryService {
3073
3098
  await this.client.delete(`/members/${t}`, (0, g.createRequestConfig)(r));
3074
3099
  }
3075
3100
  }).build();
3076
- ke.BasisTheoryTenants = Ha;
3101
+ ze.BasisTheoryTenants = Ha;
3077
3102
  (function(e) {
3078
3103
  Object.defineProperty(e, "__esModule", {
3079
3104
  value: !0
@@ -3083,22 +3108,22 @@ ke.BasisTheoryTenants = Ha;
3083
3108
  return t.BasisTheoryTenants;
3084
3109
  }
3085
3110
  });
3086
- var t = ke;
3111
+ var t = ze;
3087
3112
  })(Fr);
3088
- Object.defineProperty(_e, "__esModule", {
3113
+ Object.defineProperty(ye, "__esModule", {
3089
3114
  value: !0
3090
3115
  });
3091
- _e.BasisTheory = void 0;
3092
- var Q = W, qa = Zt, Fa = St, y = O, fe = Nr, ka = R, za = Mr, Va = Ir, Ga = Ur, Wa = $r, Ka = Hr, Ja = qr, Ya = Fr;
3116
+ ye.BasisTheory = void 0;
3117
+ var Z = W, qa = Qt, Fa = vt, y = S, fe = Nr, ka = w, za = Mr, Va = Ir, Ga = Ur, Wa = $r, Ka = Hr, Ja = qr, Ya = Fr;
3093
3118
  function Xa(e, t, r) {
3094
3119
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
3095
3120
  }
3096
- const Qa = {
3121
+ const Za = {
3097
3122
  apiBaseUrl: y.DEFAULT_BASE_URL,
3098
3123
  elements: !1,
3099
3124
  appInfo: {}
3100
3125
  };
3101
- class Za {
3126
+ class Qa {
3102
3127
  constructor() {
3103
3128
  Xa(this, "_initStatus", "not-started");
3104
3129
  }
@@ -3108,7 +3133,7 @@ class Za {
3108
3133
  this._initStatus = "in-progress";
3109
3134
  try {
3110
3135
  this._initOptions = Object.freeze({
3111
- ...Qa,
3136
+ ...Za,
3112
3137
  ...r
3113
3138
  });
3114
3139
  let n = this._initOptions.apiBaseUrl;
@@ -3182,19 +3207,19 @@ class Za {
3182
3207
  return (0, y.assertInit)(this._tokenize).tokenize(t, r);
3183
3208
  }
3184
3209
  post(t, r, n) {
3185
- return (0, Q.makeRequestWithElementsPayloadCheck)(this._elements, "post", t, r, n);
3210
+ return (0, Z.makeRequestWithElementsPayloadCheck)(this._elements, "post", t, r, n);
3186
3211
  }
3187
3212
  put(t, r, n) {
3188
- return (0, Q.makeRequestWithElementsPayloadCheck)(this._elements, "put", t, r, n);
3213
+ return (0, Z.makeRequestWithElementsPayloadCheck)(this._elements, "put", t, r, n);
3189
3214
  }
3190
3215
  patch(t, r, n) {
3191
- return (0, Q.makeRequestWithElementsPayloadCheck)(this._elements, "patch", t, r, n);
3216
+ return (0, Z.makeRequestWithElementsPayloadCheck)(this._elements, "patch", t, r, n);
3192
3217
  }
3193
3218
  get(t, r) {
3194
- return (0, Q.makeRequestWithoutElementsPayloadCheck)(this._elements, "get", t, r);
3219
+ return (0, Z.makeRequestWithoutElementsPayloadCheck)(this._elements, "get", t, r);
3195
3220
  }
3196
3221
  delete(t, r) {
3197
- return (0, Q.makeRequestWithoutElementsPayloadCheck)(this._elements, "delete", t, r);
3222
+ return (0, Z.makeRequestWithoutElementsPayloadCheck)(this._elements, "delete", t, r);
3198
3223
  }
3199
3224
  async loadElements(t) {
3200
3225
  let r;
@@ -3255,7 +3280,7 @@ class Za {
3255
3280
  this._elements = t;
3256
3281
  }
3257
3282
  }
3258
- _e.BasisTheory = Za;
3283
+ ye.BasisTheory = Qa;
3259
3284
  (function(e) {
3260
3285
  Object.defineProperty(e, "__esModule", {
3261
3286
  value: !0
@@ -3264,7 +3289,7 @@ _e.BasisTheory = Za;
3264
3289
  _instance: !0
3265
3290
  };
3266
3291
  e._instance = void 0;
3267
- var r = _e;
3292
+ var r = ye;
3268
3293
  Object.keys(r).forEach(function(a) {
3269
3294
  a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === r[a] || Object.defineProperty(e, a, {
3270
3295
  enumerable: !0,
@@ -3273,7 +3298,7 @@ _e.BasisTheory = Za;
3273
3298
  }
3274
3299
  });
3275
3300
  });
3276
- var n = St;
3301
+ var n = vt;
3277
3302
  Object.keys(n).forEach(function(a) {
3278
3303
  a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === n[a] || Object.defineProperty(e, a, {
3279
3304
  enumerable: !0,
@@ -3282,7 +3307,7 @@ _e.BasisTheory = Za;
3282
3307
  }
3283
3308
  });
3284
3309
  });
3285
- var s = vt;
3310
+ var s = Ot;
3286
3311
  Object.keys(s).forEach(function(a) {
3287
3312
  a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === s[a] || Object.defineProperty(e, a, {
3288
3313
  enumerable: !0,
@@ -3294,15 +3319,57 @@ _e.BasisTheory = Za;
3294
3319
  const i = new r.BasisTheory();
3295
3320
  e._instance = i;
3296
3321
  })(Xt);
3297
- const et = {
3322
+ const tt = {
3298
3323
  base: {
3299
3324
  ":disabled": {
3300
3325
  backgroundColor: "transparent"
3301
3326
  }
3302
3327
  }
3303
- }, eo = "DOM Element was not found";
3304
- var to = { VITE_PACKAGE_VERSION: "v2.0.0-beta.6", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3305
- const ro = "v2.0.0-beta.6", tt = to.VITE_IFRAME_BASE_URL ?? no(ro);
3328
+ }, eo = {
3329
+ mask: {
3330
+ number: "{{ data.number | card_mask: 'true', 'true' }}",
3331
+ expiration_month: "{{ data.expiration_month }}",
3332
+ expiration_year: "{{ data.expiration_year }}"
3333
+ }
3334
+ }, to = eo;
3335
+ class ro {
3336
+ constructor(t, r, n = new AbortController()) {
3337
+ Object.defineProperty(this, "apiKey", {
3338
+ enumerable: !0,
3339
+ configurable: !0,
3340
+ writable: !0,
3341
+ value: r
3342
+ }), Object.defineProperty(this, "abortCtrl", {
3343
+ enumerable: !0,
3344
+ configurable: !0,
3345
+ writable: !0,
3346
+ value: n
3347
+ }), Object.defineProperty(this, "baseUrl", {
3348
+ enumerable: !0,
3349
+ configurable: !0,
3350
+ writable: !0,
3351
+ value: void 0
3352
+ }), this.baseUrl = t.endsWith("/") ? t.substring(0, t.length - 1) : t;
3353
+ }
3354
+ tokenize(t) {
3355
+ return fetch(`${this.baseUrl}/tokenize`, {
3356
+ method: "POST",
3357
+ headers: {
3358
+ "Content-Type": "application/json",
3359
+ "X-API-Key": this.apiKey
3360
+ },
3361
+ mode: "cors",
3362
+ body: JSON.stringify(t),
3363
+ signal: this.abortCtrl.signal
3364
+ }).then((r) => be(r));
3365
+ }
3366
+ cancelAll() {
3367
+ this.abortCtrl.abort();
3368
+ }
3369
+ }
3370
+ const no = "DOM Element was not found";
3371
+ var so = { VITE_PACKAGE_VERSION: "v3.0.0", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3372
+ const io = "v3.0.0", rt = so.VITE_IFRAME_BASE_URL ?? ao(io);
3306
3373
  class ie {
3307
3374
  constructor(t, r) {
3308
3375
  if (Object.defineProperty(this, "options", {
@@ -3362,22 +3429,22 @@ class ie {
3362
3429
  var n;
3363
3430
  (n = this.iframe) == null || n.remove(), this.iframe = null;
3364
3431
  }
3365
- }), !tt)
3432
+ }), !rt)
3366
3433
  throw new Error("IFRAME_BASE_URL not found");
3367
- r && rt.set(this, { key: r });
3434
+ r && nt.set(this, { key: r });
3368
3435
  }
3369
3436
  mount(t) {
3370
3437
  const r = typeof t == "string" ? document.querySelector(t) : t;
3371
3438
  if (!r)
3372
- throw new Error(eo);
3373
- r.innerHTML = `<iframe width="100%" height="29" src="${tt}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
3439
+ throw new Error(no);
3440
+ r.innerHTML = `<iframe width="100%" height="29" src="${rt}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
3374
3441
  const n = (s) => {
3375
3442
  var i;
3376
3443
  if (!(s.source !== ((i = this.iframe) == null ? void 0 : i.contentWindow) || s.data.element !== this.type))
3377
3444
  if (s.data.type === "change") {
3378
3445
  const a = this.extractValue(s.data.data.value), o = { ...s.data.data };
3379
3446
  delete o.value;
3380
- const l = rt.get(this);
3447
+ const l = nt.get(this);
3381
3448
  l && (l.value = a), this.emitEvent({
3382
3449
  ...s.data,
3383
3450
  data: o
@@ -3397,7 +3464,7 @@ class ie {
3397
3464
  };
3398
3465
  }
3399
3466
  secureValue(t) {
3400
- const r = rt.get(this);
3467
+ const r = nt.get(this);
3401
3468
  return (r == null ? void 0 : r.key) !== t ? null : (r == null ? void 0 : r.value) ?? null;
3402
3469
  }
3403
3470
  emitEvent(t) {
@@ -3406,13 +3473,13 @@ class ie {
3406
3473
  }
3407
3474
  iframePostMessage(t) {
3408
3475
  var r, n;
3409
- (n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, tt);
3476
+ (n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, rt);
3410
3477
  }
3411
3478
  }
3412
- function no(e) {
3479
+ function ao(e) {
3413
3480
  return `https://sdk.hellgate.io/web/${e}/iframe/`;
3414
3481
  }
3415
- const rt = /* @__PURE__ */ new Map(), so = (e) => e != null;
3482
+ const nt = /* @__PURE__ */ new Map(), oo = (e) => e != null;
3416
3483
  function kr(e) {
3417
3484
  const [t = null, r = null] = (e ?? "").split("/").map((n) => Number(n.trim()));
3418
3485
  return { month: t, year: r && r > 10 ? +`20${r}` : null };
@@ -3424,9 +3491,9 @@ function zr(e) {
3424
3491
  return [
3425
3492
  t && t < 10 ? `0${t}` : t,
3426
3493
  r && r >= 100 ? String(r).slice(-2) : r
3427
- ].filter(so).join(" / ");
3494
+ ].filter(oo).join(" / ");
3428
3495
  }
3429
- class io extends ie {
3496
+ class uo extends ie {
3430
3497
  constructor() {
3431
3498
  super(...arguments), Object.defineProperty(this, "type", {
3432
3499
  enumerable: !0,
@@ -3449,10 +3516,10 @@ class io extends ie {
3449
3516
  function Vr(e) {
3450
3517
  return (e == null ? void 0 : e.replaceAll(" ", "")) ?? null;
3451
3518
  }
3452
- function ao(e) {
3519
+ function co(e) {
3453
3520
  return e;
3454
3521
  }
3455
- class oo extends ie {
3522
+ class lo extends ie {
3456
3523
  constructor() {
3457
3524
  super(...arguments), Object.defineProperty(this, "type", {
3458
3525
  enumerable: !0,
@@ -3468,11 +3535,11 @@ class oo extends ie {
3468
3535
  enumerable: !0,
3469
3536
  configurable: !0,
3470
3537
  writable: !0,
3471
- value: ao
3538
+ value: co
3472
3539
  });
3473
3540
  }
3474
3541
  }
3475
- class uo extends ie {
3542
+ class fo extends ie {
3476
3543
  constructor() {
3477
3544
  super(...arguments), Object.defineProperty(this, "type", {
3478
3545
  enumerable: !0,
@@ -3500,7 +3567,7 @@ class uo extends ie {
3500
3567
  });
3501
3568
  }
3502
3569
  }
3503
- class co extends ie {
3570
+ class ho extends ie {
3504
3571
  constructor() {
3505
3572
  super(...arguments), Object.defineProperty(this, "type", {
3506
3573
  enumerable: !0,
@@ -3540,41 +3607,48 @@ class Gr extends ie {
3540
3607
  });
3541
3608
  }
3542
3609
  }
3543
- function Z(e, t, r) {
3610
+ function Q(e, t, r) {
3544
3611
  switch (e) {
3545
3612
  case "card":
3546
- return new uo(t, r);
3613
+ return new fo(t, r);
3547
3614
  case "cardNumber":
3548
- return new oo(t, r);
3615
+ return new lo(t, r);
3549
3616
  case "cardExpirationDate":
3550
- return new io(t, r);
3617
+ return new uo(t, r);
3551
3618
  case "cardVerificationCode":
3552
- return new co(t, r);
3619
+ return new ho(t, r);
3553
3620
  case "text":
3554
3621
  return new Gr(t, r);
3555
3622
  default:
3556
3623
  ASSERT_EXHAUSTIVE(e);
3557
3624
  }
3558
3625
  }
3559
- function lo() {
3626
+ function po() {
3560
3627
  return Date.now().toString(36) + Math.random().toString(36).slice(2);
3561
3628
  }
3562
- class Ot {
3629
+ class St {
3563
3630
  static async init(t, r) {
3564
- const n = await new Xt.BasisTheory().init(r, { elements: !1 });
3565
- return new Ot(t, n);
3631
+ const n = r.provider === "basis_theory" ? await new Xt.BasisTheory().init(r.api_key, {
3632
+ elements: !1
3633
+ }) : void 0;
3634
+ return new St(t, r, n);
3566
3635
  }
3567
- constructor(t, r) {
3636
+ constructor(t, r, n) {
3568
3637
  Object.defineProperty(this, "session", {
3569
3638
  enumerable: !0,
3570
3639
  configurable: !0,
3571
3640
  writable: !0,
3572
3641
  value: t
3573
- }), Object.defineProperty(this, "bt", {
3642
+ }), Object.defineProperty(this, "tokenizeConfig", {
3574
3643
  enumerable: !0,
3575
3644
  configurable: !0,
3576
3645
  writable: !0,
3577
3646
  value: r
3647
+ }), Object.defineProperty(this, "bt", {
3648
+ enumerable: !0,
3649
+ configurable: !0,
3650
+ writable: !0,
3651
+ value: n
3578
3652
  }), Object.defineProperty(this, "state", {
3579
3653
  enumerable: !0,
3580
3654
  configurable: !0,
@@ -3594,137 +3668,145 @@ class Ot {
3594
3668
  enumerable: !0,
3595
3669
  configurable: !0,
3596
3670
  writable: !0,
3597
- value: (n = {}) => {
3671
+ value: (s = {}) => {
3598
3672
  if (this.hasFormElements())
3599
3673
  throw new Error("Form elements can't be initialized twice. You can call `reset()` method or create new Hellgate client.");
3600
- const s = G.get(this);
3601
- if (!s)
3674
+ const i = G.get(this);
3675
+ if (!i)
3602
3676
  throw new Error("Secure key not found");
3603
- const i = z({
3677
+ const a = z({
3604
3678
  disabled: !1,
3605
3679
  autocomplete: "on",
3606
- style: { ...et }
3607
- }, n), a = Z("card", i, s);
3680
+ style: { ...tt }
3681
+ }, s), o = Q("card", a, i);
3608
3682
  return this.cardElements.card = {
3609
- element: a,
3683
+ element: o,
3610
3684
  state: this.createFieldDefaultState()
3611
- }, this.addElementStateListener("card"), a;
3685
+ }, this.addElementStateListener("card"), o;
3612
3686
  }
3613
3687
  }), Object.defineProperty(this, "createFormFields", {
3614
3688
  enumerable: !0,
3615
3689
  configurable: !0,
3616
3690
  writable: !0,
3617
- value: (n = {}) => {
3691
+ value: (s = {}) => {
3618
3692
  if (this.hasFormElements())
3619
3693
  throw new Error("Form elements can't be initialized twice. You can call `reset()` method or create new Hellgate client.");
3620
- const s = G.get(this);
3621
- if (!s)
3694
+ const i = G.get(this);
3695
+ if (!i)
3622
3696
  throw new Error("Secure key not found");
3623
- const i = {
3697
+ const a = {
3624
3698
  disabled: !1,
3625
3699
  autocomplete: "on",
3626
- style: { ...et }
3627
- }, { cardNumber: a = {}, expiryDate: o = {}, securityCode: l = {}, ...d } = n, u = Z("cardNumber", {
3628
- ...z(i, { ...d, ...a })
3629
- }, s), h = Z("cardExpirationDate", {
3630
- ...z(i, { ...d, ...o })
3631
- }, s), _ = Z("cardVerificationCode", {
3632
- ...z(i, {
3633
- ...d,
3634
- ...l
3700
+ style: { ...tt }
3701
+ }, { cardNumber: o = {}, expiryDate: l = {}, securityCode: f = {}, ...u } = s, h = Q("cardNumber", {
3702
+ ...z(a, { ...u, ...o })
3703
+ }, i), _ = Q("cardExpirationDate", {
3704
+ ...z(a, { ...u, ...l })
3705
+ }, i), R = Q("cardVerificationCode", {
3706
+ ...z(a, {
3707
+ ...u,
3708
+ ...f
3635
3709
  })
3636
- }, s);
3710
+ }, i);
3637
3711
  return this.cardElements = {
3638
3712
  cardNumber: {
3639
- element: u,
3713
+ element: h,
3640
3714
  state: this.createFieldDefaultState()
3641
3715
  },
3642
3716
  cardExpirationDate: {
3643
- element: h,
3717
+ element: _,
3644
3718
  state: this.createFieldDefaultState()
3645
3719
  },
3646
3720
  cardVerificationCode: {
3647
- element: _,
3721
+ element: R,
3648
3722
  state: this.createFieldDefaultState()
3649
3723
  }
3650
- }, this.addElementStateListener("cardNumber"), this.addElementStateListener("cardExpirationDate"), this.addElementStateListener("cardVerificationCode"), { cardNumber: u, expiryDate: h, securityCode: _ };
3724
+ }, this.addElementStateListener("cardNumber"), this.addElementStateListener("cardExpirationDate"), this.addElementStateListener("cardVerificationCode"), { cardNumber: h, expiryDate: _, securityCode: R };
3651
3725
  }
3652
3726
  }), Object.defineProperty(this, "createTextField", {
3653
3727
  enumerable: !0,
3654
3728
  configurable: !0,
3655
3729
  writable: !0,
3656
- value: (n = {}) => {
3657
- const s = G.get(this);
3658
- if (!s)
3730
+ value: (s = {}) => {
3731
+ const i = G.get(this);
3732
+ if (!i)
3659
3733
  throw new Error("Secure key not found");
3660
- const i = {
3734
+ const a = {
3661
3735
  disabled: !1,
3662
3736
  autocomplete: "on",
3663
- style: { ...et }
3737
+ style: { ...tt }
3664
3738
  };
3665
- return Z("text", {
3666
- ...z(i, { ...n })
3667
- }, s);
3739
+ return Q("text", {
3740
+ ...z(a, { ...s })
3741
+ }, i);
3668
3742
  }
3669
3743
  }), Object.defineProperty(this, "tokenize", {
3670
3744
  enumerable: !0,
3671
3745
  configurable: !0,
3672
3746
  writable: !0,
3673
3747
  value: async () => {
3674
- var d, u, h, _, w;
3675
- const { card: n, cardNumber: s, cardExpirationDate: i, cardVerificationCode: a } = this.cardElements, l = {
3676
- mask: {
3677
- number: "{{ data.number | card_mask: 'true', 'true' }}",
3678
- expiration_month: "{{ data.expiration_month }}",
3679
- expiration_year: "{{ data.expiration_year }}"
3748
+ var f, u, h, _, R;
3749
+ const { card: s, cardNumber: i, cardExpirationDate: a, cardVerificationCode: o } = this.cardElements;
3750
+ let l;
3751
+ if (s) {
3752
+ const d = V(this, s.element);
3753
+ l = {
3754
+ number: (d == null ? void 0 : d.number) ?? null,
3755
+ expiration_month: ((f = d == null ? void 0 : d.expiry_date) == null ? void 0 : f.month) ?? null,
3756
+ expiration_year: ((u = d == null ? void 0 : d.expiry_date) == null ? void 0 : u.year) ?? null,
3757
+ cvc: (d == null ? void 0 : d.cvc) ?? null
3758
+ };
3759
+ }
3760
+ if (i && a && o && (l = {
3761
+ number: ((h = V(this, i.element)) == null ? void 0 : h.replaceAll(" ", "")) ?? null,
3762
+ expiration_month: ((_ = V(this, a.element)) == null ? void 0 : _.month) ?? null,
3763
+ expiration_year: ((R = V(this, a.element)) == null ? void 0 : R.year) ?? null,
3764
+ cvc: V(this, o.element)
3765
+ }), !l)
3766
+ throw new Error("Form elements must be initialized before tokenization");
3767
+ if (!l.number || !l.expiration_month || !l.expiration_year || !l.cvc)
3768
+ throw new Error("Card data is not complete");
3769
+ switch (this.tokenizeConfig.provider) {
3770
+ case "basis_theory": {
3771
+ if (!this.bt)
3772
+ throw new Error("basis_theory SDK not found");
3773
+ return this.bt.tokenize({
3774
+ type: "card",
3775
+ data: l,
3776
+ ...to
3777
+ });
3680
3778
  }
3681
- };
3682
- if (n) {
3683
- const f = V(this, n.element);
3684
- return this.bt.tokenize({
3685
- type: "card",
3686
- data: {
3687
- number: (f == null ? void 0 : f.number) ?? null,
3688
- expiration_month: ((d = f == null ? void 0 : f.expiry_date) == null ? void 0 : d.month) ?? null,
3689
- expiration_year: ((u = f == null ? void 0 : f.expiry_date) == null ? void 0 : u.year) ?? null,
3690
- cvc: (f == null ? void 0 : f.cvc) ?? null
3691
- },
3692
- ...l
3693
- });
3779
+ case "guardian":
3780
+ return new ro(this.tokenizeConfig.base_url, this.tokenizeConfig.api_key).tokenize({
3781
+ account_number: l.number,
3782
+ expiry_month: l.expiration_month,
3783
+ expiry_year: l.expiration_year,
3784
+ security_code: l.cvc
3785
+ });
3786
+ default:
3787
+ ASSERT_EXHAUSTIVE(this.tokenizeConfig);
3694
3788
  }
3695
- if (s && i && a)
3696
- return this.bt.tokenize({
3697
- type: "card",
3698
- data: {
3699
- number: ((h = V(this, s.element)) == null ? void 0 : h.replaceAll(" ", "")) ?? null,
3700
- expiration_month: ((_ = V(this, i.element)) == null ? void 0 : _.month) ?? null,
3701
- expiration_year: ((w = V(this, i.element)) == null ? void 0 : w.year) ?? null,
3702
- cvc: V(this, a.element)
3703
- },
3704
- ...l
3705
- });
3706
- throw new Error("Form elements must be initialized before tokenization");
3707
3789
  }
3708
3790
  }), Object.defineProperty(this, "onStateChange", {
3709
3791
  enumerable: !0,
3710
3792
  configurable: !0,
3711
3793
  writable: !0,
3712
- value: (n) => {
3713
- this.stateChangeHandlers.push(n), n(this.state);
3794
+ value: (s) => {
3795
+ this.stateChangeHandlers.push(s), s(this.state);
3714
3796
  }
3715
3797
  }), Object.defineProperty(this, "clear", {
3716
3798
  enumerable: !0,
3717
3799
  configurable: !0,
3718
3800
  writable: !0,
3719
3801
  value: () => {
3720
- Object.values(this.cardElements).forEach((n) => n == null ? void 0 : n.element.clear());
3802
+ Object.values(this.cardElements).forEach((s) => s == null ? void 0 : s.element.clear());
3721
3803
  }
3722
3804
  }), Object.defineProperty(this, "reset", {
3723
3805
  enumerable: !0,
3724
3806
  configurable: !0,
3725
3807
  writable: !0,
3726
3808
  value: () => {
3727
- Object.values(this.cardElements).forEach((n) => n == null ? void 0 : n.element.unmount()), this.cardElements = {};
3809
+ Object.values(this.cardElements).forEach((s) => s == null ? void 0 : s.element.unmount()), this.cardElements = {};
3728
3810
  }
3729
3811
  }), Object.defineProperty(this, "dispose", {
3730
3812
  enumerable: !0,
@@ -3737,21 +3819,21 @@ class Ot {
3737
3819
  enumerable: !0,
3738
3820
  configurable: !0,
3739
3821
  writable: !0,
3740
- value: async (n) => {
3822
+ value: async (s) => {
3741
3823
  if (!this.hasFormElements())
3742
3824
  throw new Error("Card form must be initialized and completed before processing");
3743
- const s = n ? this.extractAdditionalData(n) : void 0;
3825
+ const i = s ? this.extractAdditionalData(s) : void 0;
3744
3826
  this.disableFormElements();
3745
- const i = await this.tokenize();
3827
+ const a = await this.tokenize();
3746
3828
  return this.session.completeAction({
3747
3829
  action: "tokenize_card",
3748
3830
  result: {
3749
- bt_token_id: i.id,
3750
- additional_data: s
3831
+ token_id: a.id,
3832
+ additional_data: i
3751
3833
  }
3752
3834
  });
3753
3835
  }
3754
- }), G.set(this, lo());
3836
+ }), G.set(this, po());
3755
3837
  }
3756
3838
  hasFormElements() {
3757
3839
  return !!Object.keys(this.cardElements).length;
@@ -3805,7 +3887,7 @@ function k(e, t) {
3805
3887
  const r = G.get(e);
3806
3888
  return t instanceof Gr && r ? V(e, t) ?? void 0 : t;
3807
3889
  }
3808
- class fo {
3890
+ class mo {
3809
3891
  constructor(t = "https://api.hellgate.io", r = new AbortController()) {
3810
3892
  Object.defineProperty(this, "abortCtrl", {
3811
3893
  enumerable: !0,
@@ -3822,7 +3904,7 @@ class fo {
3822
3904
  getSession(t) {
3823
3905
  return fetch(`${this.baseUrl}/sessions/${t}`, {
3824
3906
  signal: this.abortCtrl.signal
3825
- }).then((r) => nt(r));
3907
+ }).then((r) => be(r));
3826
3908
  }
3827
3909
  completeAction(t, r) {
3828
3910
  return fetch(`${this.baseUrl}/sessions/${t}/complete-action`, {
@@ -3833,14 +3915,14 @@ class fo {
3833
3915
  mode: "cors",
3834
3916
  body: JSON.stringify(r),
3835
3917
  signal: this.abortCtrl.signal
3836
- }).then((n) => nt(n));
3918
+ }).then((n) => be(n));
3837
3919
  }
3838
3920
  cancelAll() {
3839
3921
  this.abortCtrl.abort();
3840
3922
  }
3841
3923
  }
3842
- const ho = 2e3;
3843
- class po {
3924
+ const bo = 2e3;
3925
+ class Eo {
3844
3926
  constructor(t, r) {
3845
3927
  Object.defineProperty(this, "id", {
3846
3928
  enumerable: !0,
@@ -3908,7 +3990,7 @@ class po {
3908
3990
  const o = this.onStateChange((l) => {
3909
3991
  l.next_action !== (s == null ? void 0 : s.next_action) && l.next_action === null && (i(l), o());
3910
3992
  });
3911
- this.api.completeAction(this.id, n).then((l) => this.newStateHandle(l, a)).catch(async (l) => a(await mo(l)));
3993
+ this.api.completeAction(this.id, n).then((l) => this.newStateHandle(l, a)).catch(async (l) => a(await _o(l)));
3912
3994
  });
3913
3995
  }
3914
3996
  }), Object.defineProperty(this, "completeSession", {
@@ -3940,14 +4022,14 @@ class po {
3940
4022
  case "wait": {
3941
4023
  window.clearTimeout(this.pollingTimer), this.pollingTimer = window.setTimeout(() => this.updateSessionState(r).catch((s) => {
3942
4024
  s instanceof Response && s.status === 404 && (r == null || r(new Error(`Session ${this.id} has expired`)));
3943
- }), ho);
4025
+ }), bo);
3944
4026
  break;
3945
4027
  }
3946
4028
  }
3947
4029
  t.next_action !== ((n = this.state) == null ? void 0 : n.next_action) && this.stateChangeHandlers.forEach((s) => s(t)), t.next_action === null && this.completeSession(t), this.state = t;
3948
4030
  }
3949
4031
  }
3950
- async function mo(e) {
4032
+ async function _o(e) {
3951
4033
  if (!e.ok)
3952
4034
  switch (e.status) {
3953
4035
  case 400: {
@@ -3957,7 +4039,7 @@ async function mo(e) {
3957
4039
  }
3958
4040
  return e;
3959
4041
  }
3960
- const Eo = {
4042
+ const yo = {
3961
4043
  base_url: "https://api.hellgate.io"
3962
4044
  };
3963
4045
  class Wr {
@@ -3986,9 +4068,9 @@ class Wr {
3986
4068
  }
3987
4069
  static async init(t, r = {}) {
3988
4070
  const n = {
3989
- ...Eo,
4071
+ ...yo,
3990
4072
  ...r
3991
- }, s = new fo(n.base_url, n.abortCtrl), i = new po(t, s), a = await i.init(), o = a.next_action === "tokenize_card" ? await Ot.init(i, a.data.bt_api_key) : void 0;
4073
+ }, s = new mo(n.base_url, n.abortCtrl), i = new Eo(t, s), a = await i.init(), o = a.next_action === "tokenize_card" ? await St.init(i, a.data) : void 0;
3992
4074
  return new Wr(i, {
3993
4075
  CARD: o,
3994
4076
  "3DS": new Yr(i, r.challenge_3ds_container)
@@ -3997,18 +4079,18 @@ class Wr {
3997
4079
  }
3998
4080
  globalThis.HellgateSDK && (globalThis.Hellgate = globalThis.HellgateSDK.Hellgate, delete globalThis.HellgateSDK);
3999
4081
  export {
4000
- uo as CardElement,
4001
- io as CardExpirationDateElement,
4002
- oo as CardNumberElement,
4003
- co as CardVerificationCodeElement,
4082
+ fo as CardElement,
4083
+ uo as CardExpirationDateElement,
4084
+ lo as CardNumberElement,
4085
+ ho as CardVerificationCodeElement,
4004
4086
  Wr as Hellgate,
4005
4087
  Yr as Hellgate3DSHandler,
4006
- Ot as HellgateCardHandler,
4088
+ St as HellgateCardHandler,
4007
4089
  Gr as TextElement,
4008
- Z as createElement,
4090
+ Q as createElement,
4009
4091
  Vr as extractCardNumberValue,
4010
4092
  kr as extractExpiryDateValue,
4011
- ao as putCardNumberValue,
4093
+ co as putCardNumberValue,
4012
4094
  zr as putExpiryDateValue,
4013
- lo as uid
4095
+ po as uid
4014
4096
  };