@starfish-codes/hellgate 3.1.1 → 3.2.1
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/card/ui/styles.d.ts +3 -3
- package/dist/card/ui/typings.d.ts +1 -0
- package/dist/hellgate-sdk.mjs +464 -464
- package/dist/hellgate-sdk.umd.js +4 -4
- package/package.json +1 -1
package/dist/hellgate-sdk.mjs
CHANGED
|
@@ -17,8 +17,8 @@ function gt(e) {
|
|
|
17
17
|
throw e;
|
|
18
18
|
return e.json();
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
class
|
|
20
|
+
const Un = 2e3;
|
|
21
|
+
class Hn {
|
|
22
22
|
constructor(t, r) {
|
|
23
23
|
Object.defineProperty(this, "session", {
|
|
24
24
|
enumerable: !0,
|
|
@@ -156,7 +156,7 @@ class Un {
|
|
|
156
156
|
});
|
|
157
157
|
const o = new Promise((d) => {
|
|
158
158
|
const c = (h) => {
|
|
159
|
-
h.source
|
|
159
|
+
h.source !== i.contentWindow || h.data.event !== "AuthResultReady" || d(h.data);
|
|
160
160
|
};
|
|
161
161
|
window.addEventListener("message", c), this.disposers.push(() => window.removeEventListener("message", c));
|
|
162
162
|
}), l = new Promise((d) => {
|
|
@@ -187,14 +187,14 @@ class Un {
|
|
|
187
187
|
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => gt(n)).then((n) => {
|
|
188
188
|
this.startAuthResultPolling(t, r), r(n);
|
|
189
189
|
}).catch(() => {
|
|
190
|
-
}),
|
|
190
|
+
}), Un), () => window.clearTimeout(this.resultPollingTimer);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
function it() {
|
|
194
194
|
return document.body;
|
|
195
195
|
}
|
|
196
|
-
var
|
|
197
|
-
function
|
|
196
|
+
var Ln = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
197
|
+
function Mn(e) {
|
|
198
198
|
if (e.__esModule)
|
|
199
199
|
return e;
|
|
200
200
|
var t = e.default;
|
|
@@ -220,7 +220,7 @@ Object.defineProperty(ne, "__esModule", {
|
|
|
220
220
|
value: !0
|
|
221
221
|
});
|
|
222
222
|
ne.makeRequestWithoutElementsPayloadCheck = ne.makeRequestWithElementsPayloadCheck = void 0;
|
|
223
|
-
function
|
|
223
|
+
function In(e) {
|
|
224
224
|
function t() {
|
|
225
225
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
226
226
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -234,54 +234,54 @@ function Mn(e) {
|
|
|
234
234
|
}
|
|
235
235
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
236
236
|
}
|
|
237
|
-
class Sr extends
|
|
237
|
+
class Sr extends In(Error) {
|
|
238
238
|
constructor(t) {
|
|
239
239
|
super(t), this.name = "NoElementsError";
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const $n = (e, t, r, n, s = {}) => {
|
|
243
243
|
if (e != null && e.hasElement(n))
|
|
244
244
|
return e.client[t](r, n, s);
|
|
245
245
|
let i = "Elements not initialized.";
|
|
246
246
|
throw e && (i = "Element not found in payload."), new Sr(`${i} Use a regular HTTP client if no elements are needed.`);
|
|
247
247
|
};
|
|
248
|
-
ne.makeRequestWithElementsPayloadCheck =
|
|
249
|
-
const
|
|
248
|
+
ne.makeRequestWithElementsPayloadCheck = $n;
|
|
249
|
+
const Kn = (e, t, r, n = {}) => {
|
|
250
250
|
if (e)
|
|
251
251
|
return e.client[t](r, n);
|
|
252
252
|
throw new Sr("Elements not initialized. Use a regular HTTP client if no elements are needed.");
|
|
253
253
|
};
|
|
254
|
-
ne.makeRequestWithoutElementsPayloadCheck =
|
|
254
|
+
ne.makeRequestWithoutElementsPayloadCheck = Kn;
|
|
255
255
|
var Ar = {}, De = {}, C = {}, b = {};
|
|
256
256
|
Object.defineProperty(b, "__esModule", {
|
|
257
257
|
value: !0
|
|
258
258
|
});
|
|
259
259
|
b.USER_AGENT_HEADER = b.USER_AGENT_CLIENT = b.MERGE_CONTENT_TYPE = b.DEFAULT_ELEMENTS_BASE_URL = b.DEFAULT_BASE_URL = b.CONTENT_TYPE_HEADER = b.CLIENT_USER_AGENT_HEADER = b.CLIENT_BASE_PATHS = b.BT_TRANSACTION_ID_HEADER = b.BT_TRACE_ID_HEADER = b.BT_IDEMPOTENCY_KEY_HEADER = b.BT_EXPOSE_PROXY_RESPONSE_HEADER = b.BROWSER_LIST = b.API_KEY_HEADER = void 0;
|
|
260
|
-
const
|
|
261
|
-
b.API_KEY_HEADER =
|
|
262
|
-
const
|
|
263
|
-
b.BT_TRACE_ID_HEADER =
|
|
264
|
-
const
|
|
265
|
-
b.BT_IDEMPOTENCY_KEY_HEADER =
|
|
266
|
-
const
|
|
267
|
-
b.BT_EXPOSE_PROXY_RESPONSE_HEADER =
|
|
268
|
-
const
|
|
269
|
-
b.BT_TRANSACTION_ID_HEADER =
|
|
270
|
-
const
|
|
271
|
-
b.CONTENT_TYPE_HEADER =
|
|
272
|
-
const
|
|
273
|
-
b.MERGE_CONTENT_TYPE =
|
|
274
|
-
const
|
|
275
|
-
b.USER_AGENT_HEADER =
|
|
276
|
-
const
|
|
277
|
-
b.CLIENT_USER_AGENT_HEADER =
|
|
278
|
-
const
|
|
279
|
-
b.USER_AGENT_CLIENT =
|
|
280
|
-
const
|
|
281
|
-
b.DEFAULT_BASE_URL =
|
|
282
|
-
const
|
|
283
|
-
b.DEFAULT_ELEMENTS_BASE_URL =
|
|
284
|
-
const
|
|
260
|
+
const qn = "BT-API-KEY";
|
|
261
|
+
b.API_KEY_HEADER = qn;
|
|
262
|
+
const Fn = "bt-trace-id";
|
|
263
|
+
b.BT_TRACE_ID_HEADER = Fn;
|
|
264
|
+
const zn = "bt-idempotency-key";
|
|
265
|
+
b.BT_IDEMPOTENCY_KEY_HEADER = zn;
|
|
266
|
+
const Wn = "BT-EXPOSE-RAW-PROXY-RESPONSE";
|
|
267
|
+
b.BT_EXPOSE_PROXY_RESPONSE_HEADER = Wn;
|
|
268
|
+
const kn = "BT-TRANSACTION-ID";
|
|
269
|
+
b.BT_TRANSACTION_ID_HEADER = kn;
|
|
270
|
+
const Gn = "Content-Type";
|
|
271
|
+
b.CONTENT_TYPE_HEADER = Gn;
|
|
272
|
+
const Vn = "application/merge-patch+json";
|
|
273
|
+
b.MERGE_CONTENT_TYPE = Vn;
|
|
274
|
+
const Jn = "User-Agent";
|
|
275
|
+
b.USER_AGENT_HEADER = Jn;
|
|
276
|
+
const Yn = "BT-CLIENT-USER-AGENT";
|
|
277
|
+
b.CLIENT_USER_AGENT_HEADER = Yn;
|
|
278
|
+
const Xn = "BasisTheoryJS";
|
|
279
|
+
b.USER_AGENT_CLIENT = Xn;
|
|
280
|
+
const Zn = "https://api.basistheory.com";
|
|
281
|
+
b.DEFAULT_BASE_URL = Zn;
|
|
282
|
+
const Qn = "https://js.basistheory.com/hosted-elements";
|
|
283
|
+
b.DEFAULT_ELEMENTS_BASE_URL = Qn;
|
|
284
|
+
const es = {
|
|
285
285
|
tokens: "tokens",
|
|
286
286
|
tokenize: "tokenize",
|
|
287
287
|
applications: "applications",
|
|
@@ -295,8 +295,8 @@ const Qn = {
|
|
|
295
295
|
sessions: "sessions",
|
|
296
296
|
transactions: "transactions"
|
|
297
297
|
};
|
|
298
|
-
b.CLIENT_BASE_PATHS =
|
|
299
|
-
const
|
|
298
|
+
b.CLIENT_BASE_PATHS = es;
|
|
299
|
+
const ts = [{
|
|
300
300
|
browserName: "Firefox",
|
|
301
301
|
browserUA: "Firefox"
|
|
302
302
|
}, {
|
|
@@ -324,35 +324,35 @@ const es = [{
|
|
|
324
324
|
browserName: "Safari",
|
|
325
325
|
browserUA: "Safari"
|
|
326
326
|
}];
|
|
327
|
-
b.BROWSER_LIST =
|
|
327
|
+
b.BROWSER_LIST = ts;
|
|
328
328
|
var m = {};
|
|
329
329
|
function Tr(e, t) {
|
|
330
330
|
return function() {
|
|
331
331
|
return e.apply(t, arguments);
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
const { toString:
|
|
335
|
-
const r =
|
|
334
|
+
const { toString: rs } = Object.prototype, { getPrototypeOf: jt } = Object, Ue = /* @__PURE__ */ ((e) => (t) => {
|
|
335
|
+
const r = rs.call(t);
|
|
336
336
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
337
337
|
})(/* @__PURE__ */ Object.create(null)), $ = (e) => (e = e.toLowerCase(), (t) => Ue(t) === e), He = (e) => (t) => typeof t === e, { isArray: ae } = Array, fe = He("undefined");
|
|
338
|
-
function
|
|
338
|
+
function ns(e) {
|
|
339
339
|
return e !== null && !fe(e) && e.constructor !== null && !fe(e.constructor) && x(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
340
340
|
}
|
|
341
341
|
const Rr = $("ArrayBuffer");
|
|
342
|
-
function
|
|
342
|
+
function ss(e) {
|
|
343
343
|
let t;
|
|
344
344
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Rr(e.buffer), t;
|
|
345
345
|
}
|
|
346
|
-
const
|
|
346
|
+
const is = He("string"), x = He("function"), vr = He("number"), Le = (e) => e !== null && typeof e == "object", as = (e) => e === !0 || e === !1, Oe = (e) => {
|
|
347
347
|
if (Ue(e) !== "object")
|
|
348
348
|
return !1;
|
|
349
349
|
const t = jt(e);
|
|
350
350
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
351
|
-
},
|
|
351
|
+
}, os = $("Date"), cs = $("File"), us = $("Blob"), ls = $("FileList"), ds = (e) => Le(e) && x(e.pipe), fs = (e) => {
|
|
352
352
|
let t;
|
|
353
353
|
return e && (typeof FormData == "function" && e instanceof FormData || x(e.append) && ((t = Ue(e)) === "formdata" || // detect form-data instance
|
|
354
354
|
t === "object" && x(e.toString) && e.toString() === "[object FormData]"));
|
|
355
|
-
},
|
|
355
|
+
}, hs = $("URLSearchParams"), ps = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
356
356
|
function he(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
357
357
|
if (e === null || typeof e > "u")
|
|
358
358
|
return;
|
|
@@ -376,7 +376,7 @@ function Or(e, t) {
|
|
|
376
376
|
return s;
|
|
377
377
|
return null;
|
|
378
378
|
}
|
|
379
|
-
const Cr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window :
|
|
379
|
+
const Cr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ln, Pr = (e) => !fe(e) && e !== Cr;
|
|
380
380
|
function St() {
|
|
381
381
|
const { caseless: e } = Pr(this) && this || {}, t = {}, r = (n, s) => {
|
|
382
382
|
const i = e && Or(t, s) || s;
|
|
@@ -386,13 +386,13 @@ function St() {
|
|
|
386
386
|
arguments[n] && he(arguments[n], r);
|
|
387
387
|
return t;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const ms = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
390
390
|
r && x(s) ? e[i] = Tr(s, r) : e[i] = s;
|
|
391
|
-
}, { allOwnKeys: n }), e),
|
|
391
|
+
}, { allOwnKeys: n }), e), Es = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ys = (e, t, r, n) => {
|
|
392
392
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
393
393
|
value: t.prototype
|
|
394
394
|
}), r && Object.assign(e.prototype, r);
|
|
395
|
-
},
|
|
395
|
+
}, bs = (e, t, r, n) => {
|
|
396
396
|
let s, i, a;
|
|
397
397
|
const o = {};
|
|
398
398
|
if (t = t || {}, e == null)
|
|
@@ -403,11 +403,11 @@ const ps = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
403
403
|
e = r !== !1 && jt(e);
|
|
404
404
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
405
405
|
return t;
|
|
406
|
-
},
|
|
406
|
+
}, _s = (e, t, r) => {
|
|
407
407
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
408
408
|
const n = e.indexOf(t, r);
|
|
409
409
|
return n !== -1 && n === r;
|
|
410
|
-
},
|
|
410
|
+
}, ws = (e) => {
|
|
411
411
|
if (!e)
|
|
412
412
|
return null;
|
|
413
413
|
if (ae(e))
|
|
@@ -419,31 +419,31 @@ const ps = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
419
419
|
for (; t-- > 0; )
|
|
420
420
|
r[t] = e[t];
|
|
421
421
|
return r;
|
|
422
|
-
},
|
|
422
|
+
}, gs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && jt(Uint8Array)), Ss = (e, t) => {
|
|
423
423
|
const n = (e && e[Symbol.iterator]).call(e);
|
|
424
424
|
let s;
|
|
425
425
|
for (; (s = n.next()) && !s.done; ) {
|
|
426
426
|
const i = s.value;
|
|
427
427
|
t.call(e, i[0], i[1]);
|
|
428
428
|
}
|
|
429
|
-
},
|
|
429
|
+
}, As = (e, t) => {
|
|
430
430
|
let r;
|
|
431
431
|
const n = [];
|
|
432
432
|
for (; (r = e.exec(t)) !== null; )
|
|
433
433
|
n.push(r);
|
|
434
434
|
return n;
|
|
435
|
-
},
|
|
435
|
+
}, Ts = $("HTMLFormElement"), Rs = (e) => e.toLowerCase().replace(
|
|
436
436
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
437
437
|
function(r, n, s) {
|
|
438
438
|
return n.toUpperCase() + s;
|
|
439
439
|
}
|
|
440
|
-
), Jt = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype),
|
|
440
|
+
), Jt = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), vs = $("RegExp"), Br = (e, t) => {
|
|
441
441
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
442
442
|
he(r, (s, i) => {
|
|
443
443
|
let a;
|
|
444
444
|
(a = t(s, i, e)) !== !1 && (n[i] = a || s);
|
|
445
445
|
}), Object.defineProperties(e, n);
|
|
446
|
-
},
|
|
446
|
+
}, Os = (e) => {
|
|
447
447
|
Br(e, (t, r) => {
|
|
448
448
|
if (x(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
449
449
|
return !1;
|
|
@@ -458,29 +458,29 @@ const ps = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
|
-
},
|
|
461
|
+
}, Cs = (e, t) => {
|
|
462
462
|
const r = {}, n = (s) => {
|
|
463
463
|
s.forEach((i) => {
|
|
464
464
|
r[i] = !0;
|
|
465
465
|
});
|
|
466
466
|
};
|
|
467
467
|
return ae(e) ? n(e) : n(String(e).split(t)), r;
|
|
468
|
-
},
|
|
469
|
-
},
|
|
468
|
+
}, Ps = () => {
|
|
469
|
+
}, Bs = (e, t) => (e = +e, Number.isFinite(e) ? e : t), at = "abcdefghijklmnopqrstuvwxyz", Yt = "0123456789", xr = {
|
|
470
470
|
DIGIT: Yt,
|
|
471
471
|
ALPHA: at,
|
|
472
472
|
ALPHA_DIGIT: at + at.toUpperCase() + Yt
|
|
473
|
-
},
|
|
473
|
+
}, xs = (e = 16, t = xr.ALPHA_DIGIT) => {
|
|
474
474
|
let r = "";
|
|
475
475
|
const { length: n } = t;
|
|
476
476
|
for (; e--; )
|
|
477
477
|
r += t[Math.random() * n | 0];
|
|
478
478
|
return r;
|
|
479
479
|
};
|
|
480
|
-
function
|
|
480
|
+
function js(e) {
|
|
481
481
|
return !!(e && x(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const Ns = (e) => {
|
|
484
484
|
const t = new Array(10), r = (n, s) => {
|
|
485
485
|
if (Le(n)) {
|
|
486
486
|
if (t.indexOf(n) >= 0)
|
|
@@ -497,60 +497,60 @@ const js = (e) => {
|
|
|
497
497
|
return n;
|
|
498
498
|
};
|
|
499
499
|
return r(e, 0);
|
|
500
|
-
},
|
|
500
|
+
}, Ds = $("AsyncFunction"), Us = (e) => e && (Le(e) || x(e)) && x(e.then) && x(e.catch);
|
|
501
501
|
var u = {
|
|
502
502
|
isArray: ae,
|
|
503
503
|
isArrayBuffer: Rr,
|
|
504
|
-
isBuffer:
|
|
505
|
-
isFormData:
|
|
506
|
-
isArrayBufferView:
|
|
507
|
-
isString:
|
|
504
|
+
isBuffer: ns,
|
|
505
|
+
isFormData: fs,
|
|
506
|
+
isArrayBufferView: ss,
|
|
507
|
+
isString: is,
|
|
508
508
|
isNumber: vr,
|
|
509
|
-
isBoolean:
|
|
509
|
+
isBoolean: as,
|
|
510
510
|
isObject: Le,
|
|
511
511
|
isPlainObject: Oe,
|
|
512
512
|
isUndefined: fe,
|
|
513
|
-
isDate:
|
|
514
|
-
isFile:
|
|
515
|
-
isBlob:
|
|
516
|
-
isRegExp:
|
|
513
|
+
isDate: os,
|
|
514
|
+
isFile: cs,
|
|
515
|
+
isBlob: us,
|
|
516
|
+
isRegExp: vs,
|
|
517
517
|
isFunction: x,
|
|
518
|
-
isStream:
|
|
519
|
-
isURLSearchParams:
|
|
520
|
-
isTypedArray:
|
|
521
|
-
isFileList:
|
|
518
|
+
isStream: ds,
|
|
519
|
+
isURLSearchParams: hs,
|
|
520
|
+
isTypedArray: gs,
|
|
521
|
+
isFileList: ls,
|
|
522
522
|
forEach: he,
|
|
523
523
|
merge: St,
|
|
524
|
-
extend:
|
|
525
|
-
trim:
|
|
526
|
-
stripBOM:
|
|
527
|
-
inherits:
|
|
528
|
-
toFlatObject:
|
|
524
|
+
extend: ms,
|
|
525
|
+
trim: ps,
|
|
526
|
+
stripBOM: Es,
|
|
527
|
+
inherits: ys,
|
|
528
|
+
toFlatObject: bs,
|
|
529
529
|
kindOf: Ue,
|
|
530
530
|
kindOfTest: $,
|
|
531
|
-
endsWith:
|
|
532
|
-
toArray:
|
|
533
|
-
forEachEntry:
|
|
534
|
-
matchAll:
|
|
535
|
-
isHTMLForm:
|
|
531
|
+
endsWith: _s,
|
|
532
|
+
toArray: ws,
|
|
533
|
+
forEachEntry: Ss,
|
|
534
|
+
matchAll: As,
|
|
535
|
+
isHTMLForm: Ts,
|
|
536
536
|
hasOwnProperty: Jt,
|
|
537
537
|
hasOwnProp: Jt,
|
|
538
538
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
539
539
|
reduceDescriptors: Br,
|
|
540
|
-
freezeMethods:
|
|
541
|
-
toObjectSet:
|
|
542
|
-
toCamelCase:
|
|
543
|
-
noop:
|
|
544
|
-
toFiniteNumber:
|
|
540
|
+
freezeMethods: Os,
|
|
541
|
+
toObjectSet: Cs,
|
|
542
|
+
toCamelCase: Rs,
|
|
543
|
+
noop: Ps,
|
|
544
|
+
toFiniteNumber: Bs,
|
|
545
545
|
findKey: Or,
|
|
546
546
|
global: Cr,
|
|
547
547
|
isContextDefined: Pr,
|
|
548
548
|
ALPHABET: xr,
|
|
549
|
-
generateString:
|
|
550
|
-
isSpecCompliantForm:
|
|
551
|
-
toJSONObject:
|
|
552
|
-
isAsyncFn:
|
|
553
|
-
isThenable:
|
|
549
|
+
generateString: xs,
|
|
550
|
+
isSpecCompliantForm: js,
|
|
551
|
+
toJSONObject: Ns,
|
|
552
|
+
isAsyncFn: Ds,
|
|
553
|
+
isThenable: Us
|
|
554
554
|
};
|
|
555
555
|
function y(e, t, r, n, s) {
|
|
556
556
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
@@ -602,7 +602,7 @@ y.from = (e, t, r, n, s, i) => {
|
|
|
602
602
|
return l !== Error.prototype;
|
|
603
603
|
}, (o) => o !== "isAxiosError"), y.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
|
|
604
604
|
};
|
|
605
|
-
var
|
|
605
|
+
var Hs = null;
|
|
606
606
|
function At(e) {
|
|
607
607
|
return u.isPlainObject(e) || u.isArray(e);
|
|
608
608
|
}
|
|
@@ -614,10 +614,10 @@ function Xt(e, t, r) {
|
|
|
614
614
|
return s = Dr(s), !r && i ? "[" + s + "]" : s;
|
|
615
615
|
}).join(r ? "." : "") : t;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Ls(e) {
|
|
618
618
|
return u.isArray(e) && !e.some(At);
|
|
619
619
|
}
|
|
620
|
-
const
|
|
620
|
+
const Ms = u.toFlatObject(u, {}, null, function(t) {
|
|
621
621
|
return /^is[A-Z]/.test(t);
|
|
622
622
|
});
|
|
623
623
|
function Me(e, t, r) {
|
|
@@ -647,18 +647,18 @@ function Me(e, t, r) {
|
|
|
647
647
|
if (f && !T && typeof f == "object") {
|
|
648
648
|
if (u.endsWith(p, "{}"))
|
|
649
649
|
p = n ? p : p.slice(0, -2), f = JSON.stringify(f);
|
|
650
|
-
else if (u.isArray(f) &&
|
|
651
|
-
return p = Dr(p), j.forEach(function(_e,
|
|
650
|
+
else if (u.isArray(f) && Ls(f) || (u.isFileList(f) || u.endsWith(p, "[]")) && (j = u.toArray(f)))
|
|
651
|
+
return p = Dr(p), j.forEach(function(_e, Dn) {
|
|
652
652
|
!(u.isUndefined(_e) || _e === null) && t.append(
|
|
653
653
|
// eslint-disable-next-line no-nested-ternary
|
|
654
|
-
a === !0 ? Xt([p],
|
|
654
|
+
a === !0 ? Xt([p], Dn, i) : a === null ? p : p + "[]",
|
|
655
655
|
d(_e)
|
|
656
656
|
);
|
|
657
657
|
}), !1;
|
|
658
658
|
}
|
|
659
659
|
return At(f) ? !0 : (t.append(Xt(T, p, i), d(f)), !1);
|
|
660
660
|
}
|
|
661
|
-
const h = [], E = Object.assign(
|
|
661
|
+
const h = [], E = Object.assign(Ms, {
|
|
662
662
|
defaultVisitor: c,
|
|
663
663
|
convertValue: d,
|
|
664
664
|
isVisitable: At
|
|
@@ -711,13 +711,13 @@ Ur.toString = function(t) {
|
|
|
711
711
|
return r(s[0]) + "=" + r(s[1]);
|
|
712
712
|
}, "").join("&");
|
|
713
713
|
};
|
|
714
|
-
function
|
|
714
|
+
function Is(e) {
|
|
715
715
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
716
716
|
}
|
|
717
717
|
function Hr(e, t, r) {
|
|
718
718
|
if (!t)
|
|
719
719
|
return e;
|
|
720
|
-
const n = r && r.encode ||
|
|
720
|
+
const n = r && r.encode || Is, s = r && r.serialize;
|
|
721
721
|
let i;
|
|
722
722
|
if (s ? i = s(t, r) : i = u.isURLSearchParams(t) ? t.toString() : new Nt(t, r).toString(n), i) {
|
|
723
723
|
const a = e.indexOf("#");
|
|
@@ -725,7 +725,7 @@ function Hr(e, t, r) {
|
|
|
725
725
|
}
|
|
726
726
|
return e;
|
|
727
727
|
}
|
|
728
|
-
class
|
|
728
|
+
class $s {
|
|
729
729
|
constructor() {
|
|
730
730
|
this.handlers = [];
|
|
731
731
|
}
|
|
@@ -779,41 +779,41 @@ class Is {
|
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
var Qt =
|
|
782
|
+
var Qt = $s, Lr = {
|
|
783
783
|
silentJSONParsing: !0,
|
|
784
784
|
forcedJSONParsing: !0,
|
|
785
785
|
clarifyTimeoutError: !1
|
|
786
|
-
},
|
|
786
|
+
}, Ks = typeof URLSearchParams < "u" ? URLSearchParams : Nt, qs = typeof FormData < "u" ? FormData : null, Fs = typeof Blob < "u" ? Blob : null, zs = {
|
|
787
787
|
isBrowser: !0,
|
|
788
788
|
classes: {
|
|
789
|
-
URLSearchParams:
|
|
790
|
-
FormData:
|
|
791
|
-
Blob:
|
|
789
|
+
URLSearchParams: Ks,
|
|
790
|
+
FormData: qs,
|
|
791
|
+
Blob: Fs
|
|
792
792
|
},
|
|
793
793
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
794
794
|
};
|
|
795
|
-
const Mr = typeof window < "u" && typeof document < "u",
|
|
795
|
+
const Mr = typeof window < "u" && typeof document < "u", Ws = ((e) => Mr && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), ks = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
796
796
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function";
|
|
797
|
-
var
|
|
797
|
+
var Gs = /* @__PURE__ */ Object.freeze({
|
|
798
798
|
__proto__: null,
|
|
799
799
|
hasBrowserEnv: Mr,
|
|
800
|
-
hasStandardBrowserWebWorkerEnv:
|
|
801
|
-
hasStandardBrowserEnv:
|
|
800
|
+
hasStandardBrowserWebWorkerEnv: ks,
|
|
801
|
+
hasStandardBrowserEnv: Ws
|
|
802
802
|
}), H = {
|
|
803
|
-
...
|
|
804
|
-
...
|
|
803
|
+
...Gs,
|
|
804
|
+
...zs
|
|
805
805
|
};
|
|
806
|
-
function
|
|
806
|
+
function Vs(e, t) {
|
|
807
807
|
return Me(e, new H.classes.URLSearchParams(), Object.assign({
|
|
808
808
|
visitor: function(r, n, s, i) {
|
|
809
809
|
return H.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
810
810
|
}
|
|
811
811
|
}, t));
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Js(e) {
|
|
814
814
|
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function Ys(e) {
|
|
817
817
|
const t = {}, r = Object.keys(e);
|
|
818
818
|
let n;
|
|
819
819
|
const s = r.length;
|
|
@@ -826,17 +826,17 @@ function Ir(e) {
|
|
|
826
826
|
function t(r, n, s, i) {
|
|
827
827
|
let a = r[i++];
|
|
828
828
|
const o = Number.isFinite(+a), l = i >= r.length;
|
|
829
|
-
return a = !a && u.isArray(s) ? s.length : a, l ? (u.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && u.isArray(s[a]) && (s[a] =
|
|
829
|
+
return a = !a && u.isArray(s) ? s.length : a, l ? (u.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && u.isArray(s[a]) && (s[a] = Ys(s[a])), !o);
|
|
830
830
|
}
|
|
831
831
|
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
832
832
|
const r = {};
|
|
833
833
|
return u.forEachEntry(e, (n, s) => {
|
|
834
|
-
t(
|
|
834
|
+
t(Js(n), s, r, 0);
|
|
835
835
|
}), r;
|
|
836
836
|
}
|
|
837
837
|
return null;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Xs(e, t, r) {
|
|
840
840
|
if (u.isString(e))
|
|
841
841
|
try {
|
|
842
842
|
return (t || JSON.parse)(e), u.trim(e);
|
|
@@ -862,7 +862,7 @@ const Dt = {
|
|
|
862
862
|
let o;
|
|
863
863
|
if (i) {
|
|
864
864
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
865
|
-
return
|
|
865
|
+
return Vs(t, this.formSerializer).toString();
|
|
866
866
|
if ((o = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
867
867
|
const l = this.env && this.env.FormData;
|
|
868
868
|
return Me(
|
|
@@ -872,7 +872,7 @@ const Dt = {
|
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
875
|
+
return i || s ? (r.setContentType("application/json", !1), Xs(t)) : t;
|
|
876
876
|
}],
|
|
877
877
|
transformResponse: [function(t) {
|
|
878
878
|
const r = this.transitional || Dt.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -914,7 +914,7 @@ u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
|
914
914
|
Dt.headers[e] = {};
|
|
915
915
|
});
|
|
916
916
|
var Ut = Dt;
|
|
917
|
-
const
|
|
917
|
+
const Zs = u.toObjectSet([
|
|
918
918
|
"age",
|
|
919
919
|
"authorization",
|
|
920
920
|
"content-length",
|
|
@@ -933,12 +933,12 @@ const Xs = u.toObjectSet([
|
|
|
933
933
|
"retry-after",
|
|
934
934
|
"user-agent"
|
|
935
935
|
]);
|
|
936
|
-
var
|
|
936
|
+
var Qs = (e) => {
|
|
937
937
|
const t = {};
|
|
938
938
|
let r, n, s;
|
|
939
939
|
return e && e.split(`
|
|
940
940
|
`).forEach(function(a) {
|
|
941
|
-
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] &&
|
|
941
|
+
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] && Zs[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
942
942
|
}), t;
|
|
943
943
|
};
|
|
944
944
|
const er = Symbol("internals");
|
|
@@ -948,14 +948,14 @@ function oe(e) {
|
|
|
948
948
|
function Ce(e) {
|
|
949
949
|
return e === !1 || e == null ? e : u.isArray(e) ? e.map(Ce) : String(e);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function ei(e) {
|
|
952
952
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
953
953
|
let n;
|
|
954
954
|
for (; n = r.exec(e); )
|
|
955
955
|
t[n[1]] = n[2];
|
|
956
956
|
return t;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const ti = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
959
959
|
function ot(e, t, r, n, s) {
|
|
960
960
|
if (u.isFunction(n))
|
|
961
961
|
return n.call(this, t, r);
|
|
@@ -966,10 +966,10 @@ function ot(e, t, r, n, s) {
|
|
|
966
966
|
return n.test(t);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function ri(e) {
|
|
970
970
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function ni(e, t) {
|
|
973
973
|
const r = u.toCamelCase(" " + t);
|
|
974
974
|
["get", "set", "has"].forEach((n) => {
|
|
975
975
|
Object.defineProperty(e, n + r, {
|
|
@@ -994,7 +994,7 @@ class Ie {
|
|
|
994
994
|
(!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || l] = Ce(o));
|
|
995
995
|
}
|
|
996
996
|
const a = (o, l) => u.forEach(o, (d, c) => i(d, c, l));
|
|
997
|
-
return u.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : u.isString(t) && (t = t.trim()) && !
|
|
997
|
+
return u.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : u.isString(t) && (t = t.trim()) && !ti(t) ? a(Qs(t), r) : t != null && i(r, t, n), this;
|
|
998
998
|
}
|
|
999
999
|
get(t, r) {
|
|
1000
1000
|
if (t = oe(t), t) {
|
|
@@ -1004,7 +1004,7 @@ class Ie {
|
|
|
1004
1004
|
if (!r)
|
|
1005
1005
|
return s;
|
|
1006
1006
|
if (r === !0)
|
|
1007
|
-
return
|
|
1007
|
+
return ei(s);
|
|
1008
1008
|
if (u.isFunction(r))
|
|
1009
1009
|
return r.call(this, s, n);
|
|
1010
1010
|
if (u.isRegExp(r))
|
|
@@ -1048,7 +1048,7 @@ class Ie {
|
|
|
1048
1048
|
r[a] = Ce(s), delete r[i];
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
const o = t ?
|
|
1051
|
+
const o = t ? ri(i) : String(i).trim();
|
|
1052
1052
|
o !== i && delete r[i], r[o] = Ce(s), n[o] = !0;
|
|
1053
1053
|
}), this;
|
|
1054
1054
|
}
|
|
@@ -1084,7 +1084,7 @@ class Ie {
|
|
|
1084
1084
|
}).accessors, s = this.prototype;
|
|
1085
1085
|
function i(a) {
|
|
1086
1086
|
const o = oe(a);
|
|
1087
|
-
n[o] || (
|
|
1087
|
+
n[o] || (ni(s, a), n[o] = !0);
|
|
1088
1088
|
}
|
|
1089
1089
|
return u.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1090
1090
|
}
|
|
@@ -1117,7 +1117,7 @@ function pe(e, t, r) {
|
|
|
1117
1117
|
u.inherits(pe, y, {
|
|
1118
1118
|
__CANCEL__: !0
|
|
1119
1119
|
});
|
|
1120
|
-
function
|
|
1120
|
+
function si(e, t, r) {
|
|
1121
1121
|
const n = r.config.validateStatus;
|
|
1122
1122
|
!r.status || !n || n(r.status) ? e(r) : t(new y(
|
|
1123
1123
|
"Request failed with status code " + r.status,
|
|
@@ -1127,7 +1127,7 @@ function ni(e, t, r) {
|
|
|
1127
1127
|
r
|
|
1128
1128
|
));
|
|
1129
1129
|
}
|
|
1130
|
-
var
|
|
1130
|
+
var ii = H.hasStandardBrowserEnv ? (
|
|
1131
1131
|
// Standard browser envs support document.cookie
|
|
1132
1132
|
/* @__PURE__ */ function() {
|
|
1133
1133
|
return {
|
|
@@ -1158,16 +1158,16 @@ var si = H.hasStandardBrowserEnv ? (
|
|
|
1158
1158
|
};
|
|
1159
1159
|
}()
|
|
1160
1160
|
);
|
|
1161
|
-
function
|
|
1161
|
+
function ai(e) {
|
|
1162
1162
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function oi(e, t) {
|
|
1165
1165
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1166
1166
|
}
|
|
1167
1167
|
function Kr(e, t) {
|
|
1168
|
-
return e && !
|
|
1168
|
+
return e && !ai(t) ? oi(e, t) : t;
|
|
1169
1169
|
}
|
|
1170
|
-
var
|
|
1170
|
+
var ci = H.hasStandardBrowserEnv ? (
|
|
1171
1171
|
// Standard browser envs have full support of the APIs needed to test
|
|
1172
1172
|
// whether the request URL is of the same origin as current location.
|
|
1173
1173
|
function() {
|
|
@@ -1199,11 +1199,11 @@ var oi = H.hasStandardBrowserEnv ? (
|
|
|
1199
1199
|
};
|
|
1200
1200
|
}()
|
|
1201
1201
|
);
|
|
1202
|
-
function
|
|
1202
|
+
function ui(e) {
|
|
1203
1203
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1204
1204
|
return t && t[1] || "";
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function li(e, t) {
|
|
1207
1207
|
e = e || 10;
|
|
1208
1208
|
const r = new Array(e), n = new Array(e);
|
|
1209
1209
|
let s = 0, i = 0, a;
|
|
@@ -1221,7 +1221,7 @@ function ui(e, t) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
function tr(e, t) {
|
|
1223
1223
|
let r = 0;
|
|
1224
|
-
const n =
|
|
1224
|
+
const n = li(50, 250);
|
|
1225
1225
|
return (s) => {
|
|
1226
1226
|
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, o = i - r, l = n(o), d = i <= a;
|
|
1227
1227
|
r = i;
|
|
@@ -1237,8 +1237,8 @@ function tr(e, t) {
|
|
|
1237
1237
|
c[t ? "download" : "upload"] = !0, e(c);
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1241
|
-
var
|
|
1240
|
+
const di = typeof XMLHttpRequest < "u";
|
|
1241
|
+
var fi = di && function(e) {
|
|
1242
1242
|
return new Promise(function(r, n) {
|
|
1243
1243
|
let s = e.data;
|
|
1244
1244
|
const i = F.from(e.headers).normalize(), a = e.responseType;
|
|
@@ -1275,7 +1275,7 @@ var di = li && function(e) {
|
|
|
1275
1275
|
config: e,
|
|
1276
1276
|
request: c
|
|
1277
1277
|
};
|
|
1278
|
-
|
|
1278
|
+
si(function(D) {
|
|
1279
1279
|
r(D), l();
|
|
1280
1280
|
}, function(D) {
|
|
1281
1281
|
n(D), l();
|
|
@@ -1297,7 +1297,7 @@ var di = li && function(e) {
|
|
|
1297
1297
|
c
|
|
1298
1298
|
)), c = null;
|
|
1299
1299
|
}, H.hasStandardBrowserEnv) {
|
|
1300
|
-
const f =
|
|
1300
|
+
const f = ci(h) && e.xsrfCookieName && ii.read(e.xsrfCookieName);
|
|
1301
1301
|
f && i.set(e.xsrfHeaderName, f);
|
|
1302
1302
|
}
|
|
1303
1303
|
s === void 0 && i.setContentType(null), "setRequestHeader" in c && u.forEach(i.toJSON(), function(p, T) {
|
|
@@ -1305,7 +1305,7 @@ var di = li && function(e) {
|
|
|
1305
1305
|
}), u.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), a && a !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", tr(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", tr(e.onUploadProgress)), (e.cancelToken || e.signal) && (o = (f) => {
|
|
1306
1306
|
c && (n(!f || f.type ? new pe(null, e, c) : f), c.abort(), c = null);
|
|
1307
1307
|
}, e.cancelToken && e.cancelToken.subscribe(o), e.signal && (e.signal.aborted ? o() : e.signal.addEventListener("abort", o)));
|
|
1308
|
-
const w =
|
|
1308
|
+
const w = ui(h);
|
|
1309
1309
|
if (w && H.protocols.indexOf(w) === -1) {
|
|
1310
1310
|
n(new y("Unsupported protocol " + w + ":", y.ERR_BAD_REQUEST, e));
|
|
1311
1311
|
return;
|
|
@@ -1314,8 +1314,8 @@ var di = li && function(e) {
|
|
|
1314
1314
|
});
|
|
1315
1315
|
};
|
|
1316
1316
|
const Tt = {
|
|
1317
|
-
http:
|
|
1318
|
-
xhr:
|
|
1317
|
+
http: Hs,
|
|
1318
|
+
xhr: fi
|
|
1319
1319
|
};
|
|
1320
1320
|
u.forEach(Tt, (e, t) => {
|
|
1321
1321
|
if (e) {
|
|
@@ -1326,7 +1326,7 @@ u.forEach(Tt, (e, t) => {
|
|
|
1326
1326
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
|
-
const rr = (e) => `- ${e}`,
|
|
1329
|
+
const rr = (e) => `- ${e}`, hi = (e) => u.isFunction(e) || e === null || e === !1;
|
|
1330
1330
|
var qr = {
|
|
1331
1331
|
getAdapter: (e) => {
|
|
1332
1332
|
e = u.isArray(e) ? e : [e];
|
|
@@ -1336,7 +1336,7 @@ var qr = {
|
|
|
1336
1336
|
for (let i = 0; i < t; i++) {
|
|
1337
1337
|
r = e[i];
|
|
1338
1338
|
let a;
|
|
1339
|
-
if (n = r, !
|
|
1339
|
+
if (n = r, !hi(r) && (n = Tt[(a = String(r)).toLowerCase()], n === void 0))
|
|
1340
1340
|
throw new y(`Unknown adapter '${a}'`);
|
|
1341
1341
|
if (n)
|
|
1342
1342
|
break;
|
|
@@ -1471,7 +1471,7 @@ Ht.transitional = function(t, r, n) {
|
|
|
1471
1471
|
)), t ? t(i, a, o) : !0;
|
|
1472
1472
|
};
|
|
1473
1473
|
};
|
|
1474
|
-
function
|
|
1474
|
+
function pi(e, t, r) {
|
|
1475
1475
|
if (typeof e != "object")
|
|
1476
1476
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1477
1477
|
const n = Object.keys(e);
|
|
@@ -1489,7 +1489,7 @@ function hi(e, t, r) {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
var Rt = {
|
|
1492
|
-
assertOptions:
|
|
1492
|
+
assertOptions: pi,
|
|
1493
1493
|
validators: Ht
|
|
1494
1494
|
};
|
|
1495
1495
|
const z = Rt.validators;
|
|
@@ -1666,13 +1666,13 @@ class Lt {
|
|
|
1666
1666
|
};
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
var
|
|
1670
|
-
function
|
|
1669
|
+
var mi = Lt;
|
|
1670
|
+
function Ei(e) {
|
|
1671
1671
|
return function(r) {
|
|
1672
1672
|
return e.apply(null, r);
|
|
1673
1673
|
};
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function yi(e) {
|
|
1676
1676
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
1677
1677
|
}
|
|
1678
1678
|
const vt = {
|
|
@@ -1743,7 +1743,7 @@ const vt = {
|
|
|
1743
1743
|
Object.entries(vt).forEach(([e, t]) => {
|
|
1744
1744
|
vt[t] = e;
|
|
1745
1745
|
});
|
|
1746
|
-
var
|
|
1746
|
+
var bi = vt;
|
|
1747
1747
|
function zr(e) {
|
|
1748
1748
|
const t = new Pe(e), r = Tr(Pe.prototype.request, t);
|
|
1749
1749
|
return u.extend(r, Pe.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
@@ -1753,7 +1753,7 @@ function zr(e) {
|
|
|
1753
1753
|
const A = zr(Ut);
|
|
1754
1754
|
A.Axios = Pe;
|
|
1755
1755
|
A.CanceledError = pe;
|
|
1756
|
-
A.CancelToken =
|
|
1756
|
+
A.CancelToken = mi;
|
|
1757
1757
|
A.isCancel = $r;
|
|
1758
1758
|
A.VERSION = Fr;
|
|
1759
1759
|
A.toFormData = Me;
|
|
@@ -1762,13 +1762,13 @@ A.Cancel = A.CanceledError;
|
|
|
1762
1762
|
A.all = function(t) {
|
|
1763
1763
|
return Promise.all(t);
|
|
1764
1764
|
};
|
|
1765
|
-
A.spread =
|
|
1766
|
-
A.isAxiosError =
|
|
1765
|
+
A.spread = Ei;
|
|
1766
|
+
A.isAxiosError = yi;
|
|
1767
1767
|
A.mergeConfig = se;
|
|
1768
1768
|
A.AxiosHeaders = F;
|
|
1769
1769
|
A.formToJSON = (e) => Ir(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1770
1770
|
A.getAdapter = qr.getAdapter;
|
|
1771
|
-
A.HttpStatusCode =
|
|
1771
|
+
A.HttpStatusCode = bi;
|
|
1772
1772
|
A.default = A;
|
|
1773
1773
|
var Wr = A, Mt = { exports: {} };
|
|
1774
1774
|
const kr = (e) => typeof e == "object" && e !== null, Gr = Symbol("skip"), ar = (e) => kr(e) && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), Ot = (e, t, r, n = /* @__PURE__ */ new WeakMap()) => {
|
|
@@ -1800,7 +1800,7 @@ Mt.exports = (e, t, r) => {
|
|
|
1800
1800
|
};
|
|
1801
1801
|
Mt.exports.mapObjectSkip = Gr;
|
|
1802
1802
|
var Vr = Mt.exports, It = { exports: {} };
|
|
1803
|
-
const
|
|
1803
|
+
const _i = (e) => {
|
|
1804
1804
|
let t = !1, r = !1, n = !1;
|
|
1805
1805
|
for (let s = 0; s < e.length; s++) {
|
|
1806
1806
|
const i = e[s];
|
|
@@ -1814,12 +1814,12 @@ const bi = (e) => {
|
|
|
1814
1814
|
pascalCase: !1
|
|
1815
1815
|
}, t);
|
|
1816
1816
|
const r = (s) => t.pascalCase ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
1817
|
-
return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e =
|
|
1817
|
+
return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e = _i(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (s, i) => i.toUpperCase()).replace(/\d+(\w|$)/g, (s) => s.toUpperCase()), r(e));
|
|
1818
1818
|
};
|
|
1819
1819
|
It.exports = Jr;
|
|
1820
1820
|
It.exports.default = Jr;
|
|
1821
|
-
var
|
|
1822
|
-
class
|
|
1821
|
+
var wi = It.exports;
|
|
1822
|
+
class gi {
|
|
1823
1823
|
constructor(t = {}) {
|
|
1824
1824
|
if (!(t.maxSize && t.maxSize > 0))
|
|
1825
1825
|
throw new TypeError("`maxSize` must be a number greater than 0");
|
|
@@ -1878,8 +1878,8 @@ class wi {
|
|
|
1878
1878
|
return this._size + t;
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
|
-
var
|
|
1882
|
-
const or = Vr,
|
|
1881
|
+
var Si = gi;
|
|
1882
|
+
const or = Vr, Ai = wi, Ti = Si, Ri = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), lt = new Ti({ maxSize: 1e5 }), cr = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), ur = (e, t) => {
|
|
1883
1883
|
if (!cr(e))
|
|
1884
1884
|
return e;
|
|
1885
1885
|
t = {
|
|
@@ -1892,12 +1892,12 @@ const or = Vr, Si = _i, Ai = gi, Ti = (e, t) => e.some((r) => typeof r == "strin
|
|
|
1892
1892
|
const h = l === void 0 ? d : `${l}.${d}`;
|
|
1893
1893
|
a.has(h) || (c = or(c, o(h)));
|
|
1894
1894
|
}
|
|
1895
|
-
if (!(r &&
|
|
1895
|
+
if (!(r && Ri(r, d))) {
|
|
1896
1896
|
const h = n ? `${d}_` : d;
|
|
1897
1897
|
if (lt.has(h))
|
|
1898
1898
|
d = lt.get(h);
|
|
1899
1899
|
else {
|
|
1900
|
-
const E =
|
|
1900
|
+
const E = Ai(d, { pascalCase: n });
|
|
1901
1901
|
d.length < 100 && lt.set(h, E), d = E;
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
@@ -1905,7 +1905,7 @@ const or = Vr, Si = _i, Ai = gi, Ti = (e, t) => e.some((r) => typeof r == "strin
|
|
|
1905
1905
|
};
|
|
1906
1906
|
return or(e, o(void 0));
|
|
1907
1907
|
};
|
|
1908
|
-
var
|
|
1908
|
+
var vi = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => ur(e[r], t)) : ur(e, t), dt, lr;
|
|
1909
1909
|
function Yr() {
|
|
1910
1910
|
return lr || (lr = 1, dt = Yr()), dt;
|
|
1911
1911
|
}
|
|
@@ -1919,13 +1919,13 @@ var xe = function() {
|
|
|
1919
1919
|
return t;
|
|
1920
1920
|
}, xe.apply(this, arguments);
|
|
1921
1921
|
};
|
|
1922
|
-
function
|
|
1922
|
+
function Oi(e) {
|
|
1923
1923
|
return e.toLowerCase();
|
|
1924
1924
|
}
|
|
1925
|
-
var
|
|
1926
|
-
function
|
|
1925
|
+
var Ci = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], Pi = /[^A-Z0-9]+/gi;
|
|
1926
|
+
function Bi(e, t) {
|
|
1927
1927
|
t === void 0 && (t = {});
|
|
1928
|
-
for (var r = t.splitRegexp, n = r === void 0 ?
|
|
1928
|
+
for (var r = t.splitRegexp, n = r === void 0 ? Ci : r, s = t.stripRegexp, i = s === void 0 ? Pi : s, a = t.transform, o = a === void 0 ? Oi : a, l = t.delimiter, d = l === void 0 ? " " : l, c = dr(dr(e, n, "$1\0$2"), i, "\0"), h = 0, E = c.length; c.charAt(h) === "\0"; )
|
|
1929
1929
|
h++;
|
|
1930
1930
|
for (; c.charAt(E - 1) === "\0"; )
|
|
1931
1931
|
E--;
|
|
@@ -1936,52 +1936,52 @@ function dr(e, t, r) {
|
|
|
1936
1936
|
return n.replace(s, r);
|
|
1937
1937
|
}, e);
|
|
1938
1938
|
}
|
|
1939
|
-
function Bi(e, t) {
|
|
1940
|
-
return t === void 0 && (t = {}), Pi(e, xe({ delimiter: "." }, t));
|
|
1941
|
-
}
|
|
1942
1939
|
function xi(e, t) {
|
|
1943
|
-
return t === void 0 && (t = {}), Bi(e, xe({ delimiter: "
|
|
1940
|
+
return t === void 0 && (t = {}), Bi(e, xe({ delimiter: "." }, t));
|
|
1941
|
+
}
|
|
1942
|
+
function ji(e, t) {
|
|
1943
|
+
return t === void 0 && (t = {}), xi(e, xe({ delimiter: "_" }, t));
|
|
1944
1944
|
}
|
|
1945
|
-
const
|
|
1945
|
+
const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1946
1946
|
__proto__: null,
|
|
1947
|
-
snakeCase:
|
|
1948
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1949
|
-
var
|
|
1950
|
-
function
|
|
1951
|
-
return
|
|
1952
|
-
}
|
|
1953
|
-
var
|
|
1954
|
-
function
|
|
1955
|
-
return e.replace(
|
|
1947
|
+
snakeCase: ji
|
|
1948
|
+
}, Symbol.toStringTag, { value: "Module" })), Di = /* @__PURE__ */ Mn(Ni);
|
|
1949
|
+
var Ui = Ii, Hi = /\s/, Li = /(_|-|\.|:)/, Mi = /([a-z][A-Z]|[A-Z][a-z])/;
|
|
1950
|
+
function Ii(e) {
|
|
1951
|
+
return Hi.test(e) ? e.toLowerCase() : Li.test(e) ? (Ki(e) || e).toLowerCase() : Mi.test(e) ? Fi(e).toLowerCase() : e.toLowerCase();
|
|
1952
|
+
}
|
|
1953
|
+
var $i = /[\W_]+(.|$)/g;
|
|
1954
|
+
function Ki(e) {
|
|
1955
|
+
return e.replace($i, function(t, r) {
|
|
1956
1956
|
return r ? " " + r : "";
|
|
1957
1957
|
});
|
|
1958
1958
|
}
|
|
1959
|
-
var
|
|
1960
|
-
function
|
|
1961
|
-
return e.replace(
|
|
1959
|
+
var qi = /(.)([A-Z]+)/g;
|
|
1960
|
+
function Fi(e) {
|
|
1961
|
+
return e.replace(qi, function(t, r, n) {
|
|
1962
1962
|
return r + " " + n.toLowerCase().split("").join(" ");
|
|
1963
1963
|
});
|
|
1964
1964
|
}
|
|
1965
|
-
var
|
|
1966
|
-
function
|
|
1967
|
-
return
|
|
1965
|
+
var zi = Ui, Wi = ki;
|
|
1966
|
+
function ki(e) {
|
|
1967
|
+
return zi(e).replace(/[\W_]+(.|$)/g, function(t, r) {
|
|
1968
1968
|
return r ? " " + r : "";
|
|
1969
1969
|
}).trim();
|
|
1970
1970
|
}
|
|
1971
|
-
var
|
|
1972
|
-
function
|
|
1973
|
-
return
|
|
1971
|
+
var Gi = Wi, Vi = Ji;
|
|
1972
|
+
function Ji(e) {
|
|
1973
|
+
return Gi(e).replace(/\s/g, "_");
|
|
1974
1974
|
}
|
|
1975
|
-
const
|
|
1976
|
-
var
|
|
1977
|
-
return t = Object.assign({ deep: !0, exclude: [] }, t),
|
|
1975
|
+
const Yi = Vr, Xi = Vi;
|
|
1976
|
+
var Zi = function(e, t) {
|
|
1977
|
+
return t = Object.assign({ deep: !0, exclude: [] }, t), Yi(e, function(r, n) {
|
|
1978
1978
|
return [
|
|
1979
|
-
|
|
1979
|
+
Qi(t.exclude, r) ? r : Xi(r),
|
|
1980
1980
|
n
|
|
1981
1981
|
];
|
|
1982
1982
|
}, t);
|
|
1983
1983
|
};
|
|
1984
|
-
function
|
|
1984
|
+
function Qi(e, t) {
|
|
1985
1985
|
return e.some(function(r) {
|
|
1986
1986
|
return typeof r == "string" ? r === t : r.test(t);
|
|
1987
1987
|
});
|
|
@@ -1991,7 +1991,7 @@ Object.defineProperty(me, "__esModule", {
|
|
|
1991
1991
|
value: !0
|
|
1992
1992
|
});
|
|
1993
1993
|
me.BasisTheoryApiError = void 0;
|
|
1994
|
-
function
|
|
1994
|
+
function ea(e) {
|
|
1995
1995
|
function t() {
|
|
1996
1996
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
1997
1997
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2005,7 +2005,7 @@ function Qi(e) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2007
2007
|
}
|
|
2008
|
-
class $t extends
|
|
2008
|
+
class $t extends ea(Error) {
|
|
2009
2009
|
constructor(t, r, n) {
|
|
2010
2010
|
super(t), this.status = r, this.data = n, this.name = "BasisTheoryApiError", Object.setPrototypeOf(this, $t.prototype);
|
|
2011
2011
|
}
|
|
@@ -2015,26 +2015,26 @@ Object.defineProperty(m, "__esModule", {
|
|
|
2015
2015
|
value: !0
|
|
2016
2016
|
});
|
|
2017
2017
|
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;
|
|
2018
|
-
var Xr = $e(Wr), L = $e(
|
|
2018
|
+
var Xr = $e(Wr), L = $e(vi), fr = $e(Yr()), ta = Di, Ee = $e(Zi), ra = me, J = b;
|
|
2019
2019
|
function $e(e) {
|
|
2020
2020
|
return e && e.__esModule ? e : { default: e };
|
|
2021
2021
|
}
|
|
2022
|
-
const
|
|
2022
|
+
const na = (e) => {
|
|
2023
2023
|
if (e == null)
|
|
2024
2024
|
throw new Error("BasisTheory has not yet been properly initialized.");
|
|
2025
2025
|
return e;
|
|
2026
2026
|
};
|
|
2027
|
-
m.assertInit =
|
|
2028
|
-
const
|
|
2027
|
+
m.assertInit = na;
|
|
2028
|
+
const sa = (e) => {
|
|
2029
2029
|
if (!(typeof e > "u"))
|
|
2030
2030
|
return (0, Ee.default)(e, {
|
|
2031
2031
|
deep: !0
|
|
2032
2032
|
});
|
|
2033
2033
|
};
|
|
2034
|
-
m.transformRequestSnakeCase =
|
|
2035
|
-
const
|
|
2036
|
-
m.proxyRaw =
|
|
2037
|
-
const
|
|
2034
|
+
m.transformRequestSnakeCase = sa;
|
|
2035
|
+
const ia = (e) => e;
|
|
2036
|
+
m.proxyRaw = ia;
|
|
2037
|
+
const aa = (e) => {
|
|
2038
2038
|
if (!(typeof e > "u"))
|
|
2039
2039
|
return {
|
|
2040
2040
|
...(0, Ee.default)(e, {
|
|
@@ -2045,8 +2045,8 @@ const ia = (e) => {
|
|
|
2045
2045
|
} : {}
|
|
2046
2046
|
};
|
|
2047
2047
|
};
|
|
2048
|
-
m.transformReactorRequestSnakeCase =
|
|
2049
|
-
const
|
|
2048
|
+
m.transformReactorRequestSnakeCase = aa;
|
|
2049
|
+
const oa = (e) => {
|
|
2050
2050
|
if (!(typeof e > "u"))
|
|
2051
2051
|
return {
|
|
2052
2052
|
...(0, Ee.default)(e, {
|
|
@@ -2057,8 +2057,8 @@ const aa = (e) => {
|
|
|
2057
2057
|
} : {}
|
|
2058
2058
|
};
|
|
2059
2059
|
};
|
|
2060
|
-
m.transformProxyRequestSnakeCase =
|
|
2061
|
-
const
|
|
2060
|
+
m.transformProxyRequestSnakeCase = oa;
|
|
2061
|
+
const ca = (e) => {
|
|
2062
2062
|
if (!(typeof e > "u"))
|
|
2063
2063
|
return {
|
|
2064
2064
|
...(0, Ee.default)(e, {
|
|
@@ -2072,8 +2072,8 @@ const oa = (e) => {
|
|
|
2072
2072
|
} : {}
|
|
2073
2073
|
};
|
|
2074
2074
|
};
|
|
2075
|
-
m.transformTokenRequestSnakeCase =
|
|
2076
|
-
const Kt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0,
|
|
2075
|
+
m.transformTokenRequestSnakeCase = ca;
|
|
2076
|
+
const Kt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, ua = (e) => {
|
|
2077
2077
|
if (!(typeof e > "u"))
|
|
2078
2078
|
return Kt(e) ? {
|
|
2079
2079
|
data: e.data.map((n) => ({
|
|
@@ -2102,8 +2102,8 @@ const Kt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == n
|
|
|
2102
2102
|
} : {}
|
|
2103
2103
|
};
|
|
2104
2104
|
};
|
|
2105
|
-
m.transformTokenResponseCamelCase =
|
|
2106
|
-
const
|
|
2105
|
+
m.transformTokenResponseCamelCase = ua;
|
|
2106
|
+
const la = (e) => {
|
|
2107
2107
|
if (!(typeof e > "u"))
|
|
2108
2108
|
return Kt(e) ? {
|
|
2109
2109
|
data: e.data.map((n) => ({
|
|
@@ -2126,8 +2126,8 @@ const ua = (e) => {
|
|
|
2126
2126
|
} : {}
|
|
2127
2127
|
};
|
|
2128
2128
|
};
|
|
2129
|
-
m.transformReactorResponseCamelCase =
|
|
2130
|
-
const
|
|
2129
|
+
m.transformReactorResponseCamelCase = la;
|
|
2130
|
+
const da = (e) => {
|
|
2131
2131
|
if (!(typeof e > "u"))
|
|
2132
2132
|
return Kt(e) ? {
|
|
2133
2133
|
data: e.data.map((n) => ({
|
|
@@ -2150,26 +2150,26 @@ const la = (e) => {
|
|
|
2150
2150
|
} : {}
|
|
2151
2151
|
};
|
|
2152
2152
|
};
|
|
2153
|
-
m.transformProxyResponseCamelCase =
|
|
2154
|
-
const
|
|
2153
|
+
m.transformProxyResponseCamelCase = da;
|
|
2154
|
+
const fa = (e) => {
|
|
2155
2155
|
if (!(typeof e > "u"))
|
|
2156
2156
|
return (0, L.default)(e, {
|
|
2157
2157
|
deep: !0
|
|
2158
2158
|
});
|
|
2159
2159
|
};
|
|
2160
|
-
m.transformResponseCamelCase =
|
|
2161
|
-
const
|
|
2162
|
-
m.dataExtractor =
|
|
2163
|
-
const
|
|
2160
|
+
m.transformResponseCamelCase = fa;
|
|
2161
|
+
const ha = (e) => e == null ? void 0 : e.data;
|
|
2162
|
+
m.dataExtractor = ha;
|
|
2163
|
+
const pa = (e) => ({
|
|
2164
2164
|
data: e == null ? void 0 : e.data,
|
|
2165
2165
|
headers: e == null ? void 0 : e.headers
|
|
2166
2166
|
});
|
|
2167
|
-
m.dataAndHeadersExtractor =
|
|
2167
|
+
m.dataAndHeadersExtractor = pa;
|
|
2168
2168
|
const Ct = (e) => [e, ...Xr.default.defaults.transformRequest];
|
|
2169
2169
|
m.concatRequestTransformerWithDefault = Ct;
|
|
2170
2170
|
const Pt = (e) => [...Xr.default.defaults.transformResponse, e];
|
|
2171
2171
|
m.concatResponseTransformerWithDefault = Pt;
|
|
2172
|
-
const
|
|
2172
|
+
const ma = (e, t) => {
|
|
2173
2173
|
if (!e)
|
|
2174
2174
|
return t ? {
|
|
2175
2175
|
...t.transformRequest !== void 0 ? {
|
|
@@ -2216,18 +2216,18 @@ const pa = (e, t) => {
|
|
|
2216
2216
|
} : {}
|
|
2217
2217
|
};
|
|
2218
2218
|
};
|
|
2219
|
-
m.createRequestConfig =
|
|
2220
|
-
const
|
|
2219
|
+
m.createRequestConfig = ma;
|
|
2220
|
+
const Ea = (e) => {
|
|
2221
2221
|
var t, r;
|
|
2222
2222
|
const n = ((t = e.response) === null || t === void 0 ? void 0 : t.status) || -1, s = (r = e.response) === null || r === void 0 ? void 0 : r.data;
|
|
2223
|
-
throw new
|
|
2223
|
+
throw new ra.BasisTheoryApiError(e.message, n, s);
|
|
2224
2224
|
};
|
|
2225
|
-
m.errorInterceptor =
|
|
2226
|
-
const
|
|
2225
|
+
m.errorInterceptor = Ea;
|
|
2226
|
+
const ya = (e = {}) => {
|
|
2227
2227
|
const t = Object.keys(e);
|
|
2228
2228
|
if (t.length) {
|
|
2229
2229
|
const r = new URLSearchParams(), n = (s, i, a = !1) => {
|
|
2230
|
-
const o = typeof i, l = a ? s : (0,
|
|
2230
|
+
const o = typeof i, l = a ? s : (0, ta.snakeCase)(s);
|
|
2231
2231
|
(i === null || ["boolean", "number", "string"].includes(o)) && r.append(l, i);
|
|
2232
2232
|
};
|
|
2233
2233
|
return t.forEach((s) => {
|
|
@@ -2241,12 +2241,12 @@ const Ea = (e = {}) => {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
return "";
|
|
2243
2243
|
};
|
|
2244
|
-
m.getQueryParams =
|
|
2245
|
-
const
|
|
2244
|
+
m.getQueryParams = ya;
|
|
2245
|
+
const ba = (e) => `(${e.name || ""}; ${e.version || ""}; ${e.url || ""})`, _a = (e) => {
|
|
2246
2246
|
let t = `${J.USER_AGENT_CLIENT}/unknown`;
|
|
2247
|
-
return e && Object.keys(e || {}).length && (t += ` ${
|
|
2247
|
+
return e && Object.keys(e || {}).length && (t += ` ${ba(e)}`), t;
|
|
2248
2248
|
};
|
|
2249
|
-
m.buildUserAgentString =
|
|
2249
|
+
m.buildUserAgentString = _a;
|
|
2250
2250
|
const Zr = () => {
|
|
2251
2251
|
const {
|
|
2252
2252
|
userAgent: e
|
|
@@ -2281,7 +2281,7 @@ const Qr = () => typeof window == "object" && window.navigator.product === "Reac
|
|
|
2281
2281
|
m.getOSVersion = en;
|
|
2282
2282
|
const tn = () => Qr() ? "ReactNative" : typeof window > "u" ? `NodeJS/${process.version}` : Zr();
|
|
2283
2283
|
m.getRuntime = tn;
|
|
2284
|
-
const
|
|
2284
|
+
const wa = (e) => {
|
|
2285
2285
|
const t = {
|
|
2286
2286
|
client: J.USER_AGENT_CLIENT,
|
|
2287
2287
|
clientVersion: "unknown",
|
|
@@ -2291,13 +2291,13 @@ const _a = (e) => {
|
|
|
2291
2291
|
};
|
|
2292
2292
|
return e && (t.application = e), JSON.stringify((0, Ee.default)(t));
|
|
2293
2293
|
};
|
|
2294
|
-
m.buildClientUserAgentString =
|
|
2294
|
+
m.buildClientUserAgentString = wa;
|
|
2295
2295
|
var Ke = {};
|
|
2296
2296
|
Object.defineProperty(Ke, "__esModule", {
|
|
2297
2297
|
value: !0
|
|
2298
2298
|
});
|
|
2299
2299
|
Ke.BasisTheoryValidationError = void 0;
|
|
2300
|
-
function
|
|
2300
|
+
function ga(e) {
|
|
2301
2301
|
function t() {
|
|
2302
2302
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2303
2303
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2311,7 +2311,7 @@ function wa(e) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2313
2313
|
}
|
|
2314
|
-
class qt extends
|
|
2314
|
+
class qt extends ga(Error) {
|
|
2315
2315
|
constructor(t, r, n) {
|
|
2316
2316
|
super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this, qt.prototype);
|
|
2317
2317
|
}
|
|
@@ -2322,7 +2322,7 @@ Object.defineProperty(qe, "__esModule", {
|
|
|
2322
2322
|
value: !0
|
|
2323
2323
|
});
|
|
2324
2324
|
qe.HttpClientError = void 0;
|
|
2325
|
-
function
|
|
2325
|
+
function Sa(e) {
|
|
2326
2326
|
function t() {
|
|
2327
2327
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2328
2328
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2336,7 +2336,7 @@ function ga(e) {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2338
2338
|
}
|
|
2339
|
-
class Ft extends
|
|
2339
|
+
class Ft extends Sa(Error) {
|
|
2340
2340
|
constructor(t, r, n, s) {
|
|
2341
2341
|
super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this, Ft.prototype);
|
|
2342
2342
|
}
|
|
@@ -2387,16 +2387,16 @@ qe.HttpClientError = Ft;
|
|
|
2387
2387
|
});
|
|
2388
2388
|
var s = me, i = Ke, a = qe;
|
|
2389
2389
|
})(C);
|
|
2390
|
-
var P = {},
|
|
2390
|
+
var P = {}, Aa = {}, Fe = {};
|
|
2391
2391
|
Object.defineProperty(Fe, "__esModule", {
|
|
2392
2392
|
value: !0
|
|
2393
2393
|
});
|
|
2394
2394
|
Fe.BasisTheoryService = void 0;
|
|
2395
|
-
var we =
|
|
2396
|
-
function
|
|
2395
|
+
var we = Ta(Wr), W = C;
|
|
2396
|
+
function Ta(e) {
|
|
2397
2397
|
return e && e.__esModule ? e : { default: e };
|
|
2398
2398
|
}
|
|
2399
|
-
class
|
|
2399
|
+
class Ra {
|
|
2400
2400
|
constructor(t) {
|
|
2401
2401
|
const {
|
|
2402
2402
|
apiKey: r,
|
|
@@ -2423,12 +2423,12 @@ class Ta {
|
|
|
2423
2423
|
}), this.client.interceptors.response.use(void 0, W.errorInterceptor);
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
2426
|
-
Fe.BasisTheoryService =
|
|
2426
|
+
Fe.BasisTheoryService = Ra;
|
|
2427
2427
|
(function(e) {
|
|
2428
2428
|
Object.defineProperty(e, "__esModule", {
|
|
2429
2429
|
value: !0
|
|
2430
2430
|
});
|
|
2431
|
-
var t =
|
|
2431
|
+
var t = Aa;
|
|
2432
2432
|
Object.keys(t).forEach(function(n) {
|
|
2433
2433
|
n === "default" || n === "__esModule" || n in e && e[n] === t[n] || Object.defineProperty(e, n, {
|
|
2434
2434
|
enumerable: !0,
|
|
@@ -2451,8 +2451,8 @@ Object.defineProperty(De, "__esModule", {
|
|
|
2451
2451
|
value: !0
|
|
2452
2452
|
});
|
|
2453
2453
|
De.BasisTheoryTransactions = void 0;
|
|
2454
|
-
var ft = C, ce = m,
|
|
2455
|
-
class
|
|
2454
|
+
var ft = C, ce = m, va = P;
|
|
2455
|
+
class Oa extends va.BasisTheoryService {
|
|
2456
2456
|
constructor(t) {
|
|
2457
2457
|
const r = {
|
|
2458
2458
|
...t
|
|
@@ -2471,7 +2471,7 @@ class va extends Ra.BasisTheoryService {
|
|
|
2471
2471
|
return this.client.post(n, void 0, (0, ft.createRequestConfig)(r)).then(ce.dataExtractor);
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
|
-
De.BasisTheoryTransactions =
|
|
2474
|
+
De.BasisTheoryTransactions = Oa;
|
|
2475
2475
|
(function(e) {
|
|
2476
2476
|
Object.defineProperty(e, "__esModule", {
|
|
2477
2477
|
value: !0
|
|
@@ -2492,19 +2492,19 @@ Object.defineProperty(K, "__esModule", {
|
|
|
2492
2492
|
});
|
|
2493
2493
|
K.CrudBuilder = void 0;
|
|
2494
2494
|
var v = C;
|
|
2495
|
-
const
|
|
2495
|
+
const Ca = (e) => class extends e {
|
|
2496
2496
|
create(r, n) {
|
|
2497
2497
|
return this.client.post("/", r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
|
|
2498
2498
|
}
|
|
2499
|
-
},
|
|
2499
|
+
}, Pa = (e) => class extends e {
|
|
2500
2500
|
retrieve(r, n) {
|
|
2501
2501
|
return this.client.get(r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
|
|
2502
2502
|
}
|
|
2503
|
-
},
|
|
2503
|
+
}, Ba = (e) => class extends e {
|
|
2504
2504
|
update(r, n, s) {
|
|
2505
2505
|
return this.client.put(r, n, (0, v.createRequestConfig)(s)).then(v.dataExtractor);
|
|
2506
2506
|
}
|
|
2507
|
-
},
|
|
2507
|
+
}, xa = (e) => class extends e {
|
|
2508
2508
|
patch(r, n, s) {
|
|
2509
2509
|
const i = (0, v.createRequestConfig)(s);
|
|
2510
2510
|
return this.client.patch(r, n, {
|
|
@@ -2515,49 +2515,49 @@ const Oa = (e) => class extends e {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
}).then(v.dataExtractor);
|
|
2517
2517
|
}
|
|
2518
|
-
},
|
|
2518
|
+
}, ja = (e) => class extends e {
|
|
2519
2519
|
async delete(r, n) {
|
|
2520
2520
|
await this.client.delete(r, (0, v.createRequestConfig)(n));
|
|
2521
2521
|
}
|
|
2522
|
-
},
|
|
2522
|
+
}, Na = (e) => class extends e {
|
|
2523
2523
|
list(r = {}, n = {}) {
|
|
2524
2524
|
const s = `/${(0, v.getQueryParams)(r)}`;
|
|
2525
2525
|
return this.client.get(s, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
|
|
2526
2526
|
}
|
|
2527
2527
|
};
|
|
2528
|
-
class
|
|
2528
|
+
class Da {
|
|
2529
2529
|
constructor(t) {
|
|
2530
2530
|
this.BaseService = t;
|
|
2531
2531
|
}
|
|
2532
2532
|
create() {
|
|
2533
|
-
return this.BaseService =
|
|
2533
|
+
return this.BaseService = Ca(this.BaseService), this;
|
|
2534
2534
|
}
|
|
2535
2535
|
retrieve() {
|
|
2536
|
-
return this.BaseService =
|
|
2536
|
+
return this.BaseService = Pa(this.BaseService), this;
|
|
2537
2537
|
}
|
|
2538
2538
|
update() {
|
|
2539
|
-
return this.BaseService =
|
|
2539
|
+
return this.BaseService = Ba(this.BaseService), this;
|
|
2540
2540
|
}
|
|
2541
2541
|
patch() {
|
|
2542
|
-
return this.BaseService =
|
|
2542
|
+
return this.BaseService = xa(this.BaseService), this;
|
|
2543
2543
|
}
|
|
2544
2544
|
delete() {
|
|
2545
|
-
return this.BaseService =
|
|
2545
|
+
return this.BaseService = ja(this.BaseService), this;
|
|
2546
2546
|
}
|
|
2547
2547
|
list() {
|
|
2548
|
-
return this.BaseService =
|
|
2548
|
+
return this.BaseService = Na(this.BaseService), this;
|
|
2549
2549
|
}
|
|
2550
2550
|
build() {
|
|
2551
2551
|
return this.BaseService;
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
|
-
K.CrudBuilder =
|
|
2554
|
+
K.CrudBuilder = Da;
|
|
2555
2555
|
Object.defineProperty(ze, "__esModule", {
|
|
2556
2556
|
value: !0
|
|
2557
2557
|
});
|
|
2558
2558
|
ze.BasisTheoryApplications = void 0;
|
|
2559
|
-
var ge = C,
|
|
2560
|
-
const
|
|
2559
|
+
var ge = C, Ua = P, Ha = K;
|
|
2560
|
+
const La = new Ha.CrudBuilder(class extends Ua.BasisTheoryService {
|
|
2561
2561
|
/**
|
|
2562
2562
|
* @deprecated use {@link retrieveByKey} instead
|
|
2563
2563
|
*/
|
|
@@ -2571,7 +2571,7 @@ const Ha = new Ua.CrudBuilder(class extends Da.BasisTheoryService {
|
|
|
2571
2571
|
return this.client.post(`${t}/regenerate`, void 0, (0, ge.createRequestConfig)(r)).then(ge.dataExtractor);
|
|
2572
2572
|
}
|
|
2573
2573
|
}).create().retrieve().update().delete().list().build();
|
|
2574
|
-
ze.BasisTheoryApplications =
|
|
2574
|
+
ze.BasisTheoryApplications = La;
|
|
2575
2575
|
(function(e) {
|
|
2576
2576
|
Object.defineProperty(e, "__esModule", {
|
|
2577
2577
|
value: !0
|
|
@@ -2588,8 +2588,8 @@ Object.defineProperty(ke, "__esModule", {
|
|
|
2588
2588
|
value: !0
|
|
2589
2589
|
});
|
|
2590
2590
|
ke.BasisTheoryTokenize = void 0;
|
|
2591
|
-
var Se = C,
|
|
2592
|
-
class
|
|
2591
|
+
var Se = C, Ma = P;
|
|
2592
|
+
class Ia extends Ma.BasisTheoryService {
|
|
2593
2593
|
tokenize(t, r = {}) {
|
|
2594
2594
|
return this.client.post("/", t, (0, Se.createRequestConfig)(r, {
|
|
2595
2595
|
transformRequest: Se.proxyRaw,
|
|
@@ -2597,7 +2597,7 @@ class Ma extends La.BasisTheoryService {
|
|
|
2597
2597
|
})).then(Se.dataExtractor);
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
2600
|
-
ke.BasisTheoryTokenize =
|
|
2600
|
+
ke.BasisTheoryTokenize = Ia;
|
|
2601
2601
|
(function(e) {
|
|
2602
2602
|
Object.defineProperty(e, "__esModule", {
|
|
2603
2603
|
value: !0
|
|
@@ -2613,20 +2613,20 @@ Object.defineProperty(We, "__esModule", {
|
|
|
2613
2613
|
value: !0
|
|
2614
2614
|
});
|
|
2615
2615
|
We.delegateTokenize = void 0;
|
|
2616
|
-
var
|
|
2617
|
-
const
|
|
2616
|
+
var $a = sn;
|
|
2617
|
+
const Ka = (e) => class extends $a.BasisTheoryTokenize {
|
|
2618
2618
|
tokenize(r, n) {
|
|
2619
2619
|
return e != null && e.hasElement(r) ? e.tokenize(r, n) : super.tokenize(r, n);
|
|
2620
2620
|
}
|
|
2621
2621
|
};
|
|
2622
|
-
We.delegateTokenize =
|
|
2622
|
+
We.delegateTokenize = Ka;
|
|
2623
2623
|
var Ge = {}, Wt = {}, Ve = {};
|
|
2624
2624
|
Object.defineProperty(Ve, "__esModule", {
|
|
2625
2625
|
value: !0
|
|
2626
2626
|
});
|
|
2627
2627
|
Ve.BasisTheoryTokens = void 0;
|
|
2628
|
-
var U = C, V = m,
|
|
2629
|
-
const
|
|
2628
|
+
var U = C, V = m, qa = P, Fa = K;
|
|
2629
|
+
const za = new Fa.CrudBuilder(class extends qa.BasisTheoryService {
|
|
2630
2630
|
constructor(t) {
|
|
2631
2631
|
const r = t;
|
|
2632
2632
|
r.transformRequest = [].concat(V.transformTokenRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(V.transformTokenResponseCamelCase, t.transformResponse || []), super(r);
|
|
@@ -2665,7 +2665,7 @@ const Fa = new qa.CrudBuilder(class extends Ka.BasisTheoryService {
|
|
|
2665
2665
|
return this.client.post("/search", t, (0, U.createRequestConfig)(r)).then(V.dataExtractor);
|
|
2666
2666
|
}
|
|
2667
2667
|
}).create().delete().list().build();
|
|
2668
|
-
Ve.BasisTheoryTokens =
|
|
2668
|
+
Ve.BasisTheoryTokens = za;
|
|
2669
2669
|
(function(e) {
|
|
2670
2670
|
Object.defineProperty(e, "__esModule", {
|
|
2671
2671
|
value: !0
|
|
@@ -2681,8 +2681,8 @@ Object.defineProperty(Ge, "__esModule", {
|
|
|
2681
2681
|
value: !0
|
|
2682
2682
|
});
|
|
2683
2683
|
Ge.delegateTokens = void 0;
|
|
2684
|
-
var
|
|
2685
|
-
const
|
|
2684
|
+
var Wa = Wt;
|
|
2685
|
+
const ka = (e) => class extends Wa.BasisTheoryTokens {
|
|
2686
2686
|
create(r, n) {
|
|
2687
2687
|
return e != null && e.hasElement(r) ? e.tokens.create(r, n) : super.create(r, n);
|
|
2688
2688
|
}
|
|
@@ -2693,14 +2693,14 @@ const Wa = (e) => class extends za.BasisTheoryTokens {
|
|
|
2693
2693
|
return e !== void 0 ? e.tokens.retrieve(r, n) : super.retrieve(r, n);
|
|
2694
2694
|
}
|
|
2695
2695
|
};
|
|
2696
|
-
Ge.delegateTokens =
|
|
2696
|
+
Ge.delegateTokens = ka;
|
|
2697
2697
|
var Je = {}, an = {}, Ye = {};
|
|
2698
2698
|
Object.defineProperty(Ye, "__esModule", {
|
|
2699
2699
|
value: !0
|
|
2700
2700
|
});
|
|
2701
2701
|
Ye.BasisTheoryProxy = void 0;
|
|
2702
|
-
var q = C,
|
|
2703
|
-
class
|
|
2702
|
+
var q = C, Ga = P;
|
|
2703
|
+
class Va extends Ga.BasisTheoryService {
|
|
2704
2704
|
get(t) {
|
|
2705
2705
|
return this.proxyRequest("get", t);
|
|
2706
2706
|
}
|
|
@@ -2732,7 +2732,7 @@ class Ga extends ka.BasisTheoryService {
|
|
|
2732
2732
|
})).then(q.dataExtractor);
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
2735
|
-
Ye.BasisTheoryProxy =
|
|
2735
|
+
Ye.BasisTheoryProxy = Va;
|
|
2736
2736
|
(function(e) {
|
|
2737
2737
|
Object.defineProperty(e, "__esModule", {
|
|
2738
2738
|
value: !0
|
|
@@ -2751,8 +2751,8 @@ Object.defineProperty(Je, "__esModule", {
|
|
|
2751
2751
|
value: !0
|
|
2752
2752
|
});
|
|
2753
2753
|
Je.delegateProxy = void 0;
|
|
2754
|
-
var
|
|
2755
|
-
const
|
|
2754
|
+
var Ja = an;
|
|
2755
|
+
const Ya = (e) => class extends Ja.BasisTheoryProxy {
|
|
2756
2756
|
get(r) {
|
|
2757
2757
|
return e !== void 0 ? e.proxy.get(r) : super.get(r);
|
|
2758
2758
|
}
|
|
@@ -2769,7 +2769,7 @@ const Ja = (e) => class extends Va.BasisTheoryProxy {
|
|
|
2769
2769
|
return e !== void 0 ? e.proxy.delete(r) : super.delete(r);
|
|
2770
2770
|
}
|
|
2771
2771
|
};
|
|
2772
|
-
Je.delegateProxy =
|
|
2772
|
+
Je.delegateProxy = Ya;
|
|
2773
2773
|
(function(e) {
|
|
2774
2774
|
Object.defineProperty(e, "__esModule", {
|
|
2775
2775
|
value: !0
|
|
@@ -2807,9 +2807,9 @@ Object.defineProperty(X, "__esModule", {
|
|
|
2807
2807
|
value: !0
|
|
2808
2808
|
});
|
|
2809
2809
|
X.injectScript = X.findScript = void 0;
|
|
2810
|
-
const
|
|
2811
|
-
X.findScript =
|
|
2812
|
-
const
|
|
2810
|
+
const Xa = (e) => document.querySelector(`script[src^="${e}"]`);
|
|
2811
|
+
X.findScript = Xa;
|
|
2812
|
+
const Za = (e) => {
|
|
2813
2813
|
const t = document.createElement("script");
|
|
2814
2814
|
t.src = e;
|
|
2815
2815
|
const r = document.head || document.body;
|
|
@@ -2817,33 +2817,33 @@ const Xa = (e) => {
|
|
|
2817
2817
|
throw new Error("No <head> or <body> elements found in document.");
|
|
2818
2818
|
return r.append(t), t;
|
|
2819
2819
|
};
|
|
2820
|
-
X.injectScript =
|
|
2820
|
+
X.injectScript = Za;
|
|
2821
2821
|
var Xe = {}, R = {};
|
|
2822
2822
|
Object.defineProperty(R, "__esModule", {
|
|
2823
2823
|
value: !0
|
|
2824
2824
|
});
|
|
2825
2825
|
R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = R.ELEMENTS_INIT_ERROR_MESSAGE = R.CARD_ICON_POSITIONS = R.CARD_BRANDS = R.AUTOCOMPLETE_VALUES = void 0;
|
|
2826
|
-
const
|
|
2827
|
-
R.ELEMENTS_INIT_ERROR_MESSAGE =
|
|
2828
|
-
const
|
|
2829
|
-
R.ELEMENTS_NOM_DOM_ERROR_MESSAGE =
|
|
2830
|
-
const
|
|
2831
|
-
R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE =
|
|
2832
|
-
const
|
|
2833
|
-
R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE =
|
|
2834
|
-
const
|
|
2835
|
-
R.CARD_BRANDS =
|
|
2836
|
-
const
|
|
2837
|
-
R.CARD_ICON_POSITIONS =
|
|
2838
|
-
const
|
|
2839
|
-
R.AUTOCOMPLETE_VALUES =
|
|
2826
|
+
const Qa = "BasisTheory Elements was not properly initialized.";
|
|
2827
|
+
R.ELEMENTS_INIT_ERROR_MESSAGE = Qa;
|
|
2828
|
+
const eo = "Tried to load BasisTheoryElements in a non-DOM environment.";
|
|
2829
|
+
R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = eo;
|
|
2830
|
+
const to = "Basis Theory Elements did not load properly.";
|
|
2831
|
+
R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = to;
|
|
2832
|
+
const ro = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
|
|
2833
|
+
R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ro;
|
|
2834
|
+
const no = ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
|
|
2835
|
+
R.CARD_BRANDS = no;
|
|
2836
|
+
const so = ["left", "right", "none"];
|
|
2837
|
+
R.CARD_ICON_POSITIONS = so;
|
|
2838
|
+
const io = ["off", "on"];
|
|
2839
|
+
R.AUTOCOMPLETE_VALUES = io;
|
|
2840
2840
|
Object.defineProperty(Xe, "__esModule", {
|
|
2841
2841
|
value: !0
|
|
2842
2842
|
});
|
|
2843
2843
|
Xe.loadElements = void 0;
|
|
2844
2844
|
var ht = R, hr = X;
|
|
2845
2845
|
let pt;
|
|
2846
|
-
const
|
|
2846
|
+
const ao = (e) => (pt || (pt = new Promise((t, r) => {
|
|
2847
2847
|
if (typeof window != "object") {
|
|
2848
2848
|
r(new Error(ht.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
|
|
2849
2849
|
return;
|
|
@@ -2871,7 +2871,7 @@ const io = (e) => (pt || (pt = new Promise((t, r) => {
|
|
|
2871
2871
|
return;
|
|
2872
2872
|
}
|
|
2873
2873
|
})), pt);
|
|
2874
|
-
Xe.loadElements =
|
|
2874
|
+
Xe.loadElements = ao;
|
|
2875
2875
|
(function(e) {
|
|
2876
2876
|
Object.defineProperty(e, "__esModule", {
|
|
2877
2877
|
value: !0
|
|
@@ -2909,10 +2909,10 @@ Object.defineProperty(Ze, "__esModule", {
|
|
|
2909
2909
|
value: !0
|
|
2910
2910
|
});
|
|
2911
2911
|
Ze.BasisTheoryLogs = void 0;
|
|
2912
|
-
var
|
|
2913
|
-
const
|
|
2912
|
+
var oo = P, co = K;
|
|
2913
|
+
const uo = new co.CrudBuilder(class extends oo.BasisTheoryService {
|
|
2914
2914
|
}).list().build();
|
|
2915
|
-
Ze.BasisTheoryLogs =
|
|
2915
|
+
Ze.BasisTheoryLogs = uo;
|
|
2916
2916
|
(function(e) {
|
|
2917
2917
|
Object.defineProperty(e, "__esModule", {
|
|
2918
2918
|
value: !0
|
|
@@ -2929,13 +2929,13 @@ Object.defineProperty(Qe, "__esModule", {
|
|
|
2929
2929
|
value: !0
|
|
2930
2930
|
});
|
|
2931
2931
|
Qe.BasisTheoryPermissions = void 0;
|
|
2932
|
-
var pr = C,
|
|
2933
|
-
class
|
|
2932
|
+
var pr = C, lo = P;
|
|
2933
|
+
class fo extends lo.BasisTheoryService {
|
|
2934
2934
|
list(t) {
|
|
2935
2935
|
return this.client.get("/", (0, pr.createRequestConfig)(t)).then(pr.dataExtractor);
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
-
Qe.BasisTheoryPermissions =
|
|
2938
|
+
Qe.BasisTheoryPermissions = fo;
|
|
2939
2939
|
(function(e) {
|
|
2940
2940
|
Object.defineProperty(e, "__esModule", {
|
|
2941
2941
|
value: !0
|
|
@@ -2952,8 +2952,8 @@ Object.defineProperty(et, "__esModule", {
|
|
|
2952
2952
|
value: !0
|
|
2953
2953
|
});
|
|
2954
2954
|
et.BasisTheoryProxies = void 0;
|
|
2955
|
-
var mr = m,
|
|
2956
|
-
const
|
|
2955
|
+
var mr = m, ho = P, po = K;
|
|
2956
|
+
const mo = new po.CrudBuilder(class extends ho.BasisTheoryService {
|
|
2957
2957
|
constructor(t) {
|
|
2958
2958
|
const r = {
|
|
2959
2959
|
...t
|
|
@@ -2961,7 +2961,7 @@ const po = new ho.CrudBuilder(class extends fo.BasisTheoryService {
|
|
|
2961
2961
|
r.transformRequest = [].concat(mr.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(mr.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
2962
2962
|
}
|
|
2963
2963
|
}).create().retrieve().update().patch().delete().list().build();
|
|
2964
|
-
et.BasisTheoryProxies =
|
|
2964
|
+
et.BasisTheoryProxies = mo;
|
|
2965
2965
|
(function(e) {
|
|
2966
2966
|
Object.defineProperty(e, "__esModule", {
|
|
2967
2967
|
value: !0
|
|
@@ -2981,10 +2981,10 @@ Object.defineProperty(tt, "__esModule", {
|
|
|
2981
2981
|
value: !0
|
|
2982
2982
|
});
|
|
2983
2983
|
tt.BasisTheoryReactorFormulas = void 0;
|
|
2984
|
-
var
|
|
2985
|
-
const
|
|
2984
|
+
var Eo = P, yo = K;
|
|
2985
|
+
const bo = new yo.CrudBuilder(class extends Eo.BasisTheoryService {
|
|
2986
2986
|
}).create().retrieve().update().delete().list().build();
|
|
2987
|
-
tt.BasisTheoryReactorFormulas =
|
|
2987
|
+
tt.BasisTheoryReactorFormulas = bo;
|
|
2988
2988
|
(function(e) {
|
|
2989
2989
|
Object.defineProperty(e, "__esModule", {
|
|
2990
2990
|
value: !0
|
|
@@ -3001,8 +3001,8 @@ Object.defineProperty(rt, "__esModule", {
|
|
|
3001
3001
|
value: !0
|
|
3002
3002
|
});
|
|
3003
3003
|
rt.BasisTheoryReactors = void 0;
|
|
3004
|
-
var Ae = C, Er = m,
|
|
3005
|
-
const
|
|
3004
|
+
var Ae = C, Er = m, _o = P, wo = K;
|
|
3005
|
+
const go = new wo.CrudBuilder(class extends _o.BasisTheoryService {
|
|
3006
3006
|
constructor(t) {
|
|
3007
3007
|
const r = {
|
|
3008
3008
|
...t
|
|
@@ -3016,7 +3016,7 @@ const wo = new _o.CrudBuilder(class extends bo.BasisTheoryService {
|
|
|
3016
3016
|
})).then(Ae.dataExtractor);
|
|
3017
3017
|
}
|
|
3018
3018
|
}).create().retrieve().update().patch().delete().list().build();
|
|
3019
|
-
rt.BasisTheoryReactors =
|
|
3019
|
+
rt.BasisTheoryReactors = go;
|
|
3020
3020
|
(function(e) {
|
|
3021
3021
|
Object.defineProperty(e, "__esModule", {
|
|
3022
3022
|
value: !0
|
|
@@ -3033,8 +3033,8 @@ Object.defineProperty(nt, "__esModule", {
|
|
|
3033
3033
|
value: !0
|
|
3034
3034
|
});
|
|
3035
3035
|
nt.BasisTheorySessions = void 0;
|
|
3036
|
-
var yr = C, Te = m,
|
|
3037
|
-
class
|
|
3036
|
+
var yr = C, Te = m, So = P;
|
|
3037
|
+
class Ao extends So.BasisTheoryService {
|
|
3038
3038
|
constructor(t) {
|
|
3039
3039
|
const r = {
|
|
3040
3040
|
...t
|
|
@@ -3048,7 +3048,7 @@ class So extends go.BasisTheoryService {
|
|
|
3048
3048
|
return this.client.post("/authorize", t, (0, yr.createRequestConfig)(r)).then(Te.dataExtractor);
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
|
-
nt.BasisTheorySessions =
|
|
3051
|
+
nt.BasisTheorySessions = Ao;
|
|
3052
3052
|
(function(e) {
|
|
3053
3053
|
Object.defineProperty(e, "__esModule", {
|
|
3054
3054
|
value: !0
|
|
@@ -3065,8 +3065,8 @@ Object.defineProperty(st, "__esModule", {
|
|
|
3065
3065
|
value: !0
|
|
3066
3066
|
});
|
|
3067
3067
|
st.BasisTheoryTenants = void 0;
|
|
3068
|
-
var S = C,
|
|
3069
|
-
const
|
|
3068
|
+
var S = C, To = P, Ro = K;
|
|
3069
|
+
const vo = new Ro.CrudBuilder(class extends To.BasisTheoryService {
|
|
3070
3070
|
retrieve(t) {
|
|
3071
3071
|
return this.client.get("/", (0, S.createRequestConfig)(t)).then(S.dataExtractor);
|
|
3072
3072
|
}
|
|
@@ -3103,7 +3103,7 @@ const Ro = new To.CrudBuilder(class extends Ao.BasisTheoryService {
|
|
|
3103
3103
|
await this.client.delete(`/members/${t}`, (0, S.createRequestConfig)(r));
|
|
3104
3104
|
}
|
|
3105
3105
|
}).build();
|
|
3106
|
-
st.BasisTheoryTenants =
|
|
3106
|
+
st.BasisTheoryTenants = vo;
|
|
3107
3107
|
(function(e) {
|
|
3108
3108
|
Object.defineProperty(e, "__esModule", {
|
|
3109
3109
|
value: !0
|
|
@@ -3119,18 +3119,18 @@ Object.defineProperty(Ne, "__esModule", {
|
|
|
3119
3119
|
value: !0
|
|
3120
3120
|
});
|
|
3121
3121
|
Ne.BasisTheory = void 0;
|
|
3122
|
-
var ue = ne,
|
|
3123
|
-
function
|
|
3122
|
+
var ue = ne, Oo = Ar, Co = zt, _ = C, Re = rn, Po = R, Bo = on, xo = cn, jo = un, No = ln, Do = dn, Uo = fn, Ho = hn;
|
|
3123
|
+
function Lo(e, t, r) {
|
|
3124
3124
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3125
3125
|
}
|
|
3126
|
-
const
|
|
3126
|
+
const Mo = {
|
|
3127
3127
|
apiBaseUrl: _.DEFAULT_BASE_URL,
|
|
3128
3128
|
elements: !1,
|
|
3129
3129
|
appInfo: {}
|
|
3130
3130
|
};
|
|
3131
|
-
class
|
|
3131
|
+
class Io {
|
|
3132
3132
|
constructor() {
|
|
3133
|
-
|
|
3133
|
+
Lo(this, "_initStatus", "not-started");
|
|
3134
3134
|
}
|
|
3135
3135
|
async init(t, r = {}) {
|
|
3136
3136
|
if (this._initStatus !== "not-started" && this._initStatus !== "error")
|
|
@@ -3138,7 +3138,7 @@ class Mo {
|
|
|
3138
3138
|
this._initStatus = "in-progress";
|
|
3139
3139
|
try {
|
|
3140
3140
|
this._initOptions = Object.freeze({
|
|
3141
|
-
...
|
|
3141
|
+
...Mo,
|
|
3142
3142
|
...r
|
|
3143
3143
|
});
|
|
3144
3144
|
let n = this._initOptions.apiBaseUrl;
|
|
@@ -3157,31 +3157,31 @@ class Mo {
|
|
|
3157
3157
|
apiKey: t,
|
|
3158
3158
|
baseURL: new URL(_.CLIENT_BASE_PATHS.tokenize, n).toString(),
|
|
3159
3159
|
appInfo: s
|
|
3160
|
-
}), this._applications = new
|
|
3160
|
+
}), this._applications = new Co.BasisTheoryApplications({
|
|
3161
3161
|
apiKey: t,
|
|
3162
3162
|
baseURL: new URL(_.CLIENT_BASE_PATHS.applications, n).toString(),
|
|
3163
3163
|
appInfo: s
|
|
3164
|
-
}), this._tenants = new
|
|
3164
|
+
}), this._tenants = new Ho.BasisTheoryTenants({
|
|
3165
3165
|
apiKey: t,
|
|
3166
3166
|
baseURL: new URL(_.CLIENT_BASE_PATHS.tenants, n).toString(),
|
|
3167
3167
|
appInfo: s
|
|
3168
|
-
}), this._logs = new
|
|
3168
|
+
}), this._logs = new Bo.BasisTheoryLogs({
|
|
3169
3169
|
apiKey: t,
|
|
3170
3170
|
baseURL: new URL(_.CLIENT_BASE_PATHS.logs, n).toString(),
|
|
3171
3171
|
appInfo: s
|
|
3172
|
-
}), this._reactorFormulas = new
|
|
3172
|
+
}), this._reactorFormulas = new No.BasisTheoryReactorFormulas({
|
|
3173
3173
|
apiKey: t,
|
|
3174
3174
|
baseURL: new URL(_.CLIENT_BASE_PATHS.reactorFormulas, n).toString(),
|
|
3175
3175
|
appInfo: s
|
|
3176
|
-
}), this._reactors = new
|
|
3176
|
+
}), this._reactors = new Do.BasisTheoryReactors({
|
|
3177
3177
|
apiKey: t,
|
|
3178
3178
|
baseURL: new URL(_.CLIENT_BASE_PATHS.reactors, n).toString(),
|
|
3179
3179
|
appInfo: s
|
|
3180
|
-
}), this._permissions = new
|
|
3180
|
+
}), this._permissions = new xo.BasisTheoryPermissions({
|
|
3181
3181
|
apiKey: t,
|
|
3182
3182
|
baseURL: new URL(_.CLIENT_BASE_PATHS.permissions, n).toString(),
|
|
3183
3183
|
appInfo: s
|
|
3184
|
-
}), this._proxies = new
|
|
3184
|
+
}), this._proxies = new jo.BasisTheoryProxies({
|
|
3185
3185
|
apiKey: t,
|
|
3186
3186
|
baseURL: new URL(_.CLIENT_BASE_PATHS.proxies, n).toString(),
|
|
3187
3187
|
appInfo: s
|
|
@@ -3189,11 +3189,11 @@ class Mo {
|
|
|
3189
3189
|
apiKey: t,
|
|
3190
3190
|
baseURL: new URL(_.CLIENT_BASE_PATHS.proxy, n).toString(),
|
|
3191
3191
|
appInfo: s
|
|
3192
|
-
}), this._sessions = new
|
|
3192
|
+
}), this._sessions = new Uo.BasisTheorySessions({
|
|
3193
3193
|
apiKey: t,
|
|
3194
3194
|
baseURL: new URL(_.CLIENT_BASE_PATHS.sessions, n).toString(),
|
|
3195
3195
|
appInfo: s
|
|
3196
|
-
}), this._transactions = new
|
|
3196
|
+
}), this._transactions = new Oo.BasisTheoryTransactions({
|
|
3197
3197
|
apiKey: t,
|
|
3198
3198
|
baseURL: new URL(_.CLIENT_BASE_PATHS.transactions, n).toString(),
|
|
3199
3199
|
appInfo: s
|
|
@@ -3205,7 +3205,7 @@ class Mo {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
createElement(t, r) {
|
|
3207
3207
|
if (!this._elements)
|
|
3208
|
-
throw new Error(
|
|
3208
|
+
throw new Error(Po.ELEMENTS_INIT_ERROR_MESSAGE);
|
|
3209
3209
|
return this._elements.createElement(t, r);
|
|
3210
3210
|
}
|
|
3211
3211
|
tokenize(t, r) {
|
|
@@ -3285,7 +3285,7 @@ class Mo {
|
|
|
3285
3285
|
this._elements = t;
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
|
-
Ne.BasisTheory =
|
|
3288
|
+
Ne.BasisTheory = Io;
|
|
3289
3289
|
(function(e) {
|
|
3290
3290
|
Object.defineProperty(e, "__esModule", {
|
|
3291
3291
|
value: !0
|
|
@@ -3324,7 +3324,7 @@ Ne.BasisTheory = Mo;
|
|
|
3324
3324
|
const i = new r.BasisTheory();
|
|
3325
3325
|
e._instance = i;
|
|
3326
3326
|
})(gr);
|
|
3327
|
-
const g = crypto, M = (e) => e instanceof CryptoKey,
|
|
3327
|
+
const g = crypto, M = (e) => e instanceof CryptoKey, $o = async (e, t) => {
|
|
3328
3328
|
const r = `SHA-${e.slice(-3)}`;
|
|
3329
3329
|
return new Uint8Array(await g.subtle.digest(r, t));
|
|
3330
3330
|
}, Y = new TextEncoder(), pn = new TextDecoder(), je = 2 ** 32;
|
|
@@ -3335,7 +3335,7 @@ function ye(...e) {
|
|
|
3335
3335
|
r.set(s, n), n += s.length;
|
|
3336
3336
|
return r;
|
|
3337
3337
|
}
|
|
3338
|
-
function
|
|
3338
|
+
function Ko(e, t) {
|
|
3339
3339
|
return ye(Y.encode(e), new Uint8Array([0]), t);
|
|
3340
3340
|
}
|
|
3341
3341
|
function Bt(e, t, r) {
|
|
@@ -3343,7 +3343,7 @@ function Bt(e, t, r) {
|
|
|
3343
3343
|
throw new RangeError(`value must be >= 0 and <= ${je - 1}. Received ${t}`);
|
|
3344
3344
|
e.set([t >>> 24, t >>> 16, t >>> 8, t & 255], r);
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3346
|
+
function qo(e) {
|
|
3347
3347
|
const t = Math.floor(e / je), r = e % je, n = new Uint8Array(8);
|
|
3348
3348
|
return Bt(n, t, 0), Bt(n, r, 4), n;
|
|
3349
3349
|
}
|
|
@@ -3354,22 +3354,22 @@ function kt(e) {
|
|
|
3354
3354
|
function mt(e) {
|
|
3355
3355
|
return ye(kt(e.length), e);
|
|
3356
3356
|
}
|
|
3357
|
-
async function
|
|
3357
|
+
async function Fo(e, t, r) {
|
|
3358
3358
|
const n = Math.ceil((t >> 3) / 32), s = new Uint8Array(n * 32);
|
|
3359
3359
|
for (let i = 0; i < n; i++) {
|
|
3360
3360
|
const a = new Uint8Array(4 + e.length + r.length);
|
|
3361
|
-
a.set(kt(i + 1)), a.set(e, 4), a.set(r, 4 + e.length), s.set(await
|
|
3361
|
+
a.set(kt(i + 1)), a.set(e, 4), a.set(r, 4 + e.length), s.set(await $o("sha256", a), i * 32);
|
|
3362
3362
|
}
|
|
3363
3363
|
return s.slice(0, t >> 3);
|
|
3364
3364
|
}
|
|
3365
|
-
const
|
|
3365
|
+
const zo = (e) => {
|
|
3366
3366
|
let t = e;
|
|
3367
3367
|
typeof t == "string" && (t = Y.encode(t));
|
|
3368
3368
|
const r = 32768, n = [];
|
|
3369
3369
|
for (let s = 0; s < t.length; s += r)
|
|
3370
3370
|
n.push(String.fromCharCode.apply(null, t.subarray(s, s + r)));
|
|
3371
3371
|
return btoa(n.join(""));
|
|
3372
|
-
}, B = (e) =>
|
|
3372
|
+
}, B = (e) => zo(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"), Wo = (e) => {
|
|
3373
3373
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
3374
3374
|
for (let n = 0; n < t.length; n++)
|
|
3375
3375
|
r[n] = t.charCodeAt(n);
|
|
@@ -3378,7 +3378,7 @@ const Fo = (e) => {
|
|
|
3378
3378
|
let t = e;
|
|
3379
3379
|
t instanceof Uint8Array && (t = pn.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
3380
3380
|
try {
|
|
3381
|
-
return
|
|
3381
|
+
return Wo(t);
|
|
3382
3382
|
} catch {
|
|
3383
3383
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
3384
3384
|
}
|
|
@@ -3426,24 +3426,24 @@ function yn(e) {
|
|
|
3426
3426
|
throw new O(`Unsupported JWE Algorithm: ${e}`);
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
|
-
const
|
|
3429
|
+
const ko = (e) => Gt(new Uint8Array(yn(e) >> 3)), Go = (e, t) => {
|
|
3430
3430
|
if (t.length << 3 !== yn(e))
|
|
3431
3431
|
throw new G("Invalid Initialization Vector length");
|
|
3432
|
-
},
|
|
3432
|
+
}, Vo = (e, t) => {
|
|
3433
3433
|
const r = e.byteLength << 3;
|
|
3434
3434
|
if (r !== t)
|
|
3435
3435
|
throw new G(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`);
|
|
3436
|
-
}, br =
|
|
3436
|
+
}, br = Vo;
|
|
3437
3437
|
function k(e, t = "algorithm.name") {
|
|
3438
3438
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
3439
3439
|
}
|
|
3440
3440
|
function ve(e, t) {
|
|
3441
3441
|
return e.name === t;
|
|
3442
3442
|
}
|
|
3443
|
-
function
|
|
3443
|
+
function Jo(e) {
|
|
3444
3444
|
return parseInt(e.name.slice(4), 10);
|
|
3445
3445
|
}
|
|
3446
|
-
function
|
|
3446
|
+
function Yo(e, t) {
|
|
3447
3447
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
3448
3448
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
3449
3449
|
if (t.length > 2) {
|
|
@@ -3500,14 +3500,14 @@ function ie(e, t, ...r) {
|
|
|
3500
3500
|
if (!ve(e.algorithm, "RSA-OAEP"))
|
|
3501
3501
|
throw k("RSA-OAEP");
|
|
3502
3502
|
const n = parseInt(t.slice(9), 10) || 1;
|
|
3503
|
-
if (
|
|
3503
|
+
if (Jo(e.algorithm.hash) !== n)
|
|
3504
3504
|
throw k(`SHA-${n}`, "algorithm.hash");
|
|
3505
3505
|
break;
|
|
3506
3506
|
}
|
|
3507
3507
|
default:
|
|
3508
3508
|
throw new TypeError("CryptoKey does not support this operation");
|
|
3509
3509
|
}
|
|
3510
|
-
|
|
3510
|
+
Yo(e, r);
|
|
3511
3511
|
}
|
|
3512
3512
|
function bn(e, t, ...r) {
|
|
3513
3513
|
var n;
|
|
@@ -3522,7 +3522,7 @@ const I = (e, ...t) => bn("Key must be ", e, ...t);
|
|
|
3522
3522
|
function _n(e, t, ...r) {
|
|
3523
3523
|
return bn(`Key for the ${e} algorithm must be `, t, ...r);
|
|
3524
3524
|
}
|
|
3525
|
-
const wn = (e) => M(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", N = ["CryptoKey"],
|
|
3525
|
+
const wn = (e) => M(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", N = ["CryptoKey"], Xo = (...e) => {
|
|
3526
3526
|
const t = e.filter(Boolean);
|
|
3527
3527
|
if (t.length === 0 || t.length === 1)
|
|
3528
3528
|
return !0;
|
|
@@ -3541,11 +3541,11 @@ const wn = (e) => M(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "
|
|
|
3541
3541
|
}
|
|
3542
3542
|
return !0;
|
|
3543
3543
|
};
|
|
3544
|
-
function
|
|
3544
|
+
function Zo(e) {
|
|
3545
3545
|
return typeof e == "object" && e !== null;
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3548
|
-
if (!
|
|
3547
|
+
function Qo(e) {
|
|
3548
|
+
if (!Zo(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
3549
3549
|
return !1;
|
|
3550
3550
|
if (Object.getPrototypeOf(e) === null)
|
|
3551
3551
|
return !0;
|
|
@@ -3554,16 +3554,16 @@ function Zo(e) {
|
|
|
3554
3554
|
t = Object.getPrototypeOf(t);
|
|
3555
3555
|
return Object.getPrototypeOf(e) === t;
|
|
3556
3556
|
}
|
|
3557
|
-
const
|
|
3557
|
+
const ec = [
|
|
3558
3558
|
{ hash: "SHA-256", name: "HMAC" },
|
|
3559
3559
|
!0,
|
|
3560
3560
|
["sign"]
|
|
3561
|
-
], gn =
|
|
3562
|
-
function
|
|
3561
|
+
], gn = ec;
|
|
3562
|
+
function tc(e, t) {
|
|
3563
3563
|
if (e.algorithm.length !== parseInt(t.slice(1, 4), 10))
|
|
3564
3564
|
throw new TypeError(`Invalid key size for alg: ${t}`);
|
|
3565
3565
|
}
|
|
3566
|
-
function
|
|
3566
|
+
function rc(e, t, r) {
|
|
3567
3567
|
if (M(e))
|
|
3568
3568
|
return ie(e, t, r), e;
|
|
3569
3569
|
if (e instanceof Uint8Array)
|
|
@@ -3571,12 +3571,12 @@ function tc(e, t, r) {
|
|
|
3571
3571
|
throw new TypeError(I(e, ...N, "Uint8Array"));
|
|
3572
3572
|
}
|
|
3573
3573
|
const xt = async (e, t, r) => {
|
|
3574
|
-
const n = await
|
|
3575
|
-
|
|
3574
|
+
const n = await rc(t, e, "wrapKey");
|
|
3575
|
+
tc(n, e);
|
|
3576
3576
|
const s = await g.subtle.importKey("raw", r, ...gn);
|
|
3577
3577
|
return new Uint8Array(await g.subtle.wrapKey("raw", s, n, "AES-KW"));
|
|
3578
3578
|
};
|
|
3579
|
-
async function
|
|
3579
|
+
async function nc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
3580
3580
|
if (!M(e))
|
|
3581
3581
|
throw new TypeError(I(e, ...N));
|
|
3582
3582
|
if (ie(e, "ECDH"), !M(t))
|
|
@@ -3589,32 +3589,32 @@ async function rc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
|
3589
3589
|
name: e.algorithm.name,
|
|
3590
3590
|
public: e
|
|
3591
3591
|
}, t, o));
|
|
3592
|
-
return
|
|
3592
|
+
return Fo(l, n, a);
|
|
3593
3593
|
}
|
|
3594
|
-
async function
|
|
3594
|
+
async function sc(e) {
|
|
3595
3595
|
if (!M(e))
|
|
3596
3596
|
throw new TypeError(I(e, ...N));
|
|
3597
3597
|
return g.subtle.generateKey(e.algorithm, !0, ["deriveBits"]);
|
|
3598
3598
|
}
|
|
3599
|
-
function
|
|
3599
|
+
function ic(e) {
|
|
3600
3600
|
if (!M(e))
|
|
3601
3601
|
throw new TypeError(I(e, ...N));
|
|
3602
3602
|
return ["P-256", "P-384", "P-521"].includes(e.algorithm.namedCurve) || e.algorithm.name === "X25519" || e.algorithm.name === "X448";
|
|
3603
3603
|
}
|
|
3604
|
-
function
|
|
3604
|
+
function ac(e) {
|
|
3605
3605
|
if (!(e instanceof Uint8Array) || e.length < 8)
|
|
3606
3606
|
throw new G("PBES2 Salt Input must be 8 or more octets");
|
|
3607
3607
|
}
|
|
3608
|
-
function
|
|
3608
|
+
function oc(e, t) {
|
|
3609
3609
|
if (e instanceof Uint8Array)
|
|
3610
3610
|
return g.subtle.importKey("raw", e, "PBKDF2", !1, ["deriveBits"]);
|
|
3611
3611
|
if (M(e))
|
|
3612
3612
|
return ie(e, t, "deriveBits", "deriveKey"), e;
|
|
3613
3613
|
throw new TypeError(I(e, ...N, "Uint8Array"));
|
|
3614
3614
|
}
|
|
3615
|
-
async function
|
|
3616
|
-
|
|
3617
|
-
const s =
|
|
3615
|
+
async function cc(e, t, r, n) {
|
|
3616
|
+
ac(e);
|
|
3617
|
+
const s = Ko(t, e), i = parseInt(t.slice(13, 16), 10), a = {
|
|
3618
3618
|
hash: `SHA-${t.slice(8, 11)}`,
|
|
3619
3619
|
iterations: r,
|
|
3620
3620
|
name: "PBKDF2",
|
|
@@ -3622,15 +3622,15 @@ async function oc(e, t, r, n) {
|
|
|
3622
3622
|
}, o = {
|
|
3623
3623
|
length: i,
|
|
3624
3624
|
name: "AES-KW"
|
|
3625
|
-
}, l = await
|
|
3625
|
+
}, l = await oc(n, t);
|
|
3626
3626
|
if (l.usages.includes("deriveBits"))
|
|
3627
3627
|
return new Uint8Array(await g.subtle.deriveBits(a, l, i));
|
|
3628
3628
|
if (l.usages.includes("deriveKey"))
|
|
3629
3629
|
return g.subtle.deriveKey(a, l, o, !1, ["wrapKey", "unwrapKey"]);
|
|
3630
3630
|
throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3633
|
-
const i = await
|
|
3632
|
+
const uc = async (e, t, r, n = 2048, s = Gt(new Uint8Array(16))) => {
|
|
3633
|
+
const i = await cc(s, e, n, t);
|
|
3634
3634
|
return { encryptedKey: await xt(e.slice(-6), i, r), p2c: n, p2s: B(s) };
|
|
3635
3635
|
};
|
|
3636
3636
|
function _r(e) {
|
|
@@ -3644,16 +3644,16 @@ function _r(e) {
|
|
|
3644
3644
|
throw new O(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
3645
3645
|
}
|
|
3646
3646
|
}
|
|
3647
|
-
const
|
|
3647
|
+
const lc = (e, t) => {
|
|
3648
3648
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
3649
3649
|
const { modulusLength: r } = t.algorithm;
|
|
3650
3650
|
if (typeof r != "number" || r < 2048)
|
|
3651
3651
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
3652
3652
|
}
|
|
3653
|
-
},
|
|
3653
|
+
}, dc = async (e, t, r) => {
|
|
3654
3654
|
if (!M(t))
|
|
3655
3655
|
throw new TypeError(I(t, ...N));
|
|
3656
|
-
if (ie(t, e, "encrypt", "wrapKey"),
|
|
3656
|
+
if (ie(t, e, "encrypt", "wrapKey"), lc(e, t), t.usages.includes("encrypt"))
|
|
3657
3657
|
return new Uint8Array(await g.subtle.encrypt(_r(e), t, r));
|
|
3658
3658
|
if (t.usages.includes("wrapKey")) {
|
|
3659
3659
|
const n = await g.subtle.importKey("raw", r, ...gn);
|
|
@@ -3661,7 +3661,7 @@ const uc = (e, t) => {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation');
|
|
3663
3663
|
};
|
|
3664
|
-
function
|
|
3664
|
+
function fc(e) {
|
|
3665
3665
|
let t, r;
|
|
3666
3666
|
switch (e.kty) {
|
|
3667
3667
|
case "RSA": {
|
|
@@ -3736,7 +3736,7 @@ function dc(e) {
|
|
|
3736
3736
|
const Sn = async (e) => {
|
|
3737
3737
|
if (!e.alg)
|
|
3738
3738
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
3739
|
-
const { algorithm: t, keyUsages: r } =
|
|
3739
|
+
const { algorithm: t, keyUsages: r } = fc(e), n = [
|
|
3740
3740
|
t,
|
|
3741
3741
|
e.ext ?? !1,
|
|
3742
3742
|
e.key_ops ?? r
|
|
@@ -3750,19 +3750,19 @@ const Tn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
3750
3750
|
return s[n];
|
|
3751
3751
|
const i = await Sn({ ...r, alg: n });
|
|
3752
3752
|
return s ? s[n] = i : e.set(t, { [n]: i }), i;
|
|
3753
|
-
},
|
|
3753
|
+
}, hc = (e, t) => {
|
|
3754
3754
|
if (Tn(e)) {
|
|
3755
3755
|
let r = e.export({ format: "jwk" });
|
|
3756
3756
|
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? An(r.k) : (yt || (yt = /* @__PURE__ */ new WeakMap()), Rn(yt, e, r, t));
|
|
3757
3757
|
}
|
|
3758
3758
|
return e;
|
|
3759
|
-
},
|
|
3759
|
+
}, pc = (e, t) => {
|
|
3760
3760
|
if (Tn(e)) {
|
|
3761
3761
|
let r = e.export({ format: "jwk" });
|
|
3762
3762
|
return r.k ? An(r.k) : (Et || (Et = /* @__PURE__ */ new WeakMap()), Rn(Et, e, r, t));
|
|
3763
3763
|
}
|
|
3764
3764
|
return e;
|
|
3765
|
-
}, bt = { normalizePublicKey:
|
|
3765
|
+
}, bt = { normalizePublicKey: hc, normalizePrivateKey: pc };
|
|
3766
3766
|
function vn(e) {
|
|
3767
3767
|
switch (e) {
|
|
3768
3768
|
case "A128GCM":
|
|
@@ -3781,8 +3781,8 @@ function vn(e) {
|
|
|
3781
3781
|
}
|
|
3782
3782
|
}
|
|
3783
3783
|
const le = (e) => Gt(new Uint8Array(vn(e) >> 3));
|
|
3784
|
-
async function
|
|
3785
|
-
if (!
|
|
3784
|
+
async function mc(e, t) {
|
|
3785
|
+
if (!Qo(e))
|
|
3786
3786
|
throw new TypeError("JWK must be an object");
|
|
3787
3787
|
switch (t || (t = e.alg), e.kty) {
|
|
3788
3788
|
case "oct":
|
|
@@ -3799,14 +3799,14 @@ async function pc(e, t) {
|
|
|
3799
3799
|
throw new O('Unsupported "kty" (Key Type) Parameter value');
|
|
3800
3800
|
}
|
|
3801
3801
|
}
|
|
3802
|
-
const ee = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
3802
|
+
const ee = (e) => e == null ? void 0 : e[Symbol.toStringTag], Ec = (e, t) => {
|
|
3803
3803
|
if (!(t instanceof Uint8Array)) {
|
|
3804
3804
|
if (!wn(t))
|
|
3805
3805
|
throw new TypeError(_n(e, t, ...N, "Uint8Array"));
|
|
3806
3806
|
if (t.type !== "secret")
|
|
3807
3807
|
throw new TypeError(`${ee(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
3808
3808
|
}
|
|
3809
|
-
},
|
|
3809
|
+
}, yc = (e, t, r) => {
|
|
3810
3810
|
if (!wn(t))
|
|
3811
3811
|
throw new TypeError(_n(e, t, ...N));
|
|
3812
3812
|
if (t.type === "secret")
|
|
@@ -3819,10 +3819,10 @@ const ee = (e) => e == null ? void 0 : e[Symbol.toStringTag], mc = (e, t) => {
|
|
|
3819
3819
|
throw new TypeError(`${ee(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
3820
3820
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
3821
3821
|
throw new TypeError(`${ee(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
3822
|
-
},
|
|
3823
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
3822
|
+
}, bc = (e, t, r) => {
|
|
3823
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Ec(e, t) : yc(e, t, r);
|
|
3824
3824
|
};
|
|
3825
|
-
async function
|
|
3825
|
+
async function _c(e, t, r, n, s) {
|
|
3826
3826
|
if (!(r instanceof Uint8Array))
|
|
3827
3827
|
throw new TypeError(I(r, "Uint8Array"));
|
|
3828
3828
|
const i = parseInt(e.slice(1, 4), 10), a = await g.subtle.importKey("raw", r.subarray(i >> 3), "AES-CBC", !1, ["encrypt"]), o = await g.subtle.importKey("raw", r.subarray(0, i >> 3), {
|
|
@@ -3831,10 +3831,10 @@ async function bc(e, t, r, n, s) {
|
|
|
3831
3831
|
}, !1, ["sign"]), l = new Uint8Array(await g.subtle.encrypt({
|
|
3832
3832
|
iv: n,
|
|
3833
3833
|
name: "AES-CBC"
|
|
3834
|
-
}, a, t)), d = ye(s, n, l,
|
|
3834
|
+
}, a, t)), d = ye(s, n, l, qo(s.length << 3)), c = new Uint8Array((await g.subtle.sign("HMAC", o, d)).slice(0, i >> 3));
|
|
3835
3835
|
return { ciphertext: l, tag: c, iv: n };
|
|
3836
3836
|
}
|
|
3837
|
-
async function
|
|
3837
|
+
async function wc(e, t, r, n, s) {
|
|
3838
3838
|
let i;
|
|
3839
3839
|
r instanceof Uint8Array ? i = await g.subtle.importKey("raw", r, "AES-GCM", !1, ["encrypt"]) : (ie(r, e, "encrypt"), i = r);
|
|
3840
3840
|
const a = new Uint8Array(await g.subtle.encrypt({
|
|
@@ -3848,20 +3848,20 @@ async function _c(e, t, r, n, s) {
|
|
|
3848
3848
|
const On = async (e, t, r, n, s) => {
|
|
3849
3849
|
if (!M(r) && !(r instanceof Uint8Array))
|
|
3850
3850
|
throw new TypeError(I(r, ...N, "Uint8Array"));
|
|
3851
|
-
switch (n ?
|
|
3851
|
+
switch (n ? Go(e, n) : n = ko(e), e) {
|
|
3852
3852
|
case "A128CBC-HS256":
|
|
3853
3853
|
case "A192CBC-HS384":
|
|
3854
3854
|
case "A256CBC-HS512":
|
|
3855
|
-
return r instanceof Uint8Array && br(r, parseInt(e.slice(-3), 10)),
|
|
3855
|
+
return r instanceof Uint8Array && br(r, parseInt(e.slice(-3), 10)), _c(e, t, r, n, s);
|
|
3856
3856
|
case "A128GCM":
|
|
3857
3857
|
case "A192GCM":
|
|
3858
3858
|
case "A256GCM":
|
|
3859
|
-
return r instanceof Uint8Array && br(r, parseInt(e.slice(1, 4), 10)),
|
|
3859
|
+
return r instanceof Uint8Array && br(r, parseInt(e.slice(1, 4), 10)), wc(e, t, r, n, s);
|
|
3860
3860
|
default:
|
|
3861
3861
|
throw new O("Unsupported JWE Content Encryption Algorithm");
|
|
3862
3862
|
}
|
|
3863
3863
|
};
|
|
3864
|
-
async function
|
|
3864
|
+
async function gc(e, t, r, n) {
|
|
3865
3865
|
const s = e.slice(0, 7), i = await On(s, r, t, n, new Uint8Array(0));
|
|
3866
3866
|
return {
|
|
3867
3867
|
encryptedKey: i.ciphertext,
|
|
@@ -3869,7 +3869,7 @@ async function wc(e, t, r, n) {
|
|
|
3869
3869
|
tag: B(i.tag)
|
|
3870
3870
|
};
|
|
3871
3871
|
}
|
|
3872
|
-
function
|
|
3872
|
+
function Sc(e, t, r, n, s) {
|
|
3873
3873
|
if (s.crit !== void 0 && (n == null ? void 0 : n.crit) === void 0)
|
|
3874
3874
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
3875
3875
|
if (!n || n.crit === void 0)
|
|
@@ -3888,7 +3888,7 @@ function gc(e, t, r, n, s) {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
return new Set(n.crit);
|
|
3890
3890
|
}
|
|
3891
|
-
const
|
|
3891
|
+
const Ac = async (e) => {
|
|
3892
3892
|
if (e instanceof Uint8Array)
|
|
3893
3893
|
return {
|
|
3894
3894
|
kty: "oct",
|
|
@@ -3901,13 +3901,13 @@ const Sc = async (e) => {
|
|
|
3901
3901
|
const { ext: t, key_ops: r, alg: n, use: s, ...i } = await g.subtle.exportKey("jwk", e);
|
|
3902
3902
|
return i;
|
|
3903
3903
|
};
|
|
3904
|
-
async function
|
|
3905
|
-
return
|
|
3904
|
+
async function Tc(e) {
|
|
3905
|
+
return Ac(e);
|
|
3906
3906
|
}
|
|
3907
|
-
async function
|
|
3907
|
+
async function Rc(e, t, r, n, s = {}) {
|
|
3908
3908
|
var l;
|
|
3909
3909
|
let i, a, o;
|
|
3910
|
-
switch (
|
|
3910
|
+
switch (bc(e, r, "encrypt"), r = await ((l = bt.normalizePublicKey) == null ? void 0 : l.call(bt, r, e)) || r, e) {
|
|
3911
3911
|
case "dir": {
|
|
3912
3912
|
o = r;
|
|
3913
3913
|
break;
|
|
@@ -3916,12 +3916,12 @@ async function Tc(e, t, r, n, s = {}) {
|
|
|
3916
3916
|
case "ECDH-ES+A128KW":
|
|
3917
3917
|
case "ECDH-ES+A192KW":
|
|
3918
3918
|
case "ECDH-ES+A256KW": {
|
|
3919
|
-
if (!
|
|
3919
|
+
if (!ic(r))
|
|
3920
3920
|
throw new O("ECDH with the provided key is not allowed or not supported by your javascript runtime");
|
|
3921
3921
|
const { apu: d, apv: c } = s;
|
|
3922
3922
|
let { epk: h } = s;
|
|
3923
|
-
h || (h = (await
|
|
3924
|
-
const { x: E, y: w, crv: f, kty: p } = await
|
|
3923
|
+
h || (h = (await sc(r)).privateKey);
|
|
3924
|
+
const { x: E, y: w, crv: f, kty: p } = await Tc(h), T = await nc(r, h, e === "ECDH-ES" ? t : e, e === "ECDH-ES" ? vn(t) : parseInt(e.slice(-5, -2), 10), d, c);
|
|
3925
3925
|
if (a = { epk: { x: E, crv: f, kty: p } }, p === "EC" && (a.epk.y = w), d && (a.apu = B(d)), c && (a.apv = B(c)), e === "ECDH-ES") {
|
|
3926
3926
|
o = T;
|
|
3927
3927
|
break;
|
|
@@ -3936,7 +3936,7 @@ async function Tc(e, t, r, n, s = {}) {
|
|
|
3936
3936
|
case "RSA-OAEP-256":
|
|
3937
3937
|
case "RSA-OAEP-384":
|
|
3938
3938
|
case "RSA-OAEP-512": {
|
|
3939
|
-
o = n || le(t), i = await
|
|
3939
|
+
o = n || le(t), i = await dc(e, r, o);
|
|
3940
3940
|
break;
|
|
3941
3941
|
}
|
|
3942
3942
|
case "PBES2-HS256+A128KW":
|
|
@@ -3944,7 +3944,7 @@ async function Tc(e, t, r, n, s = {}) {
|
|
|
3944
3944
|
case "PBES2-HS512+A256KW": {
|
|
3945
3945
|
o = n || le(t);
|
|
3946
3946
|
const { p2c: d, p2s: c } = s;
|
|
3947
|
-
({ encryptedKey: i, ...a } = await
|
|
3947
|
+
({ encryptedKey: i, ...a } = await uc(e, r, o, d, c));
|
|
3948
3948
|
break;
|
|
3949
3949
|
}
|
|
3950
3950
|
case "A128KW":
|
|
@@ -3958,7 +3958,7 @@ async function Tc(e, t, r, n, s = {}) {
|
|
|
3958
3958
|
case "A256GCMKW": {
|
|
3959
3959
|
o = n || le(t);
|
|
3960
3960
|
const { iv: d } = s;
|
|
3961
|
-
({ encryptedKey: i, ...a } = await
|
|
3961
|
+
({ encryptedKey: i, ...a } = await gc(e, r, o, d));
|
|
3962
3962
|
break;
|
|
3963
3963
|
}
|
|
3964
3964
|
default:
|
|
@@ -3966,8 +3966,8 @@ async function Tc(e, t, r, n, s = {}) {
|
|
|
3966
3966
|
}
|
|
3967
3967
|
return { cek: o, encryptedKey: i, parameters: a };
|
|
3968
3968
|
}
|
|
3969
|
-
const
|
|
3970
|
-
class
|
|
3969
|
+
const vc = Symbol();
|
|
3970
|
+
class Oc {
|
|
3971
3971
|
constructor(t) {
|
|
3972
3972
|
if (!(t instanceof Uint8Array))
|
|
3973
3973
|
throw new TypeError("plaintext must be an instance of Uint8Array");
|
|
@@ -4009,14 +4009,14 @@ class vc {
|
|
|
4009
4009
|
async encrypt(t, r) {
|
|
4010
4010
|
if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader)
|
|
4011
4011
|
throw new G("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");
|
|
4012
|
-
if (!
|
|
4012
|
+
if (!Xo(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader))
|
|
4013
4013
|
throw new G("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");
|
|
4014
4014
|
const n = {
|
|
4015
4015
|
...this._protectedHeader,
|
|
4016
4016
|
...this._unprotectedHeader,
|
|
4017
4017
|
...this._sharedUnprotectedHeader
|
|
4018
4018
|
};
|
|
4019
|
-
if (
|
|
4019
|
+
if (Sc(G, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, this._protectedHeader, n), n.zip !== void 0)
|
|
4020
4020
|
throw new O('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
4021
4021
|
const { alg: s, enc: i } = n;
|
|
4022
4022
|
if (typeof s != "string" || !s)
|
|
@@ -4029,7 +4029,7 @@ class vc {
|
|
|
4029
4029
|
let o;
|
|
4030
4030
|
{
|
|
4031
4031
|
let p;
|
|
4032
|
-
({ cek: o, encryptedKey: a, parameters: p } = await
|
|
4032
|
+
({ cek: o, encryptedKey: a, parameters: p } = await Rc(s, i, t, this._cek, this._keyManagementParameters)), p && (r && vc in r ? this._unprotectedHeader ? this._unprotectedHeader = { ...this._unprotectedHeader, ...p } : this.setUnprotectedHeader(p) : this._protectedHeader ? this._protectedHeader = { ...this._protectedHeader, ...p } : this.setProtectedHeader(p));
|
|
4033
4033
|
}
|
|
4034
4034
|
let l, d, c;
|
|
4035
4035
|
this._protectedHeader ? d = Y.encode(B(JSON.stringify(this._protectedHeader))) : d = Y.encode(""), this._aad ? (c = B(this._aad), l = ye(d, Y.encode("."), Y.encode(c))) : l = d;
|
|
@@ -4039,9 +4039,9 @@ class vc {
|
|
|
4039
4039
|
return w && (f.iv = B(w)), E && (f.tag = B(E)), a && (f.encrypted_key = B(a)), c && (f.aad = c), this._protectedHeader && (f.protected = pn.decode(d)), this._sharedUnprotectedHeader && (f.unprotected = this._sharedUnprotectedHeader), this._unprotectedHeader && (f.header = this._unprotectedHeader), f;
|
|
4040
4040
|
}
|
|
4041
4041
|
}
|
|
4042
|
-
class
|
|
4042
|
+
class Cc {
|
|
4043
4043
|
constructor(t) {
|
|
4044
|
-
this._flattened = new
|
|
4044
|
+
this._flattened = new Oc(t);
|
|
4045
4045
|
}
|
|
4046
4046
|
setContentEncryptionKey(t) {
|
|
4047
4047
|
return this._flattened.setContentEncryptionKey(t), this;
|
|
@@ -4066,15 +4066,15 @@ const _t = {
|
|
|
4066
4066
|
backgroundColor: "transparent"
|
|
4067
4067
|
}
|
|
4068
4068
|
}
|
|
4069
|
-
},
|
|
4069
|
+
}, Pc = {
|
|
4070
4070
|
mask: {
|
|
4071
4071
|
number: "{{ data.number | card_mask: 'true', 'true' }}",
|
|
4072
4072
|
expiration_month: "{{ data.expiration_month }}",
|
|
4073
4073
|
expiration_year: "{{ data.expiration_year }}"
|
|
4074
4074
|
}
|
|
4075
|
-
},
|
|
4076
|
-
var
|
|
4077
|
-
const
|
|
4075
|
+
}, Bc = Pc, xc = "DOM Element was not found", Cn = (e) => e != null;
|
|
4076
|
+
var jc = { VITE_PACKAGE_VERSION: "v3.2.1", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
4077
|
+
const Nc = "v3.2.1";
|
|
4078
4078
|
class be {
|
|
4079
4079
|
constructor(t, r) {
|
|
4080
4080
|
if (Object.defineProperty(this, "options", {
|
|
@@ -4102,7 +4102,7 @@ class be {
|
|
|
4102
4102
|
configurable: !0,
|
|
4103
4103
|
writable: !0,
|
|
4104
4104
|
value: async ({ ...n }) => {
|
|
4105
|
-
this.iframePostMessage({
|
|
4105
|
+
this.iframe && Cn(n.height) && (this.iframe.height = n.height), this.iframePostMessage({
|
|
4106
4106
|
type: "update",
|
|
4107
4107
|
data: {
|
|
4108
4108
|
...n,
|
|
@@ -4139,14 +4139,14 @@ class be {
|
|
|
4139
4139
|
var n;
|
|
4140
4140
|
(n = this.iframe) == null || n.remove(), this.iframe = null;
|
|
4141
4141
|
}
|
|
4142
|
-
}), this.IFRAME_BASE_URL =
|
|
4142
|
+
}), this.IFRAME_BASE_URL = jc.VITE_IFRAME_BASE_URL ?? Dc(Nc), !this.IFRAME_BASE_URL)
|
|
4143
4143
|
throw new Error("IFRAME_BASE_URL not found");
|
|
4144
4144
|
r && wt.set(this, { key: r });
|
|
4145
4145
|
}
|
|
4146
4146
|
mount(t) {
|
|
4147
4147
|
const r = typeof t == "string" ? document.querySelector(t) : t;
|
|
4148
4148
|
if (!r)
|
|
4149
|
-
throw new Error(
|
|
4149
|
+
throw new Error(xc);
|
|
4150
4150
|
r.innerHTML = `<iframe width="100%" height="29" src="${this.IFRAME_BASE_URL}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
|
|
4151
4151
|
const n = (s) => {
|
|
4152
4152
|
var i;
|
|
@@ -4186,22 +4186,22 @@ class be {
|
|
|
4186
4186
|
(n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, this.IFRAME_BASE_URL);
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
function
|
|
4189
|
+
function Dc(e) {
|
|
4190
4190
|
return `https://${window.HG_IFRAME_HOST ?? "sdk.hellgate.io"}/web/${e}/iframe/`;
|
|
4191
4191
|
}
|
|
4192
|
-
const wt = /* @__PURE__ */ new Map()
|
|
4193
|
-
function
|
|
4192
|
+
const wt = /* @__PURE__ */ new Map();
|
|
4193
|
+
function Pn(e) {
|
|
4194
4194
|
const [t = null, r = null] = (e ?? "").split("/").map((n) => Number(n.trim()));
|
|
4195
4195
|
return { month: t, year: r && r > 10 ? +`20${r}` : null };
|
|
4196
4196
|
}
|
|
4197
|
-
function
|
|
4197
|
+
function Bn(e) {
|
|
4198
4198
|
if (!e)
|
|
4199
4199
|
return null;
|
|
4200
4200
|
const { month: t, year: r } = e;
|
|
4201
4201
|
return [
|
|
4202
4202
|
t && t < 10 ? `0${t}` : t,
|
|
4203
4203
|
r && r >= 100 ? String(r).slice(-2) : r
|
|
4204
|
-
].filter(
|
|
4204
|
+
].filter(Cn).join(" / ");
|
|
4205
4205
|
}
|
|
4206
4206
|
class Uc extends be {
|
|
4207
4207
|
constructor() {
|
|
@@ -4214,16 +4214,16 @@ class Uc extends be {
|
|
|
4214
4214
|
enumerable: !0,
|
|
4215
4215
|
configurable: !0,
|
|
4216
4216
|
writable: !0,
|
|
4217
|
-
value:
|
|
4217
|
+
value: Pn
|
|
4218
4218
|
}), Object.defineProperty(this, "putValue", {
|
|
4219
4219
|
enumerable: !0,
|
|
4220
4220
|
configurable: !0,
|
|
4221
4221
|
writable: !0,
|
|
4222
|
-
value:
|
|
4222
|
+
value: Bn
|
|
4223
4223
|
});
|
|
4224
4224
|
}
|
|
4225
4225
|
}
|
|
4226
|
-
function
|
|
4226
|
+
function xn(e) {
|
|
4227
4227
|
return (e == null ? void 0 : e.replaceAll(" ", "")) ?? null;
|
|
4228
4228
|
}
|
|
4229
4229
|
function Hc(e) {
|
|
@@ -4240,7 +4240,7 @@ class Lc extends be {
|
|
|
4240
4240
|
enumerable: !0,
|
|
4241
4241
|
configurable: !0,
|
|
4242
4242
|
writable: !0,
|
|
4243
|
-
value:
|
|
4243
|
+
value: xn
|
|
4244
4244
|
}), Object.defineProperty(this, "putValue", {
|
|
4245
4245
|
enumerable: !0,
|
|
4246
4246
|
configurable: !0,
|
|
@@ -4261,8 +4261,8 @@ class Mc extends be {
|
|
|
4261
4261
|
configurable: !0,
|
|
4262
4262
|
writable: !0,
|
|
4263
4263
|
value: (t) => t ? {
|
|
4264
|
-
number: t.cardNumber ?
|
|
4265
|
-
expiry_date: t.cardExpirationDate ?
|
|
4264
|
+
number: t.cardNumber ? xn(t.cardNumber) : null,
|
|
4265
|
+
expiry_date: t.cardExpirationDate ? Pn(t.cardExpirationDate) : null,
|
|
4266
4266
|
cvc: t.cardVerificationCode ?? null
|
|
4267
4267
|
} : null
|
|
4268
4268
|
}), Object.defineProperty(this, "putValue", {
|
|
@@ -4271,7 +4271,7 @@ class Mc extends be {
|
|
|
4271
4271
|
writable: !0,
|
|
4272
4272
|
value: (t) => t ? {
|
|
4273
4273
|
cardNumber: t.number ? t.number : null,
|
|
4274
|
-
cardExpirationDate: t.expiry_date ?
|
|
4274
|
+
cardExpirationDate: t.expiry_date ? Bn(t.expiry_date) : null,
|
|
4275
4275
|
cardVerificationCode: t.cvc ?? null
|
|
4276
4276
|
} : null
|
|
4277
4277
|
});
|
|
@@ -4297,7 +4297,7 @@ class Ic extends be {
|
|
|
4297
4297
|
});
|
|
4298
4298
|
}
|
|
4299
4299
|
}
|
|
4300
|
-
class
|
|
4300
|
+
class jn extends be {
|
|
4301
4301
|
constructor() {
|
|
4302
4302
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4303
4303
|
enumerable: !0,
|
|
@@ -4328,7 +4328,7 @@ function de(e, t, r) {
|
|
|
4328
4328
|
case "cardVerificationCode":
|
|
4329
4329
|
return new Ic(t, r);
|
|
4330
4330
|
case "text":
|
|
4331
|
-
return new
|
|
4331
|
+
return new jn(t, r);
|
|
4332
4332
|
default:
|
|
4333
4333
|
ASSERT_EXHAUSTIVE(e);
|
|
4334
4334
|
}
|
|
@@ -4488,7 +4488,7 @@ class Vt {
|
|
|
4488
4488
|
return this.bt.tokenize({
|
|
4489
4489
|
type: "card",
|
|
4490
4490
|
data: d,
|
|
4491
|
-
...
|
|
4491
|
+
...Bc
|
|
4492
4492
|
}).then((p) => Array.isArray(p) ? null : { token_id: p.id });
|
|
4493
4493
|
}
|
|
4494
4494
|
case "guardian":
|
|
@@ -4572,8 +4572,8 @@ class Vt {
|
|
|
4572
4572
|
});
|
|
4573
4573
|
}
|
|
4574
4574
|
async encryptCardData(t, r) {
|
|
4575
|
-
const n = await
|
|
4576
|
-
return { enc_payload: await new
|
|
4575
|
+
const n = await mc(r, "RSA-OAEP"), s = JSON.stringify(t), i = new TextEncoder().encode(s);
|
|
4576
|
+
return { enc_payload: await new Cc(i).setProtectedHeader({ alg: "RSA-OAEP", enc: "A256GCM" }).encrypt(n) };
|
|
4577
4577
|
}
|
|
4578
4578
|
addElementStateListener(t) {
|
|
4579
4579
|
const r = this.cardElements[t];
|
|
@@ -4605,7 +4605,7 @@ function te(e, t) {
|
|
|
4605
4605
|
}
|
|
4606
4606
|
function Z(e, t) {
|
|
4607
4607
|
const r = re.get(e);
|
|
4608
|
-
return t instanceof
|
|
4608
|
+
return t instanceof jn && r ? te(e, t) ?? void 0 : t;
|
|
4609
4609
|
}
|
|
4610
4610
|
class Kc {
|
|
4611
4611
|
constructor(t = "https://api.hellgate.io", r = new AbortController()) {
|
|
@@ -4762,7 +4762,7 @@ async function zc(e) {
|
|
|
4762
4762
|
const Wc = {
|
|
4763
4763
|
base_url: "https://api.hellgate.io"
|
|
4764
4764
|
};
|
|
4765
|
-
class
|
|
4765
|
+
class Nn {
|
|
4766
4766
|
constructor(t, r) {
|
|
4767
4767
|
Object.defineProperty(this, "session", {
|
|
4768
4768
|
enumerable: !0,
|
|
@@ -4788,7 +4788,7 @@ class jn {
|
|
|
4788
4788
|
}
|
|
4789
4789
|
static async init(t, r = {}) {
|
|
4790
4790
|
const { session: n, cardHandler: s, handler3DS: i } = await this.initHandlers(t, r);
|
|
4791
|
-
return new
|
|
4791
|
+
return new Nn(n, {
|
|
4792
4792
|
CARD: s,
|
|
4793
4793
|
"3DS": i
|
|
4794
4794
|
});
|
|
@@ -4804,7 +4804,7 @@ class jn {
|
|
|
4804
4804
|
return Vt.init(t, r);
|
|
4805
4805
|
}
|
|
4806
4806
|
static create3DSHandler(t, r) {
|
|
4807
|
-
return new
|
|
4807
|
+
return new Hn(t, {
|
|
4808
4808
|
domContainer: r.challenge_3ds_container,
|
|
4809
4809
|
labelText: r.challenge_3ds_label_text
|
|
4810
4810
|
});
|
|
@@ -4816,14 +4816,14 @@ export {
|
|
|
4816
4816
|
Uc as CardExpirationDateElement,
|
|
4817
4817
|
Lc as CardNumberElement,
|
|
4818
4818
|
Ic as CardVerificationCodeElement,
|
|
4819
|
-
|
|
4820
|
-
|
|
4819
|
+
Nn as Hellgate,
|
|
4820
|
+
Hn as Hellgate3DSHandler,
|
|
4821
4821
|
Vt as HellgateCardHandler,
|
|
4822
|
-
|
|
4822
|
+
jn as TextElement,
|
|
4823
4823
|
de as createElement,
|
|
4824
|
-
|
|
4825
|
-
|
|
4824
|
+
xn as extractCardNumberValue,
|
|
4825
|
+
Pn as extractExpiryDateValue,
|
|
4826
4826
|
Hc as putCardNumberValue,
|
|
4827
|
-
|
|
4827
|
+
Bn as putExpiryDateValue,
|
|
4828
4828
|
$c as uid
|
|
4829
4829
|
};
|