@webitel/chat-web-sdk 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +383 -355
- package/dist/index.js.map +1 -1
- package/dist/modules/contacts/classes/Contact.class.d.ts.map +1 -1
- package/dist/modules/contacts/types/Contact.types.d.ts +2 -3
- package/dist/modules/contacts/types/Contact.types.d.ts.map +1 -1
- package/dist/modules/messages/__tests__/resolveUploadKey.test.d.ts +2 -0
- package/dist/modules/messages/__tests__/resolveUploadKey.test.d.ts.map +1 -0
- package/dist/modules/messages/enums/MessageAttachmentType.enum.d.ts +6 -0
- package/dist/modules/messages/enums/MessageAttachmentType.enum.d.ts.map +1 -0
- package/dist/modules/messages/index.d.ts +1 -0
- package/dist/modules/messages/index.d.ts.map +1 -1
- package/dist/modules/messages/types/Message.types.d.ts +56 -1
- package/dist/modules/messages/types/Message.types.d.ts.map +1 -1
- package/dist/modules/messages/utils/resolveUploadKey.d.ts +14 -0
- package/dist/modules/messages/utils/resolveUploadKey.d.ts.map +1 -0
- package/dist/modules/messages/utils/sendDocumentMessage.d.ts.map +1 -1
- package/dist/modules/messages/utils/sendImageMessage.d.ts.map +1 -1
- package/dist/modules/socket/types/ChatsSocketConnectionState.types.d.ts +10 -0
- package/dist/modules/socket/types/ChatsSocketConnectionState.types.d.ts.map +1 -0
- package/dist/modules/socket/types/models/SocketMessageModel.types.d.ts +1 -1
- package/dist/modules/socket/types/models/SocketMessageModel.types.d.ts.map +1 -1
- package/dist/modules/socket/types/models/SocketThreadModel.types.d.ts +1 -2
- package/dist/modules/socket/types/models/SocketThreadModel.types.d.ts.map +1 -1
- package/dist/modules/threads/classes/Thread.class.d.ts.map +1 -1
- package/dist/modules/threads/types/Thread.types.d.ts +3 -9
- package/dist/modules/threads/types/Thread.types.d.ts.map +1 -1
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts +1 -1
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/modules/socket/enums/SocketClientConnectionStatus.enum.d.ts +0 -9
- package/dist/modules/socket/enums/SocketClientConnectionStatus.enum.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -346,71 +346,71 @@ function ue(e, t) {
|
|
|
346
346
|
}
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region node_modules/axios/lib/utils.js
|
|
349
|
-
var { toString: de } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator:
|
|
349
|
+
var { toString: de } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator: pe, toStringTag: me } = Symbol, he = ((e) => (t) => {
|
|
350
350
|
let n = de.call(t);
|
|
351
351
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
352
|
-
})(Object.create(null)),
|
|
353
|
-
function
|
|
354
|
-
return e !== null && !
|
|
352
|
+
})(Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => he(t) === e), ge = (e) => (t) => typeof t === e, { isArray: M } = Array, N = ge("undefined");
|
|
353
|
+
function P(e) {
|
|
354
|
+
return e !== null && !N(e) && e.constructor !== null && !N(e.constructor) && F(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
355
355
|
}
|
|
356
|
-
var
|
|
357
|
-
function
|
|
356
|
+
var _e = j("ArrayBuffer");
|
|
357
|
+
function ve(e) {
|
|
358
358
|
let t;
|
|
359
|
-
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer &&
|
|
359
|
+
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && _e(e.buffer), t;
|
|
360
360
|
}
|
|
361
|
-
var
|
|
362
|
-
if (
|
|
361
|
+
var ye = ge("string"), F = ge("function"), be = ge("number"), I = (e) => typeof e == "object" && !!e, xe = (e) => e === !0 || e === !1, Se = (e) => {
|
|
362
|
+
if (he(e) !== "object") return !1;
|
|
363
363
|
let t = fe(e);
|
|
364
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
365
|
-
},
|
|
366
|
-
if (!
|
|
364
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(me in e) && !(pe in e);
|
|
365
|
+
}, Ce = (e) => {
|
|
366
|
+
if (!I(e) || P(e)) return !1;
|
|
367
367
|
try {
|
|
368
368
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
369
369
|
} catch {
|
|
370
370
|
return !1;
|
|
371
371
|
}
|
|
372
|
-
},
|
|
373
|
-
function
|
|
372
|
+
}, we = j("Date"), Te = j("File"), Ee = (e) => !!(e && e.uri !== void 0), De = (e) => e && e.getParts !== void 0, Oe = j("Blob"), ke = j("FileList"), Ae = (e) => I(e) && F(e.pipe);
|
|
373
|
+
function je() {
|
|
374
374
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
375
375
|
}
|
|
376
|
-
var
|
|
376
|
+
var Me = je(), Ne = Me.FormData === void 0 ? void 0 : Me.FormData, Pe = (e) => {
|
|
377
377
|
let t;
|
|
378
|
-
return e && (
|
|
379
|
-
},
|
|
378
|
+
return e && (Ne && e instanceof Ne || F(e.append) && ((t = he(e)) === "formdata" || t === "object" && F(e.toString) && e.toString() === "[object FormData]"));
|
|
379
|
+
}, Fe = j("URLSearchParams"), [Ie, Le, Re, ze] = [
|
|
380
380
|
"ReadableStream",
|
|
381
381
|
"Request",
|
|
382
382
|
"Response",
|
|
383
383
|
"Headers"
|
|
384
|
-
].map(
|
|
385
|
-
function
|
|
384
|
+
].map(j), Be = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
385
|
+
function L(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
386
386
|
if (e == null) return;
|
|
387
387
|
let r, i;
|
|
388
|
-
if (typeof e != "object" && (e = [e]),
|
|
388
|
+
if (typeof e != "object" && (e = [e]), M(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
389
389
|
else {
|
|
390
|
-
if (
|
|
390
|
+
if (P(e)) return;
|
|
391
391
|
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
392
392
|
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
395
|
+
function Ve(e, t) {
|
|
396
|
+
if (P(e)) return null;
|
|
397
397
|
t = t.toLowerCase();
|
|
398
398
|
let n = Object.keys(e), r = n.length, i;
|
|
399
399
|
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
400
400
|
return null;
|
|
401
401
|
}
|
|
402
|
-
var
|
|
403
|
-
function
|
|
404
|
-
let { caseless: e, skipUndefined: t } =
|
|
402
|
+
var R = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, He = (e) => !N(e) && e !== R;
|
|
403
|
+
function Ue() {
|
|
404
|
+
let { caseless: e, skipUndefined: t } = He(this) && this || {}, n = {}, r = (r, i) => {
|
|
405
405
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
406
|
-
let a = e &&
|
|
407
|
-
|
|
406
|
+
let a = e && Ve(n, i) || i;
|
|
407
|
+
Se(n[a]) && Se(r) ? n[a] = Ue(n[a], r) : Se(r) ? n[a] = Ue({}, r) : M(r) ? n[a] = r.slice() : (!t || !N(r)) && (n[a] = r);
|
|
408
408
|
};
|
|
409
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] &&
|
|
409
|
+
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && L(arguments[e], r);
|
|
410
410
|
return n;
|
|
411
411
|
}
|
|
412
|
-
var
|
|
413
|
-
n &&
|
|
412
|
+
var We = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (t, r) => {
|
|
413
|
+
n && F(t) ? Object.defineProperty(e, r, {
|
|
414
414
|
value: ue(t, n),
|
|
415
415
|
writable: !0,
|
|
416
416
|
enumerable: !0,
|
|
@@ -421,14 +421,14 @@ var Ue = (e, t, n, { allOwnKeys: r } = {}) => (R(t, (t, r) => {
|
|
|
421
421
|
enumerable: !0,
|
|
422
422
|
configurable: !0
|
|
423
423
|
});
|
|
424
|
-
}, { allOwnKeys: r }), e),
|
|
424
|
+
}, { allOwnKeys: r }), e), Ge = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ke = (e, t, n, r) => {
|
|
425
425
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
426
426
|
value: e,
|
|
427
427
|
writable: !0,
|
|
428
428
|
enumerable: !1,
|
|
429
429
|
configurable: !0
|
|
430
430
|
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
431
|
-
},
|
|
431
|
+
}, qe = (e, t, n, r) => {
|
|
432
432
|
let i, a, o, s = {};
|
|
433
433
|
if (t ||= {}, e == null) return t;
|
|
434
434
|
do {
|
|
@@ -436,45 +436,45 @@ var Ue = (e, t, n, { allOwnKeys: r } = {}) => (R(t, (t, r) => {
|
|
|
436
436
|
e = n !== !1 && fe(e);
|
|
437
437
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
438
438
|
return t;
|
|
439
|
-
},
|
|
439
|
+
}, Je = (e, t, n) => {
|
|
440
440
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
441
441
|
let r = e.indexOf(t, n);
|
|
442
442
|
return r !== -1 && r === n;
|
|
443
|
-
},
|
|
443
|
+
}, Ye = (e) => {
|
|
444
444
|
if (!e) return null;
|
|
445
|
-
if (
|
|
445
|
+
if (M(e)) return e;
|
|
446
446
|
let t = e.length;
|
|
447
|
-
if (!
|
|
447
|
+
if (!be(t)) return null;
|
|
448
448
|
let n = Array(t);
|
|
449
449
|
for (; t-- > 0;) n[t] = e[t];
|
|
450
450
|
return n;
|
|
451
|
-
},
|
|
452
|
-
let n = (e && e[
|
|
451
|
+
}, Xe = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && fe(Uint8Array)), Ze = (e, t) => {
|
|
452
|
+
let n = (e && e[pe]).call(e), r;
|
|
453
453
|
for (; (r = n.next()) && !r.done;) {
|
|
454
454
|
let n = r.value;
|
|
455
455
|
t.call(e, n[0], n[1]);
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, Qe = (e, t) => {
|
|
458
458
|
let n, r = [];
|
|
459
459
|
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
460
460
|
return r;
|
|
461
|
-
},
|
|
461
|
+
}, $e = j("HTMLFormElement"), et = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
462
462
|
return t.toUpperCase() + n;
|
|
463
|
-
}),
|
|
463
|
+
}), tt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), nt = j("RegExp"), rt = (e, t) => {
|
|
464
464
|
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
465
|
-
|
|
465
|
+
L(n, (n, i) => {
|
|
466
466
|
let a;
|
|
467
467
|
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
468
468
|
}), Object.defineProperties(e, r);
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
if (
|
|
469
|
+
}, it = (e) => {
|
|
470
|
+
rt(e, (t, n) => {
|
|
471
|
+
if (F(e) && [
|
|
472
472
|
"arguments",
|
|
473
473
|
"caller",
|
|
474
474
|
"callee"
|
|
475
475
|
].indexOf(n) !== -1) return !1;
|
|
476
476
|
let r = e[n];
|
|
477
|
-
if (
|
|
477
|
+
if (F(r)) {
|
|
478
478
|
if (t.enumerable = !1, "writable" in t) {
|
|
479
479
|
t.writable = !1;
|
|
480
480
|
return;
|
|
@@ -484,99 +484,99 @@ var Ue = (e, t, n, { allOwnKeys: r } = {}) => (R(t, (t, r) => {
|
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
|
-
},
|
|
487
|
+
}, at = (e, t) => {
|
|
488
488
|
let n = {}, r = (e) => {
|
|
489
489
|
e.forEach((e) => {
|
|
490
490
|
n[e] = !0;
|
|
491
491
|
});
|
|
492
492
|
};
|
|
493
|
-
return
|
|
494
|
-
},
|
|
495
|
-
function
|
|
496
|
-
return !!(e &&
|
|
493
|
+
return M(e) ? r(e) : r(String(e).split(t)), n;
|
|
494
|
+
}, ot = () => {}, st = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
|
+
function ct(e) {
|
|
496
|
+
return !!(e && F(e.append) && e[me] === "FormData" && e[pe]);
|
|
497
497
|
}
|
|
498
|
-
var
|
|
498
|
+
var lt = (e) => {
|
|
499
499
|
let t = Array(10), n = (e, r) => {
|
|
500
|
-
if (
|
|
500
|
+
if (I(e)) {
|
|
501
501
|
if (t.indexOf(e) >= 0) return;
|
|
502
|
-
if (
|
|
502
|
+
if (P(e)) return e;
|
|
503
503
|
if (!("toJSON" in e)) {
|
|
504
504
|
t[r] = e;
|
|
505
|
-
let i =
|
|
506
|
-
return
|
|
505
|
+
let i = M(e) ? [] : {};
|
|
506
|
+
return L(e, (e, t) => {
|
|
507
507
|
let a = n(e, r + 1);
|
|
508
|
-
!
|
|
508
|
+
!N(a) && (i[t] = a);
|
|
509
509
|
}), t[r] = void 0, i;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
return e;
|
|
513
513
|
};
|
|
514
514
|
return n(e, 0);
|
|
515
|
-
},
|
|
516
|
-
n ===
|
|
515
|
+
}, ut = j("AsyncFunction"), dt = (e) => e && (I(e) || F(e)) && F(e.then) && F(e.catch), ft = ((e, t) => e ? setImmediate : t ? ((e, t) => (R.addEventListener("message", ({ source: n, data: r }) => {
|
|
516
|
+
n === R && r === e && t.length && t.shift()();
|
|
517
517
|
}, !1), (n) => {
|
|
518
|
-
t.push(n),
|
|
519
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function",
|
|
520
|
-
isArray:
|
|
521
|
-
isArrayBuffer:
|
|
522
|
-
isBuffer:
|
|
523
|
-
isFormData:
|
|
524
|
-
isArrayBufferView:
|
|
525
|
-
isString:
|
|
526
|
-
isNumber:
|
|
527
|
-
isBoolean:
|
|
528
|
-
isObject:
|
|
529
|
-
isPlainObject:
|
|
530
|
-
isEmptyObject:
|
|
531
|
-
isReadableStream:
|
|
532
|
-
isRequest:
|
|
533
|
-
isResponse:
|
|
534
|
-
isHeaders:
|
|
535
|
-
isUndefined:
|
|
536
|
-
isDate:
|
|
537
|
-
isFile:
|
|
538
|
-
isReactNativeBlob:
|
|
539
|
-
isReactNative:
|
|
540
|
-
isBlob:
|
|
541
|
-
isRegExp:
|
|
542
|
-
isFunction:
|
|
543
|
-
isStream:
|
|
544
|
-
isURLSearchParams:
|
|
545
|
-
isTypedArray:
|
|
546
|
-
isFileList:
|
|
547
|
-
forEach:
|
|
548
|
-
merge:
|
|
549
|
-
extend:
|
|
550
|
-
trim:
|
|
551
|
-
stripBOM:
|
|
552
|
-
inherits:
|
|
553
|
-
toFlatObject:
|
|
554
|
-
kindOf:
|
|
555
|
-
kindOfTest:
|
|
556
|
-
endsWith:
|
|
557
|
-
toArray:
|
|
558
|
-
forEachEntry:
|
|
559
|
-
matchAll:
|
|
560
|
-
isHTMLForm:
|
|
561
|
-
hasOwnProperty:
|
|
562
|
-
hasOwnProp:
|
|
563
|
-
reduceDescriptors:
|
|
564
|
-
freezeMethods:
|
|
565
|
-
toObjectSet:
|
|
566
|
-
toCamelCase:
|
|
567
|
-
noop:
|
|
568
|
-
toFiniteNumber:
|
|
569
|
-
findKey:
|
|
570
|
-
global:
|
|
571
|
-
isContextDefined:
|
|
572
|
-
isSpecCompliantForm:
|
|
573
|
-
toJSONObject:
|
|
574
|
-
isAsyncFn:
|
|
575
|
-
isThenable:
|
|
576
|
-
setImmediate:
|
|
577
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
578
|
-
isIterable: (e) => e != null &&
|
|
579
|
-
},
|
|
518
|
+
t.push(n), R.postMessage(e, "*");
|
|
519
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", F(R.postMessage)), z = {
|
|
520
|
+
isArray: M,
|
|
521
|
+
isArrayBuffer: _e,
|
|
522
|
+
isBuffer: P,
|
|
523
|
+
isFormData: Pe,
|
|
524
|
+
isArrayBufferView: ve,
|
|
525
|
+
isString: ye,
|
|
526
|
+
isNumber: be,
|
|
527
|
+
isBoolean: xe,
|
|
528
|
+
isObject: I,
|
|
529
|
+
isPlainObject: Se,
|
|
530
|
+
isEmptyObject: Ce,
|
|
531
|
+
isReadableStream: Ie,
|
|
532
|
+
isRequest: Le,
|
|
533
|
+
isResponse: Re,
|
|
534
|
+
isHeaders: ze,
|
|
535
|
+
isUndefined: N,
|
|
536
|
+
isDate: we,
|
|
537
|
+
isFile: Te,
|
|
538
|
+
isReactNativeBlob: Ee,
|
|
539
|
+
isReactNative: De,
|
|
540
|
+
isBlob: Oe,
|
|
541
|
+
isRegExp: nt,
|
|
542
|
+
isFunction: F,
|
|
543
|
+
isStream: Ae,
|
|
544
|
+
isURLSearchParams: Fe,
|
|
545
|
+
isTypedArray: Xe,
|
|
546
|
+
isFileList: ke,
|
|
547
|
+
forEach: L,
|
|
548
|
+
merge: Ue,
|
|
549
|
+
extend: We,
|
|
550
|
+
trim: Be,
|
|
551
|
+
stripBOM: Ge,
|
|
552
|
+
inherits: Ke,
|
|
553
|
+
toFlatObject: qe,
|
|
554
|
+
kindOf: he,
|
|
555
|
+
kindOfTest: j,
|
|
556
|
+
endsWith: Je,
|
|
557
|
+
toArray: Ye,
|
|
558
|
+
forEachEntry: Ze,
|
|
559
|
+
matchAll: Qe,
|
|
560
|
+
isHTMLForm: $e,
|
|
561
|
+
hasOwnProperty: tt,
|
|
562
|
+
hasOwnProp: tt,
|
|
563
|
+
reduceDescriptors: rt,
|
|
564
|
+
freezeMethods: it,
|
|
565
|
+
toObjectSet: at,
|
|
566
|
+
toCamelCase: et,
|
|
567
|
+
noop: ot,
|
|
568
|
+
toFiniteNumber: st,
|
|
569
|
+
findKey: Ve,
|
|
570
|
+
global: R,
|
|
571
|
+
isContextDefined: He,
|
|
572
|
+
isSpecCompliantForm: ct,
|
|
573
|
+
toJSONObject: lt,
|
|
574
|
+
isAsyncFn: ut,
|
|
575
|
+
isThenable: dt,
|
|
576
|
+
setImmediate: ft,
|
|
577
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(R) : typeof process < "u" && process.nextTick || ft,
|
|
578
|
+
isIterable: (e) => e != null && F(e[pe])
|
|
579
|
+
}, B = class e extends Error {
|
|
580
580
|
static from(t, n, r, i, a, o) {
|
|
581
581
|
let s = new e(t.message, n || t.code, r, i, a);
|
|
582
582
|
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
@@ -599,75 +599,75 @@ var ct = (e) => {
|
|
|
599
599
|
lineNumber: this.lineNumber,
|
|
600
600
|
columnNumber: this.columnNumber,
|
|
601
601
|
stack: this.stack,
|
|
602
|
-
config:
|
|
602
|
+
config: z.toJSONObject(this.config),
|
|
603
603
|
code: this.code,
|
|
604
604
|
status: this.status
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
607
|
};
|
|
608
|
-
|
|
608
|
+
B.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", B.ERR_BAD_OPTION = "ERR_BAD_OPTION", B.ECONNABORTED = "ECONNABORTED", B.ETIMEDOUT = "ETIMEDOUT", B.ERR_NETWORK = "ERR_NETWORK", B.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", B.ERR_DEPRECATED = "ERR_DEPRECATED", B.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", B.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", B.ERR_CANCELED = "ERR_CANCELED", B.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", B.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
609
609
|
//#endregion
|
|
610
610
|
//#region node_modules/axios/lib/helpers/toFormData.js
|
|
611
|
-
function ft(e) {
|
|
612
|
-
return B.isPlainObject(e) || B.isArray(e);
|
|
613
|
-
}
|
|
614
611
|
function pt(e) {
|
|
615
|
-
return
|
|
612
|
+
return z.isPlainObject(e) || z.isArray(e);
|
|
613
|
+
}
|
|
614
|
+
function mt(e) {
|
|
615
|
+
return z.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function ht(e, t, n) {
|
|
618
618
|
return e ? e.concat(t).map(function(e, t) {
|
|
619
|
-
return e =
|
|
619
|
+
return e = mt(e), !n && t ? "[" + e + "]" : e;
|
|
620
620
|
}).join(n ? "." : "") : t;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function gt(e) {
|
|
623
|
+
return z.isArray(e) && !e.some(pt);
|
|
624
624
|
}
|
|
625
|
-
var
|
|
625
|
+
var _t = z.toFlatObject(z, {}, null, function(e) {
|
|
626
626
|
return /^is[A-Z]/.test(e);
|
|
627
627
|
});
|
|
628
|
-
function
|
|
629
|
-
if (!
|
|
630
|
-
t ||= new FormData(), n =
|
|
628
|
+
function V(e, t, n) {
|
|
629
|
+
if (!z.isObject(e)) throw TypeError("target must be an object");
|
|
630
|
+
t ||= new FormData(), n = z.toFlatObject(n, {
|
|
631
631
|
metaTokens: !0,
|
|
632
632
|
dots: !1,
|
|
633
633
|
indexes: !1
|
|
634
634
|
}, !1, function(e, t) {
|
|
635
|
-
return !
|
|
635
|
+
return !z.isUndefined(t[e]);
|
|
636
636
|
});
|
|
637
|
-
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) &&
|
|
638
|
-
if (!
|
|
637
|
+
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && z.isSpecCompliantForm(t);
|
|
638
|
+
if (!z.isFunction(i)) throw TypeError("visitor must be a function");
|
|
639
639
|
function c(e) {
|
|
640
640
|
if (e === null) return "";
|
|
641
|
-
if (
|
|
642
|
-
if (
|
|
643
|
-
if (!s &&
|
|
644
|
-
return
|
|
641
|
+
if (z.isDate(e)) return e.toISOString();
|
|
642
|
+
if (z.isBoolean(e)) return e.toString();
|
|
643
|
+
if (!s && z.isBlob(e)) throw new B("Blob is not supported. Use a Buffer instead.");
|
|
644
|
+
return z.isArrayBuffer(e) || z.isTypedArray(e) ? s && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
645
645
|
}
|
|
646
646
|
function l(e, n, i) {
|
|
647
647
|
let s = e;
|
|
648
|
-
if (
|
|
648
|
+
if (z.isReactNative(t) && z.isReactNativeBlob(e)) return t.append(ht(i, n, a), c(e)), !1;
|
|
649
649
|
if (e && !i && typeof e == "object") {
|
|
650
|
-
if (
|
|
651
|
-
else if (
|
|
652
|
-
!(
|
|
650
|
+
if (z.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
651
|
+
else if (z.isArray(e) && gt(e) || (z.isFileList(e) || z.endsWith(n, "[]")) && (s = z.toArray(e))) return n = mt(n), s.forEach(function(e, r) {
|
|
652
|
+
!(z.isUndefined(e) || e === null) && t.append(o === !0 ? ht([n], r, a) : o === null ? n : n + "[]", c(e));
|
|
653
653
|
}), !1;
|
|
654
654
|
}
|
|
655
|
-
return
|
|
655
|
+
return pt(e) ? !0 : (t.append(ht(i, n, a), c(e)), !1);
|
|
656
656
|
}
|
|
657
|
-
let u = [], d = Object.assign(
|
|
657
|
+
let u = [], d = Object.assign(_t, {
|
|
658
658
|
defaultVisitor: l,
|
|
659
659
|
convertValue: c,
|
|
660
|
-
isVisitable:
|
|
660
|
+
isVisitable: pt
|
|
661
661
|
});
|
|
662
662
|
function f(e, n) {
|
|
663
|
-
if (!
|
|
663
|
+
if (!z.isUndefined(e)) {
|
|
664
664
|
if (u.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
665
|
-
u.push(e),
|
|
666
|
-
(!(
|
|
665
|
+
u.push(e), z.forEach(e, function(e, r) {
|
|
666
|
+
(!(z.isUndefined(e) || e === null) && i.call(t, e, z.isString(r) ? r.trim() : r, n, d)) === !0 && f(e, n ? n.concat(r) : [r]);
|
|
667
667
|
}), u.pop();
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
if (!
|
|
670
|
+
if (!z.isObject(e)) throw TypeError("data must be an object");
|
|
671
671
|
return f(e), t;
|
|
672
672
|
}
|
|
673
673
|
//#endregion
|
|
@@ -687,7 +687,7 @@ function vt(e) {
|
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
689
|
function yt(e, t) {
|
|
690
|
-
this._pairs = [], e &&
|
|
690
|
+
this._pairs = [], e && V(e, this, t);
|
|
691
691
|
}
|
|
692
692
|
var bt = yt.prototype;
|
|
693
693
|
bt.append = function(e, t) {
|
|
@@ -707,8 +707,8 @@ function xt(e) {
|
|
|
707
707
|
}
|
|
708
708
|
function St(e, t, n) {
|
|
709
709
|
if (!t) return e;
|
|
710
|
-
let r = n && n.encode || xt, i =
|
|
711
|
-
if (o = a ? a(t, i) :
|
|
710
|
+
let r = n && n.encode || xt, i = z.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
711
|
+
if (o = a ? a(t, i) : z.isURLSearchParams(t) ? t.toString() : new yt(t, i).toString(r), o) {
|
|
712
712
|
let t = e.indexOf("#");
|
|
713
713
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
714
714
|
}
|
|
@@ -735,7 +735,7 @@ var Ct = class {
|
|
|
735
735
|
this.handlers &&= [];
|
|
736
736
|
}
|
|
737
737
|
forEach(e) {
|
|
738
|
-
|
|
738
|
+
z.forEach(this.handlers, function(t) {
|
|
739
739
|
t !== null && e(t);
|
|
740
740
|
});
|
|
741
741
|
}
|
|
@@ -776,9 +776,9 @@ var Ct = class {
|
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
778
778
|
function Mt(e, t) {
|
|
779
|
-
return
|
|
779
|
+
return V(e, new H.classes.URLSearchParams(), {
|
|
780
780
|
visitor: function(e, t, n, r) {
|
|
781
|
-
return H.isNode &&
|
|
781
|
+
return H.isNode && z.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
782
782
|
},
|
|
783
783
|
...t
|
|
784
784
|
});
|
|
@@ -786,7 +786,7 @@ function Mt(e, t) {
|
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region node_modules/axios/lib/helpers/formDataToJSON.js
|
|
788
788
|
function Nt(e) {
|
|
789
|
-
return
|
|
789
|
+
return z.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
790
790
|
}
|
|
791
791
|
function Pt(e) {
|
|
792
792
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
@@ -798,11 +798,11 @@ function Ft(e) {
|
|
|
798
798
|
let a = e[i++];
|
|
799
799
|
if (a === "__proto__") return !0;
|
|
800
800
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
801
|
-
return a = !a &&
|
|
801
|
+
return a = !a && z.isArray(r) ? r.length : a, s ? (z.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !z.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && z.isArray(r[a]) && (r[a] = Pt(r[a])), !o);
|
|
802
802
|
}
|
|
803
|
-
if (
|
|
803
|
+
if (z.isFormData(e) && z.isFunction(e.entries)) {
|
|
804
804
|
let n = {};
|
|
805
|
-
return
|
|
805
|
+
return z.forEachEntry(e, (e, r) => {
|
|
806
806
|
t(Nt(e), r, n, 0);
|
|
807
807
|
}), n;
|
|
808
808
|
}
|
|
@@ -811,8 +811,8 @@ function Ft(e) {
|
|
|
811
811
|
//#endregion
|
|
812
812
|
//#region node_modules/axios/lib/defaults/index.js
|
|
813
813
|
function It(e, t, n) {
|
|
814
|
-
if (
|
|
815
|
-
return (t || JSON.parse)(e),
|
|
814
|
+
if (z.isString(e)) try {
|
|
815
|
+
return (t || JSON.parse)(e), z.trim(e);
|
|
816
816
|
} catch (e) {
|
|
817
817
|
if (e.name !== "SyntaxError") throw e;
|
|
818
818
|
}
|
|
@@ -826,30 +826,30 @@ var U = {
|
|
|
826
826
|
"fetch"
|
|
827
827
|
],
|
|
828
828
|
transformRequest: [function(e, t) {
|
|
829
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i =
|
|
830
|
-
if (i &&
|
|
831
|
-
if (
|
|
832
|
-
if (
|
|
833
|
-
if (
|
|
829
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = z.isObject(e);
|
|
830
|
+
if (i && z.isHTMLForm(e) && (e = new FormData(e)), z.isFormData(e)) return r ? JSON.stringify(Ft(e)) : e;
|
|
831
|
+
if (z.isArrayBuffer(e) || z.isBuffer(e) || z.isStream(e) || z.isFile(e) || z.isBlob(e) || z.isReadableStream(e)) return e;
|
|
832
|
+
if (z.isArrayBufferView(e)) return e.buffer;
|
|
833
|
+
if (z.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
834
834
|
let a;
|
|
835
835
|
if (i) {
|
|
836
836
|
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Mt(e, this.formSerializer).toString();
|
|
837
|
-
if ((a =
|
|
837
|
+
if ((a = z.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
838
838
|
let t = this.env && this.env.FormData;
|
|
839
|
-
return
|
|
839
|
+
return V(a ? { "files[]": e } : e, t && new t(), this.formSerializer);
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
842
|
return i || r ? (t.setContentType("application/json", !1), It(e)) : e;
|
|
843
843
|
}],
|
|
844
844
|
transformResponse: [function(e) {
|
|
845
845
|
let t = this.transitional || U.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
846
|
-
if (
|
|
847
|
-
if (e &&
|
|
846
|
+
if (z.isResponse(e) || z.isReadableStream(e)) return e;
|
|
847
|
+
if (e && z.isString(e) && (n && !this.responseType || r)) {
|
|
848
848
|
let n = !(t && t.silentJSONParsing) && r;
|
|
849
849
|
try {
|
|
850
850
|
return JSON.parse(e, this.parseReviver);
|
|
851
851
|
} catch (e) {
|
|
852
|
-
if (n) throw e.name === "SyntaxError" ?
|
|
852
|
+
if (n) throw e.name === "SyntaxError" ? B.from(e, B.ERR_BAD_RESPONSE, this, null, this.response) : e;
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
return e;
|
|
@@ -871,7 +871,7 @@ var U = {
|
|
|
871
871
|
"Content-Type": void 0
|
|
872
872
|
} }
|
|
873
873
|
};
|
|
874
|
-
|
|
874
|
+
z.forEach([
|
|
875
875
|
"delete",
|
|
876
876
|
"get",
|
|
877
877
|
"head",
|
|
@@ -883,7 +883,7 @@ B.forEach([
|
|
|
883
883
|
});
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region node_modules/axios/lib/helpers/parseHeaders.js
|
|
886
|
-
var Lt =
|
|
886
|
+
var Lt = z.toObjectSet([
|
|
887
887
|
"age",
|
|
888
888
|
"authorization",
|
|
889
889
|
"content-length",
|
|
@@ -911,7 +911,7 @@ function W(e) {
|
|
|
911
911
|
return e && String(e).trim().toLowerCase();
|
|
912
912
|
}
|
|
913
913
|
function Bt(e) {
|
|
914
|
-
return e === !1 || e == null ? e :
|
|
914
|
+
return e === !1 || e == null ? e : z.isArray(e) ? e.map(Bt) : String(e);
|
|
915
915
|
}
|
|
916
916
|
function Vt(e) {
|
|
917
917
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
@@ -920,17 +920,17 @@ function Vt(e) {
|
|
|
920
920
|
}
|
|
921
921
|
var Ht = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
922
922
|
function Ut(e, t, n, r, i) {
|
|
923
|
-
if (
|
|
924
|
-
if (i && (t = n),
|
|
925
|
-
if (
|
|
926
|
-
if (
|
|
923
|
+
if (z.isFunction(r)) return r.call(this, t, n);
|
|
924
|
+
if (i && (t = n), z.isString(t)) {
|
|
925
|
+
if (z.isString(r)) return t.indexOf(r) !== -1;
|
|
926
|
+
if (z.isRegExp(r)) return r.test(t);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
929
|
function Wt(e) {
|
|
930
930
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
931
931
|
}
|
|
932
932
|
function Gt(e, t) {
|
|
933
|
-
let n =
|
|
933
|
+
let n = z.toCamelCase(" " + t);
|
|
934
934
|
[
|
|
935
935
|
"get",
|
|
936
936
|
"set",
|
|
@@ -953,17 +953,17 @@ var G = class {
|
|
|
953
953
|
function i(e, t, n) {
|
|
954
954
|
let i = W(t);
|
|
955
955
|
if (!i) throw Error("header name must be a non-empty string");
|
|
956
|
-
let a =
|
|
956
|
+
let a = z.findKey(r, i);
|
|
957
957
|
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = Bt(e));
|
|
958
958
|
}
|
|
959
|
-
let a = (e, t) =>
|
|
960
|
-
if (
|
|
961
|
-
else if (
|
|
962
|
-
else if (
|
|
959
|
+
let a = (e, t) => z.forEach(e, (e, n) => i(e, n, t));
|
|
960
|
+
if (z.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
961
|
+
else if (z.isString(e) && (e = e.trim()) && !Ht(e)) a(Rt(e), t);
|
|
962
|
+
else if (z.isObject(e) && z.isIterable(e)) {
|
|
963
963
|
let n = {}, r, i;
|
|
964
964
|
for (let t of e) {
|
|
965
|
-
if (!
|
|
966
|
-
n[i = t[0]] = (r = n[i]) ?
|
|
965
|
+
if (!z.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
966
|
+
n[i = t[0]] = (r = n[i]) ? z.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
967
967
|
}
|
|
968
968
|
a(n, t);
|
|
969
969
|
} else e != null && i(t, e, n);
|
|
@@ -971,20 +971,20 @@ var G = class {
|
|
|
971
971
|
}
|
|
972
972
|
get(e, t) {
|
|
973
973
|
if (e = W(e), e) {
|
|
974
|
-
let n =
|
|
974
|
+
let n = z.findKey(this, e);
|
|
975
975
|
if (n) {
|
|
976
976
|
let e = this[n];
|
|
977
977
|
if (!t) return e;
|
|
978
978
|
if (t === !0) return Vt(e);
|
|
979
|
-
if (
|
|
980
|
-
if (
|
|
979
|
+
if (z.isFunction(t)) return t.call(this, e, n);
|
|
980
|
+
if (z.isRegExp(t)) return t.exec(e);
|
|
981
981
|
throw TypeError("parser must be boolean|regexp|function");
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
has(e, t) {
|
|
986
986
|
if (e = W(e), e) {
|
|
987
|
-
let n =
|
|
987
|
+
let n = z.findKey(this, e);
|
|
988
988
|
return !!(n && this[n] !== void 0 && (!t || Ut(this, this[n], n, t)));
|
|
989
989
|
}
|
|
990
990
|
return !1;
|
|
@@ -993,11 +993,11 @@ var G = class {
|
|
|
993
993
|
let n = this, r = !1;
|
|
994
994
|
function i(e) {
|
|
995
995
|
if (e = W(e), e) {
|
|
996
|
-
let i =
|
|
996
|
+
let i = z.findKey(n, e);
|
|
997
997
|
i && (!t || Ut(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
return
|
|
1000
|
+
return z.isArray(e) ? e.forEach(i) : i(e), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
clear(e) {
|
|
1003
1003
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
@@ -1009,8 +1009,8 @@ var G = class {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
normalize(e) {
|
|
1011
1011
|
let t = this, n = {};
|
|
1012
|
-
return
|
|
1013
|
-
let a =
|
|
1012
|
+
return z.forEach(this, (r, i) => {
|
|
1013
|
+
let a = z.findKey(n, i);
|
|
1014
1014
|
if (a) {
|
|
1015
1015
|
t[a] = Bt(r), delete t[i];
|
|
1016
1016
|
return;
|
|
@@ -1024,8 +1024,8 @@ var G = class {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
toJSON(e) {
|
|
1026
1026
|
let t = Object.create(null);
|
|
1027
|
-
return
|
|
1028
|
-
n != null && n !== !1 && (t[r] = e &&
|
|
1027
|
+
return z.forEach(this, (n, r) => {
|
|
1028
|
+
n != null && n !== !1 && (t[r] = e && z.isArray(n) ? n.join(", ") : n);
|
|
1029
1029
|
}), t;
|
|
1030
1030
|
}
|
|
1031
1031
|
[Symbol.iterator]() {
|
|
@@ -1053,7 +1053,7 @@ var G = class {
|
|
|
1053
1053
|
let r = W(e);
|
|
1054
1054
|
t[r] || (Gt(n, e), t[r] = !0);
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return z.isArray(e) ? e.forEach(r) : r(e), this;
|
|
1057
1057
|
}
|
|
1058
1058
|
};
|
|
1059
1059
|
G.accessor([
|
|
@@ -1063,7 +1063,7 @@ G.accessor([
|
|
|
1063
1063
|
"Accept-Encoding",
|
|
1064
1064
|
"User-Agent",
|
|
1065
1065
|
"Authorization"
|
|
1066
|
-
]),
|
|
1066
|
+
]), z.reduceDescriptors(G.prototype, ({ value: e }, t) => {
|
|
1067
1067
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1068
1068
|
return {
|
|
1069
1069
|
get: () => e,
|
|
@@ -1071,12 +1071,12 @@ G.accessor([
|
|
|
1071
1071
|
this[n] = e;
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
|
-
}),
|
|
1074
|
+
}), z.freezeMethods(G);
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region node_modules/axios/lib/core/transformData.js
|
|
1077
1077
|
function Kt(e, t) {
|
|
1078
1078
|
let n = this || U, r = t || n, i = G.from(r.headers), a = r.data;
|
|
1079
|
-
return
|
|
1079
|
+
return z.forEach(e, function(e) {
|
|
1080
1080
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
1081
1081
|
}), i.normalize(), a;
|
|
1082
1082
|
}
|
|
@@ -1087,16 +1087,16 @@ function qt(e) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
//#endregion
|
|
1089
1089
|
//#region node_modules/axios/lib/cancel/CanceledError.js
|
|
1090
|
-
var K = class extends
|
|
1090
|
+
var K = class extends B {
|
|
1091
1091
|
constructor(e, t, n) {
|
|
1092
|
-
super(e ?? "canceled",
|
|
1092
|
+
super(e ?? "canceled", B.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
//#endregion
|
|
1096
1096
|
//#region node_modules/axios/lib/core/settle.js
|
|
1097
1097
|
function Jt(e, t, n) {
|
|
1098
1098
|
let r = n.config.validateStatus;
|
|
1099
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
1099
|
+
!n.status || !r || r(n.status) ? e(n) : t(new B("Request failed with status code " + n.status, [B.ERR_BAD_REQUEST, B.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
1100
1100
|
}
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region node_modules/axios/lib/helpers/parseProtocol.js
|
|
@@ -1157,11 +1157,11 @@ var Qt = (e, t, n = 3) => {
|
|
|
1157
1157
|
total: e,
|
|
1158
1158
|
loaded: r
|
|
1159
1159
|
}), t[1]];
|
|
1160
|
-
}, en = (e) => (...t) =>
|
|
1160
|
+
}, en = (e) => (...t) => z.asap(() => e(...t)), tn = H.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, H.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(H.origin), H.navigator && /(msie|trident)/i.test(H.navigator.userAgent)) : () => !0, nn = H.hasStandardBrowserEnv ? {
|
|
1161
1161
|
write(e, t, n, r, i, a, o) {
|
|
1162
1162
|
if (typeof document > "u") return;
|
|
1163
1163
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
1164
|
-
|
|
1164
|
+
z.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), z.isString(r) && s.push(`path=${r}`), z.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), z.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
1165
1165
|
},
|
|
1166
1166
|
read(e) {
|
|
1167
1167
|
if (typeof document > "u") return null;
|
|
@@ -1201,18 +1201,18 @@ function q(e, t) {
|
|
|
1201
1201
|
t ||= {};
|
|
1202
1202
|
let n = {};
|
|
1203
1203
|
function r(e, t, n, r) {
|
|
1204
|
-
return
|
|
1204
|
+
return z.isPlainObject(e) && z.isPlainObject(t) ? z.merge.call({ caseless: r }, e, t) : z.isPlainObject(t) ? z.merge({}, t) : z.isArray(t) ? t.slice() : t;
|
|
1205
1205
|
}
|
|
1206
1206
|
function i(e, t, n, i) {
|
|
1207
|
-
if (!
|
|
1208
|
-
if (!
|
|
1207
|
+
if (!z.isUndefined(t)) return r(e, t, n, i);
|
|
1208
|
+
if (!z.isUndefined(e)) return r(void 0, e, n, i);
|
|
1209
1209
|
}
|
|
1210
1210
|
function a(e, t) {
|
|
1211
|
-
if (!
|
|
1211
|
+
if (!z.isUndefined(t)) return r(void 0, t);
|
|
1212
1212
|
}
|
|
1213
1213
|
function o(e, t) {
|
|
1214
|
-
if (!
|
|
1215
|
-
if (!
|
|
1214
|
+
if (!z.isUndefined(t)) return r(void 0, t);
|
|
1215
|
+
if (!z.isUndefined(e)) return r(void 0, e);
|
|
1216
1216
|
}
|
|
1217
1217
|
function s(n, i, a) {
|
|
1218
1218
|
if (a in t) return r(n, i);
|
|
@@ -1249,29 +1249,29 @@ function q(e, t) {
|
|
|
1249
1249
|
validateStatus: s,
|
|
1250
1250
|
headers: (e, t, n) => i(sn(e), sn(t), n, !0)
|
|
1251
1251
|
};
|
|
1252
|
-
return
|
|
1252
|
+
return z.forEach(Object.keys({
|
|
1253
1253
|
...e,
|
|
1254
1254
|
...t
|
|
1255
1255
|
}), function(r) {
|
|
1256
1256
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
1257
|
-
let a =
|
|
1258
|
-
|
|
1257
|
+
let a = z.hasOwnProp(c, r) ? c[r] : i, o = a(e[r], t[r], r);
|
|
1258
|
+
z.isUndefined(o) && a !== s || (n[r] = o);
|
|
1259
1259
|
}), n;
|
|
1260
1260
|
}
|
|
1261
1261
|
//#endregion
|
|
1262
1262
|
//#region node_modules/axios/lib/helpers/resolveConfig.js
|
|
1263
1263
|
var cn = (e) => {
|
|
1264
1264
|
let t = q({}, e), { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = t;
|
|
1265
|
-
if (t.headers = o = G.from(o), t.url = St(on(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))),
|
|
1265
|
+
if (t.headers = o = G.from(o), t.url = St(on(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))), z.isFormData(n)) {
|
|
1266
1266
|
if (H.hasStandardBrowserEnv || H.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
1267
|
-
else if (
|
|
1267
|
+
else if (z.isFunction(n.getHeaders)) {
|
|
1268
1268
|
let e = n.getHeaders(), t = ["content-type", "content-length"];
|
|
1269
1269
|
Object.entries(e).forEach(([e, n]) => {
|
|
1270
1270
|
t.includes(e.toLowerCase()) && o.set(e, n);
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
if (H.hasStandardBrowserEnv && (r &&
|
|
1274
|
+
if (H.hasStandardBrowserEnv && (r && z.isFunction(r) && (r = r(t)), r || r !== !1 && tn(t.url))) {
|
|
1275
1275
|
let e = i && a && nn.read(a);
|
|
1276
1276
|
e && o.set(i, e);
|
|
1277
1277
|
}
|
|
@@ -1303,21 +1303,21 @@ var cn = (e) => {
|
|
|
1303
1303
|
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1304
1304
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1305
1305
|
}, h.onabort = function() {
|
|
1306
|
-
h &&= (n(new
|
|
1306
|
+
h &&= (n(new B("Request aborted", B.ECONNABORTED, e, h)), null);
|
|
1307
1307
|
}, h.onerror = function(t) {
|
|
1308
|
-
let r = new
|
|
1308
|
+
let r = new B(t && t.message ? t.message : "Network Error", B.ERR_NETWORK, e, h);
|
|
1309
1309
|
r.event = t || null, n(r), h = null;
|
|
1310
1310
|
}, h.ontimeout = function() {
|
|
1311
1311
|
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || wt;
|
|
1312
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new
|
|
1313
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
1312
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new B(t, i.clarifyTimeoutError ? B.ETIMEDOUT : B.ECONNABORTED, e, h)), h = null;
|
|
1313
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && z.forEach(a.toJSON(), function(e, t) {
|
|
1314
1314
|
h.setRequestHeader(t, e);
|
|
1315
|
-
}),
|
|
1315
|
+
}), z.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = Qt(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = Qt(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1316
1316
|
h &&= (n(!t || t.type ? new K(null, e, h) : t), h.abort(), null);
|
|
1317
1317
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1318
1318
|
let _ = Yt(r.url);
|
|
1319
1319
|
if (_ && H.protocols.indexOf(_) === -1) {
|
|
1320
|
-
n(new
|
|
1320
|
+
n(new B("Unsupported protocol " + _ + ":", B.ERR_BAD_REQUEST, e));
|
|
1321
1321
|
return;
|
|
1322
1322
|
}
|
|
1323
1323
|
h.send(i || null);
|
|
@@ -1329,10 +1329,10 @@ var cn = (e) => {
|
|
|
1329
1329
|
if (!r) {
|
|
1330
1330
|
r = !0, o();
|
|
1331
1331
|
let t = e instanceof Error ? e : this.reason;
|
|
1332
|
-
n.abort(t instanceof
|
|
1332
|
+
n.abort(t instanceof B ? t : new K(t instanceof Error ? t.message : t));
|
|
1333
1333
|
}
|
|
1334
1334
|
}, a = t && setTimeout(() => {
|
|
1335
|
-
a = null, i(new
|
|
1335
|
+
a = null, i(new B(`timeout of ${t}ms exceeded`, B.ETIMEDOUT));
|
|
1336
1336
|
}, t), o = () => {
|
|
1337
1337
|
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1338
1338
|
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
@@ -1340,7 +1340,7 @@ var cn = (e) => {
|
|
|
1340
1340
|
};
|
|
1341
1341
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1342
1342
|
let { signal: s } = n;
|
|
1343
|
-
return s.unsubscribe = () =>
|
|
1343
|
+
return s.unsubscribe = () => z.asap(o), s;
|
|
1344
1344
|
}
|
|
1345
1345
|
}, dn = function* (e, t) {
|
|
1346
1346
|
let n = e.byteLength;
|
|
@@ -1389,17 +1389,17 @@ var cn = (e) => {
|
|
|
1389
1389
|
return s(e), i.return();
|
|
1390
1390
|
}
|
|
1391
1391
|
}, { highWaterMark: 2 });
|
|
1392
|
-
}, hn = 64 * 1024, { isFunction: gn } =
|
|
1392
|
+
}, hn = 64 * 1024, { isFunction: gn } = z, _n = (({ Request: e, Response: t }) => ({
|
|
1393
1393
|
Request: e,
|
|
1394
1394
|
Response: t
|
|
1395
|
-
}))(
|
|
1395
|
+
}))(z.global), { ReadableStream: vn, TextEncoder: yn } = z.global, bn = (e, ...t) => {
|
|
1396
1396
|
try {
|
|
1397
1397
|
return !!e(...t);
|
|
1398
1398
|
} catch {
|
|
1399
1399
|
return !1;
|
|
1400
1400
|
}
|
|
1401
1401
|
}, xn = (e) => {
|
|
1402
|
-
e =
|
|
1402
|
+
e = z.merge.call({ skipUndefined: !0 }, _n, e);
|
|
1403
1403
|
let { fetch: t, Request: n, Response: r } = e, i = t ? gn(t) : typeof fetch == "function", a = gn(n), o = gn(r);
|
|
1404
1404
|
if (!i) return !1;
|
|
1405
1405
|
let s = i && gn(vn), c = i && (typeof yn == "function" ? ((e) => (t) => e.encode(t))(new yn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && bn(() => {
|
|
@@ -1411,7 +1411,7 @@ var cn = (e) => {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
}).headers.has("Content-Type");
|
|
1413
1413
|
return e && !t;
|
|
1414
|
-
}), u = o && s && bn(() =>
|
|
1414
|
+
}), u = o && s && bn(() => z.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1415
1415
|
i && [
|
|
1416
1416
|
"text",
|
|
1417
1417
|
"arrayBuffer",
|
|
@@ -1422,19 +1422,19 @@ var cn = (e) => {
|
|
|
1422
1422
|
!d[e] && (d[e] = (t, n) => {
|
|
1423
1423
|
let r = t && t[e];
|
|
1424
1424
|
if (r) return r.call(t);
|
|
1425
|
-
throw new
|
|
1425
|
+
throw new B(`Response type '${e}' is not supported`, B.ERR_NOT_SUPPORT, n);
|
|
1426
1426
|
});
|
|
1427
1427
|
});
|
|
1428
1428
|
let f = async (e) => {
|
|
1429
1429
|
if (e == null) return 0;
|
|
1430
|
-
if (
|
|
1431
|
-
if (
|
|
1430
|
+
if (z.isBlob(e)) return e.size;
|
|
1431
|
+
if (z.isSpecCompliantForm(e)) return (await new n(H.origin, {
|
|
1432
1432
|
method: "POST",
|
|
1433
1433
|
body: e
|
|
1434
1434
|
}).arrayBuffer()).byteLength;
|
|
1435
|
-
if (
|
|
1436
|
-
if (
|
|
1437
|
-
}, p = async (e, t) =>
|
|
1435
|
+
if (z.isArrayBufferView(e) || z.isArrayBuffer(e)) return e.byteLength;
|
|
1436
|
+
if (z.isURLSearchParams(e) && (e += ""), z.isString(e)) return (await c(e)).byteLength;
|
|
1437
|
+
}, p = async (e, t) => z.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1438
1438
|
return async (e) => {
|
|
1439
1439
|
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = cn(e), x = t || fetch;
|
|
1440
1440
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
@@ -1448,12 +1448,12 @@ var cn = (e) => {
|
|
|
1448
1448
|
body: s,
|
|
1449
1449
|
duplex: "half"
|
|
1450
1450
|
}), t;
|
|
1451
|
-
if (
|
|
1451
|
+
if (z.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1452
1452
|
let [t, n] = $t(T, Qt(en(g)));
|
|
1453
1453
|
s = mn(e.body, hn, t, n);
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
|
|
1456
|
+
z.isString(y) || (y = y ? "include" : "omit");
|
|
1457
1457
|
let t = a && "credentials" in n.prototype, c = {
|
|
1458
1458
|
...b,
|
|
1459
1459
|
signal: S,
|
|
@@ -1474,13 +1474,13 @@ var cn = (e) => {
|
|
|
1474
1474
|
].forEach((t) => {
|
|
1475
1475
|
e[t] = f[t];
|
|
1476
1476
|
});
|
|
1477
|
-
let t =
|
|
1477
|
+
let t = z.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && $t(t, Qt(en(h), !0)) || [];
|
|
1478
1478
|
f = new r(mn(f.body, hn, n, () => {
|
|
1479
1479
|
i && i(), w && w();
|
|
1480
1480
|
}), e);
|
|
1481
1481
|
}
|
|
1482
1482
|
_ ||= "text";
|
|
1483
|
-
let ee = await d[
|
|
1483
|
+
let ee = await d[z.findKey(d, _) || "text"](f, e);
|
|
1484
1484
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1485
1485
|
Jt(t, n, {
|
|
1486
1486
|
data: ee,
|
|
@@ -1492,7 +1492,7 @@ var cn = (e) => {
|
|
|
1492
1492
|
});
|
|
1493
1493
|
});
|
|
1494
1494
|
} catch (t) {
|
|
1495
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new
|
|
1495
|
+
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new B("Network Error", B.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : B.from(t, t && t.code, e, C, t && t.response);
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
1498
|
}, Sn = /* @__PURE__ */ new Map(), Cn = (e) => {
|
|
@@ -1512,7 +1512,7 @@ var wn = {
|
|
|
1512
1512
|
xhr: ln,
|
|
1513
1513
|
fetch: { get: Cn }
|
|
1514
1514
|
};
|
|
1515
|
-
|
|
1515
|
+
z.forEach(wn, (e, t) => {
|
|
1516
1516
|
if (e) {
|
|
1517
1517
|
try {
|
|
1518
1518
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1520,20 +1520,20 @@ B.forEach(wn, (e, t) => {
|
|
|
1520
1520
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
|
-
var Tn = (e) => `- ${e}`, En = (e) =>
|
|
1523
|
+
var Tn = (e) => `- ${e}`, En = (e) => z.isFunction(e) || e === null || e === !1;
|
|
1524
1524
|
function Dn(e, t) {
|
|
1525
|
-
e =
|
|
1525
|
+
e = z.isArray(e) ? e : [e];
|
|
1526
1526
|
let { length: n } = e, r, i, a = {};
|
|
1527
1527
|
for (let o = 0; o < n; o++) {
|
|
1528
1528
|
r = e[o];
|
|
1529
1529
|
let n;
|
|
1530
|
-
if (i = r, !En(r) && (i = wn[(n = String(r)).toLowerCase()], i === void 0)) throw new
|
|
1531
|
-
if (i && (
|
|
1530
|
+
if (i = r, !En(r) && (i = wn[(n = String(r)).toLowerCase()], i === void 0)) throw new B(`Unknown adapter '${n}'`);
|
|
1531
|
+
if (i && (z.isFunction(i) || (i = i.get(t)))) break;
|
|
1532
1532
|
a[n || "#" + o] = i;
|
|
1533
1533
|
}
|
|
1534
1534
|
if (!i) {
|
|
1535
1535
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1536
|
-
throw new
|
|
1536
|
+
throw new B("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(Tn).join("\n") : " " + Tn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1537
1537
|
}
|
|
1538
1538
|
return i;
|
|
1539
1539
|
}
|
|
@@ -1578,23 +1578,23 @@ Mn.transitional = function(e, t, n) {
|
|
|
1578
1578
|
return "[Axios v" + jn + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1579
1579
|
}
|
|
1580
1580
|
return (n, i, a) => {
|
|
1581
|
-
if (e === !1) throw new
|
|
1581
|
+
if (e === !1) throw new B(r(i, " has been removed" + (t ? " in " + t : "")), B.ERR_DEPRECATED);
|
|
1582
1582
|
return t && !Nn[i] && (Nn[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1583
1583
|
};
|
|
1584
1584
|
}, Mn.spelling = function(e) {
|
|
1585
1585
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1586
1586
|
};
|
|
1587
1587
|
function Pn(e, t, n) {
|
|
1588
|
-
if (typeof e != "object") throw new
|
|
1588
|
+
if (typeof e != "object") throw new B("options must be an object", B.ERR_BAD_OPTION_VALUE);
|
|
1589
1589
|
let r = Object.keys(e), i = r.length;
|
|
1590
1590
|
for (; i-- > 0;) {
|
|
1591
1591
|
let a = r[i], o = t[a];
|
|
1592
1592
|
if (o) {
|
|
1593
1593
|
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1594
|
-
if (n !== !0) throw new
|
|
1594
|
+
if (n !== !0) throw new B("option " + a + " must be " + n, B.ERR_BAD_OPTION_VALUE);
|
|
1595
1595
|
continue;
|
|
1596
1596
|
}
|
|
1597
|
-
if (n !== !0) throw new
|
|
1597
|
+
if (n !== !0) throw new B("Unknown option " + a, B.ERR_BAD_OPTION);
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
var Fn = {
|
|
@@ -1630,15 +1630,15 @@ var Fn = {
|
|
|
1630
1630
|
forcedJSONParsing: J.transitional(J.boolean),
|
|
1631
1631
|
clarifyTimeoutError: J.transitional(J.boolean),
|
|
1632
1632
|
legacyInterceptorReqResOrdering: J.transitional(J.boolean)
|
|
1633
|
-
}, !1), r != null && (
|
|
1633
|
+
}, !1), r != null && (z.isFunction(r) ? t.paramsSerializer = { serialize: r } : Fn.assertOptions(r, {
|
|
1634
1634
|
encode: J.function,
|
|
1635
1635
|
serialize: J.function
|
|
1636
1636
|
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Fn.assertOptions(t, {
|
|
1637
1637
|
baseUrl: J.spelling("baseURL"),
|
|
1638
1638
|
withXsrfToken: J.spelling("withXSRFToken")
|
|
1639
1639
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1640
|
-
let a = i &&
|
|
1641
|
-
i &&
|
|
1640
|
+
let a = i && z.merge(i.common, i[t.method]);
|
|
1641
|
+
i && z.forEach([
|
|
1642
1642
|
"delete",
|
|
1643
1643
|
"get",
|
|
1644
1644
|
"head",
|
|
@@ -1689,7 +1689,7 @@ var Fn = {
|
|
|
1689
1689
|
return e = q(this.defaults, e), St(on(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1690
1690
|
}
|
|
1691
1691
|
};
|
|
1692
|
-
|
|
1692
|
+
z.forEach([
|
|
1693
1693
|
"delete",
|
|
1694
1694
|
"get",
|
|
1695
1695
|
"head",
|
|
@@ -1702,7 +1702,7 @@ B.forEach([
|
|
|
1702
1702
|
data: (n || {}).data
|
|
1703
1703
|
}));
|
|
1704
1704
|
};
|
|
1705
|
-
}),
|
|
1705
|
+
}), z.forEach([
|
|
1706
1706
|
"post",
|
|
1707
1707
|
"put",
|
|
1708
1708
|
"patch"
|
|
@@ -1786,7 +1786,7 @@ function Ln(e) {
|
|
|
1786
1786
|
//#endregion
|
|
1787
1787
|
//#region node_modules/axios/lib/helpers/isAxiosError.js
|
|
1788
1788
|
function Rn(e) {
|
|
1789
|
-
return
|
|
1789
|
+
return z.isObject(e) && e.isAxiosError === !0;
|
|
1790
1790
|
}
|
|
1791
1791
|
//#endregion
|
|
1792
1792
|
//#region node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
@@ -1868,14 +1868,14 @@ Object.entries(zn).forEach(([e, t]) => {
|
|
|
1868
1868
|
//#region node_modules/axios/lib/axios.js
|
|
1869
1869
|
function Bn(e) {
|
|
1870
1870
|
let t = new Y(e), n = ue(Y.prototype.request, t);
|
|
1871
|
-
return
|
|
1871
|
+
return z.extend(n, Y.prototype, t, { allOwnKeys: !0 }), z.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1872
1872
|
return Bn(q(e, t));
|
|
1873
1873
|
}, n;
|
|
1874
1874
|
}
|
|
1875
1875
|
var X = Bn(U);
|
|
1876
|
-
X.Axios = Y, X.CanceledError = K, X.CancelToken = In, X.isCancel = qt, X.VERSION = jn, X.toFormData =
|
|
1876
|
+
X.Axios = Y, X.CanceledError = K, X.CancelToken = In, X.isCancel = qt, X.VERSION = jn, X.toFormData = V, X.AxiosError = B, X.Cancel = X.CanceledError, X.all = function(e) {
|
|
1877
1877
|
return Promise.all(e);
|
|
1878
|
-
}, X.spread = Ln, X.isAxiosError = Rn, X.mergeConfig = q, X.AxiosHeaders = G, X.formToJSON = (e) => Ft(
|
|
1878
|
+
}, X.spread = Ln, X.isAxiosError = Rn, X.mergeConfig = q, X.AxiosHeaders = G, X.formToJSON = (e) => Ft(z.isHTMLForm(e) ? new FormData(e) : e), X.getAdapter = On.getAdapter, X.HttpStatusCode = zn, X.default = X;
|
|
1879
1879
|
//#endregion
|
|
1880
1880
|
//#region src/modules/configs/serviceConfig/ServiceConfig.class.ts
|
|
1881
1881
|
var Vn = class {
|
|
@@ -1925,8 +1925,11 @@ function Kn(e, { serviceConfig: t }) {
|
|
|
1925
1925
|
return new Gn(e, { serviceConfig: t });
|
|
1926
1926
|
}
|
|
1927
1927
|
//#endregion
|
|
1928
|
-
//#region src/modules/messages/
|
|
1929
|
-
var
|
|
1928
|
+
//#region src/modules/messages/enums/MessageAttachmentType.enum.ts
|
|
1929
|
+
var Z = {
|
|
1930
|
+
Documents: "documents",
|
|
1931
|
+
Images: "images"
|
|
1932
|
+
}, qn = ({ axiosInstance: e }) => {
|
|
1930
1933
|
async function t(t, n = {}) {
|
|
1931
1934
|
let i = r(n, [l()]);
|
|
1932
1935
|
return r((await e.get(`/v1/${t}/messages`, { params: i })).data, [A()]);
|
|
@@ -1962,90 +1965,114 @@ var qn = ({ axiosInstance: e }) => {
|
|
|
1962
1965
|
...r,
|
|
1963
1966
|
items: Yn(r.items ?? [], { serviceConfig: e })
|
|
1964
1967
|
};
|
|
1965
|
-
}, Zn =
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
if (
|
|
1969
|
-
|
|
1968
|
+
}, Zn = (e) => {
|
|
1969
|
+
if (e?.threadId) return e.threadId;
|
|
1970
|
+
let { sub: t, iss: n } = e?.contact ?? {};
|
|
1971
|
+
if (t && n) return `${t}:${n}`;
|
|
1972
|
+
throw Error("to.threadId or to.contact.{sub,iss} is required to resolve a storage upload key");
|
|
1973
|
+
}, Qn = async (e, t) => {
|
|
1974
|
+
let { files: n, body: r, ...i } = t, a = oe(n), o = Zn(i.to);
|
|
1975
|
+
if (a.length === 0) throw Error("At least one file is required to send a document message");
|
|
1976
|
+
let s = qn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1970
1977
|
fileName: e.name,
|
|
1971
1978
|
id: `${e.id}`,
|
|
1972
1979
|
mimeType: e.mime,
|
|
1973
1980
|
sizeBytes: `${e.size}`
|
|
1974
1981
|
}));
|
|
1975
|
-
return
|
|
1976
|
-
...
|
|
1977
|
-
document: {
|
|
1982
|
+
return s.sendDocumentMessage({
|
|
1983
|
+
...i,
|
|
1984
|
+
document: {
|
|
1985
|
+
body: r,
|
|
1986
|
+
documents: c
|
|
1987
|
+
}
|
|
1978
1988
|
});
|
|
1979
|
-
},
|
|
1980
|
-
let n =
|
|
1981
|
-
if (
|
|
1982
|
-
|
|
1983
|
-
let i = qn(e), a = (await i.uploadFiles(r, n)).map((e) => ({
|
|
1989
|
+
}, $n = async (e, t) => {
|
|
1990
|
+
let { files: n, body: r, ...i } = t, a = oe(n), o = Zn(i.to);
|
|
1991
|
+
if (a.length === 0) throw Error("At least one file is required to send an image message");
|
|
1992
|
+
let s = qn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1984
1993
|
id: `${e.id}`,
|
|
1985
1994
|
mimeType: e.mime,
|
|
1986
1995
|
name: e.name
|
|
1987
1996
|
}));
|
|
1988
|
-
return
|
|
1989
|
-
...
|
|
1990
|
-
image: {
|
|
1997
|
+
return s.sendImageMessage({
|
|
1998
|
+
...i,
|
|
1999
|
+
image: {
|
|
2000
|
+
body: r,
|
|
2001
|
+
images: c
|
|
2002
|
+
}
|
|
1991
2003
|
});
|
|
1992
|
-
},
|
|
2004
|
+
}, er = async (e, t) => qn(e).sendTextMessage(t);
|
|
1993
2005
|
//#endregion
|
|
1994
2006
|
//#region src/modules/messages/messagesSevice.ts
|
|
1995
|
-
function
|
|
2007
|
+
function tr(e) {
|
|
1996
2008
|
return {
|
|
1997
2009
|
fetchMessageHistory: (t, n) => Xn(e, t, n ?? {}),
|
|
1998
|
-
sendTextMessage: (t) =>
|
|
1999
|
-
sendDocumentMessage: (t) =>
|
|
2000
|
-
sendImageMessage: (t) =>
|
|
2010
|
+
sendTextMessage: (t) => er(e, t),
|
|
2011
|
+
sendDocumentMessage: (t) => Qn(e, t),
|
|
2012
|
+
sendImageMessage: (t) => $n(e, t)
|
|
2001
2013
|
};
|
|
2002
2014
|
}
|
|
2003
2015
|
//#endregion
|
|
2004
2016
|
//#region src/modules/contacts/classes/Contact.class.ts
|
|
2005
|
-
var
|
|
2017
|
+
var nr = class {
|
|
2006
2018
|
_serviceConfig;
|
|
2007
2019
|
sub;
|
|
2008
2020
|
iss;
|
|
2009
2021
|
constructor(e, { serviceConfig: t }) {
|
|
2010
2022
|
Object.assign(this, e), this._serviceConfig = t;
|
|
2011
2023
|
}
|
|
2012
|
-
async
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2024
|
+
async sendMessage({ body: e, attachments: t }, { sendId: n } = {}) {
|
|
2025
|
+
let r = tr(this.serviceConfig), i = { contact: {
|
|
2026
|
+
sub: this.sub,
|
|
2027
|
+
iss: this.iss
|
|
2028
|
+
} };
|
|
2029
|
+
switch (t?.type) {
|
|
2030
|
+
case Z.Images: return r.sendImageMessage({
|
|
2031
|
+
files: t.files,
|
|
2032
|
+
body: e,
|
|
2033
|
+
sendId: n,
|
|
2034
|
+
to: i
|
|
2035
|
+
});
|
|
2036
|
+
case Z.Documents: return r.sendDocumentMessage({
|
|
2037
|
+
files: t.files,
|
|
2038
|
+
body: e,
|
|
2039
|
+
sendId: n,
|
|
2040
|
+
to: i
|
|
2041
|
+
});
|
|
2042
|
+
default: return r.sendTextMessage({
|
|
2043
|
+
body: e ?? "",
|
|
2044
|
+
sendId: n,
|
|
2045
|
+
to: i
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
2021
2048
|
}
|
|
2022
2049
|
get serviceConfig() {
|
|
2023
2050
|
return this._serviceConfig;
|
|
2024
2051
|
}
|
|
2025
2052
|
};
|
|
2026
|
-
function
|
|
2027
|
-
return new
|
|
2053
|
+
function rr(e, { serviceConfig: t }) {
|
|
2054
|
+
return new nr(e, { serviceConfig: t });
|
|
2028
2055
|
}
|
|
2029
2056
|
//#endregion
|
|
2030
2057
|
//#region src/modules/contacts/api/Contacts.api.ts
|
|
2031
|
-
var
|
|
2058
|
+
var ir = ({ axiosInstance: e }) => ({ getContactsList: async (t = {}) => {
|
|
2032
2059
|
let n = r(t, [l()]);
|
|
2033
2060
|
return r((await e.get("/v1/contacts", { params: n })).data, [A()]);
|
|
2034
|
-
} }),
|
|
2035
|
-
let n = await
|
|
2061
|
+
} }), ar = (e) => async (t = {}) => await ir(e).getContactsList(t), or = (e, { serviceConfig: t }) => e.map((e) => rr(e, { serviceConfig: t })), sr = async (e, t = {}) => {
|
|
2062
|
+
let n = await ar(e)(t);
|
|
2036
2063
|
return {
|
|
2037
2064
|
...n,
|
|
2038
|
-
items:
|
|
2065
|
+
items: or(n.items ?? [], { serviceConfig: e })
|
|
2039
2066
|
};
|
|
2040
2067
|
};
|
|
2041
2068
|
//#endregion
|
|
2042
2069
|
//#region src/modules/contacts/contactsSevice.ts
|
|
2043
|
-
function
|
|
2044
|
-
return { fetchContacts: (t) =>
|
|
2070
|
+
function cr(e) {
|
|
2071
|
+
return { fetchContacts: (t) => sr(e, t ?? {}) };
|
|
2045
2072
|
}
|
|
2046
2073
|
//#endregion
|
|
2047
2074
|
//#region node_modules/mitt/dist/mitt.mjs
|
|
2048
|
-
function
|
|
2075
|
+
function lr(e) {
|
|
2049
2076
|
return {
|
|
2050
2077
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
2051
2078
|
on: function(t, n) {
|
|
@@ -2082,51 +2109,52 @@ var Q = {
|
|
|
2082
2109
|
Connected: "connected",
|
|
2083
2110
|
Disconnected: "disconnected",
|
|
2084
2111
|
Error: "error"
|
|
2085
|
-
},
|
|
2112
|
+
}, ur = class {
|
|
2086
2113
|
_serviceConfig;
|
|
2087
2114
|
id;
|
|
2088
2115
|
constructor(e, { serviceConfig: t }) {
|
|
2089
2116
|
Object.assign(this, e), this._serviceConfig = t;
|
|
2090
2117
|
}
|
|
2091
2118
|
async fetchMessageHistory(e) {
|
|
2092
|
-
return
|
|
2093
|
-
}
|
|
2094
|
-
async
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2119
|
+
return tr(this.serviceConfig).fetchMessageHistory(this.id, e);
|
|
2120
|
+
}
|
|
2121
|
+
async sendMessage({ body: e, attachments: t }, { sendId: n } = {}) {
|
|
2122
|
+
let r = tr(this.serviceConfig), i = { threadId: this.id };
|
|
2123
|
+
switch (t?.type) {
|
|
2124
|
+
case Z.Images: return r.sendImageMessage({
|
|
2125
|
+
files: t.files,
|
|
2126
|
+
body: e,
|
|
2127
|
+
sendId: n,
|
|
2128
|
+
to: i
|
|
2129
|
+
});
|
|
2130
|
+
case Z.Documents: return r.sendDocumentMessage({
|
|
2131
|
+
files: t.files,
|
|
2132
|
+
body: e,
|
|
2133
|
+
sendId: n,
|
|
2134
|
+
to: i
|
|
2135
|
+
});
|
|
2136
|
+
default: return r.sendTextMessage({
|
|
2137
|
+
body: e ?? "",
|
|
2138
|
+
sendId: n,
|
|
2139
|
+
to: i
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2114
2142
|
}
|
|
2115
2143
|
get serviceConfig() {
|
|
2116
2144
|
return this._serviceConfig;
|
|
2117
2145
|
}
|
|
2118
2146
|
};
|
|
2119
|
-
function
|
|
2120
|
-
return new
|
|
2147
|
+
function dr(e, { serviceConfig: t }) {
|
|
2148
|
+
return new ur(e, { serviceConfig: t });
|
|
2121
2149
|
}
|
|
2122
2150
|
//#endregion
|
|
2123
2151
|
//#region src/modules/socket/utils/instantiateSocketEventEntities.ts
|
|
2124
|
-
function
|
|
2125
|
-
return e.name === Q.ThreadMessage ? Kn(e.payload, { serviceConfig: t }) :
|
|
2152
|
+
function fr(e, { serviceConfig: t }) {
|
|
2153
|
+
return e.name === Q.ThreadMessage ? Kn(e.payload, { serviceConfig: t }) : dr(e.payload, { serviceConfig: t });
|
|
2126
2154
|
}
|
|
2127
2155
|
//#endregion
|
|
2128
2156
|
//#region src/modules/socket/utils/processSocketEventPayload.ts
|
|
2129
|
-
function
|
|
2157
|
+
function pr(e) {
|
|
2130
2158
|
if (e.connectedEvent) return Q.Connected;
|
|
2131
2159
|
if (e.disconnectedEvent) return Q.Disconnected;
|
|
2132
2160
|
if (e.errorEvent) return Q.Error;
|
|
@@ -2136,7 +2164,7 @@ function dr(e) {
|
|
|
2136
2164
|
if (e.pingEvent) return Q.Ping;
|
|
2137
2165
|
throw Error(`Unknown event: ${JSON.stringify(e)}`);
|
|
2138
2166
|
}
|
|
2139
|
-
function
|
|
2167
|
+
function mr(e, t) {
|
|
2140
2168
|
switch (t) {
|
|
2141
2169
|
case Q.Connected: return e.connectedEvent;
|
|
2142
2170
|
case Q.Disconnected: return e.disconnectedEvent;
|
|
@@ -2147,27 +2175,27 @@ function fr(e, t) {
|
|
|
2147
2175
|
case Q.Ping: return e.pingEvent;
|
|
2148
2176
|
}
|
|
2149
2177
|
}
|
|
2150
|
-
function
|
|
2151
|
-
let n =
|
|
2178
|
+
function hr(e, { serviceConfig: t }) {
|
|
2179
|
+
let n = pr(e);
|
|
2152
2180
|
return {
|
|
2153
2181
|
eventName: n,
|
|
2154
|
-
eventPayload:
|
|
2182
|
+
eventPayload: gr({
|
|
2155
2183
|
name: n,
|
|
2156
|
-
payload:
|
|
2184
|
+
payload: mr(e, n)
|
|
2157
2185
|
}, { serviceConfig: t })
|
|
2158
2186
|
};
|
|
2159
2187
|
}
|
|
2160
|
-
function
|
|
2161
|
-
return e === Q.ThreadMessage || e === Q.ThreadCreated ?
|
|
2188
|
+
function gr({ name: e, payload: t }, { serviceConfig: n }) {
|
|
2189
|
+
return e === Q.ThreadMessage || e === Q.ThreadCreated ? fr({
|
|
2162
2190
|
name: e,
|
|
2163
2191
|
payload: t
|
|
2164
2192
|
}, { serviceConfig: n }) : t;
|
|
2165
2193
|
}
|
|
2166
2194
|
//#endregion
|
|
2167
2195
|
//#region src/modules/socket/classes/ChatsSoketClient.ts
|
|
2168
|
-
var
|
|
2169
|
-
emitter =
|
|
2170
|
-
stateEmitter =
|
|
2196
|
+
var _r = class {
|
|
2197
|
+
emitter = lr();
|
|
2198
|
+
stateEmitter = lr();
|
|
2171
2199
|
socketConfig;
|
|
2172
2200
|
serviceConfig;
|
|
2173
2201
|
ws = null;
|
|
@@ -2191,7 +2219,7 @@ var hr = class {
|
|
|
2191
2219
|
}, this.ws.onclose = () => {
|
|
2192
2220
|
this.setConnectionState($.Disconnected), this.ws = null, t(/* @__PURE__ */ Error("socket disconnected"));
|
|
2193
2221
|
}, this.ws.onmessage = (t) => {
|
|
2194
|
-
let { eventName: n, eventPayload: i } =
|
|
2222
|
+
let { eventName: n, eventPayload: i } = hr(r(JSON.parse(t.data), [A()]).payload, { serviceConfig: this.serviceConfig });
|
|
2195
2223
|
n === Q.Connected && e(), this.emitter.emit(n, i);
|
|
2196
2224
|
};
|
|
2197
2225
|
});
|
|
@@ -2209,30 +2237,30 @@ var hr = class {
|
|
|
2209
2237
|
this.stateEmitter.on(e, t);
|
|
2210
2238
|
}
|
|
2211
2239
|
};
|
|
2212
|
-
function
|
|
2213
|
-
return new
|
|
2240
|
+
function vr({ socketConfig: e, serviceConfig: t }) {
|
|
2241
|
+
return new _r({
|
|
2214
2242
|
socketConfig: e,
|
|
2215
2243
|
serviceConfig: t
|
|
2216
2244
|
});
|
|
2217
2245
|
}
|
|
2218
2246
|
//#endregion
|
|
2219
2247
|
//#region src/modules/threads/api/Threads.api.ts
|
|
2220
|
-
var
|
|
2248
|
+
var yr = ({ axiosInstance: e }) => ({ getThreadsList: async (t = {}) => {
|
|
2221
2249
|
let n = r(t, [l()]);
|
|
2222
2250
|
return r((await e.get("/v1/threads", { params: n })).data, [A()]);
|
|
2223
|
-
} }),
|
|
2224
|
-
let n = await
|
|
2251
|
+
} }), br = (e) => async (t = {}) => await yr(e).getThreadsList(t), xr = (e, { serviceConfig: t }) => e.map((e) => dr(e, { serviceConfig: t })), Sr = async (e, t = {}) => {
|
|
2252
|
+
let n = await br(e)(t);
|
|
2225
2253
|
return {
|
|
2226
2254
|
...n,
|
|
2227
|
-
items:
|
|
2255
|
+
items: xr(n.items ?? [], { serviceConfig: e })
|
|
2228
2256
|
};
|
|
2229
2257
|
};
|
|
2230
2258
|
//#endregion
|
|
2231
2259
|
//#region src/modules/threads/threadsSevice.ts
|
|
2232
|
-
function
|
|
2233
|
-
return { fetchThreads: (t) =>
|
|
2260
|
+
function Cr(e) {
|
|
2261
|
+
return { fetchThreads: (t) => Sr(e, t ?? {}) };
|
|
2234
2262
|
}
|
|
2235
2263
|
//#endregion
|
|
2236
|
-
export { $ as ChatsSocketConnectionStatus, Q as ChatsSocketMessage,
|
|
2264
|
+
export { $ as ChatsSocketConnectionStatus, Q as ChatsSocketMessage, Z as MessageAttachmentType, vr as createChatsSocketClient, Hn as createServiceConfig, Wn as createSocketConfig, le as useAccountService, cr as useContactsService, tr as useMessagesService, Cr as useThreadsService };
|
|
2237
2265
|
|
|
2238
2266
|
//# sourceMappingURL=index.js.map
|