buzzcasting-storage 2.16.18 → 2.16.20
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.
|
@@ -261,6 +261,8 @@ export declare interface IMessages {
|
|
|
261
261
|
presentation?: string;
|
|
262
262
|
slide?: string;
|
|
263
263
|
title?: string;
|
|
264
|
+
dashboard?: string;
|
|
265
|
+
widget?: string;
|
|
264
266
|
topics?: string;
|
|
265
267
|
query: IQuery;
|
|
266
268
|
}
|
|
@@ -387,7 +389,7 @@ export declare interface IStorageOptions {
|
|
|
387
389
|
}
|
|
388
390
|
|
|
389
391
|
export declare interface ITopic {
|
|
390
|
-
|
|
392
|
+
message_id: string;
|
|
391
393
|
dashboard_id?: string;
|
|
392
394
|
widget_id?: string;
|
|
393
395
|
topic?: string;
|
|
@@ -2,7 +2,7 @@ var xi = Object.defineProperty;
|
|
|
2
2
|
var ki = (f, r, c) => r in f ? xi(f, r, { enumerable: !0, configurable: !0, writable: !0, value: c }) : f[r] = c;
|
|
3
3
|
var D = (f, r, c) => ki(f, typeof r != "symbol" ? r + "" : r, c);
|
|
4
4
|
var M = /* @__PURE__ */ ((f) => (f.MESSAGES = "messages", f.CLOUD = "cloud", f.SERIES = "series", f.TOPICS = "topics", f.WIDGET = "widget", f.WIDGETS = "widgets", f.SLIDE = "slide", f))(M || {}), _ = /* @__PURE__ */ ((f) => (f.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", f.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", f.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", f.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", f.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", f.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", f.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", f.NONE = "color:transparent;background-color:transparent;", f.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", f.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", f.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", f.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", f.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", f.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", f.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", f))(_ || {}), re = /* @__PURE__ */ ((f) => (f.ADD_SLIDE = "addSlide", f.APP_READY = "appReady", f.API_UPDATE = "apiUpdate", f.APPROVE_MESSAGE = "approveMessage", f.CHANNEL = "channel", f.CLEAN_MESSAGES = "cleanMessages", f.CLOSE_MODAL = "closeModal", f.ERROR = "error", f.HIDE_MESSAGE = "hideMessage", f.HIDE_LABELS = "hideLabels", f.PAUSE_PRESENTATION = "pausePresentation", f.PRESENTATION_READY = "presentationReady", f.PREV_SLIDE = "prevSlide", f.RELOAD_PRESENTATION = "reloadPresentation", f.SHOW_MODAL = "showModal", f.STAR_MESSAGE = "starMessage", f.GOTO_SLIDE = "gotoSlide", f.NEXT_SLIDE = "nextSlide", f.SLIDE_DID_LOAD = "slideDidLoad", f.SLIDE_GOTO = "slideGoto", f.SLIDE_READY = "slideReady", f.SLIDE_LOAD = "loadSlide", f.SLIDE_STORE = "storeSlide", f.SLIDE_TRANSITIONER = "slideTransitioner", f.START_TRANSITIONER = "startTransitioner", f.STORAGE_INIT = "storageInit", f.SUBSCRIBE = "subscribe", f.REMOVE_CLOUD = "removeCloud", f.UPDATE = "update", f.VERSION = "version", f.WIDGET_UPDATE = "widgetUpdate", f))(re || {}), Zt = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(Zt || {}), ge = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(ge || {});
|
|
5
|
-
const Ai = "2.16.
|
|
5
|
+
const Ai = "2.16.19";
|
|
6
6
|
class Di {
|
|
7
7
|
constructor(r) {
|
|
8
8
|
D(this, "options");
|
|
@@ -62,7 +62,7 @@ class Di {
|
|
|
62
62
|
r.widget,
|
|
63
63
|
r.id
|
|
64
64
|
), await fetch(
|
|
65
|
-
[this.url, "api", c,
|
|
65
|
+
[this.url, "api", c, "messages", r.id].join("/") + A,
|
|
66
66
|
{ ...l, method: "put" }
|
|
67
67
|
).then((k) => {
|
|
68
68
|
if (!k.ok)
|
|
@@ -169,9 +169,9 @@ var jr = { exports: {} };
|
|
|
169
169
|
}), e;
|
|
170
170
|
}
|
|
171
171
|
typeof Promise > "u" || k.Promise || (k.Promise = Promise);
|
|
172
|
-
var q = Object.getPrototypeOf,
|
|
172
|
+
var q = Object.getPrototypeOf, le = {}.hasOwnProperty;
|
|
173
173
|
function ne(e, t) {
|
|
174
|
-
return
|
|
174
|
+
return le.call(e, t);
|
|
175
175
|
}
|
|
176
176
|
function xe(e, t) {
|
|
177
177
|
typeof t == "function" && (t = t(q(e))), (typeof Reflect > "u" ? N : Reflect.ownKeys)(t).forEach(function(n) {
|
|
@@ -1742,27 +1742,27 @@ var jr = { exports: {} };
|
|
|
1742
1742
|
var P, $ = (E || O || { length: 1 }).length;
|
|
1743
1743
|
if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
|
|
1744
1744
|
if ($ === 0) return I({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1745
|
-
function F(
|
|
1746
|
-
++pe, pt(
|
|
1745
|
+
function F(ue) {
|
|
1746
|
+
++pe, pt(ue);
|
|
1747
1747
|
}
|
|
1748
1748
|
var z = [], U = [], pe = 0;
|
|
1749
1749
|
if (S === "deleteRange") {
|
|
1750
1750
|
if (x.type === 4) return I({ numFailures: pe, failures: U, results: [], lastResult: void 0 });
|
|
1751
1751
|
x.type === 3 ? z.push(P = C.clear()) : z.push(P = C.delete(i(x)));
|
|
1752
1752
|
} else {
|
|
1753
|
-
var R = j ? R ? [O, E] : [O, null] : [E, null], W = R[0],
|
|
1754
|
-
if (j) for (var
|
|
1755
|
-
else for (
|
|
1753
|
+
var R = j ? R ? [O, E] : [O, null] : [E, null], W = R[0], oe = R[1];
|
|
1754
|
+
if (j) for (var se = 0; se < $; ++se) z.push(P = oe && oe[se] !== void 0 ? C[S](W[se], oe[se]) : C[S](W[se])), P.onerror = F;
|
|
1755
|
+
else for (se = 0; se < $; ++se) z.push(P = C[S](W[se])), P.onerror = F;
|
|
1756
1756
|
}
|
|
1757
|
-
function Vt(
|
|
1758
|
-
|
|
1757
|
+
function Vt(ue) {
|
|
1758
|
+
ue = ue.target.result, z.forEach(function(We, Ln) {
|
|
1759
1759
|
return We.error != null && (U[Ln] = We.error);
|
|
1760
1760
|
}), I({ numFailures: pe, failures: U, results: S === "delete" ? E : z.map(function(We) {
|
|
1761
1761
|
return We.result;
|
|
1762
|
-
}), lastResult:
|
|
1762
|
+
}), lastResult: ue });
|
|
1763
1763
|
}
|
|
1764
|
-
P.onerror = function(
|
|
1765
|
-
F(
|
|
1764
|
+
P.onerror = function(ue) {
|
|
1765
|
+
F(ue), Vt(ue);
|
|
1766
1766
|
}, P.onsuccess = Vt;
|
|
1767
1767
|
});
|
|
1768
1768
|
}, getMany: function(w) {
|
|
@@ -1807,31 +1807,31 @@ var jr = { exports: {} };
|
|
|
1807
1807
|
}, W.trans = y, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
|
|
1808
1808
|
throw new Error("Cursor not started");
|
|
1809
1809
|
}, W.fail = Z(T), W.next = function() {
|
|
1810
|
-
var
|
|
1810
|
+
var oe = this, se = 1;
|
|
1811
1811
|
return this.start(function() {
|
|
1812
|
-
return
|
|
1812
|
+
return se-- ? oe.continue() : oe.stop();
|
|
1813
1813
|
}).then(function() {
|
|
1814
|
-
return
|
|
1814
|
+
return oe;
|
|
1815
1815
|
});
|
|
1816
|
-
}, W.start = function(
|
|
1817
|
-
function
|
|
1816
|
+
}, W.start = function(oe) {
|
|
1817
|
+
function se() {
|
|
1818
1818
|
if (P.result) try {
|
|
1819
|
-
|
|
1820
|
-
} catch (
|
|
1821
|
-
W.fail(
|
|
1819
|
+
oe();
|
|
1820
|
+
} catch (ue) {
|
|
1821
|
+
W.fail(ue);
|
|
1822
1822
|
}
|
|
1823
1823
|
else W.done = !0, W.start = function() {
|
|
1824
1824
|
throw new Error("Cursor behind last entry");
|
|
1825
1825
|
}, W.stop();
|
|
1826
1826
|
}
|
|
1827
|
-
var Vt = new Promise(function(
|
|
1828
|
-
|
|
1829
|
-
W.stop = W.continue = W.continuePrimaryKey = W.advance = pe,
|
|
1827
|
+
var Vt = new Promise(function(ue, We) {
|
|
1828
|
+
ue = Z(ue), P.onerror = me(We), W.fail = We, W.stop = function(Ln) {
|
|
1829
|
+
W.stop = W.continue = W.continuePrimaryKey = W.advance = pe, ue(Ln);
|
|
1830
1830
|
};
|
|
1831
1831
|
});
|
|
1832
|
-
return P.onsuccess = Z(function(
|
|
1833
|
-
P.onsuccess =
|
|
1834
|
-
}), W.continue = F, W.continuePrimaryKey = z, W.advance = U,
|
|
1832
|
+
return P.onsuccess = Z(function(ue) {
|
|
1833
|
+
P.onsuccess = se, se();
|
|
1834
|
+
}), W.continue = F, W.continuePrimaryKey = z, W.advance = U, se(), Vt;
|
|
1835
1835
|
}, I(W)) : I(null);
|
|
1836
1836
|
}, T);
|
|
1837
1837
|
});
|
|
@@ -2087,9 +2087,9 @@ var jr = { exports: {} };
|
|
|
2087
2087
|
function Dn(e) {
|
|
2088
2088
|
return !("from" in e);
|
|
2089
2089
|
}
|
|
2090
|
-
var
|
|
2090
|
+
var ce = function(e, t) {
|
|
2091
2091
|
if (!this) {
|
|
2092
|
-
var n = new
|
|
2092
|
+
var n = new ce();
|
|
2093
2093
|
return e && "d" in e && V(n, e), n;
|
|
2094
2094
|
}
|
|
2095
2095
|
V(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
|
|
@@ -2162,7 +2162,7 @@ var jr = { exports: {} };
|
|
|
2162
2162
|
return t[n] && wr(t[n], e[n]);
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
|
-
xe(
|
|
2165
|
+
xe(ce.prototype, ((he = { add: function(e) {
|
|
2166
2166
|
return vt(this, e), this;
|
|
2167
2167
|
}, addKey: function(e) {
|
|
2168
2168
|
return bt(this, e, e), this;
|
|
@@ -2293,8 +2293,8 @@ var jr = { exports: {} };
|
|
|
2293
2293
|
var v;
|
|
2294
2294
|
return d && (v = {}, e.tables.forEach(function(p) {
|
|
2295
2295
|
p.schema.indexes.forEach(function(m) {
|
|
2296
|
-
m.name && (v["idb://".concat(e.name, "/").concat(p.name, "/").concat(m.name)] = new
|
|
2297
|
-
}), v["idb://".concat(e.name, "/").concat(p.name, "/")] = v["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new
|
|
2296
|
+
m.name && (v["idb://".concat(e.name, "/").concat(p.name, "/").concat(m.name)] = new ce(-1 / 0, [[[]]]));
|
|
2297
|
+
}), v["idb://".concat(e.name, "/").concat(p.name, "/")] = v["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new ce(-1 / 0, [[[]]]);
|
|
2298
2298
|
}), Re(gt).fire(v), Rn(v, !0)), e;
|
|
2299
2299
|
});
|
|
2300
2300
|
}
|
|
@@ -2473,7 +2473,7 @@ var jr = { exports: {} };
|
|
|
2473
2473
|
}
|
|
2474
2474
|
}
|
|
2475
2475
|
var wi = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
|
|
2476
|
-
var t = e.schema.name, n = new
|
|
2476
|
+
var t = e.schema.name, n = new ce(e.MIN_KEY, e.MAX_KEY);
|
|
2477
2477
|
return l(l({}, e), { transaction: function(i, a, o) {
|
|
2478
2478
|
if (L.subscr && a !== "readonly") throw new G.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(L.querier));
|
|
2479
2479
|
return e.transaction(i, a, o);
|
|
@@ -2482,7 +2482,7 @@ var jr = { exports: {} };
|
|
|
2482
2482
|
return p.compound && p.keyPath.includes(s.keyPath);
|
|
2483
2483
|
}), b = l(l({}, a), { mutate: function(p) {
|
|
2484
2484
|
function m(P) {
|
|
2485
|
-
return P = "idb://".concat(t, "/").concat(i, "/").concat(P), O[P] || (O[P] = new
|
|
2485
|
+
return P = "idb://".concat(t, "/").concat(i, "/").concat(P), O[P] || (O[P] = new ce());
|
|
2486
2486
|
}
|
|
2487
2487
|
var w, y, S, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), x = m(""), I = m(":dels"), T = p.type, j = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Mn(s, p).filter(function(P) {
|
|
2488
2488
|
return P;
|
|
@@ -2497,9 +2497,9 @@ var jr = { exports: {} };
|
|
|
2497
2497
|
return $.addKey(pe);
|
|
2498
2498
|
}) : $.addKey(U);
|
|
2499
2499
|
}
|
|
2500
|
-
(y || S).forEach(function(U,
|
|
2501
|
-
var W = y && F(y[
|
|
2502
|
-
H(W,
|
|
2500
|
+
(y || S).forEach(function(U, oe) {
|
|
2501
|
+
var W = y && F(y[oe]), oe = S && F(S[oe]);
|
|
2502
|
+
H(W, oe) !== 0 && (W != null && z(W), oe != null && z(oe));
|
|
2503
2503
|
});
|
|
2504
2504
|
}))) : C ? (R = { from: C.lower, to: C.upper }, I.add(R), x.add(R)) : (x.add(n), I.add(n), o.indexes.forEach(function(P) {
|
|
2505
2505
|
return m(P.name).add(n);
|
|
@@ -2517,18 +2517,18 @@ var jr = { exports: {} };
|
|
|
2517
2517
|
});
|
|
2518
2518
|
} }), d = function(m) {
|
|
2519
2519
|
var w = m.query, m = w.index, w = w.range;
|
|
2520
|
-
return [m, new
|
|
2520
|
+
return [m, new ce((m = w.lower) !== null && m !== void 0 ? m : e.MIN_KEY, (w = w.upper) !== null && w !== void 0 ? w : e.MAX_KEY)];
|
|
2521
2521
|
}, v = { get: function(p) {
|
|
2522
|
-
return [s, new
|
|
2522
|
+
return [s, new ce(p.key)];
|
|
2523
2523
|
}, getMany: function(p) {
|
|
2524
|
-
return [s, new
|
|
2524
|
+
return [s, new ce().addKeys(p.keys)];
|
|
2525
2525
|
}, count: d, query: d, openCursor: d };
|
|
2526
2526
|
return N(v).forEach(function(p) {
|
|
2527
2527
|
b[p] = function(m) {
|
|
2528
2528
|
var w = L.subscr, y = !!w, S = xr(L, a) && kr(p, m) ? m.obsSet = {} : w;
|
|
2529
2529
|
if (y) {
|
|
2530
2530
|
var E = function(R) {
|
|
2531
|
-
return R = "idb://".concat(t, "/").concat(i, "/").concat(R), S[R] || (S[R] = new
|
|
2531
|
+
return R = "idb://".concat(t, "/").concat(i, "/").concat(R), S[R] || (S[R] = new ce());
|
|
2532
2532
|
}, O = E(""), x = E(":dels"), w = v[p](m), y = w[0], w = w[1];
|
|
2533
2533
|
if ((p === "query" && y.isPrimaryKey && !m.values ? x : E(y.name || "")).add(w), !y.isPrimaryKey) {
|
|
2534
2534
|
if (p !== "count") {
|
|
@@ -2580,7 +2580,7 @@ var jr = { exports: {} };
|
|
|
2580
2580
|
if (!v || v.length === 0) return e;
|
|
2581
2581
|
var s = t.query.index, u = s.multiEntry, g = t.query.range, h = i.schema.primaryKey.extractKey, b = s.extractKey, d = (s.lowLevelIndex || s).extractKey, v = v.reduce(function(p, m) {
|
|
2582
2582
|
var w = p, y = [];
|
|
2583
|
-
if (m.type === "add" || m.type === "put") for (var S = new
|
|
2583
|
+
if (m.type === "add" || m.type === "put") for (var S = new ce(), E = m.values.length - 1; 0 <= E; --E) {
|
|
2584
2584
|
var O, x = m.values[E], I = h(x);
|
|
2585
2585
|
S.hasKey(I) || (O = b(x), (u && B(O) ? O.some(function(j) {
|
|
2586
2586
|
return Kn(j, g);
|
|
@@ -2593,7 +2593,7 @@ var jr = { exports: {} };
|
|
|
2593
2593
|
}));
|
|
2594
2594
|
break;
|
|
2595
2595
|
case "put":
|
|
2596
|
-
var T = new
|
|
2596
|
+
var T = new ce().addKeys(m.values.map(function(P) {
|
|
2597
2597
|
return h(P);
|
|
2598
2598
|
})), w = p.filter(function(P) {
|
|
2599
2599
|
return !T.hasKey(t.values ? h(P) : P);
|
|
@@ -2602,7 +2602,7 @@ var jr = { exports: {} };
|
|
|
2602
2602
|
}));
|
|
2603
2603
|
break;
|
|
2604
2604
|
case "delete":
|
|
2605
|
-
var C = new
|
|
2605
|
+
var C = new ce().addKeys(m.keys);
|
|
2606
2606
|
w = p.filter(function(P) {
|
|
2607
2607
|
return !C.hasKey(t.values ? h(P) : P);
|
|
2608
2608
|
});
|
|
@@ -3128,7 +3128,7 @@ var jr = { exports: {} };
|
|
|
3128
3128
|
for (var t = 0, n = Ze; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
|
|
3129
3129
|
}
|
|
3130
3130
|
}), addEventListener("pageshow", function(e) {
|
|
3131
|
-
!Ee.disableBfCache && e.persisted && (ye && console.debug("Dexie: handling persisted pageshow"), Cr(), Bn({ all: new
|
|
3131
|
+
!Ee.disableBfCache && e.persisted && (ye && console.debug("Dexie: handling persisted pageshow"), Cr(), Bn({ all: new ce(-1 / 0, [[]]) }));
|
|
3132
3132
|
})), K.rejectionMapper = function(e, t) {
|
|
3133
3133
|
return !e || e instanceof Ye || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Zn[e.name] ? e : (t = new Zn[e.name](t || e.message, e), "stack" in e && ke(t, "stack", { get: function() {
|
|
3134
3134
|
return this.inner.stack;
|
|
@@ -3139,7 +3139,7 @@ var jr = { exports: {} };
|
|
|
3139
3139
|
return new ht({ add: e });
|
|
3140
3140
|
}, remove: function(e) {
|
|
3141
3141
|
return new ht({ remove: e });
|
|
3142
|
-
}, default: Ee, RangeSet:
|
|
3142
|
+
}, default: Ee, RangeSet: ce, mergeRanges: vt, rangesOverlap: wr }), { default: Ee }), Ee;
|
|
3143
3143
|
});
|
|
3144
3144
|
})(jr);
|
|
3145
3145
|
var Ii = jr.exports;
|
|
@@ -3238,9 +3238,9 @@ class Mr {
|
|
|
3238
3238
|
if (k.length === 0)
|
|
3239
3239
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3240
3240
|
const N = k[0] ? k[0].title : "No title", B = k.map(
|
|
3241
|
-
(
|
|
3242
|
-
), q = (await this.db.table(M.MESSAGES).where("id").anyOf(B).toArray().then((
|
|
3243
|
-
(
|
|
3241
|
+
(le) => le.message_id
|
|
3242
|
+
), q = (await this.db.table(M.MESSAGES).where("id").anyOf(B).toArray().then((le) => le.sort((ne, xe) => xe.utc - ne.utc))).map(
|
|
3243
|
+
(le) => le.data
|
|
3244
3244
|
);
|
|
3245
3245
|
return {
|
|
3246
3246
|
data: {
|
|
@@ -3248,6 +3248,8 @@ class Mr {
|
|
|
3248
3248
|
slide: (r == null ? void 0 : r.slide) || "not set",
|
|
3249
3249
|
messages: q,
|
|
3250
3250
|
title: N,
|
|
3251
|
+
dashboard: r.dashboard,
|
|
3252
|
+
widget: r.widget,
|
|
3251
3253
|
topics: [r.dashboard, r.widget].join("-"),
|
|
3252
3254
|
query: r
|
|
3253
3255
|
},
|
|
@@ -3298,46 +3300,46 @@ class Mr {
|
|
|
3298
3300
|
utc: k.utc,
|
|
3299
3301
|
data: k,
|
|
3300
3302
|
expires: k.expires
|
|
3301
|
-
}).catch((
|
|
3303
|
+
}).catch((le) => {
|
|
3302
3304
|
A++, console.error(
|
|
3303
3305
|
"%cstorage",
|
|
3304
3306
|
_.STORAGE,
|
|
3305
3307
|
"set message",
|
|
3306
3308
|
`title: ${l}`,
|
|
3307
3309
|
k,
|
|
3308
|
-
|
|
3310
|
+
le.message
|
|
3309
3311
|
);
|
|
3310
3312
|
}), await this.db.table(M.TOPICS).put({
|
|
3313
|
+
title: l,
|
|
3311
3314
|
widget_id: r.widget,
|
|
3312
3315
|
message_id: k.id,
|
|
3313
3316
|
dashboard_id: r.dashboard,
|
|
3314
|
-
title: l,
|
|
3315
3317
|
engagement: (N = k.dynamics) == null ? void 0 : N.engagement,
|
|
3316
3318
|
impressions: (B = k.dynamics) == null ? void 0 : B.semrush_visits,
|
|
3317
3319
|
reach: (V = k.dynamics) == null ? void 0 : V.potential_reach,
|
|
3318
3320
|
sentiment: ((q = k.topics[0]) == null ? void 0 : q.sentiment) || 0,
|
|
3319
3321
|
utc: k.utc,
|
|
3320
3322
|
expires: k.expires
|
|
3321
|
-
}).catch((
|
|
3323
|
+
}).catch((le) => {
|
|
3322
3324
|
A++, console.error(
|
|
3323
3325
|
"%cstorage",
|
|
3324
3326
|
_.STORAGE,
|
|
3325
3327
|
"set topic",
|
|
3326
3328
|
`title: ${l}`,
|
|
3327
3329
|
k,
|
|
3328
|
-
|
|
3330
|
+
le.message
|
|
3329
3331
|
);
|
|
3330
3332
|
}));
|
|
3331
3333
|
}), c.data.topics.forEach(async (k) => {
|
|
3332
|
-
const N = k.
|
|
3333
|
-
await this.db.table(M.TOPICS).where("message_id").equals(N).modify({ visible: B }).catch((
|
|
3334
|
+
const N = k.message_id, B = k.visible ? 1 : 0, V = k.title;
|
|
3335
|
+
await this.db.table(M.TOPICS).where("message_id").equals(N).modify({ visible: B }).catch((q) => {
|
|
3334
3336
|
A++, console.error(
|
|
3335
3337
|
"%cstorage",
|
|
3336
3338
|
_.STORAGE,
|
|
3337
3339
|
"update message visibility",
|
|
3338
3340
|
`title: ${V}`,
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
+
`widget: ${k.widget_id}`,
|
|
3342
|
+
q.message
|
|
3341
3343
|
);
|
|
3342
3344
|
});
|
|
3343
3345
|
}), A === 0 ? 201 : 400;
|
|
@@ -4203,10 +4205,10 @@ class Ji {
|
|
|
4203
4205
|
const V = this.sm.subscribers.filter(
|
|
4204
4206
|
(ne) => ne.widget === B.query.widget
|
|
4205
4207
|
)[0];
|
|
4206
|
-
let q = "",
|
|
4208
|
+
let q = "", le;
|
|
4207
4209
|
switch (B.query.type) {
|
|
4208
4210
|
case M.MESSAGES:
|
|
4209
|
-
if (
|
|
4211
|
+
if (le = B.data.messages.filter((ne) => ne.id !== null), B.data.messages = le, q = $n(B.data.messages), V.hash === q)
|
|
4210
4212
|
return console.debug(
|
|
4211
4213
|
"%capi%c %cno updates",
|
|
4212
4214
|
_.API,
|