buzzcasting-storage 2.0.6 → 2.0.7
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/buzzcasting-storage.esm.js +422 -422
- package/package.json +1 -1
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
var yi = Object.defineProperty;
|
|
2
|
-
var mi = (M,
|
|
3
|
-
var A = (M,
|
|
2
|
+
var mi = (M, a, v) => a in M ? yi(M, a, { enumerable: !0, configurable: !0, writable: !0, value: v }) : M[a] = v;
|
|
3
|
+
var A = (M, a, v) => (mi(M, typeof a != "symbol" ? a + "" : a, v), v);
|
|
4
4
|
const Ne = "messages", Cr = "cloud", Fn = "series", gi = "topics", vi = "keyval", bi = "local", wi = "session", _i = "dexie", ki = "window", pt = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", Bn = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", yt = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;";
|
|
5
5
|
class xi {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(a) {
|
|
7
7
|
A(this, "options");
|
|
8
8
|
A(this, "url");
|
|
9
9
|
A(this, "headers", () => {
|
|
10
|
-
const
|
|
10
|
+
const a = `Bearer ${this.options.bearer}`;
|
|
11
11
|
return {
|
|
12
12
|
headers: new Headers({
|
|
13
|
-
Authorization:
|
|
13
|
+
Authorization: a,
|
|
14
14
|
Accept: "application/json"
|
|
15
15
|
// 'X-Session-Key': localStorage.getItem('guid') || 'invalid',
|
|
16
16
|
})
|
|
17
17
|
};
|
|
18
18
|
});
|
|
19
|
-
this.options =
|
|
19
|
+
this.options = a, this.url = `https://${a.app}.buzzcasting.net`;
|
|
20
20
|
}
|
|
21
21
|
auth() {
|
|
22
22
|
var v;
|
|
23
23
|
if (!((v = this.options) != null && v.token))
|
|
24
24
|
return;
|
|
25
|
-
let
|
|
25
|
+
let a = "";
|
|
26
26
|
switch (this.options.token) {
|
|
27
27
|
case "meta":
|
|
28
|
-
|
|
28
|
+
a = `Bearer ${this.options.bearer}`;
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
return {
|
|
32
32
|
headers: new Headers({
|
|
33
|
-
Authorization:
|
|
33
|
+
Authorization: a
|
|
34
34
|
// 'X-Session-Key': localStorage.getItem('guid') || 'invalid',
|
|
35
35
|
})
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
async get(
|
|
39
|
-
const { version: v } = this.options, _ = this.headers(), j = Object.assign({},
|
|
38
|
+
async get(a) {
|
|
39
|
+
const { version: v } = this.options, _ = this.headers(), j = Object.assign({}, a);
|
|
40
40
|
delete j.slide, delete j.type;
|
|
41
41
|
const F = Object.keys(j).length > 0 ? `?${new URLSearchParams(j).toString()}` : "";
|
|
42
42
|
return console.debug(
|
|
43
43
|
"%capi",
|
|
44
44
|
yt,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
a.slide,
|
|
46
|
+
a.widget
|
|
47
47
|
), await fetch(
|
|
48
|
-
[this.url, "api", v,
|
|
48
|
+
[this.url, "api", v, a.type].join("/") + F,
|
|
49
49
|
{ ..._, method: "get" }
|
|
50
50
|
).then(async (B) => {
|
|
51
51
|
if (!B.ok)
|
|
52
52
|
throw new Error(`${B.status}`);
|
|
53
53
|
return B;
|
|
54
|
-
}).then((B) => B.json()).then((B) => (B.query =
|
|
54
|
+
}).then((B) => B.json()).then((B) => (B.query = a, B)).catch((B) => ({ succes: !1, status: parseInt(B), data: [] }));
|
|
55
55
|
}
|
|
56
|
-
async hideMessage(
|
|
56
|
+
async hideMessage(a) {
|
|
57
57
|
const { app: v, version: _ } = this.options, j = this.auth(), F = "?action=visible";
|
|
58
58
|
return console.info(
|
|
59
59
|
"%capi",
|
|
60
60
|
yt,
|
|
61
61
|
"hide",
|
|
62
|
-
[v, "api", _,
|
|
62
|
+
[v, "api", _, a.type, a.id].join("/") + F,
|
|
63
63
|
{ ...j, method: "put" }
|
|
64
64
|
), await fetch(
|
|
65
|
-
[v, "api", _,
|
|
65
|
+
[v, "api", _, a.type, a.id].join("/") + F,
|
|
66
66
|
{ ...j, method: "put" }
|
|
67
67
|
).then((B) => {
|
|
68
68
|
if (!B.ok)
|
|
@@ -76,7 +76,7 @@ function Oi(M) {
|
|
|
76
76
|
return M && M.__esModule && Object.prototype.hasOwnProperty.call(M, "default") ? M.default : M;
|
|
77
77
|
}
|
|
78
78
|
var Kr = { exports: {} };
|
|
79
|
-
(function(M,
|
|
79
|
+
(function(M, a) {
|
|
80
80
|
(function(v, _) {
|
|
81
81
|
M.exports = _();
|
|
82
82
|
})(Pr, function() {
|
|
@@ -152,10 +152,10 @@ var Kr = { exports: {} };
|
|
|
152
152
|
}
|
|
153
153
|
return n;
|
|
154
154
|
}
|
|
155
|
-
var
|
|
156
|
-
if (
|
|
157
|
-
var u = e[t.substr(0,
|
|
158
|
-
return u == null ? void 0 : ye(u, t.substr(
|
|
155
|
+
var s = t.indexOf(".");
|
|
156
|
+
if (s !== -1) {
|
|
157
|
+
var u = e[t.substr(0, s)];
|
|
158
|
+
return u == null ? void 0 : ye(u, t.substr(s + 1));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
function ce(e, t, n) {
|
|
@@ -165,8 +165,8 @@ var Kr = { exports: {} };
|
|
|
165
165
|
for (var r = 0, i = t.length; r < i; ++r)
|
|
166
166
|
ce(e, t[r], n[r]);
|
|
167
167
|
} else {
|
|
168
|
-
var o,
|
|
169
|
-
u !== -1 ? (o = t.substr(0, u), (
|
|
168
|
+
var o, s, u = t.indexOf(".");
|
|
169
|
+
u !== -1 ? (o = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? W(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : ce(u = !(u = e[o]) || !ne(e, o) ? e[o] = {} : u, s, n)) : n === void 0 ? W(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
function Vn(e) {
|
|
@@ -202,9 +202,9 @@ var Kr = { exports: {} };
|
|
|
202
202
|
} else if (Yn.has(n.constructor))
|
|
203
203
|
r = n;
|
|
204
204
|
else {
|
|
205
|
-
var
|
|
206
|
-
for (
|
|
207
|
-
ne(n,
|
|
205
|
+
var s, u = oe(n);
|
|
206
|
+
for (s in r = u === Object.prototype ? {} : Object.create(u), qe.set(n, r), n)
|
|
207
|
+
ne(n, s) && (r[s] = t(n[s]));
|
|
208
208
|
}
|
|
209
209
|
return r;
|
|
210
210
|
}(e), qe = null, e;
|
|
@@ -378,10 +378,10 @@ var Kr = { exports: {} };
|
|
|
378
378
|
if (r._state === null) {
|
|
379
379
|
if (o === r)
|
|
380
380
|
throw new TypeError("A promise cannot be resolved with itself.");
|
|
381
|
-
var
|
|
381
|
+
var s = r._lib && Ve();
|
|
382
382
|
o && typeof o.then == "function" ? n(r, function(u, h) {
|
|
383
383
|
o instanceof K ? o._then(u, h) : o.then(u, h);
|
|
384
|
-
}) : (r._state = !0, r._value = o, qn(r)),
|
|
384
|
+
}) : (r._state = !0, r._value = o, qn(r)), s && Ge();
|
|
385
385
|
}
|
|
386
386
|
}, tn.bind(null, r));
|
|
387
387
|
} catch (o) {
|
|
@@ -392,8 +392,8 @@ var Kr = { exports: {} };
|
|
|
392
392
|
var en = { get: function() {
|
|
393
393
|
var e = D, t = Et;
|
|
394
394
|
function n(r, i) {
|
|
395
|
-
var o = this,
|
|
396
|
-
nn(o, new Zn(tr(r, e,
|
|
395
|
+
var o = this, s = !e.global && (e !== D || t !== Et), u = s && !Oe(), h = new K(function(l, m) {
|
|
396
|
+
nn(o, new Zn(tr(r, e, s, u), tr(i, e, s, u), l, m, e));
|
|
397
397
|
});
|
|
398
398
|
return this._consoleTask && (h._consoleTask = this._consoleTask), h;
|
|
399
399
|
}
|
|
@@ -437,9 +437,9 @@ var Kr = { exports: {} };
|
|
|
437
437
|
!t._state && _t.length && (_t = []), r = fe && t._consoleTask ? t._consoleTask.run(function() {
|
|
438
438
|
return e(i);
|
|
439
439
|
}) : e(i), t._state || _t.indexOf(i) !== -1 || function(o) {
|
|
440
|
-
for (var
|
|
441
|
-
if (Ae[--
|
|
442
|
-
return Ae.splice(
|
|
440
|
+
for (var s = Ae.length; s; )
|
|
441
|
+
if (Ae[--s]._value === o._value)
|
|
442
|
+
return Ae.splice(s, 1);
|
|
443
443
|
}(t), n.resolve(r);
|
|
444
444
|
} catch (o) {
|
|
445
445
|
n.reject(o);
|
|
@@ -526,8 +526,8 @@ var Kr = { exports: {} };
|
|
|
526
526
|
e.length === 0 && t([]);
|
|
527
527
|
var r = e.length;
|
|
528
528
|
e.forEach(function(i, o) {
|
|
529
|
-
return K.resolve(i).then(function(
|
|
530
|
-
e[o] =
|
|
529
|
+
return K.resolve(i).then(function(s) {
|
|
530
|
+
e[o] = s, --r || t(e);
|
|
531
531
|
}, n);
|
|
532
532
|
});
|
|
533
533
|
});
|
|
@@ -559,8 +559,8 @@ var Kr = { exports: {} };
|
|
|
559
559
|
} }, follow: function(e, t) {
|
|
560
560
|
return new K(function(n, r) {
|
|
561
561
|
return xe(function(i, o) {
|
|
562
|
-
var
|
|
563
|
-
|
|
562
|
+
var s = D;
|
|
563
|
+
s.unhandleds = [], s.onunhandled = o, s.finalize = Ke(function() {
|
|
564
564
|
var u, h = this;
|
|
565
565
|
u = function() {
|
|
566
566
|
h.unhandleds.length === 0 ? i() : o(h.unhandleds[0]);
|
|
@@ -569,7 +569,7 @@ var Kr = { exports: {} };
|
|
|
569
569
|
}), ++De, it(function() {
|
|
570
570
|
--De == 0 && rn();
|
|
571
571
|
}, []);
|
|
572
|
-
},
|
|
572
|
+
}, s.finalize), e();
|
|
573
573
|
}, t, n, r);
|
|
574
574
|
});
|
|
575
575
|
} }), rt && (rt.allSettled && we(K, "allSettled", function() {
|
|
@@ -578,10 +578,10 @@ var Kr = { exports: {} };
|
|
|
578
578
|
e.length === 0 && t([]);
|
|
579
579
|
var n = e.length, r = new Array(n);
|
|
580
580
|
e.forEach(function(i, o) {
|
|
581
|
-
return K.resolve(i).then(function(
|
|
582
|
-
return r[o] = { status: "fulfilled", value:
|
|
583
|
-
}, function(
|
|
584
|
-
return r[o] = { status: "rejected", reason:
|
|
581
|
+
return K.resolve(i).then(function(s) {
|
|
582
|
+
return r[o] = { status: "fulfilled", value: s };
|
|
583
|
+
}, function(s) {
|
|
584
|
+
return r[o] = { status: "rejected", reason: s };
|
|
585
585
|
}).then(function() {
|
|
586
586
|
return --n || t(r);
|
|
587
587
|
});
|
|
@@ -592,11 +592,11 @@ var Kr = { exports: {} };
|
|
|
592
592
|
return new K(function(t, n) {
|
|
593
593
|
e.length === 0 && n(new AggregateError([]));
|
|
594
594
|
var r = e.length, i = new Array(r);
|
|
595
|
-
e.forEach(function(o,
|
|
595
|
+
e.forEach(function(o, s) {
|
|
596
596
|
return K.resolve(o).then(function(u) {
|
|
597
597
|
return t(u);
|
|
598
598
|
}, function(u) {
|
|
599
|
-
i[
|
|
599
|
+
i[s] = u, --r || n(new AggregateError(i));
|
|
600
600
|
});
|
|
601
601
|
});
|
|
602
602
|
});
|
|
@@ -687,19 +687,19 @@ var Kr = { exports: {} };
|
|
|
687
687
|
return t < e ? 1 : e < t ? -1 : 0;
|
|
688
688
|
case "binary":
|
|
689
689
|
return function(i, o) {
|
|
690
|
-
for (var
|
|
690
|
+
for (var s = i.length, u = o.length, h = s < u ? s : u, l = 0; l < h; ++l)
|
|
691
691
|
if (i[l] !== o[l])
|
|
692
692
|
return i[l] < o[l] ? -1 : 1;
|
|
693
|
-
return
|
|
693
|
+
return s === u ? 0 : s < u ? -1 : 1;
|
|
694
694
|
}(ar(e), ar(t));
|
|
695
695
|
case "Array":
|
|
696
696
|
return function(i, o) {
|
|
697
|
-
for (var
|
|
697
|
+
for (var s = i.length, u = o.length, h = s < u ? s : u, l = 0; l < h; ++l) {
|
|
698
698
|
var m = U(i[l], o[l]);
|
|
699
699
|
if (m !== 0)
|
|
700
700
|
return m;
|
|
701
701
|
}
|
|
702
|
-
return
|
|
702
|
+
return s === u ? 0 : s < u ? -1 : 1;
|
|
703
703
|
}(e, t);
|
|
704
704
|
}
|
|
705
705
|
} catch {
|
|
@@ -715,15 +715,15 @@ var Kr = { exports: {} };
|
|
|
715
715
|
}
|
|
716
716
|
var sr = (Y.prototype._trans = function(e, t, n) {
|
|
717
717
|
var r = this._tx || D.trans, i = this.name, o = fe && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
718
|
-
function
|
|
718
|
+
function s(l, m, c) {
|
|
719
719
|
if (!c.schema[i])
|
|
720
720
|
throw new I.NotFound("Table " + i + " not part of transaction");
|
|
721
721
|
return t(c.idbtrans, c);
|
|
722
722
|
}
|
|
723
723
|
var u = Ve();
|
|
724
724
|
try {
|
|
725
|
-
var h = r && r.db._novip === this.db._novip ? r === D.trans ? r._promise(e,
|
|
726
|
-
return r._promise(e,
|
|
725
|
+
var h = r && r.db._novip === this.db._novip ? r === D.trans ? r._promise(e, s, n) : xe(function() {
|
|
726
|
+
return r._promise(e, s, n);
|
|
727
727
|
}, { trans: r, transless: D.transless || D }) : function l(m, c, f, d) {
|
|
728
728
|
if (m.idbdb && (m._state.openComplete || D.letThrough || m._vip)) {
|
|
729
729
|
var y = m._createTransaction(c, f, m._dbSchema);
|
|
@@ -759,7 +759,7 @@ var Kr = { exports: {} };
|
|
|
759
759
|
return m._state.dbReadyPromise.then(function() {
|
|
760
760
|
return l(m, c, f, d);
|
|
761
761
|
});
|
|
762
|
-
}(this.db, e, [this.name],
|
|
762
|
+
}(this.db, e, [this.name], s);
|
|
763
763
|
return o && (h._consoleTask = o, h = h.catch(function(l) {
|
|
764
764
|
return console.trace(l), X(l);
|
|
765
765
|
})), h;
|
|
@@ -795,8 +795,8 @@ var Kr = { exports: {} };
|
|
|
795
795
|
return h.keyPath.length - l.keyPath.length;
|
|
796
796
|
})[0];
|
|
797
797
|
if (n && this.db._maxKey !== Be) {
|
|
798
|
-
var
|
|
799
|
-
return this.where(
|
|
798
|
+
var s = n.keyPath.slice(0, t.length);
|
|
799
|
+
return this.where(s).equals(s.map(function(l) {
|
|
800
800
|
return e[l];
|
|
801
801
|
}));
|
|
802
802
|
}
|
|
@@ -814,8 +814,8 @@ var Kr = { exports: {} };
|
|
|
814
814
|
} : function(y) {
|
|
815
815
|
return o(d, ye(y, l));
|
|
816
816
|
}) : c];
|
|
817
|
-
}, [null, null]),
|
|
818
|
-
return
|
|
817
|
+
}, [null, null]), s = u[0], u = u[1];
|
|
818
|
+
return s ? this.where(s.name).equals(e[s.keyPath]).filter(u) : n ? this.filter(u) : this.where(t).equals("");
|
|
819
819
|
}, Y.prototype.filter = function(e) {
|
|
820
820
|
return this.toCollection().and(e);
|
|
821
821
|
}, Y.prototype.count = function(e) {
|
|
@@ -851,8 +851,8 @@ var Kr = { exports: {} };
|
|
|
851
851
|
}, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
|
|
852
852
|
return r;
|
|
853
853
|
}, e = i);
|
|
854
|
-
for (var o = /* @__PURE__ */ new Set(),
|
|
855
|
-
Object.getOwnPropertyNames(
|
|
854
|
+
for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s = oe(s))
|
|
855
|
+
Object.getOwnPropertyNames(s).forEach(function(h) {
|
|
856
856
|
return o.add(h);
|
|
857
857
|
});
|
|
858
858
|
function u(h) {
|
|
@@ -873,9 +873,9 @@ var Kr = { exports: {} };
|
|
|
873
873
|
q(this, e);
|
|
874
874
|
});
|
|
875
875
|
}, Y.prototype.add = function(e, t) {
|
|
876
|
-
var n = this, r = this.schema.primKey, i = r.auto, o = r.keyPath,
|
|
877
|
-
return o && i && (
|
|
878
|
-
return n.core.mutate({ trans: u, type: "add", keys: t != null ? [t] : null, values: [
|
|
876
|
+
var n = this, r = this.schema.primKey, i = r.auto, o = r.keyPath, s = e;
|
|
877
|
+
return o && i && (s = Ct(o)(e)), this._trans("readwrite", function(u) {
|
|
878
|
+
return n.core.mutate({ trans: u, type: "add", keys: t != null ? [t] : null, values: [s] });
|
|
879
879
|
}).then(function(u) {
|
|
880
880
|
return u.numFailures ? K.reject(u.failures[0]) : u.lastResult;
|
|
881
881
|
}).then(function(u) {
|
|
@@ -889,9 +889,9 @@ var Kr = { exports: {} };
|
|
|
889
889
|
}, Y.prototype.update = function(e, t) {
|
|
890
890
|
return typeof e != "object" || W(e) ? this.where(":id").equals(e).modify(t) : (e = ye(e, this.schema.primKey.keyPath), e === void 0 ? X(new I.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
|
|
891
891
|
}, Y.prototype.put = function(e, t) {
|
|
892
|
-
var n = this, r = this.schema.primKey, i = r.auto, o = r.keyPath,
|
|
893
|
-
return o && i && (
|
|
894
|
-
return n.core.mutate({ trans: u, type: "put", values: [
|
|
892
|
+
var n = this, r = this.schema.primKey, i = r.auto, o = r.keyPath, s = e;
|
|
893
|
+
return o && i && (s = Ct(o)(e)), this._trans("readwrite", function(u) {
|
|
894
|
+
return n.core.mutate({ trans: u, type: "put", values: [s], keys: t != null ? [t] : null });
|
|
895
895
|
}).then(function(u) {
|
|
896
896
|
return u.numFailures ? K.reject(u.failures[0]) : u.lastResult;
|
|
897
897
|
}).then(function(u) {
|
|
@@ -927,14 +927,14 @@ var Kr = { exports: {} };
|
|
|
927
927
|
});
|
|
928
928
|
}, Y.prototype.bulkAdd = function(e, t, n) {
|
|
929
929
|
var r = this, i = Array.isArray(t) ? t : void 0, o = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
|
|
930
|
-
return this._trans("readwrite", function(
|
|
930
|
+
return this._trans("readwrite", function(s) {
|
|
931
931
|
var l = r.schema.primKey, u = l.auto, l = l.keyPath;
|
|
932
932
|
if (l && i)
|
|
933
933
|
throw new I.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
|
|
934
934
|
if (i && i.length !== e.length)
|
|
935
935
|
throw new I.InvalidArgument("Arguments objects and keys must have the same length");
|
|
936
936
|
var h = e.length, l = l && u ? e.map(Ct(l)) : e;
|
|
937
|
-
return r.core.mutate({ trans:
|
|
937
|
+
return r.core.mutate({ trans: s, type: "add", keys: i, values: l, wantResults: o }).then(function(y) {
|
|
938
938
|
var c = y.numFailures, f = y.results, d = y.lastResult, y = y.failures;
|
|
939
939
|
if (c === 0)
|
|
940
940
|
return o ? f : d;
|
|
@@ -943,14 +943,14 @@ var Kr = { exports: {} };
|
|
|
943
943
|
});
|
|
944
944
|
}, Y.prototype.bulkPut = function(e, t, n) {
|
|
945
945
|
var r = this, i = Array.isArray(t) ? t : void 0, o = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
|
|
946
|
-
return this._trans("readwrite", function(
|
|
946
|
+
return this._trans("readwrite", function(s) {
|
|
947
947
|
var l = r.schema.primKey, u = l.auto, l = l.keyPath;
|
|
948
948
|
if (l && i)
|
|
949
949
|
throw new I.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
|
|
950
950
|
if (i && i.length !== e.length)
|
|
951
951
|
throw new I.InvalidArgument("Arguments objects and keys must have the same length");
|
|
952
952
|
var h = e.length, l = l && u ? e.map(Ct(l)) : e;
|
|
953
|
-
return r.core.mutate({ trans:
|
|
953
|
+
return r.core.mutate({ trans: s, type: "put", keys: i, values: l, wantResults: o }).then(function(y) {
|
|
954
954
|
var c = y.numFailures, f = y.results, d = y.lastResult, y = y.failures;
|
|
955
955
|
if (c === 0)
|
|
956
956
|
return o ? f : d;
|
|
@@ -958,13 +958,13 @@ var Kr = { exports: {} };
|
|
|
958
958
|
});
|
|
959
959
|
});
|
|
960
960
|
}, Y.prototype.bulkUpdate = function(e) {
|
|
961
|
-
var t = this, n = this.core, r = e.map(function(
|
|
962
|
-
return
|
|
963
|
-
}), i = e.map(function(
|
|
964
|
-
return
|
|
961
|
+
var t = this, n = this.core, r = e.map(function(s) {
|
|
962
|
+
return s.key;
|
|
963
|
+
}), i = e.map(function(s) {
|
|
964
|
+
return s.changes;
|
|
965
965
|
}), o = [];
|
|
966
|
-
return this._trans("readwrite", function(
|
|
967
|
-
return n.getMany({ trans:
|
|
966
|
+
return this._trans("readwrite", function(s) {
|
|
967
|
+
return n.getMany({ trans: s, keys: r, cache: "clone" }).then(function(u) {
|
|
968
968
|
var h = [], l = [];
|
|
969
969
|
e.forEach(function(c, f) {
|
|
970
970
|
var d = c.key, y = c.changes, g = u[f];
|
|
@@ -981,7 +981,7 @@ var Kr = { exports: {} };
|
|
|
981
981
|
}
|
|
982
982
|
});
|
|
983
983
|
var m = h.length;
|
|
984
|
-
return n.mutate({ trans:
|
|
984
|
+
return n.mutate({ trans: s, type: "put", keys: h, values: l, updates: { keys: r, changeSpecs: i } }).then(function(c) {
|
|
985
985
|
var f = c.numFailures, d = c.failures;
|
|
986
986
|
if (f === 0)
|
|
987
987
|
return m;
|
|
@@ -997,32 +997,32 @@ var Kr = { exports: {} };
|
|
|
997
997
|
var t = this, n = e.length;
|
|
998
998
|
return this._trans("readwrite", function(r) {
|
|
999
999
|
return t.core.mutate({ trans: r, type: "delete", keys: e });
|
|
1000
|
-
}).then(function(
|
|
1001
|
-
var i =
|
|
1000
|
+
}).then(function(s) {
|
|
1001
|
+
var i = s.numFailures, o = s.lastResult, s = s.failures;
|
|
1002
1002
|
if (i === 0)
|
|
1003
1003
|
return o;
|
|
1004
|
-
throw new $e("".concat(t.name, ".bulkDelete(): ").concat(i, " of ").concat(n, " operations failed"),
|
|
1004
|
+
throw new $e("".concat(t.name, ".bulkDelete(): ").concat(i, " of ").concat(n, " operations failed"), s);
|
|
1005
1005
|
});
|
|
1006
1006
|
}, Y);
|
|
1007
1007
|
function Y() {
|
|
1008
1008
|
}
|
|
1009
1009
|
function at(e) {
|
|
1010
|
-
function t(
|
|
1010
|
+
function t(s, u) {
|
|
1011
1011
|
if (u) {
|
|
1012
1012
|
for (var h = arguments.length, l = new Array(h - 1); --h; )
|
|
1013
1013
|
l[h - 1] = arguments[h];
|
|
1014
|
-
return n[
|
|
1014
|
+
return n[s].subscribe.apply(null, l), e;
|
|
1015
1015
|
}
|
|
1016
|
-
if (typeof
|
|
1017
|
-
return n[
|
|
1016
|
+
if (typeof s == "string")
|
|
1017
|
+
return n[s];
|
|
1018
1018
|
}
|
|
1019
1019
|
var n = {};
|
|
1020
1020
|
t.addEventType = o;
|
|
1021
1021
|
for (var r = 1, i = arguments.length; r < i; ++r)
|
|
1022
1022
|
o(arguments[r]);
|
|
1023
1023
|
return t;
|
|
1024
|
-
function o(
|
|
1025
|
-
if (typeof
|
|
1024
|
+
function o(s, u, h) {
|
|
1025
|
+
if (typeof s != "object") {
|
|
1026
1026
|
var l;
|
|
1027
1027
|
u = u || Wr;
|
|
1028
1028
|
var m = { subscribers: [], fire: h = h || V, subscribe: function(c) {
|
|
@@ -1032,9 +1032,9 @@ var Kr = { exports: {} };
|
|
|
1032
1032
|
return f !== c;
|
|
1033
1033
|
}), m.fire = m.subscribers.reduce(u, h);
|
|
1034
1034
|
} };
|
|
1035
|
-
return n[
|
|
1035
|
+
return n[s] = t[s] = m;
|
|
1036
1036
|
}
|
|
1037
|
-
B(l =
|
|
1037
|
+
B(l = s).forEach(function(c) {
|
|
1038
1038
|
var f = l[c];
|
|
1039
1039
|
if (W(f))
|
|
1040
1040
|
o(c, l[c][0], l[c][1]);
|
|
@@ -1084,7 +1084,7 @@ var Kr = { exports: {} };
|
|
|
1084
1084
|
function At(e, t, n, r) {
|
|
1085
1085
|
var i = e.replayFilter ? Ie(e.filter, e.replayFilter()) : e.filter;
|
|
1086
1086
|
if (e.or) {
|
|
1087
|
-
var o = {},
|
|
1087
|
+
var o = {}, s = function(u, h, l) {
|
|
1088
1088
|
var m, c;
|
|
1089
1089
|
i && !i(h, l, function(f) {
|
|
1090
1090
|
return h.stop(f);
|
|
@@ -1092,29 +1092,29 @@ var Kr = { exports: {} };
|
|
|
1092
1092
|
return h.fail(f);
|
|
1093
1093
|
}) || ((c = "" + (m = h.primaryKey)) == "[object ArrayBuffer]" && (c = "" + new Uint8Array(m)), ne(o, c) || (o[c] = !0, t(u, h, l)));
|
|
1094
1094
|
};
|
|
1095
|
-
return Promise.all([e.or._iterate(
|
|
1095
|
+
return Promise.all([e.or._iterate(s, n), cr(ur(e, r, n), e.algorithm, s, !e.keysOnly && e.valueMapper)]);
|
|
1096
1096
|
}
|
|
1097
1097
|
return cr(ur(e, r, n), Ie(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
|
|
1098
1098
|
}
|
|
1099
1099
|
function cr(e, t, n, r) {
|
|
1100
|
-
var i = H(r ? function(o,
|
|
1101
|
-
return n(r(o),
|
|
1100
|
+
var i = H(r ? function(o, s, u) {
|
|
1101
|
+
return n(r(o), s, u);
|
|
1102
1102
|
} : n);
|
|
1103
1103
|
return e.then(function(o) {
|
|
1104
1104
|
if (o)
|
|
1105
1105
|
return o.start(function() {
|
|
1106
|
-
var
|
|
1106
|
+
var s = function() {
|
|
1107
1107
|
return o.continue();
|
|
1108
1108
|
};
|
|
1109
1109
|
t && !t(o, function(u) {
|
|
1110
|
-
return
|
|
1110
|
+
return s = u;
|
|
1111
1111
|
}, function(u) {
|
|
1112
|
-
o.stop(u),
|
|
1112
|
+
o.stop(u), s = V;
|
|
1113
1113
|
}, function(u) {
|
|
1114
|
-
o.fail(u),
|
|
1114
|
+
o.fail(u), s = V;
|
|
1115
1115
|
}) || i(o.value, o, function(u) {
|
|
1116
|
-
return
|
|
1117
|
-
}),
|
|
1116
|
+
return s = u;
|
|
1117
|
+
}), s();
|
|
1118
1118
|
});
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
@@ -1144,8 +1144,8 @@ var Kr = { exports: {} };
|
|
|
1144
1144
|
return this._read(function(n) {
|
|
1145
1145
|
var r = t._ctx, i = r.table.core;
|
|
1146
1146
|
if (Qe(r, !0))
|
|
1147
|
-
return i.count({ trans: n, query: { index: Kt(r, i.schema), range: r.range } }).then(function(
|
|
1148
|
-
return Math.min(
|
|
1147
|
+
return i.count({ trans: n, query: { index: Kt(r, i.schema), range: r.range } }).then(function(s) {
|
|
1148
|
+
return Math.min(s, r.limit);
|
|
1149
1149
|
});
|
|
1150
1150
|
var o = 0;
|
|
1151
1151
|
return At(r, function() {
|
|
@@ -1159,9 +1159,9 @@ var Kr = { exports: {} };
|
|
|
1159
1159
|
function o(h, l) {
|
|
1160
1160
|
return l ? o(h[n[l]], l - 1) : h[r];
|
|
1161
1161
|
}
|
|
1162
|
-
var
|
|
1162
|
+
var s = this._ctx.dir === "next" ? 1 : -1;
|
|
1163
1163
|
function u(h, l) {
|
|
1164
|
-
return h = o(h, i), l = o(l, i), h < l ? -
|
|
1164
|
+
return h = o(h, i), l = o(l, i), h < l ? -s : l < h ? s : 0;
|
|
1165
1165
|
}
|
|
1166
1166
|
return this.toArray(function(h) {
|
|
1167
1167
|
return h.sort(u);
|
|
@@ -1176,11 +1176,11 @@ var Kr = { exports: {} };
|
|
|
1176
1176
|
return u = u.result, i ? u.map(i) : u;
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
1179
|
-
var
|
|
1179
|
+
var s = [];
|
|
1180
1180
|
return At(r, function(u) {
|
|
1181
|
-
return
|
|
1181
|
+
return s.push(u);
|
|
1182
1182
|
}, n, r.table.core).then(function() {
|
|
1183
|
-
return
|
|
1183
|
+
return s;
|
|
1184
1184
|
});
|
|
1185
1185
|
}, e);
|
|
1186
1186
|
}, L.prototype.offset = function(e) {
|
|
@@ -1285,8 +1285,8 @@ var Kr = { exports: {} };
|
|
|
1285
1285
|
}, L.prototype.modify = function(e) {
|
|
1286
1286
|
var t = this, n = this._ctx;
|
|
1287
1287
|
return this._write(function(r) {
|
|
1288
|
-
var i, o,
|
|
1289
|
-
|
|
1288
|
+
var i, o, s;
|
|
1289
|
+
s = typeof e == "function" ? e : (i = B(e), o = i.length, function(p) {
|
|
1290
1290
|
for (var b = !1, w = 0; w < o; ++w) {
|
|
1291
1291
|
var k = i[w], x = e[k];
|
|
1292
1292
|
ye(p, k) !== x && (ce(p, k, x), b = !0);
|
|
@@ -1308,7 +1308,7 @@ var Kr = { exports: {} };
|
|
|
1308
1308
|
return h.getMany({ trans: r, keys: p.slice(w, w + k), cache: "immutable" }).then(function(x) {
|
|
1309
1309
|
for (var O = [], P = [], S = m ? [] : null, C = [], E = 0; E < k; ++E) {
|
|
1310
1310
|
var T = x[E], R = { value: _e(T), primKey: p[w + E] };
|
|
1311
|
-
|
|
1311
|
+
s.call(R, R.value, R) !== !1 && (R.value == null ? C.push(p[w + E]) : m || U(c(T), c(R.value)) === 0 ? (P.push(R.value), m && S.push(p[w + E])) : (C.push(p[w + E]), O.push(R.value)));
|
|
1312
1312
|
}
|
|
1313
1313
|
var $ = Qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === ln) && { index: n.index, range: n.range };
|
|
1314
1314
|
return Promise.resolve(0 < O.length && h.mutate({ trans: r, type: "add", values: O }).then(function(z) {
|
|
@@ -1340,13 +1340,13 @@ var Kr = { exports: {} };
|
|
|
1340
1340
|
return Qe(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
|
|
1341
1341
|
var r = e.table.core.schema.primaryKey, i = t;
|
|
1342
1342
|
return e.table.core.count({ trans: n, query: { index: r, range: i } }).then(function(o) {
|
|
1343
|
-
return e.table.core.mutate({ trans: n, type: "deleteRange", range: i }).then(function(
|
|
1344
|
-
var u =
|
|
1345
|
-
if (
|
|
1343
|
+
return e.table.core.mutate({ trans: n, type: "deleteRange", range: i }).then(function(s) {
|
|
1344
|
+
var u = s.failures;
|
|
1345
|
+
if (s.lastResult, s.results, s = s.numFailures, s)
|
|
1346
1346
|
throw new vt("Could not delete some values", Object.keys(u).map(function(h) {
|
|
1347
1347
|
return u[h];
|
|
1348
|
-
}), o -
|
|
1349
|
-
return o -
|
|
1348
|
+
}), o - s);
|
|
1349
|
+
return o - s;
|
|
1350
1350
|
});
|
|
1351
1351
|
});
|
|
1352
1352
|
}) : this.modify(ln);
|
|
@@ -1371,7 +1371,7 @@ var Kr = { exports: {} };
|
|
|
1371
1371
|
}).limit(0);
|
|
1372
1372
|
}
|
|
1373
1373
|
function Dt(e, t, n, r) {
|
|
1374
|
-
var i, o,
|
|
1374
|
+
var i, o, s, u, h, l, m, c = n.length;
|
|
1375
1375
|
if (!n.every(function(y) {
|
|
1376
1376
|
return typeof y == "string";
|
|
1377
1377
|
}))
|
|
@@ -1385,11 +1385,11 @@ var Kr = { exports: {} };
|
|
|
1385
1385
|
return p.toLowerCase();
|
|
1386
1386
|
} : function(p) {
|
|
1387
1387
|
return p.toUpperCase();
|
|
1388
|
-
},
|
|
1388
|
+
}, s = y === "next" ? Xr : Jr;
|
|
1389
1389
|
var g = n.map(function(p) {
|
|
1390
1390
|
return { lower: o(p), upper: i(p) };
|
|
1391
1391
|
}).sort(function(p, b) {
|
|
1392
|
-
return
|
|
1392
|
+
return s(p.lower, b.lower);
|
|
1393
1393
|
});
|
|
1394
1394
|
u = g.map(function(p) {
|
|
1395
1395
|
return p.upper;
|
|
@@ -1419,8 +1419,8 @@ var Kr = { exports: {} };
|
|
|
1419
1419
|
T(P[G], ue) < 0 && (z = G);
|
|
1420
1420
|
}
|
|
1421
1421
|
return $ < E.length && R === "next" ? P + C.substr(P.length) : $ < P.length && R === "prev" ? P.substr(0, C.length) : z < 0 ? null : P.substr(0, z) + E[z] + C.substr(z + 1);
|
|
1422
|
-
}(b, w, u[x], h[x],
|
|
1423
|
-
O === null && k === null ? d = x + 1 : (k === null || 0 <
|
|
1422
|
+
}(b, w, u[x], h[x], s, l);
|
|
1423
|
+
O === null && k === null ? d = x + 1 : (k === null || 0 < s(k, O)) && (k = O);
|
|
1424
1424
|
}
|
|
1425
1425
|
return g(k !== null ? function() {
|
|
1426
1426
|
y.continue(k + m);
|
|
@@ -1502,11 +1502,11 @@ var Kr = { exports: {} };
|
|
|
1502
1502
|
n = o === "next" ? e._ascending : e._descending, t.sort(n);
|
|
1503
1503
|
};
|
|
1504
1504
|
var i = 0;
|
|
1505
|
-
return r._addAlgorithm(function(o,
|
|
1505
|
+
return r._addAlgorithm(function(o, s, u) {
|
|
1506
1506
|
for (var h = o.key; 0 < n(h, t[i]); )
|
|
1507
1507
|
if (++i === t.length)
|
|
1508
|
-
return
|
|
1509
|
-
return n(h, t[i]) === 0 || (
|
|
1508
|
+
return s(u), !1;
|
|
1509
|
+
return n(h, t[i]) === 0 || (s(function() {
|
|
1510
1510
|
o.continue(t[i]);
|
|
1511
1511
|
}), !1);
|
|
1512
1512
|
}), r;
|
|
@@ -1526,7 +1526,7 @@ var Kr = { exports: {} };
|
|
|
1526
1526
|
}, null);
|
|
1527
1527
|
return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
|
|
1528
1528
|
}, te.prototype.inAnyRange = function(b, t) {
|
|
1529
|
-
var n = this, r = this._cmp, i = this._ascending, o = this._descending,
|
|
1529
|
+
var n = this, r = this._cmp, i = this._ascending, o = this._descending, s = this._min, u = this._max;
|
|
1530
1530
|
if (b.length === 0)
|
|
1531
1531
|
return Xe(this);
|
|
1532
1532
|
if (!b.every(function(w) {
|
|
@@ -1542,7 +1542,7 @@ var Kr = { exports: {} };
|
|
|
1542
1542
|
for (var x = 0, O = w.length; x < O; ++x) {
|
|
1543
1543
|
var P = w[x];
|
|
1544
1544
|
if (r(k[0], P[1]) < 0 && 0 < r(k[1], P[0])) {
|
|
1545
|
-
P[0] =
|
|
1545
|
+
P[0] = s(P[0], k[0]), P[1] = u(P[1], k[1]);
|
|
1546
1546
|
break;
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
@@ -1634,25 +1634,25 @@ var Kr = { exports: {} };
|
|
|
1634
1634
|
if (!this.active)
|
|
1635
1635
|
return X(new I.TransactionInactive());
|
|
1636
1636
|
if (this._locked())
|
|
1637
|
-
return new K(function(o,
|
|
1637
|
+
return new K(function(o, s) {
|
|
1638
1638
|
r._blockedFuncs.push([function() {
|
|
1639
|
-
r._promise(e, t, n).then(o,
|
|
1639
|
+
r._promise(e, t, n).then(o, s);
|
|
1640
1640
|
}, D]);
|
|
1641
1641
|
});
|
|
1642
1642
|
if (n)
|
|
1643
1643
|
return xe(function() {
|
|
1644
|
-
var o = new K(function(
|
|
1644
|
+
var o = new K(function(s, u) {
|
|
1645
1645
|
r._lock();
|
|
1646
|
-
var h = t(
|
|
1647
|
-
h && h.then && h.then(
|
|
1646
|
+
var h = t(s, u, r);
|
|
1647
|
+
h && h.then && h.then(s, u);
|
|
1648
1648
|
});
|
|
1649
1649
|
return o.finally(function() {
|
|
1650
1650
|
return r._unlock();
|
|
1651
1651
|
}), o._lib = !0, o;
|
|
1652
1652
|
});
|
|
1653
|
-
var i = new K(function(o,
|
|
1654
|
-
var u = t(o,
|
|
1655
|
-
u && u.then && u.then(o,
|
|
1653
|
+
var i = new K(function(o, s) {
|
|
1654
|
+
var u = t(o, s, r);
|
|
1655
|
+
u && u.then && u.then(o, s);
|
|
1656
1656
|
});
|
|
1657
1657
|
return i._lib = !0, i;
|
|
1658
1658
|
}, pe.prototype._root = function() {
|
|
@@ -1667,11 +1667,11 @@ var Kr = { exports: {} };
|
|
|
1667
1667
|
n._waitingFor && (t.get(-1 / 0).onsuccess = o);
|
|
1668
1668
|
}());
|
|
1669
1669
|
var i = n._waitingFor;
|
|
1670
|
-
return new K(function(o,
|
|
1670
|
+
return new K(function(o, s) {
|
|
1671
1671
|
r.then(function(u) {
|
|
1672
1672
|
return n._waitingQueue.push(H(o.bind(null, u)));
|
|
1673
1673
|
}, function(u) {
|
|
1674
|
-
return n._waitingQueue.push(H(
|
|
1674
|
+
return n._waitingQueue.push(H(s.bind(null, u)));
|
|
1675
1675
|
}).finally(function() {
|
|
1676
1676
|
n._waitingFor === i && (n._waitingFor = null);
|
|
1677
1677
|
});
|
|
@@ -1689,8 +1689,8 @@ var Kr = { exports: {} };
|
|
|
1689
1689
|
}, pe);
|
|
1690
1690
|
function pe() {
|
|
1691
1691
|
}
|
|
1692
|
-
function hn(e, t, n, r, i, o,
|
|
1693
|
-
return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: o, src: (n && !
|
|
1692
|
+
function hn(e, t, n, r, i, o, s) {
|
|
1693
|
+
return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: o, src: (n && !s ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + hr(t) };
|
|
1694
1694
|
}
|
|
1695
1695
|
function hr(e) {
|
|
1696
1696
|
return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
|
|
@@ -1698,8 +1698,8 @@ var Kr = { exports: {} };
|
|
|
1698
1698
|
function dn(e, t, n) {
|
|
1699
1699
|
return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (r = function(i) {
|
|
1700
1700
|
return [i.name, i];
|
|
1701
|
-
}, n.reduce(function(i, o,
|
|
1702
|
-
return
|
|
1701
|
+
}, n.reduce(function(i, o, s) {
|
|
1702
|
+
return s = r(o, s), s && (i[s[0]] = s[1]), i;
|
|
1703
1703
|
}, {})) };
|
|
1704
1704
|
var r;
|
|
1705
1705
|
}
|
|
@@ -1867,8 +1867,8 @@ var Kr = { exports: {} };
|
|
|
1867
1867
|
});
|
|
1868
1868
|
} };
|
|
1869
1869
|
}
|
|
1870
|
-
var o,
|
|
1871
|
-
return
|
|
1870
|
+
var o, s, u, m = (s = h, u = dr((o = e).objectStoreNames), { schema: { name: o.name, tables: u.map(function(f) {
|
|
1871
|
+
return s.objectStore(f);
|
|
1872
1872
|
}).map(function(f) {
|
|
1873
1873
|
var d = f.keyPath, p = f.autoIncrement, y = W(d), g = {}, p = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: d == null, compound: y, keyPath: d, autoIncrement: p, unique: !0, extractKey: pn(d) }, indexes: dr(f.indexNames).map(function(b) {
|
|
1874
1874
|
return f.index(b);
|
|
@@ -1879,7 +1879,7 @@ var Kr = { exports: {} };
|
|
|
1879
1879
|
return g[ft(b)];
|
|
1880
1880
|
} };
|
|
1881
1881
|
return g[":id"] = p.primaryKey, d != null && (g[ft(d)] = p.primaryKey), p;
|
|
1882
|
-
}) }, hasGetAll: 0 < u.length && "getAll" in
|
|
1882
|
+
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = m.schema, l = m.hasGetAll, m = h.tables.map(i), c = {};
|
|
1883
1883
|
return m.forEach(function(f) {
|
|
1884
1884
|
return c[f.name] = f;
|
|
1885
1885
|
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(f) {
|
|
@@ -1890,31 +1890,31 @@ var Kr = { exports: {} };
|
|
|
1890
1890
|
}
|
|
1891
1891
|
function ti(e, t, n, r) {
|
|
1892
1892
|
var i = n.IDBKeyRange;
|
|
1893
|
-
return n.indexedDB, { dbcore: (r = ei(t, i, r), e.dbcore.reduce(function(o,
|
|
1894
|
-
return
|
|
1893
|
+
return n.indexedDB, { dbcore: (r = ei(t, i, r), e.dbcore.reduce(function(o, s) {
|
|
1894
|
+
return s = s.create, _(_({}, o), s(o));
|
|
1895
1895
|
}, r)) };
|
|
1896
1896
|
}
|
|
1897
1897
|
function Tt(e, r) {
|
|
1898
1898
|
var n = r.db, r = ti(e._middlewares, n, e._deps, r);
|
|
1899
1899
|
e.core = r.dbcore, e.tables.forEach(function(i) {
|
|
1900
1900
|
var o = i.name;
|
|
1901
|
-
e.core.schema.tables.some(function(
|
|
1902
|
-
return
|
|
1901
|
+
e.core.schema.tables.some(function(s) {
|
|
1902
|
+
return s.name === o;
|
|
1903
1903
|
}) && (i.core = e.core.table(o), e[o] instanceof e.Table && (e[o].core = i.core));
|
|
1904
1904
|
});
|
|
1905
1905
|
}
|
|
1906
1906
|
function Bt(e, t, n, r) {
|
|
1907
1907
|
n.forEach(function(i) {
|
|
1908
1908
|
var o = r[i];
|
|
1909
|
-
t.forEach(function(
|
|
1909
|
+
t.forEach(function(s) {
|
|
1910
1910
|
var u = function h(l, m) {
|
|
1911
1911
|
return Dr(l, m) || (l = oe(l)) && h(l, m);
|
|
1912
|
-
}(
|
|
1913
|
-
(!u || "value" in u && u.value === void 0) && (
|
|
1912
|
+
}(s, i);
|
|
1913
|
+
(!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? we(s, i, { get: function() {
|
|
1914
1914
|
return this.table(i);
|
|
1915
1915
|
}, set: function(h) {
|
|
1916
1916
|
Un(this, i, { value: h, writable: !0, configurable: !0, enumerable: !0 });
|
|
1917
|
-
} }) :
|
|
1917
|
+
} }) : s[i] = new e.Table(i, o));
|
|
1918
1918
|
});
|
|
1919
1919
|
});
|
|
1920
1920
|
}
|
|
@@ -1932,7 +1932,7 @@ var Kr = { exports: {} };
|
|
|
1932
1932
|
n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = dn("$meta", yr("")[0], []), e._storeNames.push("$meta"));
|
|
1933
1933
|
var o = e._createTransaction("readwrite", e._storeNames, i);
|
|
1934
1934
|
o.create(n), o._completion.catch(r);
|
|
1935
|
-
var
|
|
1935
|
+
var s = o._reject.bind(o), u = D.transless || D;
|
|
1936
1936
|
xe(function() {
|
|
1937
1937
|
return D.trans = o, D.transless = u, t !== 0 ? (Tt(e, n), l = t, ((h = o).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(m) {
|
|
1938
1938
|
return m ?? l;
|
|
@@ -1989,11 +1989,11 @@ var Kr = { exports: {} };
|
|
|
1989
1989
|
pr(p, y);
|
|
1990
1990
|
})) : K.resolve();
|
|
1991
1991
|
var c, f, d, y, g, p;
|
|
1992
|
-
}).catch(
|
|
1992
|
+
}).catch(s)) : (B(i).forEach(function(m) {
|
|
1993
1993
|
gn(n, m, i[m].primKey, i[m].indexes);
|
|
1994
1994
|
}), Tt(e, n), void K.follow(function() {
|
|
1995
1995
|
return e.on.populate.fire(o);
|
|
1996
|
-
}).catch(
|
|
1996
|
+
}).catch(s));
|
|
1997
1997
|
var h, l;
|
|
1998
1998
|
});
|
|
1999
1999
|
}
|
|
@@ -2002,12 +2002,12 @@ var Kr = { exports: {} };
|
|
|
2002
2002
|
var n = Rt(0, e.idbdb, t);
|
|
2003
2003
|
Mt(e, e._dbSchema, t);
|
|
2004
2004
|
for (var r = 0, i = mn(n, e._dbSchema).change; r < i.length; r++) {
|
|
2005
|
-
var o = function(
|
|
2006
|
-
if (
|
|
2007
|
-
return console.warn("Unable to patch indexes of table ".concat(
|
|
2008
|
-
var u = t.objectStore(
|
|
2009
|
-
|
|
2010
|
-
fe && console.debug("Dexie upgrade patch: Creating missing index ".concat(
|
|
2005
|
+
var o = function(s) {
|
|
2006
|
+
if (s.change.length || s.recreate)
|
|
2007
|
+
return console.warn("Unable to patch indexes of table ".concat(s.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
2008
|
+
var u = t.objectStore(s.name);
|
|
2009
|
+
s.add.forEach(function(h) {
|
|
2010
|
+
fe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(h.src)), It(u, h);
|
|
2011
2011
|
});
|
|
2012
2012
|
}(i[r]);
|
|
2013
2013
|
if (typeof o == "object")
|
|
@@ -2021,18 +2021,18 @@ var Kr = { exports: {} };
|
|
|
2021
2021
|
for (n in t) {
|
|
2022
2022
|
var i = e[n], o = t[n];
|
|
2023
2023
|
if (i) {
|
|
2024
|
-
var
|
|
2024
|
+
var s = { name: n, def: o, recreate: !1, del: [], add: [], change: [] };
|
|
2025
2025
|
if ("" + (i.primKey.keyPath || "") != "" + (o.primKey.keyPath || "") || i.primKey.auto !== o.primKey.auto)
|
|
2026
|
-
|
|
2026
|
+
s.recreate = !0, r.change.push(s);
|
|
2027
2027
|
else {
|
|
2028
2028
|
var u = i.idxByName, h = o.idxByName, l = void 0;
|
|
2029
2029
|
for (l in u)
|
|
2030
|
-
h[l] ||
|
|
2030
|
+
h[l] || s.del.push(l);
|
|
2031
2031
|
for (l in h) {
|
|
2032
2032
|
var m = u[l], c = h[l];
|
|
2033
|
-
m ? m.src !== c.src &&
|
|
2033
|
+
m ? m.src !== c.src && s.change.push(c) : s.add.push(c);
|
|
2034
2034
|
}
|
|
2035
|
-
(0 <
|
|
2035
|
+
(0 < s.del.length || 0 < s.add.length || 0 < s.change.length) && r.change.push(s);
|
|
2036
2036
|
}
|
|
2037
2037
|
} else
|
|
2038
2038
|
r.add.push([n, o]);
|
|
@@ -2056,19 +2056,19 @@ var Kr = { exports: {} };
|
|
|
2056
2056
|
function Rt(e, t, n) {
|
|
2057
2057
|
var r = {};
|
|
2058
2058
|
return gt(t.objectStoreNames, 0).forEach(function(i) {
|
|
2059
|
-
for (var o = n.objectStore(i),
|
|
2059
|
+
for (var o = n.objectStore(i), s = hn(hr(l = o.keyPath), l || "", !0, !1, !!o.autoIncrement, l && typeof l != "string", !0), u = [], h = 0; h < o.indexNames.length; ++h) {
|
|
2060
2060
|
var m = o.index(o.indexNames[h]), l = m.keyPath, m = hn(m.name, l, !!m.unique, !!m.multiEntry, !1, l && typeof l != "string", !1);
|
|
2061
2061
|
u.push(m);
|
|
2062
2062
|
}
|
|
2063
|
-
r[i] = dn(i,
|
|
2063
|
+
r[i] = dn(i, s, u);
|
|
2064
2064
|
}), r;
|
|
2065
2065
|
}
|
|
2066
2066
|
function Mt(e, t, n) {
|
|
2067
2067
|
for (var r = n.db.objectStoreNames, i = 0; i < r.length; ++i) {
|
|
2068
|
-
var o = r[i],
|
|
2069
|
-
e._hasGetAll = "getAll" in
|
|
2070
|
-
for (var u = 0; u <
|
|
2071
|
-
var h =
|
|
2068
|
+
var o = r[i], s = n.objectStore(o);
|
|
2069
|
+
e._hasGetAll = "getAll" in s;
|
|
2070
|
+
for (var u = 0; u < s.indexNames.length; ++u) {
|
|
2071
|
+
var h = s.indexNames[u], l = s.index(h).keyPath, m = typeof l == "string" ? l : "[" + gt(l).join("+") + "]";
|
|
2072
2072
|
!t[o] || (l = t[o].idxByName[m]) && (l.name = h, delete t[o].idxByName[m], t[o].idxByName[h] = l);
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
@@ -2145,18 +2145,18 @@ var Kr = { exports: {} };
|
|
|
2145
2145
|
}
|
|
2146
2146
|
function dt(e, t) {
|
|
2147
2147
|
_n(t) || function n(r, h) {
|
|
2148
|
-
var o = h.from,
|
|
2149
|
-
ht(r, o,
|
|
2148
|
+
var o = h.from, s = h.to, u = h.l, h = h.r;
|
|
2149
|
+
ht(r, o, s), u && n(r, u), h && n(r, h);
|
|
2150
2150
|
}(e, t);
|
|
2151
2151
|
}
|
|
2152
2152
|
function Nt(e, t) {
|
|
2153
2153
|
var n = kn(t), r = n.next();
|
|
2154
2154
|
if (r.done)
|
|
2155
2155
|
return !1;
|
|
2156
|
-
for (var i = r.value, o = kn(e),
|
|
2156
|
+
for (var i = r.value, o = kn(e), s = o.next(i.from), u = s.value; !r.done && !s.done; ) {
|
|
2157
2157
|
if (U(u.from, i.to) <= 0 && 0 <= U(u.to, i.from))
|
|
2158
2158
|
return !0;
|
|
2159
|
-
U(i.from, u.from) < 0 ? i = (r = n.next(u.from)).value : u = (
|
|
2159
|
+
U(i.from, u.from) < 0 ? i = (r = n.next(u.from)).value : u = (s = o.next(i.from)).value;
|
|
2160
2160
|
}
|
|
2161
2161
|
return !1;
|
|
2162
2162
|
}
|
|
@@ -2197,9 +2197,9 @@ var Kr = { exports: {} };
|
|
|
2197
2197
|
function zt(e, t) {
|
|
2198
2198
|
return B(t).forEach(function(n) {
|
|
2199
2199
|
e[n] ? dt(e[n], t[n]) : e[n] = function r(i) {
|
|
2200
|
-
var o,
|
|
2200
|
+
var o, s, u = {};
|
|
2201
2201
|
for (o in i)
|
|
2202
|
-
ne(i, o) && (
|
|
2202
|
+
ne(i, o) && (s = i[o], u[o] = !s || typeof s != "object" || Yn.has(s.constructor) ? s : r(s));
|
|
2203
2203
|
return u;
|
|
2204
2204
|
}(t[n]);
|
|
2205
2205
|
}), e;
|
|
@@ -2232,19 +2232,19 @@ var Kr = { exports: {} };
|
|
|
2232
2232
|
var n = /* @__PURE__ */ new Set();
|
|
2233
2233
|
if (e.all)
|
|
2234
2234
|
for (var r = 0, i = Object.values(Re); r < i.length; r++)
|
|
2235
|
-
vr(
|
|
2235
|
+
vr(s = i[r], e, n, t);
|
|
2236
2236
|
else
|
|
2237
2237
|
for (var o in e) {
|
|
2238
|
-
var
|
|
2239
|
-
u && (o = u[1], u = u[2], (
|
|
2238
|
+
var s, u = /^idb\:\/\/(.*)\/(.*)\//.exec(o);
|
|
2239
|
+
u && (o = u[1], u = u[2], (s = Re["idb://".concat(o, "/").concat(u)]) && vr(s, e, n, t));
|
|
2240
2240
|
}
|
|
2241
2241
|
n.forEach(function(h) {
|
|
2242
2242
|
return h();
|
|
2243
2243
|
});
|
|
2244
2244
|
}
|
|
2245
2245
|
function vr(e, t, n, r) {
|
|
2246
|
-
for (var i = [], o = 0,
|
|
2247
|
-
for (var u =
|
|
2246
|
+
for (var i = [], o = 0, s = Object.entries(e.queries.query); o < s.length; o++) {
|
|
2247
|
+
for (var u = s[o], h = u[0], l = [], m = 0, c = u[1]; m < c.length; m++) {
|
|
2248
2248
|
var f = c[m];
|
|
2249
2249
|
xn(t, f.obsSet) ? f.subscribers.forEach(function(p) {
|
|
2250
2250
|
return n.add(p);
|
|
@@ -2266,13 +2266,13 @@ var Kr = { exports: {} };
|
|
|
2266
2266
|
});
|
|
2267
2267
|
t.isBeingOpened = !0, t.dbOpenError = null, t.openComplete = !1;
|
|
2268
2268
|
var r = t.openCanceller, i = Math.round(10 * e.verno), o = !1;
|
|
2269
|
-
function
|
|
2269
|
+
function s() {
|
|
2270
2270
|
if (t.openCanceller !== r)
|
|
2271
2271
|
throw new I.DatabaseClosed("db.open() was cancelled");
|
|
2272
2272
|
}
|
|
2273
2273
|
function u() {
|
|
2274
2274
|
return new K(function(f, d) {
|
|
2275
|
-
if (
|
|
2275
|
+
if (s(), !n)
|
|
2276
2276
|
throw new I.MissingAPI();
|
|
2277
2277
|
var y = e.name, g = t.autoSchema || !i ? n.open(y) : n.open(y, i);
|
|
2278
2278
|
if (!g)
|
|
@@ -2325,7 +2325,7 @@ var Kr = { exports: {} };
|
|
|
2325
2325
|
}).finally(function() {
|
|
2326
2326
|
return clearInterval(h);
|
|
2327
2327
|
}) : Promise.resolve()).then(u)]).then(function() {
|
|
2328
|
-
return
|
|
2328
|
+
return s(), t.onReadyBeingFired = [], K.resolve(wn(function() {
|
|
2329
2329
|
return e.on.ready.fire(e.vip);
|
|
2330
2330
|
})).then(function f() {
|
|
2331
2331
|
if (0 < t.onReadyBeingFired.length) {
|
|
@@ -2378,16 +2378,16 @@ var Kr = { exports: {} };
|
|
|
2378
2378
|
var si = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
|
|
2379
2379
|
return _(_({}, e), { table: function(t) {
|
|
2380
2380
|
var n = e.table(t), r = n.schema, i = {}, o = [];
|
|
2381
|
-
function
|
|
2381
|
+
function s(c, f, d) {
|
|
2382
2382
|
var y = ft(c), g = i[y] = i[y] || [], p = c == null ? 0 : typeof c == "string" ? 1 : c.length, b = 0 < f, b = _(_({}, d), { name: b ? "".concat(y, "(virtual-from:").concat(d.name, ")") : d.name, lowLevelIndex: d, isVirtual: b, keyTail: f, keyLength: p, extractKey: pn(c), unique: !b && d.unique });
|
|
2383
|
-
return g.push(b), b.isPrimaryKey || o.push(b), 1 < p &&
|
|
2383
|
+
return g.push(b), b.isPrimaryKey || o.push(b), 1 < p && s(p === 2 ? c[0] : c.slice(0, p - 1), f + 1, d), g.sort(function(w, k) {
|
|
2384
2384
|
return w.keyTail - k.keyTail;
|
|
2385
2385
|
}), b;
|
|
2386
2386
|
}
|
|
2387
|
-
t =
|
|
2387
|
+
t = s(r.primaryKey.keyPath, 0, r.primaryKey), i[":id"] = [t];
|
|
2388
2388
|
for (var u = 0, h = r.indexes; u < h.length; u++) {
|
|
2389
2389
|
var l = h[u];
|
|
2390
|
-
|
|
2390
|
+
s(l.keyPath, 0, l);
|
|
2391
2391
|
}
|
|
2392
2392
|
function m(c) {
|
|
2393
2393
|
var f, d = c.query.index;
|
|
@@ -2423,8 +2423,8 @@ var Kr = { exports: {} };
|
|
|
2423
2423
|
} };
|
|
2424
2424
|
function jn(e, t, n, r) {
|
|
2425
2425
|
return n = n || {}, r = r || "", B(e).forEach(function(i) {
|
|
2426
|
-
var o,
|
|
2427
|
-
ne(t, i) ? (o = e[i],
|
|
2426
|
+
var o, s, u;
|
|
2427
|
+
ne(t, i) ? (o = e[i], s = t[i], typeof o == "object" && typeof s == "object" && o && s ? (u = Gt(o)) !== Gt(s) ? n[r + i] = t[i] : u === "Object" ? jn(o, s, n, r + i + ".") : o !== s && (n[r + i] = t[i]) : o !== s && (n[r + i] = t[i])) : n[r + i] = void 0;
|
|
2428
2428
|
}), B(t).forEach(function(i) {
|
|
2429
2429
|
ne(e, i) || (n[r + i] = t[i]);
|
|
2430
2430
|
}), n;
|
|
@@ -2436,7 +2436,7 @@ var Kr = { exports: {} };
|
|
|
2436
2436
|
return _(_({}, e), { table: function(t) {
|
|
2437
2437
|
var n = e.table(t), r = n.schema.primaryKey;
|
|
2438
2438
|
return _(_({}, n), { mutate: function(i) {
|
|
2439
|
-
var o = D.trans,
|
|
2439
|
+
var o = D.trans, s = o.table(t).hook, u = s.deleting, h = s.creating, l = s.updating;
|
|
2440
2440
|
switch (i.type) {
|
|
2441
2441
|
case "add":
|
|
2442
2442
|
if (h.fire === V)
|
|
@@ -2549,14 +2549,14 @@ var Kr = { exports: {} };
|
|
|
2549
2549
|
var d = (y = d.query).index, y = y.range;
|
|
2550
2550
|
return [d, new re((d = y.lower) !== null && d !== void 0 ? d : e.MIN_KEY, (y = y.upper) !== null && y !== void 0 ? y : e.MAX_KEY)];
|
|
2551
2551
|
}
|
|
2552
|
-
var o = e.table(r),
|
|
2552
|
+
var o = e.table(r), s = o.schema, u = s.primaryKey, h = u.extractKey, l = u.outbound, m = _(_({}, o), { mutate: function(f) {
|
|
2553
2553
|
function d(E) {
|
|
2554
2554
|
return E = "idb://".concat(t, "/").concat(r, "/").concat(E), w[E] || (w[E] = new re());
|
|
2555
2555
|
}
|
|
2556
2556
|
var y, g, p, b = f.trans, w = f.mutatedParts || (f.mutatedParts = {}), k = d(""), x = d(":dels"), O = f.type, C = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [Cn(u, f).filter(function(E) {
|
|
2557
2557
|
return E;
|
|
2558
2558
|
}), f.values] : [], P = C[0], S = C[1], C = f.trans._cache;
|
|
2559
|
-
return W(P) ? (k.addKeys(P), (C = O === "delete" || P.length === S.length ? br(P, C) : null) || x.addKeys(P), (C || S) && (y = d, g = C, p = S,
|
|
2559
|
+
return W(P) ? (k.addKeys(P), (C = O === "delete" || P.length === S.length ? br(P, C) : null) || x.addKeys(P), (C || S) && (y = d, g = C, p = S, s.indexes.forEach(function(E) {
|
|
2560
2560
|
var T = y(E.name || "");
|
|
2561
2561
|
function R(z) {
|
|
2562
2562
|
return z != null ? E.extractKey(z) : null;
|
|
@@ -2570,7 +2570,7 @@ var Kr = { exports: {} };
|
|
|
2570
2570
|
var ue = g && R(g[N]), N = p && R(p[N]);
|
|
2571
2571
|
U(ue, N) !== 0 && (ue != null && $(ue), N != null && $(N));
|
|
2572
2572
|
});
|
|
2573
|
-
}))) : P ? (S = { from: P.lower, to: P.upper }, x.add(S), k.add(S)) : (k.add(n), x.add(n),
|
|
2573
|
+
}))) : P ? (S = { from: P.lower, to: P.upper }, x.add(S), k.add(S)) : (k.add(n), x.add(n), s.indexes.forEach(function(E) {
|
|
2574
2574
|
return d(E.name).add(n);
|
|
2575
2575
|
})), o.mutate(f).then(function(E) {
|
|
2576
2576
|
return !P || f.type !== "add" && f.type !== "put" || k.addKeys(E.results), b.mutatedParts = zt(b.mutatedParts || {}, w), E;
|
|
@@ -2639,7 +2639,7 @@ var Kr = { exports: {} };
|
|
|
2639
2639
|
function xr(e, t, f, r, i, o) {
|
|
2640
2640
|
if (!f || f.length === 0)
|
|
2641
2641
|
return e;
|
|
2642
|
-
var
|
|
2642
|
+
var s = t.query.index, u = s.multiEntry, h = t.query.range, l = r.schema.primaryKey.extractKey, m = s.extractKey, c = (s.lowLevelIndex || s).extractKey, f = f.reduce(function(d, y) {
|
|
2643
2643
|
var g = d, p = y.type === "add" || y.type === "put" ? y.values.filter(function(x) {
|
|
2644
2644
|
return x = m(x), u && W(x) ? x.some(function(O) {
|
|
2645
2645
|
return Kn(O, h);
|
|
@@ -2725,8 +2725,8 @@ var Kr = { exports: {} };
|
|
|
2725
2725
|
var di = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
|
|
2726
2726
|
var t = e.schema.name;
|
|
2727
2727
|
return _(_({}, e), { transaction: function(n, r, i) {
|
|
2728
|
-
var o,
|
|
2729
|
-
return r === "readwrite" && (
|
|
2728
|
+
var o, s, u = e.transaction(n, r, i);
|
|
2729
|
+
return r === "readwrite" && (s = (o = new AbortController()).signal, i = function(h) {
|
|
2730
2730
|
return function() {
|
|
2731
2731
|
if (o.abort(), r === "readwrite") {
|
|
2732
2732
|
for (var l = /* @__PURE__ */ new Set(), m = 0, c = n; m < c.length; m++) {
|
|
@@ -2760,21 +2760,21 @@ var Kr = { exports: {} };
|
|
|
2760
2760
|
});
|
|
2761
2761
|
}
|
|
2762
2762
|
};
|
|
2763
|
-
}, u.addEventListener("abort", i(!1), { signal:
|
|
2763
|
+
}, u.addEventListener("abort", i(!1), { signal: s }), u.addEventListener("error", i(!1), { signal: s }), u.addEventListener("complete", i(!0), { signal: s })), u;
|
|
2764
2764
|
}, table: function(n) {
|
|
2765
2765
|
var r = e.table(n), i = r.schema.primaryKey;
|
|
2766
2766
|
return _(_({}, r), { mutate: function(o) {
|
|
2767
|
-
var
|
|
2768
|
-
if (i.outbound ||
|
|
2767
|
+
var s = D.trans;
|
|
2768
|
+
if (i.outbound || s.db._options.cache === "disabled" || s.explicit)
|
|
2769
2769
|
return r.mutate(o);
|
|
2770
2770
|
var u = Re["idb://".concat(t, "/").concat(n)];
|
|
2771
|
-
return u ? (
|
|
2771
|
+
return u ? (s = r.mutate(o), o.type !== "add" && o.type !== "put" || !(50 <= o.values.length || Cn(i, o).some(function(h) {
|
|
2772
2772
|
return h == null;
|
|
2773
|
-
})) ? (u.optimisticOps.push(o), o.mutatedParts && Lt(o.mutatedParts),
|
|
2773
|
+
})) ? (u.optimisticOps.push(o), o.mutatedParts && Lt(o.mutatedParts), s.then(function(h) {
|
|
2774
2774
|
0 < h.numFailures && (Ce(u.optimisticOps, o), (h = kr(0, o, h)) && u.optimisticOps.push(h), o.mutatedParts && Lt(o.mutatedParts));
|
|
2775
|
-
}),
|
|
2775
|
+
}), s.catch(function() {
|
|
2776
2776
|
Ce(u.optimisticOps, o), o.mutatedParts && Lt(o.mutatedParts);
|
|
2777
|
-
})) :
|
|
2777
|
+
})) : s.then(function(h) {
|
|
2778
2778
|
var l = kr(0, _(_({}, o), { values: o.values.map(function(d, c) {
|
|
2779
2779
|
var f, d = (f = i.keyPath) !== null && f !== void 0 && f.includes(".") ? _e(d) : _({}, d);
|
|
2780
2780
|
return ce(d, i.keyPath, h.results[c]), d;
|
|
@@ -2782,11 +2782,11 @@ var Kr = { exports: {} };
|
|
|
2782
2782
|
u.optimisticOps.push(l), queueMicrotask(function() {
|
|
2783
2783
|
return o.mutatedParts && Lt(o.mutatedParts);
|
|
2784
2784
|
});
|
|
2785
|
-
}),
|
|
2785
|
+
}), s) : r.mutate(o);
|
|
2786
2786
|
}, query: function(o) {
|
|
2787
2787
|
if (!wr(D, r) || !_r("query", o))
|
|
2788
2788
|
return r.query(o);
|
|
2789
|
-
var
|
|
2789
|
+
var s = ((l = D.trans) === null || l === void 0 ? void 0 : l.db._options.cache) === "immutable", c = D, u = c.requery, h = c.signal, l = function(y, g, p, b) {
|
|
2790
2790
|
var w = Re["idb://".concat(y, "/").concat(g)];
|
|
2791
2791
|
if (!w)
|
|
2792
2792
|
return [];
|
|
@@ -2811,7 +2811,7 @@ var Kr = { exports: {} };
|
|
|
2811
2811
|
}(t, n, "query", o), m = l[0], c = l[1], f = l[2], d = l[3];
|
|
2812
2812
|
return m && c ? m.obsSet = o.obsSet : (c = r.query(o).then(function(y) {
|
|
2813
2813
|
var g = y.result;
|
|
2814
|
-
if (m && (m.res = g),
|
|
2814
|
+
if (m && (m.res = g), s) {
|
|
2815
2815
|
for (var p = 0, b = g.length; p < b; ++p)
|
|
2816
2816
|
Object.freeze(g[p]);
|
|
2817
2817
|
Object.freeze(g);
|
|
@@ -2821,7 +2821,7 @@ var Kr = { exports: {} };
|
|
|
2821
2821
|
}).catch(function(y) {
|
|
2822
2822
|
return d && m && Ce(d, m), Promise.reject(y);
|
|
2823
2823
|
}), m = { obsSet: o.obsSet, promise: c, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, d ? d.push(m) : (d = [m], (f = f || (Re["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = d)), hi(m, d, u, h), m.promise.then(function(y) {
|
|
2824
|
-
return { result: xr(y.result, o, f == null ? void 0 : f.optimisticOps, r, m,
|
|
2824
|
+
return { result: xr(y.result, o, f == null ? void 0 : f.optimisticOps, r, m, s) };
|
|
2825
2825
|
});
|
|
2826
2826
|
} });
|
|
2827
2827
|
} });
|
|
@@ -2855,8 +2855,8 @@ var Kr = { exports: {} };
|
|
|
2855
2855
|
}).then(e);
|
|
2856
2856
|
}, J.prototype.use = function(e) {
|
|
2857
2857
|
var t = e.stack, n = e.create, r = e.level, i = e.name;
|
|
2858
|
-
return i && this.unuse({ stack: t, name: i }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: r ?? 10, name: i }), e.sort(function(o,
|
|
2859
|
-
return o.level -
|
|
2858
|
+
return i && this.unuse({ stack: t, name: i }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: r ?? 10, name: i }), e.sort(function(o, s) {
|
|
2859
|
+
return o.level - s.level;
|
|
2860
2860
|
}), this;
|
|
2861
2861
|
}, J.prototype.unuse = function(e) {
|
|
2862
2862
|
var t = e.stack, n = e.name, r = e.create;
|
|
@@ -2890,7 +2890,7 @@ var Kr = { exports: {} };
|
|
|
2890
2890
|
e === void 0 && (e = { disableAutoOpen: !0 });
|
|
2891
2891
|
var n = 0 < arguments.length, r = this._state;
|
|
2892
2892
|
return new K(function(i, o) {
|
|
2893
|
-
function
|
|
2893
|
+
function s() {
|
|
2894
2894
|
t.close(e);
|
|
2895
2895
|
var u = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2896
2896
|
u.onsuccess = H(function() {
|
|
@@ -2900,7 +2900,7 @@ var Kr = { exports: {} };
|
|
|
2900
2900
|
}
|
|
2901
2901
|
if (n)
|
|
2902
2902
|
throw new I.InvalidArgument("Arguments not allowed in db.delete()");
|
|
2903
|
-
r.isBeingOpened ? r.dbReadyPromise.then(
|
|
2903
|
+
r.isBeingOpened ? r.dbReadyPromise.then(s) : s();
|
|
2904
2904
|
});
|
|
2905
2905
|
}, J.prototype.backendDB = function() {
|
|
2906
2906
|
return this.idbdb;
|
|
@@ -2931,10 +2931,10 @@ var Kr = { exports: {} };
|
|
|
2931
2931
|
}, J.prototype._transaction = function(e, t, n) {
|
|
2932
2932
|
var r = this, i = D.trans;
|
|
2933
2933
|
i && i.db === this && e.indexOf("!") === -1 || (i = null);
|
|
2934
|
-
var o,
|
|
2934
|
+
var o, s, u = e.indexOf("?") !== -1;
|
|
2935
2935
|
e = e.replace("!", "").replace("?", "");
|
|
2936
2936
|
try {
|
|
2937
|
-
if (
|
|
2937
|
+
if (s = t.map(function(l) {
|
|
2938
2938
|
if (l = l instanceof r.Table ? l.name : l, typeof l != "string")
|
|
2939
2939
|
throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
|
|
2940
2940
|
return l;
|
|
@@ -2951,7 +2951,7 @@ var Kr = { exports: {} };
|
|
|
2951
2951
|
throw new I.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
|
|
2952
2952
|
i = null;
|
|
2953
2953
|
}
|
|
2954
|
-
i &&
|
|
2954
|
+
i && s.forEach(function(l) {
|
|
2955
2955
|
if (i && i.storeNames.indexOf(l) === -1) {
|
|
2956
2956
|
if (!u)
|
|
2957
2957
|
throw new I.SubTransaction("Table " + l + " not included in parent transaction.");
|
|
@@ -2993,7 +2993,7 @@ var Kr = { exports: {} };
|
|
|
2993
2993
|
return p._reject(k), X(k);
|
|
2994
2994
|
});
|
|
2995
2995
|
});
|
|
2996
|
-
}).bind(null, this, o,
|
|
2996
|
+
}).bind(null, this, o, s, i, n);
|
|
2997
2997
|
return i ? i._promise(o, h, "lock") : D.trans ? Te(D.transless, function() {
|
|
2998
2998
|
return r._whenReady(h);
|
|
2999
2999
|
}) : this._whenReady(h);
|
|
@@ -3007,7 +3007,7 @@ var Kr = { exports: {} };
|
|
|
3007
3007
|
this._middlewares = {}, this.verno = 0;
|
|
3008
3008
|
var r = J.dependencies;
|
|
3009
3009
|
this._options = t = _({ addons: J.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
3010
|
-
var i, o,
|
|
3010
|
+
var i, o, s, u, h, l = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: V, dbReadyPromise: null, cancelOpen: V, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
3011
3011
|
l.dbReadyPromise = new K(function(c) {
|
|
3012
3012
|
l.dbReadyResolve = c;
|
|
3013
3013
|
}), l.openCanceller = new K(function(c, f) {
|
|
@@ -3034,9 +3034,9 @@ var Kr = { exports: {} };
|
|
|
3034
3034
|
this._ctx = { table: p, index: g.index, isPrimKey: !g.index || p.schema.primKey.keyPath && g.index === p.schema.primKey.name, range: d, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: y, or: g.or, valueMapper: b !== et ? b : null };
|
|
3035
3035
|
})), this.Table = (o = this, st(sr.prototype, function(c, f, d) {
|
|
3036
3036
|
this.db = o, this._tx = d, this.name = c, this.schema = f, this.hook = o._allTables[c] ? o._allTables[c].hook : at(null, { creating: [zr, V], reading: [Nr, et], updating: [Ur, V], deleting: [Lr, V] });
|
|
3037
|
-
})), this.Transaction = (
|
|
3037
|
+
})), this.Transaction = (s = this, st(Zr.prototype, function(c, f, d, y, g) {
|
|
3038
3038
|
var p = this;
|
|
3039
|
-
this.db =
|
|
3039
|
+
this.db = s, this.mode = c, this.storeNames = f, this.schema = d, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = at(this, "complete", "error", "abort"), this.parent = g || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new K(function(b, w) {
|
|
3040
3040
|
p._resolve = b, p._reject = w;
|
|
3041
3041
|
}), this._completion.then(function() {
|
|
3042
3042
|
p.active = !1, p.on.complete.fire();
|
|
@@ -3101,10 +3101,10 @@ var Kr = { exports: {} };
|
|
|
3101
3101
|
}
|
|
3102
3102
|
function Sr(e) {
|
|
3103
3103
|
var t, n = !1, r = new pi(function(i) {
|
|
3104
|
-
var o = Ht(e),
|
|
3104
|
+
var o = Ht(e), s, u = !1, h = {}, l = {}, m = { get closed() {
|
|
3105
3105
|
return u;
|
|
3106
3106
|
}, unsubscribe: function() {
|
|
3107
|
-
u || (u = !0,
|
|
3107
|
+
u || (u = !0, s && s.abort(), c && Pe.storagemutated.unsubscribe(d));
|
|
3108
3108
|
} };
|
|
3109
3109
|
i.start && i.start(m);
|
|
3110
3110
|
var c = !1, f = function() {
|
|
@@ -3113,7 +3113,7 @@ var Kr = { exports: {} };
|
|
|
3113
3113
|
zt(h, g), xn(l, h) && f();
|
|
3114
3114
|
}, y = function() {
|
|
3115
3115
|
var g, p, b;
|
|
3116
|
-
!u && $t.indexedDB && (h = {}, g = {},
|
|
3116
|
+
!u && $t.indexedDB && (h = {}, g = {}, s && s.abort(), s = new AbortController(), b = function(w) {
|
|
3117
3117
|
var k = Ve();
|
|
3118
3118
|
try {
|
|
3119
3119
|
o && Ye();
|
|
@@ -3122,7 +3122,7 @@ var Kr = { exports: {} };
|
|
|
3122
3122
|
} finally {
|
|
3123
3123
|
k && Ge();
|
|
3124
3124
|
}
|
|
3125
|
-
}(p = { subscr: g, signal:
|
|
3125
|
+
}(p = { subscr: g, signal: s.signal, requery: f, querier: e, trans: null }), Promise.resolve(b).then(function(w) {
|
|
3126
3126
|
n = !0, t = w, u || p.signal.aborted || (h = {}, function(k) {
|
|
3127
3127
|
for (var x in k)
|
|
3128
3128
|
if (ne(k, x))
|
|
@@ -3246,59 +3246,59 @@ const Nn = /* @__PURE__ */ Oi(Si), jr = Symbol.for("Dexie"), zn = globalThis[jr]
|
|
|
3246
3246
|
if (Nn.semVer !== zn.semVer)
|
|
3247
3247
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Nn.semVer} and ${zn.semVer}`);
|
|
3248
3248
|
function Q(M) {
|
|
3249
|
-
let
|
|
3250
|
-
return M.order && (
|
|
3249
|
+
let a = `${M.type}.${M.topics}`;
|
|
3250
|
+
return M.order && (a += `.${M.order}`), M.period && (a += `.${M.period}`), a;
|
|
3251
3251
|
}
|
|
3252
|
-
function mt(M,
|
|
3252
|
+
function mt(M, a) {
|
|
3253
3253
|
var W;
|
|
3254
3254
|
let v, _, j, F, B;
|
|
3255
3255
|
switch (M.moderation) {
|
|
3256
3256
|
case "before":
|
|
3257
|
-
v = /* @__PURE__ */ new Date(), _ = (W = M.beforeTime) == null ? void 0 : W.split(":"), j = Number.parseInt(_ ? _[0] : "00"), F = Number.parseInt(_ ? _[1] : "00"), B = Number.parseInt(_ ? _[2] : "00"),
|
|
3257
|
+
v = /* @__PURE__ */ new Date(), _ = (W = M.beforeTime) == null ? void 0 : W.split(":"), j = Number.parseInt(_ ? _[0] : "00"), F = Number.parseInt(_ ? _[1] : "00"), B = Number.parseInt(_ ? _[2] : "00"), a.before = v.setHours(j, F, B, 0) / 1e3, a.period || (a.period = v.getDay() === 1 ? 72 : 24);
|
|
3258
3258
|
break;
|
|
3259
3259
|
case "delayed":
|
|
3260
|
-
M.delay && M.delay > 0 && (
|
|
3260
|
+
M.delay && M.delay > 0 && (a.delay = `${M.delay}`);
|
|
3261
3261
|
break;
|
|
3262
3262
|
case "approved":
|
|
3263
|
-
|
|
3263
|
+
a.approved = "1";
|
|
3264
3264
|
break;
|
|
3265
3265
|
default:
|
|
3266
|
-
M.period !== 0 && (
|
|
3266
|
+
M.period !== 0 && (a.period = M.period);
|
|
3267
3267
|
}
|
|
3268
|
-
return
|
|
3268
|
+
return a;
|
|
3269
3269
|
}
|
|
3270
3270
|
class Ei {
|
|
3271
|
-
constructor(
|
|
3271
|
+
constructor(a) {
|
|
3272
3272
|
A(this, "db");
|
|
3273
3273
|
A(this, "subscribers", []);
|
|
3274
3274
|
A(this, "options");
|
|
3275
|
-
A(this, "setCloud", async (
|
|
3276
|
-
id:
|
|
3277
|
-
dashboard_id:
|
|
3275
|
+
A(this, "setCloud", async (a, v) => v !== "" ? await this.db.table("cloud").put({
|
|
3276
|
+
id: a.widget,
|
|
3277
|
+
dashboard_id: a.dashboard,
|
|
3278
3278
|
data: v.data
|
|
3279
3279
|
}).then(() => 201).catch(() => 400) : 400);
|
|
3280
|
-
A(this, "getCloud", async (
|
|
3281
|
-
const v = await this.db.table(Cr).where({ id:
|
|
3282
|
-
return v ? (v.presentation = (
|
|
3280
|
+
A(this, "getCloud", async (a) => {
|
|
3281
|
+
const v = await this.db.table(Cr).where({ id: a.widget }).last();
|
|
3282
|
+
return v ? (v.presentation = (a == null ? void 0 : a.presentation) || "not set", v.slide = (a == null ? void 0 : a.slide) || "not set", v) : { data: null };
|
|
3283
3283
|
});
|
|
3284
|
-
A(this, "setSeries", async (
|
|
3285
|
-
id:
|
|
3286
|
-
dashboard_id:
|
|
3284
|
+
A(this, "setSeries", async (a, v) => v !== "" ? await this.db.table(Fn).put({
|
|
3285
|
+
id: a.widget,
|
|
3286
|
+
dashboard_id: a.dashboard,
|
|
3287
3287
|
data: v.data
|
|
3288
3288
|
}).then(() => 201).catch(() => 400) : 400);
|
|
3289
|
-
A(this, "getSeries", async (
|
|
3290
|
-
const v = await this.db.table(Fn).where({ id:
|
|
3291
|
-
return v.presentation = (
|
|
3289
|
+
A(this, "getSeries", async (a) => {
|
|
3290
|
+
const v = await this.db.table(Fn).where({ id: a.widget }).last();
|
|
3291
|
+
return v.presentation = (a == null ? void 0 : a.presentation) || "not set", v.slide = (a == null ? void 0 : a.slide) || "not set", v ?? { data: null };
|
|
3292
3292
|
});
|
|
3293
|
-
A(this, "setMessages", async (
|
|
3293
|
+
A(this, "setMessages", async (a, v) => {
|
|
3294
3294
|
const _ = v.title;
|
|
3295
3295
|
try {
|
|
3296
3296
|
return v.data.messages.forEach(async (j) => {
|
|
3297
3297
|
var F, B, W;
|
|
3298
3298
|
await this.db.table(Ne).put({ id: j.id, utc: j.utc, data: j }), await this.db.table(gi).put({
|
|
3299
|
-
widget_id:
|
|
3299
|
+
widget_id: a.widget,
|
|
3300
3300
|
message_id: j.id,
|
|
3301
|
-
dashboard_id:
|
|
3301
|
+
dashboard_id: a.dashboard,
|
|
3302
3302
|
title: _,
|
|
3303
3303
|
engagement: (F = j.dynamics) == null ? void 0 : F.engagement,
|
|
3304
3304
|
impressions: (B = j.dynamics) == null ? void 0 : B.semrush_visits,
|
|
@@ -3311,48 +3311,48 @@ class Ei {
|
|
|
3311
3311
|
return 400;
|
|
3312
3312
|
}
|
|
3313
3313
|
});
|
|
3314
|
-
A(this, "getMessages", async (
|
|
3315
|
-
const v = (F) => F.widget_id ===
|
|
3314
|
+
A(this, "getMessages", async (a) => {
|
|
3315
|
+
const v = (F) => F.widget_id === a.widget, _ = (F) => F.utc > ((a == null ? void 0 : a.since) || 0), j = (F) => (F == null ? void 0 : F.visible) !== 0;
|
|
3316
3316
|
try {
|
|
3317
|
-
const F = await this.db.table("topics").orderBy("utc").reverse().filter(v).filter(_).filter(j).limit((
|
|
3317
|
+
const F = await this.db.table("topics").orderBy("utc").reverse().filter(v).filter(_).filter(j).limit((a == null ? void 0 : a.limit) ?? 25).toArray(), B = F[0] ? F[0].title : "No results", W = F.map(
|
|
3318
3318
|
(oe) => oe.message_id
|
|
3319
3319
|
), q = await this.db.table("messages").where("id").anyOf(W).toArray().then((oe) => oe.sort((Z, ne) => ne.utc - Z.utc));
|
|
3320
3320
|
return {
|
|
3321
3321
|
data: {
|
|
3322
|
-
presentation: (
|
|
3323
|
-
slide: (
|
|
3322
|
+
presentation: (a == null ? void 0 : a.presentation) || "not set",
|
|
3323
|
+
slide: (a == null ? void 0 : a.slide) || "not set",
|
|
3324
3324
|
messages: q.map((oe) => oe.data),
|
|
3325
3325
|
title: B,
|
|
3326
|
-
topics: [
|
|
3327
|
-
query:
|
|
3326
|
+
topics: [a.dashboard, a.widget].join("-"),
|
|
3327
|
+
query: a
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
3330
|
} catch {
|
|
3331
3331
|
return { data: null };
|
|
3332
3332
|
}
|
|
3333
3333
|
});
|
|
3334
|
-
A(this, "cleanMessages", async (
|
|
3335
|
-
const v = Date.now() / 1e3, _ = (j) => j.utc <
|
|
3334
|
+
A(this, "cleanMessages", async (a) => {
|
|
3335
|
+
const v = Date.now() / 1e3, _ = (j) => j.utc < a - v;
|
|
3336
3336
|
await this.db.table("topics").orderBy("utc").filter(_).modify((j, F) => {
|
|
3337
3337
|
delete F.value;
|
|
3338
3338
|
});
|
|
3339
3339
|
});
|
|
3340
|
-
A(this, "subscribe", (
|
|
3340
|
+
A(this, "subscribe", (a) => {
|
|
3341
3341
|
var _;
|
|
3342
|
-
if (
|
|
3343
|
-
const j = (_ =
|
|
3344
|
-
|
|
3342
|
+
if (a.widget === void 0) {
|
|
3343
|
+
const j = (_ = a.topics) == null ? void 0 : _.split("-");
|
|
3344
|
+
a.dashboard = j ? j[0] : "", a.widget = j ? j[1] : "";
|
|
3345
3345
|
}
|
|
3346
3346
|
this.subscribers.filter(
|
|
3347
|
-
(j) => j.widget ===
|
|
3348
|
-
).length > 0 || (
|
|
3347
|
+
(j) => j.widget === a.widget
|
|
3348
|
+
).length > 0 || (a.type === Ne && (a = mt(this.options, a)), console.info(
|
|
3349
3349
|
"%cstorage",
|
|
3350
3350
|
pt,
|
|
3351
3351
|
"subscribe",
|
|
3352
|
-
|
|
3353
|
-
), this.subscribers.push(
|
|
3352
|
+
a
|
|
3353
|
+
), this.subscribers.push(a));
|
|
3354
3354
|
});
|
|
3355
|
-
this.options =
|
|
3355
|
+
this.options = a, this.db = new zn(a.app), this.db.version(2).stores({
|
|
3356
3356
|
player: "id,title,name,location",
|
|
3357
3357
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
3358
3358
|
display: "id,monitor_id,presentation_id,colstart,colend,rowstart,rowend",
|
|
@@ -3370,161 +3370,161 @@ class Ei {
|
|
|
3370
3370
|
}
|
|
3371
3371
|
}
|
|
3372
3372
|
function Ln(M) {
|
|
3373
|
-
return new Promise((
|
|
3374
|
-
M.oncomplete = M.onsuccess = () =>
|
|
3373
|
+
return new Promise((a, v) => {
|
|
3374
|
+
M.oncomplete = M.onsuccess = () => a(M.result), M.onabort = M.onerror = () => v(M.error);
|
|
3375
3375
|
});
|
|
3376
3376
|
}
|
|
3377
|
-
function Pi(M,
|
|
3377
|
+
function Pi(M, a) {
|
|
3378
3378
|
const v = indexedDB.open(M);
|
|
3379
|
-
v.onupgradeneeded = () => v.result.createObjectStore(
|
|
3379
|
+
v.onupgradeneeded = () => v.result.createObjectStore(a);
|
|
3380
3380
|
const _ = Ln(v);
|
|
3381
|
-
return (j, F) => _.then((B) => F(B.transaction(
|
|
3381
|
+
return (j, F) => _.then((B) => F(B.transaction(a, j).objectStore(a)));
|
|
3382
3382
|
}
|
|
3383
3383
|
let In;
|
|
3384
3384
|
function Ar() {
|
|
3385
3385
|
return In || (In = Pi("keyval-store", "keyval")), In;
|
|
3386
3386
|
}
|
|
3387
|
-
function Rn(M,
|
|
3388
|
-
return
|
|
3387
|
+
function Rn(M, a = Ar()) {
|
|
3388
|
+
return a("readonly", (v) => Ln(v.get(M)));
|
|
3389
3389
|
}
|
|
3390
|
-
function Mn(M,
|
|
3391
|
-
return v("readwrite", (_) => (_.put(
|
|
3390
|
+
function Mn(M, a, v = Ar()) {
|
|
3391
|
+
return v("readwrite", (_) => (_.put(a, M), Ln(_.transaction)));
|
|
3392
3392
|
}
|
|
3393
3393
|
class ji {
|
|
3394
|
-
constructor(
|
|
3394
|
+
constructor(a) {
|
|
3395
3395
|
A(this, "subscribers", []);
|
|
3396
3396
|
A(this, "options");
|
|
3397
|
-
A(this, "setCloud", async (
|
|
3397
|
+
A(this, "setCloud", async (a, v) => {
|
|
3398
3398
|
if (!v.success)
|
|
3399
3399
|
return 400;
|
|
3400
|
-
const _ = Q(
|
|
3400
|
+
const _ = Q(a);
|
|
3401
3401
|
return delete v.success, delete v.message, await Mn(_, v).then(() => 201).catch(() => 400);
|
|
3402
3402
|
});
|
|
3403
|
-
A(this, "getCloud", async (
|
|
3404
|
-
const v = Q(
|
|
3403
|
+
A(this, "getCloud", async (a) => {
|
|
3404
|
+
const v = Q(a);
|
|
3405
3405
|
return await Rn(v);
|
|
3406
3406
|
});
|
|
3407
|
-
A(this, "setSeries", async (
|
|
3407
|
+
A(this, "setSeries", async (a, v) => {
|
|
3408
3408
|
if (!v.success)
|
|
3409
3409
|
return 400;
|
|
3410
|
-
const _ = Q(
|
|
3410
|
+
const _ = Q(a);
|
|
3411
3411
|
return delete v.success, delete v.message, await Mn(_, v).then(() => 201).catch(() => 400);
|
|
3412
3412
|
});
|
|
3413
|
-
A(this, "getSeries", async (
|
|
3414
|
-
const v = Q(
|
|
3413
|
+
A(this, "getSeries", async (a) => {
|
|
3414
|
+
const v = Q(a);
|
|
3415
3415
|
return await Rn(v);
|
|
3416
3416
|
});
|
|
3417
|
-
A(this, "setMessages", async (
|
|
3417
|
+
A(this, "setMessages", async (a, v) => {
|
|
3418
3418
|
if (!v.success)
|
|
3419
3419
|
return 400;
|
|
3420
|
-
const _ = Q(
|
|
3420
|
+
const _ = Q(a);
|
|
3421
3421
|
return delete v.success, delete v.message, await Mn(_, v).then(() => 201).catch(() => 400);
|
|
3422
3422
|
});
|
|
3423
|
-
A(this, "getMessages", async (
|
|
3424
|
-
const v = Q(
|
|
3423
|
+
A(this, "getMessages", async (a) => {
|
|
3424
|
+
const v = Q(a);
|
|
3425
3425
|
return await Rn(v).then((_) => _).catch(() => 400);
|
|
3426
3426
|
});
|
|
3427
|
-
A(this, "cleanMessages", async (
|
|
3428
|
-
A(this, "subscribe", (
|
|
3427
|
+
A(this, "cleanMessages", async (a) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((v) => v())));
|
|
3428
|
+
A(this, "subscribe", (a) => {
|
|
3429
3429
|
var _;
|
|
3430
|
-
if (
|
|
3431
|
-
const j = (_ =
|
|
3432
|
-
|
|
3430
|
+
if (a.widget === void 0) {
|
|
3431
|
+
const j = (_ = a.topics) == null ? void 0 : _.split("-");
|
|
3432
|
+
a.dashboard = j ? j[0] : "", a.widget = j ? j[1] : "";
|
|
3433
3433
|
}
|
|
3434
|
-
|
|
3435
|
-
(j) => j.widget ===
|
|
3434
|
+
a.type === Ne && (a = mt(this.options, a)), !(this.subscribers.filter(
|
|
3435
|
+
(j) => j.widget === a.widget
|
|
3436
3436
|
).length > 0) && (console.info(
|
|
3437
3437
|
"%cstorage",
|
|
3438
3438
|
pt,
|
|
3439
3439
|
"subscribe",
|
|
3440
|
-
|
|
3441
|
-
), this.subscribers.push(
|
|
3440
|
+
a
|
|
3441
|
+
), this.subscribers.push(a));
|
|
3442
3442
|
});
|
|
3443
|
-
this.options =
|
|
3443
|
+
this.options = a;
|
|
3444
3444
|
}
|
|
3445
3445
|
getSubscribers() {
|
|
3446
3446
|
return this.subscribers;
|
|
3447
3447
|
}
|
|
3448
3448
|
}
|
|
3449
3449
|
class Ci {
|
|
3450
|
-
constructor(
|
|
3450
|
+
constructor(a) {
|
|
3451
3451
|
A(this, "subscribers", []);
|
|
3452
3452
|
A(this, "options");
|
|
3453
|
-
A(this, "setCloud", async (
|
|
3454
|
-
const _ = Q(
|
|
3453
|
+
A(this, "setCloud", async (a, v) => {
|
|
3454
|
+
const _ = Q(a);
|
|
3455
3455
|
try {
|
|
3456
3456
|
return localStorage.setObject(_, v), 201;
|
|
3457
3457
|
} catch {
|
|
3458
|
-
return console.debug("[storage] error",
|
|
3458
|
+
return console.debug("[storage] error", a), 400;
|
|
3459
3459
|
}
|
|
3460
3460
|
});
|
|
3461
|
-
A(this, "getCloud", async (
|
|
3462
|
-
const v = Q(
|
|
3461
|
+
A(this, "getCloud", async (a) => {
|
|
3462
|
+
const v = Q(a);
|
|
3463
3463
|
try {
|
|
3464
3464
|
return localStorage.getObject(v);
|
|
3465
3465
|
} catch {
|
|
3466
|
-
return console.debug("[storage] error",
|
|
3466
|
+
return console.debug("[storage] error", a), 400;
|
|
3467
3467
|
}
|
|
3468
3468
|
});
|
|
3469
|
-
A(this, "setSeries", async (
|
|
3470
|
-
const _ = Q(
|
|
3469
|
+
A(this, "setSeries", async (a, v) => {
|
|
3470
|
+
const _ = Q(a);
|
|
3471
3471
|
try {
|
|
3472
3472
|
return localStorage.setObject(_, v), 201;
|
|
3473
3473
|
} catch {
|
|
3474
|
-
return console.debug("[storage] error",
|
|
3474
|
+
return console.debug("[storage] error", a), 400;
|
|
3475
3475
|
}
|
|
3476
3476
|
});
|
|
3477
|
-
A(this, "getSeries", async (
|
|
3478
|
-
const v = Q(
|
|
3477
|
+
A(this, "getSeries", async (a) => {
|
|
3478
|
+
const v = Q(a);
|
|
3479
3479
|
try {
|
|
3480
3480
|
return localStorage.getObject(v);
|
|
3481
3481
|
} catch {
|
|
3482
|
-
return console.debug("[storage] error",
|
|
3482
|
+
return console.debug("[storage] error", a), 400;
|
|
3483
3483
|
}
|
|
3484
3484
|
});
|
|
3485
|
-
A(this, "setMessages", async (
|
|
3486
|
-
const _ = Q(
|
|
3485
|
+
A(this, "setMessages", async (a, v) => {
|
|
3486
|
+
const _ = Q(a);
|
|
3487
3487
|
try {
|
|
3488
3488
|
return localStorage.setObject(_, v), 200;
|
|
3489
3489
|
} catch {
|
|
3490
|
-
return console.debug("[storage] error",
|
|
3490
|
+
return console.debug("[storage] error", a), 400;
|
|
3491
3491
|
}
|
|
3492
3492
|
});
|
|
3493
|
-
A(this, "getMessages", async (
|
|
3494
|
-
const v = Q(
|
|
3493
|
+
A(this, "getMessages", async (a) => {
|
|
3494
|
+
const v = Q(a);
|
|
3495
3495
|
try {
|
|
3496
3496
|
return localStorage.getObject(v);
|
|
3497
3497
|
} catch {
|
|
3498
|
-
return console.debug("[storage] error",
|
|
3498
|
+
return console.debug("[storage] error", a), 400;
|
|
3499
3499
|
}
|
|
3500
3500
|
});
|
|
3501
|
-
A(this, "cleanMessages", async (
|
|
3501
|
+
A(this, "cleanMessages", async (a) => {
|
|
3502
3502
|
console.log("cleanMessages not implemented for ", this.options.storage);
|
|
3503
3503
|
});
|
|
3504
|
-
A(this, "setWidget", async (
|
|
3505
|
-
const v = `widget.${
|
|
3504
|
+
A(this, "setWidget", async (a) => {
|
|
3505
|
+
const v = `widget.${a.widget}`;
|
|
3506
3506
|
try {
|
|
3507
|
-
return localStorage.setObject(v,
|
|
3507
|
+
return localStorage.setObject(v, a), 201;
|
|
3508
3508
|
} catch {
|
|
3509
|
-
return console.debug("[storage] error",
|
|
3509
|
+
return console.debug("[storage] error", a), 400;
|
|
3510
3510
|
}
|
|
3511
3511
|
});
|
|
3512
|
-
A(this, "subscribe", (
|
|
3512
|
+
A(this, "subscribe", (a) => {
|
|
3513
3513
|
var _;
|
|
3514
|
-
if (
|
|
3515
|
-
const j = (_ =
|
|
3516
|
-
|
|
3514
|
+
if (a.widget === void 0) {
|
|
3515
|
+
const j = (_ = a.topics) == null ? void 0 : _.split("-");
|
|
3516
|
+
a.dashboard = j ? j[0] : "", a.widget = j ? j[1] : "";
|
|
3517
3517
|
}
|
|
3518
|
-
|
|
3519
|
-
(j) => j.widget ===
|
|
3518
|
+
a.type === Ne && (a = mt(this.options, a)), !this.subscribers.filter(
|
|
3519
|
+
(j) => j.widget === a.widget
|
|
3520
3520
|
).length && (console.info(
|
|
3521
3521
|
"%cstorage",
|
|
3522
3522
|
yt,
|
|
3523
3523
|
"subscribe",
|
|
3524
|
-
|
|
3525
|
-
), this.subscribers.push(
|
|
3524
|
+
a
|
|
3525
|
+
), this.subscribers.push(a));
|
|
3526
3526
|
});
|
|
3527
|
-
this.options =
|
|
3527
|
+
this.options = a, Storage.prototype.setObject = function(v, _) {
|
|
3528
3528
|
this.setObject(v, JSON.stringify(_));
|
|
3529
3529
|
}, Storage.prototype.getObject = function(v) {
|
|
3530
3530
|
const _ = this.getObject(v);
|
|
@@ -3536,84 +3536,84 @@ class Ci {
|
|
|
3536
3536
|
}
|
|
3537
3537
|
}
|
|
3538
3538
|
class Ki {
|
|
3539
|
-
constructor(
|
|
3539
|
+
constructor(a) {
|
|
3540
3540
|
A(this, "subscribers", []);
|
|
3541
3541
|
A(this, "options");
|
|
3542
|
-
A(this, "setCloud", async (
|
|
3543
|
-
const _ = Q(
|
|
3542
|
+
A(this, "setCloud", async (a, v) => {
|
|
3543
|
+
const _ = Q(a);
|
|
3544
3544
|
try {
|
|
3545
3545
|
return sessionStorage.setObject(_, v), 201;
|
|
3546
3546
|
} catch {
|
|
3547
|
-
return console.debug("[storage] error",
|
|
3547
|
+
return console.debug("[storage] error", a), 400;
|
|
3548
3548
|
}
|
|
3549
3549
|
});
|
|
3550
|
-
A(this, "getCloud", async (
|
|
3551
|
-
const v = Q(
|
|
3550
|
+
A(this, "getCloud", async (a) => {
|
|
3551
|
+
const v = Q(a);
|
|
3552
3552
|
try {
|
|
3553
3553
|
return sessionStorage.getObject(v);
|
|
3554
3554
|
} catch {
|
|
3555
|
-
return console.debug("[storage] error",
|
|
3555
|
+
return console.debug("[storage] error", a), 400;
|
|
3556
3556
|
}
|
|
3557
3557
|
});
|
|
3558
|
-
A(this, "setSeries", async (
|
|
3559
|
-
const _ = Q(
|
|
3558
|
+
A(this, "setSeries", async (a, v) => {
|
|
3559
|
+
const _ = Q(a);
|
|
3560
3560
|
try {
|
|
3561
3561
|
return sessionStorage.setObject(_, v), 201;
|
|
3562
3562
|
} catch {
|
|
3563
|
-
return console.debug("[storage] error",
|
|
3563
|
+
return console.debug("[storage] error", a), 400;
|
|
3564
3564
|
}
|
|
3565
3565
|
});
|
|
3566
|
-
A(this, "getSeries", async (
|
|
3567
|
-
const v = Q(
|
|
3566
|
+
A(this, "getSeries", async (a) => {
|
|
3567
|
+
const v = Q(a);
|
|
3568
3568
|
try {
|
|
3569
3569
|
return sessionStorage.getObject(v);
|
|
3570
3570
|
} catch {
|
|
3571
|
-
return console.debug("[storage] error",
|
|
3571
|
+
return console.debug("[storage] error", a), 400;
|
|
3572
3572
|
}
|
|
3573
3573
|
});
|
|
3574
|
-
A(this, "setMessages", async (
|
|
3575
|
-
const _ = Q(
|
|
3574
|
+
A(this, "setMessages", async (a, v) => {
|
|
3575
|
+
const _ = Q(a);
|
|
3576
3576
|
try {
|
|
3577
3577
|
return sessionStorage.setObject(_, v), 201;
|
|
3578
3578
|
} catch {
|
|
3579
|
-
return console.debug("[storage] error",
|
|
3579
|
+
return console.debug("[storage] error", a), 400;
|
|
3580
3580
|
}
|
|
3581
3581
|
});
|
|
3582
|
-
A(this, "getMessages", async (
|
|
3583
|
-
const v = Q(
|
|
3582
|
+
A(this, "getMessages", async (a) => {
|
|
3583
|
+
const v = Q(a);
|
|
3584
3584
|
try {
|
|
3585
3585
|
return sessionStorage.getObject(v);
|
|
3586
3586
|
} catch {
|
|
3587
|
-
console.debug("[storage] error",
|
|
3587
|
+
console.debug("[storage] error", a);
|
|
3588
3588
|
}
|
|
3589
3589
|
});
|
|
3590
|
-
A(this, "cleanMessages", async (
|
|
3590
|
+
A(this, "cleanMessages", async (a) => {
|
|
3591
3591
|
console.log("cleanMessages not implemented for ", this.options.storage);
|
|
3592
3592
|
});
|
|
3593
|
-
A(this, "setWidget", async (
|
|
3594
|
-
const v = `widget.${
|
|
3593
|
+
A(this, "setWidget", async (a) => {
|
|
3594
|
+
const v = `widget.${a.widget}`;
|
|
3595
3595
|
try {
|
|
3596
|
-
return sessionStorage.setObject(v,
|
|
3596
|
+
return sessionStorage.setObject(v, a), 201;
|
|
3597
3597
|
} catch {
|
|
3598
|
-
return console.debug("[storage] error",
|
|
3598
|
+
return console.debug("[storage] error", a), 400;
|
|
3599
3599
|
}
|
|
3600
3600
|
});
|
|
3601
|
-
A(this, "subscribe", (
|
|
3601
|
+
A(this, "subscribe", (a) => {
|
|
3602
3602
|
var _;
|
|
3603
|
-
if (
|
|
3604
|
-
const j = (_ =
|
|
3605
|
-
|
|
3603
|
+
if (a.widget === void 0) {
|
|
3604
|
+
const j = (_ = a.topics) == null ? void 0 : _.split("-");
|
|
3605
|
+
a.dashboard = j ? j[0] : "", a.widget = j ? j[1] : "";
|
|
3606
3606
|
}
|
|
3607
|
-
|
|
3608
|
-
(j) => j.widget ===
|
|
3607
|
+
a.type === Ne && (a = mt(this.options, a)), !this.subscribers.filter(
|
|
3608
|
+
(j) => j.widget === a.widget
|
|
3609
3609
|
).length && (console.info(
|
|
3610
3610
|
"%cstorage",
|
|
3611
3611
|
yt,
|
|
3612
3612
|
"subscribe",
|
|
3613
|
-
|
|
3614
|
-
), this.subscribers.push(
|
|
3613
|
+
a
|
|
3614
|
+
), this.subscribers.push(a));
|
|
3615
3615
|
});
|
|
3616
|
-
this.options =
|
|
3616
|
+
this.options = a, Storage.prototype.setObject = function(v, _) {
|
|
3617
3617
|
this.setItem(v, JSON.stringify(_));
|
|
3618
3618
|
}, Storage.prototype.getObject = function(v) {
|
|
3619
3619
|
const _ = this.getItem(v);
|
|
@@ -3625,102 +3625,102 @@ class Ki {
|
|
|
3625
3625
|
}
|
|
3626
3626
|
}
|
|
3627
3627
|
class Ai {
|
|
3628
|
-
constructor(
|
|
3628
|
+
constructor(a) {
|
|
3629
3629
|
A(this, "subscribers", []);
|
|
3630
3630
|
A(this, "options");
|
|
3631
|
-
A(this, "setCloud", async (
|
|
3632
|
-
const _ = Q(
|
|
3631
|
+
A(this, "setCloud", async (a, v) => {
|
|
3632
|
+
const _ = Q(a);
|
|
3633
3633
|
try {
|
|
3634
3634
|
return window.BuzzCasting.WidgetData[_] = v, 201;
|
|
3635
3635
|
} catch {
|
|
3636
|
-
return console.debug("[storage] error",
|
|
3636
|
+
return console.debug("[storage] error", a), 400;
|
|
3637
3637
|
}
|
|
3638
3638
|
});
|
|
3639
|
-
A(this, "getCloud", async (
|
|
3640
|
-
const v = Q(
|
|
3639
|
+
A(this, "getCloud", async (a) => {
|
|
3640
|
+
const v = Q(a);
|
|
3641
3641
|
try {
|
|
3642
3642
|
return window.BuzzCasting.WidgetData[v];
|
|
3643
3643
|
} catch {
|
|
3644
|
-
return console.debug("[storage] error",
|
|
3644
|
+
return console.debug("[storage] error", a), 400;
|
|
3645
3645
|
}
|
|
3646
3646
|
});
|
|
3647
|
-
A(this, "setSeries", async (
|
|
3648
|
-
const _ = Q(
|
|
3647
|
+
A(this, "setSeries", async (a, v) => {
|
|
3648
|
+
const _ = Q(a);
|
|
3649
3649
|
try {
|
|
3650
3650
|
return window.BuzzCasting.WidgetData[_] = v, 201;
|
|
3651
3651
|
} catch {
|
|
3652
|
-
return console.debug("[storage] error",
|
|
3652
|
+
return console.debug("[storage] error", a), 400;
|
|
3653
3653
|
}
|
|
3654
3654
|
});
|
|
3655
|
-
A(this, "getSeries", async (
|
|
3656
|
-
const v = Q(
|
|
3655
|
+
A(this, "getSeries", async (a) => {
|
|
3656
|
+
const v = Q(a);
|
|
3657
3657
|
try {
|
|
3658
3658
|
return window.BuzzCasting.WidgetData[v];
|
|
3659
3659
|
} catch {
|
|
3660
|
-
return console.debug("[storage] error",
|
|
3660
|
+
return console.debug("[storage] error", a), 400;
|
|
3661
3661
|
}
|
|
3662
3662
|
});
|
|
3663
|
-
A(this, "setMessages", async (
|
|
3664
|
-
const _ = Q(
|
|
3663
|
+
A(this, "setMessages", async (a, v) => {
|
|
3664
|
+
const _ = Q(a);
|
|
3665
3665
|
try {
|
|
3666
3666
|
return window.BuzzCasting.WidgetData[_] = v, 201;
|
|
3667
3667
|
} catch {
|
|
3668
|
-
return console.debug("[storage] error",
|
|
3668
|
+
return console.debug("[storage] error", a), 400;
|
|
3669
3669
|
}
|
|
3670
3670
|
});
|
|
3671
|
-
A(this, "getMessages", async (
|
|
3672
|
-
const v = Q(
|
|
3671
|
+
A(this, "getMessages", async (a) => {
|
|
3672
|
+
const v = Q(a);
|
|
3673
3673
|
try {
|
|
3674
3674
|
return window.BuzzCasting.WidgetData[v];
|
|
3675
3675
|
} catch {
|
|
3676
|
-
return console.debug("[storage] error",
|
|
3676
|
+
return console.debug("[storage] error", a), 400;
|
|
3677
3677
|
}
|
|
3678
3678
|
});
|
|
3679
|
-
A(this, "cleanMessages", async (
|
|
3679
|
+
A(this, "cleanMessages", async (a) => {
|
|
3680
3680
|
console.log("cleanMessages not implemented for ", this.options.storage);
|
|
3681
3681
|
});
|
|
3682
|
-
A(this, "setWidget", async (
|
|
3683
|
-
const v = `widget.${
|
|
3682
|
+
A(this, "setWidget", async (a) => {
|
|
3683
|
+
const v = `widget.${a.widget}`;
|
|
3684
3684
|
try {
|
|
3685
|
-
return window.BuzzCasting.WidgetData[v] =
|
|
3685
|
+
return window.BuzzCasting.WidgetData[v] = a, 201;
|
|
3686
3686
|
} catch {
|
|
3687
|
-
return console.debug("[storage] error",
|
|
3687
|
+
return console.debug("[storage] error", a), 400;
|
|
3688
3688
|
}
|
|
3689
3689
|
});
|
|
3690
|
-
A(this, "subscribe", (
|
|
3690
|
+
A(this, "subscribe", (a) => {
|
|
3691
3691
|
var _;
|
|
3692
|
-
if (
|
|
3693
|
-
const j = (_ =
|
|
3694
|
-
|
|
3692
|
+
if (a.widget === void 0) {
|
|
3693
|
+
const j = (_ = a.topics) == null ? void 0 : _.split("-");
|
|
3694
|
+
a.dashboard = j ? j[0] : "", a.widget = j ? j[1] : "";
|
|
3695
3695
|
}
|
|
3696
|
-
|
|
3697
|
-
(j) => j.widget ===
|
|
3696
|
+
a.type === Ne && (a = mt(this.options, a)), !this.subscribers.filter(
|
|
3697
|
+
(j) => j.widget === a.widget
|
|
3698
3698
|
).length && (console.info(
|
|
3699
3699
|
"%cstorage",
|
|
3700
3700
|
yt,
|
|
3701
3701
|
"subscribe",
|
|
3702
|
-
|
|
3703
|
-
), this.subscribers.push(
|
|
3702
|
+
a
|
|
3703
|
+
), this.subscribers.push(a));
|
|
3704
3704
|
});
|
|
3705
|
-
this.options =
|
|
3705
|
+
this.options = a, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
3706
3706
|
}
|
|
3707
3707
|
getSubscribers() {
|
|
3708
3708
|
return this.subscribers;
|
|
3709
3709
|
}
|
|
3710
3710
|
}
|
|
3711
3711
|
class Ti {
|
|
3712
|
-
constructor(
|
|
3712
|
+
constructor(a) {
|
|
3713
3713
|
A(this, "sm");
|
|
3714
3714
|
A(this, "api");
|
|
3715
3715
|
A(this, "bc");
|
|
3716
3716
|
A(this, "options");
|
|
3717
3717
|
A(this, "update", async () => {
|
|
3718
3718
|
var _;
|
|
3719
|
-
const
|
|
3720
|
-
if ((
|
|
3719
|
+
const a = (_ = this.sm) == null ? void 0 : _.getSubscribers();
|
|
3720
|
+
if ((a == null ? void 0 : a.length) === 0)
|
|
3721
3721
|
return;
|
|
3722
3722
|
const v = [];
|
|
3723
|
-
|
|
3723
|
+
a == null || a.forEach((j) => {
|
|
3724
3724
|
v.push(this.api.get(j));
|
|
3725
3725
|
}), await Promise.allSettled(v).then(
|
|
3726
3726
|
(j) => j.forEach(async (F) => {
|
|
@@ -3776,48 +3776,48 @@ class Ti {
|
|
|
3776
3776
|
})
|
|
3777
3777
|
);
|
|
3778
3778
|
});
|
|
3779
|
-
A(this, "hide", (
|
|
3780
|
-
this.api.hideMessage(
|
|
3779
|
+
A(this, "hide", (a) => {
|
|
3780
|
+
this.api.hideMessage(a);
|
|
3781
3781
|
});
|
|
3782
|
-
A(this, "actions", async (
|
|
3782
|
+
A(this, "actions", async (a) => {
|
|
3783
3783
|
var v;
|
|
3784
|
-
switch (
|
|
3784
|
+
switch (a.data.event) {
|
|
3785
3785
|
case "subscribe":
|
|
3786
|
-
(v = this.sm) == null || v.subscribe(
|
|
3786
|
+
(v = this.sm) == null || v.subscribe(a.data.data);
|
|
3787
3787
|
break;
|
|
3788
3788
|
case "update":
|
|
3789
3789
|
console.debug(
|
|
3790
3790
|
"%cstorage",
|
|
3791
3791
|
pt,
|
|
3792
3792
|
"update",
|
|
3793
|
-
|
|
3793
|
+
a.data
|
|
3794
3794
|
), await this.update();
|
|
3795
3795
|
break;
|
|
3796
3796
|
}
|
|
3797
3797
|
});
|
|
3798
|
-
A(this, "getCloud", async (
|
|
3798
|
+
A(this, "getCloud", async (a) => {
|
|
3799
3799
|
var v;
|
|
3800
|
-
return await ((v = this.sm) == null ? void 0 : v.getCloud(
|
|
3800
|
+
return await ((v = this.sm) == null ? void 0 : v.getCloud(a));
|
|
3801
3801
|
});
|
|
3802
|
-
A(this, "getSeries", async (
|
|
3802
|
+
A(this, "getSeries", async (a) => {
|
|
3803
3803
|
var v;
|
|
3804
|
-
return await ((v = this.sm) == null ? void 0 : v.getSeries(
|
|
3804
|
+
return await ((v = this.sm) == null ? void 0 : v.getSeries(a));
|
|
3805
3805
|
});
|
|
3806
|
-
A(this, "getMessages", async (
|
|
3806
|
+
A(this, "getMessages", async (a) => {
|
|
3807
3807
|
var v;
|
|
3808
|
-
return await ((v = this.sm) == null ? void 0 : v.getMessages(
|
|
3808
|
+
return await ((v = this.sm) == null ? void 0 : v.getMessages(a));
|
|
3809
3809
|
});
|
|
3810
3810
|
A(this, "cleanMessages", async () => {
|
|
3811
3811
|
var v, _;
|
|
3812
|
-
const
|
|
3813
|
-
return await ((_ = this.sm) == null ? void 0 : _.cleanMessages(
|
|
3812
|
+
const a = ((v = this.options) == null ? void 0 : v.retention) || 345600;
|
|
3813
|
+
return await ((_ = this.sm) == null ? void 0 : _.cleanMessages(a));
|
|
3814
3814
|
});
|
|
3815
3815
|
A(this, "getSubscribers", async () => {
|
|
3816
|
-
var
|
|
3817
|
-
return await ((
|
|
3816
|
+
var a;
|
|
3817
|
+
return await ((a = this.sm) == null ? void 0 : a.getSubscribers());
|
|
3818
3818
|
});
|
|
3819
|
-
this.options =
|
|
3820
|
-
const v = (
|
|
3819
|
+
this.options = a;
|
|
3820
|
+
const v = (a == null ? void 0 : a.slide) || a.app;
|
|
3821
3821
|
switch (this.bc = new BroadcastChannel(v), console.info(
|
|
3822
3822
|
"%cbroadcast",
|
|
3823
3823
|
Bn,
|
|
@@ -3825,21 +3825,21 @@ class Ti {
|
|
|
3825
3825
|
v
|
|
3826
3826
|
), this.bc.onmessage = (_) => {
|
|
3827
3827
|
this.actions(_);
|
|
3828
|
-
}, this.bc.postMessage({ event: "sm-init", data: {} }), this.api = new xi(
|
|
3828
|
+
}, this.bc.postMessage({ event: "sm-init", data: {} }), this.api = new xi(a), a.storage) {
|
|
3829
3829
|
case _i:
|
|
3830
|
-
this.sm = new Ei(
|
|
3830
|
+
this.sm = new Ei(a);
|
|
3831
3831
|
break;
|
|
3832
3832
|
case bi:
|
|
3833
|
-
this.sm = new Ki(
|
|
3833
|
+
this.sm = new Ki(a);
|
|
3834
3834
|
break;
|
|
3835
3835
|
case wi:
|
|
3836
|
-
this.sm = new Ci(
|
|
3836
|
+
this.sm = new Ci(a);
|
|
3837
3837
|
break;
|
|
3838
3838
|
case vi:
|
|
3839
|
-
this.sm = new ji(
|
|
3839
|
+
this.sm = new ji(a);
|
|
3840
3840
|
break;
|
|
3841
3841
|
case ki:
|
|
3842
|
-
this.sm = new Ai(
|
|
3842
|
+
this.sm = new Ai(a);
|
|
3843
3843
|
break;
|
|
3844
3844
|
default:
|
|
3845
3845
|
this.sm = null;
|