@college-africa/chat-ui 1.3.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CameraModal.d.ts +8 -0
- package/dist/components/ImageLightbox.d.ts +11 -0
- package/dist/components/MessageBubble.d.ts +1 -11
- package/dist/components/MessageInput.d.ts +2 -10
- package/dist/index.js +28 -9
- package/dist/index.mjs +4697 -1896
- package/dist/{summaries-BLYBgHwg.cjs → summaries-B5kldVNr.cjs} +2 -2
- package/dist/{summaries-DI36-zkM.js → summaries-mMFesyHg.js} +251 -227
- package/dist/utils/image.d.ts +1 -0
- package/package.json +3 -2
|
@@ -3297,26 +3297,32 @@ function Kr(e, t) {
|
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
3299
|
//#endregion
|
|
3300
|
+
//#region ../sdk/dist/logger.js
|
|
3301
|
+
var qr = console;
|
|
3302
|
+
function Jr(e) {
|
|
3303
|
+
qr = e;
|
|
3304
|
+
}
|
|
3305
|
+
//#endregion
|
|
3300
3306
|
//#region ../sdk/dist/utils.js
|
|
3301
|
-
var
|
|
3307
|
+
var Yr = Pr().shape({
|
|
3302
3308
|
baseURL: gr().required(),
|
|
3303
3309
|
timeout: yr().positive().optional(),
|
|
3304
3310
|
authToken: gr().optional(),
|
|
3305
3311
|
extToken: gr().optional()
|
|
3306
3312
|
});
|
|
3307
|
-
function
|
|
3313
|
+
function Xr(e) {
|
|
3308
3314
|
let t = {
|
|
3309
3315
|
baseURL: e.baseURL,
|
|
3310
3316
|
timeout: e.timeout || 3e4,
|
|
3311
3317
|
headers: { "Content-Type": "application/json" }
|
|
3312
3318
|
}, n = G.create(t);
|
|
3313
|
-
return n.interceptors.request.use((t) => (e.authToken && (t.headers.Authorization = `Bearer ${e.authToken}`), t), (e) => Promise.reject(e)), n.interceptors.response.use((e) => e, (e) => {
|
|
3314
|
-
if (!e.response) throw new Hr(e.message || "Network error occurred");
|
|
3315
|
-
let { status: t, data: n } = e.response;
|
|
3316
|
-
throw
|
|
3319
|
+
return n.interceptors.request.use((t) => (e.authToken && (t.headers.Authorization = `Bearer ${e.authToken}`), qr.info("[ChatClient]", t.method?.toUpperCase(), t.url), t), (e) => (qr.error("[ChatClient] Request setup error", e), Promise.reject(e))), n.interceptors.response.use((e) => e, (e) => {
|
|
3320
|
+
if (!e.response) throw qr.warn(`[ChatClient] Network error: ${e.message || "Network error occurred"}`), new Hr(e.message || "Network error occurred");
|
|
3321
|
+
let { status: t, data: n } = e.response, r = n?.error || n?.msg;
|
|
3322
|
+
throw qr.error(`[ChatClient] ${t} ${e.config?.method?.toUpperCase()} ${e.config?.url}: ${r || e.message}`), Kr(t, r);
|
|
3317
3323
|
}), n;
|
|
3318
3324
|
}
|
|
3319
|
-
function
|
|
3325
|
+
function Zr(e) {
|
|
3320
3326
|
try {
|
|
3321
3327
|
let t = e.split(".");
|
|
3322
3328
|
if (t.length !== 3) return null;
|
|
@@ -3326,16 +3332,16 @@ function Yr(e) {
|
|
|
3326
3332
|
return null;
|
|
3327
3333
|
}
|
|
3328
3334
|
}
|
|
3329
|
-
function
|
|
3335
|
+
function Qr(e, t = 0) {
|
|
3330
3336
|
if (!e) return !0;
|
|
3331
|
-
let n =
|
|
3337
|
+
let n = Zr(e)?.exp ?? null;
|
|
3332
3338
|
return n ? n <= Math.floor(Date.now() / 1e3) + t : !0;
|
|
3333
3339
|
}
|
|
3334
3340
|
//#endregion
|
|
3335
3341
|
//#region ../sdk/dist/ChatClient.js
|
|
3336
|
-
var
|
|
3342
|
+
var $r = class {
|
|
3337
3343
|
constructor(e) {
|
|
3338
|
-
this.isRefreshing = !1, this.REFRESH_BEFORE_EXPIRY_SECONDS = 600,
|
|
3344
|
+
this.isRefreshing = !1, this.REFRESH_BEFORE_EXPIRY_SECONDS = 600, Yr.validateSync(e), this.config = e, this.axiosInstance = Xr(this.config);
|
|
3339
3345
|
}
|
|
3340
3346
|
setAuthToken(e) {
|
|
3341
3347
|
this.config.authToken = e;
|
|
@@ -3349,7 +3355,7 @@ var Zr = class {
|
|
|
3349
3355
|
this.exchangeToken(this.config.extToken);
|
|
3350
3356
|
return;
|
|
3351
3357
|
}
|
|
3352
|
-
if (
|
|
3358
|
+
if (Qr(this.config.authToken, this.REFRESH_BEFORE_EXPIRY_SECONDS)) {
|
|
3353
3359
|
await this.refreshAuthToken();
|
|
3354
3360
|
return;
|
|
3355
3361
|
}
|
|
@@ -3397,18 +3403,36 @@ var Zr = class {
|
|
|
3397
3403
|
let t = {};
|
|
3398
3404
|
return e?.name && (t.name = e.name), e?.email && (t.email = e.email), e?.role && (t.role = e.role), (await this.axiosInstance.get("/users/search", { params: t })).data.users;
|
|
3399
3405
|
}
|
|
3400
|
-
async sendDM(e, t) {
|
|
3406
|
+
async sendDM(e, t, n) {
|
|
3401
3407
|
return await this.ensureAuthToken(), (await this.axiosInstance.post("/messages", {
|
|
3402
3408
|
user: e,
|
|
3403
|
-
content: t
|
|
3409
|
+
content: t,
|
|
3410
|
+
media: n
|
|
3404
3411
|
})).data.message;
|
|
3405
3412
|
}
|
|
3406
|
-
async sendGroupMessage(e, t) {
|
|
3413
|
+
async sendGroupMessage(e, t, n) {
|
|
3407
3414
|
return await this.ensureAuthToken(), (await this.axiosInstance.post("/messages", {
|
|
3408
3415
|
group: e,
|
|
3409
|
-
content: t
|
|
3416
|
+
content: t,
|
|
3417
|
+
media: n
|
|
3410
3418
|
})).data.message;
|
|
3411
3419
|
}
|
|
3420
|
+
async uploadFile(e, t, n) {
|
|
3421
|
+
await this.ensureAuthToken();
|
|
3422
|
+
let r = new FormData(), i = (e, t, n) => {
|
|
3423
|
+
typeof n == "string" ? e.append(t, {
|
|
3424
|
+
uri: n,
|
|
3425
|
+
name: n.split("/").pop() ?? t,
|
|
3426
|
+
type: "image/webp"
|
|
3427
|
+
}) : e.append(t, n);
|
|
3428
|
+
};
|
|
3429
|
+
return i(r, "file", e), i(r, "thumbnail", t), (await this.axiosInstance.post("/uploads/temp", r, {
|
|
3430
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
3431
|
+
onUploadProgress: n ? (e) => {
|
|
3432
|
+
e.total && n(Math.round(e.loaded * 100 / e.total));
|
|
3433
|
+
} : void 0
|
|
3434
|
+
})).data;
|
|
3435
|
+
}
|
|
3412
3436
|
async getMessages(e) {
|
|
3413
3437
|
await this.ensureAuthToken();
|
|
3414
3438
|
let t = {};
|
|
@@ -3467,52 +3491,52 @@ var Zr = class {
|
|
|
3467
3491
|
async joinGroup(e, t, n = "member") {
|
|
3468
3492
|
return await this.ensureAuthToken(), (await this.axiosInstance.post(`/orgs/${e}/groups/${t}/join`, { role: n })).data;
|
|
3469
3493
|
}
|
|
3470
|
-
},
|
|
3494
|
+
}, ei = /* @__PURE__ */ o(((e, t) => {
|
|
3471
3495
|
function n() {
|
|
3472
3496
|
this.__data__ = [], this.size = 0;
|
|
3473
3497
|
}
|
|
3474
3498
|
t.exports = n;
|
|
3475
|
-
})),
|
|
3499
|
+
})), ti = /* @__PURE__ */ o(((e, t) => {
|
|
3476
3500
|
function n(e, t) {
|
|
3477
3501
|
return e === t || e !== e && t !== t;
|
|
3478
3502
|
}
|
|
3479
3503
|
t.exports = n;
|
|
3480
|
-
})),
|
|
3481
|
-
var n =
|
|
3504
|
+
})), ni = /* @__PURE__ */ o(((e, t) => {
|
|
3505
|
+
var n = ti();
|
|
3482
3506
|
function r(e, t) {
|
|
3483
3507
|
for (var r = e.length; r--;) if (n(e[r][0], t)) return r;
|
|
3484
3508
|
return -1;
|
|
3485
3509
|
}
|
|
3486
3510
|
t.exports = r;
|
|
3487
|
-
})),
|
|
3488
|
-
var n =
|
|
3511
|
+
})), ri = /* @__PURE__ */ o(((e, t) => {
|
|
3512
|
+
var n = ni(), r = Array.prototype.splice;
|
|
3489
3513
|
function i(e) {
|
|
3490
3514
|
var t = this.__data__, i = n(t, e);
|
|
3491
3515
|
return i < 0 ? !1 : (i == t.length - 1 ? t.pop() : r.call(t, i, 1), --this.size, !0);
|
|
3492
3516
|
}
|
|
3493
3517
|
t.exports = i;
|
|
3494
|
-
})),
|
|
3495
|
-
var n =
|
|
3518
|
+
})), ii = /* @__PURE__ */ o(((e, t) => {
|
|
3519
|
+
var n = ni();
|
|
3496
3520
|
function r(e) {
|
|
3497
3521
|
var t = this.__data__, r = n(t, e);
|
|
3498
3522
|
return r < 0 ? void 0 : t[r][1];
|
|
3499
3523
|
}
|
|
3500
3524
|
t.exports = r;
|
|
3501
|
-
})),
|
|
3502
|
-
var n =
|
|
3525
|
+
})), ai = /* @__PURE__ */ o(((e, t) => {
|
|
3526
|
+
var n = ni();
|
|
3503
3527
|
function r(e) {
|
|
3504
3528
|
return n(this.__data__, e) > -1;
|
|
3505
3529
|
}
|
|
3506
3530
|
t.exports = r;
|
|
3507
|
-
})),
|
|
3508
|
-
var n =
|
|
3531
|
+
})), oi = /* @__PURE__ */ o(((e, t) => {
|
|
3532
|
+
var n = ni();
|
|
3509
3533
|
function r(e, t) {
|
|
3510
3534
|
var r = this.__data__, i = n(r, e);
|
|
3511
3535
|
return i < 0 ? (++this.size, r.push([e, t])) : r[i][1] = t, this;
|
|
3512
3536
|
}
|
|
3513
3537
|
t.exports = r;
|
|
3514
|
-
})),
|
|
3515
|
-
var n =
|
|
3538
|
+
})), si = /* @__PURE__ */ o(((e, t) => {
|
|
3539
|
+
var n = ei(), r = ri(), i = ii(), a = ai(), o = oi();
|
|
3516
3540
|
function s(e) {
|
|
3517
3541
|
var t = -1, n = e == null ? 0 : e.length;
|
|
3518
3542
|
for (this.clear(); ++t < n;) {
|
|
@@ -3521,37 +3545,37 @@ var Zr = class {
|
|
|
3521
3545
|
}
|
|
3522
3546
|
}
|
|
3523
3547
|
s.prototype.clear = n, s.prototype.delete = r, s.prototype.get = i, s.prototype.has = a, s.prototype.set = o, t.exports = s;
|
|
3524
|
-
})),
|
|
3525
|
-
var n =
|
|
3548
|
+
})), ci = /* @__PURE__ */ o(((e, t) => {
|
|
3549
|
+
var n = si();
|
|
3526
3550
|
function r() {
|
|
3527
3551
|
this.__data__ = new n(), this.size = 0;
|
|
3528
3552
|
}
|
|
3529
3553
|
t.exports = r;
|
|
3530
|
-
})),
|
|
3554
|
+
})), li = /* @__PURE__ */ o(((e, t) => {
|
|
3531
3555
|
function n(e) {
|
|
3532
3556
|
var t = this.__data__, n = t.delete(e);
|
|
3533
3557
|
return this.size = t.size, n;
|
|
3534
3558
|
}
|
|
3535
3559
|
t.exports = n;
|
|
3536
|
-
})),
|
|
3560
|
+
})), ui = /* @__PURE__ */ o(((e, t) => {
|
|
3537
3561
|
function n(e) {
|
|
3538
3562
|
return this.__data__.get(e);
|
|
3539
3563
|
}
|
|
3540
3564
|
t.exports = n;
|
|
3541
|
-
})),
|
|
3565
|
+
})), di = /* @__PURE__ */ o(((e, t) => {
|
|
3542
3566
|
function n(e) {
|
|
3543
3567
|
return this.__data__.has(e);
|
|
3544
3568
|
}
|
|
3545
3569
|
t.exports = n;
|
|
3546
|
-
})), ui = /* @__PURE__ */ o(((e, t) => {
|
|
3547
|
-
t.exports = typeof global == "object" && global && global.Object === Object && global;
|
|
3548
|
-
})), di = /* @__PURE__ */ o(((e, t) => {
|
|
3549
|
-
var n = ui(), r = typeof self == "object" && self && self.Object === Object && self;
|
|
3550
|
-
t.exports = n || r || Function("return this")();
|
|
3551
3570
|
})), fi = /* @__PURE__ */ o(((e, t) => {
|
|
3552
|
-
t.exports =
|
|
3571
|
+
t.exports = typeof global == "object" && global && global.Object === Object && global;
|
|
3553
3572
|
})), pi = /* @__PURE__ */ o(((e, t) => {
|
|
3554
|
-
var n = fi(), r =
|
|
3573
|
+
var n = fi(), r = typeof self == "object" && self && self.Object === Object && self;
|
|
3574
|
+
t.exports = n || r || Function("return this")();
|
|
3575
|
+
})), mi = /* @__PURE__ */ o(((e, t) => {
|
|
3576
|
+
t.exports = pi().Symbol;
|
|
3577
|
+
})), hi = /* @__PURE__ */ o(((e, t) => {
|
|
3578
|
+
var n = mi(), r = Object.prototype, i = r.hasOwnProperty, a = r.toString, o = n ? n.toStringTag : void 0;
|
|
3555
3579
|
function s(e) {
|
|
3556
3580
|
var t = i.call(e, o), n = e[o];
|
|
3557
3581
|
try {
|
|
@@ -3562,36 +3586,36 @@ var Zr = class {
|
|
|
3562
3586
|
return r && (t ? e[o] = n : delete e[o]), s;
|
|
3563
3587
|
}
|
|
3564
3588
|
t.exports = s;
|
|
3565
|
-
})),
|
|
3589
|
+
})), gi = /* @__PURE__ */ o(((e, t) => {
|
|
3566
3590
|
var n = Object.prototype.toString;
|
|
3567
3591
|
function r(e) {
|
|
3568
3592
|
return n.call(e);
|
|
3569
3593
|
}
|
|
3570
3594
|
t.exports = r;
|
|
3571
|
-
})),
|
|
3572
|
-
var n =
|
|
3595
|
+
})), _i = /* @__PURE__ */ o(((e, t) => {
|
|
3596
|
+
var n = mi(), r = hi(), i = gi(), a = "[object Null]", o = "[object Undefined]", s = n ? n.toStringTag : void 0;
|
|
3573
3597
|
function c(e) {
|
|
3574
3598
|
return e == null ? e === void 0 ? o : a : s && s in Object(e) ? r(e) : i(e);
|
|
3575
3599
|
}
|
|
3576
3600
|
t.exports = c;
|
|
3577
|
-
})),
|
|
3601
|
+
})), vi = /* @__PURE__ */ o(((e, t) => {
|
|
3578
3602
|
function n(e) {
|
|
3579
3603
|
var t = typeof e;
|
|
3580
3604
|
return e != null && (t == "object" || t == "function");
|
|
3581
3605
|
}
|
|
3582
3606
|
t.exports = n;
|
|
3583
|
-
})),
|
|
3584
|
-
var n =
|
|
3607
|
+
})), yi = /* @__PURE__ */ o(((e, t) => {
|
|
3608
|
+
var n = _i(), r = vi(), i = "[object AsyncFunction]", a = "[object Function]", o = "[object GeneratorFunction]", s = "[object Proxy]";
|
|
3585
3609
|
function c(e) {
|
|
3586
3610
|
if (!r(e)) return !1;
|
|
3587
3611
|
var t = n(e);
|
|
3588
3612
|
return t == a || t == o || t == i || t == s;
|
|
3589
3613
|
}
|
|
3590
3614
|
t.exports = c;
|
|
3591
|
-
})),
|
|
3592
|
-
t.exports =
|
|
3593
|
-
})),
|
|
3594
|
-
var n =
|
|
3615
|
+
})), bi = /* @__PURE__ */ o(((e, t) => {
|
|
3616
|
+
t.exports = pi()["__core-js_shared__"];
|
|
3617
|
+
})), xi = /* @__PURE__ */ o(((e, t) => {
|
|
3618
|
+
var n = bi(), r = function() {
|
|
3595
3619
|
var e = /[^.]+$/.exec(n && n.keys && n.keys.IE_PROTO || "");
|
|
3596
3620
|
return e ? "Symbol(src)_1." + e : "";
|
|
3597
3621
|
}();
|
|
@@ -3599,7 +3623,7 @@ var Zr = class {
|
|
|
3599
3623
|
return !!r && r in e;
|
|
3600
3624
|
}
|
|
3601
3625
|
t.exports = i;
|
|
3602
|
-
})),
|
|
3626
|
+
})), Si = /* @__PURE__ */ o(((e, t) => {
|
|
3603
3627
|
var n = Function.prototype.toString;
|
|
3604
3628
|
function r(e) {
|
|
3605
3629
|
if (e != null) {
|
|
@@ -3613,42 +3637,42 @@ var Zr = class {
|
|
|
3613
3637
|
return "";
|
|
3614
3638
|
}
|
|
3615
3639
|
t.exports = r;
|
|
3616
|
-
})),
|
|
3617
|
-
var n =
|
|
3640
|
+
})), Ci = /* @__PURE__ */ o(((e, t) => {
|
|
3641
|
+
var n = yi(), r = xi(), i = vi(), a = Si(), o = /[\\^$.*+?()[\]{}|]/g, s = /^\[object .+?Constructor\]$/, c = Function.prototype, l = Object.prototype, u = c.toString, d = l.hasOwnProperty, f = RegExp("^" + u.call(d).replace(o, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
3618
3642
|
function p(e) {
|
|
3619
3643
|
return !i(e) || r(e) ? !1 : (n(e) ? f : s).test(a(e));
|
|
3620
3644
|
}
|
|
3621
3645
|
t.exports = p;
|
|
3622
|
-
})),
|
|
3646
|
+
})), wi = /* @__PURE__ */ o(((e, t) => {
|
|
3623
3647
|
function n(e, t) {
|
|
3624
3648
|
return e?.[t];
|
|
3625
3649
|
}
|
|
3626
3650
|
t.exports = n;
|
|
3627
|
-
})),
|
|
3628
|
-
var n =
|
|
3651
|
+
})), Ti = /* @__PURE__ */ o(((e, t) => {
|
|
3652
|
+
var n = Ci(), r = wi();
|
|
3629
3653
|
function i(e, t) {
|
|
3630
3654
|
var i = r(e, t);
|
|
3631
3655
|
return n(i) ? i : void 0;
|
|
3632
3656
|
}
|
|
3633
3657
|
t.exports = i;
|
|
3634
|
-
})), wi = /* @__PURE__ */ o(((e, t) => {
|
|
3635
|
-
t.exports = Ci()(di(), "Map");
|
|
3636
|
-
})), Ti = /* @__PURE__ */ o(((e, t) => {
|
|
3637
|
-
t.exports = Ci()(Object, "create");
|
|
3638
3658
|
})), Ei = /* @__PURE__ */ o(((e, t) => {
|
|
3639
|
-
|
|
3659
|
+
t.exports = Ti()(pi(), "Map");
|
|
3660
|
+
})), Di = /* @__PURE__ */ o(((e, t) => {
|
|
3661
|
+
t.exports = Ti()(Object, "create");
|
|
3662
|
+
})), Oi = /* @__PURE__ */ o(((e, t) => {
|
|
3663
|
+
var n = Di();
|
|
3640
3664
|
function r() {
|
|
3641
3665
|
this.__data__ = n ? n(null) : {}, this.size = 0;
|
|
3642
3666
|
}
|
|
3643
3667
|
t.exports = r;
|
|
3644
|
-
})),
|
|
3668
|
+
})), ki = /* @__PURE__ */ o(((e, t) => {
|
|
3645
3669
|
function n(e) {
|
|
3646
3670
|
var t = this.has(e) && delete this.__data__[e];
|
|
3647
3671
|
return this.size -= +!!t, t;
|
|
3648
3672
|
}
|
|
3649
3673
|
t.exports = n;
|
|
3650
|
-
})),
|
|
3651
|
-
var n =
|
|
3674
|
+
})), Ai = /* @__PURE__ */ o(((e, t) => {
|
|
3675
|
+
var n = Di(), r = "__lodash_hash_undefined__", i = Object.prototype.hasOwnProperty;
|
|
3652
3676
|
function a(e) {
|
|
3653
3677
|
var t = this.__data__;
|
|
3654
3678
|
if (n) {
|
|
@@ -3658,22 +3682,22 @@ var Zr = class {
|
|
|
3658
3682
|
return i.call(t, e) ? t[e] : void 0;
|
|
3659
3683
|
}
|
|
3660
3684
|
t.exports = a;
|
|
3661
|
-
})),
|
|
3662
|
-
var n =
|
|
3685
|
+
})), ji = /* @__PURE__ */ o(((e, t) => {
|
|
3686
|
+
var n = Di(), r = Object.prototype.hasOwnProperty;
|
|
3663
3687
|
function i(e) {
|
|
3664
3688
|
var t = this.__data__;
|
|
3665
3689
|
return n ? t[e] !== void 0 : r.call(t, e);
|
|
3666
3690
|
}
|
|
3667
3691
|
t.exports = i;
|
|
3668
|
-
})),
|
|
3669
|
-
var n =
|
|
3692
|
+
})), Mi = /* @__PURE__ */ o(((e, t) => {
|
|
3693
|
+
var n = Di(), r = "__lodash_hash_undefined__";
|
|
3670
3694
|
function i(e, t) {
|
|
3671
3695
|
var i = this.__data__;
|
|
3672
3696
|
return this.size += +!this.has(e), i[e] = n && t === void 0 ? r : t, this;
|
|
3673
3697
|
}
|
|
3674
3698
|
t.exports = i;
|
|
3675
|
-
})),
|
|
3676
|
-
var n =
|
|
3699
|
+
})), Ni = /* @__PURE__ */ o(((e, t) => {
|
|
3700
|
+
var n = Oi(), r = ki(), i = Ai(), a = ji(), o = Mi();
|
|
3677
3701
|
function s(e) {
|
|
3678
3702
|
var t = -1, n = e == null ? 0 : e.length;
|
|
3679
3703
|
for (this.clear(); ++t < n;) {
|
|
@@ -3682,8 +3706,8 @@ var Zr = class {
|
|
|
3682
3706
|
}
|
|
3683
3707
|
}
|
|
3684
3708
|
s.prototype.clear = n, s.prototype.delete = r, s.prototype.get = i, s.prototype.has = a, s.prototype.set = o, t.exports = s;
|
|
3685
|
-
})),
|
|
3686
|
-
var n =
|
|
3709
|
+
})), Pi = /* @__PURE__ */ o(((e, t) => {
|
|
3710
|
+
var n = Ni(), r = si(), i = Ei();
|
|
3687
3711
|
function a() {
|
|
3688
3712
|
this.size = 0, this.__data__ = {
|
|
3689
3713
|
hash: new n(),
|
|
@@ -3692,47 +3716,47 @@ var Zr = class {
|
|
|
3692
3716
|
};
|
|
3693
3717
|
}
|
|
3694
3718
|
t.exports = a;
|
|
3695
|
-
})),
|
|
3719
|
+
})), Fi = /* @__PURE__ */ o(((e, t) => {
|
|
3696
3720
|
function n(e) {
|
|
3697
3721
|
var t = typeof e;
|
|
3698
3722
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
3699
3723
|
}
|
|
3700
3724
|
t.exports = n;
|
|
3701
|
-
})),
|
|
3702
|
-
var n =
|
|
3725
|
+
})), Ii = /* @__PURE__ */ o(((e, t) => {
|
|
3726
|
+
var n = Fi();
|
|
3703
3727
|
function r(e, t) {
|
|
3704
3728
|
var r = e.__data__;
|
|
3705
3729
|
return n(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
|
|
3706
3730
|
}
|
|
3707
3731
|
t.exports = r;
|
|
3708
|
-
})),
|
|
3709
|
-
var n =
|
|
3732
|
+
})), Li = /* @__PURE__ */ o(((e, t) => {
|
|
3733
|
+
var n = Ii();
|
|
3710
3734
|
function r(e) {
|
|
3711
3735
|
var t = n(this, e).delete(e);
|
|
3712
3736
|
return this.size -= +!!t, t;
|
|
3713
3737
|
}
|
|
3714
3738
|
t.exports = r;
|
|
3715
|
-
})),
|
|
3716
|
-
var n =
|
|
3739
|
+
})), Ri = /* @__PURE__ */ o(((e, t) => {
|
|
3740
|
+
var n = Ii();
|
|
3717
3741
|
function r(e) {
|
|
3718
3742
|
return n(this, e).get(e);
|
|
3719
3743
|
}
|
|
3720
3744
|
t.exports = r;
|
|
3721
|
-
})),
|
|
3722
|
-
var n =
|
|
3745
|
+
})), zi = /* @__PURE__ */ o(((e, t) => {
|
|
3746
|
+
var n = Ii();
|
|
3723
3747
|
function r(e) {
|
|
3724
3748
|
return n(this, e).has(e);
|
|
3725
3749
|
}
|
|
3726
3750
|
t.exports = r;
|
|
3727
|
-
})),
|
|
3728
|
-
var n =
|
|
3751
|
+
})), Bi = /* @__PURE__ */ o(((e, t) => {
|
|
3752
|
+
var n = Ii();
|
|
3729
3753
|
function r(e, t) {
|
|
3730
3754
|
var r = n(this, e), i = r.size;
|
|
3731
3755
|
return r.set(e, t), this.size += r.size == i ? 0 : 1, this;
|
|
3732
3756
|
}
|
|
3733
3757
|
t.exports = r;
|
|
3734
|
-
})),
|
|
3735
|
-
var n =
|
|
3758
|
+
})), Vi = /* @__PURE__ */ o(((e, t) => {
|
|
3759
|
+
var n = Pi(), r = Li(), i = Ri(), a = zi(), o = Bi();
|
|
3736
3760
|
function s(e) {
|
|
3737
3761
|
var t = -1, n = e == null ? 0 : e.length;
|
|
3738
3762
|
for (this.clear(); ++t < n;) {
|
|
@@ -3741,8 +3765,8 @@ var Zr = class {
|
|
|
3741
3765
|
}
|
|
3742
3766
|
}
|
|
3743
3767
|
s.prototype.clear = n, s.prototype.delete = r, s.prototype.get = i, s.prototype.has = a, s.prototype.set = o, t.exports = s;
|
|
3744
|
-
})),
|
|
3745
|
-
var n =
|
|
3768
|
+
})), Hi = /* @__PURE__ */ o(((e, t) => {
|
|
3769
|
+
var n = si(), r = Ei(), i = Vi(), a = 200;
|
|
3746
3770
|
function o(e, t) {
|
|
3747
3771
|
var o = this.__data__;
|
|
3748
3772
|
if (o instanceof n) {
|
|
@@ -3753,22 +3777,22 @@ var Zr = class {
|
|
|
3753
3777
|
return o.set(e, t), this.size = o.size, this;
|
|
3754
3778
|
}
|
|
3755
3779
|
t.exports = o;
|
|
3756
|
-
})),
|
|
3757
|
-
var n =
|
|
3780
|
+
})), Ui = /* @__PURE__ */ o(((e, t) => {
|
|
3781
|
+
var n = si(), r = ci(), i = li(), a = ui(), o = di(), s = Hi();
|
|
3758
3782
|
function c(e) {
|
|
3759
3783
|
this.size = (this.__data__ = new n(e)).size;
|
|
3760
3784
|
}
|
|
3761
3785
|
c.prototype.clear = r, c.prototype.delete = i, c.prototype.get = a, c.prototype.has = o, c.prototype.set = s, t.exports = c;
|
|
3762
|
-
})),
|
|
3763
|
-
var n =
|
|
3786
|
+
})), Wi = /* @__PURE__ */ o(((e, t) => {
|
|
3787
|
+
var n = Ti();
|
|
3764
3788
|
t.exports = function() {
|
|
3765
3789
|
try {
|
|
3766
3790
|
var e = n(Object, "defineProperty");
|
|
3767
3791
|
return e({}, "", {}), e;
|
|
3768
3792
|
} catch {}
|
|
3769
3793
|
}();
|
|
3770
|
-
})),
|
|
3771
|
-
var n =
|
|
3794
|
+
})), Gi = /* @__PURE__ */ o(((e, t) => {
|
|
3795
|
+
var n = Wi();
|
|
3772
3796
|
function r(e, t, r) {
|
|
3773
3797
|
t == "__proto__" && n ? n(e, t, {
|
|
3774
3798
|
configurable: !0,
|
|
@@ -3778,13 +3802,13 @@ var Zr = class {
|
|
|
3778
3802
|
}) : e[t] = r;
|
|
3779
3803
|
}
|
|
3780
3804
|
t.exports = r;
|
|
3781
|
-
})),
|
|
3782
|
-
var n =
|
|
3805
|
+
})), Ki = /* @__PURE__ */ o(((e, t) => {
|
|
3806
|
+
var n = Gi(), r = ti();
|
|
3783
3807
|
function i(e, t, i) {
|
|
3784
3808
|
(i !== void 0 && !r(e[t], i) || i === void 0 && !(t in e)) && n(e, t, i);
|
|
3785
3809
|
}
|
|
3786
3810
|
t.exports = i;
|
|
3787
|
-
})),
|
|
3811
|
+
})), qi = /* @__PURE__ */ o(((e, t) => {
|
|
3788
3812
|
function n(e) {
|
|
3789
3813
|
return function(t, n, r) {
|
|
3790
3814
|
for (var i = -1, a = Object(t), o = r(t), s = o.length; s--;) {
|
|
@@ -3795,41 +3819,41 @@ var Zr = class {
|
|
|
3795
3819
|
};
|
|
3796
3820
|
}
|
|
3797
3821
|
t.exports = n;
|
|
3798
|
-
})),
|
|
3799
|
-
t.exports =
|
|
3800
|
-
})),
|
|
3801
|
-
var n =
|
|
3822
|
+
})), Ji = /* @__PURE__ */ o(((e, t) => {
|
|
3823
|
+
t.exports = qi()();
|
|
3824
|
+
})), Yi = /* @__PURE__ */ o(((e, t) => {
|
|
3825
|
+
var n = pi(), r = typeof e == "object" && e && !e.nodeType && e, i = r && typeof t == "object" && t && !t.nodeType && t, a = i && i.exports === r ? n.Buffer : void 0, o = a ? a.allocUnsafe : void 0;
|
|
3802
3826
|
function s(e, t) {
|
|
3803
3827
|
if (t) return e.slice();
|
|
3804
3828
|
var n = e.length, r = o ? o(n) : new e.constructor(n);
|
|
3805
3829
|
return e.copy(r), r;
|
|
3806
3830
|
}
|
|
3807
3831
|
t.exports = s;
|
|
3808
|
-
})),
|
|
3809
|
-
t.exports =
|
|
3810
|
-
})),
|
|
3811
|
-
var n =
|
|
3832
|
+
})), Xi = /* @__PURE__ */ o(((e, t) => {
|
|
3833
|
+
t.exports = pi().Uint8Array;
|
|
3834
|
+
})), Zi = /* @__PURE__ */ o(((e, t) => {
|
|
3835
|
+
var n = Xi();
|
|
3812
3836
|
function r(e) {
|
|
3813
3837
|
var t = new e.constructor(e.byteLength);
|
|
3814
3838
|
return new n(t).set(new n(e)), t;
|
|
3815
3839
|
}
|
|
3816
3840
|
t.exports = r;
|
|
3817
|
-
})),
|
|
3818
|
-
var n =
|
|
3841
|
+
})), Qi = /* @__PURE__ */ o(((e, t) => {
|
|
3842
|
+
var n = Zi();
|
|
3819
3843
|
function r(e, t) {
|
|
3820
3844
|
var r = t ? n(e.buffer) : e.buffer;
|
|
3821
3845
|
return new e.constructor(r, e.byteOffset, e.length);
|
|
3822
3846
|
}
|
|
3823
3847
|
t.exports = r;
|
|
3824
|
-
})),
|
|
3848
|
+
})), $i = /* @__PURE__ */ o(((e, t) => {
|
|
3825
3849
|
function n(e, t) {
|
|
3826
3850
|
var n = -1, r = e.length;
|
|
3827
3851
|
for (t ||= Array(r); ++n < r;) t[n] = e[n];
|
|
3828
3852
|
return t;
|
|
3829
3853
|
}
|
|
3830
3854
|
t.exports = n;
|
|
3831
|
-
})),
|
|
3832
|
-
var n =
|
|
3855
|
+
})), ea = /* @__PURE__ */ o(((e, t) => {
|
|
3856
|
+
var n = vi(), r = Object.create;
|
|
3833
3857
|
t.exports = function() {
|
|
3834
3858
|
function e() {}
|
|
3835
3859
|
return function(t) {
|
|
@@ -3840,76 +3864,76 @@ var Zr = class {
|
|
|
3840
3864
|
return e.prototype = void 0, i;
|
|
3841
3865
|
};
|
|
3842
3866
|
}();
|
|
3843
|
-
})),
|
|
3867
|
+
})), ta = /* @__PURE__ */ o(((e, t) => {
|
|
3844
3868
|
function n(e, t) {
|
|
3845
3869
|
return function(n) {
|
|
3846
3870
|
return e(t(n));
|
|
3847
3871
|
};
|
|
3848
3872
|
}
|
|
3849
3873
|
t.exports = n;
|
|
3850
|
-
})),
|
|
3851
|
-
t.exports =
|
|
3852
|
-
})),
|
|
3874
|
+
})), na = /* @__PURE__ */ o(((e, t) => {
|
|
3875
|
+
t.exports = ta()(Object.getPrototypeOf, Object);
|
|
3876
|
+
})), ra = /* @__PURE__ */ o(((e, t) => {
|
|
3853
3877
|
var n = Object.prototype;
|
|
3854
3878
|
function r(e) {
|
|
3855
3879
|
var t = e && e.constructor;
|
|
3856
3880
|
return e === (typeof t == "function" && t.prototype || n);
|
|
3857
3881
|
}
|
|
3858
3882
|
t.exports = r;
|
|
3859
|
-
})),
|
|
3860
|
-
var n =
|
|
3883
|
+
})), ia = /* @__PURE__ */ o(((e, t) => {
|
|
3884
|
+
var n = ea(), r = na(), i = ra();
|
|
3861
3885
|
function a(e) {
|
|
3862
3886
|
return typeof e.constructor == "function" && !i(e) ? n(r(e)) : {};
|
|
3863
3887
|
}
|
|
3864
3888
|
t.exports = a;
|
|
3865
|
-
})),
|
|
3889
|
+
})), aa = /* @__PURE__ */ o(((e, t) => {
|
|
3866
3890
|
function n(e) {
|
|
3867
3891
|
return typeof e == "object" && !!e;
|
|
3868
3892
|
}
|
|
3869
3893
|
t.exports = n;
|
|
3870
|
-
})),
|
|
3871
|
-
var n =
|
|
3894
|
+
})), oa = /* @__PURE__ */ o(((e, t) => {
|
|
3895
|
+
var n = _i(), r = aa(), i = "[object Arguments]";
|
|
3872
3896
|
function a(e) {
|
|
3873
3897
|
return r(e) && n(e) == i;
|
|
3874
3898
|
}
|
|
3875
3899
|
t.exports = a;
|
|
3876
|
-
})),
|
|
3877
|
-
var n =
|
|
3900
|
+
})), sa = /* @__PURE__ */ o(((e, t) => {
|
|
3901
|
+
var n = oa(), r = aa(), i = Object.prototype, a = i.hasOwnProperty, o = i.propertyIsEnumerable;
|
|
3878
3902
|
t.exports = n(function() {
|
|
3879
3903
|
return arguments;
|
|
3880
3904
|
}()) ? n : function(e) {
|
|
3881
3905
|
return r(e) && a.call(e, "callee") && !o.call(e, "callee");
|
|
3882
3906
|
};
|
|
3883
|
-
})),
|
|
3907
|
+
})), ca = /* @__PURE__ */ o(((e, t) => {
|
|
3884
3908
|
t.exports = Array.isArray;
|
|
3885
|
-
})),
|
|
3909
|
+
})), la = /* @__PURE__ */ o(((e, t) => {
|
|
3886
3910
|
var n = 9007199254740991;
|
|
3887
3911
|
function r(e) {
|
|
3888
3912
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= n;
|
|
3889
3913
|
}
|
|
3890
3914
|
t.exports = r;
|
|
3891
|
-
})),
|
|
3892
|
-
var n =
|
|
3915
|
+
})), ua = /* @__PURE__ */ o(((e, t) => {
|
|
3916
|
+
var n = yi(), r = la();
|
|
3893
3917
|
function i(e) {
|
|
3894
3918
|
return e != null && r(e.length) && !n(e);
|
|
3895
3919
|
}
|
|
3896
3920
|
t.exports = i;
|
|
3897
|
-
})),
|
|
3898
|
-
var n =
|
|
3921
|
+
})), da = /* @__PURE__ */ o(((e, t) => {
|
|
3922
|
+
var n = ua(), r = aa();
|
|
3899
3923
|
function i(e) {
|
|
3900
3924
|
return r(e) && n(e);
|
|
3901
3925
|
}
|
|
3902
3926
|
t.exports = i;
|
|
3903
|
-
})),
|
|
3927
|
+
})), fa = /* @__PURE__ */ o(((e, t) => {
|
|
3904
3928
|
function n() {
|
|
3905
3929
|
return !1;
|
|
3906
3930
|
}
|
|
3907
3931
|
t.exports = n;
|
|
3908
|
-
})),
|
|
3909
|
-
var n =
|
|
3932
|
+
})), pa = /* @__PURE__ */ o(((e, t) => {
|
|
3933
|
+
var n = pi(), r = fa(), i = typeof e == "object" && e && !e.nodeType && e, a = i && typeof t == "object" && t && !t.nodeType && t, o = a && a.exports === i ? n.Buffer : void 0;
|
|
3910
3934
|
t.exports = (o ? o.isBuffer : void 0) || r;
|
|
3911
|
-
})),
|
|
3912
|
-
var n =
|
|
3935
|
+
})), ma = /* @__PURE__ */ o(((e, t) => {
|
|
3936
|
+
var n = _i(), r = na(), i = aa(), a = "[object Object]", o = Function.prototype, s = Object.prototype, c = o.toString, l = s.hasOwnProperty, u = c.call(Object);
|
|
3913
3937
|
function d(e) {
|
|
3914
3938
|
if (!i(e) || n(e) != a) return !1;
|
|
3915
3939
|
var t = r(e);
|
|
@@ -3918,44 +3942,44 @@ var Zr = class {
|
|
|
3918
3942
|
return typeof o == "function" && o instanceof o && c.call(o) == u;
|
|
3919
3943
|
}
|
|
3920
3944
|
t.exports = d;
|
|
3921
|
-
})),
|
|
3922
|
-
var n =
|
|
3945
|
+
})), ha = /* @__PURE__ */ o(((e, t) => {
|
|
3946
|
+
var n = _i(), r = la(), i = aa(), a = "[object Arguments]", o = "[object Array]", s = "[object Boolean]", c = "[object Date]", l = "[object Error]", u = "[object Function]", d = "[object Map]", f = "[object Number]", p = "[object Object]", m = "[object RegExp]", h = "[object Set]", g = "[object String]", _ = "[object WeakMap]", v = "[object ArrayBuffer]", y = "[object DataView]", b = "[object Float32Array]", x = "[object Float64Array]", S = "[object Int8Array]", C = "[object Int16Array]", w = "[object Int32Array]", T = "[object Uint8Array]", E = "[object Uint8ClampedArray]", ee = "[object Uint16Array]", D = "[object Uint32Array]", O = {};
|
|
3923
3947
|
O[b] = O[x] = O[S] = O[C] = O[w] = O[T] = O[E] = O[ee] = O[D] = !0, O[a] = O[o] = O[v] = O[s] = O[y] = O[c] = O[l] = O[u] = O[d] = O[f] = O[p] = O[m] = O[h] = O[g] = O[_] = !1;
|
|
3924
3948
|
function te(e) {
|
|
3925
3949
|
return i(e) && r(e.length) && !!O[n(e)];
|
|
3926
3950
|
}
|
|
3927
3951
|
t.exports = te;
|
|
3928
|
-
})),
|
|
3952
|
+
})), ga = /* @__PURE__ */ o(((e, t) => {
|
|
3929
3953
|
function n(e) {
|
|
3930
3954
|
return function(t) {
|
|
3931
3955
|
return e(t);
|
|
3932
3956
|
};
|
|
3933
3957
|
}
|
|
3934
3958
|
t.exports = n;
|
|
3935
|
-
})),
|
|
3936
|
-
var n =
|
|
3959
|
+
})), _a = /* @__PURE__ */ o(((e, t) => {
|
|
3960
|
+
var n = fi(), r = typeof e == "object" && e && !e.nodeType && e, i = r && typeof t == "object" && t && !t.nodeType && t, a = i && i.exports === r && n.process;
|
|
3937
3961
|
t.exports = function() {
|
|
3938
3962
|
try {
|
|
3939
3963
|
return i && i.require && i.require("util").types || a && a.binding && a.binding("util");
|
|
3940
3964
|
} catch {}
|
|
3941
3965
|
}();
|
|
3942
|
-
})),
|
|
3943
|
-
var n =
|
|
3966
|
+
})), va = /* @__PURE__ */ o(((e, t) => {
|
|
3967
|
+
var n = ha(), r = ga(), i = _a(), a = i && i.isTypedArray;
|
|
3944
3968
|
t.exports = a ? r(a) : n;
|
|
3945
|
-
})),
|
|
3969
|
+
})), ya = /* @__PURE__ */ o(((e, t) => {
|
|
3946
3970
|
function n(e, t) {
|
|
3947
3971
|
if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__") return e[t];
|
|
3948
3972
|
}
|
|
3949
3973
|
t.exports = n;
|
|
3950
|
-
})),
|
|
3951
|
-
var n =
|
|
3974
|
+
})), ba = /* @__PURE__ */ o(((e, t) => {
|
|
3975
|
+
var n = Gi(), r = ti(), i = Object.prototype.hasOwnProperty;
|
|
3952
3976
|
function a(e, t, a) {
|
|
3953
3977
|
var o = e[t];
|
|
3954
3978
|
(!(i.call(e, t) && r(o, a)) || a === void 0 && !(t in e)) && n(e, t, a);
|
|
3955
3979
|
}
|
|
3956
3980
|
t.exports = a;
|
|
3957
|
-
})),
|
|
3958
|
-
var n =
|
|
3981
|
+
})), xa = /* @__PURE__ */ o(((e, t) => {
|
|
3982
|
+
var n = ba(), r = Gi();
|
|
3959
3983
|
function i(e, t, i, a) {
|
|
3960
3984
|
var o = !i;
|
|
3961
3985
|
i ||= {};
|
|
@@ -3966,36 +3990,36 @@ var Zr = class {
|
|
|
3966
3990
|
return i;
|
|
3967
3991
|
}
|
|
3968
3992
|
t.exports = i;
|
|
3969
|
-
})),
|
|
3993
|
+
})), Sa = /* @__PURE__ */ o(((e, t) => {
|
|
3970
3994
|
function n(e, t) {
|
|
3971
3995
|
for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n);
|
|
3972
3996
|
return r;
|
|
3973
3997
|
}
|
|
3974
3998
|
t.exports = n;
|
|
3975
|
-
})),
|
|
3999
|
+
})), Ca = /* @__PURE__ */ o(((e, t) => {
|
|
3976
4000
|
var n = 9007199254740991, r = /^(?:0|[1-9]\d*)$/;
|
|
3977
4001
|
function i(e, t) {
|
|
3978
4002
|
var i = typeof e;
|
|
3979
4003
|
return t ??= n, !!t && (i == "number" || i != "symbol" && r.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
3980
4004
|
}
|
|
3981
4005
|
t.exports = i;
|
|
3982
|
-
})),
|
|
3983
|
-
var n =
|
|
4006
|
+
})), wa = /* @__PURE__ */ o(((e, t) => {
|
|
4007
|
+
var n = Sa(), r = sa(), i = ca(), a = pa(), o = Ca(), s = va(), c = Object.prototype.hasOwnProperty;
|
|
3984
4008
|
function l(e, t) {
|
|
3985
4009
|
var l = i(e), u = !l && r(e), d = !l && !u && a(e), f = !l && !u && !d && s(e), p = l || u || d || f, m = p ? n(e.length, String) : [], h = m.length;
|
|
3986
4010
|
for (var g in e) (t || c.call(e, g)) && !(p && (g == "length" || d && (g == "offset" || g == "parent") || f && (g == "buffer" || g == "byteLength" || g == "byteOffset") || o(g, h))) && m.push(g);
|
|
3987
4011
|
return m;
|
|
3988
4012
|
}
|
|
3989
4013
|
t.exports = l;
|
|
3990
|
-
})),
|
|
4014
|
+
})), Ta = /* @__PURE__ */ o(((e, t) => {
|
|
3991
4015
|
function n(e) {
|
|
3992
4016
|
var t = [];
|
|
3993
4017
|
if (e != null) for (var n in Object(e)) t.push(n);
|
|
3994
4018
|
return t;
|
|
3995
4019
|
}
|
|
3996
4020
|
t.exports = n;
|
|
3997
|
-
})),
|
|
3998
|
-
var n =
|
|
4021
|
+
})), Ea = /* @__PURE__ */ o(((e, t) => {
|
|
4022
|
+
var n = vi(), r = ra(), i = Ta(), a = Object.prototype.hasOwnProperty;
|
|
3999
4023
|
function o(e) {
|
|
4000
4024
|
if (!n(e)) return i(e);
|
|
4001
4025
|
var t = r(e), o = [];
|
|
@@ -4003,20 +4027,20 @@ var Zr = class {
|
|
|
4003
4027
|
return o;
|
|
4004
4028
|
}
|
|
4005
4029
|
t.exports = o;
|
|
4006
|
-
})),
|
|
4007
|
-
var n =
|
|
4030
|
+
})), Da = /* @__PURE__ */ o(((e, t) => {
|
|
4031
|
+
var n = wa(), r = Ea(), i = ua();
|
|
4008
4032
|
function a(e) {
|
|
4009
4033
|
return i(e) ? n(e, !0) : r(e);
|
|
4010
4034
|
}
|
|
4011
4035
|
t.exports = a;
|
|
4012
|
-
})),
|
|
4013
|
-
var n =
|
|
4036
|
+
})), Oa = /* @__PURE__ */ o(((e, t) => {
|
|
4037
|
+
var n = xa(), r = Da();
|
|
4014
4038
|
function i(e) {
|
|
4015
4039
|
return n(e, r(e));
|
|
4016
4040
|
}
|
|
4017
4041
|
t.exports = i;
|
|
4018
|
-
})),
|
|
4019
|
-
var n =
|
|
4042
|
+
})), ka = /* @__PURE__ */ o(((e, t) => {
|
|
4043
|
+
var n = Ki(), r = Yi(), i = Qi(), a = $i(), o = ia(), s = sa(), c = ca(), l = da(), u = pa(), d = yi(), f = vi(), p = ma(), m = va(), h = ya(), g = Oa();
|
|
4020
4044
|
function _(e, t, _, v, y, b, x) {
|
|
4021
4045
|
var S = h(e, _), C = h(t, _), w = x.get(C);
|
|
4022
4046
|
if (w) {
|
|
@@ -4031,8 +4055,8 @@ var Zr = class {
|
|
|
4031
4055
|
E && (x.set(C, T), y(T, C, v, b, x), x.delete(C)), n(e, _, T);
|
|
4032
4056
|
}
|
|
4033
4057
|
t.exports = _;
|
|
4034
|
-
})),
|
|
4035
|
-
var n =
|
|
4058
|
+
})), Aa = /* @__PURE__ */ o(((e, t) => {
|
|
4059
|
+
var n = Ui(), r = Ki(), i = Ji(), a = ka(), o = vi(), s = Da(), c = ya();
|
|
4036
4060
|
function l(e, t, u, d, f) {
|
|
4037
4061
|
e !== t && i(t, function(i, s) {
|
|
4038
4062
|
if (f ||= new n(), o(i)) a(e, t, s, u, l, d, f);
|
|
@@ -4043,12 +4067,12 @@ var Zr = class {
|
|
|
4043
4067
|
}, s);
|
|
4044
4068
|
}
|
|
4045
4069
|
t.exports = l;
|
|
4046
|
-
})),
|
|
4070
|
+
})), ja = /* @__PURE__ */ o(((e, t) => {
|
|
4047
4071
|
function n(e) {
|
|
4048
4072
|
return e;
|
|
4049
4073
|
}
|
|
4050
4074
|
t.exports = n;
|
|
4051
|
-
})),
|
|
4075
|
+
})), Ma = /* @__PURE__ */ o(((e, t) => {
|
|
4052
4076
|
function n(e, t, n) {
|
|
4053
4077
|
switch (n.length) {
|
|
4054
4078
|
case 0: return e.call(t);
|
|
@@ -4059,8 +4083,8 @@ var Zr = class {
|
|
|
4059
4083
|
return e.apply(t, n);
|
|
4060
4084
|
}
|
|
4061
4085
|
t.exports = n;
|
|
4062
|
-
})),
|
|
4063
|
-
var n =
|
|
4086
|
+
})), Na = /* @__PURE__ */ o(((e, t) => {
|
|
4087
|
+
var n = Ma(), r = Math.max;
|
|
4064
4088
|
function i(e, t, i) {
|
|
4065
4089
|
return t = r(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
4066
4090
|
for (var a = arguments, o = -1, s = r(a.length - t, 0), c = Array(s); ++o < s;) c[o] = a[t + o];
|
|
@@ -4070,15 +4094,15 @@ var Zr = class {
|
|
|
4070
4094
|
};
|
|
4071
4095
|
}
|
|
4072
4096
|
t.exports = i;
|
|
4073
|
-
})),
|
|
4097
|
+
})), Pa = /* @__PURE__ */ o(((e, t) => {
|
|
4074
4098
|
function n(e) {
|
|
4075
4099
|
return function() {
|
|
4076
4100
|
return e;
|
|
4077
4101
|
};
|
|
4078
4102
|
}
|
|
4079
4103
|
t.exports = n;
|
|
4080
|
-
})),
|
|
4081
|
-
var n =
|
|
4104
|
+
})), Fa = /* @__PURE__ */ o(((e, t) => {
|
|
4105
|
+
var n = Pa(), r = Wi(), i = ja();
|
|
4082
4106
|
t.exports = r ? function(e, t) {
|
|
4083
4107
|
return r(e, "toString", {
|
|
4084
4108
|
configurable: !0,
|
|
@@ -4087,7 +4111,7 @@ var Zr = class {
|
|
|
4087
4111
|
writable: !0
|
|
4088
4112
|
});
|
|
4089
4113
|
} : i;
|
|
4090
|
-
})),
|
|
4114
|
+
})), Ia = /* @__PURE__ */ o(((e, t) => {
|
|
4091
4115
|
var n = 800, r = 16, i = Date.now;
|
|
4092
4116
|
function a(e) {
|
|
4093
4117
|
var t = 0, a = 0;
|
|
@@ -4100,25 +4124,25 @@ var Zr = class {
|
|
|
4100
4124
|
};
|
|
4101
4125
|
}
|
|
4102
4126
|
t.exports = a;
|
|
4103
|
-
})),
|
|
4104
|
-
var n =
|
|
4105
|
-
t.exports =
|
|
4106
|
-
})),
|
|
4107
|
-
var n =
|
|
4127
|
+
})), La = /* @__PURE__ */ o(((e, t) => {
|
|
4128
|
+
var n = Fa();
|
|
4129
|
+
t.exports = Ia()(n);
|
|
4130
|
+
})), Ra = /* @__PURE__ */ o(((e, t) => {
|
|
4131
|
+
var n = ja(), r = Na(), i = La();
|
|
4108
4132
|
function a(e, t) {
|
|
4109
4133
|
return i(r(e, t, n), e + "");
|
|
4110
4134
|
}
|
|
4111
4135
|
t.exports = a;
|
|
4112
|
-
})),
|
|
4113
|
-
var n =
|
|
4136
|
+
})), za = /* @__PURE__ */ o(((e, t) => {
|
|
4137
|
+
var n = ti(), r = ua(), i = Ca(), a = vi();
|
|
4114
4138
|
function o(e, t, o) {
|
|
4115
4139
|
if (!a(o)) return !1;
|
|
4116
4140
|
var s = typeof t;
|
|
4117
4141
|
return (s == "number" ? r(o) && i(t, o.length) : s == "string" && t in o) ? n(o[t], e) : !1;
|
|
4118
4142
|
}
|
|
4119
4143
|
t.exports = o;
|
|
4120
|
-
})),
|
|
4121
|
-
var n =
|
|
4144
|
+
})), Ba = /* @__PURE__ */ o(((e, t) => {
|
|
4145
|
+
var n = Ra(), r = za();
|
|
4122
4146
|
function i(e) {
|
|
4123
4147
|
return n(function(t, n) {
|
|
4124
4148
|
var i = -1, a = n.length, o = a > 1 ? n[a - 1] : void 0, s = a > 2 ? n[2] : void 0;
|
|
@@ -4130,24 +4154,24 @@ var Zr = class {
|
|
|
4130
4154
|
});
|
|
4131
4155
|
}
|
|
4132
4156
|
t.exports = i;
|
|
4133
|
-
})),
|
|
4134
|
-
var n =
|
|
4135
|
-
t.exports =
|
|
4157
|
+
})), Va = /* @__PURE__ */ o(((e, t) => {
|
|
4158
|
+
var n = Aa();
|
|
4159
|
+
t.exports = Ba()(function(e, t, r) {
|
|
4136
4160
|
n(e, t, r);
|
|
4137
4161
|
});
|
|
4138
|
-
})),
|
|
4162
|
+
})), Ha = /* @__PURE__ */ o(((e, t) => {
|
|
4139
4163
|
t.exports = function() {
|
|
4140
4164
|
throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object");
|
|
4141
4165
|
};
|
|
4142
|
-
})),
|
|
4166
|
+
})), Ua = /* @__PURE__ */ l(Va(), 1);
|
|
4143
4167
|
typeof CustomEvent > "u" && (global.CustomEvent = class extends Event {
|
|
4144
4168
|
constructor(e, t) {
|
|
4145
4169
|
super(e, t), this.detail = t?.detail ?? null;
|
|
4146
4170
|
}
|
|
4147
4171
|
});
|
|
4148
|
-
var
|
|
4172
|
+
var Wa = class extends EventTarget {
|
|
4149
4173
|
constructor(e) {
|
|
4150
|
-
super(), this.ws = null, this.reconnectAttempt = 0, this.reconnectTimer = null, this.intentionalClose = !1, this.WebSocketImpl = e.wsImplementation ?? this.getDefaultWebSocket(), this.config = (0,
|
|
4174
|
+
super(), this.ws = null, this.reconnectAttempt = 0, this.reconnectTimer = null, this.intentionalClose = !1, this.WebSocketImpl = e.wsImplementation ?? this.getDefaultWebSocket(), this.config = (0, Ua.default)({}, e, {
|
|
4151
4175
|
reconnection: {
|
|
4152
4176
|
enabled: !0,
|
|
4153
4177
|
maxRetries: 5,
|
|
@@ -4234,19 +4258,19 @@ var Ha = class extends EventTarget {
|
|
|
4234
4258
|
log(e, t) {
|
|
4235
4259
|
if (!this.config.debug) return;
|
|
4236
4260
|
let n = `[WSClient] ${e}`;
|
|
4237
|
-
t
|
|
4261
|
+
t && qr.error(n, t);
|
|
4238
4262
|
}
|
|
4239
4263
|
getDefaultWebSocket() {
|
|
4240
4264
|
if (typeof WebSocket < "u") return WebSocket;
|
|
4241
4265
|
try {
|
|
4242
|
-
return
|
|
4266
|
+
return Ha().WebSocket;
|
|
4243
4267
|
} catch {
|
|
4244
4268
|
throw new Br("WebSocket not available. Install 'ws' package in Node.js: npm install ws", "NETWORK_ERROR");
|
|
4245
4269
|
}
|
|
4246
4270
|
}
|
|
4247
|
-
},
|
|
4271
|
+
}, Ga = class extends $r {
|
|
4248
4272
|
constructor(e) {
|
|
4249
|
-
super(e), this.ws = new
|
|
4273
|
+
super(e), this.ws = new Wa({
|
|
4250
4274
|
baseURL: e.baseURL,
|
|
4251
4275
|
authToken: e.authToken || "",
|
|
4252
4276
|
wsImplementation: e.wsImplementation
|
|
@@ -4273,13 +4297,13 @@ var Ha = class extends EventTarget {
|
|
|
4273
4297
|
off(...e) {
|
|
4274
4298
|
return this.ws.off(...e), this;
|
|
4275
4299
|
}
|
|
4276
|
-
},
|
|
4300
|
+
}, Ka;
|
|
4277
4301
|
(function(e) {
|
|
4278
4302
|
e.DISCONNECTED = "DISCONNECTED", e.CONNECTING = "CONNECTING", e.CONNECTED = "CONNECTED", e.RECONNECTING = "RECONNECTING";
|
|
4279
|
-
})(
|
|
4303
|
+
})(Ka ||= {});
|
|
4280
4304
|
//#endregion
|
|
4281
4305
|
//#region src/cache/keys.ts
|
|
4282
|
-
var
|
|
4306
|
+
var qa = ({ type: e, id: t }) => `${e}:${t}`, Ja = ({ group: e, user: t }) => `${e ? "group" : "user"}:${e || t}`, Ya = (e, t) => e.group ? `group:${e.group}` : `dm:${e.sender === t ? e.receiver : e.sender}`, Xa = /* @__PURE__ */ l((/* @__PURE__ */ o(((e, t) => {
|
|
4283
4307
|
((n, r) => {
|
|
4284
4308
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).Dexie = r();
|
|
4285
4309
|
})(e, function() {
|
|
@@ -8027,9 +8051,9 @@ var Ga = ({ type: e, id: t }) => `${e}:${t}`, Ka = ({ group: e, user: t }) => `$
|
|
|
8027
8051
|
}
|
|
8028
8052
|
}), { default: ar }), ar;
|
|
8029
8053
|
});
|
|
8030
|
-
})))(), 1),
|
|
8031
|
-
if (
|
|
8032
|
-
var { liveQuery:
|
|
8054
|
+
})))(), 1), Za = Symbol.for("Dexie"), Qa = globalThis[Za] || (globalThis[Za] = Xa.default);
|
|
8055
|
+
if (Xa.default.semVer !== Qa.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${Xa.default.semVer} and ${Qa.semVer}`);
|
|
8056
|
+
var { liveQuery: $a, mergeRanges: eo, rangesOverlap: to, RangeSet: no, cmp: ro, Entity: io, PropModification: ao, replacePrefix: oo, add: so, remove: co, DexieYProvider: lo } = Qa, uo = new class extends Qa {
|
|
8033
8057
|
summaries;
|
|
8034
8058
|
users;
|
|
8035
8059
|
messages;
|
|
@@ -8053,13 +8077,13 @@ var { liveQuery: Za, mergeRanges: Qa, rangesOverlap: $a, RangeSet: eo, cmp: to,
|
|
|
8053
8077
|
this.groups.clear()
|
|
8054
8078
|
]);
|
|
8055
8079
|
}
|
|
8056
|
-
}(),
|
|
8057
|
-
function
|
|
8080
|
+
}(), fo = 300 * 1e3;
|
|
8081
|
+
function po(e, t, n = fo) {
|
|
8058
8082
|
if (e.sender !== t.sender) return !1;
|
|
8059
8083
|
let r = new Date(e.created_at).getTime(), i = new Date(t.created_at).getTime();
|
|
8060
8084
|
return Math.abs(i - r) <= n;
|
|
8061
8085
|
}
|
|
8062
|
-
function
|
|
8086
|
+
function mo(e = "") {
|
|
8063
8087
|
let t = e.trim().split(" ").filter((e) => e.length > 0);
|
|
8064
8088
|
if (t.length >= 2) {
|
|
8065
8089
|
let e = t[0], n = t[t.length - 1];
|
|
@@ -8067,72 +8091,72 @@ function fo(e = "") {
|
|
|
8067
8091
|
}
|
|
8068
8092
|
return e.slice(0, 2).toUpperCase();
|
|
8069
8093
|
}
|
|
8070
|
-
var
|
|
8071
|
-
let n =
|
|
8094
|
+
var ho = async (e, t = {}) => {
|
|
8095
|
+
let n = yo();
|
|
8072
8096
|
if (!n) throw Error("SDK not initialized");
|
|
8073
|
-
let r =
|
|
8097
|
+
let r = qa(e);
|
|
8074
8098
|
e.type === "group" ? t.group = e.id : t.user = e.id;
|
|
8075
8099
|
let i = await n.getMessages(t);
|
|
8076
8100
|
return i.messages.map((e) => ({
|
|
8077
8101
|
...e,
|
|
8078
8102
|
conversationId: r
|
|
8079
|
-
})).forEach((e) =>
|
|
8103
|
+
})).forEach((e) => uo.messages.put(e)), uo.msgCursor.put({
|
|
8080
8104
|
...i.cursor,
|
|
8081
8105
|
id: r
|
|
8082
8106
|
}), i;
|
|
8083
|
-
},
|
|
8084
|
-
let { getActiveConversationId: n } = await Promise.resolve().then(() =>
|
|
8107
|
+
}, go = async (e, t) => {
|
|
8108
|
+
let { getActiveConversationId: n } = await Promise.resolve().then(() => So), r = Ya(e, t), i = {
|
|
8085
8109
|
...e,
|
|
8086
8110
|
conversationId: r
|
|
8087
8111
|
};
|
|
8088
|
-
await
|
|
8089
|
-
let a = await
|
|
8112
|
+
await uo.messages.put(i);
|
|
8113
|
+
let a = await uo.summaries.get(r);
|
|
8090
8114
|
if (a) {
|
|
8091
8115
|
let { unread_count: t, message_count: i } = a, o = r === n(), s = {
|
|
8092
8116
|
message_count: i + 1,
|
|
8093
8117
|
last_message_at: e.created_at,
|
|
8094
8118
|
unread_count: o ? t : t + 1
|
|
8095
8119
|
};
|
|
8096
|
-
await
|
|
8120
|
+
await uo.summaries.update(r, s);
|
|
8097
8121
|
}
|
|
8098
|
-
}, $ = null,
|
|
8099
|
-
async function
|
|
8122
|
+
}, $ = null, _o = [];
|
|
8123
|
+
async function vo(e) {
|
|
8100
8124
|
if ($) return $;
|
|
8101
|
-
e.logger && e.logger;
|
|
8125
|
+
e.logger && Jr(e.logger);
|
|
8102
8126
|
let { logger: t, ...n } = e;
|
|
8103
|
-
$ = new
|
|
8127
|
+
$ = new Ga(n), await $.connect();
|
|
8104
8128
|
let r = await $.getMe();
|
|
8105
8129
|
$.ws.on("message", (e) => {
|
|
8106
|
-
e.type === "message" &&
|
|
8130
|
+
e.type === "message" && go(e.data, r.id);
|
|
8107
8131
|
});
|
|
8108
8132
|
let i = $;
|
|
8109
|
-
return
|
|
8133
|
+
return _o.splice(0).forEach((e) => e(i)), $;
|
|
8110
8134
|
}
|
|
8111
|
-
function
|
|
8112
|
-
return e && ($ ? e($) :
|
|
8135
|
+
function yo(e) {
|
|
8136
|
+
return e && ($ ? e($) : _o.push(e)), $;
|
|
8113
8137
|
}
|
|
8114
|
-
function
|
|
8138
|
+
function bo() {
|
|
8115
8139
|
$ &&= ($.disconnect(), null);
|
|
8116
8140
|
}
|
|
8117
|
-
function
|
|
8141
|
+
function xo() {
|
|
8118
8142
|
return $ !== null;
|
|
8119
8143
|
}
|
|
8120
8144
|
//#endregion
|
|
8121
8145
|
//#region src/utils/summaries.ts
|
|
8122
|
-
var
|
|
8123
|
-
fetchSummaries: () =>
|
|
8124
|
-
getActiveConversationId: () =>
|
|
8125
|
-
setActiveConversation: () =>
|
|
8126
|
-
}),
|
|
8127
|
-
|
|
8128
|
-
},
|
|
8129
|
-
let t =
|
|
8146
|
+
var So = /* @__PURE__ */ s({
|
|
8147
|
+
fetchSummaries: () => Eo,
|
|
8148
|
+
getActiveConversationId: () => To,
|
|
8149
|
+
setActiveConversation: () => wo
|
|
8150
|
+
}), Co = null, wo = (e) => {
|
|
8151
|
+
Co = e;
|
|
8152
|
+
}, To = () => Co, Eo = async (e) => {
|
|
8153
|
+
let t = yo();
|
|
8130
8154
|
if (!t) throw Error("SDK not initialized");
|
|
8131
8155
|
let n = (await t.getMessagesSummary(e)).map((e) => ({
|
|
8132
8156
|
...e,
|
|
8133
|
-
id:
|
|
8157
|
+
id: Ja(e)
|
|
8134
8158
|
}));
|
|
8135
|
-
return await
|
|
8159
|
+
return await uo.summaries.bulkPut(n), n;
|
|
8136
8160
|
};
|
|
8137
8161
|
//#endregion
|
|
8138
|
-
export {
|
|
8162
|
+
export { gr as C, Pr as S, l as T, vi as _, yo as a, pi as b, ho as c, uo as d, Qa as f, Vi as g, aa as h, bo as i, mo as l, ca as m, wo as n, vo as o, qa as p, So as r, xo as s, Eo as t, po as u, _i as v, o as w, qr as x, mi as y };
|