@starfish-codes/hellgate 3.5.0 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hellgate-sdk.mjs
CHANGED
|
@@ -12,7 +12,7 @@ function ae(e, t) {
|
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Pt(e) {
|
|
16
16
|
if (!e.ok)
|
|
17
17
|
throw e;
|
|
18
18
|
return e.json();
|
|
@@ -121,13 +121,13 @@ class ts {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
}), this.domContainer = r.domContainer ??
|
|
124
|
+
}), this.domContainer = r.domContainer ?? ht(), this.disposers.push(this.session.onStateChange(this.sessionStateHandle)), this.labelText = r.labelText;
|
|
125
125
|
}
|
|
126
126
|
dispose() {
|
|
127
127
|
this.disposers.forEach((t) => t()), this.check3dsIframeDisposers.forEach((t) => t());
|
|
128
128
|
}
|
|
129
129
|
initCheck3DSIframes(t, r) {
|
|
130
|
-
const n =
|
|
130
|
+
const n = ht();
|
|
131
131
|
n.insertAdjacentHTML("beforeend", `<iframe id="check_3ds_${this.iframeId}" width="0" height="0" style="border:0;visibility: hidden;" src="${t}"></iframe>`);
|
|
132
132
|
const s = n.querySelector(`#check_3ds_${this.iframeId}`);
|
|
133
133
|
if (s) {
|
|
@@ -146,7 +146,7 @@ class ts {
|
|
|
146
146
|
this.check3dsIframeDisposers.forEach((t) => t()), this.check3dsIframeDisposers = [];
|
|
147
147
|
}
|
|
148
148
|
startChallenge(t, r) {
|
|
149
|
-
const n =
|
|
149
|
+
const n = ht(), s = `<div style="display: flex; flex-direction: column; gap: 10px; align-items: center; ${this.domContainer === n ? 'border:0; max-width: 800px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width:100% " ' : 'border:0;" width="100%" height="100%"'}><iframe id="cha_${this.iframeId}" src="${t}" width="100%" height="500"></iframe>${this.labelText ? '<span id="tds_label_text" style="font-size: large;">' + this.labelText + "</span>" : ""}<div>`;
|
|
150
150
|
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);
|
|
151
151
|
const i = this.domContainer.querySelector(`#cha_${this.iframeId}`), a = this.domContainer.querySelector(`#cha_${this.iframeId}_wrap`);
|
|
152
152
|
if (!i)
|
|
@@ -184,27 +184,25 @@ class ts {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
startAuthResultPolling(t, r) {
|
|
187
|
-
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) =>
|
|
187
|
+
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => Pt(n)).then((n) => {
|
|
188
188
|
this.startAuthResultPolling(t, r), r(n);
|
|
189
189
|
}).catch(() => {
|
|
190
190
|
}), es), () => window.clearTimeout(this.resultPollingTimer);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function ht() {
|
|
194
194
|
return document.body;
|
|
195
195
|
}
|
|
196
196
|
var rs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
197
197
|
function ns(e) {
|
|
198
|
-
if (e.__esModule)
|
|
199
|
-
return e;
|
|
198
|
+
if (e.__esModule) return e;
|
|
200
199
|
var t = e.default;
|
|
201
200
|
if (typeof t == "function") {
|
|
202
201
|
var r = function n() {
|
|
203
202
|
return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
204
203
|
};
|
|
205
204
|
r.prototype = t.prototype;
|
|
206
|
-
} else
|
|
207
|
-
r = {};
|
|
205
|
+
} else r = {};
|
|
208
206
|
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
|
|
209
207
|
var s = Object.getOwnPropertyDescriptor(e, n);
|
|
210
208
|
Object.defineProperty(r, n, s.get ? s : {
|
|
@@ -215,7 +213,7 @@ function ns(e) {
|
|
|
215
213
|
});
|
|
216
214
|
}), r;
|
|
217
215
|
}
|
|
218
|
-
var Mr = {},
|
|
216
|
+
var Mr = {}, $e = {}, ue = {};
|
|
219
217
|
Object.defineProperty(ue, "__esModule", {
|
|
220
218
|
value: !0
|
|
221
219
|
});
|
|
@@ -252,7 +250,7 @@ const as = (e, t, r, n = {}) => {
|
|
|
252
250
|
throw new Ir("Elements not initialized. Use a regular HTTP client if no elements are needed.");
|
|
253
251
|
};
|
|
254
252
|
ue.makeRequestWithoutElementsPayloadCheck = as;
|
|
255
|
-
var $r = {},
|
|
253
|
+
var $r = {}, qe = {}, D = {}, _ = {};
|
|
256
254
|
Object.defineProperty(_, "__esModule", {
|
|
257
255
|
value: !0
|
|
258
256
|
});
|
|
@@ -331,24 +329,24 @@ function qr(e, t) {
|
|
|
331
329
|
return e.apply(t, arguments);
|
|
332
330
|
};
|
|
333
331
|
}
|
|
334
|
-
const { toString: ws } = Object.prototype, { getPrototypeOf:
|
|
332
|
+
const { toString: ws } = Object.prototype, { getPrototypeOf: Kt } = Object, Fe = /* @__PURE__ */ ((e) => (t) => {
|
|
335
333
|
const r = ws.call(t);
|
|
336
334
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
337
|
-
})(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) => Fe(t) === e),
|
|
335
|
+
})(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) => Fe(t) === e), Ke = (e) => (t) => typeof t === e, { isArray: de } = Array, be = Ke("undefined");
|
|
338
336
|
function Ss(e) {
|
|
339
337
|
return e !== null && !be(e) && e.constructor !== null && !be(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
340
338
|
}
|
|
341
|
-
const
|
|
339
|
+
const Fr = I("ArrayBuffer");
|
|
342
340
|
function Ts(e) {
|
|
343
341
|
let t;
|
|
344
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
342
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Fr(e.buffer), t;
|
|
345
343
|
}
|
|
346
|
-
const Rs =
|
|
344
|
+
const Rs = Ke("string"), j = Ke("function"), Kr = Ke("number"), ze = (e) => e !== null && typeof e == "object", As = (e) => e === !0 || e === !1, Ne = (e) => {
|
|
347
345
|
if (Fe(e) !== "object")
|
|
348
346
|
return !1;
|
|
349
|
-
const t =
|
|
347
|
+
const t = Kt(e);
|
|
350
348
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
351
|
-
}, vs = I("Date"),
|
|
349
|
+
}, vs = I("Date"), Cs = I("File"), Os = I("Blob"), Ps = I("FileList"), Bs = (e) => ze(e) && j(e.pipe), xs = (e) => {
|
|
352
350
|
let t;
|
|
353
351
|
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Fe(e)) === "formdata" || // detect form-data instance
|
|
354
352
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
@@ -377,10 +375,10 @@ function zr(e, t) {
|
|
|
377
375
|
return null;
|
|
378
376
|
}
|
|
379
377
|
const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : rs, Wr = (e) => !be(e) && e !== ee;
|
|
380
|
-
function
|
|
378
|
+
function Bt() {
|
|
381
379
|
const { caseless: e } = Wr(this) && this || {}, t = {}, r = (n, s) => {
|
|
382
380
|
const i = e && zr(t, s) || s;
|
|
383
|
-
Ne(t[i]) && Ne(n) ? t[i] =
|
|
381
|
+
Ne(t[i]) && Ne(n) ? t[i] = Bt(t[i], n) : Ne(n) ? t[i] = Bt({}, n) : de(n) ? t[i] = n.slice() : t[i] = n;
|
|
384
382
|
};
|
|
385
383
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
386
384
|
arguments[n] && _e(arguments[n], r);
|
|
@@ -395,31 +393,27 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
395
393
|
}, qs = (e, t, r, n) => {
|
|
396
394
|
let s, i, a;
|
|
397
395
|
const o = {};
|
|
398
|
-
if (t = t || {}, e == null)
|
|
399
|
-
return t;
|
|
396
|
+
if (t = t || {}, e == null) return t;
|
|
400
397
|
do {
|
|
401
398
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
402
399
|
a = s[i], (!n || n(a, e, t)) && !o[a] && (t[a] = e[a], o[a] = !0);
|
|
403
|
-
e = r !== !1 &&
|
|
400
|
+
e = r !== !1 && Kt(e);
|
|
404
401
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
405
402
|
return t;
|
|
406
|
-
},
|
|
403
|
+
}, Fs = (e, t, r) => {
|
|
407
404
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
408
405
|
const n = e.indexOf(t, r);
|
|
409
406
|
return n !== -1 && n === r;
|
|
410
|
-
},
|
|
411
|
-
if (!e)
|
|
412
|
-
|
|
413
|
-
if (de(e))
|
|
414
|
-
return e;
|
|
407
|
+
}, Ks = (e) => {
|
|
408
|
+
if (!e) return null;
|
|
409
|
+
if (de(e)) return e;
|
|
415
410
|
let t = e.length;
|
|
416
|
-
if (!
|
|
417
|
-
return null;
|
|
411
|
+
if (!Kr(t)) return null;
|
|
418
412
|
const r = new Array(t);
|
|
419
413
|
for (; t-- > 0; )
|
|
420
414
|
r[t] = e[t];
|
|
421
415
|
return r;
|
|
422
|
-
}, zs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
416
|
+
}, zs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Kt(Uint8Array)), Ws = (e, t) => {
|
|
423
417
|
const n = (e && e[Symbol.iterator]).call(e);
|
|
424
418
|
let s;
|
|
425
419
|
for (; (s = n.next()) && !s.done; ) {
|
|
@@ -466,10 +460,10 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
466
460
|
};
|
|
467
461
|
return de(e) ? n(e) : n(String(e).split(t)), r;
|
|
468
462
|
}, Zs = () => {
|
|
469
|
-
}, Qs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t,
|
|
463
|
+
}, Qs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, pt = "abcdefghijklmnopqrstuvwxyz", ur = "0123456789", Gr = {
|
|
470
464
|
DIGIT: ur,
|
|
471
|
-
ALPHA:
|
|
472
|
-
ALPHA_DIGIT:
|
|
465
|
+
ALPHA: pt,
|
|
466
|
+
ALPHA_DIGIT: pt + pt.toUpperCase() + ur
|
|
473
467
|
}, ei = (e = 16, t = Gr.ALPHA_DIGIT) => {
|
|
474
468
|
let r = "";
|
|
475
469
|
const { length: n } = t;
|
|
@@ -482,7 +476,7 @@ function ti(e) {
|
|
|
482
476
|
}
|
|
483
477
|
const ri = (e) => {
|
|
484
478
|
const t = new Array(10), r = (n, s) => {
|
|
485
|
-
if (
|
|
479
|
+
if (ze(n)) {
|
|
486
480
|
if (t.indexOf(n) >= 0)
|
|
487
481
|
return;
|
|
488
482
|
if (!("toJSON" in n)) {
|
|
@@ -497,7 +491,7 @@ const ri = (e) => {
|
|
|
497
491
|
return n;
|
|
498
492
|
};
|
|
499
493
|
return r(e, 0);
|
|
500
|
-
}, ni = I("AsyncFunction"), si = (e) => e && (
|
|
494
|
+
}, ni = I("AsyncFunction"), si = (e) => e && (ze(e) || j(e)) && j(e.then) && j(e.catch), Vr = ((e, t) => e ? setImmediate : t ? ((r, n) => (ee.addEventListener("message", ({ source: s, data: i }) => {
|
|
501
495
|
s === ee && i === r && n.length && n.shift()();
|
|
502
496
|
}, !1), (s) => {
|
|
503
497
|
n.push(s), ee.postMessage(r, "*");
|
|
@@ -507,14 +501,14 @@ const ri = (e) => {
|
|
|
507
501
|
), ii = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || Vr;
|
|
508
502
|
var c = {
|
|
509
503
|
isArray: de,
|
|
510
|
-
isArrayBuffer:
|
|
504
|
+
isArrayBuffer: Fr,
|
|
511
505
|
isBuffer: Ss,
|
|
512
506
|
isFormData: xs,
|
|
513
507
|
isArrayBufferView: Ts,
|
|
514
508
|
isString: Rs,
|
|
515
|
-
isNumber:
|
|
509
|
+
isNumber: Kr,
|
|
516
510
|
isBoolean: As,
|
|
517
|
-
isObject:
|
|
511
|
+
isObject: ze,
|
|
518
512
|
isPlainObject: Ne,
|
|
519
513
|
isReadableStream: js,
|
|
520
514
|
isRequest: Ds,
|
|
@@ -522,8 +516,8 @@ var c = {
|
|
|
522
516
|
isHeaders: Ls,
|
|
523
517
|
isUndefined: be,
|
|
524
518
|
isDate: vs,
|
|
525
|
-
isFile:
|
|
526
|
-
isBlob:
|
|
519
|
+
isFile: Cs,
|
|
520
|
+
isBlob: Os,
|
|
527
521
|
isRegExp: Js,
|
|
528
522
|
isFunction: j,
|
|
529
523
|
isStream: Bs,
|
|
@@ -531,7 +525,7 @@ var c = {
|
|
|
531
525
|
isTypedArray: zs,
|
|
532
526
|
isFileList: Ps,
|
|
533
527
|
forEach: _e,
|
|
534
|
-
merge:
|
|
528
|
+
merge: Bt,
|
|
535
529
|
extend: Ms,
|
|
536
530
|
trim: Hs,
|
|
537
531
|
stripBOM: Is,
|
|
@@ -539,8 +533,8 @@ var c = {
|
|
|
539
533
|
toFlatObject: qs,
|
|
540
534
|
kindOf: Fe,
|
|
541
535
|
kindOfTest: I,
|
|
542
|
-
endsWith:
|
|
543
|
-
toArray:
|
|
536
|
+
endsWith: Fs,
|
|
537
|
+
toArray: Ks,
|
|
544
538
|
forEachEntry: Ws,
|
|
545
539
|
matchAll: ks,
|
|
546
540
|
isHTMLForm: Gs,
|
|
@@ -616,7 +610,7 @@ E.from = (e, t, r, n, s, i) => {
|
|
|
616
610
|
}, (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;
|
|
617
611
|
};
|
|
618
612
|
var ai = null;
|
|
619
|
-
function
|
|
613
|
+
function xt(e) {
|
|
620
614
|
return c.isPlainObject(e) || c.isArray(e);
|
|
621
615
|
}
|
|
622
616
|
function Xr(e) {
|
|
@@ -628,12 +622,12 @@ function lr(e, t, r) {
|
|
|
628
622
|
}).join(r ? "." : "") : t;
|
|
629
623
|
}
|
|
630
624
|
function oi(e) {
|
|
631
|
-
return c.isArray(e) && !e.some(
|
|
625
|
+
return c.isArray(e) && !e.some(xt);
|
|
632
626
|
}
|
|
633
627
|
const ci = c.toFlatObject(c, {}, null, function(t) {
|
|
634
628
|
return /^is[A-Z]/.test(t);
|
|
635
629
|
});
|
|
636
|
-
function
|
|
630
|
+
function We(e, t, r) {
|
|
637
631
|
if (!c.isObject(e))
|
|
638
632
|
throw new TypeError("target must be an object");
|
|
639
633
|
t = t || new FormData(), r = c.toFlatObject(r, {
|
|
@@ -647,8 +641,7 @@ function ke(e, t, r) {
|
|
|
647
641
|
if (!c.isFunction(s))
|
|
648
642
|
throw new TypeError("visitor must be a function");
|
|
649
643
|
function u(h) {
|
|
650
|
-
if (h === null)
|
|
651
|
-
return "";
|
|
644
|
+
if (h === null) return "";
|
|
652
645
|
if (c.isDate(h))
|
|
653
646
|
return h.toISOString();
|
|
654
647
|
if (!d && c.isBlob(h))
|
|
@@ -661,20 +654,20 @@ function ke(e, t, r) {
|
|
|
661
654
|
if (c.endsWith(y, "{}"))
|
|
662
655
|
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
663
656
|
else if (c.isArray(h) && oi(h) || (c.isFileList(h) || c.endsWith(y, "[]")) && (S = c.toArray(h)))
|
|
664
|
-
return y = Xr(y), S.forEach(function(
|
|
665
|
-
!(c.isUndefined(
|
|
657
|
+
return y = Xr(y), S.forEach(function(C, W) {
|
|
658
|
+
!(c.isUndefined(C) || C === null) && t.append(
|
|
666
659
|
// eslint-disable-next-line no-nested-ternary
|
|
667
660
|
a === !0 ? lr([y], W, i) : a === null ? y : y + "[]",
|
|
668
|
-
u(
|
|
661
|
+
u(C)
|
|
669
662
|
);
|
|
670
663
|
}), !1;
|
|
671
664
|
}
|
|
672
|
-
return
|
|
665
|
+
return xt(h) ? !0 : (t.append(lr(p, y, i), u(h)), !1);
|
|
673
666
|
}
|
|
674
667
|
const f = [], b = Object.assign(ci, {
|
|
675
668
|
defaultVisitor: l,
|
|
676
669
|
convertValue: u,
|
|
677
|
-
isVisitable:
|
|
670
|
+
isVisitable: xt
|
|
678
671
|
});
|
|
679
672
|
function w(h, y) {
|
|
680
673
|
if (!c.isUndefined(h)) {
|
|
@@ -710,7 +703,7 @@ function dr(e) {
|
|
|
710
703
|
});
|
|
711
704
|
}
|
|
712
705
|
function zt(e, t) {
|
|
713
|
-
this._pairs = [], e &&
|
|
706
|
+
this._pairs = [], e && We(e, this, t);
|
|
714
707
|
}
|
|
715
708
|
const Zr = zt.prototype;
|
|
716
709
|
Zr.append = function(t, r) {
|
|
@@ -805,21 +798,21 @@ var fr = li, en = {
|
|
|
805
798
|
},
|
|
806
799
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
807
800
|
};
|
|
808
|
-
const Wt = typeof window < "u" && typeof document < "u",
|
|
801
|
+
const Wt = typeof window < "u" && typeof document < "u", Nt = typeof navigator == "object" && navigator || void 0, mi = Wt && (!Nt || ["ReactNative", "NativeScript", "NS"].indexOf(Nt.product) < 0), yi = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
809
802
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ei = Wt && window.location.href || "http://localhost";
|
|
810
803
|
var bi = /* @__PURE__ */ Object.freeze({
|
|
811
804
|
__proto__: null,
|
|
812
805
|
hasBrowserEnv: Wt,
|
|
813
806
|
hasStandardBrowserWebWorkerEnv: yi,
|
|
814
807
|
hasStandardBrowserEnv: mi,
|
|
815
|
-
navigator:
|
|
808
|
+
navigator: Nt,
|
|
816
809
|
origin: Ei
|
|
817
810
|
}), N = {
|
|
818
811
|
...bi,
|
|
819
812
|
...pi
|
|
820
813
|
};
|
|
821
814
|
function _i(e, t) {
|
|
822
|
-
return
|
|
815
|
+
return We(e, new N.classes.URLSearchParams(), Object.assign({
|
|
823
816
|
visitor: function(r, n, s, i) {
|
|
824
817
|
return N.isNode && c.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
825
818
|
}
|
|
@@ -840,8 +833,7 @@ function wi(e) {
|
|
|
840
833
|
function tn(e) {
|
|
841
834
|
function t(r, n, s, i) {
|
|
842
835
|
let a = r[i++];
|
|
843
|
-
if (a === "__proto__")
|
|
844
|
-
return !0;
|
|
836
|
+
if (a === "__proto__") return !0;
|
|
845
837
|
const o = Number.isFinite(+a), d = i >= r.length;
|
|
846
838
|
return a = !a && c.isArray(s) ? s.length : a, d ? (c.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !c.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && c.isArray(s[a]) && (s[a] = wi(s[a])), !o);
|
|
847
839
|
}
|
|
@@ -861,7 +853,7 @@ function Si(e, t, r) {
|
|
|
861
853
|
if (n.name !== "SyntaxError")
|
|
862
854
|
throw n;
|
|
863
855
|
}
|
|
864
|
-
return (
|
|
856
|
+
return (r || JSON.stringify)(e);
|
|
865
857
|
}
|
|
866
858
|
const kt = {
|
|
867
859
|
transitional: en,
|
|
@@ -882,7 +874,7 @@ const kt = {
|
|
|
882
874
|
return _i(t, this.formSerializer).toString();
|
|
883
875
|
if ((o = c.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
884
876
|
const d = this.env && this.env.FormData;
|
|
885
|
-
return
|
|
877
|
+
return We(
|
|
886
878
|
o ? { "files[]": t } : t,
|
|
887
879
|
d && new d(),
|
|
888
880
|
this.formSerializer
|
|
@@ -975,7 +967,7 @@ function Ai(e) {
|
|
|
975
967
|
return t;
|
|
976
968
|
}
|
|
977
969
|
const vi = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
978
|
-
function
|
|
970
|
+
function mt(e, t, r, n, s) {
|
|
979
971
|
if (c.isFunction(n))
|
|
980
972
|
return n.call(this, t, r);
|
|
981
973
|
if (s && (t = r), !!c.isString(t)) {
|
|
@@ -985,10 +977,10 @@ function yt(e, t, r, n, s) {
|
|
|
985
977
|
return n.test(t);
|
|
986
978
|
}
|
|
987
979
|
}
|
|
988
|
-
function
|
|
980
|
+
function Ci(e) {
|
|
989
981
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
990
982
|
}
|
|
991
|
-
function
|
|
983
|
+
function Oi(e, t) {
|
|
992
984
|
const r = c.toCamelCase(" " + t);
|
|
993
985
|
["get", "set", "has"].forEach((n) => {
|
|
994
986
|
Object.defineProperty(e, n + r, {
|
|
@@ -999,7 +991,7 @@ function Ci(e, t) {
|
|
|
999
991
|
});
|
|
1000
992
|
});
|
|
1001
993
|
}
|
|
1002
|
-
class
|
|
994
|
+
class ke {
|
|
1003
995
|
constructor(t) {
|
|
1004
996
|
t && this.set(t);
|
|
1005
997
|
}
|
|
@@ -1044,7 +1036,7 @@ class Ge {
|
|
|
1044
1036
|
has(t, r) {
|
|
1045
1037
|
if (t = he(t), t) {
|
|
1046
1038
|
const n = c.findKey(this, t);
|
|
1047
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1039
|
+
return !!(n && this[n] !== void 0 && (!r || mt(this, this[n], n, r)));
|
|
1048
1040
|
}
|
|
1049
1041
|
return !1;
|
|
1050
1042
|
}
|
|
@@ -1054,7 +1046,7 @@ class Ge {
|
|
|
1054
1046
|
function i(a) {
|
|
1055
1047
|
if (a = he(a), a) {
|
|
1056
1048
|
const o = c.findKey(n, a);
|
|
1057
|
-
o && (!r ||
|
|
1049
|
+
o && (!r || mt(n, n[o], o, r)) && (delete n[o], s = !0);
|
|
1058
1050
|
}
|
|
1059
1051
|
}
|
|
1060
1052
|
return c.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -1064,7 +1056,7 @@ class Ge {
|
|
|
1064
1056
|
let n = r.length, s = !1;
|
|
1065
1057
|
for (; n--; ) {
|
|
1066
1058
|
const i = r[n];
|
|
1067
|
-
(!t ||
|
|
1059
|
+
(!t || mt(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
1068
1060
|
}
|
|
1069
1061
|
return s;
|
|
1070
1062
|
}
|
|
@@ -1076,7 +1068,7 @@ class Ge {
|
|
|
1076
1068
|
r[a] = je(s), delete r[i];
|
|
1077
1069
|
return;
|
|
1078
1070
|
}
|
|
1079
|
-
const o = t ?
|
|
1071
|
+
const o = t ? Ci(i) : String(i).trim();
|
|
1080
1072
|
o !== i && delete r[i], r[o] = je(s), n[o] = !0;
|
|
1081
1073
|
}), this;
|
|
1082
1074
|
}
|
|
@@ -1112,13 +1104,13 @@ class Ge {
|
|
|
1112
1104
|
}).accessors, s = this.prototype;
|
|
1113
1105
|
function i(a) {
|
|
1114
1106
|
const o = he(a);
|
|
1115
|
-
n[o] || (
|
|
1107
|
+
n[o] || (Oi(s, a), n[o] = !0);
|
|
1116
1108
|
}
|
|
1117
1109
|
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1118
1110
|
}
|
|
1119
1111
|
}
|
|
1120
|
-
|
|
1121
|
-
c.reduceDescriptors(
|
|
1112
|
+
ke.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1113
|
+
c.reduceDescriptors(ke.prototype, ({ value: e }, t) => {
|
|
1122
1114
|
let r = t[0].toUpperCase() + t.slice(1);
|
|
1123
1115
|
return {
|
|
1124
1116
|
get: () => e,
|
|
@@ -1127,9 +1119,9 @@ c.reduceDescriptors(Ge.prototype, ({ value: e }, t) => {
|
|
|
1127
1119
|
}
|
|
1128
1120
|
};
|
|
1129
1121
|
});
|
|
1130
|
-
c.freezeMethods(
|
|
1131
|
-
var H =
|
|
1132
|
-
function
|
|
1122
|
+
c.freezeMethods(ke);
|
|
1123
|
+
var H = ke;
|
|
1124
|
+
function yt(e, t) {
|
|
1133
1125
|
const r = this || Gt, n = t || r, s = H.from(n.headers);
|
|
1134
1126
|
let i = n.data;
|
|
1135
1127
|
return c.forEach(e, function(o) {
|
|
@@ -1187,7 +1179,7 @@ function xi(e, t) {
|
|
|
1187
1179
|
}, n - f)));
|
|
1188
1180
|
}, () => s && a(s)];
|
|
1189
1181
|
}
|
|
1190
|
-
const
|
|
1182
|
+
const Ue = (e, t, r = 3) => {
|
|
1191
1183
|
let n = 0;
|
|
1192
1184
|
const s = Bi(50, 250);
|
|
1193
1185
|
return xi((i) => {
|
|
@@ -1292,8 +1284,7 @@ function ne(e, t) {
|
|
|
1292
1284
|
if (c.isUndefined(l)) {
|
|
1293
1285
|
if (!c.isUndefined(u))
|
|
1294
1286
|
return n(void 0, u, f);
|
|
1295
|
-
} else
|
|
1296
|
-
return n(u, l, f);
|
|
1287
|
+
} else return n(u, l, f);
|
|
1297
1288
|
}
|
|
1298
1289
|
function i(u, l) {
|
|
1299
1290
|
if (!c.isUndefined(l))
|
|
@@ -1303,8 +1294,7 @@ function ne(e, t) {
|
|
|
1303
1294
|
if (c.isUndefined(l)) {
|
|
1304
1295
|
if (!c.isUndefined(u))
|
|
1305
1296
|
return n(void 0, u);
|
|
1306
|
-
} else
|
|
1307
|
-
return n(void 0, l);
|
|
1297
|
+
} else return n(void 0, l);
|
|
1308
1298
|
}
|
|
1309
1299
|
function o(u, l, f) {
|
|
1310
1300
|
if (f in t)
|
|
@@ -1385,13 +1375,13 @@ var Hi = Li && function(e) {
|
|
|
1385
1375
|
function S() {
|
|
1386
1376
|
if (!p)
|
|
1387
1377
|
return;
|
|
1388
|
-
const
|
|
1378
|
+
const C = H.from(
|
|
1389
1379
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1390
1380
|
), P = {
|
|
1391
1381
|
data: !o || o === "text" || o === "json" ? p.responseText : p.response,
|
|
1392
1382
|
status: p.status,
|
|
1393
1383
|
statusText: p.statusText,
|
|
1394
|
-
headers:
|
|
1384
|
+
headers: C,
|
|
1395
1385
|
config: e,
|
|
1396
1386
|
request: p
|
|
1397
1387
|
};
|
|
@@ -1418,8 +1408,8 @@ var Hi = Li && function(e) {
|
|
|
1418
1408
|
)), p = null;
|
|
1419
1409
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in p && c.forEach(a.toJSON(), function(W, P) {
|
|
1420
1410
|
p.setRequestHeader(P, W);
|
|
1421
|
-
}), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), o && o !== "json" && (p.responseType = s.responseType), u && ([b, h] =
|
|
1422
|
-
p && (n(!
|
|
1411
|
+
}), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), o && o !== "json" && (p.responseType = s.responseType), u && ([b, h] = Ue(u, !0), p.addEventListener("progress", b)), d && p.upload && ([f, w] = Ue(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (C) => {
|
|
1412
|
+
p && (n(!C || C.type ? new fe(null, e, p) : C), p.abort(), p = null);
|
|
1423
1413
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1424
1414
|
const v = Pi(s.url);
|
|
1425
1415
|
if (v && N.protocols.indexOf(v) === -1) {
|
|
@@ -1464,9 +1454,9 @@ const $i = function* (e, t) {
|
|
|
1464
1454
|
for (; n < r; )
|
|
1465
1455
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1466
1456
|
}, qi = async function* (e, t) {
|
|
1467
|
-
for await (const r of
|
|
1457
|
+
for await (const r of Fi(e))
|
|
1468
1458
|
yield* $i(r, t);
|
|
1469
|
-
},
|
|
1459
|
+
}, Fi = async function* (e) {
|
|
1470
1460
|
if (e[Symbol.asyncIterator]) {
|
|
1471
1461
|
yield* e;
|
|
1472
1462
|
return;
|
|
@@ -1511,7 +1501,7 @@ const $i = function* (e, t) {
|
|
|
1511
1501
|
}, {
|
|
1512
1502
|
highWaterMark: 2
|
|
1513
1503
|
});
|
|
1514
|
-
},
|
|
1504
|
+
}, Ge = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", on = Ge && typeof ReadableStream == "function", Ki = Ge && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), cn = (e, ...t) => {
|
|
1515
1505
|
try {
|
|
1516
1506
|
return !!e(...t);
|
|
1517
1507
|
} catch {
|
|
@@ -1527,12 +1517,12 @@ const $i = function* (e, t) {
|
|
|
1527
1517
|
}
|
|
1528
1518
|
}).headers.has("Content-Type");
|
|
1529
1519
|
return e && !t;
|
|
1530
|
-
}), br = 64 * 1024,
|
|
1531
|
-
stream:
|
|
1520
|
+
}), br = 64 * 1024, jt = on && cn(() => c.isReadableStream(new Response("").body)), Le = {
|
|
1521
|
+
stream: jt && ((e) => e.body)
|
|
1532
1522
|
};
|
|
1533
|
-
|
|
1523
|
+
Ge && ((e) => {
|
|
1534
1524
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1535
|
-
!
|
|
1525
|
+
!Le[t] && (Le[t] = c.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1536
1526
|
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, n);
|
|
1537
1527
|
});
|
|
1538
1528
|
});
|
|
@@ -1550,12 +1540,12 @@ const Wi = async (e) => {
|
|
|
1550
1540
|
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1551
1541
|
return e.byteLength;
|
|
1552
1542
|
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1553
|
-
return (await
|
|
1543
|
+
return (await Ki(e)).byteLength;
|
|
1554
1544
|
}, ki = async (e, t) => {
|
|
1555
1545
|
const r = c.toFiniteNumber(e.getContentLength());
|
|
1556
1546
|
return r ?? Wi(t);
|
|
1557
1547
|
};
|
|
1558
|
-
var Gi =
|
|
1548
|
+
var Gi = Ge && (async (e) => {
|
|
1559
1549
|
let {
|
|
1560
1550
|
url: t,
|
|
1561
1551
|
method: r,
|
|
@@ -1586,7 +1576,7 @@ var Gi = Ve && (async (e) => {
|
|
|
1586
1576
|
if (c.isFormData(n) && (G = P.headers.get("content-type")) && l.setContentType(G), P.body) {
|
|
1587
1577
|
const [Z, Re] = pr(
|
|
1588
1578
|
p,
|
|
1589
|
-
|
|
1579
|
+
Ue(mr(d))
|
|
1590
1580
|
);
|
|
1591
1581
|
n = Er(P.body, br, Z, Re);
|
|
1592
1582
|
}
|
|
@@ -1603,15 +1593,15 @@ var Gi = Ve && (async (e) => {
|
|
|
1603
1593
|
credentials: S ? f : void 0
|
|
1604
1594
|
});
|
|
1605
1595
|
let v = await fetch(h);
|
|
1606
|
-
const
|
|
1607
|
-
if (
|
|
1596
|
+
const C = jt && (u === "stream" || u === "response");
|
|
1597
|
+
if (jt && (o || C && y)) {
|
|
1608
1598
|
const P = {};
|
|
1609
1599
|
["status", "statusText", "headers"].forEach((or) => {
|
|
1610
1600
|
P[or] = v[or];
|
|
1611
1601
|
});
|
|
1612
1602
|
const G = c.toFiniteNumber(v.headers.get("content-length")), [Z, Re] = o && pr(
|
|
1613
1603
|
G,
|
|
1614
|
-
|
|
1604
|
+
Ue(mr(o), !0)
|
|
1615
1605
|
) || [];
|
|
1616
1606
|
v = new Response(
|
|
1617
1607
|
Er(v.body, br, Z, () => {
|
|
@@ -1621,8 +1611,8 @@ var Gi = Ve && (async (e) => {
|
|
|
1621
1611
|
);
|
|
1622
1612
|
}
|
|
1623
1613
|
u = u || "text";
|
|
1624
|
-
let W = await
|
|
1625
|
-
return !
|
|
1614
|
+
let W = await Le[c.findKey(Le, u) || "text"](v, e);
|
|
1615
|
+
return !C && y && y(), await new Promise((P, G) => {
|
|
1626
1616
|
nn(P, G, {
|
|
1627
1617
|
data: W,
|
|
1628
1618
|
headers: H.from(v.headers),
|
|
@@ -1641,12 +1631,12 @@ var Gi = Ve && (async (e) => {
|
|
|
1641
1631
|
) : E.from(S, S && S.code, e, h);
|
|
1642
1632
|
}
|
|
1643
1633
|
});
|
|
1644
|
-
const
|
|
1634
|
+
const Dt = {
|
|
1645
1635
|
http: ai,
|
|
1646
1636
|
xhr: Hi,
|
|
1647
1637
|
fetch: Gi
|
|
1648
1638
|
};
|
|
1649
|
-
c.forEach(
|
|
1639
|
+
c.forEach(Dt, (e, t) => {
|
|
1650
1640
|
if (e) {
|
|
1651
1641
|
try {
|
|
1652
1642
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1665,7 +1655,7 @@ var un = {
|
|
|
1665
1655
|
for (let i = 0; i < t; i++) {
|
|
1666
1656
|
r = e[i];
|
|
1667
1657
|
let a;
|
|
1668
|
-
if (n = r, !Vi(r) && (n =
|
|
1658
|
+
if (n = r, !Vi(r) && (n = Dt[(a = String(r)).toLowerCase()], n === void 0))
|
|
1669
1659
|
throw new E(`Unknown adapter '${a}'`);
|
|
1670
1660
|
if (n)
|
|
1671
1661
|
break;
|
|
@@ -1685,24 +1675,24 @@ var un = {
|
|
|
1685
1675
|
}
|
|
1686
1676
|
return n;
|
|
1687
1677
|
},
|
|
1688
|
-
adapters:
|
|
1678
|
+
adapters: Dt
|
|
1689
1679
|
};
|
|
1690
|
-
function
|
|
1680
|
+
function Et(e) {
|
|
1691
1681
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1692
1682
|
throw new fe(null, e);
|
|
1693
1683
|
}
|
|
1694
1684
|
function gr(e) {
|
|
1695
|
-
return
|
|
1685
|
+
return Et(e), e.headers = H.from(e.headers), e.data = yt.call(
|
|
1696
1686
|
e,
|
|
1697
1687
|
e.transformRequest
|
|
1698
1688
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), un.getAdapter(e.adapter || Gt.adapter)(e).then(function(n) {
|
|
1699
|
-
return
|
|
1689
|
+
return Et(e), n.data = yt.call(
|
|
1700
1690
|
e,
|
|
1701
1691
|
e.transformResponse,
|
|
1702
1692
|
n
|
|
1703
1693
|
), n.headers = H.from(n.headers), n;
|
|
1704
1694
|
}, function(n) {
|
|
1705
|
-
return rn(n) || (
|
|
1695
|
+
return rn(n) || (Et(e), n && n.response && (n.response.data = yt.call(
|
|
1706
1696
|
e,
|
|
1707
1697
|
e.transformResponse,
|
|
1708
1698
|
n.response
|
|
@@ -1751,12 +1741,12 @@ function Ji(e, t, r) {
|
|
|
1751
1741
|
throw new E("Unknown option " + i, E.ERR_BAD_OPTION);
|
|
1752
1742
|
}
|
|
1753
1743
|
}
|
|
1754
|
-
var
|
|
1744
|
+
var Ut = {
|
|
1755
1745
|
assertOptions: Ji,
|
|
1756
1746
|
validators: Vt
|
|
1757
1747
|
};
|
|
1758
|
-
const V =
|
|
1759
|
-
class
|
|
1748
|
+
const V = Ut.validators;
|
|
1749
|
+
class He {
|
|
1760
1750
|
constructor(t) {
|
|
1761
1751
|
this.defaults = t, this.interceptors = {
|
|
1762
1752
|
request: new fr(),
|
|
@@ -1791,13 +1781,13 @@ class Me {
|
|
|
1791
1781
|
_request(t, r) {
|
|
1792
1782
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = ne(this.defaults, r);
|
|
1793
1783
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1794
|
-
n !== void 0 &&
|
|
1784
|
+
n !== void 0 && Ut.assertOptions(n, {
|
|
1795
1785
|
silentJSONParsing: V.transitional(V.boolean),
|
|
1796
1786
|
forcedJSONParsing: V.transitional(V.boolean),
|
|
1797
1787
|
clarifyTimeoutError: V.transitional(V.boolean)
|
|
1798
1788
|
}, !1), s != null && (c.isFunction(s) ? r.paramsSerializer = {
|
|
1799
1789
|
serialize: s
|
|
1800
|
-
} :
|
|
1790
|
+
} : Ut.assertOptions(s, {
|
|
1801
1791
|
encode: V.function,
|
|
1802
1792
|
serialize: V.function
|
|
1803
1793
|
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1854,7 +1844,7 @@ class Me {
|
|
|
1854
1844
|
}
|
|
1855
1845
|
}
|
|
1856
1846
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1857
|
-
|
|
1847
|
+
He.prototype[t] = function(r, n) {
|
|
1858
1848
|
return this.request(ne(n || {}, {
|
|
1859
1849
|
method: t,
|
|
1860
1850
|
url: r,
|
|
@@ -1875,9 +1865,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1875
1865
|
}));
|
|
1876
1866
|
};
|
|
1877
1867
|
}
|
|
1878
|
-
|
|
1868
|
+
He.prototype[t] = r(), He.prototype[t + "Form"] = r(!0);
|
|
1879
1869
|
});
|
|
1880
|
-
var De =
|
|
1870
|
+
var De = He;
|
|
1881
1871
|
class Jt {
|
|
1882
1872
|
constructor(t) {
|
|
1883
1873
|
if (typeof t != "function")
|
|
@@ -1888,8 +1878,7 @@ class Jt {
|
|
|
1888
1878
|
});
|
|
1889
1879
|
const n = this;
|
|
1890
1880
|
this.promise.then((s) => {
|
|
1891
|
-
if (!n._listeners)
|
|
1892
|
-
return;
|
|
1881
|
+
if (!n._listeners) return;
|
|
1893
1882
|
let i = n._listeners.length;
|
|
1894
1883
|
for (; i-- > 0; )
|
|
1895
1884
|
n._listeners[i](s);
|
|
@@ -1961,7 +1950,7 @@ function Xi(e) {
|
|
|
1961
1950
|
function Zi(e) {
|
|
1962
1951
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
1963
1952
|
}
|
|
1964
|
-
const
|
|
1953
|
+
const Lt = {
|
|
1965
1954
|
Continue: 100,
|
|
1966
1955
|
SwitchingProtocols: 101,
|
|
1967
1956
|
Processing: 102,
|
|
@@ -2026,10 +2015,10 @@ const Ht = {
|
|
|
2026
2015
|
NotExtended: 510,
|
|
2027
2016
|
NetworkAuthenticationRequired: 511
|
|
2028
2017
|
};
|
|
2029
|
-
Object.entries(
|
|
2030
|
-
|
|
2018
|
+
Object.entries(Lt).forEach(([e, t]) => {
|
|
2019
|
+
Lt[t] = e;
|
|
2031
2020
|
});
|
|
2032
|
-
var Qi =
|
|
2021
|
+
var Qi = Lt;
|
|
2033
2022
|
function dn(e) {
|
|
2034
2023
|
const t = new De(e), r = qr(De.prototype.request, t);
|
|
2035
2024
|
return c.extend(r, De.prototype, t, { allOwnKeys: !0 }), c.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
@@ -2042,7 +2031,7 @@ A.CanceledError = fe;
|
|
|
2042
2031
|
A.CancelToken = Yi;
|
|
2043
2032
|
A.isCancel = rn;
|
|
2044
2033
|
A.VERSION = ln;
|
|
2045
|
-
A.toFormData =
|
|
2034
|
+
A.toFormData = We;
|
|
2046
2035
|
A.AxiosError = E;
|
|
2047
2036
|
A.Cancel = A.CanceledError;
|
|
2048
2037
|
A.all = function(t) {
|
|
@@ -2057,7 +2046,7 @@ A.getAdapter = un.getAdapter;
|
|
|
2057
2046
|
A.HttpStatusCode = Qi;
|
|
2058
2047
|
A.default = A;
|
|
2059
2048
|
var fn = A, Yt = { exports: {} };
|
|
2060
|
-
const hn = (e) => typeof e == "object" && e !== null, pn = Symbol("skip"), Sr = (e) => hn(e) && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date),
|
|
2049
|
+
const hn = (e) => typeof e == "object" && e !== null, pn = Symbol("skip"), Sr = (e) => hn(e) && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), Ht = (e, t, r, n = /* @__PURE__ */ new WeakMap()) => {
|
|
2061
2050
|
if (r = {
|
|
2062
2051
|
deep: !1,
|
|
2063
2052
|
target: {},
|
|
@@ -2067,7 +2056,7 @@ const hn = (e) => typeof e == "object" && e !== null, pn = Symbol("skip"), Sr =
|
|
|
2067
2056
|
n.set(e, r.target);
|
|
2068
2057
|
const { target: s } = r;
|
|
2069
2058
|
delete r.target;
|
|
2070
|
-
const i = (a) => a.map((o) => Sr(o) ?
|
|
2059
|
+
const i = (a) => a.map((o) => Sr(o) ? Ht(o, t, r, n) : o);
|
|
2071
2060
|
if (Array.isArray(e))
|
|
2072
2061
|
return i(e);
|
|
2073
2062
|
for (const [a, o] of Object.entries(e)) {
|
|
@@ -2075,14 +2064,14 @@ const hn = (e) => typeof e == "object" && e !== null, pn = Symbol("skip"), Sr =
|
|
|
2075
2064
|
if (d === pn)
|
|
2076
2065
|
continue;
|
|
2077
2066
|
let [u, l, { shouldRecurse: f = !0 } = {}] = d;
|
|
2078
|
-
u !== "__proto__" && (r.deep && f && Sr(l) && (l = Array.isArray(l) ? i(l) :
|
|
2067
|
+
u !== "__proto__" && (r.deep && f && Sr(l) && (l = Array.isArray(l) ? i(l) : Ht(l, t, r, n)), s[u] = l);
|
|
2079
2068
|
}
|
|
2080
2069
|
return s;
|
|
2081
2070
|
};
|
|
2082
2071
|
Yt.exports = (e, t, r) => {
|
|
2083
2072
|
if (!hn(e))
|
|
2084
2073
|
throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);
|
|
2085
|
-
return
|
|
2074
|
+
return Ht(e, t, r);
|
|
2086
2075
|
};
|
|
2087
2076
|
Yt.exports.mapObjectSkip = pn;
|
|
2088
2077
|
var mn = Yt.exports, Xt = { exports: {} };
|
|
@@ -2165,7 +2154,7 @@ class ra {
|
|
|
2165
2154
|
}
|
|
2166
2155
|
}
|
|
2167
2156
|
var na = ra;
|
|
2168
|
-
const Tr = mn, sa = ta, ia = na, aa = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))),
|
|
2157
|
+
const Tr = mn, sa = ta, ia = na, aa = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), bt = new ia({ maxSize: 1e5 }), Rr = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), Ar = (e, t) => {
|
|
2169
2158
|
if (!Rr(e))
|
|
2170
2159
|
return e;
|
|
2171
2160
|
t = {
|
|
@@ -2180,30 +2169,29 @@ const Tr = mn, sa = ta, ia = na, aa = (e, t) => e.some((r) => typeof r == "strin
|
|
|
2180
2169
|
}
|
|
2181
2170
|
if (!(r && aa(r, u))) {
|
|
2182
2171
|
const f = n ? `${u}_` : u;
|
|
2183
|
-
if (
|
|
2184
|
-
u =
|
|
2172
|
+
if (bt.has(f))
|
|
2173
|
+
u = bt.get(f);
|
|
2185
2174
|
else {
|
|
2186
2175
|
const b = sa(u, { pascalCase: n });
|
|
2187
|
-
u.length < 100 &&
|
|
2176
|
+
u.length < 100 && bt.set(f, b), u = b;
|
|
2188
2177
|
}
|
|
2189
2178
|
}
|
|
2190
2179
|
return [u, l];
|
|
2191
2180
|
};
|
|
2192
2181
|
return Tr(e, o(void 0));
|
|
2193
2182
|
};
|
|
2194
|
-
var oa = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => Ar(e[r], t)) : Ar(e, t),
|
|
2183
|
+
var oa = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => Ar(e[r], t)) : Ar(e, t), _t, vr;
|
|
2195
2184
|
function En() {
|
|
2196
|
-
return vr || (vr = 1,
|
|
2185
|
+
return vr || (vr = 1, _t = En()), _t;
|
|
2197
2186
|
}
|
|
2198
|
-
var
|
|
2199
|
-
return
|
|
2187
|
+
var Me = function() {
|
|
2188
|
+
return Me = Object.assign || function(t) {
|
|
2200
2189
|
for (var r, n = 1, s = arguments.length; n < s; n++) {
|
|
2201
2190
|
r = arguments[n];
|
|
2202
|
-
for (var i in r)
|
|
2203
|
-
Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
|
|
2191
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
|
|
2204
2192
|
}
|
|
2205
2193
|
return t;
|
|
2206
|
-
},
|
|
2194
|
+
}, Me.apply(this, arguments);
|
|
2207
2195
|
};
|
|
2208
2196
|
function ca(e) {
|
|
2209
2197
|
return e.toLowerCase();
|
|
@@ -2211,22 +2199,22 @@ function ca(e) {
|
|
|
2211
2199
|
var ua = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], la = /[^A-Z0-9]+/gi;
|
|
2212
2200
|
function da(e, t) {
|
|
2213
2201
|
t === void 0 && (t = {});
|
|
2214
|
-
for (var r = t.splitRegexp, n = r === void 0 ? ua : r, s = t.stripRegexp, i = s === void 0 ? la : s, a = t.transform, o = a === void 0 ? ca : a, d = t.delimiter, u = d === void 0 ? " " : d, l =
|
|
2202
|
+
for (var r = t.splitRegexp, n = r === void 0 ? ua : r, s = t.stripRegexp, i = s === void 0 ? la : s, a = t.transform, o = a === void 0 ? ca : a, d = t.delimiter, u = d === void 0 ? " " : d, l = Cr(Cr(e, n, "$1\0$2"), i, "\0"), f = 0, b = l.length; l.charAt(f) === "\0"; )
|
|
2215
2203
|
f++;
|
|
2216
2204
|
for (; l.charAt(b - 1) === "\0"; )
|
|
2217
2205
|
b--;
|
|
2218
2206
|
return l.slice(f, b).split("\0").map(o).join(u);
|
|
2219
2207
|
}
|
|
2220
|
-
function
|
|
2208
|
+
function Cr(e, t, r) {
|
|
2221
2209
|
return t instanceof RegExp ? e.replace(t, r) : t.reduce(function(n, s) {
|
|
2222
2210
|
return n.replace(s, r);
|
|
2223
2211
|
}, e);
|
|
2224
2212
|
}
|
|
2225
2213
|
function fa(e, t) {
|
|
2226
|
-
return t === void 0 && (t = {}), da(e,
|
|
2214
|
+
return t === void 0 && (t = {}), da(e, Me({ delimiter: "." }, t));
|
|
2227
2215
|
}
|
|
2228
2216
|
function ha(e, t) {
|
|
2229
|
-
return t === void 0 && (t = {}), fa(e,
|
|
2217
|
+
return t === void 0 && (t = {}), fa(e, Me({ delimiter: "_" }, t));
|
|
2230
2218
|
}
|
|
2231
2219
|
const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2232
2220
|
__proto__: null,
|
|
@@ -2248,15 +2236,15 @@ function Ra(e) {
|
|
|
2248
2236
|
return r + " " + n.toLowerCase().split("").join(" ");
|
|
2249
2237
|
});
|
|
2250
2238
|
}
|
|
2251
|
-
var Aa = ya, va =
|
|
2252
|
-
function
|
|
2239
|
+
var Aa = ya, va = Ca;
|
|
2240
|
+
function Ca(e) {
|
|
2253
2241
|
return Aa(e).replace(/[\W_]+(.|$)/g, function(t, r) {
|
|
2254
2242
|
return r ? " " + r : "";
|
|
2255
2243
|
}).trim();
|
|
2256
2244
|
}
|
|
2257
|
-
var
|
|
2245
|
+
var Oa = va, Pa = Ba;
|
|
2258
2246
|
function Ba(e) {
|
|
2259
|
-
return
|
|
2247
|
+
return Oa(e).replace(/\s/g, "_");
|
|
2260
2248
|
}
|
|
2261
2249
|
const xa = mn, Na = Pa;
|
|
2262
2250
|
var ja = function(e, t) {
|
|
@@ -2301,8 +2289,8 @@ Object.defineProperty(m, "__esModule", {
|
|
|
2301
2289
|
value: !0
|
|
2302
2290
|
});
|
|
2303
2291
|
m.transformTokenResponseCamelCase = m.transformTokenRequestSnakeCase = m.transformResponseCamelCase = m.transformRequestSnakeCase = m.transformReactorResponseCamelCase = m.transformReactorRequestSnakeCase = m.transformProxyResponseCamelCase = m.transformProxyRequestSnakeCase = m.proxyRaw = m.getRuntime = m.getQueryParams = m.getOSVersion = m.getBrowser = m.errorInterceptor = m.dataExtractor = m.dataAndHeadersExtractor = m.createRequestConfig = m.concatResponseTransformerWithDefault = m.concatRequestTransformerWithDefault = m.buildUserAgentString = m.buildClientUserAgentString = m.assertInit = void 0;
|
|
2304
|
-
var bn =
|
|
2305
|
-
function
|
|
2292
|
+
var bn = Ve(fn), q = Ve(oa), Or = Ve(En()), La = ma, we = Ve(ja), Ha = ge, te = _;
|
|
2293
|
+
function Ve(e) {
|
|
2306
2294
|
return e && e.__esModule ? e : { default: e };
|
|
2307
2295
|
}
|
|
2308
2296
|
const Ma = (e) => {
|
|
@@ -2332,7 +2320,7 @@ const qa = (e) => {
|
|
|
2332
2320
|
};
|
|
2333
2321
|
};
|
|
2334
2322
|
m.transformReactorRequestSnakeCase = qa;
|
|
2335
|
-
const
|
|
2323
|
+
const Fa = (e) => {
|
|
2336
2324
|
if (!(typeof e > "u"))
|
|
2337
2325
|
return {
|
|
2338
2326
|
...(0, we.default)(e, {
|
|
@@ -2343,8 +2331,8 @@ const Ka = (e) => {
|
|
|
2343
2331
|
} : {}
|
|
2344
2332
|
};
|
|
2345
2333
|
};
|
|
2346
|
-
m.transformProxyRequestSnakeCase =
|
|
2347
|
-
const
|
|
2334
|
+
m.transformProxyRequestSnakeCase = Fa;
|
|
2335
|
+
const Ka = (e) => {
|
|
2348
2336
|
if (!(typeof e > "u"))
|
|
2349
2337
|
return {
|
|
2350
2338
|
...(0, we.default)(e, {
|
|
@@ -2358,7 +2346,7 @@ const Fa = (e) => {
|
|
|
2358
2346
|
} : {}
|
|
2359
2347
|
};
|
|
2360
2348
|
};
|
|
2361
|
-
m.transformTokenRequestSnakeCase =
|
|
2349
|
+
m.transformTokenRequestSnakeCase = Ka;
|
|
2362
2350
|
const Qt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, za = (e) => {
|
|
2363
2351
|
if (!(typeof e > "u"))
|
|
2364
2352
|
return Qt(e) ? {
|
|
@@ -2451,18 +2439,18 @@ const Ja = (e) => ({
|
|
|
2451
2439
|
headers: e == null ? void 0 : e.headers
|
|
2452
2440
|
});
|
|
2453
2441
|
m.dataAndHeadersExtractor = Ja;
|
|
2454
|
-
const
|
|
2455
|
-
m.concatRequestTransformerWithDefault =
|
|
2456
|
-
const
|
|
2457
|
-
m.concatResponseTransformerWithDefault =
|
|
2442
|
+
const Mt = (e) => [e, ...bn.default.defaults.transformRequest];
|
|
2443
|
+
m.concatRequestTransformerWithDefault = Mt;
|
|
2444
|
+
const It = (e) => [...bn.default.defaults.transformResponse, e];
|
|
2445
|
+
m.concatResponseTransformerWithDefault = It;
|
|
2458
2446
|
const Ya = (e, t) => {
|
|
2459
2447
|
if (!e)
|
|
2460
2448
|
return t ? {
|
|
2461
2449
|
...t.transformRequest !== void 0 ? {
|
|
2462
|
-
transformRequest:
|
|
2450
|
+
transformRequest: Mt(t.transformRequest)
|
|
2463
2451
|
} : {},
|
|
2464
2452
|
...t.transformResponse !== void 0 ? {
|
|
2465
|
-
transformResponse:
|
|
2453
|
+
transformResponse: It(t.transformResponse)
|
|
2466
2454
|
} : {}
|
|
2467
2455
|
} : void 0;
|
|
2468
2456
|
const {
|
|
@@ -2495,10 +2483,10 @@ const Ya = (e, t) => {
|
|
|
2495
2483
|
params: a
|
|
2496
2484
|
},
|
|
2497
2485
|
...(t == null ? void 0 : t.transformRequest) !== void 0 ? {
|
|
2498
|
-
transformRequest:
|
|
2486
|
+
transformRequest: Mt(t.transformRequest)
|
|
2499
2487
|
} : {},
|
|
2500
2488
|
...(t == null ? void 0 : t.transformResponse) !== void 0 ? {
|
|
2501
|
-
transformResponse:
|
|
2489
|
+
transformResponse: It(t.transformResponse)
|
|
2502
2490
|
} : {}
|
|
2503
2491
|
};
|
|
2504
2492
|
};
|
|
@@ -2553,7 +2541,7 @@ const gn = () => typeof window == "object" && window.navigator.product === "Reac
|
|
|
2553
2541
|
return "ReactNative";
|
|
2554
2542
|
if (typeof window > "u")
|
|
2555
2543
|
try {
|
|
2556
|
-
return `${
|
|
2544
|
+
return `${Or.default.type()}/${Or.default.version()}`;
|
|
2557
2545
|
} catch {
|
|
2558
2546
|
return "unknown";
|
|
2559
2547
|
}
|
|
@@ -2578,11 +2566,11 @@ const to = (e) => {
|
|
|
2578
2566
|
return e && (t.application = e), JSON.stringify((0, we.default)(t));
|
|
2579
2567
|
};
|
|
2580
2568
|
m.buildClientUserAgentString = to;
|
|
2581
|
-
var
|
|
2582
|
-
Object.defineProperty(
|
|
2569
|
+
var Je = {};
|
|
2570
|
+
Object.defineProperty(Je, "__esModule", {
|
|
2583
2571
|
value: !0
|
|
2584
2572
|
});
|
|
2585
|
-
|
|
2573
|
+
Je.BasisTheoryValidationError = void 0;
|
|
2586
2574
|
function ro(e) {
|
|
2587
2575
|
function t() {
|
|
2588
2576
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
@@ -2602,12 +2590,12 @@ class er extends ro(Error) {
|
|
|
2602
2590
|
super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this, er.prototype);
|
|
2603
2591
|
}
|
|
2604
2592
|
}
|
|
2605
|
-
|
|
2606
|
-
var
|
|
2607
|
-
Object.defineProperty(
|
|
2593
|
+
Je.BasisTheoryValidationError = er;
|
|
2594
|
+
var Ye = {};
|
|
2595
|
+
Object.defineProperty(Ye, "__esModule", {
|
|
2608
2596
|
value: !0
|
|
2609
2597
|
});
|
|
2610
|
-
|
|
2598
|
+
Ye.HttpClientError = void 0;
|
|
2611
2599
|
function no(e) {
|
|
2612
2600
|
function t() {
|
|
2613
2601
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
@@ -2627,7 +2615,7 @@ class tr extends no(Error) {
|
|
|
2627
2615
|
super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this, tr.prototype);
|
|
2628
2616
|
}
|
|
2629
2617
|
}
|
|
2630
|
-
|
|
2618
|
+
Ye.HttpClientError = tr;
|
|
2631
2619
|
(function(e) {
|
|
2632
2620
|
Object.defineProperty(e, "__esModule", {
|
|
2633
2621
|
value: !0
|
|
@@ -2671,13 +2659,13 @@ Xe.HttpClientError = tr;
|
|
|
2671
2659
|
}
|
|
2672
2660
|
});
|
|
2673
2661
|
});
|
|
2674
|
-
var s = ge, i =
|
|
2662
|
+
var s = ge, i = Je, a = Ye;
|
|
2675
2663
|
})(D);
|
|
2676
|
-
var U = {}, so = {},
|
|
2677
|
-
Object.defineProperty(
|
|
2664
|
+
var U = {}, so = {}, Xe = {};
|
|
2665
|
+
Object.defineProperty(Xe, "__esModule", {
|
|
2678
2666
|
value: !0
|
|
2679
2667
|
});
|
|
2680
|
-
|
|
2668
|
+
Xe.BasisTheoryService = void 0;
|
|
2681
2669
|
var Ae = io(fn), J = D;
|
|
2682
2670
|
function io(e) {
|
|
2683
2671
|
return e && e.__esModule ? e : { default: e };
|
|
@@ -2709,7 +2697,7 @@ class ao {
|
|
|
2709
2697
|
}), this.client.interceptors.response.use(void 0, J.errorInterceptor);
|
|
2710
2698
|
}
|
|
2711
2699
|
}
|
|
2712
|
-
|
|
2700
|
+
Xe.BasisTheoryService = ao;
|
|
2713
2701
|
(function(e) {
|
|
2714
2702
|
Object.defineProperty(e, "__esModule", {
|
|
2715
2703
|
value: !0
|
|
@@ -2723,7 +2711,7 @@ Ze.BasisTheoryService = ao;
|
|
|
2723
2711
|
}
|
|
2724
2712
|
});
|
|
2725
2713
|
});
|
|
2726
|
-
var r =
|
|
2714
|
+
var r = Xe;
|
|
2727
2715
|
Object.keys(r).forEach(function(n) {
|
|
2728
2716
|
n === "default" || n === "__esModule" || n in e && e[n] === r[n] || Object.defineProperty(e, n, {
|
|
2729
2717
|
enumerable: !0,
|
|
@@ -2733,11 +2721,11 @@ Ze.BasisTheoryService = ao;
|
|
|
2733
2721
|
});
|
|
2734
2722
|
});
|
|
2735
2723
|
})(U);
|
|
2736
|
-
Object.defineProperty(
|
|
2724
|
+
Object.defineProperty(qe, "__esModule", {
|
|
2737
2725
|
value: !0
|
|
2738
2726
|
});
|
|
2739
|
-
|
|
2740
|
-
var
|
|
2727
|
+
qe.BasisTheoryTransactions = void 0;
|
|
2728
|
+
var gt = D, pe = m, oo = U;
|
|
2741
2729
|
class co extends oo.BasisTheoryService {
|
|
2742
2730
|
constructor(t) {
|
|
2743
2731
|
const r = {
|
|
@@ -2746,23 +2734,23 @@ class co extends oo.BasisTheoryService {
|
|
|
2746
2734
|
r.transformRequest = [].concat(pe.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(pe.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
2747
2735
|
}
|
|
2748
2736
|
create(t = {}) {
|
|
2749
|
-
return this.client.post("/", void 0, (0,
|
|
2737
|
+
return this.client.post("/", void 0, (0, gt.createRequestConfig)(t)).then(pe.dataExtractor);
|
|
2750
2738
|
}
|
|
2751
2739
|
commit(t, r = {}) {
|
|
2752
2740
|
const n = `/${t}/commit`;
|
|
2753
|
-
return this.client.post(n, void 0, (0,
|
|
2741
|
+
return this.client.post(n, void 0, (0, gt.createRequestConfig)(r)).then(pe.dataExtractor);
|
|
2754
2742
|
}
|
|
2755
2743
|
rollback(t, r = {}) {
|
|
2756
2744
|
const n = `/${t}/rollback`;
|
|
2757
|
-
return this.client.post(n, void 0, (0,
|
|
2745
|
+
return this.client.post(n, void 0, (0, gt.createRequestConfig)(r)).then(pe.dataExtractor);
|
|
2758
2746
|
}
|
|
2759
2747
|
}
|
|
2760
|
-
|
|
2748
|
+
qe.BasisTheoryTransactions = co;
|
|
2761
2749
|
(function(e) {
|
|
2762
2750
|
Object.defineProperty(e, "__esModule", {
|
|
2763
2751
|
value: !0
|
|
2764
2752
|
});
|
|
2765
|
-
var t =
|
|
2753
|
+
var t = qe;
|
|
2766
2754
|
Object.keys(t).forEach(function(r) {
|
|
2767
2755
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
2768
2756
|
enumerable: !0,
|
|
@@ -2772,7 +2760,7 @@ Ke.BasisTheoryTransactions = co;
|
|
|
2772
2760
|
});
|
|
2773
2761
|
});
|
|
2774
2762
|
})($r);
|
|
2775
|
-
var rr = {},
|
|
2763
|
+
var rr = {}, Ze = {}, z = {};
|
|
2776
2764
|
Object.defineProperty(z, "__esModule", {
|
|
2777
2765
|
value: !0
|
|
2778
2766
|
});
|
|
@@ -2838,10 +2826,10 @@ class yo {
|
|
|
2838
2826
|
}
|
|
2839
2827
|
}
|
|
2840
2828
|
z.CrudBuilder = yo;
|
|
2841
|
-
Object.defineProperty(
|
|
2829
|
+
Object.defineProperty(Ze, "__esModule", {
|
|
2842
2830
|
value: !0
|
|
2843
2831
|
});
|
|
2844
|
-
|
|
2832
|
+
Ze.BasisTheoryApplications = void 0;
|
|
2845
2833
|
var ve = D, Eo = U, bo = z;
|
|
2846
2834
|
const _o = new bo.CrudBuilder(class extends Eo.BasisTheoryService {
|
|
2847
2835
|
/**
|
|
@@ -2857,7 +2845,7 @@ const _o = new bo.CrudBuilder(class extends Eo.BasisTheoryService {
|
|
|
2857
2845
|
return this.client.post(`${t}/regenerate`, void 0, (0, ve.createRequestConfig)(r)).then(ve.dataExtractor);
|
|
2858
2846
|
}
|
|
2859
2847
|
}).create().retrieve().update().delete().list().build();
|
|
2860
|
-
|
|
2848
|
+
Ze.BasisTheoryApplications = _o;
|
|
2861
2849
|
(function(e) {
|
|
2862
2850
|
Object.defineProperty(e, "__esModule", {
|
|
2863
2851
|
value: !0
|
|
@@ -2867,23 +2855,23 @@ Qe.BasisTheoryApplications = _o;
|
|
|
2867
2855
|
return t.BasisTheoryApplications;
|
|
2868
2856
|
}
|
|
2869
2857
|
});
|
|
2870
|
-
var t =
|
|
2858
|
+
var t = Ze;
|
|
2871
2859
|
})(rr);
|
|
2872
|
-
var Tn = {}, Rn = {},
|
|
2873
|
-
Object.defineProperty(
|
|
2860
|
+
var Tn = {}, Rn = {}, Qe = {}, An = {}, et = {};
|
|
2861
|
+
Object.defineProperty(et, "__esModule", {
|
|
2874
2862
|
value: !0
|
|
2875
2863
|
});
|
|
2876
|
-
|
|
2877
|
-
var
|
|
2864
|
+
et.BasisTheoryTokenize = void 0;
|
|
2865
|
+
var Ce = D, go = U;
|
|
2878
2866
|
class wo extends go.BasisTheoryService {
|
|
2879
2867
|
tokenize(t, r = {}) {
|
|
2880
|
-
return this.client.post("/", t, (0,
|
|
2881
|
-
transformRequest:
|
|
2882
|
-
transformResponse:
|
|
2883
|
-
})).then(
|
|
2868
|
+
return this.client.post("/", t, (0, Ce.createRequestConfig)(r, {
|
|
2869
|
+
transformRequest: Ce.proxyRaw,
|
|
2870
|
+
transformResponse: Ce.proxyRaw
|
|
2871
|
+
})).then(Ce.dataExtractor);
|
|
2884
2872
|
}
|
|
2885
2873
|
}
|
|
2886
|
-
|
|
2874
|
+
et.BasisTheoryTokenize = wo;
|
|
2887
2875
|
(function(e) {
|
|
2888
2876
|
Object.defineProperty(e, "__esModule", {
|
|
2889
2877
|
value: !0
|
|
@@ -2893,24 +2881,24 @@ tt.BasisTheoryTokenize = wo;
|
|
|
2893
2881
|
return t.BasisTheoryTokenize;
|
|
2894
2882
|
}
|
|
2895
2883
|
});
|
|
2896
|
-
var t =
|
|
2884
|
+
var t = et;
|
|
2897
2885
|
})(An);
|
|
2898
|
-
Object.defineProperty(
|
|
2886
|
+
Object.defineProperty(Qe, "__esModule", {
|
|
2899
2887
|
value: !0
|
|
2900
2888
|
});
|
|
2901
|
-
|
|
2889
|
+
Qe.delegateTokenize = void 0;
|
|
2902
2890
|
var So = An;
|
|
2903
2891
|
const To = (e) => class extends So.BasisTheoryTokenize {
|
|
2904
2892
|
tokenize(r, n) {
|
|
2905
2893
|
return e != null && e.hasElement(r) ? e.tokenize(r, n) : super.tokenize(r, n);
|
|
2906
2894
|
}
|
|
2907
2895
|
};
|
|
2908
|
-
|
|
2909
|
-
var
|
|
2910
|
-
Object.defineProperty(
|
|
2896
|
+
Qe.delegateTokenize = To;
|
|
2897
|
+
var tt = {}, nr = {}, rt = {};
|
|
2898
|
+
Object.defineProperty(rt, "__esModule", {
|
|
2911
2899
|
value: !0
|
|
2912
2900
|
});
|
|
2913
|
-
|
|
2901
|
+
rt.BasisTheoryTokens = void 0;
|
|
2914
2902
|
var $ = D, Q = m, Ro = U, Ao = z;
|
|
2915
2903
|
const vo = new Ao.CrudBuilder(class extends Ro.BasisTheoryService {
|
|
2916
2904
|
constructor(t) {
|
|
@@ -2951,7 +2939,7 @@ const vo = new Ao.CrudBuilder(class extends Ro.BasisTheoryService {
|
|
|
2951
2939
|
return this.client.post("/search", t, (0, $.createRequestConfig)(r)).then(Q.dataExtractor);
|
|
2952
2940
|
}
|
|
2953
2941
|
}).create().delete().list().build();
|
|
2954
|
-
|
|
2942
|
+
rt.BasisTheoryTokens = vo;
|
|
2955
2943
|
(function(e) {
|
|
2956
2944
|
Object.defineProperty(e, "__esModule", {
|
|
2957
2945
|
value: !0
|
|
@@ -2961,14 +2949,14 @@ nt.BasisTheoryTokens = vo;
|
|
|
2961
2949
|
return t.BasisTheoryTokens;
|
|
2962
2950
|
}
|
|
2963
2951
|
});
|
|
2964
|
-
var t =
|
|
2952
|
+
var t = rt;
|
|
2965
2953
|
})(nr);
|
|
2966
|
-
Object.defineProperty(
|
|
2954
|
+
Object.defineProperty(tt, "__esModule", {
|
|
2967
2955
|
value: !0
|
|
2968
2956
|
});
|
|
2969
|
-
|
|
2970
|
-
var
|
|
2971
|
-
const
|
|
2957
|
+
tt.delegateTokens = void 0;
|
|
2958
|
+
var Co = nr;
|
|
2959
|
+
const Oo = (e) => class extends Co.BasisTheoryTokens {
|
|
2972
2960
|
create(r, n) {
|
|
2973
2961
|
return e != null && e.hasElement(r) ? e.tokens.create(r, n) : super.create(r, n);
|
|
2974
2962
|
}
|
|
@@ -2979,12 +2967,12 @@ const Co = (e) => class extends Oo.BasisTheoryTokens {
|
|
|
2979
2967
|
return e !== void 0 ? e.tokens.retrieve(r, n) : super.retrieve(r, n);
|
|
2980
2968
|
}
|
|
2981
2969
|
};
|
|
2982
|
-
|
|
2983
|
-
var
|
|
2984
|
-
Object.defineProperty(
|
|
2970
|
+
tt.delegateTokens = Oo;
|
|
2971
|
+
var nt = {}, vn = {}, st = {};
|
|
2972
|
+
Object.defineProperty(st, "__esModule", {
|
|
2985
2973
|
value: !0
|
|
2986
2974
|
});
|
|
2987
|
-
|
|
2975
|
+
st.BasisTheoryProxy = void 0;
|
|
2988
2976
|
var k = D, Po = U;
|
|
2989
2977
|
class Bo extends Po.BasisTheoryService {
|
|
2990
2978
|
get(t) {
|
|
@@ -3018,12 +3006,12 @@ class Bo extends Po.BasisTheoryService {
|
|
|
3018
3006
|
})).then(k.dataExtractor);
|
|
3019
3007
|
}
|
|
3020
3008
|
}
|
|
3021
|
-
|
|
3009
|
+
st.BasisTheoryProxy = Bo;
|
|
3022
3010
|
(function(e) {
|
|
3023
3011
|
Object.defineProperty(e, "__esModule", {
|
|
3024
3012
|
value: !0
|
|
3025
3013
|
});
|
|
3026
|
-
var t =
|
|
3014
|
+
var t = st;
|
|
3027
3015
|
Object.keys(t).forEach(function(r) {
|
|
3028
3016
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
3029
3017
|
enumerable: !0,
|
|
@@ -3033,10 +3021,10 @@ it.BasisTheoryProxy = Bo;
|
|
|
3033
3021
|
});
|
|
3034
3022
|
});
|
|
3035
3023
|
})(vn);
|
|
3036
|
-
Object.defineProperty(
|
|
3024
|
+
Object.defineProperty(nt, "__esModule", {
|
|
3037
3025
|
value: !0
|
|
3038
3026
|
});
|
|
3039
|
-
|
|
3027
|
+
nt.delegateProxy = void 0;
|
|
3040
3028
|
var xo = vn;
|
|
3041
3029
|
const No = (e) => class extends xo.BasisTheoryProxy {
|
|
3042
3030
|
get(r) {
|
|
@@ -3055,12 +3043,12 @@ const No = (e) => class extends xo.BasisTheoryProxy {
|
|
|
3055
3043
|
return e !== void 0 ? e.proxy.delete(r) : super.delete(r);
|
|
3056
3044
|
}
|
|
3057
3045
|
};
|
|
3058
|
-
|
|
3046
|
+
nt.delegateProxy = No;
|
|
3059
3047
|
(function(e) {
|
|
3060
3048
|
Object.defineProperty(e, "__esModule", {
|
|
3061
3049
|
value: !0
|
|
3062
3050
|
});
|
|
3063
|
-
var t =
|
|
3051
|
+
var t = Qe;
|
|
3064
3052
|
Object.keys(t).forEach(function(s) {
|
|
3065
3053
|
s === "default" || s === "__esModule" || s in e && e[s] === t[s] || Object.defineProperty(e, s, {
|
|
3066
3054
|
enumerable: !0,
|
|
@@ -3069,7 +3057,7 @@ st.delegateProxy = No;
|
|
|
3069
3057
|
}
|
|
3070
3058
|
});
|
|
3071
3059
|
});
|
|
3072
|
-
var r =
|
|
3060
|
+
var r = tt;
|
|
3073
3061
|
Object.keys(r).forEach(function(s) {
|
|
3074
3062
|
s === "default" || s === "__esModule" || s in e && e[s] === r[s] || Object.defineProperty(e, s, {
|
|
3075
3063
|
enumerable: !0,
|
|
@@ -3078,7 +3066,7 @@ st.delegateProxy = No;
|
|
|
3078
3066
|
}
|
|
3079
3067
|
});
|
|
3080
3068
|
});
|
|
3081
|
-
var n =
|
|
3069
|
+
var n = nt;
|
|
3082
3070
|
Object.keys(n).forEach(function(s) {
|
|
3083
3071
|
s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
|
|
3084
3072
|
enumerable: !0,
|
|
@@ -3104,34 +3092,34 @@ const Do = (e) => {
|
|
|
3104
3092
|
return r.append(t), t;
|
|
3105
3093
|
};
|
|
3106
3094
|
se.injectScript = Do;
|
|
3107
|
-
var
|
|
3108
|
-
Object.defineProperty(
|
|
3095
|
+
var it = {}, O = {};
|
|
3096
|
+
Object.defineProperty(O, "__esModule", {
|
|
3109
3097
|
value: !0
|
|
3110
3098
|
});
|
|
3111
|
-
|
|
3099
|
+
O.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = O.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = O.ELEMENTS_NOM_DOM_ERROR_MESSAGE = O.ELEMENTS_INIT_ERROR_MESSAGE = O.CARD_ICON_POSITIONS = O.CARD_BRANDS = O.AUTOCOMPLETE_VALUES = void 0;
|
|
3112
3100
|
const Uo = "BasisTheory Elements was not properly initialized.";
|
|
3113
|
-
|
|
3101
|
+
O.ELEMENTS_INIT_ERROR_MESSAGE = Uo;
|
|
3114
3102
|
const Lo = "Tried to load BasisTheoryElements in a non-DOM environment.";
|
|
3115
|
-
|
|
3103
|
+
O.ELEMENTS_NOM_DOM_ERROR_MESSAGE = Lo;
|
|
3116
3104
|
const Ho = "Basis Theory Elements did not load properly.";
|
|
3117
|
-
|
|
3105
|
+
O.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = Ho;
|
|
3118
3106
|
const Mo = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
|
|
3119
|
-
|
|
3107
|
+
O.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = Mo;
|
|
3120
3108
|
const Io = ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
|
|
3121
|
-
|
|
3109
|
+
O.CARD_BRANDS = Io;
|
|
3122
3110
|
const $o = ["left", "right", "none"];
|
|
3123
|
-
|
|
3111
|
+
O.CARD_ICON_POSITIONS = $o;
|
|
3124
3112
|
const qo = ["off", "on"];
|
|
3125
|
-
|
|
3126
|
-
Object.defineProperty(
|
|
3113
|
+
O.AUTOCOMPLETE_VALUES = qo;
|
|
3114
|
+
Object.defineProperty(it, "__esModule", {
|
|
3127
3115
|
value: !0
|
|
3128
3116
|
});
|
|
3129
|
-
|
|
3130
|
-
var
|
|
3131
|
-
let
|
|
3132
|
-
const
|
|
3117
|
+
it.loadElements = void 0;
|
|
3118
|
+
var wt = O, Pr = se;
|
|
3119
|
+
let St;
|
|
3120
|
+
const Fo = (e) => (St || (St = new Promise((t, r) => {
|
|
3133
3121
|
if (typeof window != "object") {
|
|
3134
|
-
r(new Error(
|
|
3122
|
+
r(new Error(wt.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
|
|
3135
3123
|
return;
|
|
3136
3124
|
}
|
|
3137
3125
|
if (window.BasisTheoryElements) {
|
|
@@ -3148,16 +3136,16 @@ const Ko = (e) => (Tt || (Tt = new Promise((t, r) => {
|
|
|
3148
3136
|
}
|
|
3149
3137
|
let s = (0, Pr.findScript)(n);
|
|
3150
3138
|
s || (s = (0, Pr.injectScript)(n)), s.addEventListener("load", () => {
|
|
3151
|
-
window.BasisTheoryElements ? t(window.BasisTheoryElements) : r(new Error(
|
|
3139
|
+
window.BasisTheoryElements ? t(window.BasisTheoryElements) : r(new Error(wt.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE));
|
|
3152
3140
|
}), s.addEventListener("error", (i) => {
|
|
3153
|
-
r((i == null ? void 0 : i.error) || new Error(
|
|
3141
|
+
r((i == null ? void 0 : i.error) || new Error(wt.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE));
|
|
3154
3142
|
});
|
|
3155
3143
|
} catch (n) {
|
|
3156
3144
|
r(n);
|
|
3157
3145
|
return;
|
|
3158
3146
|
}
|
|
3159
|
-
})),
|
|
3160
|
-
|
|
3147
|
+
})), St);
|
|
3148
|
+
it.loadElements = Fo;
|
|
3161
3149
|
(function(e) {
|
|
3162
3150
|
Object.defineProperty(e, "__esModule", {
|
|
3163
3151
|
value: !0
|
|
@@ -3180,7 +3168,7 @@ at.loadElements = Ko;
|
|
|
3180
3168
|
}
|
|
3181
3169
|
});
|
|
3182
3170
|
});
|
|
3183
|
-
var n =
|
|
3171
|
+
var n = it;
|
|
3184
3172
|
Object.keys(n).forEach(function(s) {
|
|
3185
3173
|
s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
|
|
3186
3174
|
enumerable: !0,
|
|
@@ -3190,15 +3178,15 @@ at.loadElements = Ko;
|
|
|
3190
3178
|
});
|
|
3191
3179
|
});
|
|
3192
3180
|
})(Tn);
|
|
3193
|
-
var
|
|
3194
|
-
Object.defineProperty(
|
|
3181
|
+
var Cn = {}, at = {};
|
|
3182
|
+
Object.defineProperty(at, "__esModule", {
|
|
3195
3183
|
value: !0
|
|
3196
3184
|
});
|
|
3197
|
-
|
|
3198
|
-
var
|
|
3199
|
-
const Wo = new zo.CrudBuilder(class extends
|
|
3185
|
+
at.BasisTheoryLogs = void 0;
|
|
3186
|
+
var Ko = U, zo = z;
|
|
3187
|
+
const Wo = new zo.CrudBuilder(class extends Ko.BasisTheoryService {
|
|
3200
3188
|
}).list().build();
|
|
3201
|
-
|
|
3189
|
+
at.BasisTheoryLogs = Wo;
|
|
3202
3190
|
(function(e) {
|
|
3203
3191
|
Object.defineProperty(e, "__esModule", {
|
|
3204
3192
|
value: !0
|
|
@@ -3208,20 +3196,20 @@ ot.BasisTheoryLogs = Wo;
|
|
|
3208
3196
|
return t.BasisTheoryLogs;
|
|
3209
3197
|
}
|
|
3210
3198
|
});
|
|
3211
|
-
var t =
|
|
3212
|
-
})(
|
|
3213
|
-
var
|
|
3214
|
-
Object.defineProperty(
|
|
3199
|
+
var t = at;
|
|
3200
|
+
})(Cn);
|
|
3201
|
+
var On = {}, ot = {};
|
|
3202
|
+
Object.defineProperty(ot, "__esModule", {
|
|
3215
3203
|
value: !0
|
|
3216
3204
|
});
|
|
3217
|
-
|
|
3205
|
+
ot.BasisTheoryPermissions = void 0;
|
|
3218
3206
|
var Br = D, ko = U;
|
|
3219
3207
|
class Go extends ko.BasisTheoryService {
|
|
3220
3208
|
list(t) {
|
|
3221
3209
|
return this.client.get("/", (0, Br.createRequestConfig)(t)).then(Br.dataExtractor);
|
|
3222
3210
|
}
|
|
3223
3211
|
}
|
|
3224
|
-
|
|
3212
|
+
ot.BasisTheoryPermissions = Go;
|
|
3225
3213
|
(function(e) {
|
|
3226
3214
|
Object.defineProperty(e, "__esModule", {
|
|
3227
3215
|
value: !0
|
|
@@ -3231,13 +3219,13 @@ ct.BasisTheoryPermissions = Go;
|
|
|
3231
3219
|
return t.BasisTheoryPermissions;
|
|
3232
3220
|
}
|
|
3233
3221
|
});
|
|
3234
|
-
var t =
|
|
3235
|
-
})(
|
|
3236
|
-
var Pn = {},
|
|
3237
|
-
Object.defineProperty(
|
|
3222
|
+
var t = ot;
|
|
3223
|
+
})(On);
|
|
3224
|
+
var Pn = {}, ct = {};
|
|
3225
|
+
Object.defineProperty(ct, "__esModule", {
|
|
3238
3226
|
value: !0
|
|
3239
3227
|
});
|
|
3240
|
-
|
|
3228
|
+
ct.BasisTheoryProxies = void 0;
|
|
3241
3229
|
var xr = m, Vo = U, Jo = z;
|
|
3242
3230
|
const Yo = new Jo.CrudBuilder(class extends Vo.BasisTheoryService {
|
|
3243
3231
|
constructor(t) {
|
|
@@ -3247,12 +3235,12 @@ const Yo = new Jo.CrudBuilder(class extends Vo.BasisTheoryService {
|
|
|
3247
3235
|
r.transformRequest = [].concat(xr.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(xr.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
3248
3236
|
}
|
|
3249
3237
|
}).create().retrieve().update().patch().delete().list().build();
|
|
3250
|
-
|
|
3238
|
+
ct.BasisTheoryProxies = Yo;
|
|
3251
3239
|
(function(e) {
|
|
3252
3240
|
Object.defineProperty(e, "__esModule", {
|
|
3253
3241
|
value: !0
|
|
3254
3242
|
});
|
|
3255
|
-
var t =
|
|
3243
|
+
var t = ct;
|
|
3256
3244
|
Object.keys(t).forEach(function(r) {
|
|
3257
3245
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
3258
3246
|
enumerable: !0,
|
|
@@ -3262,15 +3250,15 @@ ut.BasisTheoryProxies = Yo;
|
|
|
3262
3250
|
});
|
|
3263
3251
|
});
|
|
3264
3252
|
})(Pn);
|
|
3265
|
-
var Bn = {},
|
|
3266
|
-
Object.defineProperty(
|
|
3253
|
+
var Bn = {}, ut = {};
|
|
3254
|
+
Object.defineProperty(ut, "__esModule", {
|
|
3267
3255
|
value: !0
|
|
3268
3256
|
});
|
|
3269
|
-
|
|
3257
|
+
ut.BasisTheoryReactorFormulas = void 0;
|
|
3270
3258
|
var Xo = U, Zo = z;
|
|
3271
3259
|
const Qo = new Zo.CrudBuilder(class extends Xo.BasisTheoryService {
|
|
3272
3260
|
}).create().retrieve().update().delete().list().build();
|
|
3273
|
-
|
|
3261
|
+
ut.BasisTheoryReactorFormulas = Qo;
|
|
3274
3262
|
(function(e) {
|
|
3275
3263
|
Object.defineProperty(e, "__esModule", {
|
|
3276
3264
|
value: !0
|
|
@@ -3280,14 +3268,14 @@ lt.BasisTheoryReactorFormulas = Qo;
|
|
|
3280
3268
|
return t.BasisTheoryReactorFormulas;
|
|
3281
3269
|
}
|
|
3282
3270
|
});
|
|
3283
|
-
var t =
|
|
3271
|
+
var t = ut;
|
|
3284
3272
|
})(Bn);
|
|
3285
|
-
var xn = {},
|
|
3286
|
-
Object.defineProperty(
|
|
3273
|
+
var xn = {}, lt = {};
|
|
3274
|
+
Object.defineProperty(lt, "__esModule", {
|
|
3287
3275
|
value: !0
|
|
3288
3276
|
});
|
|
3289
|
-
|
|
3290
|
-
var
|
|
3277
|
+
lt.BasisTheoryReactors = void 0;
|
|
3278
|
+
var Oe = D, Nr = m, ec = U, tc = z;
|
|
3291
3279
|
const rc = new tc.CrudBuilder(class extends ec.BasisTheoryService {
|
|
3292
3280
|
constructor(t) {
|
|
3293
3281
|
const r = {
|
|
@@ -3296,13 +3284,13 @@ const rc = new tc.CrudBuilder(class extends ec.BasisTheoryService {
|
|
|
3296
3284
|
r.transformRequest = [].concat(Nr.transformReactorRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Nr.transformReactorResponseCamelCase, t.transformResponse || []), super(r);
|
|
3297
3285
|
}
|
|
3298
3286
|
react(t, r, n) {
|
|
3299
|
-
return this.client.post(`/${t}/react`, r, (0,
|
|
3300
|
-
transformRequest:
|
|
3301
|
-
transformResponse:
|
|
3302
|
-
})).then(
|
|
3287
|
+
return this.client.post(`/${t}/react`, r, (0, Oe.createRequestConfig)(n, {
|
|
3288
|
+
transformRequest: Oe.proxyRaw,
|
|
3289
|
+
transformResponse: Oe.proxyRaw
|
|
3290
|
+
})).then(Oe.dataExtractor);
|
|
3303
3291
|
}
|
|
3304
3292
|
}).create().retrieve().update().patch().delete().list().build();
|
|
3305
|
-
|
|
3293
|
+
lt.BasisTheoryReactors = rc;
|
|
3306
3294
|
(function(e) {
|
|
3307
3295
|
Object.defineProperty(e, "__esModule", {
|
|
3308
3296
|
value: !0
|
|
@@ -3312,13 +3300,13 @@ dt.BasisTheoryReactors = rc;
|
|
|
3312
3300
|
return t.BasisTheoryReactors;
|
|
3313
3301
|
}
|
|
3314
3302
|
});
|
|
3315
|
-
var t =
|
|
3303
|
+
var t = lt;
|
|
3316
3304
|
})(xn);
|
|
3317
|
-
var Nn = {},
|
|
3318
|
-
Object.defineProperty(
|
|
3305
|
+
var Nn = {}, dt = {};
|
|
3306
|
+
Object.defineProperty(dt, "__esModule", {
|
|
3319
3307
|
value: !0
|
|
3320
3308
|
});
|
|
3321
|
-
|
|
3309
|
+
dt.BasisTheorySessions = void 0;
|
|
3322
3310
|
var jr = D, Pe = m, nc = U;
|
|
3323
3311
|
class sc extends nc.BasisTheoryService {
|
|
3324
3312
|
constructor(t) {
|
|
@@ -3334,7 +3322,7 @@ class sc extends nc.BasisTheoryService {
|
|
|
3334
3322
|
return this.client.post("/authorize", t, (0, jr.createRequestConfig)(r)).then(Pe.dataExtractor);
|
|
3335
3323
|
}
|
|
3336
3324
|
}
|
|
3337
|
-
|
|
3325
|
+
dt.BasisTheorySessions = sc;
|
|
3338
3326
|
(function(e) {
|
|
3339
3327
|
Object.defineProperty(e, "__esModule", {
|
|
3340
3328
|
value: !0
|
|
@@ -3344,13 +3332,13 @@ ft.BasisTheorySessions = sc;
|
|
|
3344
3332
|
return t.BasisTheorySessions;
|
|
3345
3333
|
}
|
|
3346
3334
|
});
|
|
3347
|
-
var t =
|
|
3335
|
+
var t = dt;
|
|
3348
3336
|
})(Nn);
|
|
3349
|
-
var jn = {},
|
|
3350
|
-
Object.defineProperty(
|
|
3337
|
+
var jn = {}, ft = {};
|
|
3338
|
+
Object.defineProperty(ft, "__esModule", {
|
|
3351
3339
|
value: !0
|
|
3352
3340
|
});
|
|
3353
|
-
|
|
3341
|
+
ft.BasisTheoryTenants = void 0;
|
|
3354
3342
|
var R = D, ic = U, ac = z;
|
|
3355
3343
|
const oc = new ac.CrudBuilder(class extends ic.BasisTheoryService {
|
|
3356
3344
|
retrieve(t) {
|
|
@@ -3389,7 +3377,7 @@ const oc = new ac.CrudBuilder(class extends ic.BasisTheoryService {
|
|
|
3389
3377
|
await this.client.delete(`/members/${t}`, (0, R.createRequestConfig)(r));
|
|
3390
3378
|
}
|
|
3391
3379
|
}).build();
|
|
3392
|
-
|
|
3380
|
+
ft.BasisTheoryTenants = oc;
|
|
3393
3381
|
(function(e) {
|
|
3394
3382
|
Object.defineProperty(e, "__esModule", {
|
|
3395
3383
|
value: !0
|
|
@@ -3399,13 +3387,13 @@ ht.BasisTheoryTenants = oc;
|
|
|
3399
3387
|
return t.BasisTheoryTenants;
|
|
3400
3388
|
}
|
|
3401
3389
|
});
|
|
3402
|
-
var t =
|
|
3390
|
+
var t = ft;
|
|
3403
3391
|
})(jn);
|
|
3404
|
-
Object.defineProperty(
|
|
3392
|
+
Object.defineProperty($e, "__esModule", {
|
|
3405
3393
|
value: !0
|
|
3406
3394
|
});
|
|
3407
|
-
|
|
3408
|
-
var me = ue, cc = $r, uc = rr, g = D, Be = Tn, lc =
|
|
3395
|
+
$e.BasisTheory = void 0;
|
|
3396
|
+
var me = ue, cc = $r, uc = rr, g = D, Be = Tn, lc = O, dc = Cn, fc = On, hc = Pn, pc = Bn, mc = xn, yc = Nn, Ec = jn;
|
|
3409
3397
|
function bc(e, t, r) {
|
|
3410
3398
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3411
3399
|
}
|
|
@@ -3571,7 +3559,7 @@ class gc {
|
|
|
3571
3559
|
this._elements = t;
|
|
3572
3560
|
}
|
|
3573
3561
|
}
|
|
3574
|
-
|
|
3562
|
+
$e.BasisTheory = gc;
|
|
3575
3563
|
(function(e) {
|
|
3576
3564
|
Object.defineProperty(e, "__esModule", {
|
|
3577
3565
|
value: !0
|
|
@@ -3580,7 +3568,7 @@ qe.BasisTheory = gc;
|
|
|
3580
3568
|
_instance: !0
|
|
3581
3569
|
};
|
|
3582
3570
|
e._instance = void 0;
|
|
3583
|
-
var r =
|
|
3571
|
+
var r = $e;
|
|
3584
3572
|
Object.keys(r).forEach(function(a) {
|
|
3585
3573
|
a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === r[a] || Object.defineProperty(e, a, {
|
|
3586
3574
|
enumerable: !0,
|
|
@@ -3610,10 +3598,10 @@ qe.BasisTheory = gc;
|
|
|
3610
3598
|
const i = new r.BasisTheory();
|
|
3611
3599
|
e._instance = i;
|
|
3612
3600
|
})(Mr);
|
|
3613
|
-
const T = crypto,
|
|
3601
|
+
const T = crypto, F = (e) => e instanceof CryptoKey, wc = async (e, t) => {
|
|
3614
3602
|
const r = `SHA-${e.slice(-3)}`;
|
|
3615
3603
|
return new Uint8Array(await T.subtle.digest(r, t));
|
|
3616
|
-
}, re = new TextEncoder(), Dn = new TextDecoder(),
|
|
3604
|
+
}, re = new TextEncoder(), Dn = new TextDecoder(), Ie = 2 ** 32;
|
|
3617
3605
|
function Se(...e) {
|
|
3618
3606
|
const t = e.reduce((s, { length: i }) => s + i, 0), r = new Uint8Array(t);
|
|
3619
3607
|
let n = 0;
|
|
@@ -3624,20 +3612,20 @@ function Se(...e) {
|
|
|
3624
3612
|
function Sc(e, t) {
|
|
3625
3613
|
return Se(re.encode(e), new Uint8Array([0]), t);
|
|
3626
3614
|
}
|
|
3627
|
-
function
|
|
3628
|
-
if (t < 0 || t >=
|
|
3629
|
-
throw new RangeError(`value must be >= 0 and <= ${
|
|
3615
|
+
function $t(e, t, r) {
|
|
3616
|
+
if (t < 0 || t >= Ie)
|
|
3617
|
+
throw new RangeError(`value must be >= 0 and <= ${Ie - 1}. Received ${t}`);
|
|
3630
3618
|
e.set([t >>> 24, t >>> 16, t >>> 8, t & 255], r);
|
|
3631
3619
|
}
|
|
3632
3620
|
function Tc(e) {
|
|
3633
|
-
const t = Math.floor(e /
|
|
3634
|
-
return
|
|
3621
|
+
const t = Math.floor(e / Ie), r = e % Ie, n = new Uint8Array(8);
|
|
3622
|
+
return $t(n, t, 0), $t(n, r, 4), n;
|
|
3635
3623
|
}
|
|
3636
3624
|
function sr(e) {
|
|
3637
3625
|
const t = new Uint8Array(4);
|
|
3638
|
-
return
|
|
3626
|
+
return $t(t, e), t;
|
|
3639
3627
|
}
|
|
3640
|
-
function
|
|
3628
|
+
function Tt(e) {
|
|
3641
3629
|
return Se(sr(e.length), e);
|
|
3642
3630
|
}
|
|
3643
3631
|
async function Rc(e, t, r) {
|
|
@@ -3712,7 +3700,7 @@ function Hn(e) {
|
|
|
3712
3700
|
throw new x(`Unsupported JWE Algorithm: ${e}`);
|
|
3713
3701
|
}
|
|
3714
3702
|
}
|
|
3715
|
-
const
|
|
3703
|
+
const Cc = (e) => ir(new Uint8Array(Hn(e) >> 3)), Oc = (e, t) => {
|
|
3716
3704
|
if (t.length << 3 !== Hn(e))
|
|
3717
3705
|
throw new X("Invalid Initialization Vector length");
|
|
3718
3706
|
}, Dr = (e, t) => {
|
|
@@ -3735,8 +3723,7 @@ function Bc(e, t) {
|
|
|
3735
3723
|
if (t.length > 2) {
|
|
3736
3724
|
const n = t.pop();
|
|
3737
3725
|
r += `one of ${t.join(", ")}, or ${n}.`;
|
|
3738
|
-
} else
|
|
3739
|
-
t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
3726
|
+
} else t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
3740
3727
|
throw new TypeError(r);
|
|
3741
3728
|
}
|
|
3742
3729
|
}
|
|
@@ -3800,15 +3787,14 @@ function Mn(e, t, ...r) {
|
|
|
3800
3787
|
if (r.length > 2) {
|
|
3801
3788
|
const s = r.pop();
|
|
3802
3789
|
e += `one of type ${r.join(", ")}, or ${s}.`;
|
|
3803
|
-
} else
|
|
3804
|
-
r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
3790
|
+
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
3805
3791
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
3806
3792
|
}
|
|
3807
|
-
const
|
|
3793
|
+
const K = (e, ...t) => Mn("Key must be ", e, ...t);
|
|
3808
3794
|
function In(e, t, ...r) {
|
|
3809
3795
|
return Mn(`Key for the ${e} algorithm must be `, t, ...r);
|
|
3810
3796
|
}
|
|
3811
|
-
const $n = (e) =>
|
|
3797
|
+
const $n = (e) => F(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", M = ["CryptoKey"], xc = (...e) => {
|
|
3812
3798
|
const t = e.filter(Boolean);
|
|
3813
3799
|
if (t.length === 0 || t.length === 1)
|
|
3814
3800
|
return !0;
|
|
@@ -3850,25 +3836,25 @@ function Dc(e, t) {
|
|
|
3850
3836
|
throw new TypeError(`Invalid key size for alg: ${t}`);
|
|
3851
3837
|
}
|
|
3852
3838
|
function Uc(e, t, r) {
|
|
3853
|
-
if (
|
|
3839
|
+
if (F(e))
|
|
3854
3840
|
return le(e, t, r), e;
|
|
3855
3841
|
if (e instanceof Uint8Array)
|
|
3856
3842
|
return T.subtle.importKey("raw", e, "AES-KW", !0, [r]);
|
|
3857
|
-
throw new TypeError(
|
|
3843
|
+
throw new TypeError(K(e, ...M, "Uint8Array"));
|
|
3858
3844
|
}
|
|
3859
|
-
const
|
|
3845
|
+
const qt = async (e, t, r) => {
|
|
3860
3846
|
const n = await Uc(t, e, "wrapKey");
|
|
3861
3847
|
Dc(n, e);
|
|
3862
3848
|
const s = await T.subtle.importKey("raw", r, ...qn);
|
|
3863
3849
|
return new Uint8Array(await T.subtle.wrapKey("raw", s, n, "AES-KW"));
|
|
3864
3850
|
};
|
|
3865
3851
|
async function Lc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
3866
|
-
if (!
|
|
3867
|
-
throw new TypeError(
|
|
3868
|
-
if (le(e, "ECDH"), !
|
|
3869
|
-
throw new TypeError(
|
|
3852
|
+
if (!F(e))
|
|
3853
|
+
throw new TypeError(K(e, ...M));
|
|
3854
|
+
if (le(e, "ECDH"), !F(t))
|
|
3855
|
+
throw new TypeError(K(t, ...M));
|
|
3870
3856
|
le(t, "ECDH", "deriveBits");
|
|
3871
|
-
const a = Se(
|
|
3857
|
+
const a = Se(Tt(re.encode(r)), Tt(s), Tt(i), sr(n));
|
|
3872
3858
|
let o;
|
|
3873
3859
|
e.algorithm.name === "X25519" ? o = 256 : e.algorithm.name === "X448" ? o = 448 : o = Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3), 10) / 8) << 3;
|
|
3874
3860
|
const d = new Uint8Array(await T.subtle.deriveBits({
|
|
@@ -3878,13 +3864,13 @@ async function Lc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
|
3878
3864
|
return Rc(d, n, a);
|
|
3879
3865
|
}
|
|
3880
3866
|
async function Hc(e) {
|
|
3881
|
-
if (!
|
|
3882
|
-
throw new TypeError(
|
|
3867
|
+
if (!F(e))
|
|
3868
|
+
throw new TypeError(K(e, ...M));
|
|
3883
3869
|
return T.subtle.generateKey(e.algorithm, !0, ["deriveBits"]);
|
|
3884
3870
|
}
|
|
3885
3871
|
function Mc(e) {
|
|
3886
|
-
if (!
|
|
3887
|
-
throw new TypeError(
|
|
3872
|
+
if (!F(e))
|
|
3873
|
+
throw new TypeError(K(e, ...M));
|
|
3888
3874
|
return ["P-256", "P-384", "P-521"].includes(e.algorithm.namedCurve) || e.algorithm.name === "X25519" || e.algorithm.name === "X448";
|
|
3889
3875
|
}
|
|
3890
3876
|
function Ic(e) {
|
|
@@ -3894,9 +3880,9 @@ function Ic(e) {
|
|
|
3894
3880
|
function $c(e, t) {
|
|
3895
3881
|
if (e instanceof Uint8Array)
|
|
3896
3882
|
return T.subtle.importKey("raw", e, "PBKDF2", !1, ["deriveBits"]);
|
|
3897
|
-
if (
|
|
3883
|
+
if (F(e))
|
|
3898
3884
|
return le(e, t, "deriveBits", "deriveKey"), e;
|
|
3899
|
-
throw new TypeError(
|
|
3885
|
+
throw new TypeError(K(e, ...M, "Uint8Array"));
|
|
3900
3886
|
}
|
|
3901
3887
|
async function qc(e, t, r, n) {
|
|
3902
3888
|
Ic(e);
|
|
@@ -3915,9 +3901,9 @@ async function qc(e, t, r, n) {
|
|
|
3915
3901
|
return T.subtle.deriveKey(a, d, o, !1, ["wrapKey", "unwrapKey"]);
|
|
3916
3902
|
throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');
|
|
3917
3903
|
}
|
|
3918
|
-
const
|
|
3904
|
+
const Fc = async (e, t, r, n = 2048, s = ir(new Uint8Array(16))) => {
|
|
3919
3905
|
const i = await qc(s, e, n, t);
|
|
3920
|
-
return { encryptedKey: await
|
|
3906
|
+
return { encryptedKey: await qt(e.slice(-6), i, r), p2c: n, p2s: L(s) };
|
|
3921
3907
|
};
|
|
3922
3908
|
function Ur(e) {
|
|
3923
3909
|
switch (e) {
|
|
@@ -3930,16 +3916,16 @@ function Ur(e) {
|
|
|
3930
3916
|
throw new x(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
3931
3917
|
}
|
|
3932
3918
|
}
|
|
3933
|
-
const
|
|
3919
|
+
const Kc = (e, t) => {
|
|
3934
3920
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
3935
3921
|
const { modulusLength: r } = t.algorithm;
|
|
3936
3922
|
if (typeof r != "number" || r < 2048)
|
|
3937
3923
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
3938
3924
|
}
|
|
3939
3925
|
}, zc = async (e, t, r) => {
|
|
3940
|
-
if (!
|
|
3941
|
-
throw new TypeError(
|
|
3942
|
-
if (le(t, e, "encrypt", "wrapKey"),
|
|
3926
|
+
if (!F(t))
|
|
3927
|
+
throw new TypeError(K(t, ...M));
|
|
3928
|
+
if (le(t, e, "encrypt", "wrapKey"), Kc(e, t), t.usages.includes("encrypt"))
|
|
3943
3929
|
return new Uint8Array(await T.subtle.encrypt(Ur(e), t, r));
|
|
3944
3930
|
if (t.usages.includes("wrapKey")) {
|
|
3945
3931
|
const n = await T.subtle.importKey("raw", r, ...qn);
|
|
@@ -4019,7 +4005,7 @@ function Wc(e) {
|
|
|
4019
4005
|
}
|
|
4020
4006
|
return { algorithm: t, keyUsages: r };
|
|
4021
4007
|
}
|
|
4022
|
-
const
|
|
4008
|
+
const Fn = async (e) => {
|
|
4023
4009
|
if (!e.alg)
|
|
4024
4010
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
4025
4011
|
const { algorithm: t, keyUsages: r } = Wc(e), n = [
|
|
@@ -4028,27 +4014,27 @@ const Kn = async (e) => {
|
|
|
4028
4014
|
e.key_ops ?? r
|
|
4029
4015
|
], s = { ...e };
|
|
4030
4016
|
return delete s.alg, delete s.use, T.subtle.importKey("jwk", s, ...n);
|
|
4031
|
-
},
|
|
4032
|
-
let
|
|
4017
|
+
}, Kn = (e) => Un(e);
|
|
4018
|
+
let Rt, At;
|
|
4033
4019
|
const zn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Wn = async (e, t, r, n) => {
|
|
4034
4020
|
let s = e.get(t);
|
|
4035
4021
|
if (s != null && s[n])
|
|
4036
4022
|
return s[n];
|
|
4037
|
-
const i = await
|
|
4023
|
+
const i = await Fn({ ...r, alg: n });
|
|
4038
4024
|
return s ? s[n] = i : e.set(t, { [n]: i }), i;
|
|
4039
4025
|
}, kc = (e, t) => {
|
|
4040
4026
|
if (zn(e)) {
|
|
4041
4027
|
let r = e.export({ format: "jwk" });
|
|
4042
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
4028
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Kn(r.k) : (At || (At = /* @__PURE__ */ new WeakMap()), Wn(At, e, r, t));
|
|
4043
4029
|
}
|
|
4044
4030
|
return e;
|
|
4045
4031
|
}, Gc = (e, t) => {
|
|
4046
4032
|
if (zn(e)) {
|
|
4047
4033
|
let r = e.export({ format: "jwk" });
|
|
4048
|
-
return r.k ?
|
|
4034
|
+
return r.k ? Kn(r.k) : (Rt || (Rt = /* @__PURE__ */ new WeakMap()), Wn(Rt, e, r, t));
|
|
4049
4035
|
}
|
|
4050
4036
|
return e;
|
|
4051
|
-
},
|
|
4037
|
+
}, vt = { normalizePublicKey: kc, normalizePrivateKey: Gc };
|
|
4052
4038
|
function kn(e) {
|
|
4053
4039
|
switch (e) {
|
|
4054
4040
|
case "A128GCM":
|
|
@@ -4080,33 +4066,31 @@ async function Vc(e, t) {
|
|
|
4080
4066
|
throw new x('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
4081
4067
|
case "EC":
|
|
4082
4068
|
case "OKP":
|
|
4083
|
-
return
|
|
4069
|
+
return Fn({ ...e, alg: t });
|
|
4084
4070
|
default:
|
|
4085
4071
|
throw new x('Unsupported "kty" (Key Type) Parameter value');
|
|
4086
4072
|
}
|
|
4087
4073
|
}
|
|
4088
|
-
const
|
|
4074
|
+
const Ft = (e) => e == null ? void 0 : e[Symbol.toStringTag], Jc = (e, t) => {
|
|
4089
4075
|
if (!(t instanceof Uint8Array)) {
|
|
4090
4076
|
if (!$n(t))
|
|
4091
4077
|
throw new TypeError(In(e, t, ...M, "Uint8Array"));
|
|
4092
4078
|
if (t.type !== "secret")
|
|
4093
|
-
throw new TypeError(`${
|
|
4079
|
+
throw new TypeError(`${Ft(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
4094
4080
|
}
|
|
4095
4081
|
}, Yc = (e, t, r) => {
|
|
4096
4082
|
if (!$n(t))
|
|
4097
4083
|
throw new TypeError(In(e, t, ...M));
|
|
4098
4084
|
if (t.type === "secret")
|
|
4099
|
-
throw new TypeError(`${
|
|
4100
|
-
if (t.algorithm && r === "
|
|
4101
|
-
throw new TypeError(`${
|
|
4102
|
-
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
4103
|
-
throw new TypeError(`${Ue(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
4085
|
+
throw new TypeError(`${Ft(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
4086
|
+
if (t.algorithm, t.algorithm && r === "encrypt" && t.type === "private")
|
|
4087
|
+
throw new TypeError(`${Ft(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
4104
4088
|
}, Xc = (e, t, r) => {
|
|
4105
4089
|
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Jc(e, t) : Yc(e, t, r);
|
|
4106
4090
|
};
|
|
4107
4091
|
async function Zc(e, t, r, n, s) {
|
|
4108
4092
|
if (!(r instanceof Uint8Array))
|
|
4109
|
-
throw new TypeError(
|
|
4093
|
+
throw new TypeError(K(r, "Uint8Array"));
|
|
4110
4094
|
const i = parseInt(e.slice(1, 4), 10), a = await T.subtle.importKey("raw", r.subarray(i >> 3), "AES-CBC", !1, ["encrypt"]), o = await T.subtle.importKey("raw", r.subarray(0, i >> 3), {
|
|
4111
4095
|
hash: `SHA-${i << 1}`,
|
|
4112
4096
|
name: "HMAC"
|
|
@@ -4128,9 +4112,9 @@ async function Qc(e, t, r, n, s) {
|
|
|
4128
4112
|
return { ciphertext: a.slice(0, -16), tag: o, iv: n };
|
|
4129
4113
|
}
|
|
4130
4114
|
const Gn = async (e, t, r, n, s) => {
|
|
4131
|
-
if (!
|
|
4132
|
-
throw new TypeError(
|
|
4133
|
-
switch (n ?
|
|
4115
|
+
if (!F(r) && !(r instanceof Uint8Array))
|
|
4116
|
+
throw new TypeError(K(r, ...M, "Uint8Array"));
|
|
4117
|
+
switch (n ? Oc(e, n) : n = Cc(e), e) {
|
|
4134
4118
|
case "A128CBC-HS256":
|
|
4135
4119
|
case "A192CBC-HS384":
|
|
4136
4120
|
case "A256CBC-HS512":
|
|
@@ -4176,8 +4160,8 @@ const ru = async (e) => {
|
|
|
4176
4160
|
kty: "oct",
|
|
4177
4161
|
k: L(e)
|
|
4178
4162
|
};
|
|
4179
|
-
if (!
|
|
4180
|
-
throw new TypeError(
|
|
4163
|
+
if (!F(e))
|
|
4164
|
+
throw new TypeError(K(e, ...M, "Uint8Array"));
|
|
4181
4165
|
if (!e.extractable)
|
|
4182
4166
|
throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");
|
|
4183
4167
|
const { ext: t, key_ops: r, alg: n, use: s, ...i } = await T.subtle.exportKey("jwk", e);
|
|
@@ -4189,7 +4173,7 @@ async function nu(e) {
|
|
|
4189
4173
|
async function su(e, t, r, n, s = {}) {
|
|
4190
4174
|
var d;
|
|
4191
4175
|
let i, a, o;
|
|
4192
|
-
switch (Xc(e, r, "encrypt"), r = await ((d =
|
|
4176
|
+
switch (Xc(e, r, "encrypt"), r = await ((d = vt.normalizePublicKey) == null ? void 0 : d.call(vt, r, e)) || r, e) {
|
|
4193
4177
|
case "dir": {
|
|
4194
4178
|
o = r;
|
|
4195
4179
|
break;
|
|
@@ -4210,7 +4194,7 @@ async function su(e, t, r, n, s = {}) {
|
|
|
4210
4194
|
}
|
|
4211
4195
|
o = n || ye(t);
|
|
4212
4196
|
const S = e.slice(-6);
|
|
4213
|
-
i = await
|
|
4197
|
+
i = await qt(S, p, o);
|
|
4214
4198
|
break;
|
|
4215
4199
|
}
|
|
4216
4200
|
case "RSA1_5":
|
|
@@ -4226,13 +4210,13 @@ async function su(e, t, r, n, s = {}) {
|
|
|
4226
4210
|
case "PBES2-HS512+A256KW": {
|
|
4227
4211
|
o = n || ye(t);
|
|
4228
4212
|
const { p2c: u, p2s: l } = s;
|
|
4229
|
-
({ encryptedKey: i, ...a } = await
|
|
4213
|
+
({ encryptedKey: i, ...a } = await Fc(e, r, o, u, l));
|
|
4230
4214
|
break;
|
|
4231
4215
|
}
|
|
4232
4216
|
case "A128KW":
|
|
4233
4217
|
case "A192KW":
|
|
4234
4218
|
case "A256KW": {
|
|
4235
|
-
o = n || ye(t), i = await
|
|
4219
|
+
o = n || ye(t), i = await qt(e, r, o);
|
|
4236
4220
|
break;
|
|
4237
4221
|
}
|
|
4238
4222
|
case "A128GCMKW":
|
|
@@ -4354,9 +4338,7 @@ const Ct = {
|
|
|
4354
4338
|
expiration_month: "{{ data.expiration_month }}",
|
|
4355
4339
|
expiration_year: "{{ data.expiration_year }}"
|
|
4356
4340
|
}
|
|
4357
|
-
}, uu = cu, lu = "DOM Element was not found", Vn = (e) => e != null;
|
|
4358
|
-
var du = { VITE_PACKAGE_VERSION: "v3.5.0", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
4359
|
-
const fu = "v3.5.0";
|
|
4341
|
+
}, uu = cu, lu = "DOM Element was not found", Vn = (e) => e != null, du = "v3.5.2";
|
|
4360
4342
|
class Te {
|
|
4361
4343
|
constructor(t, r) {
|
|
4362
4344
|
if (Object.defineProperty(this, "options", {
|
|
@@ -4421,9 +4403,9 @@ class Te {
|
|
|
4421
4403
|
var n;
|
|
4422
4404
|
(n = this.iframe) == null || n.remove(), this.iframe = null;
|
|
4423
4405
|
}
|
|
4424
|
-
}), this.IFRAME_BASE_URL = du
|
|
4406
|
+
}), this.IFRAME_BASE_URL = fu(du), !this.IFRAME_BASE_URL)
|
|
4425
4407
|
throw new Error("IFRAME_BASE_URL not found");
|
|
4426
|
-
r &&
|
|
4408
|
+
r && Ot.set(this, { key: r });
|
|
4427
4409
|
}
|
|
4428
4410
|
mount(t) {
|
|
4429
4411
|
const r = typeof t == "string" ? document.querySelector(t) : t;
|
|
@@ -4436,7 +4418,7 @@ class Te {
|
|
|
4436
4418
|
if (s.data.type === "change") {
|
|
4437
4419
|
const a = this.extractValue(s.data.data.value), o = { ...s.data.data };
|
|
4438
4420
|
delete o.value;
|
|
4439
|
-
const d =
|
|
4421
|
+
const d = Ot.get(this);
|
|
4440
4422
|
d && (d.value = a), this.emitEvent({
|
|
4441
4423
|
...s.data,
|
|
4442
4424
|
data: o
|
|
@@ -4456,7 +4438,7 @@ class Te {
|
|
|
4456
4438
|
};
|
|
4457
4439
|
}
|
|
4458
4440
|
secureValue(t) {
|
|
4459
|
-
const r =
|
|
4441
|
+
const r = Ot.get(this);
|
|
4460
4442
|
return (r == null ? void 0 : r.key) !== t ? null : (r == null ? void 0 : r.value) ?? null;
|
|
4461
4443
|
}
|
|
4462
4444
|
emitEvent(t) {
|
|
@@ -4468,10 +4450,10 @@ class Te {
|
|
|
4468
4450
|
(n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, this.IFRAME_BASE_URL);
|
|
4469
4451
|
}
|
|
4470
4452
|
}
|
|
4471
|
-
function
|
|
4453
|
+
function fu(e) {
|
|
4472
4454
|
return `https://${window.HG_IFRAME_HOST ?? "sdk.hellgate.io"}/web/${e}/iframe/`;
|
|
4473
4455
|
}
|
|
4474
|
-
const
|
|
4456
|
+
const Ot = /* @__PURE__ */ new Map();
|
|
4475
4457
|
function Jn(e) {
|
|
4476
4458
|
const [t = null, r = null] = (e ?? "").split("/").map((n) => Number(n.trim()));
|
|
4477
4459
|
return { month: t, year: r && r > 10 ? +`20${r}` : null };
|
|
@@ -4485,7 +4467,7 @@ function Yn(e) {
|
|
|
4485
4467
|
r && r >= 100 ? String(r).slice(-2) : r
|
|
4486
4468
|
].filter(Vn).join(" / ");
|
|
4487
4469
|
}
|
|
4488
|
-
class
|
|
4470
|
+
class hu extends Te {
|
|
4489
4471
|
constructor() {
|
|
4490
4472
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4491
4473
|
enumerable: !0,
|
|
@@ -4508,10 +4490,10 @@ class pu extends Te {
|
|
|
4508
4490
|
function Xn(e) {
|
|
4509
4491
|
return (e == null ? void 0 : e.replaceAll(" ", "")) ?? null;
|
|
4510
4492
|
}
|
|
4511
|
-
function
|
|
4493
|
+
function pu(e) {
|
|
4512
4494
|
return e;
|
|
4513
4495
|
}
|
|
4514
|
-
class
|
|
4496
|
+
class mu extends Te {
|
|
4515
4497
|
constructor() {
|
|
4516
4498
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4517
4499
|
enumerable: !0,
|
|
@@ -4527,11 +4509,11 @@ class yu extends Te {
|
|
|
4527
4509
|
enumerable: !0,
|
|
4528
4510
|
configurable: !0,
|
|
4529
4511
|
writable: !0,
|
|
4530
|
-
value:
|
|
4512
|
+
value: pu
|
|
4531
4513
|
});
|
|
4532
4514
|
}
|
|
4533
4515
|
}
|
|
4534
|
-
class
|
|
4516
|
+
class yu extends Te {
|
|
4535
4517
|
constructor() {
|
|
4536
4518
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4537
4519
|
enumerable: !0,
|
|
@@ -4559,7 +4541,7 @@ class Eu extends Te {
|
|
|
4559
4541
|
});
|
|
4560
4542
|
}
|
|
4561
4543
|
}
|
|
4562
|
-
class
|
|
4544
|
+
class Eu extends Te {
|
|
4563
4545
|
constructor() {
|
|
4564
4546
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4565
4547
|
enumerable: !0,
|
|
@@ -4602,20 +4584,20 @@ class Zn extends Te {
|
|
|
4602
4584
|
function Ee(e, t, r) {
|
|
4603
4585
|
switch (e) {
|
|
4604
4586
|
case "card":
|
|
4605
|
-
return new Eu(t, r);
|
|
4606
|
-
case "cardNumber":
|
|
4607
4587
|
return new yu(t, r);
|
|
4588
|
+
case "cardNumber":
|
|
4589
|
+
return new mu(t, r);
|
|
4608
4590
|
case "cardExpirationDate":
|
|
4609
|
-
return new
|
|
4591
|
+
return new hu(t, r);
|
|
4610
4592
|
case "cardVerificationCode":
|
|
4611
|
-
return new
|
|
4593
|
+
return new Eu(t, r);
|
|
4612
4594
|
case "text":
|
|
4613
4595
|
return new Zn(t, r);
|
|
4614
4596
|
default:
|
|
4615
4597
|
ASSERT_EXHAUSTIVE(e);
|
|
4616
4598
|
}
|
|
4617
4599
|
}
|
|
4618
|
-
function
|
|
4600
|
+
function bu() {
|
|
4619
4601
|
return Date.now().toString(36) + Math.random().toString(36).slice(2);
|
|
4620
4602
|
}
|
|
4621
4603
|
function Lr(e) {
|
|
@@ -4780,16 +4762,19 @@ class ar {
|
|
|
4780
4762
|
configurable: !0,
|
|
4781
4763
|
writable: !0,
|
|
4782
4764
|
value: async (n) => {
|
|
4783
|
-
var
|
|
4784
|
-
if (((
|
|
4785
|
-
throw new Error(`The session's next_action='${(
|
|
4765
|
+
var d, u;
|
|
4766
|
+
if (((d = this.session.state) == null ? void 0 : d.next_action) !== "tokenize_card")
|
|
4767
|
+
throw new Error(`The session's next_action='${(u = this.session.state) == null ? void 0 : u.next_action}'. tokenize() is available only if next_action='tokenize_card'`);
|
|
4786
4768
|
const s = this.getFormValue(), i = this.extractAdditionalData(n);
|
|
4787
4769
|
if (!s)
|
|
4788
4770
|
throw new Error("Form elements must be initialized before tokenization");
|
|
4771
|
+
const a = this.getCardDataValidationError();
|
|
4772
|
+
if (a)
|
|
4773
|
+
throw a;
|
|
4789
4774
|
if (!s.number || !s.expiration_month || !s.expiration_year || !s.cvc)
|
|
4790
4775
|
throw new Error("Card data is not complete");
|
|
4791
|
-
const
|
|
4792
|
-
switch (
|
|
4776
|
+
const o = this.session.state.data;
|
|
4777
|
+
switch (o.provider) {
|
|
4793
4778
|
case "basis_theory": {
|
|
4794
4779
|
if (!this.bt)
|
|
4795
4780
|
throw new Error("basis_theory SDK not found");
|
|
@@ -4797,8 +4782,8 @@ class ar {
|
|
|
4797
4782
|
type: "card",
|
|
4798
4783
|
data: s,
|
|
4799
4784
|
...uu
|
|
4800
|
-
}).then((
|
|
4801
|
-
token_id:
|
|
4785
|
+
}).then((l) => Array.isArray(l) ? null : {
|
|
4786
|
+
token_id: l.id,
|
|
4802
4787
|
additional_data: i
|
|
4803
4788
|
});
|
|
4804
4789
|
}
|
|
@@ -4809,9 +4794,9 @@ class ar {
|
|
|
4809
4794
|
expiry_year: s.expiration_year,
|
|
4810
4795
|
security_code: s.cvc,
|
|
4811
4796
|
additional_data: i
|
|
4812
|
-
},
|
|
4797
|
+
}, o.jwk);
|
|
4813
4798
|
default:
|
|
4814
|
-
ASSERT_EXHAUSTIVE(
|
|
4799
|
+
ASSERT_EXHAUSTIVE(o);
|
|
4815
4800
|
}
|
|
4816
4801
|
}
|
|
4817
4802
|
}), Object.defineProperty(this, "onStateChange", {
|
|
@@ -4851,33 +4836,34 @@ class ar {
|
|
|
4851
4836
|
throw new Error("Card form must be initialized and completed before processing");
|
|
4852
4837
|
if (this.session.isNextAction("refresh_security_code"))
|
|
4853
4838
|
return this.refreshSecurityCode();
|
|
4854
|
-
this.disableFormElements();
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
}
|
|
4839
|
+
this.disableFormElements(!0);
|
|
4840
|
+
try {
|
|
4841
|
+
const s = await this.tokenize(n);
|
|
4842
|
+
if (!s)
|
|
4843
|
+
throw new Error("Tokenization failed");
|
|
4844
|
+
return await this.session.completeAction({
|
|
4845
|
+
action: "tokenize_card",
|
|
4846
|
+
result: s
|
|
4847
|
+
});
|
|
4848
|
+
} catch (s) {
|
|
4849
|
+
throw this.disableFormElements(!1), s;
|
|
4850
|
+
}
|
|
4866
4851
|
}
|
|
4867
|
-
}), ce.set(this,
|
|
4852
|
+
}), ce.set(this, bu()), this.cvcOnlyEnabled = this.session.isNextAction("refresh_security_code");
|
|
4868
4853
|
}
|
|
4869
4854
|
async refreshSecurityCode() {
|
|
4870
4855
|
const t = this.getFormValue();
|
|
4871
|
-
if (
|
|
4856
|
+
if (!(t != null && t.cvc))
|
|
4872
4857
|
throw new Error("cvc field was not filled");
|
|
4873
4858
|
if (!this.session.isNextAction("refresh_security_code") || !this.session.state)
|
|
4874
4859
|
throw new Error("refreshSecurityCode() is available only if next_action=refresh_security_code");
|
|
4860
|
+
this.disableFormElements(!0);
|
|
4875
4861
|
const r = await this.encryptCardData({ security_code: t.cvc }, this.session.state.data.jwk);
|
|
4876
4862
|
return this.session.completeAction({
|
|
4877
4863
|
action: "refresh_security_code",
|
|
4878
4864
|
result: { ...r }
|
|
4879
4865
|
}).catch((n) => {
|
|
4880
|
-
if (n instanceof Error)
|
|
4866
|
+
if (this.disableFormElements(!1), n instanceof Error)
|
|
4881
4867
|
throw n;
|
|
4882
4868
|
return { status: "failure", data: n };
|
|
4883
4869
|
});
|
|
@@ -4905,9 +4891,9 @@ class ar {
|
|
|
4905
4891
|
hasFormElements() {
|
|
4906
4892
|
return !!Object.keys(this.cardElements).length;
|
|
4907
4893
|
}
|
|
4908
|
-
disableFormElements() {
|
|
4909
|
-
Object.values(this.cardElements).forEach(({ element:
|
|
4910
|
-
|
|
4894
|
+
disableFormElements(t) {
|
|
4895
|
+
Object.values(this.cardElements).forEach(({ element: r }) => {
|
|
4896
|
+
r.update({ disabled: t });
|
|
4911
4897
|
});
|
|
4912
4898
|
}
|
|
4913
4899
|
extractAdditionalData({ cardholder_name: t, billing_address: r = {} }) {
|
|
@@ -4948,6 +4934,12 @@ class ar {
|
|
|
4948
4934
|
valid: !1
|
|
4949
4935
|
};
|
|
4950
4936
|
}
|
|
4937
|
+
getCardDataValidationError() {
|
|
4938
|
+
if (!this.state.complete)
|
|
4939
|
+
return new Error(this.state.error ?? "Card data is not complete");
|
|
4940
|
+
if (!this.state.valid)
|
|
4941
|
+
return new Error(`Card data is not valid. ${this.state.error}`);
|
|
4942
|
+
}
|
|
4951
4943
|
}
|
|
4952
4944
|
const ce = /* @__PURE__ */ new Map();
|
|
4953
4945
|
function oe(e, t) {
|
|
@@ -4958,7 +4950,7 @@ function ie(e, t) {
|
|
|
4958
4950
|
const r = ce.get(e);
|
|
4959
4951
|
return t instanceof Zn && r ? oe(e, t) ?? void 0 : t;
|
|
4960
4952
|
}
|
|
4961
|
-
class
|
|
4953
|
+
class _u {
|
|
4962
4954
|
constructor(t = "https://api.hellgate.io", r = new AbortController()) {
|
|
4963
4955
|
Object.defineProperty(this, "abortCtrl", {
|
|
4964
4956
|
enumerable: !0,
|
|
@@ -4975,7 +4967,7 @@ class gu {
|
|
|
4975
4967
|
getSession(t) {
|
|
4976
4968
|
return fetch(`${this.baseUrl}/sessions/${t}`, {
|
|
4977
4969
|
signal: this.abortCtrl.signal
|
|
4978
|
-
}).then((r) =>
|
|
4970
|
+
}).then((r) => Pt(r));
|
|
4979
4971
|
}
|
|
4980
4972
|
completeAction(t, r) {
|
|
4981
4973
|
return fetch(`${this.baseUrl}/sessions/${t}/complete-action`, {
|
|
@@ -4986,14 +4978,14 @@ class gu {
|
|
|
4986
4978
|
mode: "cors",
|
|
4987
4979
|
body: JSON.stringify(r),
|
|
4988
4980
|
signal: this.abortCtrl.signal
|
|
4989
|
-
}).then((n) =>
|
|
4981
|
+
}).then((n) => Pt(n));
|
|
4990
4982
|
}
|
|
4991
4983
|
cancelAll() {
|
|
4992
4984
|
this.abortCtrl.abort();
|
|
4993
4985
|
}
|
|
4994
4986
|
}
|
|
4995
|
-
const
|
|
4996
|
-
class
|
|
4987
|
+
const gu = 2e3;
|
|
4988
|
+
class wu {
|
|
4997
4989
|
constructor(t, r) {
|
|
4998
4990
|
Object.defineProperty(this, "id", {
|
|
4999
4991
|
enumerable: !0,
|
|
@@ -5061,7 +5053,7 @@ class Su {
|
|
|
5061
5053
|
const o = this.onStateChange((d) => {
|
|
5062
5054
|
d.next_action !== (s == null ? void 0 : s.next_action) && d.next_action === null && (i(d), o());
|
|
5063
5055
|
});
|
|
5064
|
-
this.api.completeAction(this.id, n).then((d) => this.newStateHandle(d, a)).catch(async (d) => a(await
|
|
5056
|
+
this.api.completeAction(this.id, n).then((d) => this.newStateHandle(d, a)).catch(async (d) => a(await Su(d)));
|
|
5065
5057
|
});
|
|
5066
5058
|
}
|
|
5067
5059
|
}), Object.defineProperty(this, "completeSession", {
|
|
@@ -5097,17 +5089,17 @@ class Su {
|
|
|
5097
5089
|
case "wait": {
|
|
5098
5090
|
window.clearTimeout(this.pollingTimer), this.pollingTimer = window.setTimeout(() => this.updateSessionState(r).catch((s) => {
|
|
5099
5091
|
s instanceof Response && s.status === 404 && (r == null || r(new Error(`Session ${this.id} has expired`)));
|
|
5100
|
-
}),
|
|
5092
|
+
}), gu);
|
|
5101
5093
|
break;
|
|
5102
5094
|
}
|
|
5103
5095
|
}
|
|
5104
5096
|
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;
|
|
5105
5097
|
}
|
|
5106
5098
|
}
|
|
5107
|
-
async function
|
|
5099
|
+
async function Su(e) {
|
|
5108
5100
|
return !e.ok && e.status >= 400 && e.status <= 500 ? e.json() : e;
|
|
5109
5101
|
}
|
|
5110
|
-
const
|
|
5102
|
+
const Tu = {
|
|
5111
5103
|
base_url: "https://api.hellgate.io"
|
|
5112
5104
|
};
|
|
5113
5105
|
class Qn {
|
|
@@ -5143,9 +5135,9 @@ class Qn {
|
|
|
5143
5135
|
}
|
|
5144
5136
|
static async initHandlers(t, r) {
|
|
5145
5137
|
const n = {
|
|
5146
|
-
...
|
|
5138
|
+
...Tu,
|
|
5147
5139
|
...r
|
|
5148
|
-
}, s = new
|
|
5140
|
+
}, s = new _u(n.base_url, n.abortCtrl), i = new wu(t, s);
|
|
5149
5141
|
await i.init();
|
|
5150
5142
|
const a = i.isNextAction("tokenize_card") || i.isNextAction("refresh_security_code") ? await this.createCardHandler(i) : void 0, o = this.create3DSHandler(i, r);
|
|
5151
5143
|
return { session: i, cardHandler: a, handler3DS: o };
|
|
@@ -5162,10 +5154,10 @@ class Qn {
|
|
|
5162
5154
|
}
|
|
5163
5155
|
globalThis.HellgateSDK && (globalThis.Hellgate = globalThis.HellgateSDK.Hellgate, delete globalThis.HellgateSDK);
|
|
5164
5156
|
export {
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5157
|
+
yu as CardElement,
|
|
5158
|
+
hu as CardExpirationDateElement,
|
|
5159
|
+
mu as CardNumberElement,
|
|
5160
|
+
Eu as CardVerificationCodeElement,
|
|
5169
5161
|
Qn as Hellgate,
|
|
5170
5162
|
ts as Hellgate3DSHandler,
|
|
5171
5163
|
ar as HellgateCardHandler,
|
|
@@ -5173,7 +5165,7 @@ export {
|
|
|
5173
5165
|
Ee as createElement,
|
|
5174
5166
|
Xn as extractCardNumberValue,
|
|
5175
5167
|
Jn as extractExpiryDateValue,
|
|
5176
|
-
|
|
5168
|
+
pu as putCardNumberValue,
|
|
5177
5169
|
Yn as putExpiryDateValue,
|
|
5178
|
-
|
|
5170
|
+
bu as uid
|
|
5179
5171
|
};
|