@webitel/chat-web-sdk 0.0.9 → 0.0.11
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 +562 -541
- 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 +48 -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/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/enums/ThreadMemberRole.enum.d.ts +2 -0
- package/dist/modules/threads/enums/ThreadMemberRole.enum.d.ts.map +1 -0
- package/dist/modules/threads/types/Thread.types.d.ts +3 -20
- package/dist/modules/threads/types/Thread.types.d.ts.map +1 -1
- package/dist/modules/threads/utils/addMember.d.ts +8 -0
- package/dist/modules/threads/utils/addMember.d.ts.map +1 -0
- package/dist/modules/threads/utils/removeMember.d.ts +8 -0
- package/dist/modules/threads/utils/removeMember.d.ts.map +1 -0
- 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/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: pe, toStringTag: me } = Symbol,
|
|
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
364
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(me in e) && !(pe in e);
|
|
365
|
-
},
|
|
366
|
-
if (!
|
|
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
|
-
},
|
|
451
|
+
}, Xe = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && fe(Uint8Array)), Ze = (e, t) => {
|
|
452
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,80 +599,80 @@ 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
|
|
674
674
|
//#region node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
675
|
-
function
|
|
675
|
+
function vt(e) {
|
|
676
676
|
let t = {
|
|
677
677
|
"!": "%21",
|
|
678
678
|
"'": "%27",
|
|
@@ -686,29 +686,29 @@ function _t(e) {
|
|
|
686
686
|
return t[e];
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
this._pairs = [], e &&
|
|
689
|
+
function yt(e, t) {
|
|
690
|
+
this._pairs = [], e && V(e, this, t);
|
|
691
691
|
}
|
|
692
|
-
var
|
|
693
|
-
|
|
692
|
+
var bt = yt.prototype;
|
|
693
|
+
bt.append = function(e, t) {
|
|
694
694
|
this._pairs.push([e, t]);
|
|
695
|
-
},
|
|
695
|
+
}, bt.toString = function(e) {
|
|
696
696
|
let t = e ? function(t) {
|
|
697
|
-
return e.call(this, t,
|
|
698
|
-
} :
|
|
697
|
+
return e.call(this, t, vt);
|
|
698
|
+
} : vt;
|
|
699
699
|
return this._pairs.map(function(e) {
|
|
700
700
|
return t(e[0]) + "=" + t(e[1]);
|
|
701
701
|
}, "").join("&");
|
|
702
702
|
};
|
|
703
703
|
//#endregion
|
|
704
704
|
//#region node_modules/axios/lib/helpers/buildURL.js
|
|
705
|
-
function
|
|
705
|
+
function xt(e) {
|
|
706
706
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function St(e, t, n) {
|
|
709
709
|
if (!t) return e;
|
|
710
|
-
let r = n && n.encode ||
|
|
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
|
}
|
|
@@ -716,7 +716,7 @@ function xt(e, t, n) {
|
|
|
716
716
|
}
|
|
717
717
|
//#endregion
|
|
718
718
|
//#region node_modules/axios/lib/core/InterceptorManager.js
|
|
719
|
-
var
|
|
719
|
+
var Ct = class {
|
|
720
720
|
constructor() {
|
|
721
721
|
this.handlers = [];
|
|
722
722
|
}
|
|
@@ -735,19 +735,19 @@ var St = 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
|
}
|
|
742
|
-
},
|
|
742
|
+
}, wt = {
|
|
743
743
|
silentJSONParsing: !0,
|
|
744
744
|
forcedJSONParsing: !0,
|
|
745
745
|
clarifyTimeoutError: !1,
|
|
746
746
|
legacyInterceptorReqResOrdering: !0
|
|
747
|
-
},
|
|
747
|
+
}, Tt = {
|
|
748
748
|
isBrowser: !0,
|
|
749
749
|
classes: {
|
|
750
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
750
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : yt,
|
|
751
751
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
752
752
|
Blob: typeof Blob < "u" ? Blob : null
|
|
753
753
|
},
|
|
@@ -759,97 +759,97 @@ var St = class {
|
|
|
759
759
|
"url",
|
|
760
760
|
"data"
|
|
761
761
|
]
|
|
762
|
-
},
|
|
763
|
-
hasBrowserEnv: () =>
|
|
764
|
-
hasStandardBrowserEnv: () =>
|
|
765
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
766
|
-
navigator: () =>
|
|
767
|
-
origin: () =>
|
|
768
|
-
}),
|
|
762
|
+
}, Et = /* @__PURE__ */ n({
|
|
763
|
+
hasBrowserEnv: () => Dt,
|
|
764
|
+
hasStandardBrowserEnv: () => kt,
|
|
765
|
+
hasStandardBrowserWebWorkerEnv: () => At,
|
|
766
|
+
navigator: () => Ot,
|
|
767
|
+
origin: () => jt
|
|
768
|
+
}), Dt = typeof window < "u" && typeof document < "u", Ot = typeof navigator == "object" && navigator || void 0, kt = Dt && (!Ot || [
|
|
769
769
|
"ReactNative",
|
|
770
770
|
"NativeScript",
|
|
771
771
|
"NS"
|
|
772
|
-
].indexOf(
|
|
773
|
-
...
|
|
774
|
-
...
|
|
772
|
+
].indexOf(Ot.product) < 0), At = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jt = Dt && window.location.href || "http://localhost", H = {
|
|
773
|
+
...Et,
|
|
774
|
+
...Tt
|
|
775
775
|
};
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
778
|
-
function
|
|
779
|
-
return
|
|
778
|
+
function Mt(e, t) {
|
|
779
|
+
return V(e, new H.classes.URLSearchParams(), {
|
|
780
780
|
visitor: function(e, t, n, r) {
|
|
781
|
-
return
|
|
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
|
});
|
|
785
785
|
}
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region node_modules/axios/lib/helpers/formDataToJSON.js
|
|
788
|
-
function Mt(e) {
|
|
789
|
-
return B.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
790
|
-
}
|
|
791
788
|
function Nt(e) {
|
|
789
|
+
return z.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
790
|
+
}
|
|
791
|
+
function Pt(e) {
|
|
792
792
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
793
793
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
794
794
|
return t;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Ft(e) {
|
|
797
797
|
function t(e, n, r, i) {
|
|
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
|
|
806
|
-
t(
|
|
805
|
+
return z.forEachEntry(e, (e, r) => {
|
|
806
|
+
t(Nt(e), r, n, 0);
|
|
807
807
|
}), n;
|
|
808
808
|
}
|
|
809
809
|
return null;
|
|
810
810
|
}
|
|
811
811
|
//#endregion
|
|
812
812
|
//#region node_modules/axios/lib/defaults/index.js
|
|
813
|
-
function
|
|
814
|
-
if (
|
|
815
|
-
return (t || JSON.parse)(e),
|
|
813
|
+
function It(e, t, n) {
|
|
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
|
}
|
|
819
819
|
return (n || JSON.stringify)(e);
|
|
820
820
|
}
|
|
821
|
-
var
|
|
822
|
-
transitional:
|
|
821
|
+
var U = {
|
|
822
|
+
transitional: wt,
|
|
823
823
|
adapter: [
|
|
824
824
|
"xhr",
|
|
825
825
|
"http",
|
|
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
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
837
|
-
if ((a =
|
|
836
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Mt(e, this.formSerializer).toString();
|
|
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
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
842
|
+
return i || r ? (t.setContentType("application/json", !1), It(e)) : e;
|
|
843
843
|
}],
|
|
844
844
|
transformResponse: [function(e) {
|
|
845
|
-
let t = this.transitional ||
|
|
846
|
-
if (
|
|
847
|
-
if (e &&
|
|
845
|
+
let t = this.transitional || U.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
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;
|
|
@@ -860,8 +860,8 @@ var W = {
|
|
|
860
860
|
maxContentLength: -1,
|
|
861
861
|
maxBodyLength: -1,
|
|
862
862
|
env: {
|
|
863
|
-
FormData:
|
|
864
|
-
Blob:
|
|
863
|
+
FormData: H.classes.FormData,
|
|
864
|
+
Blob: H.classes.Blob
|
|
865
865
|
},
|
|
866
866
|
validateStatus: function(e) {
|
|
867
867
|
return e >= 200 && e < 300;
|
|
@@ -871,7 +871,7 @@ var W = {
|
|
|
871
871
|
"Content-Type": void 0
|
|
872
872
|
} }
|
|
873
873
|
};
|
|
874
|
-
|
|
874
|
+
z.forEach([
|
|
875
875
|
"delete",
|
|
876
876
|
"get",
|
|
877
877
|
"head",
|
|
@@ -879,11 +879,11 @@ B.forEach([
|
|
|
879
879
|
"put",
|
|
880
880
|
"patch"
|
|
881
881
|
], (e) => {
|
|
882
|
-
|
|
882
|
+
U.headers[e] = {};
|
|
883
883
|
});
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region node_modules/axios/lib/helpers/parseHeaders.js
|
|
886
|
-
var
|
|
886
|
+
var Lt = z.toObjectSet([
|
|
887
887
|
"age",
|
|
888
888
|
"authorization",
|
|
889
889
|
"content-length",
|
|
@@ -901,36 +901,36 @@ var It = B.toObjectSet([
|
|
|
901
901
|
"referer",
|
|
902
902
|
"retry-after",
|
|
903
903
|
"user-agent"
|
|
904
|
-
]),
|
|
904
|
+
]), Rt = (e) => {
|
|
905
905
|
let t = {}, n, r, i;
|
|
906
906
|
return e && e.split("\n").forEach(function(e) {
|
|
907
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
907
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Lt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
908
908
|
}), t;
|
|
909
|
-
},
|
|
910
|
-
function
|
|
909
|
+
}, zt = Symbol("internals");
|
|
910
|
+
function W(e) {
|
|
911
911
|
return e && String(e).trim().toLowerCase();
|
|
912
912
|
}
|
|
913
|
-
function zt(e) {
|
|
914
|
-
return e === !1 || e == null ? e : B.isArray(e) ? e.map(zt) : String(e);
|
|
915
|
-
}
|
|
916
913
|
function Bt(e) {
|
|
914
|
+
return e === !1 || e == null ? e : z.isArray(e) ? e.map(Bt) : String(e);
|
|
915
|
+
}
|
|
916
|
+
function Vt(e) {
|
|
917
917
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
918
918
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
919
919
|
return t;
|
|
920
920
|
}
|
|
921
|
-
var
|
|
922
|
-
function
|
|
923
|
-
if (
|
|
924
|
-
if (i && (t = n),
|
|
925
|
-
if (
|
|
926
|
-
if (
|
|
921
|
+
var Ht = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
922
|
+
function Ut(e, t, n, r, i) {
|
|
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
|
-
function
|
|
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
|
-
function
|
|
933
|
-
let n =
|
|
932
|
+
function Gt(e, t) {
|
|
933
|
+
let n = z.toCamelCase(" " + t);
|
|
934
934
|
[
|
|
935
935
|
"get",
|
|
936
936
|
"set",
|
|
@@ -944,79 +944,79 @@ function Wt(e, t) {
|
|
|
944
944
|
});
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
|
-
var
|
|
947
|
+
var G = class {
|
|
948
948
|
constructor(e) {
|
|
949
949
|
e && this.set(e);
|
|
950
950
|
}
|
|
951
951
|
set(e, t, n) {
|
|
952
952
|
let r = this;
|
|
953
953
|
function i(e, t, n) {
|
|
954
|
-
let i =
|
|
954
|
+
let i = W(t);
|
|
955
955
|
if (!i) throw Error("header name must be a non-empty string");
|
|
956
|
-
let a =
|
|
957
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] =
|
|
956
|
+
let a = z.findKey(r, i);
|
|
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);
|
|
970
970
|
return this;
|
|
971
971
|
}
|
|
972
972
|
get(e, t) {
|
|
973
|
-
if (e =
|
|
974
|
-
let n =
|
|
973
|
+
if (e = W(e), e) {
|
|
974
|
+
let n = z.findKey(this, e);
|
|
975
975
|
if (n) {
|
|
976
976
|
let e = this[n];
|
|
977
977
|
if (!t) return e;
|
|
978
|
-
if (t === !0) return
|
|
979
|
-
if (
|
|
980
|
-
if (
|
|
978
|
+
if (t === !0) return Vt(e);
|
|
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
|
-
if (e =
|
|
987
|
-
let n =
|
|
988
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
986
|
+
if (e = W(e), e) {
|
|
987
|
+
let n = z.findKey(this, e);
|
|
988
|
+
return !!(n && this[n] !== void 0 && (!t || Ut(this, this[n], n, t)));
|
|
989
989
|
}
|
|
990
990
|
return !1;
|
|
991
991
|
}
|
|
992
992
|
delete(e, t) {
|
|
993
993
|
let n = this, r = !1;
|
|
994
994
|
function i(e) {
|
|
995
|
-
if (e =
|
|
996
|
-
let i =
|
|
997
|
-
i && (!t ||
|
|
995
|
+
if (e = W(e), e) {
|
|
996
|
+
let i = z.findKey(n, e);
|
|
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;
|
|
1004
1004
|
for (; n--;) {
|
|
1005
1005
|
let i = t[n];
|
|
1006
|
-
(!e ||
|
|
1006
|
+
(!e || Ut(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
1007
1007
|
}
|
|
1008
1008
|
return r;
|
|
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
|
-
t[a] =
|
|
1015
|
+
t[a] = Bt(r), delete t[i];
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
|
-
let o = e ?
|
|
1019
|
-
o !== i && delete t[i], t[o] =
|
|
1018
|
+
let o = e ? Wt(i) : String(i).trim();
|
|
1019
|
+
o !== i && delete t[i], t[o] = Bt(r), n[o] = !0;
|
|
1020
1020
|
}), this;
|
|
1021
1021
|
}
|
|
1022
1022
|
concat(...e) {
|
|
@@ -1024,8 +1024,8 @@ var K = 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]() {
|
|
@@ -1048,22 +1048,22 @@ var K = class {
|
|
|
1048
1048
|
return t.forEach((e) => n.set(e)), n;
|
|
1049
1049
|
}
|
|
1050
1050
|
static accessor(e) {
|
|
1051
|
-
let t = (this[
|
|
1051
|
+
let t = (this[zt] = this[zt] = { accessors: {} }).accessors, n = this.prototype;
|
|
1052
1052
|
function r(e) {
|
|
1053
|
-
let r =
|
|
1054
|
-
t[r] || (
|
|
1053
|
+
let r = W(e);
|
|
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([
|
|
1060
1060
|
"Content-Type",
|
|
1061
1061
|
"Content-Length",
|
|
1062
1062
|
"Accept",
|
|
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,42 +1071,42 @@ K.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
|
-
function
|
|
1078
|
-
let n = this ||
|
|
1079
|
-
return
|
|
1077
|
+
function Kt(e, t) {
|
|
1078
|
+
let n = this || U, r = t || n, i = G.from(r.headers), a = r.data;
|
|
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
|
}
|
|
1083
1083
|
//#endregion
|
|
1084
1084
|
//#region node_modules/axios/lib/cancel/isCancel.js
|
|
1085
|
-
function
|
|
1085
|
+
function qt(e) {
|
|
1086
1086
|
return !!(e && e.__CANCEL__);
|
|
1087
1087
|
}
|
|
1088
1088
|
//#endregion
|
|
1089
1089
|
//#region node_modules/axios/lib/cancel/CanceledError.js
|
|
1090
|
-
var
|
|
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
|
-
function
|
|
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
|
|
1103
|
-
function
|
|
1103
|
+
function Yt(e) {
|
|
1104
1104
|
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1105
1105
|
return t && t[1] || "";
|
|
1106
1106
|
}
|
|
1107
1107
|
//#endregion
|
|
1108
1108
|
//#region node_modules/axios/lib/helpers/speedometer.js
|
|
1109
|
-
function
|
|
1109
|
+
function Xt(e, t) {
|
|
1110
1110
|
e ||= 10;
|
|
1111
1111
|
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
1112
1112
|
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
@@ -1121,7 +1121,7 @@ function Yt(e, t) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
//#endregion
|
|
1123
1123
|
//#region node_modules/axios/lib/helpers/throttle.js
|
|
1124
|
-
function
|
|
1124
|
+
function Zt(e, t) {
|
|
1125
1125
|
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
1126
1126
|
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
1127
1127
|
};
|
|
@@ -1134,9 +1134,9 @@ function Xt(e, t) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
//#endregion
|
|
1136
1136
|
//#region node_modules/axios/lib/helpers/progressEventReducer.js
|
|
1137
|
-
var
|
|
1138
|
-
let r = 0, i =
|
|
1139
|
-
return
|
|
1137
|
+
var Qt = (e, t, n = 3) => {
|
|
1138
|
+
let r = 0, i = Xt(50, 250);
|
|
1139
|
+
return Zt((n) => {
|
|
1140
1140
|
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a - r, c = i(s), l = a <= o;
|
|
1141
1141
|
r = a, e({
|
|
1142
1142
|
loaded: a,
|
|
@@ -1150,18 +1150,18 @@ var Zt = (e, t, n = 3) => {
|
|
|
1150
1150
|
[t ? "download" : "upload"]: !0
|
|
1151
1151
|
});
|
|
1152
1152
|
}, n);
|
|
1153
|
-
},
|
|
1153
|
+
}, $t = (e, t) => {
|
|
1154
1154
|
let n = e != null;
|
|
1155
1155
|
return [(r) => t[0]({
|
|
1156
1156
|
lengthComputable: n,
|
|
1157
1157
|
total: e,
|
|
1158
1158
|
loaded: r
|
|
1159
1159
|
}), t[1]];
|
|
1160
|
-
},
|
|
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;
|
|
@@ -1180,39 +1180,39 @@ var Zt = (e, t, n = 3) => {
|
|
|
1180
1180
|
};
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
1183
|
-
function
|
|
1183
|
+
function rn(e) {
|
|
1184
1184
|
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
1185
1185
|
}
|
|
1186
1186
|
//#endregion
|
|
1187
1187
|
//#region node_modules/axios/lib/helpers/combineURLs.js
|
|
1188
|
-
function
|
|
1188
|
+
function an(e, t) {
|
|
1189
1189
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1190
1190
|
}
|
|
1191
1191
|
//#endregion
|
|
1192
1192
|
//#region node_modules/axios/lib/core/buildFullPath.js
|
|
1193
|
-
function
|
|
1194
|
-
let r = !
|
|
1195
|
-
return e && (r || n == 0) ?
|
|
1193
|
+
function on(e, t, n) {
|
|
1194
|
+
let r = !rn(t);
|
|
1195
|
+
return e && (r || n == 0) ? an(e, t) : t;
|
|
1196
1196
|
}
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region node_modules/axios/lib/core/mergeConfig.js
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1199
|
+
var sn = (e) => e instanceof G ? { ...e } : e;
|
|
1200
|
+
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);
|
|
@@ -1247,38 +1247,38 @@ function J(e, t) {
|
|
|
1247
1247
|
socketPath: o,
|
|
1248
1248
|
responseEncoding: o,
|
|
1249
1249
|
validateStatus: s,
|
|
1250
|
-
headers: (e, t, n) => i(
|
|
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
|
-
var
|
|
1264
|
-
let t =
|
|
1265
|
-
if (t.headers = o =
|
|
1266
|
-
if (
|
|
1267
|
-
else if (
|
|
1263
|
+
var cn = (e) => {
|
|
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)) : ""))), z.isFormData(n)) {
|
|
1266
|
+
if (H.hasStandardBrowserEnv || H.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
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 (
|
|
1275
|
-
let e = i && a &&
|
|
1274
|
+
if (H.hasStandardBrowserEnv && (r && z.isFunction(r) && (r = r(t)), r || r !== !1 && tn(t.url))) {
|
|
1275
|
+
let e = i && a && nn.read(a);
|
|
1276
1276
|
e && o.set(i, e);
|
|
1277
1277
|
}
|
|
1278
1278
|
return t;
|
|
1279
|
-
},
|
|
1279
|
+
}, ln = typeof XMLHttpRequest < "u" && function(e) {
|
|
1280
1280
|
return new Promise(function(t, n) {
|
|
1281
|
-
let r =
|
|
1281
|
+
let r = cn(e), i = r.data, a = G.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1282
1282
|
function m() {
|
|
1283
1283
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1284
1284
|
}
|
|
@@ -1286,8 +1286,8 @@ var sn = (e) => {
|
|
|
1286
1286
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1287
1287
|
function g() {
|
|
1288
1288
|
if (!h) return;
|
|
1289
|
-
let r =
|
|
1290
|
-
|
|
1289
|
+
let r = G.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1290
|
+
Jt(function(e) {
|
|
1291
1291
|
t(e), m();
|
|
1292
1292
|
}, function(e) {
|
|
1293
1293
|
n(e), m();
|
|
@@ -1303,36 +1303,36 @@ var sn = (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
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1312
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new
|
|
1313
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
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 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
|
-
}),
|
|
1316
|
-
h &&= (n(!t || t.type ? new
|
|
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
|
+
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
|
-
let _ =
|
|
1319
|
-
if (_ &&
|
|
1320
|
-
n(new
|
|
1318
|
+
let _ = Yt(r.url);
|
|
1319
|
+
if (_ && H.protocols.indexOf(_) === -1) {
|
|
1320
|
+
n(new B("Unsupported protocol " + _ + ":", B.ERR_BAD_REQUEST, e));
|
|
1321
1321
|
return;
|
|
1322
1322
|
}
|
|
1323
1323
|
h.send(i || null);
|
|
1324
1324
|
});
|
|
1325
|
-
},
|
|
1325
|
+
}, un = (e, t) => {
|
|
1326
1326
|
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1327
1327
|
if (t || n) {
|
|
1328
1328
|
let n = new AbortController(), r, i = function(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,9 +1340,9 @@ var sn = (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;
|
|
1347
1347
|
if (!t || n < t) {
|
|
1348
1348
|
yield e;
|
|
@@ -1350,9 +1350,9 @@ var sn = (e) => {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
let r = 0, i;
|
|
1352
1352
|
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1353
|
-
},
|
|
1354
|
-
for await (let n of
|
|
1355
|
-
},
|
|
1353
|
+
}, fn = async function* (e, t) {
|
|
1354
|
+
for await (let n of pn(e)) yield* dn(n, t);
|
|
1355
|
+
}, pn = async function* (e) {
|
|
1356
1356
|
if (e[Symbol.asyncIterator]) {
|
|
1357
1357
|
yield* e;
|
|
1358
1358
|
return;
|
|
@@ -1367,8 +1367,8 @@ var sn = (e) => {
|
|
|
1367
1367
|
} finally {
|
|
1368
1368
|
await t.cancel();
|
|
1369
1369
|
}
|
|
1370
|
-
},
|
|
1371
|
-
let i =
|
|
1370
|
+
}, mn = (e, t, n, r) => {
|
|
1371
|
+
let i = fn(e, t), a = 0, o, s = (e) => {
|
|
1372
1372
|
o || (o = !0, r && r(e));
|
|
1373
1373
|
};
|
|
1374
1374
|
return new ReadableStream({
|
|
@@ -1389,29 +1389,29 @@ var sn = (e) => {
|
|
|
1389
1389
|
return s(e), i.return();
|
|
1390
1390
|
}
|
|
1391
1391
|
}, { highWaterMark: 2 });
|
|
1392
|
-
},
|
|
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
|
-
},
|
|
1402
|
-
e =
|
|
1403
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ?
|
|
1401
|
+
}, xn = (e) => {
|
|
1402
|
+
e = z.merge.call({ skipUndefined: !0 }, _n, e);
|
|
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
|
-
let s = i &&
|
|
1406
|
-
let e = !1, t = new n(
|
|
1407
|
-
body: new
|
|
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(() => {
|
|
1406
|
+
let e = !1, t = new n(H.origin, {
|
|
1407
|
+
body: new vn(),
|
|
1408
1408
|
method: "POST",
|
|
1409
1409
|
get duplex() {
|
|
1410
1410
|
return e = !0, "half";
|
|
1411
1411
|
}
|
|
1412
1412
|
}).headers.has("Content-Type");
|
|
1413
1413
|
return e && !t;
|
|
1414
|
-
}), u = o && s &&
|
|
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,23 +1422,23 @@ var sn = (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
|
-
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 } =
|
|
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";
|
|
1441
|
-
let S =
|
|
1441
|
+
let S = un([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1442
1442
|
S.unsubscribe();
|
|
1443
1443
|
}), T;
|
|
1444
1444
|
try {
|
|
@@ -1448,12 +1448,12 @@ var sn = (e) => {
|
|
|
1448
1448
|
body: s,
|
|
1449
1449
|
duplex: "half"
|
|
1450
1450
|
}), t;
|
|
1451
|
-
if (
|
|
1452
|
-
let [t, n] =
|
|
1453
|
-
s =
|
|
1451
|
+
if (z.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1452
|
+
let [t, n] = $t(T, Qt(en(g)));
|
|
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,17 +1474,17 @@ var sn = (e) => {
|
|
|
1474
1474
|
].forEach((t) => {
|
|
1475
1475
|
e[t] = f[t];
|
|
1476
1476
|
});
|
|
1477
|
-
let t =
|
|
1478
|
-
f = new r(
|
|
1477
|
+
let t = z.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && $t(t, Qt(en(h), !0)) || [];
|
|
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,
|
|
1487
|
-
headers:
|
|
1487
|
+
headers: G.from(f.headers),
|
|
1488
1488
|
status: f.status,
|
|
1489
1489
|
statusText: f.statusText,
|
|
1490
1490
|
config: e,
|
|
@@ -1492,27 +1492,27 @@ var sn = (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) => {
|
|
1499
1499
|
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1500
1500
|
r,
|
|
1501
1501
|
i,
|
|
1502
1502
|
n
|
|
1503
|
-
], o = a.length, s, c, l =
|
|
1504
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() :
|
|
1503
|
+
], o = a.length, s, c, l = Sn;
|
|
1504
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : xn(t)), l = c;
|
|
1505
1505
|
return c;
|
|
1506
1506
|
};
|
|
1507
|
-
|
|
1507
|
+
Cn();
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region node_modules/axios/lib/adapters/adapters.js
|
|
1510
|
-
var
|
|
1510
|
+
var wn = {
|
|
1511
1511
|
http: null,
|
|
1512
|
-
xhr:
|
|
1513
|
-
fetch: { get:
|
|
1512
|
+
xhr: ln,
|
|
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,46 +1520,46 @@ B.forEach(Cn, (e, t) => {
|
|
|
1520
1520
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
|
-
var
|
|
1524
|
-
function
|
|
1525
|
-
e =
|
|
1523
|
+
var Tn = (e) => `- ${e}`, En = (e) => z.isFunction(e) || e === null || e === !1;
|
|
1524
|
+
function Dn(e, t) {
|
|
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, !
|
|
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
|
}
|
|
1540
|
-
var
|
|
1541
|
-
getAdapter:
|
|
1542
|
-
adapters:
|
|
1540
|
+
var On = {
|
|
1541
|
+
getAdapter: Dn,
|
|
1542
|
+
adapters: wn
|
|
1543
1543
|
};
|
|
1544
1544
|
//#endregion
|
|
1545
1545
|
//#region node_modules/axios/lib/core/dispatchRequest.js
|
|
1546
|
-
function On(e) {
|
|
1547
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new q(null, e);
|
|
1548
|
-
}
|
|
1549
1546
|
function kn(e) {
|
|
1550
|
-
|
|
1547
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new K(null, e);
|
|
1548
|
+
}
|
|
1549
|
+
function An(e) {
|
|
1550
|
+
return kn(e), e.headers = G.from(e.headers), e.data = Kt.call(e, e.transformRequest), [
|
|
1551
1551
|
"post",
|
|
1552
1552
|
"put",
|
|
1553
1553
|
"patch"
|
|
1554
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1555
|
-
return
|
|
1554
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), On.getAdapter(e.adapter || U.adapter, e)(e).then(function(t) {
|
|
1555
|
+
return kn(e), t.data = Kt.call(e, e.transformResponse, t), t.headers = G.from(t.headers), t;
|
|
1556
1556
|
}, function(t) {
|
|
1557
|
-
return
|
|
1557
|
+
return qt(t) || (kn(e), t && t.response && (t.response.data = Kt.call(e, e.transformResponse, t.response), t.response.headers = G.from(t.response.headers))), Promise.reject(t);
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
1560
|
//#endregion
|
|
1561
1561
|
//#region node_modules/axios/lib/env/data.js
|
|
1562
|
-
var
|
|
1562
|
+
var jn = "1.13.6", Mn = {};
|
|
1563
1563
|
[
|
|
1564
1564
|
"object",
|
|
1565
1565
|
"boolean",
|
|
@@ -1568,43 +1568,43 @@ var An = "1.13.6", jn = {};
|
|
|
1568
1568
|
"string",
|
|
1569
1569
|
"symbol"
|
|
1570
1570
|
].forEach((e, t) => {
|
|
1571
|
-
|
|
1571
|
+
Mn[e] = function(n) {
|
|
1572
1572
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1573
1573
|
};
|
|
1574
1574
|
});
|
|
1575
|
-
var
|
|
1576
|
-
|
|
1575
|
+
var Nn = {};
|
|
1576
|
+
Mn.transitional = function(e, t, n) {
|
|
1577
1577
|
function r(e, t) {
|
|
1578
|
-
return "[Axios v" +
|
|
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
|
|
1582
|
-
return t && !
|
|
1581
|
+
if (e === !1) throw new B(r(i, " has been removed" + (t ? " in " + t : "")), B.ERR_DEPRECATED);
|
|
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
|
-
function
|
|
1588
|
-
if (typeof e != "object") throw new
|
|
1587
|
+
function Pn(e, t, n) {
|
|
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
|
-
var
|
|
1601
|
-
assertOptions:
|
|
1602
|
-
validators:
|
|
1603
|
-
},
|
|
1600
|
+
var Fn = {
|
|
1601
|
+
assertOptions: Pn,
|
|
1602
|
+
validators: Mn
|
|
1603
|
+
}, J = Fn.validators, Y = class {
|
|
1604
1604
|
constructor(e) {
|
|
1605
1605
|
this.defaults = e || {}, this.interceptors = {
|
|
1606
|
-
request: new
|
|
1607
|
-
response: new
|
|
1606
|
+
request: new Ct(),
|
|
1607
|
+
response: new Ct()
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
1610
|
async request(e, t) {
|
|
@@ -1623,22 +1623,22 @@ var Pn = {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
1625
|
_request(e, t) {
|
|
1626
|
-
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t =
|
|
1626
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = q(this.defaults, t);
|
|
1627
1627
|
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1628
|
-
n !== void 0 &&
|
|
1629
|
-
silentJSONParsing:
|
|
1630
|
-
forcedJSONParsing:
|
|
1631
|
-
clarifyTimeoutError:
|
|
1632
|
-
legacyInterceptorReqResOrdering:
|
|
1633
|
-
}, !1), r != null && (
|
|
1634
|
-
encode:
|
|
1635
|
-
serialize:
|
|
1636
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls),
|
|
1637
|
-
baseUrl:
|
|
1638
|
-
withXsrfToken:
|
|
1628
|
+
n !== void 0 && Fn.assertOptions(n, {
|
|
1629
|
+
silentJSONParsing: J.transitional(J.boolean),
|
|
1630
|
+
forcedJSONParsing: J.transitional(J.boolean),
|
|
1631
|
+
clarifyTimeoutError: J.transitional(J.boolean),
|
|
1632
|
+
legacyInterceptorReqResOrdering: J.transitional(J.boolean)
|
|
1633
|
+
}, !1), r != null && (z.isFunction(r) ? t.paramsSerializer = { serialize: r } : Fn.assertOptions(r, {
|
|
1634
|
+
encode: J.function,
|
|
1635
|
+
serialize: J.function
|
|
1636
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Fn.assertOptions(t, {
|
|
1637
|
+
baseUrl: J.spelling("baseURL"),
|
|
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",
|
|
@@ -1648,12 +1648,12 @@ var Pn = {
|
|
|
1648
1648
|
"common"
|
|
1649
1649
|
], (e) => {
|
|
1650
1650
|
delete i[e];
|
|
1651
|
-
}), t.headers =
|
|
1651
|
+
}), t.headers = G.concat(a, i);
|
|
1652
1652
|
let o = [], s = !0;
|
|
1653
1653
|
this.interceptors.request.forEach(function(e) {
|
|
1654
1654
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1655
1655
|
s &&= e.synchronous;
|
|
1656
|
-
let n = t.transitional ||
|
|
1656
|
+
let n = t.transitional || wt;
|
|
1657
1657
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1658
1658
|
});
|
|
1659
1659
|
let c = [];
|
|
@@ -1662,7 +1662,7 @@ var Pn = {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
let l, u = 0, d;
|
|
1664
1664
|
if (!s) {
|
|
1665
|
-
let e = [
|
|
1665
|
+
let e = [An.bind(this), void 0];
|
|
1666
1666
|
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1667
1667
|
return l;
|
|
1668
1668
|
}
|
|
@@ -1678,7 +1678,7 @@ var Pn = {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
try {
|
|
1681
|
-
l =
|
|
1681
|
+
l = An.call(this, f);
|
|
1682
1682
|
} catch (e) {
|
|
1683
1683
|
return Promise.reject(e);
|
|
1684
1684
|
}
|
|
@@ -1686,30 +1686,30 @@ var Pn = {
|
|
|
1686
1686
|
return l;
|
|
1687
1687
|
}
|
|
1688
1688
|
getUri(e) {
|
|
1689
|
-
return e =
|
|
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",
|
|
1696
1696
|
"options"
|
|
1697
1697
|
], function(e) {
|
|
1698
|
-
|
|
1699
|
-
return this.request(
|
|
1698
|
+
Y.prototype[e] = function(t, n) {
|
|
1699
|
+
return this.request(q(n || {}, {
|
|
1700
1700
|
method: e,
|
|
1701
1701
|
url: t,
|
|
1702
1702
|
data: (n || {}).data
|
|
1703
1703
|
}));
|
|
1704
1704
|
};
|
|
1705
|
-
}),
|
|
1705
|
+
}), z.forEach([
|
|
1706
1706
|
"post",
|
|
1707
1707
|
"put",
|
|
1708
1708
|
"patch"
|
|
1709
1709
|
], function(e) {
|
|
1710
1710
|
function t(t) {
|
|
1711
1711
|
return function(n, r, i) {
|
|
1712
|
-
return this.request(
|
|
1712
|
+
return this.request(q(i || {}, {
|
|
1713
1713
|
method: e,
|
|
1714
1714
|
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1715
1715
|
url: n,
|
|
@@ -1717,11 +1717,11 @@ B.forEach([
|
|
|
1717
1717
|
}));
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
|
|
1720
|
+
Y.prototype[e] = t(), Y.prototype[e + "Form"] = t(!0);
|
|
1721
1721
|
});
|
|
1722
1722
|
//#endregion
|
|
1723
1723
|
//#region node_modules/axios/lib/cancel/CancelToken.js
|
|
1724
|
-
var
|
|
1724
|
+
var In = class e {
|
|
1725
1725
|
constructor(e) {
|
|
1726
1726
|
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1727
1727
|
let t;
|
|
@@ -1742,7 +1742,7 @@ var Fn = class e {
|
|
|
1742
1742
|
n.unsubscribe(t);
|
|
1743
1743
|
}, r;
|
|
1744
1744
|
}, e(function(e, r, i) {
|
|
1745
|
-
n.reason || (n.reason = new
|
|
1745
|
+
n.reason || (n.reason = new K(e, r, i), t(n.reason));
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
throwIfRequested() {
|
|
@@ -1778,19 +1778,19 @@ var Fn = class e {
|
|
|
1778
1778
|
};
|
|
1779
1779
|
//#endregion
|
|
1780
1780
|
//#region node_modules/axios/lib/helpers/spread.js
|
|
1781
|
-
function
|
|
1781
|
+
function Ln(e) {
|
|
1782
1782
|
return function(t) {
|
|
1783
1783
|
return e.apply(null, t);
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
1786
|
//#endregion
|
|
1787
1787
|
//#region node_modules/axios/lib/helpers/isAxiosError.js
|
|
1788
|
-
function
|
|
1789
|
-
return
|
|
1788
|
+
function Rn(e) {
|
|
1789
|
+
return z.isObject(e) && e.isAxiosError === !0;
|
|
1790
1790
|
}
|
|
1791
1791
|
//#endregion
|
|
1792
1792
|
//#region node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1793
|
-
var
|
|
1793
|
+
var zn = {
|
|
1794
1794
|
Continue: 100,
|
|
1795
1795
|
SwitchingProtocols: 101,
|
|
1796
1796
|
Processing: 102,
|
|
@@ -1861,29 +1861,29 @@ var Rn = {
|
|
|
1861
1861
|
SslHandshakeFailed: 525,
|
|
1862
1862
|
InvalidSslCertificate: 526
|
|
1863
1863
|
};
|
|
1864
|
-
Object.entries(
|
|
1865
|
-
|
|
1864
|
+
Object.entries(zn).forEach(([e, t]) => {
|
|
1865
|
+
zn[t] = e;
|
|
1866
1866
|
});
|
|
1867
1867
|
//#endregion
|
|
1868
1868
|
//#region node_modules/axios/lib/axios.js
|
|
1869
|
-
function
|
|
1870
|
-
let t = new
|
|
1871
|
-
return
|
|
1872
|
-
return
|
|
1869
|
+
function Bn(e) {
|
|
1870
|
+
let t = new Y(e), n = ue(Y.prototype.request, t);
|
|
1871
|
+
return z.extend(n, Y.prototype, t, { allOwnKeys: !0 }), z.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1872
|
+
return Bn(q(e, t));
|
|
1873
1873
|
}, n;
|
|
1874
1874
|
}
|
|
1875
|
-
var
|
|
1876
|
-
|
|
1875
|
+
var X = Bn(U);
|
|
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
|
-
},
|
|
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
|
-
var
|
|
1881
|
+
var Vn = class {
|
|
1882
1882
|
baseUrl;
|
|
1883
1883
|
accessToken;
|
|
1884
1884
|
axiosInstance;
|
|
1885
1885
|
constructor({ baseUrl: e, accessToken: t }) {
|
|
1886
|
-
this.baseUrl = e, this.accessToken = t, this.axiosInstance =
|
|
1886
|
+
this.baseUrl = e, this.accessToken = t, this.axiosInstance = X.create({
|
|
1887
1887
|
baseURL: this.baseUrl,
|
|
1888
1888
|
paramsSerializer: (e) => ie(e, { allowDots: !0 })
|
|
1889
1889
|
}), this.setupAxiosTokenHandler();
|
|
@@ -1892,24 +1892,24 @@ var Bn = class {
|
|
|
1892
1892
|
typeof this.accessToken == "function" ? this.axiosInstance.interceptors.request.use(async (e) => (e.headers["X-Webitel-Access"] = await this.accessToken(), e)) : this.axiosInstance.defaults.headers.common["X-Webitel-Access"] = this.accessToken;
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
|
-
function
|
|
1896
|
-
return new
|
|
1895
|
+
function Hn(e) {
|
|
1896
|
+
return new Vn(e);
|
|
1897
1897
|
}
|
|
1898
1898
|
//#endregion
|
|
1899
1899
|
//#region src/modules/configs/socketConfig/SocketConfig.class.ts
|
|
1900
|
-
var
|
|
1900
|
+
var Un = class {
|
|
1901
1901
|
baseUrl;
|
|
1902
1902
|
accessToken;
|
|
1903
1903
|
constructor({ baseUrl: e, accessToken: t }) {
|
|
1904
1904
|
this.baseUrl = e, this.accessToken = t;
|
|
1905
1905
|
}
|
|
1906
1906
|
};
|
|
1907
|
-
function
|
|
1908
|
-
return new
|
|
1907
|
+
function Wn(e) {
|
|
1908
|
+
return new Un(e);
|
|
1909
1909
|
}
|
|
1910
1910
|
//#endregion
|
|
1911
1911
|
//#region src/modules/messages/classes/Message.class.ts
|
|
1912
|
-
var
|
|
1912
|
+
var Gn = class {
|
|
1913
1913
|
_serviceConfig;
|
|
1914
1914
|
constructor(e, { serviceConfig: t }) {
|
|
1915
1915
|
Object.assign(this, e), this._serviceConfig = t;
|
|
@@ -1921,12 +1921,15 @@ var Wn = class {
|
|
|
1921
1921
|
throw Error("Method not implemented.");
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
|
-
function
|
|
1925
|
-
return new
|
|
1924
|
+
function Kn(e, { serviceConfig: t }) {
|
|
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()]);
|
|
@@ -1956,17 +1959,21 @@ var Kn = ({ axiosInstance: e }) => {
|
|
|
1956
1959
|
sendDocumentMessage: a,
|
|
1957
1960
|
sendImageMessage: o
|
|
1958
1961
|
};
|
|
1959
|
-
},
|
|
1960
|
-
let r = await
|
|
1962
|
+
}, Jn = (e) => async (t, n = {}) => await qn(e).getMessageHistory(t, n), Yn = (e, { serviceConfig: t }) => e.map((e) => Kn(e, { serviceConfig: t })), Xn = async (e, t, n = {}) => {
|
|
1963
|
+
let r = await Jn(e)(t, n);
|
|
1961
1964
|
return {
|
|
1962
1965
|
...r,
|
|
1963
|
-
items:
|
|
1966
|
+
items: Yn(r.items ?? [], { serviceConfig: e })
|
|
1964
1967
|
};
|
|
1965
|
-
},
|
|
1966
|
-
|
|
1967
|
-
|
|
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);
|
|
1968
1975
|
if (a.length === 0) throw Error("At least one file is required to send a document message");
|
|
1969
|
-
let s =
|
|
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,
|
|
@@ -1974,84 +1981,94 @@ var Kn = ({ axiosInstance: e }) => {
|
|
|
1974
1981
|
}));
|
|
1975
1982
|
return s.sendDocumentMessage({
|
|
1976
1983
|
...i,
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
documents: c
|
|
1980
|
-
}
|
|
1984
|
+
body: r,
|
|
1985
|
+
documents: c
|
|
1981
1986
|
});
|
|
1982
|
-
},
|
|
1983
|
-
let { files: n, body: r, ...i } = t, a = oe(n),
|
|
1984
|
-
if (!o) throw Error("threadId is required to send an image message");
|
|
1987
|
+
}, $n = async (e, t) => {
|
|
1988
|
+
let { files: n, body: r, ...i } = t, a = oe(n), o = Zn(i.to);
|
|
1985
1989
|
if (a.length === 0) throw Error("At least one file is required to send an image message");
|
|
1986
|
-
let s =
|
|
1990
|
+
let s = qn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1987
1991
|
id: `${e.id}`,
|
|
1988
1992
|
mimeType: e.mime,
|
|
1989
1993
|
name: e.name
|
|
1990
1994
|
}));
|
|
1991
1995
|
return s.sendImageMessage({
|
|
1992
1996
|
...i,
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
images: c
|
|
1996
|
-
}
|
|
1997
|
+
body: r,
|
|
1998
|
+
images: c
|
|
1997
1999
|
});
|
|
1998
|
-
},
|
|
2000
|
+
}, er = async (e, t) => qn(e).sendTextMessage(t);
|
|
1999
2001
|
//#endregion
|
|
2000
2002
|
//#region src/modules/messages/messagesSevice.ts
|
|
2001
|
-
function
|
|
2003
|
+
function tr(e) {
|
|
2002
2004
|
return {
|
|
2003
|
-
fetchMessageHistory: (t, n) =>
|
|
2004
|
-
sendTextMessage: (t) =>
|
|
2005
|
-
sendDocumentMessage: (t) =>
|
|
2006
|
-
sendImageMessage: (t) =>
|
|
2005
|
+
fetchMessageHistory: (t, n) => Xn(e, t, n ?? {}),
|
|
2006
|
+
sendTextMessage: (t) => er(e, t),
|
|
2007
|
+
sendDocumentMessage: (t) => Qn(e, t),
|
|
2008
|
+
sendImageMessage: (t) => $n(e, t)
|
|
2007
2009
|
};
|
|
2008
2010
|
}
|
|
2009
2011
|
//#endregion
|
|
2010
2012
|
//#region src/modules/contacts/classes/Contact.class.ts
|
|
2011
|
-
var
|
|
2013
|
+
var nr = class {
|
|
2012
2014
|
_serviceConfig;
|
|
2013
2015
|
sub;
|
|
2014
2016
|
iss;
|
|
2015
2017
|
constructor(e, { serviceConfig: t }) {
|
|
2016
2018
|
Object.assign(this, e), this._serviceConfig = t;
|
|
2017
2019
|
}
|
|
2018
|
-
async
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2020
|
+
async sendMessage({ body: e, attachments: t }, { sendId: n } = {}) {
|
|
2021
|
+
let r = tr(this.serviceConfig), i = { contact: {
|
|
2022
|
+
sub: this.sub,
|
|
2023
|
+
iss: this.iss
|
|
2024
|
+
} };
|
|
2025
|
+
switch (t?.type) {
|
|
2026
|
+
case Z.Images: return r.sendImageMessage({
|
|
2027
|
+
files: t.files,
|
|
2028
|
+
body: e,
|
|
2029
|
+
sendId: n,
|
|
2030
|
+
to: i
|
|
2031
|
+
});
|
|
2032
|
+
case Z.Documents: return r.sendDocumentMessage({
|
|
2033
|
+
files: t.files,
|
|
2034
|
+
body: e,
|
|
2035
|
+
sendId: n,
|
|
2036
|
+
to: i
|
|
2037
|
+
});
|
|
2038
|
+
default: return r.sendTextMessage({
|
|
2039
|
+
body: e ?? "",
|
|
2040
|
+
sendId: n,
|
|
2041
|
+
to: i
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2027
2044
|
}
|
|
2028
2045
|
get serviceConfig() {
|
|
2029
2046
|
return this._serviceConfig;
|
|
2030
2047
|
}
|
|
2031
2048
|
};
|
|
2032
|
-
function
|
|
2033
|
-
return new
|
|
2049
|
+
function rr(e, { serviceConfig: t }) {
|
|
2050
|
+
return new nr(e, { serviceConfig: t });
|
|
2034
2051
|
}
|
|
2035
2052
|
//#endregion
|
|
2036
2053
|
//#region src/modules/contacts/api/Contacts.api.ts
|
|
2037
|
-
var
|
|
2054
|
+
var ir = ({ axiosInstance: e }) => ({ getContactsList: async (t = {}) => {
|
|
2038
2055
|
let n = r(t, [l()]);
|
|
2039
2056
|
return r((await e.get("/v1/contacts", { params: n })).data, [A()]);
|
|
2040
|
-
} }),
|
|
2041
|
-
let n = await
|
|
2057
|
+
} }), ar = (e) => async (t = {}) => await ir(e).getContactsList(t), or = (e, { serviceConfig: t }) => e.map((e) => rr(e, { serviceConfig: t })), sr = async (e, t = {}) => {
|
|
2058
|
+
let n = await ar(e)(t);
|
|
2042
2059
|
return {
|
|
2043
2060
|
...n,
|
|
2044
|
-
items:
|
|
2061
|
+
items: or(n.items ?? [], { serviceConfig: e })
|
|
2045
2062
|
};
|
|
2046
2063
|
};
|
|
2047
2064
|
//#endregion
|
|
2048
2065
|
//#region src/modules/contacts/contactsSevice.ts
|
|
2049
|
-
function
|
|
2050
|
-
return { fetchContacts: (t) =>
|
|
2066
|
+
function cr(e) {
|
|
2067
|
+
return { fetchContacts: (t) => sr(e, t ?? {}) };
|
|
2051
2068
|
}
|
|
2052
2069
|
//#endregion
|
|
2053
2070
|
//#region node_modules/mitt/dist/mitt.mjs
|
|
2054
|
-
function
|
|
2071
|
+
function lr(e) {
|
|
2055
2072
|
return {
|
|
2056
2073
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
2057
2074
|
on: function(t, n) {
|
|
@@ -2088,48 +2105,52 @@ var Q = {
|
|
|
2088
2105
|
Connected: "connected",
|
|
2089
2106
|
Disconnected: "disconnected",
|
|
2090
2107
|
Error: "error"
|
|
2091
|
-
},
|
|
2108
|
+
}, ur = class {
|
|
2092
2109
|
_serviceConfig;
|
|
2093
2110
|
id;
|
|
2094
2111
|
constructor(e, { serviceConfig: t }) {
|
|
2095
2112
|
Object.assign(this, e), this._serviceConfig = t;
|
|
2096
2113
|
}
|
|
2097
2114
|
async fetchMessageHistory(e) {
|
|
2098
|
-
return
|
|
2099
|
-
}
|
|
2100
|
-
async sendMessage({ body: e,
|
|
2101
|
-
let
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2115
|
+
return tr(this.serviceConfig).fetchMessageHistory(this.id, e);
|
|
2116
|
+
}
|
|
2117
|
+
async sendMessage({ body: e, attachments: t }, { sendId: n } = {}) {
|
|
2118
|
+
let r = tr(this.serviceConfig), i = { threadId: this.id };
|
|
2119
|
+
switch (t?.type) {
|
|
2120
|
+
case Z.Images: return r.sendImageMessage({
|
|
2121
|
+
files: t.files,
|
|
2122
|
+
body: e,
|
|
2123
|
+
sendId: n,
|
|
2124
|
+
to: i
|
|
2125
|
+
});
|
|
2126
|
+
case Z.Documents: return r.sendDocumentMessage({
|
|
2127
|
+
files: t.files,
|
|
2128
|
+
body: e,
|
|
2129
|
+
sendId: n,
|
|
2130
|
+
to: i
|
|
2131
|
+
});
|
|
2132
|
+
default: return r.sendTextMessage({
|
|
2133
|
+
body: e ?? "",
|
|
2134
|
+
sendId: n,
|
|
2135
|
+
to: i
|
|
2136
|
+
});
|
|
2137
|
+
}
|
|
2117
2138
|
}
|
|
2118
2139
|
get serviceConfig() {
|
|
2119
2140
|
return this._serviceConfig;
|
|
2120
2141
|
}
|
|
2121
2142
|
};
|
|
2122
|
-
function
|
|
2123
|
-
return new
|
|
2143
|
+
function dr(e, { serviceConfig: t }) {
|
|
2144
|
+
return new ur(e, { serviceConfig: t });
|
|
2124
2145
|
}
|
|
2125
2146
|
//#endregion
|
|
2126
2147
|
//#region src/modules/socket/utils/instantiateSocketEventEntities.ts
|
|
2127
|
-
function
|
|
2128
|
-
return e.name === Q.ThreadMessage ?
|
|
2148
|
+
function fr(e, { serviceConfig: t }) {
|
|
2149
|
+
return e.name === Q.ThreadMessage ? Kn(e.payload, { serviceConfig: t }) : dr(e.payload, { serviceConfig: t });
|
|
2129
2150
|
}
|
|
2130
2151
|
//#endregion
|
|
2131
2152
|
//#region src/modules/socket/utils/processSocketEventPayload.ts
|
|
2132
|
-
function
|
|
2153
|
+
function pr(e) {
|
|
2133
2154
|
if (e.connectedEvent) return Q.Connected;
|
|
2134
2155
|
if (e.disconnectedEvent) return Q.Disconnected;
|
|
2135
2156
|
if (e.errorEvent) return Q.Error;
|
|
@@ -2139,7 +2160,7 @@ function dr(e) {
|
|
|
2139
2160
|
if (e.pingEvent) return Q.Ping;
|
|
2140
2161
|
throw Error(`Unknown event: ${JSON.stringify(e)}`);
|
|
2141
2162
|
}
|
|
2142
|
-
function
|
|
2163
|
+
function mr(e, t) {
|
|
2143
2164
|
switch (t) {
|
|
2144
2165
|
case Q.Connected: return e.connectedEvent;
|
|
2145
2166
|
case Q.Disconnected: return e.disconnectedEvent;
|
|
@@ -2150,27 +2171,27 @@ function fr(e, t) {
|
|
|
2150
2171
|
case Q.Ping: return e.pingEvent;
|
|
2151
2172
|
}
|
|
2152
2173
|
}
|
|
2153
|
-
function
|
|
2154
|
-
let n =
|
|
2174
|
+
function hr(e, { serviceConfig: t }) {
|
|
2175
|
+
let n = pr(e);
|
|
2155
2176
|
return {
|
|
2156
2177
|
eventName: n,
|
|
2157
|
-
eventPayload:
|
|
2178
|
+
eventPayload: gr({
|
|
2158
2179
|
name: n,
|
|
2159
|
-
payload:
|
|
2180
|
+
payload: mr(e, n)
|
|
2160
2181
|
}, { serviceConfig: t })
|
|
2161
2182
|
};
|
|
2162
2183
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return e === Q.ThreadMessage || e === Q.ThreadCreated ?
|
|
2184
|
+
function gr({ name: e, payload: t }, { serviceConfig: n }) {
|
|
2185
|
+
return e === Q.ThreadMessage || e === Q.ThreadCreated ? fr({
|
|
2165
2186
|
name: e,
|
|
2166
2187
|
payload: t
|
|
2167
2188
|
}, { serviceConfig: n }) : t;
|
|
2168
2189
|
}
|
|
2169
2190
|
//#endregion
|
|
2170
2191
|
//#region src/modules/socket/classes/ChatsSoketClient.ts
|
|
2171
|
-
var
|
|
2172
|
-
emitter =
|
|
2173
|
-
stateEmitter =
|
|
2192
|
+
var _r = class {
|
|
2193
|
+
emitter = lr();
|
|
2194
|
+
stateEmitter = lr();
|
|
2174
2195
|
socketConfig;
|
|
2175
2196
|
serviceConfig;
|
|
2176
2197
|
ws = null;
|
|
@@ -2194,7 +2215,7 @@ var hr = class {
|
|
|
2194
2215
|
}, this.ws.onclose = () => {
|
|
2195
2216
|
this.setConnectionState($.Disconnected), this.ws = null, t(/* @__PURE__ */ Error("socket disconnected"));
|
|
2196
2217
|
}, this.ws.onmessage = (t) => {
|
|
2197
|
-
let { eventName: n, eventPayload: i } =
|
|
2218
|
+
let { eventName: n, eventPayload: i } = hr(r(JSON.parse(t.data), [A()]).payload, { serviceConfig: this.serviceConfig });
|
|
2198
2219
|
n === Q.Connected && e(), this.emitter.emit(n, i);
|
|
2199
2220
|
};
|
|
2200
2221
|
});
|
|
@@ -2212,30 +2233,30 @@ var hr = class {
|
|
|
2212
2233
|
this.stateEmitter.on(e, t);
|
|
2213
2234
|
}
|
|
2214
2235
|
};
|
|
2215
|
-
function
|
|
2216
|
-
return new
|
|
2236
|
+
function vr({ socketConfig: e, serviceConfig: t }) {
|
|
2237
|
+
return new _r({
|
|
2217
2238
|
socketConfig: e,
|
|
2218
2239
|
serviceConfig: t
|
|
2219
2240
|
});
|
|
2220
2241
|
}
|
|
2221
2242
|
//#endregion
|
|
2222
2243
|
//#region src/modules/threads/api/Threads.api.ts
|
|
2223
|
-
var
|
|
2244
|
+
var yr = ({ axiosInstance: e }) => ({ getThreadsList: async (t = {}) => {
|
|
2224
2245
|
let n = r(t, [l()]);
|
|
2225
2246
|
return r((await e.get("/v1/threads", { params: n })).data, [A()]);
|
|
2226
|
-
} }),
|
|
2227
|
-
let n = await
|
|
2247
|
+
} }), br = (e) => async (t = {}) => await yr(e).getThreadsList(t), xr = (e, { serviceConfig: t }) => e.map((e) => dr(e, { serviceConfig: t })), Sr = async (e, t = {}) => {
|
|
2248
|
+
let n = await br(e)(t);
|
|
2228
2249
|
return {
|
|
2229
2250
|
...n,
|
|
2230
|
-
items:
|
|
2251
|
+
items: xr(n.items ?? [], { serviceConfig: e })
|
|
2231
2252
|
};
|
|
2232
2253
|
};
|
|
2233
2254
|
//#endregion
|
|
2234
2255
|
//#region src/modules/threads/threadsSevice.ts
|
|
2235
|
-
function
|
|
2236
|
-
return { fetchThreads: (t) =>
|
|
2256
|
+
function Cr(e) {
|
|
2257
|
+
return { fetchThreads: (t) => Sr(e, t ?? {}) };
|
|
2237
2258
|
}
|
|
2238
2259
|
//#endregion
|
|
2239
|
-
export { $ as ChatsSocketConnectionStatus, Q as ChatsSocketMessage,
|
|
2260
|
+
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 };
|
|
2240
2261
|
|
|
2241
2262
|
//# sourceMappingURL=index.js.map
|