buzzcasting-storage 3.5.7 → 3.6.0
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 +575 -556
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Aa = Object.defineProperty;
|
|
2
|
-
var Pa = (
|
|
3
|
-
var _ = (
|
|
4
|
-
var D = /* @__PURE__ */ ((
|
|
5
|
-
const Da = "3.5.
|
|
2
|
+
var Pa = (d, n, s) => n in d ? Aa(d, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[n] = s;
|
|
3
|
+
var _ = (d, n, s) => Pa(d, typeof n != "symbol" ? n + "" : n, s);
|
|
4
|
+
var D = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(D || {}), l = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(l || {}), q = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(q || {}), Vt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Vt || {}), me = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(me || {});
|
|
5
|
+
const Da = "3.5.8";
|
|
6
6
|
class xa {
|
|
7
7
|
constructor(n) {
|
|
8
8
|
_(this, "options");
|
|
@@ -37,11 +37,11 @@ class xa {
|
|
|
37
37
|
const k = Object.keys(S).length > 0 ? `?${new URLSearchParams(S).toString()}` : "";
|
|
38
38
|
return console.info(
|
|
39
39
|
"%capi%c %cfetch",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
l.API,
|
|
41
|
+
l.NONE,
|
|
42
|
+
l.GET_DATA,
|
|
43
43
|
n.widget
|
|
44
|
-
), console.debug("%capi%c %cfetch",
|
|
44
|
+
), console.debug("%capi%c %cfetch", l.API, l.NONE, l.GET_DATA, S), await fetch(
|
|
45
45
|
[this.url, "api", s, n.type].join("/") + k,
|
|
46
46
|
{ ...u, method: "get" }
|
|
47
47
|
).then(async (M) => {
|
|
@@ -54,9 +54,9 @@ class xa {
|
|
|
54
54
|
const { version: s } = this.options, u = this.headers(), S = "?action=visible";
|
|
55
55
|
return console.info(
|
|
56
56
|
"%capi%c %cput",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
l.API,
|
|
58
|
+
l.NONE,
|
|
59
|
+
l.GET_DATA,
|
|
60
60
|
q.HIDE_MESSAGE,
|
|
61
61
|
n.widget,
|
|
62
62
|
n.id
|
|
@@ -75,9 +75,9 @@ class xa {
|
|
|
75
75
|
S.append(`custom_filters[${M}]`, F);
|
|
76
76
|
return console.info(
|
|
77
77
|
"%capi%c %cput",
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
l.API,
|
|
79
|
+
l.NONE,
|
|
80
|
+
l.GET_DATA,
|
|
81
81
|
q.HIDE_LABELS,
|
|
82
82
|
n.widget,
|
|
83
83
|
k
|
|
@@ -94,9 +94,9 @@ class xa {
|
|
|
94
94
|
const { version: s } = this.options, u = this.headers(), S = Object.assign({}, n);
|
|
95
95
|
return delete S.slide, delete S.type, delete S.hash, console.debug(
|
|
96
96
|
"%capi%c %cloadSlide",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
l.API,
|
|
98
|
+
l.NONE,
|
|
99
|
+
l.SLIDE,
|
|
100
100
|
n.id
|
|
101
101
|
), await fetch(
|
|
102
102
|
[this.url, "api", s, "slides", n.id].join("/"),
|
|
@@ -120,9 +120,9 @@ class xa {
|
|
|
120
120
|
const S = JSON.stringify(n);
|
|
121
121
|
return console.info(
|
|
122
122
|
"%capi%c %cput",
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
l.API,
|
|
124
|
+
l.NONE,
|
|
125
|
+
l.SLIDE,
|
|
126
126
|
q.SLIDE_STORE,
|
|
127
127
|
n.id
|
|
128
128
|
), await fetch(
|
|
@@ -138,9 +138,9 @@ class xa {
|
|
|
138
138
|
const { version: s } = this.options, u = this.headers();
|
|
139
139
|
return delete n.update, console.debug(
|
|
140
140
|
"%capi%c %cloadPresentation",
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
l.API,
|
|
142
|
+
l.NONE,
|
|
143
|
+
l.SLIDE,
|
|
144
144
|
n.id
|
|
145
145
|
), await fetch(
|
|
146
146
|
[this.url, "api", s, D.PRESENTATIONS, n.id].join("/"),
|
|
@@ -162,7 +162,7 @@ class xa {
|
|
|
162
162
|
const { version: s } = this.options, u = this.formHeaders();
|
|
163
163
|
delete n.update;
|
|
164
164
|
const S = JSON.stringify(n);
|
|
165
|
-
return console.info("%capi%c %cput",
|
|
165
|
+
return console.info("%capi%c %cput", l.API, l.NONE, l.SLIDE, n.name), await fetch(
|
|
166
166
|
[this.url, "api", s, D.PRESENTATIONS, n.id].join("/"),
|
|
167
167
|
{ ...u, body: S, method: "put" }
|
|
168
168
|
).then((k) => {
|
|
@@ -175,9 +175,9 @@ class xa {
|
|
|
175
175
|
const { version: s } = this.options, u = this.headers();
|
|
176
176
|
return console.debug(
|
|
177
177
|
"%capi%c %cloadPreference",
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
l.API,
|
|
179
|
+
l.NONE,
|
|
180
|
+
l.SLIDE,
|
|
181
181
|
n.id
|
|
182
182
|
), await fetch(
|
|
183
183
|
[this.url, "api", s, D.PREFERENCES, n.id].join("/"),
|
|
@@ -194,9 +194,9 @@ class xa {
|
|
|
194
194
|
const S = JSON.stringify({ data: n });
|
|
195
195
|
return console.info(
|
|
196
196
|
"%capi%c %cstorePreference",
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
l.API,
|
|
198
|
+
l.NONE,
|
|
199
|
+
l.SLIDE,
|
|
200
200
|
n.id
|
|
201
201
|
), await fetch(
|
|
202
202
|
[this.url, "api", s, D.PREFERENCES, n.id].join("/"),
|
|
@@ -211,9 +211,9 @@ class xa {
|
|
|
211
211
|
const { version: s } = this.options, u = this.headers();
|
|
212
212
|
return console.debug(
|
|
213
213
|
"%capi%c %cloadWidget",
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
l.API,
|
|
215
|
+
l.NONE,
|
|
216
|
+
l.SLIDE,
|
|
217
217
|
n.id
|
|
218
218
|
), await fetch(
|
|
219
219
|
[this.url, "api", s, D.WIDGETS, n.id].join("/"),
|
|
@@ -226,14 +226,14 @@ class xa {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
var ka = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
229
|
-
function Ra(
|
|
230
|
-
return
|
|
229
|
+
function Ra(d) {
|
|
230
|
+
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
231
231
|
}
|
|
232
232
|
var qt = { exports: {} }, Ia = qt.exports, Tr;
|
|
233
233
|
function Ta() {
|
|
234
|
-
return Tr || (Tr = 1, function(
|
|
234
|
+
return Tr || (Tr = 1, function(d, n) {
|
|
235
235
|
(function(s, u) {
|
|
236
|
-
|
|
236
|
+
d.exports = u();
|
|
237
237
|
})(Ia, function() {
|
|
238
238
|
var s = function(e, t) {
|
|
239
239
|
return (s = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, a) {
|
|
@@ -301,8 +301,8 @@ function Ta() {
|
|
|
301
301
|
}
|
|
302
302
|
var c = t.indexOf(".");
|
|
303
303
|
if (c !== -1) {
|
|
304
|
-
var
|
|
305
|
-
return
|
|
304
|
+
var f = e[t.substr(0, c)];
|
|
305
|
+
return f == null ? void 0 : we(f, t.substr(c + 1));
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function fe(e, t, r) {
|
|
@@ -310,8 +310,8 @@ function Ta() {
|
|
|
310
310
|
it(typeof r != "string" && "length" in r);
|
|
311
311
|
for (var a = 0, i = t.length; a < i; ++a) fe(e, t[a], r[a]);
|
|
312
312
|
} else {
|
|
313
|
-
var o, c,
|
|
314
|
-
|
|
313
|
+
var o, c, f = t.indexOf(".");
|
|
314
|
+
f !== -1 ? (o = t.substr(0, f), (c = t.substr(f + 1)) === "" ? r === void 0 ? F(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r : fe(f = !(f = e[o]) || !te(e, o) ? e[o] = {} : f, c, r)) : r === void 0 ? F(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = r;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
function Qn(e) {
|
|
@@ -342,8 +342,8 @@ function Ta() {
|
|
|
342
342
|
for (var i = 0, o = r.length; i < o; ++i) a.push(t(r[i]));
|
|
343
343
|
} else if (Jn.has(r.constructor)) a = r;
|
|
344
344
|
else {
|
|
345
|
-
var c,
|
|
346
|
-
for (c in a =
|
|
345
|
+
var c, f = J(r);
|
|
346
|
+
for (c in a = f === Object.prototype ? {} : Object.create(f), ot.set(r, a), r) te(r, c) && (a[c] = t(r[c]));
|
|
347
347
|
}
|
|
348
348
|
return a;
|
|
349
349
|
}(e), ot = null, e;
|
|
@@ -506,8 +506,8 @@ function Ta() {
|
|
|
506
506
|
if (a._state === null) {
|
|
507
507
|
if (o === a) throw new TypeError("A promise cannot be resolved with itself.");
|
|
508
508
|
var c = a._lib && qe();
|
|
509
|
-
o && typeof o.then == "function" ? r(a, function(
|
|
510
|
-
o instanceof B ? o._then(
|
|
509
|
+
o && typeof o.then == "function" ? r(a, function(f, p) {
|
|
510
|
+
o instanceof B ? o._then(f, p) : o.then(f, p);
|
|
511
511
|
}) : (a._state = !0, a._value = o, nr(a)), c && et();
|
|
512
512
|
}
|
|
513
513
|
}, dn.bind(null, a));
|
|
@@ -519,8 +519,8 @@ function Ta() {
|
|
|
519
519
|
var ln = { get: function() {
|
|
520
520
|
var e = L, t = Tt;
|
|
521
521
|
function r(a, i) {
|
|
522
|
-
var o = this, c = !e.global && (e !== L || t !== Tt),
|
|
523
|
-
fn(o, new tr(ar(a, e, c,
|
|
522
|
+
var o = this, c = !e.global && (e !== L || t !== Tt), f = c && !xe(), p = new B(function(m, v) {
|
|
523
|
+
fn(o, new tr(ar(a, e, c, f), ar(i, e, c, f), m, v, e));
|
|
524
524
|
});
|
|
525
525
|
return this._consoleTask && (p._consoleTask = this._consoleTask), p;
|
|
526
526
|
}
|
|
@@ -680,11 +680,11 @@ function Ta() {
|
|
|
680
680
|
return De(function(i, o) {
|
|
681
681
|
var c = L;
|
|
682
682
|
c.unhandleds = [], c.onunhandled = o, c.finalize = je(function() {
|
|
683
|
-
var
|
|
684
|
-
|
|
683
|
+
var f, p = this;
|
|
684
|
+
f = function() {
|
|
685
685
|
p.unhandleds.length === 0 ? i() : o(p.unhandleds[0]);
|
|
686
686
|
}, xt.push(function m() {
|
|
687
|
-
|
|
687
|
+
f(), xt.splice(xt.indexOf(m), 1);
|
|
688
688
|
}), ++Ge, dt(function() {
|
|
689
689
|
--Ge == 0 && hn();
|
|
690
690
|
}, []);
|
|
@@ -712,10 +712,10 @@ function Ta() {
|
|
|
712
712
|
e.length === 0 && r(new AggregateError([]));
|
|
713
713
|
var a = e.length, i = new Array(a);
|
|
714
714
|
e.forEach(function(o, c) {
|
|
715
|
-
return B.resolve(o).then(function(
|
|
716
|
-
return t(
|
|
717
|
-
}, function(
|
|
718
|
-
i[c] =
|
|
715
|
+
return B.resolve(o).then(function(f) {
|
|
716
|
+
return t(f);
|
|
717
|
+
}, function(f) {
|
|
718
|
+
i[c] = f, --a || r(new AggregateError(i));
|
|
719
719
|
});
|
|
720
720
|
});
|
|
721
721
|
});
|
|
@@ -805,16 +805,16 @@ function Ta() {
|
|
|
805
805
|
return t < e ? 1 : e < t ? -1 : 0;
|
|
806
806
|
case "binary":
|
|
807
807
|
return function(i, o) {
|
|
808
|
-
for (var c = i.length,
|
|
809
|
-
return c ===
|
|
808
|
+
for (var c = i.length, f = o.length, p = c < f ? c : f, m = 0; m < p; ++m) if (i[m] !== o[m]) return i[m] < o[m] ? -1 : 1;
|
|
809
|
+
return c === f ? 0 : c < f ? -1 : 1;
|
|
810
810
|
}(ur(e), ur(t));
|
|
811
811
|
case "Array":
|
|
812
812
|
return function(i, o) {
|
|
813
|
-
for (var c = i.length,
|
|
813
|
+
for (var c = i.length, f = o.length, p = c < f ? c : f, m = 0; m < p; ++m) {
|
|
814
814
|
var v = Y(i[m], o[m]);
|
|
815
815
|
if (v !== 0) return v;
|
|
816
816
|
}
|
|
817
|
-
return c ===
|
|
817
|
+
return c === f ? 0 : c < f ? -1 : 1;
|
|
818
818
|
}(e, t);
|
|
819
819
|
}
|
|
820
820
|
} catch {
|
|
@@ -834,7 +834,7 @@ function Ta() {
|
|
|
834
834
|
if (!h.schema[i]) throw new G.NotFound("Table " + i + " not part of transaction");
|
|
835
835
|
return t(h.idbtrans, h);
|
|
836
836
|
}
|
|
837
|
-
var
|
|
837
|
+
var f = qe();
|
|
838
838
|
try {
|
|
839
839
|
var p = a && a.db._novip === this.db._novip ? a === L.trans ? a._promise(e, c, r) : De(function() {
|
|
840
840
|
return a._promise(e, c, r);
|
|
@@ -875,7 +875,7 @@ function Ta() {
|
|
|
875
875
|
return console.trace(m), ne(m);
|
|
876
876
|
})), p;
|
|
877
877
|
} finally {
|
|
878
|
-
|
|
878
|
+
f && et();
|
|
879
879
|
}
|
|
880
880
|
}, V.prototype.get = function(e, t) {
|
|
881
881
|
var r = this;
|
|
@@ -889,16 +889,16 @@ function Ta() {
|
|
|
889
889
|
if (F(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
|
|
890
890
|
var t = M(e);
|
|
891
891
|
if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
|
|
892
|
-
var r = this.schema.indexes.concat(this.schema.primKey).filter(function(
|
|
893
|
-
if (
|
|
894
|
-
return 0 <=
|
|
892
|
+
var r = this.schema.indexes.concat(this.schema.primKey).filter(function(f) {
|
|
893
|
+
if (f.compound && t.every(function(m) {
|
|
894
|
+
return 0 <= f.keyPath.indexOf(m);
|
|
895
895
|
})) {
|
|
896
|
-
for (var p = 0; p < t.length; ++p) if (t.indexOf(
|
|
896
|
+
for (var p = 0; p < t.length; ++p) if (t.indexOf(f.keyPath[p]) === -1) return !1;
|
|
897
897
|
return !0;
|
|
898
898
|
}
|
|
899
899
|
return !1;
|
|
900
|
-
}).sort(function(
|
|
901
|
-
return
|
|
900
|
+
}).sort(function(f, p) {
|
|
901
|
+
return f.keyPath.length - p.keyPath.length;
|
|
902
902
|
})[0];
|
|
903
903
|
if (r && this.db._maxKey !== We) {
|
|
904
904
|
var o = r.keyPath.slice(0, t.length);
|
|
@@ -908,8 +908,8 @@ function Ta() {
|
|
|
908
908
|
}
|
|
909
909
|
!r && be && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
|
|
910
910
|
var a = this.schema.idxByName;
|
|
911
|
-
function i(
|
|
912
|
-
return Y(
|
|
911
|
+
function i(f, p) {
|
|
912
|
+
return Y(f, p) === 0;
|
|
913
913
|
}
|
|
914
914
|
var c = t.reduce(function(h, p) {
|
|
915
915
|
var m = h[0], v = h[1], h = a[p], E = e[p];
|
|
@@ -959,7 +959,7 @@ function Ta() {
|
|
|
959
959
|
for (var o = /* @__PURE__ */ new Set(), c = e.prototype; c; c = J(c)) Object.getOwnPropertyNames(c).forEach(function(p) {
|
|
960
960
|
return o.add(p);
|
|
961
961
|
});
|
|
962
|
-
function
|
|
962
|
+
function f(p) {
|
|
963
963
|
if (!p) return p;
|
|
964
964
|
var m, v = Object.create(e.prototype);
|
|
965
965
|
for (m in p) if (!o.has(m)) try {
|
|
@@ -968,38 +968,38 @@ function Ta() {
|
|
|
968
968
|
}
|
|
969
969
|
return v;
|
|
970
970
|
}
|
|
971
|
-
return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook =
|
|
971
|
+
return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = f, this.hook("reading", f), e;
|
|
972
972
|
}, V.prototype.defineClass = function() {
|
|
973
973
|
return this.mapToClass(function(e) {
|
|
974
974
|
j(this, e);
|
|
975
975
|
});
|
|
976
976
|
}, V.prototype.add = function(e, t) {
|
|
977
977
|
var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, c = e;
|
|
978
|
-
return o && i && (c = Nt(o)(e)), this._trans("readwrite", function(
|
|
979
|
-
return r.core.mutate({ trans:
|
|
980
|
-
}).then(function(
|
|
981
|
-
return
|
|
982
|
-
}).then(function(
|
|
978
|
+
return o && i && (c = Nt(o)(e)), this._trans("readwrite", function(f) {
|
|
979
|
+
return r.core.mutate({ trans: f, type: "add", keys: t != null ? [t] : null, values: [c] });
|
|
980
|
+
}).then(function(f) {
|
|
981
|
+
return f.numFailures ? B.reject(f.failures[0]) : f.lastResult;
|
|
982
|
+
}).then(function(f) {
|
|
983
983
|
if (o) try {
|
|
984
|
-
fe(e, o,
|
|
984
|
+
fe(e, o, f);
|
|
985
985
|
} catch {
|
|
986
986
|
}
|
|
987
|
-
return
|
|
987
|
+
return f;
|
|
988
988
|
});
|
|
989
989
|
}, V.prototype.update = function(e, t) {
|
|
990
990
|
return typeof e != "object" || F(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? ne(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
|
|
991
991
|
}, V.prototype.put = function(e, t) {
|
|
992
992
|
var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, c = e;
|
|
993
|
-
return o && i && (c = Nt(o)(e)), this._trans("readwrite", function(
|
|
994
|
-
return r.core.mutate({ trans:
|
|
995
|
-
}).then(function(
|
|
996
|
-
return
|
|
997
|
-
}).then(function(
|
|
993
|
+
return o && i && (c = Nt(o)(e)), this._trans("readwrite", function(f) {
|
|
994
|
+
return r.core.mutate({ trans: f, type: "put", values: [c], keys: t != null ? [t] : null });
|
|
995
|
+
}).then(function(f) {
|
|
996
|
+
return f.numFailures ? B.reject(f.failures[0]) : f.lastResult;
|
|
997
|
+
}).then(function(f) {
|
|
998
998
|
if (o) try {
|
|
999
|
-
fe(e, o,
|
|
999
|
+
fe(e, o, f);
|
|
1000
1000
|
} catch {
|
|
1001
1001
|
}
|
|
1002
|
-
return
|
|
1002
|
+
return f;
|
|
1003
1003
|
});
|
|
1004
1004
|
}, V.prototype.delete = function(e) {
|
|
1005
1005
|
var t = this;
|
|
@@ -1027,10 +1027,10 @@ function Ta() {
|
|
|
1027
1027
|
}, V.prototype.bulkAdd = function(e, t, r) {
|
|
1028
1028
|
var a = this, i = Array.isArray(t) ? t : void 0, o = (r = r || (i ? void 0 : t)) ? r.allKeys : void 0;
|
|
1029
1029
|
return this._trans("readwrite", function(c) {
|
|
1030
|
-
var m = a.schema.primKey,
|
|
1030
|
+
var m = a.schema.primKey, f = m.auto, m = m.keyPath;
|
|
1031
1031
|
if (m && i) throw new G.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
|
|
1032
1032
|
if (i && i.length !== e.length) throw new G.InvalidArgument("Arguments objects and keys must have the same length");
|
|
1033
|
-
var p = e.length, m = m &&
|
|
1033
|
+
var p = e.length, m = m && f ? e.map(Nt(m)) : e;
|
|
1034
1034
|
return a.core.mutate({ trans: c, type: "add", keys: i, values: m, wantResults: o }).then(function(y) {
|
|
1035
1035
|
var h = y.numFailures, E = y.results, g = y.lastResult, y = y.failures;
|
|
1036
1036
|
if (h === 0) return o ? E : g;
|
|
@@ -1040,10 +1040,10 @@ function Ta() {
|
|
|
1040
1040
|
}, V.prototype.bulkPut = function(e, t, r) {
|
|
1041
1041
|
var a = this, i = Array.isArray(t) ? t : void 0, o = (r = r || (i ? void 0 : t)) ? r.allKeys : void 0;
|
|
1042
1042
|
return this._trans("readwrite", function(c) {
|
|
1043
|
-
var m = a.schema.primKey,
|
|
1043
|
+
var m = a.schema.primKey, f = m.auto, m = m.keyPath;
|
|
1044
1044
|
if (m && i) throw new G.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
|
|
1045
1045
|
if (i && i.length !== e.length) throw new G.InvalidArgument("Arguments objects and keys must have the same length");
|
|
1046
|
-
var p = e.length, m = m &&
|
|
1046
|
+
var p = e.length, m = m && f ? e.map(Nt(m)) : e;
|
|
1047
1047
|
return a.core.mutate({ trans: c, type: "put", keys: i, values: m, wantResults: o }).then(function(y) {
|
|
1048
1048
|
var h = y.numFailures, E = y.results, g = y.lastResult, y = y.failures;
|
|
1049
1049
|
if (h === 0) return o ? E : g;
|
|
@@ -1057,10 +1057,10 @@ function Ta() {
|
|
|
1057
1057
|
return c.changes;
|
|
1058
1058
|
}), o = [];
|
|
1059
1059
|
return this._trans("readwrite", function(c) {
|
|
1060
|
-
return r.getMany({ trans: c, keys: a, cache: "clone" }).then(function(
|
|
1060
|
+
return r.getMany({ trans: c, keys: a, cache: "clone" }).then(function(f) {
|
|
1061
1061
|
var p = [], m = [];
|
|
1062
1062
|
e.forEach(function(h, E) {
|
|
1063
|
-
var g = h.key, y = h.changes, w =
|
|
1063
|
+
var g = h.key, y = h.changes, w = f[E];
|
|
1064
1064
|
if (w) {
|
|
1065
1065
|
for (var b = 0, O = Object.keys(y); b < O.length; b++) {
|
|
1066
1066
|
var A = O[b], P = y[A];
|
|
@@ -1096,8 +1096,8 @@ function Ta() {
|
|
|
1096
1096
|
function V() {
|
|
1097
1097
|
}
|
|
1098
1098
|
function ht(e) {
|
|
1099
|
-
function t(c,
|
|
1100
|
-
if (
|
|
1099
|
+
function t(c, f) {
|
|
1100
|
+
if (f) {
|
|
1101
1101
|
for (var p = arguments.length, m = new Array(p - 1); --p; ) m[p - 1] = arguments[p];
|
|
1102
1102
|
return r[c].subscribe.apply(null, m), e;
|
|
1103
1103
|
}
|
|
@@ -1107,16 +1107,16 @@ function Ta() {
|
|
|
1107
1107
|
t.addEventType = o;
|
|
1108
1108
|
for (var a = 1, i = arguments.length; a < i; ++a) o(arguments[a]);
|
|
1109
1109
|
return t;
|
|
1110
|
-
function o(c,
|
|
1110
|
+
function o(c, f, p) {
|
|
1111
1111
|
if (typeof c != "object") {
|
|
1112
1112
|
var m;
|
|
1113
|
-
|
|
1113
|
+
f = f || qr;
|
|
1114
1114
|
var v = { subscribers: [], fire: p = p || Z, subscribe: function(h) {
|
|
1115
|
-
v.subscribers.indexOf(h) === -1 && (v.subscribers.push(h), v.fire =
|
|
1115
|
+
v.subscribers.indexOf(h) === -1 && (v.subscribers.push(h), v.fire = f(v.fire, h));
|
|
1116
1116
|
}, unsubscribe: function(h) {
|
|
1117
1117
|
v.subscribers = v.subscribers.filter(function(E) {
|
|
1118
1118
|
return E !== h;
|
|
1119
|
-
}), v.fire = v.subscribers.reduce(
|
|
1119
|
+
}), v.fire = v.subscribers.reduce(f, p);
|
|
1120
1120
|
} };
|
|
1121
1121
|
return r[c] = t[c] = v;
|
|
1122
1122
|
}
|
|
@@ -1165,35 +1165,35 @@ function Ta() {
|
|
|
1165
1165
|
function jt(e, t, r, a) {
|
|
1166
1166
|
var i = e.replayFilter ? Ue(e.filter, e.replayFilter()) : e.filter;
|
|
1167
1167
|
if (e.or) {
|
|
1168
|
-
var o = {}, c = function(
|
|
1168
|
+
var o = {}, c = function(f, p, m) {
|
|
1169
1169
|
var v, h;
|
|
1170
1170
|
i && !i(p, m, function(E) {
|
|
1171
1171
|
return p.stop(E);
|
|
1172
1172
|
}, function(E) {
|
|
1173
1173
|
return p.fail(E);
|
|
1174
|
-
}) || ((h = "" + (v = p.primaryKey)) == "[object ArrayBuffer]" && (h = "" + new Uint8Array(v)), te(o, h) || (o[h] = !0, t(
|
|
1174
|
+
}) || ((h = "" + (v = p.primaryKey)) == "[object ArrayBuffer]" && (h = "" + new Uint8Array(v)), te(o, h) || (o[h] = !0, t(f, p, m)));
|
|
1175
1175
|
};
|
|
1176
1176
|
return Promise.all([e.or._iterate(c, r), fr(dr(e, a, r), e.algorithm, c, !e.keysOnly && e.valueMapper)]);
|
|
1177
1177
|
}
|
|
1178
1178
|
return fr(dr(e, a, r), Ue(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
|
|
1179
1179
|
}
|
|
1180
1180
|
function fr(e, t, r, a) {
|
|
1181
|
-
var i = ee(a ? function(o, c,
|
|
1182
|
-
return r(a(o), c,
|
|
1181
|
+
var i = ee(a ? function(o, c, f) {
|
|
1182
|
+
return r(a(o), c, f);
|
|
1183
1183
|
} : r);
|
|
1184
1184
|
return e.then(function(o) {
|
|
1185
1185
|
if (o) return o.start(function() {
|
|
1186
1186
|
var c = function() {
|
|
1187
1187
|
return o.continue();
|
|
1188
1188
|
};
|
|
1189
|
-
t && !t(o, function(
|
|
1190
|
-
return c =
|
|
1191
|
-
}, function(
|
|
1192
|
-
o.stop(
|
|
1193
|
-
}, function(
|
|
1194
|
-
o.fail(
|
|
1195
|
-
}) || i(o.value, o, function(
|
|
1196
|
-
return c =
|
|
1189
|
+
t && !t(o, function(f) {
|
|
1190
|
+
return c = f;
|
|
1191
|
+
}, function(f) {
|
|
1192
|
+
o.stop(f), c = Z;
|
|
1193
|
+
}, function(f) {
|
|
1194
|
+
o.fail(f), c = Z;
|
|
1195
|
+
}) || i(o.value, o, function(f) {
|
|
1196
|
+
return c = f;
|
|
1197
1197
|
}), c();
|
|
1198
1198
|
});
|
|
1199
1199
|
});
|
|
@@ -1270,11 +1270,11 @@ function Ta() {
|
|
|
1270
1270
|
return m ? o(p[r[m]], m - 1) : p[a];
|
|
1271
1271
|
}
|
|
1272
1272
|
var c = this._ctx.dir === "next" ? 1 : -1;
|
|
1273
|
-
function
|
|
1273
|
+
function f(p, m) {
|
|
1274
1274
|
return Y(o(p, i), o(m, i)) * c;
|
|
1275
1275
|
}
|
|
1276
1276
|
return this.toArray(function(p) {
|
|
1277
|
-
return p.sort(
|
|
1277
|
+
return p.sort(f);
|
|
1278
1278
|
}).then(t);
|
|
1279
1279
|
}, Q.prototype.toArray = function(e) {
|
|
1280
1280
|
var t = this;
|
|
@@ -1282,13 +1282,13 @@ function Ta() {
|
|
|
1282
1282
|
var a = t._ctx;
|
|
1283
1283
|
if (a.dir === "next" && rt(a, !0) && 0 < a.limit) {
|
|
1284
1284
|
var i = a.valueMapper, o = Mt(a, a.table.core.schema);
|
|
1285
|
-
return a.table.core.query({ trans: r, limit: a.limit, values: !0, query: { index: o, range: a.range } }).then(function(
|
|
1286
|
-
return
|
|
1285
|
+
return a.table.core.query({ trans: r, limit: a.limit, values: !0, query: { index: o, range: a.range } }).then(function(f) {
|
|
1286
|
+
return f = f.result, i ? f.map(i) : f;
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
var c = [];
|
|
1290
|
-
return jt(a, function(
|
|
1291
|
-
return c.push(
|
|
1290
|
+
return jt(a, function(f) {
|
|
1291
|
+
return c.push(f);
|
|
1292
1292
|
}, r, a.table.core).then(function() {
|
|
1293
1293
|
return c;
|
|
1294
1294
|
});
|
|
@@ -1401,8 +1401,8 @@ function Ta() {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
return O;
|
|
1403
1403
|
});
|
|
1404
|
-
var
|
|
1405
|
-
h && (v = typeof h == "object" ? h[
|
|
1404
|
+
var f = r.table.core, h = f.schema.primaryKey, p = h.outbound, m = h.extractKey, v = 200, h = t.db._options.modifyChunkSize;
|
|
1405
|
+
h && (v = typeof h == "object" ? h[f.name] || h["*"] || 200 : h);
|
|
1406
1406
|
function E(b, P) {
|
|
1407
1407
|
var A = P.failures, P = P.numFailures;
|
|
1408
1408
|
y += b - P;
|
|
@@ -1415,20 +1415,20 @@ function Ta() {
|
|
|
1415
1415
|
return t.clone().primaryKeys().then(function(b) {
|
|
1416
1416
|
function O(P) {
|
|
1417
1417
|
var x = Math.min(v, b.length - P);
|
|
1418
|
-
return
|
|
1418
|
+
return f.getMany({ trans: a, keys: b.slice(P, P + x), cache: "immutable" }).then(function(R) {
|
|
1419
1419
|
for (var $ = [], I = [], T = p ? [] : null, N = [], C = 0; C < x; ++C) {
|
|
1420
1420
|
var K = R[C], U = { value: Ne(K), primKey: b[P + C] };
|
|
1421
1421
|
c.call(U, U.value, U) !== !1 && (U.value == null ? N.push(b[P + C]) : p || Y(m(K), m(U.value)) === 0 ? (I.push(U.value), p && T.push(b[P + C])) : (N.push(b[P + C]), $.push(U.value)));
|
|
1422
1422
|
}
|
|
1423
|
-
return Promise.resolve(0 < $.length &&
|
|
1423
|
+
return Promise.resolve(0 < $.length && f.mutate({ trans: a, type: "add", values: $ }).then(function(z) {
|
|
1424
1424
|
for (var H in z.failures) N.splice(parseInt(H), 1);
|
|
1425
1425
|
E($.length, z);
|
|
1426
1426
|
})).then(function() {
|
|
1427
|
-
return (0 < I.length || A && typeof e == "object") &&
|
|
1427
|
+
return (0 < I.length || A && typeof e == "object") && f.mutate({ trans: a, type: "put", keys: T, values: I, criteria: A, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < P }).then(function(z) {
|
|
1428
1428
|
return E(I.length, z);
|
|
1429
1429
|
});
|
|
1430
1430
|
}).then(function() {
|
|
1431
|
-
return (0 < N.length || A && e === vn) &&
|
|
1431
|
+
return (0 < N.length || A && e === vn) && f.mutate({ trans: a, type: "delete", keys: N, criteria: A, isAdditionalChunk: 0 < P }).then(function(z) {
|
|
1432
1432
|
return E(N.length, z);
|
|
1433
1433
|
});
|
|
1434
1434
|
}).then(function() {
|
|
@@ -1449,9 +1449,9 @@ function Ta() {
|
|
|
1449
1449
|
var a = e.table.core.schema.primaryKey, i = t;
|
|
1450
1450
|
return e.table.core.count({ trans: r, query: { index: a, range: i } }).then(function(o) {
|
|
1451
1451
|
return e.table.core.mutate({ trans: r, type: "deleteRange", range: i }).then(function(c) {
|
|
1452
|
-
var
|
|
1453
|
-
if (c.lastResult, c.results, c = c.numFailures, c) throw new Ot("Could not delete some values", Object.keys(
|
|
1454
|
-
return
|
|
1452
|
+
var f = c.failures;
|
|
1453
|
+
if (c.lastResult, c.results, c = c.numFailures, c) throw new Ot("Could not delete some values", Object.keys(f).map(function(p) {
|
|
1454
|
+
return f[p];
|
|
1455
1455
|
}), o - c);
|
|
1456
1456
|
return o - c;
|
|
1457
1457
|
});
|
|
@@ -1478,7 +1478,7 @@ function Ta() {
|
|
|
1478
1478
|
}).limit(0);
|
|
1479
1479
|
}
|
|
1480
1480
|
function Bt(e, t, r, a) {
|
|
1481
|
-
var i, o, c,
|
|
1481
|
+
var i, o, c, f, p, m, v, h = r.length;
|
|
1482
1482
|
if (!r.every(function(y) {
|
|
1483
1483
|
return typeof y == "string";
|
|
1484
1484
|
})) return he(e, sr);
|
|
@@ -1497,14 +1497,14 @@ function Ta() {
|
|
|
1497
1497
|
}).sort(function(b, O) {
|
|
1498
1498
|
return c(b.lower, O.lower);
|
|
1499
1499
|
});
|
|
1500
|
-
|
|
1500
|
+
f = w.map(function(b) {
|
|
1501
1501
|
return b.upper;
|
|
1502
1502
|
}), p = w.map(function(b) {
|
|
1503
1503
|
return b.lower;
|
|
1504
1504
|
}), v = (m = y) === "next" ? "" : a;
|
|
1505
1505
|
}
|
|
1506
1506
|
E("next"), e = new e.Collection(e, function() {
|
|
1507
|
-
return Re(
|
|
1507
|
+
return Re(f[0], p[h - 1] + a);
|
|
1508
1508
|
}), e._ondirectionchange = function(y) {
|
|
1509
1509
|
E(y);
|
|
1510
1510
|
};
|
|
@@ -1522,7 +1522,7 @@ function Ta() {
|
|
|
1522
1522
|
C($[H], pe) < 0 && (z = H);
|
|
1523
1523
|
}
|
|
1524
1524
|
return U < N.length && K === "next" ? $ + T.substr($.length) : U < $.length && K === "prev" ? $.substr(0, T.length) : z < 0 ? null : $.substr(0, z) + N[z] + T.substr(z + 1);
|
|
1525
|
-
}(O, A,
|
|
1525
|
+
}(O, A, f[x], p[x], c, m);
|
|
1526
1526
|
R === null && P === null ? g = x + 1 : (P === null || 0 < c(P, R)) && (P = R);
|
|
1527
1527
|
}
|
|
1528
1528
|
return w(P !== null ? function() {
|
|
@@ -1604,8 +1604,8 @@ function Ta() {
|
|
|
1604
1604
|
r = o === "next" ? e._ascending : e._descending, t.sort(r);
|
|
1605
1605
|
};
|
|
1606
1606
|
var i = 0;
|
|
1607
|
-
return a._addAlgorithm(function(o, c,
|
|
1608
|
-
for (var p = o.key; 0 < r(p, t[i]); ) if (++i === t.length) return c(
|
|
1607
|
+
return a._addAlgorithm(function(o, c, f) {
|
|
1608
|
+
for (var p = o.key; 0 < r(p, t[i]); ) if (++i === t.length) return c(f), !1;
|
|
1609
1609
|
return r(p, t[i]) === 0 || (c(function() {
|
|
1610
1610
|
o.continue(t[i]);
|
|
1611
1611
|
}), !1);
|
|
@@ -1625,7 +1625,7 @@ function Ta() {
|
|
|
1625
1625
|
}, null);
|
|
1626
1626
|
return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
|
|
1627
1627
|
}, se.prototype.inAnyRange = function(O, t) {
|
|
1628
|
-
var r = this, a = this._cmp, i = this._ascending, o = this._descending, c = this._min,
|
|
1628
|
+
var r = this, a = this._cmp, i = this._ascending, o = this._descending, c = this._min, f = this._max;
|
|
1629
1629
|
if (O.length === 0) return at(this);
|
|
1630
1630
|
if (!O.every(function(A) {
|
|
1631
1631
|
return A[0] !== void 0 && A[1] !== void 0 && i(A[0], A[1]) <= 0;
|
|
@@ -1639,7 +1639,7 @@ function Ta() {
|
|
|
1639
1639
|
for (var x = 0, R = A.length; x < R; ++x) {
|
|
1640
1640
|
var $ = A[x];
|
|
1641
1641
|
if (a(P[0], $[1]) < 0 && 0 < a(P[1], $[0])) {
|
|
1642
|
-
$[0] = c($[0], P[0]), $[1] =
|
|
1642
|
+
$[0] = c($[0], P[0]), $[1] = f($[1], P[1]);
|
|
1643
1643
|
break;
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
@@ -1728,18 +1728,18 @@ function Ta() {
|
|
|
1728
1728
|
}, L]);
|
|
1729
1729
|
});
|
|
1730
1730
|
if (r) return De(function() {
|
|
1731
|
-
var o = new B(function(c,
|
|
1731
|
+
var o = new B(function(c, f) {
|
|
1732
1732
|
a._lock();
|
|
1733
|
-
var p = t(c,
|
|
1734
|
-
p && p.then && p.then(c,
|
|
1733
|
+
var p = t(c, f, a);
|
|
1734
|
+
p && p.then && p.then(c, f);
|
|
1735
1735
|
});
|
|
1736
1736
|
return o.finally(function() {
|
|
1737
1737
|
return a._unlock();
|
|
1738
1738
|
}), o._lib = !0, o;
|
|
1739
1739
|
});
|
|
1740
1740
|
var i = new B(function(o, c) {
|
|
1741
|
-
var
|
|
1742
|
-
|
|
1741
|
+
var f = t(o, c, a);
|
|
1742
|
+
f && f.then && f.then(o, c);
|
|
1743
1743
|
});
|
|
1744
1744
|
return i._lib = !0, i;
|
|
1745
1745
|
}, ve.prototype._root = function() {
|
|
@@ -1754,10 +1754,10 @@ function Ta() {
|
|
|
1754
1754
|
}());
|
|
1755
1755
|
var i = r._waitingFor;
|
|
1756
1756
|
return new B(function(o, c) {
|
|
1757
|
-
a.then(function(
|
|
1758
|
-
return r._waitingQueue.push(ee(o.bind(null,
|
|
1759
|
-
}, function(
|
|
1760
|
-
return r._waitingQueue.push(ee(c.bind(null,
|
|
1757
|
+
a.then(function(f) {
|
|
1758
|
+
return r._waitingQueue.push(ee(o.bind(null, f)));
|
|
1759
|
+
}, function(f) {
|
|
1760
|
+
return r._waitingQueue.push(ee(c.bind(null, f)));
|
|
1761
1761
|
}).finally(function() {
|
|
1762
1762
|
r._waitingFor === i && (r._waitingFor = null);
|
|
1763
1763
|
});
|
|
@@ -1937,7 +1937,7 @@ function Ta() {
|
|
|
1937
1937
|
});
|
|
1938
1938
|
} };
|
|
1939
1939
|
}
|
|
1940
|
-
var o, c,
|
|
1940
|
+
var o, c, f, v = (c = p, f = br((o = e).objectStoreNames), { schema: { name: o.name, tables: f.map(function(E) {
|
|
1941
1941
|
return c.objectStore(E);
|
|
1942
1942
|
}).map(function(E) {
|
|
1943
1943
|
var g = E.keyPath, b = E.autoIncrement, y = F(g), w = {}, b = { name: E.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: g == null, compound: y, keyPath: g, autoIncrement: b, unique: !0, extractKey: _n(g) }, indexes: br(E.indexNames).map(function(O) {
|
|
@@ -1949,7 +1949,7 @@ function Ta() {
|
|
|
1949
1949
|
return w[vt(O)];
|
|
1950
1950
|
} };
|
|
1951
1951
|
return w[":id"] = b.primaryKey, g != null && (w[vt(g)] = b.primaryKey), b;
|
|
1952
|
-
}) }, hasGetAll: 0 <
|
|
1952
|
+
}) }, hasGetAll: 0 < f.length && "getAll" in c.objectStore(f[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), p = v.schema, m = v.hasGetAll, v = p.tables.map(i), h = {};
|
|
1953
1953
|
return v.forEach(function(E) {
|
|
1954
1954
|
return h[E.name] = E;
|
|
1955
1955
|
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(E) {
|
|
@@ -1976,10 +1976,10 @@ function Ta() {
|
|
|
1976
1976
|
r.forEach(function(i) {
|
|
1977
1977
|
var o = a[i];
|
|
1978
1978
|
t.forEach(function(c) {
|
|
1979
|
-
var
|
|
1979
|
+
var f = function p(m, v) {
|
|
1980
1980
|
return Fr(m, v) || (m = J(m)) && p(m, v);
|
|
1981
1981
|
}(c, i);
|
|
1982
|
-
(!
|
|
1982
|
+
(!f || "value" in f && f.value === void 0) && (c === e.Transaction.prototype || c instanceof e.Transaction ? Ae(c, i, { get: function() {
|
|
1983
1983
|
return this.table(i);
|
|
1984
1984
|
}, set: function(p) {
|
|
1985
1985
|
Qe(this, i, { value: p, writable: !0, configurable: !0, enumerable: !0 });
|
|
@@ -2000,9 +2000,9 @@ function Ta() {
|
|
|
2000
2000
|
r.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = Sn("$meta", vr("")[0], []), e._storeNames.push("$meta"));
|
|
2001
2001
|
var o = e._createTransaction("readwrite", e._storeNames, i);
|
|
2002
2002
|
o.create(r), o._completion.catch(a);
|
|
2003
|
-
var c = o._reject.bind(o),
|
|
2003
|
+
var c = o._reject.bind(o), f = L.transless || L;
|
|
2004
2004
|
De(function() {
|
|
2005
|
-
return L.trans = o, L.transless =
|
|
2005
|
+
return L.trans = o, L.transless = f, t !== 0 ? (Kt(e, r), m = t, ((p = o).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(v) {
|
|
2006
2006
|
return v ?? m;
|
|
2007
2007
|
}) : B.resolve(m)).then(function(v) {
|
|
2008
2008
|
return E = v, g = o, y = r, w = [], v = (h = e)._versions, b = h._dbSchema = Ft(0, h.idbdb, y), (v = v.filter(function(O) {
|
|
@@ -2071,9 +2071,9 @@ function Ta() {
|
|
|
2071
2071
|
for (var a = 0, i = An(r, e._dbSchema).change; a < i.length; a++) {
|
|
2072
2072
|
var o = function(c) {
|
|
2073
2073
|
if (c.change.length || c.recreate) return console.warn("Unable to patch indexes of table ".concat(c.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
2074
|
-
var
|
|
2074
|
+
var f = t.objectStore(c.name);
|
|
2075
2075
|
c.add.forEach(function(p) {
|
|
2076
|
-
be && console.debug("Dexie upgrade patch: Creating missing index ".concat(c.name, ".").concat(p.src)), Gt(
|
|
2076
|
+
be && console.debug("Dexie upgrade patch: Creating missing index ".concat(c.name, ".").concat(p.src)), Gt(f, p);
|
|
2077
2077
|
});
|
|
2078
2078
|
}(i[a]);
|
|
2079
2079
|
if (typeof o == "object") return o.value;
|
|
@@ -2088,10 +2088,10 @@ function Ta() {
|
|
|
2088
2088
|
var c = { name: r, def: o, recreate: !1, del: [], add: [], change: [] };
|
|
2089
2089
|
if ("" + (i.primKey.keyPath || "") != "" + (o.primKey.keyPath || "") || i.primKey.auto !== o.primKey.auto) c.recreate = !0, a.change.push(c);
|
|
2090
2090
|
else {
|
|
2091
|
-
var
|
|
2092
|
-
for (m in
|
|
2091
|
+
var f = i.idxByName, p = o.idxByName, m = void 0;
|
|
2092
|
+
for (m in f) p[m] || c.del.push(m);
|
|
2093
2093
|
for (m in p) {
|
|
2094
|
-
var v =
|
|
2094
|
+
var v = f[m], h = p[m];
|
|
2095
2095
|
v ? v.src !== h.src && c.change.push(h) : c.add.push(h);
|
|
2096
2096
|
}
|
|
2097
2097
|
(0 < c.del.length || 0 < c.add.length || 0 < c.change.length) && a.change.push(c);
|
|
@@ -2117,19 +2117,19 @@ function Ta() {
|
|
|
2117
2117
|
function Ft(e, t, r) {
|
|
2118
2118
|
var a = {};
|
|
2119
2119
|
return _t(t.objectStoreNames, 0).forEach(function(i) {
|
|
2120
|
-
for (var o = r.objectStore(i), c = En(mr(m = o.keyPath), m || "", !0, !1, !!o.autoIncrement, m && typeof m != "string", !0),
|
|
2120
|
+
for (var o = r.objectStore(i), c = En(mr(m = o.keyPath), m || "", !0, !1, !!o.autoIncrement, m && typeof m != "string", !0), f = [], p = 0; p < o.indexNames.length; ++p) {
|
|
2121
2121
|
var v = o.index(o.indexNames[p]), m = v.keyPath, v = En(v.name, m, !!v.unique, !!v.multiEntry, !1, m && typeof m != "string", !1);
|
|
2122
|
-
|
|
2122
|
+
f.push(v);
|
|
2123
2123
|
}
|
|
2124
|
-
a[i] = Sn(i, c,
|
|
2124
|
+
a[i] = Sn(i, c, f);
|
|
2125
2125
|
}), a;
|
|
2126
2126
|
}
|
|
2127
2127
|
function Wt(e, t, r) {
|
|
2128
2128
|
for (var a = r.db.objectStoreNames, i = 0; i < a.length; ++i) {
|
|
2129
2129
|
var o = a[i], c = r.objectStore(o);
|
|
2130
2130
|
e._hasGetAll = "getAll" in c;
|
|
2131
|
-
for (var
|
|
2132
|
-
var p = c.indexNames[
|
|
2131
|
+
for (var f = 0; f < c.indexNames.length; ++f) {
|
|
2132
|
+
var p = c.indexNames[f], m = c.index(p).keyPath, v = typeof m == "string" ? m : "[" + _t(m).join("+") + "]";
|
|
2133
2133
|
!t[o] || (m = t[o].idxByName[v]) && (m.name = p, delete t[o].idxByName[v], t[o].idxByName[p] = m);
|
|
2134
2134
|
}
|
|
2135
2135
|
}
|
|
@@ -2199,16 +2199,16 @@ function Ta() {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
function Et(e, t) {
|
|
2201
2201
|
Rn(t) || function r(a, p) {
|
|
2202
|
-
var o = p.from, c = p.to,
|
|
2203
|
-
wt(a, o, c),
|
|
2202
|
+
var o = p.from, c = p.to, f = p.l, p = p.r;
|
|
2203
|
+
wt(a, o, c), f && r(a, f), p && r(a, p);
|
|
2204
2204
|
}(e, t);
|
|
2205
2205
|
}
|
|
2206
2206
|
function wr(e, t) {
|
|
2207
2207
|
var r = zt(t), a = r.next();
|
|
2208
2208
|
if (a.done) return !1;
|
|
2209
|
-
for (var i = a.value, o = zt(e), c = o.next(i.from),
|
|
2210
|
-
if (Y(
|
|
2211
|
-
Y(i.from,
|
|
2209
|
+
for (var i = a.value, o = zt(e), c = o.next(i.from), f = c.value; !a.done && !c.done; ) {
|
|
2210
|
+
if (Y(f.from, i.to) <= 0 && 0 <= Y(f.to, i.from)) return !0;
|
|
2211
|
+
Y(i.from, f.from) < 0 ? i = (a = r.next(f.from)).value : f = (c = o.next(i.from)).value;
|
|
2212
2212
|
}
|
|
2213
2213
|
return !1;
|
|
2214
2214
|
}
|
|
@@ -2243,9 +2243,9 @@ function Ta() {
|
|
|
2243
2243
|
function Ht(e, t) {
|
|
2244
2244
|
return M(t).forEach(function(r) {
|
|
2245
2245
|
e[r] ? Et(e[r], t[r]) : e[r] = function a(i) {
|
|
2246
|
-
var o, c,
|
|
2247
|
-
for (o in i) te(i, o) && (c = i[o],
|
|
2248
|
-
return
|
|
2246
|
+
var o, c, f = {};
|
|
2247
|
+
for (o in i) te(i, o) && (c = i[o], f[o] = !c || typeof c != "object" || Jn.has(c.constructor) ? c : a(c));
|
|
2248
|
+
return f;
|
|
2249
2249
|
}(t[r]);
|
|
2250
2250
|
}), e;
|
|
2251
2251
|
}
|
|
@@ -2280,8 +2280,8 @@ function Ta() {
|
|
|
2280
2280
|
var r = /* @__PURE__ */ new Set();
|
|
2281
2281
|
if (e.all) for (var a = 0, i = Object.values(ze); a < i.length; a++) _r(c = i[a], e, r, t);
|
|
2282
2282
|
else for (var o in e) {
|
|
2283
|
-
var c,
|
|
2284
|
-
|
|
2283
|
+
var c, f = /^idb\:\/\/(.*)\/(.*)\//.exec(o);
|
|
2284
|
+
f && (o = f[1], f = f[2], (c = ze["idb://".concat(o, "/").concat(f)]) && _r(c, e, r, t));
|
|
2285
2285
|
}
|
|
2286
2286
|
r.forEach(function(p) {
|
|
2287
2287
|
return p();
|
|
@@ -2289,7 +2289,7 @@ function Ta() {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
function _r(e, t, r, a) {
|
|
2291
2291
|
for (var i = [], o = 0, c = Object.entries(e.queries.query); o < c.length; o++) {
|
|
2292
|
-
for (var
|
|
2292
|
+
for (var f = c[o], p = f[0], m = [], v = 0, h = f[1]; v < h.length; v++) {
|
|
2293
2293
|
var E = h[v];
|
|
2294
2294
|
In(t, E.obsSet) ? E.subscribers.forEach(function(b) {
|
|
2295
2295
|
return r.add(b);
|
|
@@ -2312,7 +2312,7 @@ function Ta() {
|
|
|
2312
2312
|
function c() {
|
|
2313
2313
|
if (t.openCanceller !== a) throw new G.DatabaseClosed("db.open() was cancelled");
|
|
2314
2314
|
}
|
|
2315
|
-
function
|
|
2315
|
+
function f() {
|
|
2316
2316
|
return new B(function(E, g) {
|
|
2317
2317
|
if (c(), !r) throw new G.MissingAPI();
|
|
2318
2318
|
var y = e.name, w = t.autoSchema || !i ? r.open(y) : r.open(y, i);
|
|
@@ -2330,7 +2330,7 @@ function Ta() {
|
|
|
2330
2330
|
if (t.autoSchema) O = R, A = I, (b = e).verno = O.version / 10, A = b._dbSchema = Ft(0, O, A), b._storeNames = _t(O.objectStoreNames, 0), Lt(b, [b._allTables], M(A), A);
|
|
2331
2331
|
else if (Wt(e, e._dbSchema, I), ((x = An(Ft(0, (x = e).idbdb, I), x._dbSchema)).add.length || x.change.some(function(T) {
|
|
2332
2332
|
return T.add.length || T.change.length;
|
|
2333
|
-
})) && !o) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), R.close(), i = R.version + 1, o = !0, E(
|
|
2333
|
+
})) && !o) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), R.close(), i = R.version + 1, o = !0, E(f());
|
|
2334
2334
|
Kt(e, I);
|
|
2335
2335
|
} catch {
|
|
2336
2336
|
}
|
|
@@ -2343,10 +2343,10 @@ function Ta() {
|
|
|
2343
2343
|
}).catch(function(E) {
|
|
2344
2344
|
switch (E == null ? void 0 : E.name) {
|
|
2345
2345
|
case "UnknownError":
|
|
2346
|
-
if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"),
|
|
2346
|
+
if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), f();
|
|
2347
2347
|
break;
|
|
2348
2348
|
case "VersionError":
|
|
2349
|
-
if (0 < i) return i = 0,
|
|
2349
|
+
if (0 < i) return i = 0, f();
|
|
2350
2350
|
}
|
|
2351
2351
|
return B.reject(E);
|
|
2352
2352
|
});
|
|
@@ -2359,7 +2359,7 @@ function Ta() {
|
|
|
2359
2359
|
p = setInterval(g, 100), g();
|
|
2360
2360
|
}).finally(function() {
|
|
2361
2361
|
return clearInterval(p);
|
|
2362
|
-
}) : Promise.resolve()).then(
|
|
2362
|
+
}) : Promise.resolve()).then(f)]).then(function() {
|
|
2363
2363
|
return c(), t.onReadyBeingFired = [], B.resolve(kn(function() {
|
|
2364
2364
|
return e.on.ready.fire(e.vip);
|
|
2365
2365
|
})).then(function E() {
|
|
@@ -2399,8 +2399,8 @@ function Ta() {
|
|
|
2399
2399
|
});
|
|
2400
2400
|
function i(o) {
|
|
2401
2401
|
return function(p) {
|
|
2402
|
-
var
|
|
2403
|
-
return
|
|
2402
|
+
var f = o(p), p = f.value;
|
|
2403
|
+
return f.done ? p : p && typeof p.then == "function" ? p.then(r, a) : F(p) ? Promise.all(p).then(r, a) : r(p);
|
|
2404
2404
|
};
|
|
2405
2405
|
}
|
|
2406
2406
|
return i(t)();
|
|
@@ -2419,8 +2419,8 @@ function Ta() {
|
|
|
2419
2419
|
}), O;
|
|
2420
2420
|
}
|
|
2421
2421
|
t = c(a.primaryKey.keyPath, 0, a.primaryKey), i[":id"] = [t];
|
|
2422
|
-
for (var
|
|
2423
|
-
var m = p[
|
|
2422
|
+
for (var f = 0, p = a.indexes; f < p.length; f++) {
|
|
2423
|
+
var m = p[f];
|
|
2424
2424
|
c(m.keyPath, 0, m);
|
|
2425
2425
|
}
|
|
2426
2426
|
function v(h) {
|
|
@@ -2457,8 +2457,8 @@ function Ta() {
|
|
|
2457
2457
|
} };
|
|
2458
2458
|
function Mn(e, t, r, a) {
|
|
2459
2459
|
return r = r || {}, a = a || "", M(e).forEach(function(i) {
|
|
2460
|
-
var o, c,
|
|
2461
|
-
te(t, i) ? (o = e[i], c = t[i], typeof o == "object" && typeof c == "object" && o && c ? (
|
|
2460
|
+
var o, c, f;
|
|
2461
|
+
te(t, i) ? (o = e[i], c = t[i], typeof o == "object" && typeof c == "object" && o && c ? (f = tn(o)) !== tn(c) ? r[a + i] = t[i] : f === "Object" ? Mn(o, c, r, a + i + ".") : o !== c && (r[a + i] = t[i]) : o !== c && (r[a + i] = t[i])) : r[a + i] = void 0;
|
|
2462
2462
|
}), M(t).forEach(function(i) {
|
|
2463
2463
|
te(e, i) || (r[a + i] = t[i]);
|
|
2464
2464
|
}), r;
|
|
@@ -2470,7 +2470,7 @@ function Ta() {
|
|
|
2470
2470
|
return u(u({}, e), { table: function(t) {
|
|
2471
2471
|
var r = e.table(t), a = r.schema.primaryKey;
|
|
2472
2472
|
return u(u({}, r), { mutate: function(i) {
|
|
2473
|
-
var o = L.trans, c = o.table(t).hook,
|
|
2473
|
+
var o = L.trans, c = o.table(t).hook, f = c.deleting, p = c.creating, m = c.updating;
|
|
2474
2474
|
switch (i.type) {
|
|
2475
2475
|
case "add":
|
|
2476
2476
|
if (p.fire === Z) break;
|
|
@@ -2483,12 +2483,12 @@ function Ta() {
|
|
|
2483
2483
|
return v(i);
|
|
2484
2484
|
}, !0);
|
|
2485
2485
|
case "delete":
|
|
2486
|
-
if (
|
|
2486
|
+
if (f.fire === Z) break;
|
|
2487
2487
|
return o._promise("readwrite", function() {
|
|
2488
2488
|
return v(i);
|
|
2489
2489
|
}, !0);
|
|
2490
2490
|
case "deleteRange":
|
|
2491
|
-
if (
|
|
2491
|
+
if (f.fire === Z) break;
|
|
2492
2492
|
return o._promise("readwrite", function() {
|
|
2493
2493
|
return function h(E, g, y) {
|
|
2494
2494
|
return r.query({ trans: E, values: !1, query: { index: a, range: g }, limit: y }).then(function(w) {
|
|
@@ -2507,7 +2507,7 @@ function Ta() {
|
|
|
2507
2507
|
return (h = h.type === "add" || h.type === "put" ? u(u({}, h), { keys: b }) : u({}, h)).type !== "delete" && (h.values = S([], h.values)), h.keys && (h.keys = S([], h.keys)), E = r, y = b, ((g = h).type === "add" ? Promise.resolve([]) : E.getMany({ trans: g.trans, keys: y, cache: "immutable" })).then(function(O) {
|
|
2508
2508
|
var A = b.map(function(P, x) {
|
|
2509
2509
|
var R, $, I, T = O[x], N = { onerror: null, onsuccess: null };
|
|
2510
|
-
return h.type === "delete" ?
|
|
2510
|
+
return h.type === "delete" ? f.fire.call(N, P, T, w) : h.type === "add" || T === void 0 ? (R = p.fire.call(N, P, h.values[x], w), P == null && R != null && (h.keys[x] = P = R, a.outbound || fe(h.values[x], a.keyPath, P))) : (R = Mn(T, h.values[x]), ($ = m.fire.call(N, R, P, T, w)) && (I = h.values[x], Object.keys($).forEach(function(C) {
|
|
2511
2511
|
te(I, C) ? I[C] = $[C] : fe(I, C, $[C]);
|
|
2512
2512
|
}))), N;
|
|
2513
2513
|
});
|
|
@@ -2570,7 +2570,7 @@ function Ta() {
|
|
|
2570
2570
|
if (L.subscr && i !== "readonly") throw new G.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(L.querier));
|
|
2571
2571
|
return e.transaction(a, i, o);
|
|
2572
2572
|
}, table: function(a) {
|
|
2573
|
-
var i = e.table(a), o = i.schema, c = o.primaryKey, h = o.indexes,
|
|
2573
|
+
var i = e.table(a), o = i.schema, c = o.primaryKey, h = o.indexes, f = c.extractKey, p = c.outbound, m = c.autoIncrement && h.filter(function(g) {
|
|
2574
2574
|
return g.compound && g.keyPath.includes(c.keyPath);
|
|
2575
2575
|
}), v = u(u({}, i), { mutate: function(g) {
|
|
2576
2576
|
function y(C) {
|
|
@@ -2628,7 +2628,7 @@ function Ta() {
|
|
|
2628
2628
|
if (p && y.values) return R.then(function(U) {
|
|
2629
2629
|
return U = U.result, P.addKeys(U), T;
|
|
2630
2630
|
});
|
|
2631
|
-
var N = y.values ? T.result.map(
|
|
2631
|
+
var N = y.values ? T.result.map(f) : T.result;
|
|
2632
2632
|
(y.values ? P : x).addKeys(N);
|
|
2633
2633
|
} else if (g === "openCursor") {
|
|
2634
2634
|
var C = T, K = y.values;
|
|
@@ -2668,11 +2668,11 @@ function Ta() {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
function xr(e, t, E, a, i, o) {
|
|
2670
2670
|
if (!E || E.length === 0) return e;
|
|
2671
|
-
var c = t.query.index,
|
|
2671
|
+
var c = t.query.index, f = c.multiEntry, p = t.query.range, m = a.schema.primaryKey.extractKey, v = c.extractKey, h = (c.lowLevelIndex || c).extractKey, E = E.reduce(function(g, y) {
|
|
2672
2672
|
var w = g, b = [];
|
|
2673
2673
|
if (y.type === "add" || y.type === "put") for (var O = new oe(), A = y.values.length - 1; 0 <= A; --A) {
|
|
2674
2674
|
var P, x = y.values[A], R = m(x);
|
|
2675
|
-
O.hasKey(R) || (P = v(x), (
|
|
2675
|
+
O.hasKey(R) || (P = v(x), (f && F(P) ? P.some(function(C) {
|
|
2676
2676
|
return Bn(C, p);
|
|
2677
2677
|
}) : Bn(P, p)) && (O.addKey(R), b.push(x)));
|
|
2678
2678
|
}
|
|
@@ -2751,7 +2751,7 @@ function Ta() {
|
|
|
2751
2751
|
var _a = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
|
|
2752
2752
|
var t = e.schema.name;
|
|
2753
2753
|
return u(u({}, e), { transaction: function(r, a, i) {
|
|
2754
|
-
var o, c,
|
|
2754
|
+
var o, c, f = e.transaction(r, a, i);
|
|
2755
2755
|
return a === "readwrite" && (c = (o = new AbortController()).signal, i = function(p) {
|
|
2756
2756
|
return function() {
|
|
2757
2757
|
if (o.abort(), a === "readwrite") {
|
|
@@ -2759,16 +2759,16 @@ function Ta() {
|
|
|
2759
2759
|
var E = h[v], g = ze["idb://".concat(t, "/").concat(E)];
|
|
2760
2760
|
if (g) {
|
|
2761
2761
|
var y = e.table(E), w = g.optimisticOps.filter(function(K) {
|
|
2762
|
-
return K.trans ===
|
|
2762
|
+
return K.trans === f;
|
|
2763
2763
|
});
|
|
2764
|
-
if (
|
|
2764
|
+
if (f._explicit && p && f.mutatedParts) for (var b = 0, O = Object.values(g.queries.query); b < O.length; b++) for (var A = 0, P = ($ = O[b]).slice(); A < P.length; A++) In((I = P[A]).obsSet, f.mutatedParts) && (Me($, I), I.subscribers.forEach(function(K) {
|
|
2765
2765
|
return m.add(K);
|
|
2766
2766
|
}));
|
|
2767
2767
|
else if (0 < w.length) {
|
|
2768
2768
|
g.optimisticOps = g.optimisticOps.filter(function(K) {
|
|
2769
|
-
return K.trans !==
|
|
2769
|
+
return K.trans !== f;
|
|
2770
2770
|
});
|
|
2771
|
-
for (var x = 0, R = Object.values(g.queries.query); x < R.length; x++) for (var $, I, T, N = 0, C = ($ = R[x]).slice(); N < C.length; N++) (I = C[N]).res != null &&
|
|
2771
|
+
for (var x = 0, R = Object.values(g.queries.query); x < R.length; x++) for (var $, I, T, N = 0, C = ($ = R[x]).slice(); N < C.length; N++) (I = C[N]).res != null && f.mutatedParts && (p && !I.dirty ? (T = Object.isFrozen(I.res), T = xr(I.res, I.req, w, y, I, T), I.dirty ? (Me($, I), I.subscribers.forEach(function(K) {
|
|
2772
2772
|
return m.add(K);
|
|
2773
2773
|
})) : T !== I.res && (I.res = T, I.promise = B.resolve({ result: T }))) : (I.dirty && Me($, I), I.subscribers.forEach(function(K) {
|
|
2774
2774
|
return m.add(K);
|
|
@@ -2781,31 +2781,31 @@ function Ta() {
|
|
|
2781
2781
|
});
|
|
2782
2782
|
}
|
|
2783
2783
|
};
|
|
2784
|
-
},
|
|
2784
|
+
}, f.addEventListener("abort", i(!1), { signal: c }), f.addEventListener("error", i(!1), { signal: c }), f.addEventListener("complete", i(!0), { signal: c })), f;
|
|
2785
2785
|
}, table: function(r) {
|
|
2786
2786
|
var a = e.table(r), i = a.schema.primaryKey;
|
|
2787
2787
|
return u(u({}, a), { mutate: function(o) {
|
|
2788
2788
|
var c = L.trans;
|
|
2789
2789
|
if (i.outbound || c.db._options.cache === "disabled" || c.explicit || c.idbtrans.mode !== "readwrite") return a.mutate(o);
|
|
2790
|
-
var
|
|
2791
|
-
return
|
|
2790
|
+
var f = ze["idb://".concat(t, "/").concat(r)];
|
|
2791
|
+
return f ? (c = a.mutate(o), o.type !== "add" && o.type !== "put" || !(50 <= o.values.length || jn(i, o).some(function(p) {
|
|
2792
2792
|
return p == null;
|
|
2793
|
-
})) ? (
|
|
2794
|
-
0 < p.numFailures && (Me(
|
|
2793
|
+
})) ? (f.optimisticOps.push(o), o.mutatedParts && Yt(o.mutatedParts), c.then(function(p) {
|
|
2794
|
+
0 < p.numFailures && (Me(f.optimisticOps, o), (p = Dr(0, o, p)) && f.optimisticOps.push(p), o.mutatedParts && Yt(o.mutatedParts));
|
|
2795
2795
|
}), c.catch(function() {
|
|
2796
|
-
Me(
|
|
2796
|
+
Me(f.optimisticOps, o), o.mutatedParts && Yt(o.mutatedParts);
|
|
2797
2797
|
})) : c.then(function(p) {
|
|
2798
2798
|
var m = Dr(0, u(u({}, o), { values: o.values.map(function(v, h) {
|
|
2799
2799
|
var E;
|
|
2800
2800
|
return p.failures[h] ? v : (v = (E = i.keyPath) !== null && E !== void 0 && E.includes(".") ? Ne(v) : u({}, v), fe(v, i.keyPath, p.results[h]), v);
|
|
2801
2801
|
}) }), p);
|
|
2802
|
-
|
|
2802
|
+
f.optimisticOps.push(m), queueMicrotask(function() {
|
|
2803
2803
|
return o.mutatedParts && Yt(o.mutatedParts);
|
|
2804
2804
|
});
|
|
2805
2805
|
}), c) : a.mutate(o);
|
|
2806
2806
|
}, query: function(o) {
|
|
2807
2807
|
if (!Ar(L, a) || !Pr("query", o)) return a.query(o);
|
|
2808
|
-
var c = ((m = L.trans) === null || m === void 0 ? void 0 : m.db._options.cache) === "immutable", h = L,
|
|
2808
|
+
var c = ((m = L.trans) === null || m === void 0 ? void 0 : m.db._options.cache) === "immutable", h = L, f = h.requery, p = h.signal, m = function(y, w, b, O) {
|
|
2809
2809
|
var A = ze["idb://".concat(y, "/").concat(w)];
|
|
2810
2810
|
if (!A) return [];
|
|
2811
2811
|
if (!(w = A.queries[b])) return [null, !1, A, null];
|
|
@@ -2834,7 +2834,7 @@ function Ta() {
|
|
|
2834
2834
|
return y;
|
|
2835
2835
|
}).catch(function(y) {
|
|
2836
2836
|
return g && v && Me(g, v), Promise.reject(y);
|
|
2837
|
-
}), v = { obsSet: o.obsSet, promise: h, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, g ? g.push(v) : (g = [v], (E = E || (ze["idb://".concat(t, "/").concat(r)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = g)), Sa(v, g,
|
|
2837
|
+
}), v = { obsSet: o.obsSet, promise: h, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, g ? g.push(v) : (g = [v], (E = E || (ze["idb://".concat(t, "/").concat(r)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = g)), Sa(v, g, f, p), v.promise.then(function(y) {
|
|
2838
2838
|
return { result: xr(y.result, o, E == null ? void 0 : E.optimisticOps, a, v, c) };
|
|
2839
2839
|
});
|
|
2840
2840
|
} });
|
|
@@ -2902,11 +2902,11 @@ function Ta() {
|
|
|
2902
2902
|
return new B(function(i, o) {
|
|
2903
2903
|
function c() {
|
|
2904
2904
|
t.close(e);
|
|
2905
|
-
var
|
|
2906
|
-
|
|
2905
|
+
var f = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2906
|
+
f.onsuccess = ee(function() {
|
|
2907
2907
|
var p, m, v;
|
|
2908
2908
|
p = t._deps, m = t.name, v = p.indexedDB, p = p.IDBKeyRange, xn(v) || m === $t || Dn(v, p).delete(m).catch(Z), i();
|
|
2909
|
-
}),
|
|
2909
|
+
}), f.onerror = ye(o), f.onblocked = t._fireOnBlocked;
|
|
2910
2910
|
}
|
|
2911
2911
|
if (r) throw new G.InvalidArgument("Invalid closeOptions argument to db.delete()");
|
|
2912
2912
|
a.isBeingOpened ? a.dbReadyPromise.then(c) : c();
|
|
@@ -2938,7 +2938,7 @@ function Ta() {
|
|
|
2938
2938
|
}, re.prototype._transaction = function(e, t, r) {
|
|
2939
2939
|
var a = this, i = L.trans;
|
|
2940
2940
|
i && i.db === this && e.indexOf("!") === -1 || (i = null);
|
|
2941
|
-
var o, c,
|
|
2941
|
+
var o, c, f = e.indexOf("?") !== -1;
|
|
2942
2942
|
e = e.replace("!", "").replace("?", "");
|
|
2943
2943
|
try {
|
|
2944
2944
|
if (c = t.map(function(m) {
|
|
@@ -2951,15 +2951,15 @@ function Ta() {
|
|
|
2951
2951
|
}
|
|
2952
2952
|
if (i) {
|
|
2953
2953
|
if (i.mode === gn && o === mn) {
|
|
2954
|
-
if (!
|
|
2954
|
+
if (!f) throw new G.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
|
|
2955
2955
|
i = null;
|
|
2956
2956
|
}
|
|
2957
2957
|
i && c.forEach(function(m) {
|
|
2958
2958
|
if (i && i.storeNames.indexOf(m) === -1) {
|
|
2959
|
-
if (!
|
|
2959
|
+
if (!f) throw new G.SubTransaction("Table " + m + " not included in parent transaction.");
|
|
2960
2960
|
i = null;
|
|
2961
2961
|
}
|
|
2962
|
-
}),
|
|
2962
|
+
}), f && i && !i.active && (i = null);
|
|
2963
2963
|
}
|
|
2964
2964
|
} catch (m) {
|
|
2965
2965
|
return i ? i._promise(null, function(v, h) {
|
|
@@ -3006,7 +3006,7 @@ function Ta() {
|
|
|
3006
3006
|
this._middlewares = {}, this.verno = 0;
|
|
3007
3007
|
var a = re.dependencies;
|
|
3008
3008
|
this._options = t = u({ addons: re.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, a = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
3009
|
-
var i, o, c,
|
|
3009
|
+
var i, o, c, f, p, m = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Z, dbReadyPromise: null, cancelOpen: Z, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
3010
3010
|
m.dbReadyPromise = new B(function(h) {
|
|
3011
3011
|
m.dbReadyResolve = h;
|
|
3012
3012
|
}), m.openCanceller = new B(function(h, E) {
|
|
@@ -3042,8 +3042,8 @@ function Ta() {
|
|
|
3042
3042
|
var A = b.active;
|
|
3043
3043
|
return b.active = !1, b.on.error.fire(O), b.parent ? b.parent._reject(O) : A && b.idbtrans && b.idbtrans.abort(), ne(O);
|
|
3044
3044
|
});
|
|
3045
|
-
})), this.Version = (
|
|
3046
|
-
this.db =
|
|
3045
|
+
})), this.Version = (f = this, pt(ga.prototype, function(h) {
|
|
3046
|
+
this.db = f, this._cfg = { version: h, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
3047
3047
|
})), this.WhereClause = (p = this, pt(gr.prototype, function(h, E, g) {
|
|
3048
3048
|
if (this.db = p, this._ctx = { table: h, index: E === ":id" ? null : E, or: g }, this._cmp = this._ascending = Y, this._descending = function(y, w) {
|
|
3049
3049
|
return Y(w, y);
|
|
@@ -3096,10 +3096,10 @@ function Ta() {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
function Rr(e) {
|
|
3098
3098
|
var t, r = !1, a = new Oa(function(i) {
|
|
3099
|
-
var o = rn(e), c,
|
|
3100
|
-
return
|
|
3099
|
+
var o = rn(e), c, f = !1, p = {}, m = {}, v = { get closed() {
|
|
3100
|
+
return f;
|
|
3101
3101
|
}, unsubscribe: function() {
|
|
3102
|
-
|
|
3102
|
+
f || (f = !0, c && c.abort(), h && Ie.storagemutated.unsubscribe(g));
|
|
3103
3103
|
} };
|
|
3104
3104
|
i.start && i.start(v);
|
|
3105
3105
|
var h = !1, E = function() {
|
|
@@ -3108,7 +3108,7 @@ function Ta() {
|
|
|
3108
3108
|
Ht(p, w), In(m, p) && E();
|
|
3109
3109
|
}, y = function() {
|
|
3110
3110
|
var w, b, O;
|
|
3111
|
-
!
|
|
3111
|
+
!f && Jt.indexedDB && (p = {}, w = {}, c && c.abort(), c = new AbortController(), O = function(A) {
|
|
3112
3112
|
var P = qe();
|
|
3113
3113
|
try {
|
|
3114
3114
|
o && tt();
|
|
@@ -3118,15 +3118,15 @@ function Ta() {
|
|
|
3118
3118
|
P && et();
|
|
3119
3119
|
}
|
|
3120
3120
|
}(b = { subscr: w, signal: c.signal, requery: E, querier: e, trans: null }), Promise.resolve(O).then(function(A) {
|
|
3121
|
-
r = !0, t = A,
|
|
3121
|
+
r = !0, t = A, f || b.signal.aborted || (p = {}, function(P) {
|
|
3122
3122
|
for (var x in P) if (te(P, x)) return;
|
|
3123
3123
|
return 1;
|
|
3124
3124
|
}(m = w) || h || (Ie(bt, g), h = !0), pn(function() {
|
|
3125
|
-
return !
|
|
3125
|
+
return !f && i.next && i.next(A);
|
|
3126
3126
|
}));
|
|
3127
3127
|
}, function(A) {
|
|
3128
|
-
r = !1, ["DatabaseClosedError", "AbortError"].includes(A == null ? void 0 : A.name) ||
|
|
3129
|
-
|
|
3128
|
+
r = !1, ["DatabaseClosedError", "AbortError"].includes(A == null ? void 0 : A.name) || f || pn(function() {
|
|
3129
|
+
f || i.error && i.error(A);
|
|
3130
3130
|
});
|
|
3131
3131
|
}));
|
|
3132
3132
|
};
|
|
@@ -3244,33 +3244,33 @@ var Ca = Ta();
|
|
|
3244
3244
|
const Un = /* @__PURE__ */ Ra(Ca), Cr = Symbol.for("Dexie"), en = globalThis[Cr] || (globalThis[Cr] = Un);
|
|
3245
3245
|
if (Un.semVer !== en.semVer)
|
|
3246
3246
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${en.semVer}`);
|
|
3247
|
-
function X(
|
|
3248
|
-
let n = `${
|
|
3249
|
-
return
|
|
3247
|
+
function X(d) {
|
|
3248
|
+
let n = `${d.type}.${d.topics}`;
|
|
3249
|
+
return d.order && (n += `.${d.order}`), d.period && (n += `.${d.period}`), n;
|
|
3250
3250
|
}
|
|
3251
|
-
function $r(
|
|
3251
|
+
function $r(d) {
|
|
3252
3252
|
var n;
|
|
3253
|
-
if (
|
|
3254
|
-
const s = (n =
|
|
3255
|
-
s && s.length > 1 ? (
|
|
3253
|
+
if (d.widget === void 0) {
|
|
3254
|
+
const s = (n = d.topics) == null ? void 0 : n.split("-");
|
|
3255
|
+
s && s.length > 1 ? (d.dashboard = s ? s[0] : "", d.widget = s ? s[1] : "") : (d.widget = d.topics, d.dashboard = d.slide);
|
|
3256
3256
|
}
|
|
3257
|
-
return
|
|
3257
|
+
return d.topics === void 0 && (d.topics = `${d.dashboard}-${d.widget}`), d;
|
|
3258
3258
|
}
|
|
3259
|
-
function St(
|
|
3259
|
+
function St(d, n) {
|
|
3260
3260
|
var F;
|
|
3261
3261
|
let s, u, S, k, M;
|
|
3262
|
-
switch (
|
|
3262
|
+
switch (d.moderation) {
|
|
3263
3263
|
case Vt.BEFORE:
|
|
3264
|
-
s = /* @__PURE__ */ new Date(), u = (F =
|
|
3264
|
+
s = /* @__PURE__ */ new Date(), u = (F = d.beforeTime) == null ? void 0 : F.split(":"), S = Number.parseInt(u ? u[0] : "00"), k = Number.parseInt(u ? u[1] : "00"), M = Number.parseInt(u ? u[2] : "00"), n.before = s.setHours(S, k, M, 0) / 1e3, n.period || (n.period = s.getDay() === 1 ? 72 : 24);
|
|
3265
3265
|
break;
|
|
3266
3266
|
case Vt.DELAYED:
|
|
3267
|
-
|
|
3267
|
+
d.delay && d.delay > 0 && (n.delay = `${d.delay}`);
|
|
3268
3268
|
break;
|
|
3269
3269
|
case Vt.APPROVED:
|
|
3270
3270
|
n.approved = "1";
|
|
3271
3271
|
break;
|
|
3272
3272
|
default:
|
|
3273
|
-
|
|
3273
|
+
d.period !== 0 && (n.period = d.period);
|
|
3274
3274
|
}
|
|
3275
3275
|
return n;
|
|
3276
3276
|
}
|
|
@@ -3288,14 +3288,20 @@ class Nr {
|
|
|
3288
3288
|
const s = await this.db.table(D.CLOUD).where({ id: n.widget }).last().catch(() => {
|
|
3289
3289
|
console.warn(
|
|
3290
3290
|
"%capi%C %ccloud",
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3291
|
+
l.API,
|
|
3292
|
+
l.NONE,
|
|
3293
|
+
l.CLOUD,
|
|
3294
3294
|
n.slide,
|
|
3295
3295
|
n.widget
|
|
3296
3296
|
);
|
|
3297
3297
|
});
|
|
3298
|
-
return typeof s > "u" ? { data: null, message: "Cloud Data error", success: !1 } : (
|
|
3298
|
+
return typeof s > "u" ? { data: null, message: "Cloud Data error", success: !1 } : (console.debug(
|
|
3299
|
+
"%cstorage%c %ccloud",
|
|
3300
|
+
l.STORAGE,
|
|
3301
|
+
l.NONE,
|
|
3302
|
+
l.CLOUD,
|
|
3303
|
+
s
|
|
3304
|
+
), s.data.presentation = (n == null ? void 0 : n.presentation) || "not set", s.data.slide = (n == null ? void 0 : n.slide) || "not set", s.data.query = n, s.query = n, s.message = "Cloud retrieved successfully", s.success = !0, s);
|
|
3299
3305
|
});
|
|
3300
3306
|
/**
|
|
3301
3307
|
* Retrieve Series Data
|
|
@@ -3306,14 +3312,20 @@ class Nr {
|
|
|
3306
3312
|
const s = await this.db.table(D.SERIES).where({ id: n.widget }).last().catch(() => {
|
|
3307
3313
|
console.warn(
|
|
3308
3314
|
"%capi%c %cseries",
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3315
|
+
l.API,
|
|
3316
|
+
l.NONE,
|
|
3317
|
+
l.SERIES,
|
|
3312
3318
|
n.slide,
|
|
3313
3319
|
n.widget
|
|
3314
3320
|
);
|
|
3315
3321
|
});
|
|
3316
|
-
return s === void 0 ? { data: null, message: "Series Data error", success: !1 } : (
|
|
3322
|
+
return s === void 0 ? { data: null, message: "Series Data error", success: !1 } : (console.debug(
|
|
3323
|
+
"%cstorage%c %cseries",
|
|
3324
|
+
l.STORAGE,
|
|
3325
|
+
l.NONE,
|
|
3326
|
+
l.SERIES,
|
|
3327
|
+
s
|
|
3328
|
+
), s.data.presentation = (n == null ? void 0 : n.presentation) || "not set", s.data.slide = (n == null ? void 0 : n.slide) || "not set", s.data.query = n, s.query = n, s.message = "Series retrieved successfully", s.success = !0, s);
|
|
3317
3329
|
});
|
|
3318
3330
|
/**
|
|
3319
3331
|
* Retrieve Messages Data
|
|
@@ -3344,18 +3356,18 @@ class Nr {
|
|
|
3344
3356
|
};
|
|
3345
3357
|
return console.debug(
|
|
3346
3358
|
"%cstorage%c %cmessages",
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3359
|
+
l.STORAGE,
|
|
3360
|
+
l.NONE,
|
|
3361
|
+
l.MESSAGES,
|
|
3350
3362
|
te
|
|
3351
3363
|
), te;
|
|
3352
3364
|
});
|
|
3353
3365
|
} catch (M) {
|
|
3354
3366
|
return console.warn(
|
|
3355
3367
|
"%cstorage%c %cmessages",
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3368
|
+
l.STORAGE,
|
|
3369
|
+
l.NONE,
|
|
3370
|
+
l.MESSAGES,
|
|
3359
3371
|
n,
|
|
3360
3372
|
M
|
|
3361
3373
|
), { data: null, message: "Messages Data error", success: !1 };
|
|
@@ -3372,7 +3384,7 @@ class Nr {
|
|
|
3372
3384
|
dashboard_id: n.dashboard,
|
|
3373
3385
|
//data: data.data,
|
|
3374
3386
|
data: s
|
|
3375
|
-
}).then(() => 201).catch((u) => (console.error("%cstorage",
|
|
3387
|
+
}).then(() => 201).catch((u) => (console.error("%cstorage", l.STORAGE, "set", n, u.message), 400)) : 400);
|
|
3376
3388
|
/**
|
|
3377
3389
|
* Update Series
|
|
3378
3390
|
* @param query IQuery
|
|
@@ -3384,7 +3396,7 @@ class Nr {
|
|
|
3384
3396
|
dashboard_id: n.dashboard,
|
|
3385
3397
|
//data: data.data,
|
|
3386
3398
|
data: s
|
|
3387
|
-
}).then(() => 201).catch((u) => (console.error("%cstorage",
|
|
3399
|
+
}).then(() => 201).catch((u) => (console.error("%cstorage", l.STORAGE, "set", n, u.message), 400)) : 400);
|
|
3388
3400
|
/**
|
|
3389
3401
|
* Update Messages
|
|
3390
3402
|
* @param query IQuery
|
|
@@ -3406,7 +3418,7 @@ class Nr {
|
|
|
3406
3418
|
}).catch((Qe) => {
|
|
3407
3419
|
S++, console.error(
|
|
3408
3420
|
"%cstorage",
|
|
3409
|
-
|
|
3421
|
+
l.STORAGE,
|
|
3410
3422
|
"set message",
|
|
3411
3423
|
`title: ${u}`,
|
|
3412
3424
|
k,
|
|
@@ -3426,7 +3438,7 @@ class Nr {
|
|
|
3426
3438
|
}).catch((Qe) => {
|
|
3427
3439
|
S++, console.error(
|
|
3428
3440
|
"%cstorage",
|
|
3429
|
-
|
|
3441
|
+
l.STORAGE,
|
|
3430
3442
|
"set topic",
|
|
3431
3443
|
`title: ${u}`,
|
|
3432
3444
|
k,
|
|
@@ -3438,7 +3450,7 @@ class Nr {
|
|
|
3438
3450
|
await this.db.table(D.TOPICS).where("message_id").equals(M).modify({ visible: F }).catch((J) => {
|
|
3439
3451
|
S++, console.error(
|
|
3440
3452
|
"%cstorage",
|
|
3441
|
-
|
|
3453
|
+
l.STORAGE,
|
|
3442
3454
|
"update message visibility",
|
|
3443
3455
|
`title: ${j}`,
|
|
3444
3456
|
`widget: ${k.widget_id}`,
|
|
@@ -3454,30 +3466,30 @@ class Nr {
|
|
|
3454
3466
|
const n = Date.now() / 1e3, s = (k) => k.expires < n, u = (k) => k.expires < n;
|
|
3455
3467
|
return await this.db.table(D.TOPICS).orderBy("expires").filter(s).delete().catch((k) => (console.error(
|
|
3456
3468
|
"%cstorage%c %cclean",
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3469
|
+
l.STORAGE,
|
|
3470
|
+
l.NONE,
|
|
3471
|
+
l.MESSAGES,
|
|
3460
3472
|
k.message
|
|
3461
3473
|
), 0)), await this.db.table(D.MESSAGES).orderBy("expires").filter(u).delete().catch((k) => (console.error(
|
|
3462
3474
|
"%cstorage%c %clean",
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3475
|
+
l.STORAGE,
|
|
3476
|
+
l.NONE,
|
|
3477
|
+
l.MESSAGES,
|
|
3466
3478
|
k.message
|
|
3467
3479
|
), 0));
|
|
3468
3480
|
});
|
|
3469
3481
|
_(this, "hideMessage", async (n, s) => {
|
|
3470
3482
|
await this.db.table(D.TOPICS).where("message_id").equals(n).modify({ visible: s ? 1 : 0 }).catch((u) => (console.error(
|
|
3471
3483
|
"%cstorage%c %chide",
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3484
|
+
l.STORAGE,
|
|
3485
|
+
l.NONE,
|
|
3486
|
+
l.HIDE,
|
|
3475
3487
|
u.message
|
|
3476
3488
|
), 0));
|
|
3477
3489
|
});
|
|
3478
3490
|
_(this, "getDashboard", async (n) => {
|
|
3479
3491
|
const s = await this.db.table(D.DASHBOARD).where({ id: n.id }).last().catch(() => {
|
|
3480
|
-
console.warn("%cstorage",
|
|
3492
|
+
console.warn("%cstorage", l.STORAGE, q.DASHBOARD_LOAD, n.id);
|
|
3481
3493
|
});
|
|
3482
3494
|
return s === void 0 ? {
|
|
3483
3495
|
data: null,
|
|
@@ -3499,7 +3511,7 @@ class Nr {
|
|
|
3499
3511
|
success: !0
|
|
3500
3512
|
})).catch((s) => (console.error(
|
|
3501
3513
|
"%cstorage",
|
|
3502
|
-
|
|
3514
|
+
l.STORAGE,
|
|
3503
3515
|
D.WIDGET,
|
|
3504
3516
|
n,
|
|
3505
3517
|
s.message
|
|
@@ -3510,13 +3522,13 @@ class Nr {
|
|
|
3510
3522
|
})));
|
|
3511
3523
|
_(this, "getWidget", async (n) => {
|
|
3512
3524
|
const s = await this.db.table(D.WIDGET).where({ id: n.id }).last().catch(() => {
|
|
3513
|
-
console.warn("%cstorage",
|
|
3525
|
+
console.warn("%cstorage", l.STORAGE, q.WIDGET_LOAD, n.id);
|
|
3514
3526
|
});
|
|
3515
3527
|
return s === void 0 ? {
|
|
3516
3528
|
data: null,
|
|
3517
3529
|
message: `Widget ${n.id} Load error`,
|
|
3518
3530
|
success: !1
|
|
3519
|
-
} : (s.message = `
|
|
3531
|
+
} : (s.message = `Widget ${n.id} retrieved from storage`, s.success = !0, s);
|
|
3520
3532
|
});
|
|
3521
3533
|
// getWidgets = async (query: IQuery): Promise<IResponse> => {
|
|
3522
3534
|
// const data = await this.db
|
|
@@ -3554,7 +3566,7 @@ class Nr {
|
|
|
3554
3566
|
success: !0
|
|
3555
3567
|
})).catch((s) => (console.error(
|
|
3556
3568
|
"%cstorage",
|
|
3557
|
-
|
|
3569
|
+
l.STORAGE,
|
|
3558
3570
|
D.WIDGET,
|
|
3559
3571
|
n,
|
|
3560
3572
|
s.message
|
|
@@ -3572,16 +3584,16 @@ class Nr {
|
|
|
3572
3584
|
(u) => u.widget === n.widget
|
|
3573
3585
|
).length > 0 || (n.type === D.MESSAGES && (n = St(this.options, n)), console.info(
|
|
3574
3586
|
"%cstorage%c %csubscribe",
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3587
|
+
l.STORAGE,
|
|
3588
|
+
l.NONE,
|
|
3589
|
+
l.SUBSCRIBE,
|
|
3578
3590
|
n.slide,
|
|
3579
3591
|
n.widget
|
|
3580
3592
|
), console.debug(
|
|
3581
3593
|
"%cstorage%c %csubscribe",
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3594
|
+
l.STORAGE,
|
|
3595
|
+
l.NONE,
|
|
3596
|
+
l.SUBSCRIBE,
|
|
3585
3597
|
n
|
|
3586
3598
|
), this.subscribers.push(n)), null));
|
|
3587
3599
|
/**
|
|
@@ -3596,7 +3608,7 @@ class Nr {
|
|
|
3596
3608
|
*/
|
|
3597
3609
|
_(this, "getSlide", async (n) => {
|
|
3598
3610
|
const s = await this.db.table(D.SLIDE).where({ id: n.id }).last().catch(() => {
|
|
3599
|
-
console.warn("%cstorage",
|
|
3611
|
+
console.warn("%cstorage", l.STORAGE, q.SLIDE_LOAD, n.id);
|
|
3600
3612
|
});
|
|
3601
3613
|
return s === void 0 ? {
|
|
3602
3614
|
data: null,
|
|
@@ -3623,7 +3635,7 @@ class Nr {
|
|
|
3623
3635
|
success: !0
|
|
3624
3636
|
})).catch((s) => (console.error(
|
|
3625
3637
|
"%cstorage",
|
|
3626
|
-
|
|
3638
|
+
l.STORAGE,
|
|
3627
3639
|
q.SLIDE_STORE,
|
|
3628
3640
|
n,
|
|
3629
3641
|
s.message
|
|
@@ -3641,7 +3653,7 @@ class Nr {
|
|
|
3641
3653
|
const s = await this.db.table(D.PRESENTATION).where({ id: n.id }).last().catch(() => {
|
|
3642
3654
|
console.warn(
|
|
3643
3655
|
"%cstorage ",
|
|
3644
|
-
|
|
3656
|
+
l.STORAGE,
|
|
3645
3657
|
q.PRESENTATION_LOAD,
|
|
3646
3658
|
n.id
|
|
3647
3659
|
);
|
|
@@ -3668,7 +3680,7 @@ class Nr {
|
|
|
3668
3680
|
success: !0
|
|
3669
3681
|
})).catch((s) => (console.error(
|
|
3670
3682
|
"%cstorage",
|
|
3671
|
-
|
|
3683
|
+
l.STORAGE,
|
|
3672
3684
|
q.PRESENTATION_STORE,
|
|
3673
3685
|
n,
|
|
3674
3686
|
s.message
|
|
@@ -3686,7 +3698,7 @@ class Nr {
|
|
|
3686
3698
|
const s = await this.db.table(D.PREFERENCE).where({ id: n.id }).last().catch(() => {
|
|
3687
3699
|
console.warn(
|
|
3688
3700
|
"%cstorage",
|
|
3689
|
-
|
|
3701
|
+
l.STORAGE,
|
|
3690
3702
|
q.PREFERENCE_LOAD,
|
|
3691
3703
|
n.id
|
|
3692
3704
|
);
|
|
@@ -3711,7 +3723,7 @@ class Nr {
|
|
|
3711
3723
|
success: !0
|
|
3712
3724
|
})).catch((s) => (console.error(
|
|
3713
3725
|
"%cstorage",
|
|
3714
|
-
|
|
3726
|
+
l.STORAGE,
|
|
3715
3727
|
q.PREFERENCE_STORE,
|
|
3716
3728
|
n,
|
|
3717
3729
|
s.message
|
|
@@ -3737,13 +3749,13 @@ class Nr {
|
|
|
3737
3749
|
}), this.db.open();
|
|
3738
3750
|
}
|
|
3739
3751
|
}
|
|
3740
|
-
function zn(
|
|
3752
|
+
function zn(d) {
|
|
3741
3753
|
return new Promise((n, s) => {
|
|
3742
|
-
|
|
3754
|
+
d.oncomplete = d.onsuccess = () => n(d.result), d.onabort = d.onerror = () => s(d.error);
|
|
3743
3755
|
});
|
|
3744
3756
|
}
|
|
3745
|
-
function $a(
|
|
3746
|
-
const s = indexedDB.open(
|
|
3757
|
+
function $a(d, n) {
|
|
3758
|
+
const s = indexedDB.open(d);
|
|
3747
3759
|
s.onupgradeneeded = () => s.result.createObjectStore(n);
|
|
3748
3760
|
const u = zn(s);
|
|
3749
3761
|
return (S, k) => u.then((M) => k(M.transaction(n, S).objectStore(n)));
|
|
@@ -3752,11 +3764,11 @@ let Fn;
|
|
|
3752
3764
|
function Mr() {
|
|
3753
3765
|
return Fn || (Fn = $a("keyval-store", "keyval")), Fn;
|
|
3754
3766
|
}
|
|
3755
|
-
function Ce(
|
|
3756
|
-
return n("readonly", (s) => zn(s.get(
|
|
3767
|
+
function Ce(d, n = Mr()) {
|
|
3768
|
+
return n("readonly", (s) => zn(s.get(d)));
|
|
3757
3769
|
}
|
|
3758
|
-
function $e(
|
|
3759
|
-
return s("readwrite", (u) => (u.put(n,
|
|
3770
|
+
function $e(d, n, s = Mr()) {
|
|
3771
|
+
return s("readwrite", (u) => (u.put(n, d), zn(u.transaction)));
|
|
3760
3772
|
}
|
|
3761
3773
|
class jr {
|
|
3762
3774
|
constructor(n) {
|
|
@@ -3764,15 +3776,15 @@ class jr {
|
|
|
3764
3776
|
_(this, "options");
|
|
3765
3777
|
_(this, "getCloud", async (n) => {
|
|
3766
3778
|
const s = X(n);
|
|
3767
|
-
return await Ce(s).then((u) => u).catch(() => (console.warn("%capi",
|
|
3779
|
+
return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.CLOUD, n.slide, n.widget), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3768
3780
|
});
|
|
3769
3781
|
_(this, "getSeries", async (n) => {
|
|
3770
3782
|
const s = X(n);
|
|
3771
|
-
return await Ce(s).then((u) => u).catch(() => (console.warn("%capi",
|
|
3783
|
+
return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.SERIES, n.slide, n.widget), { data: null, message: "Series Data error", success: !1 }));
|
|
3772
3784
|
});
|
|
3773
3785
|
_(this, "getMessages", async (n) => {
|
|
3774
3786
|
const s = X(n);
|
|
3775
|
-
return await Ce(s).then((u) => u).catch(() => (console.warn("%capi",
|
|
3787
|
+
return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.MESSAGES, n.slide, n.widget), { data: null, message: "Messages Data error", success: !1 }));
|
|
3776
3788
|
});
|
|
3777
3789
|
/**
|
|
3778
3790
|
* Update Cloud
|
|
@@ -3786,7 +3798,7 @@ class jr {
|
|
|
3786
3798
|
const u = X(n);
|
|
3787
3799
|
return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
|
|
3788
3800
|
"%cstorage",
|
|
3789
|
-
|
|
3801
|
+
l.STORAGE,
|
|
3790
3802
|
D.CLOUD,
|
|
3791
3803
|
n,
|
|
3792
3804
|
S.message
|
|
@@ -3804,7 +3816,7 @@ class jr {
|
|
|
3804
3816
|
const u = X(n);
|
|
3805
3817
|
return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
|
|
3806
3818
|
"%cstorage",
|
|
3807
|
-
|
|
3819
|
+
l.STORAGE,
|
|
3808
3820
|
D.SERIES,
|
|
3809
3821
|
n,
|
|
3810
3822
|
S.message
|
|
@@ -3822,7 +3834,7 @@ class jr {
|
|
|
3822
3834
|
const u = X(n);
|
|
3823
3835
|
return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
|
|
3824
3836
|
"%cstorage",
|
|
3825
|
-
|
|
3837
|
+
l.STORAGE,
|
|
3826
3838
|
D.MESSAGES,
|
|
3827
3839
|
n,
|
|
3828
3840
|
S.message
|
|
@@ -3836,7 +3848,7 @@ class jr {
|
|
|
3836
3848
|
});
|
|
3837
3849
|
_(this, "getDashboard", async (n) => {
|
|
3838
3850
|
const s = X(n);
|
|
3839
|
-
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi",
|
|
3851
|
+
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
|
|
3840
3852
|
data: null,
|
|
3841
3853
|
message: `Widget ${n.data.id} load error: ${u.message}`,
|
|
3842
3854
|
success: !1
|
|
@@ -3858,7 +3870,7 @@ class jr {
|
|
|
3858
3870
|
success: !0
|
|
3859
3871
|
})).catch((S) => (console.error(
|
|
3860
3872
|
"%cstorage",
|
|
3861
|
-
|
|
3873
|
+
l.STORAGE,
|
|
3862
3874
|
D.WIDGET,
|
|
3863
3875
|
n,
|
|
3864
3876
|
S.message
|
|
@@ -3870,7 +3882,7 @@ class jr {
|
|
|
3870
3882
|
});
|
|
3871
3883
|
_(this, "getWidget", async (n) => {
|
|
3872
3884
|
const s = X(n);
|
|
3873
|
-
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi",
|
|
3885
|
+
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
|
|
3874
3886
|
data: null,
|
|
3875
3887
|
message: `Widget ${n.data.id} load error: ${u.message}`,
|
|
3876
3888
|
success: !1
|
|
@@ -3894,7 +3906,7 @@ class jr {
|
|
|
3894
3906
|
success: !0
|
|
3895
3907
|
})).catch((S) => (console.error(
|
|
3896
3908
|
"%cstorage",
|
|
3897
|
-
|
|
3909
|
+
l.STORAGE,
|
|
3898
3910
|
D.WIDGET,
|
|
3899
3911
|
n,
|
|
3900
3912
|
S.message
|
|
@@ -3913,9 +3925,9 @@ class jr {
|
|
|
3913
3925
|
(u) => u.widget === n.widget
|
|
3914
3926
|
).length > 0 || (console.debug(
|
|
3915
3927
|
"%cstorage%c %csubscribe",
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3928
|
+
l.STORAGE,
|
|
3929
|
+
l.NONE,
|
|
3930
|
+
l.SUBSCRIBE,
|
|
3919
3931
|
n.slide,
|
|
3920
3932
|
n.widget
|
|
3921
3933
|
), this.subscribers.push(n)), null));
|
|
@@ -3926,7 +3938,7 @@ class jr {
|
|
|
3926
3938
|
_(this, "getSubscribers", async () => await new Promise((n) => n(this.subscribers)));
|
|
3927
3939
|
_(this, "getSlide", async (n) => {
|
|
3928
3940
|
const s = X(n);
|
|
3929
|
-
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi",
|
|
3941
|
+
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
|
|
3930
3942
|
data: null,
|
|
3931
3943
|
message: `Slide ${n.data.id} load error: ${u.message}`,
|
|
3932
3944
|
success: !1
|
|
@@ -3950,7 +3962,7 @@ class jr {
|
|
|
3950
3962
|
success: !0
|
|
3951
3963
|
})).catch((S) => (console.error(
|
|
3952
3964
|
"%cstorage",
|
|
3953
|
-
|
|
3965
|
+
l.STORAGE,
|
|
3954
3966
|
D.SLIDE,
|
|
3955
3967
|
n,
|
|
3956
3968
|
S.message
|
|
@@ -3962,7 +3974,7 @@ class jr {
|
|
|
3962
3974
|
});
|
|
3963
3975
|
_(this, "getPresentation", async (n) => {
|
|
3964
3976
|
const s = X(n);
|
|
3965
|
-
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi",
|
|
3977
|
+
return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.PRESENTATION, n.id), {
|
|
3966
3978
|
data: null,
|
|
3967
3979
|
message: `Slide ${n.data.id} load error: ${u.message}`,
|
|
3968
3980
|
success: !1
|
|
@@ -3981,7 +3993,7 @@ class jr {
|
|
|
3981
3993
|
success: !0
|
|
3982
3994
|
})).catch((S) => (console.error(
|
|
3983
3995
|
"%cstorage",
|
|
3984
|
-
|
|
3996
|
+
l.STORAGE,
|
|
3985
3997
|
D.PRESENTATION,
|
|
3986
3998
|
n,
|
|
3987
3999
|
S.message
|
|
@@ -3991,7 +4003,7 @@ class jr {
|
|
|
3991
4003
|
success: !1
|
|
3992
4004
|
}));
|
|
3993
4005
|
});
|
|
3994
|
-
_(this, "getPreference", async (n) => await Ce(`${D.PREFERENCE}.${n.id}`).then((s) => s).catch((s) => (console.warn("%capi",
|
|
4006
|
+
_(this, "getPreference", async (n) => await Ce(`${D.PREFERENCE}.${n.id}`).then((s) => s).catch((s) => (console.warn("%capi", l.API, D.PREFERENCE, n.id), {
|
|
3995
4007
|
data: null,
|
|
3996
4008
|
message: `Preference ${n.id} save error: ${s.message}`,
|
|
3997
4009
|
success: !1
|
|
@@ -4007,7 +4019,7 @@ class jr {
|
|
|
4007
4019
|
success: !0
|
|
4008
4020
|
})).catch((s) => (console.error(
|
|
4009
4021
|
"%cstorage",
|
|
4010
|
-
|
|
4022
|
+
l.STORAGE,
|
|
4011
4023
|
D.PREFERENCE,
|
|
4012
4024
|
n,
|
|
4013
4025
|
s.message
|
|
@@ -4030,7 +4042,7 @@ class Br {
|
|
|
4030
4042
|
} catch (u) {
|
|
4031
4043
|
return console.warn(
|
|
4032
4044
|
"%capi",
|
|
4033
|
-
|
|
4045
|
+
l.API,
|
|
4034
4046
|
D.CLOUD,
|
|
4035
4047
|
n.slide,
|
|
4036
4048
|
n.widget,
|
|
@@ -4045,7 +4057,7 @@ class Br {
|
|
|
4045
4057
|
} catch (u) {
|
|
4046
4058
|
return console.warn(
|
|
4047
4059
|
"%capi",
|
|
4048
|
-
|
|
4060
|
+
l.API,
|
|
4049
4061
|
D.SERIES,
|
|
4050
4062
|
n.slide,
|
|
4051
4063
|
n.widget,
|
|
@@ -4060,7 +4072,7 @@ class Br {
|
|
|
4060
4072
|
} catch (u) {
|
|
4061
4073
|
return console.warn(
|
|
4062
4074
|
"%capi",
|
|
4063
|
-
|
|
4075
|
+
l.API,
|
|
4064
4076
|
D.MESSAGES,
|
|
4065
4077
|
n.slide,
|
|
4066
4078
|
n.widget,
|
|
@@ -4079,7 +4091,7 @@ class Br {
|
|
|
4079
4091
|
try {
|
|
4080
4092
|
return localStorage.setObject(u, s), 201;
|
|
4081
4093
|
} catch (S) {
|
|
4082
|
-
return console.error("%cstorage",
|
|
4094
|
+
return console.error("%cstorage", l.STORAGE, D.CLOUD, n, S), 400;
|
|
4083
4095
|
}
|
|
4084
4096
|
});
|
|
4085
4097
|
/**
|
|
@@ -4093,7 +4105,7 @@ class Br {
|
|
|
4093
4105
|
try {
|
|
4094
4106
|
return localStorage.setObject(u, s), 201;
|
|
4095
4107
|
} catch (S) {
|
|
4096
|
-
return console.error("%cstorage",
|
|
4108
|
+
return console.error("%cstorage", l.STORAGE, D.SERIES, n, S), 400;
|
|
4097
4109
|
}
|
|
4098
4110
|
});
|
|
4099
4111
|
/**
|
|
@@ -4107,7 +4119,7 @@ class Br {
|
|
|
4107
4119
|
try {
|
|
4108
4120
|
return localStorage.setObject(u, s), 200;
|
|
4109
4121
|
} catch (S) {
|
|
4110
|
-
return console.error("%cstorage",
|
|
4122
|
+
return console.error("%cstorage", l.STORAGE, D.MESSAGES, n, S), 400;
|
|
4111
4123
|
}
|
|
4112
4124
|
});
|
|
4113
4125
|
_(this, "cleanMessages", async (n) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
@@ -4120,7 +4132,7 @@ class Br {
|
|
|
4120
4132
|
try {
|
|
4121
4133
|
return localStorage.getObject(`${D.DASHBOARD}.${n.id}`);
|
|
4122
4134
|
} catch (s) {
|
|
4123
|
-
return console.warn("%capi",
|
|
4135
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4124
4136
|
data: null,
|
|
4125
4137
|
message: `Dashboard ${n.id} load error: ${s.message}`,
|
|
4126
4138
|
success: !1
|
|
@@ -4136,7 +4148,7 @@ class Br {
|
|
|
4136
4148
|
success: !0
|
|
4137
4149
|
};
|
|
4138
4150
|
} catch (u) {
|
|
4139
|
-
return console.error("%cstorage",
|
|
4151
|
+
return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
|
|
4140
4152
|
data: null,
|
|
4141
4153
|
message: `Dashboard ${n.data.id} save error: ${u.message}`,
|
|
4142
4154
|
success: !1
|
|
@@ -4147,7 +4159,7 @@ class Br {
|
|
|
4147
4159
|
try {
|
|
4148
4160
|
return localStorage.getObject(`${D.WIDGET}.${n.id}`);
|
|
4149
4161
|
} catch (s) {
|
|
4150
|
-
return console.warn("%capi",
|
|
4162
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4151
4163
|
data: null,
|
|
4152
4164
|
message: `Widget ${n.id} load error: ${s.message}`,
|
|
4153
4165
|
success: !1
|
|
@@ -4163,7 +4175,7 @@ class Br {
|
|
|
4163
4175
|
success: !0
|
|
4164
4176
|
};
|
|
4165
4177
|
} catch (u) {
|
|
4166
|
-
return console.error("%cstorage",
|
|
4178
|
+
return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
|
|
4167
4179
|
data: null,
|
|
4168
4180
|
message: `Widget ${n.data.id} save error: ${u.message}`,
|
|
4169
4181
|
success: !1
|
|
@@ -4179,9 +4191,9 @@ class Br {
|
|
|
4179
4191
|
(u) => u.widget === n.widget
|
|
4180
4192
|
).length || (console.debug(
|
|
4181
4193
|
"%cstorage%c %csubscribe",
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4194
|
+
l.STORAGE,
|
|
4195
|
+
l.NONE,
|
|
4196
|
+
l.SUBSCRIBE,
|
|
4185
4197
|
n.slide,
|
|
4186
4198
|
n.widget
|
|
4187
4199
|
), this.subscribers.push(n)), null));
|
|
@@ -4194,7 +4206,7 @@ class Br {
|
|
|
4194
4206
|
try {
|
|
4195
4207
|
return localStorage.getObject(`${D.SLIDE}.${n.id}`);
|
|
4196
4208
|
} catch (s) {
|
|
4197
|
-
return console.warn("%capi",
|
|
4209
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4198
4210
|
data: null,
|
|
4199
4211
|
message: `Slide ${n.id} load error: ${s.message}`,
|
|
4200
4212
|
success: !1
|
|
@@ -4214,7 +4226,7 @@ class Br {
|
|
|
4214
4226
|
success: !0
|
|
4215
4227
|
};
|
|
4216
4228
|
} catch (s) {
|
|
4217
|
-
return console.error("%cstorage",
|
|
4229
|
+
return console.error("%cstorage", l.STORAGE, D.SLIDE, n, s), {
|
|
4218
4230
|
data: null,
|
|
4219
4231
|
message: `Slide ${n.data.id} save error: ${s.message}`,
|
|
4220
4232
|
success: !1
|
|
@@ -4225,7 +4237,7 @@ class Br {
|
|
|
4225
4237
|
try {
|
|
4226
4238
|
return localStorage.getObject(`${D.PRESENTATION}.${n.id}`);
|
|
4227
4239
|
} catch (s) {
|
|
4228
|
-
return console.warn("%capi",
|
|
4240
|
+
return console.warn("%capi", l.API, D.PRESENTATION, n.id, s), {
|
|
4229
4241
|
data: null,
|
|
4230
4242
|
message: `Slide ${n.id} load error: ${s.message}`,
|
|
4231
4243
|
success: !1
|
|
@@ -4240,7 +4252,7 @@ class Br {
|
|
|
4240
4252
|
success: !0
|
|
4241
4253
|
};
|
|
4242
4254
|
} catch (s) {
|
|
4243
|
-
return console.error("%cstorage",
|
|
4255
|
+
return console.error("%cstorage", l.STORAGE, D.PRESENTATION, n, s), {
|
|
4244
4256
|
data: null,
|
|
4245
4257
|
message: `Presentation ${n.data.id} save error: ${s.message}`,
|
|
4246
4258
|
success: !1
|
|
@@ -4251,7 +4263,7 @@ class Br {
|
|
|
4251
4263
|
try {
|
|
4252
4264
|
return localStorage.getObject(`${D.PREFERENCE}.${n.id}`);
|
|
4253
4265
|
} catch (s) {
|
|
4254
|
-
return console.warn("%capi",
|
|
4266
|
+
return console.warn("%capi", l.API, D.PREFERENCE, n.id, s), {
|
|
4255
4267
|
data: null,
|
|
4256
4268
|
message: `Preference ${n.id} load error: ${s.message}`,
|
|
4257
4269
|
success: !1
|
|
@@ -4271,7 +4283,7 @@ class Br {
|
|
|
4271
4283
|
} catch (s) {
|
|
4272
4284
|
return console.error(
|
|
4273
4285
|
"%cstorage",
|
|
4274
|
-
|
|
4286
|
+
l.STORAGE,
|
|
4275
4287
|
D.PREFERENCE,
|
|
4276
4288
|
n,
|
|
4277
4289
|
s
|
|
@@ -4301,7 +4313,7 @@ class Kr {
|
|
|
4301
4313
|
} catch (u) {
|
|
4302
4314
|
return console.warn(
|
|
4303
4315
|
"%capi",
|
|
4304
|
-
|
|
4316
|
+
l.API,
|
|
4305
4317
|
D.CLOUD,
|
|
4306
4318
|
n.slide,
|
|
4307
4319
|
n.widget,
|
|
@@ -4316,7 +4328,7 @@ class Kr {
|
|
|
4316
4328
|
} catch (u) {
|
|
4317
4329
|
return console.warn(
|
|
4318
4330
|
"%capi",
|
|
4319
|
-
|
|
4331
|
+
l.API,
|
|
4320
4332
|
D.SERIES,
|
|
4321
4333
|
n.slide,
|
|
4322
4334
|
n.widget,
|
|
@@ -4331,7 +4343,7 @@ class Kr {
|
|
|
4331
4343
|
} catch (u) {
|
|
4332
4344
|
return console.warn(
|
|
4333
4345
|
"%capi",
|
|
4334
|
-
|
|
4346
|
+
l.API,
|
|
4335
4347
|
D.MESSAGES,
|
|
4336
4348
|
n.slide,
|
|
4337
4349
|
n.widget,
|
|
@@ -4350,7 +4362,7 @@ class Kr {
|
|
|
4350
4362
|
try {
|
|
4351
4363
|
return sessionStorage.setObject(u, s), 201;
|
|
4352
4364
|
} catch (S) {
|
|
4353
|
-
return console.error("%cstorage",
|
|
4365
|
+
return console.error("%cstorage", l.STORAGE, D.CLOUD, n, S), 400;
|
|
4354
4366
|
}
|
|
4355
4367
|
});
|
|
4356
4368
|
/**
|
|
@@ -4364,7 +4376,7 @@ class Kr {
|
|
|
4364
4376
|
try {
|
|
4365
4377
|
return sessionStorage.setObject(u, s), 201;
|
|
4366
4378
|
} catch (S) {
|
|
4367
|
-
return console.error("%cstorage",
|
|
4379
|
+
return console.error("%cstorage", l.STORAGE, D.SERIES, n, S), 400;
|
|
4368
4380
|
}
|
|
4369
4381
|
});
|
|
4370
4382
|
/**
|
|
@@ -4378,7 +4390,7 @@ class Kr {
|
|
|
4378
4390
|
try {
|
|
4379
4391
|
return sessionStorage.setObject(u, s), 200;
|
|
4380
4392
|
} catch (S) {
|
|
4381
|
-
return console.error("%cstorage",
|
|
4393
|
+
return console.error("%cstorage", l.STORAGE, D.MESSAGES, n, S), 400;
|
|
4382
4394
|
}
|
|
4383
4395
|
});
|
|
4384
4396
|
_(this, "cleanMessages", async (n) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
@@ -4391,7 +4403,7 @@ class Kr {
|
|
|
4391
4403
|
try {
|
|
4392
4404
|
return sessionStorage.getObject(`${D.DASHBOARD}.${n.id}`);
|
|
4393
4405
|
} catch (s) {
|
|
4394
|
-
return console.warn("%capi",
|
|
4406
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4395
4407
|
data: null,
|
|
4396
4408
|
message: `Dashboard ${n.id} load error: ${s.message}`,
|
|
4397
4409
|
success: !1
|
|
@@ -4407,7 +4419,7 @@ class Kr {
|
|
|
4407
4419
|
success: !0
|
|
4408
4420
|
};
|
|
4409
4421
|
} catch (u) {
|
|
4410
|
-
return console.error("%cstorage",
|
|
4422
|
+
return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
|
|
4411
4423
|
data: null,
|
|
4412
4424
|
message: `Dashboard ${n.data.id} save error: ${u.message}`,
|
|
4413
4425
|
success: !1
|
|
@@ -4418,7 +4430,7 @@ class Kr {
|
|
|
4418
4430
|
try {
|
|
4419
4431
|
return sessionStorage.getObject(`${D.WIDGET}.${n.id}`);
|
|
4420
4432
|
} catch (s) {
|
|
4421
|
-
return console.warn("%capi",
|
|
4433
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4422
4434
|
data: null,
|
|
4423
4435
|
message: `Widget ${n.id} load error: ${s.message}`,
|
|
4424
4436
|
success: !1
|
|
@@ -4434,7 +4446,7 @@ class Kr {
|
|
|
4434
4446
|
success: !0
|
|
4435
4447
|
};
|
|
4436
4448
|
} catch (u) {
|
|
4437
|
-
return console.error("%cstorage",
|
|
4449
|
+
return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
|
|
4438
4450
|
data: null,
|
|
4439
4451
|
message: `Slide ${n.data.id} save error: ${u.message}`,
|
|
4440
4452
|
success: !1
|
|
@@ -4450,9 +4462,9 @@ class Kr {
|
|
|
4450
4462
|
(u) => u.widget === n.widget
|
|
4451
4463
|
).length || (console.debug(
|
|
4452
4464
|
"%cstorage%c %csubscribe",
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4465
|
+
l.STORAGE,
|
|
4466
|
+
l.NONE,
|
|
4467
|
+
l.SUBSCRIBE,
|
|
4456
4468
|
n.slide,
|
|
4457
4469
|
n.widget
|
|
4458
4470
|
), this.subscribers.push(n)), null));
|
|
@@ -4465,7 +4477,7 @@ class Kr {
|
|
|
4465
4477
|
try {
|
|
4466
4478
|
return sessionStorage.getObject(`${D.SLIDE}.${n.id}`);
|
|
4467
4479
|
} catch (s) {
|
|
4468
|
-
return console.warn("%capi",
|
|
4480
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4469
4481
|
data: null,
|
|
4470
4482
|
message: `Slide ${n.id} load error: ${s.message}`,
|
|
4471
4483
|
success: !1
|
|
@@ -4490,7 +4502,7 @@ class Kr {
|
|
|
4490
4502
|
success: !0
|
|
4491
4503
|
};
|
|
4492
4504
|
} catch (s) {
|
|
4493
|
-
return console.error("%cstorage",
|
|
4505
|
+
return console.error("%cstorage", l.STORAGE, D.SLIDE, n, s), {
|
|
4494
4506
|
data: null,
|
|
4495
4507
|
message: `Slide ${n.data.id} save error: ${s.message}`,
|
|
4496
4508
|
success: !1
|
|
@@ -4501,7 +4513,7 @@ class Kr {
|
|
|
4501
4513
|
try {
|
|
4502
4514
|
return sessionStorage.getObject(`${D.PRESENTATION}.${n.id}`);
|
|
4503
4515
|
} catch (s) {
|
|
4504
|
-
return console.warn("%capi",
|
|
4516
|
+
return console.warn("%capi", l.API, D.PRESENTATION, n.id, s), {
|
|
4505
4517
|
data: null,
|
|
4506
4518
|
message: `Slide ${n.id} load error: ${s.message}`,
|
|
4507
4519
|
success: !1
|
|
@@ -4516,7 +4528,7 @@ class Kr {
|
|
|
4516
4528
|
success: !0
|
|
4517
4529
|
};
|
|
4518
4530
|
} catch (s) {
|
|
4519
|
-
return console.error("%cstorage",
|
|
4531
|
+
return console.error("%cstorage", l.STORAGE, D.PRESENTATION, n, s), {
|
|
4520
4532
|
data: null,
|
|
4521
4533
|
message: `Presentation ${n.data.id} save error: ${s.message}`,
|
|
4522
4534
|
success: !1
|
|
@@ -4527,7 +4539,7 @@ class Kr {
|
|
|
4527
4539
|
try {
|
|
4528
4540
|
return sessionStorage.getObject(`${D.PREFERENCE}.${n.id}`);
|
|
4529
4541
|
} catch (s) {
|
|
4530
|
-
return console.warn("%capi",
|
|
4542
|
+
return console.warn("%capi", l.API, D.PREFERENCE, n.id, s), {
|
|
4531
4543
|
data: null,
|
|
4532
4544
|
message: `Preference ${n.id} load error: ${s.message}`,
|
|
4533
4545
|
success: !1
|
|
@@ -4547,7 +4559,7 @@ class Kr {
|
|
|
4547
4559
|
} catch (s) {
|
|
4548
4560
|
return console.error(
|
|
4549
4561
|
"%cstorage",
|
|
4550
|
-
|
|
4562
|
+
l.STORAGE,
|
|
4551
4563
|
D.PREFERENCE,
|
|
4552
4564
|
n,
|
|
4553
4565
|
s
|
|
@@ -4577,7 +4589,7 @@ class Lr {
|
|
|
4577
4589
|
} catch (u) {
|
|
4578
4590
|
return console.warn(
|
|
4579
4591
|
"%capi",
|
|
4580
|
-
|
|
4592
|
+
l.API,
|
|
4581
4593
|
D.CLOUD,
|
|
4582
4594
|
n.slide,
|
|
4583
4595
|
n.widget,
|
|
@@ -4592,7 +4604,7 @@ class Lr {
|
|
|
4592
4604
|
} catch (u) {
|
|
4593
4605
|
return console.warn(
|
|
4594
4606
|
"%capi",
|
|
4595
|
-
|
|
4607
|
+
l.API,
|
|
4596
4608
|
D.SERIES,
|
|
4597
4609
|
n.slide,
|
|
4598
4610
|
n.widget,
|
|
@@ -4607,7 +4619,7 @@ class Lr {
|
|
|
4607
4619
|
} catch (u) {
|
|
4608
4620
|
return console.warn(
|
|
4609
4621
|
"%capi",
|
|
4610
|
-
|
|
4622
|
+
l.API,
|
|
4611
4623
|
D.MESSAGES,
|
|
4612
4624
|
n.slide,
|
|
4613
4625
|
n.widget,
|
|
@@ -4626,7 +4638,7 @@ class Lr {
|
|
|
4626
4638
|
try {
|
|
4627
4639
|
return window.BuzzCasting.WidgetData[u] = s, 201;
|
|
4628
4640
|
} catch (S) {
|
|
4629
|
-
return console.error("%cstorage",
|
|
4641
|
+
return console.error("%cstorage", l.STORAGE, "set", n, S), 400;
|
|
4630
4642
|
}
|
|
4631
4643
|
});
|
|
4632
4644
|
/**
|
|
@@ -4640,7 +4652,7 @@ class Lr {
|
|
|
4640
4652
|
try {
|
|
4641
4653
|
return window.BuzzCasting.WidgetData[u] = s, 201;
|
|
4642
4654
|
} catch (S) {
|
|
4643
|
-
return console.error("%cstorage",
|
|
4655
|
+
return console.error("%cstorage", l.STORAGE, "set", n, S), 400;
|
|
4644
4656
|
}
|
|
4645
4657
|
});
|
|
4646
4658
|
/**
|
|
@@ -4654,7 +4666,7 @@ class Lr {
|
|
|
4654
4666
|
try {
|
|
4655
4667
|
return window.BuzzCasting.WidgetData[u] = s, 201;
|
|
4656
4668
|
} catch (S) {
|
|
4657
|
-
return console.error("%cstorage",
|
|
4669
|
+
return console.error("%cstorage", l.STORAGE, "set", n, S), 400;
|
|
4658
4670
|
}
|
|
4659
4671
|
});
|
|
4660
4672
|
_(this, "cleanMessages", async (n) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
@@ -4667,7 +4679,7 @@ class Lr {
|
|
|
4667
4679
|
try {
|
|
4668
4680
|
return window.BuzzCasting.DashboardData[n.id];
|
|
4669
4681
|
} catch (s) {
|
|
4670
|
-
return console.warn("%capi",
|
|
4682
|
+
return console.warn("%capi", l.API, D.DASHBOARD, n.id, s), {
|
|
4671
4683
|
data: null,
|
|
4672
4684
|
message: `Dashboard ${n.id} load error: ${s.message}`,
|
|
4673
4685
|
success: !1
|
|
@@ -4683,7 +4695,7 @@ class Lr {
|
|
|
4683
4695
|
success: !0
|
|
4684
4696
|
};
|
|
4685
4697
|
} catch (u) {
|
|
4686
|
-
return console.error("%cstorage",
|
|
4698
|
+
return console.error("%cstorage", l.STORAGE, D.DASHBOARD, n, u), {
|
|
4687
4699
|
data: null,
|
|
4688
4700
|
message: `Dashboard ${n.data.id} save error: ${u.message}`,
|
|
4689
4701
|
success: !1
|
|
@@ -4694,7 +4706,7 @@ class Lr {
|
|
|
4694
4706
|
try {
|
|
4695
4707
|
return window.BuzzCasting.WidgetData[n.id];
|
|
4696
4708
|
} catch (s) {
|
|
4697
|
-
return console.warn("%capi",
|
|
4709
|
+
return console.warn("%capi", l.API, D.WIDGET, n.id, s), {
|
|
4698
4710
|
data: null,
|
|
4699
4711
|
message: `Widget ${n.id} load error: ${s.message}`,
|
|
4700
4712
|
success: !1
|
|
@@ -4710,7 +4722,7 @@ class Lr {
|
|
|
4710
4722
|
success: !0
|
|
4711
4723
|
};
|
|
4712
4724
|
} catch (u) {
|
|
4713
|
-
return console.error("%cstorage",
|
|
4725
|
+
return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
|
|
4714
4726
|
data: null,
|
|
4715
4727
|
message: `Slide ${n.data.id} save error: ${u.message}`,
|
|
4716
4728
|
success: !1
|
|
@@ -4726,9 +4738,9 @@ class Lr {
|
|
|
4726
4738
|
(u) => u.widget === n.widget
|
|
4727
4739
|
).length || (console.debug(
|
|
4728
4740
|
"%cstorage%c %csubscribe",
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4741
|
+
l.STORAGE,
|
|
4742
|
+
l.NONE,
|
|
4743
|
+
l.SUBSCRIBE,
|
|
4732
4744
|
n.slide,
|
|
4733
4745
|
n.widget
|
|
4734
4746
|
), this.subscribers.push(n)), null));
|
|
@@ -4741,7 +4753,7 @@ class Lr {
|
|
|
4741
4753
|
try {
|
|
4742
4754
|
return window.BuzzCasting.SlideData[n.id];
|
|
4743
4755
|
} catch (s) {
|
|
4744
|
-
return console.warn("%capi",
|
|
4756
|
+
return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
|
|
4745
4757
|
data: null,
|
|
4746
4758
|
message: `Slide ${n.id} load error: ${s.message}`,
|
|
4747
4759
|
success: !1
|
|
@@ -4761,7 +4773,7 @@ class Lr {
|
|
|
4761
4773
|
success: !0
|
|
4762
4774
|
};
|
|
4763
4775
|
} catch (s) {
|
|
4764
|
-
return console.error("%cstorage",
|
|
4776
|
+
return console.error("%cstorage", l.STORAGE, D.SLIDE, n, s), {
|
|
4765
4777
|
data: null,
|
|
4766
4778
|
message: `Slide ${n.data.id} save error: ${s.message}`,
|
|
4767
4779
|
success: !1
|
|
@@ -4772,7 +4784,7 @@ class Lr {
|
|
|
4772
4784
|
try {
|
|
4773
4785
|
return window.BuzzCasting.PresentationData[n.id];
|
|
4774
4786
|
} catch (s) {
|
|
4775
|
-
return console.warn("%capi",
|
|
4787
|
+
return console.warn("%capi", l.API, D.PRESENTATION, n.id, s), {
|
|
4776
4788
|
data: null,
|
|
4777
4789
|
message: `Presentation ${n.id} load error: ${s.message}`,
|
|
4778
4790
|
success: !1
|
|
@@ -4787,7 +4799,7 @@ class Lr {
|
|
|
4787
4799
|
success: !0
|
|
4788
4800
|
};
|
|
4789
4801
|
} catch (s) {
|
|
4790
|
-
return console.error("%cstorage",
|
|
4802
|
+
return console.error("%cstorage", l.STORAGE, D.PRESENTATION, n, s), {
|
|
4791
4803
|
data: null,
|
|
4792
4804
|
message: `Presentation ${n.data.id} save error: ${s.message}`,
|
|
4793
4805
|
success: !1
|
|
@@ -4798,7 +4810,7 @@ class Lr {
|
|
|
4798
4810
|
try {
|
|
4799
4811
|
return window.BuzzCasting.Preferences[n.id];
|
|
4800
4812
|
} catch (s) {
|
|
4801
|
-
return console.warn("%capi",
|
|
4813
|
+
return console.warn("%capi", l.API, D.PREFERENCE, n.id, s), {
|
|
4802
4814
|
data: null,
|
|
4803
4815
|
message: `Preference ${n.id} load error: ${s.message}`,
|
|
4804
4816
|
success: !1
|
|
@@ -4815,7 +4827,7 @@ class Lr {
|
|
|
4815
4827
|
} catch (s) {
|
|
4816
4828
|
return console.error(
|
|
4817
4829
|
"%cstorage",
|
|
4818
|
-
|
|
4830
|
+
l.STORAGE,
|
|
4819
4831
|
D.PREFERENCE,
|
|
4820
4832
|
n,
|
|
4821
4833
|
s
|
|
@@ -4829,17 +4841,17 @@ class Lr {
|
|
|
4829
4841
|
this.options = n, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
4830
4842
|
}
|
|
4831
4843
|
}
|
|
4832
|
-
function Wa(
|
|
4833
|
-
const n =
|
|
4844
|
+
function Wa(d) {
|
|
4845
|
+
const n = d.toUpperCase().split(/[\s_-]+/);
|
|
4834
4846
|
return n.length > 0 ? (n.forEach((s, u) => {
|
|
4835
4847
|
n[u] = `${s.charAt(0)}.`;
|
|
4836
4848
|
}), n.join(" ")) : "";
|
|
4837
4849
|
}
|
|
4838
|
-
function Ua(
|
|
4850
|
+
function Ua(d) {
|
|
4839
4851
|
let n = "", s = "", u = {
|
|
4840
4852
|
backgroundImage: ""
|
|
4841
4853
|
};
|
|
4842
|
-
return typeof
|
|
4854
|
+
return typeof d.media < "u" && d.media.forEach((S) => {
|
|
4843
4855
|
(S.type === "photo" || S.type === "image") && (u = {
|
|
4844
4856
|
backgroundImage: `url(${S.url})`
|
|
4845
4857
|
}, s = S.url), S.type === "video" && (n = S.url);
|
|
@@ -4849,24 +4861,24 @@ function Ua(l) {
|
|
|
4849
4861
|
video: n
|
|
4850
4862
|
};
|
|
4851
4863
|
}
|
|
4852
|
-
function Na(
|
|
4864
|
+
function Na(d) {
|
|
4853
4865
|
const n = {};
|
|
4854
|
-
for (let s = 0; s <
|
|
4855
|
-
const u =
|
|
4866
|
+
for (let s = 0; s < d.length; s++) {
|
|
4867
|
+
const u = d.item(s);
|
|
4856
4868
|
u != null && u.name && (n[u.name] = u.value);
|
|
4857
4869
|
}
|
|
4858
4870
|
return n;
|
|
4859
4871
|
}
|
|
4860
|
-
function za(
|
|
4872
|
+
function za(d) {
|
|
4861
4873
|
const n = {};
|
|
4862
|
-
for (let s = 0; s <
|
|
4863
|
-
const u =
|
|
4874
|
+
for (let s = 0; s < d.length; s++) {
|
|
4875
|
+
const u = d[s];
|
|
4864
4876
|
u.name !== "class" && !u.name.includes("data") && (n[u.name] = u.value);
|
|
4865
4877
|
}
|
|
4866
4878
|
return n;
|
|
4867
4879
|
}
|
|
4868
|
-
function Ha(
|
|
4869
|
-
switch (
|
|
4880
|
+
function Ha(d, n) {
|
|
4881
|
+
switch (d) {
|
|
4870
4882
|
case "ax":
|
|
4871
4883
|
return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
|
|
4872
4884
|
case "bl":
|
|
@@ -4909,19 +4921,19 @@ function Ha(l, n) {
|
|
|
4909
4921
|
return "";
|
|
4910
4922
|
}
|
|
4911
4923
|
}
|
|
4912
|
-
function Ya(
|
|
4913
|
-
return
|
|
4924
|
+
function Ya(d) {
|
|
4925
|
+
return d.replace(/^\w|[A-Z]|\b\w/g, (n, s) => s === 0 ? n.toLowerCase() : n.toUpperCase()).replace(/\s+/g, "");
|
|
4914
4926
|
}
|
|
4915
|
-
function Qa(
|
|
4916
|
-
return
|
|
4927
|
+
function Qa(d) {
|
|
4928
|
+
return d.toLowerCase().split("-").reduce((n, s) => n + (s.charAt(0).toUpperCase() + s.slice(1)));
|
|
4917
4929
|
}
|
|
4918
|
-
const Xa = (
|
|
4919
|
-
function Ma(
|
|
4930
|
+
const Xa = (d) => d.charAt(0).toUpperCase() + d.slice(1);
|
|
4931
|
+
function Ma(d) {
|
|
4920
4932
|
const n = document.createRange();
|
|
4921
|
-
n.selectNodeContents(
|
|
4933
|
+
n.selectNodeContents(d), n.deleteContents();
|
|
4922
4934
|
}
|
|
4923
|
-
function ja(
|
|
4924
|
-
|
|
4935
|
+
function ja(d) {
|
|
4936
|
+
d.reduce(
|
|
4925
4937
|
(n, s) => Object.keys(s).reduce(
|
|
4926
4938
|
(u, S) => ({
|
|
4927
4939
|
...u,
|
|
@@ -4932,31 +4944,31 @@ function ja(l) {
|
|
|
4932
4944
|
{}
|
|
4933
4945
|
);
|
|
4934
4946
|
}
|
|
4935
|
-
function Ja(
|
|
4936
|
-
return `${(
|
|
4947
|
+
function Ja(d, n = "font-bold") {
|
|
4948
|
+
return `${(d == null ? void 0 : d.title.length) > 0 ? `<div class="${n}">${d.title}</div>` : ""}${d != null && d.content ? d.content.replace(/\n\n/g, `
|
|
4937
4949
|
`).replace(/\n/g, "<br/>") : ""}`;
|
|
4938
4950
|
}
|
|
4939
|
-
function Ba(
|
|
4940
|
-
for (;
|
|
4941
|
-
|
|
4942
|
-
return
|
|
4951
|
+
function Ba(d, n) {
|
|
4952
|
+
for (; d.length < n; )
|
|
4953
|
+
d = `0${d}`;
|
|
4954
|
+
return d;
|
|
4943
4955
|
}
|
|
4944
|
-
function Oe(
|
|
4956
|
+
function Oe(d, n) {
|
|
4945
4957
|
let s, u, S;
|
|
4946
4958
|
if (n.length === 0)
|
|
4947
|
-
return
|
|
4959
|
+
return d;
|
|
4948
4960
|
for (s = 0, S = n.length; s < S; s++)
|
|
4949
|
-
u = n.charCodeAt(s),
|
|
4950
|
-
return
|
|
4961
|
+
u = n.charCodeAt(s), d = (d << 5) - d + u, d |= 0;
|
|
4962
|
+
return d < 0 ? d * -2 : d;
|
|
4951
4963
|
}
|
|
4952
|
-
function Ka(
|
|
4953
|
-
return Object.keys(n).sort().reduce(u,
|
|
4964
|
+
function Ka(d, n, s) {
|
|
4965
|
+
return Object.keys(n).sort().reduce(u, d);
|
|
4954
4966
|
function u(S, k) {
|
|
4955
4967
|
return Gr(S, n[k], k, s);
|
|
4956
4968
|
}
|
|
4957
4969
|
}
|
|
4958
|
-
function Gr(
|
|
4959
|
-
const S = Oe(Oe(Oe(
|
|
4970
|
+
function Gr(d, n, s, u) {
|
|
4971
|
+
const S = Oe(Oe(Oe(d, s), La(n)), typeof n);
|
|
4960
4972
|
if (n === null)
|
|
4961
4973
|
return Oe(S, "null");
|
|
4962
4974
|
if (n === void 0)
|
|
@@ -4976,15 +4988,15 @@ function Gr(l, n, s, u) {
|
|
|
4976
4988
|
}
|
|
4977
4989
|
return Oe(S, n.toString());
|
|
4978
4990
|
}
|
|
4979
|
-
function La(
|
|
4980
|
-
return Object.prototype.toString.call(
|
|
4991
|
+
function La(d) {
|
|
4992
|
+
return Object.prototype.toString.call(d);
|
|
4981
4993
|
}
|
|
4982
|
-
function Wn(
|
|
4983
|
-
return Ba(Gr(0,
|
|
4994
|
+
function Wn(d) {
|
|
4995
|
+
return Ba(Gr(0, d, "", []).toString(16), 8);
|
|
4984
4996
|
}
|
|
4985
|
-
function Za(
|
|
4986
|
-
if (
|
|
4987
|
-
return
|
|
4997
|
+
function Za(d, n) {
|
|
4998
|
+
if (d = d.toString().replace(/[^0-9.]/g, ""), d < 1e3)
|
|
4999
|
+
return d;
|
|
4988
5000
|
const s = [
|
|
4989
5001
|
{ v: 1e3, s: "K" },
|
|
4990
5002
|
{ v: 1e6, s: "M" },
|
|
@@ -4994,11 +5006,11 @@ function Za(l, n) {
|
|
|
4994
5006
|
{ v: 1e18, s: "E" }
|
|
4995
5007
|
];
|
|
4996
5008
|
let u;
|
|
4997
|
-
for (u = s.length - 1; u > 0 && !(
|
|
5009
|
+
for (u = s.length - 1; u > 0 && !(d >= s[u].v); u--)
|
|
4998
5010
|
;
|
|
4999
|
-
return (
|
|
5011
|
+
return (d / s[u].v).toFixed(n).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1") + s[u].s;
|
|
5000
5012
|
}
|
|
5001
|
-
function Va(
|
|
5013
|
+
function Va(d, n) {
|
|
5002
5014
|
const s = [
|
|
5003
5015
|
{ value: 1, symbol: "" },
|
|
5004
5016
|
{ value: 1e3, symbol: "K" },
|
|
@@ -5009,12 +5021,12 @@ function Va(l, n) {
|
|
|
5009
5021
|
{ value: 1e18, symbol: "E" }
|
|
5010
5022
|
], u = /\.0+$|(\.\d*[1-9])0+$/;
|
|
5011
5023
|
let S;
|
|
5012
|
-
for (S = s.length - 1; S > 0 && !(
|
|
5024
|
+
for (S = s.length - 1; S > 0 && !(d >= s[S].value); S--)
|
|
5013
5025
|
;
|
|
5014
|
-
return (
|
|
5026
|
+
return (d / s[S].value).toFixed(n).replace(u, "$1") + s[S].symbol;
|
|
5015
5027
|
}
|
|
5016
|
-
function qa(
|
|
5017
|
-
switch (
|
|
5028
|
+
function qa(d) {
|
|
5029
|
+
switch (d.language) {
|
|
5018
5030
|
case "ar":
|
|
5019
5031
|
return {
|
|
5020
5032
|
direction: "rtl",
|
|
@@ -5024,9 +5036,9 @@ function qa(l) {
|
|
|
5024
5036
|
return {};
|
|
5025
5037
|
}
|
|
5026
5038
|
}
|
|
5027
|
-
function es(
|
|
5039
|
+
function es(d) {
|
|
5028
5040
|
const n = window.BuzzCasting.getOptions().suspended ?? !1;
|
|
5029
|
-
return
|
|
5041
|
+
return d.forEach((s) => {
|
|
5030
5042
|
var u;
|
|
5031
5043
|
if (n ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((u = s.content) == null ? void 0 : u.replace(
|
|
5032
5044
|
/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
|
|
@@ -5063,16 +5075,16 @@ function es(l) {
|
|
|
5063
5075
|
const S = new URL(s.link);
|
|
5064
5076
|
s.sender.title = S.hostname.replace("www.", "");
|
|
5065
5077
|
}
|
|
5066
|
-
}),
|
|
5078
|
+
}), d;
|
|
5067
5079
|
}
|
|
5068
|
-
function ts(
|
|
5069
|
-
|
|
5080
|
+
function ts(d, n, s, u) {
|
|
5081
|
+
d.stopPropagation(), n.showModal({
|
|
5070
5082
|
showComponent: "card-modal",
|
|
5071
5083
|
props: { data: s, options: u }
|
|
5072
5084
|
});
|
|
5073
5085
|
}
|
|
5074
|
-
function ns(
|
|
5075
|
-
const n = [...
|
|
5086
|
+
function ns(d) {
|
|
5087
|
+
const n = [...d];
|
|
5076
5088
|
for (let s = n.length - 1; s > 0; s--) {
|
|
5077
5089
|
const u = Math.floor(Math.random() * (s + 1));
|
|
5078
5090
|
[n[s], n[u]] = [n[u], n[s]];
|
|
@@ -5080,19 +5092,19 @@ function ns(l) {
|
|
|
5080
5092
|
return n;
|
|
5081
5093
|
}
|
|
5082
5094
|
function rs() {
|
|
5083
|
-
let
|
|
5095
|
+
let d = "";
|
|
5084
5096
|
const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
5085
|
-
for (let s = 0; s < 7; s++)
|
|
5086
|
-
return
|
|
5097
|
+
for (let s = 0; s < 7; s++) d += n.charAt(Math.floor(Math.random() * n.length));
|
|
5098
|
+
return d;
|
|
5087
5099
|
}
|
|
5088
|
-
function as(
|
|
5089
|
-
return
|
|
5100
|
+
function as(d) {
|
|
5101
|
+
return d[Math.floor(Math.random() * d.length)];
|
|
5090
5102
|
}
|
|
5091
|
-
const ss = (
|
|
5103
|
+
const ss = (d) => {
|
|
5092
5104
|
switch (!0) {
|
|
5093
|
-
case
|
|
5105
|
+
case d < 0:
|
|
5094
5106
|
return "text-down text-xs";
|
|
5095
|
-
case
|
|
5107
|
+
case d > 0:
|
|
5096
5108
|
return "text-up text-xs";
|
|
5097
5109
|
default:
|
|
5098
5110
|
return "text-white text-xs";
|
|
@@ -5132,17 +5144,17 @@ class is {
|
|
|
5132
5144
|
), j.data.messages = te, ie = Wn(j.data.messages), J.hash === ie)
|
|
5133
5145
|
return console.info(
|
|
5134
5146
|
"%capi%c %cno updates",
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5147
|
+
l.API,
|
|
5148
|
+
l.NONE,
|
|
5149
|
+
l.NO_UPDATES,
|
|
5138
5150
|
D.MESSAGES,
|
|
5139
5151
|
j.query.slide,
|
|
5140
5152
|
j.query.widget
|
|
5141
5153
|
), console.debug(
|
|
5142
5154
|
"%capi%c %cno updates",
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5155
|
+
l.API,
|
|
5156
|
+
l.NONE,
|
|
5157
|
+
l.NO_UPDATES,
|
|
5146
5158
|
D.MESSAGES,
|
|
5147
5159
|
j
|
|
5148
5160
|
), 204;
|
|
@@ -5151,17 +5163,17 @@ class is {
|
|
|
5151
5163
|
case D.CLOUD:
|
|
5152
5164
|
ie = Wn(j.data), J.hash === ie ? (console.info(
|
|
5153
5165
|
"%capi%c %cno updates",
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5166
|
+
l.API,
|
|
5167
|
+
l.NONE,
|
|
5168
|
+
l.NO_UPDATES,
|
|
5157
5169
|
D.CLOUD,
|
|
5158
5170
|
j.query.slide,
|
|
5159
5171
|
j.query.widget
|
|
5160
5172
|
), console.debug(
|
|
5161
5173
|
"%capi%c %cno updates",
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5174
|
+
l.API,
|
|
5175
|
+
l.NONE,
|
|
5176
|
+
l.NO_UPDATES,
|
|
5165
5177
|
D.CLOUD,
|
|
5166
5178
|
j
|
|
5167
5179
|
), F = 204) : (J.hash = ie, M = {
|
|
@@ -5182,17 +5194,17 @@ class is {
|
|
|
5182
5194
|
case D.SERIES:
|
|
5183
5195
|
ie = Wn(j.data), J.hash === ie ? (console.info(
|
|
5184
5196
|
"%capi%c %cno updates",
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5197
|
+
l.API,
|
|
5198
|
+
l.NONE,
|
|
5199
|
+
l.NO_UPDATES,
|
|
5188
5200
|
D.SERIES,
|
|
5189
5201
|
j.query.slide,
|
|
5190
5202
|
j.query.widget
|
|
5191
5203
|
), console.debug(
|
|
5192
5204
|
"%capi%c %cno updates",
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5205
|
+
l.API,
|
|
5206
|
+
l.NONE,
|
|
5207
|
+
l.NO_UPDATES,
|
|
5196
5208
|
D.SERIES,
|
|
5197
5209
|
j
|
|
5198
5210
|
), F = 204) : (J.hash = ie, M = {
|
|
@@ -5213,83 +5225,78 @@ class is {
|
|
|
5213
5225
|
default:
|
|
5214
5226
|
console.warn(
|
|
5215
5227
|
"%capi%c %cstorage",
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5228
|
+
l.API,
|
|
5229
|
+
l.NONE,
|
|
5230
|
+
l.STORAGE,
|
|
5219
5231
|
"error",
|
|
5220
5232
|
`data type ${j.query.type} unknown`
|
|
5221
5233
|
);
|
|
5222
5234
|
}
|
|
5223
5235
|
} else
|
|
5224
5236
|
F = 401;
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
j
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
j.query.slide,
|
|
5282
|
-
j.data.title ?? j.query.widget
|
|
5283
|
-
);
|
|
5284
|
-
break;
|
|
5285
|
-
}
|
|
5237
|
+
switch (F) {
|
|
5238
|
+
case 201:
|
|
5239
|
+
console.info(
|
|
5240
|
+
"%capp%c %cbroadcast",
|
|
5241
|
+
l.API,
|
|
5242
|
+
l.NONE,
|
|
5243
|
+
l.BROADCAST,
|
|
5244
|
+
j.query.slide,
|
|
5245
|
+
j.data.title ?? j.query.widget
|
|
5246
|
+
), console.debug(
|
|
5247
|
+
"%capp%c %cbroadcast",
|
|
5248
|
+
l.API,
|
|
5249
|
+
l.NONE,
|
|
5250
|
+
l.BROADCAST,
|
|
5251
|
+
j
|
|
5252
|
+
);
|
|
5253
|
+
const J = structuredClone(M.query);
|
|
5254
|
+
switch (j.query.type) {
|
|
5255
|
+
case "messages":
|
|
5256
|
+
j = await this.sm.getMessages(J);
|
|
5257
|
+
break;
|
|
5258
|
+
case "cloud":
|
|
5259
|
+
j = await this.sm.getCloud(J), j && (j.query = J);
|
|
5260
|
+
break;
|
|
5261
|
+
case "series":
|
|
5262
|
+
j = await this.sm.getSeries(J), j && (j.query = J);
|
|
5263
|
+
break;
|
|
5264
|
+
default:
|
|
5265
|
+
console.warn(
|
|
5266
|
+
"%capp%c %cbroadcast",
|
|
5267
|
+
l.API,
|
|
5268
|
+
l.NONE,
|
|
5269
|
+
l.BROADCAST,
|
|
5270
|
+
"Unhandled data type",
|
|
5271
|
+
j.query
|
|
5272
|
+
);
|
|
5273
|
+
}
|
|
5274
|
+
j && this.bc.postMessage({
|
|
5275
|
+
event: q.WIDGET_UPDATE,
|
|
5276
|
+
data: j.data
|
|
5277
|
+
});
|
|
5278
|
+
break;
|
|
5279
|
+
case 204:
|
|
5280
|
+
break;
|
|
5281
|
+
default:
|
|
5282
|
+
console.warn(
|
|
5283
|
+
"%capp%c %cbroadcast",
|
|
5284
|
+
l.API,
|
|
5285
|
+
l.NONE,
|
|
5286
|
+
l.BROADCAST,
|
|
5287
|
+
"Fetch error",
|
|
5288
|
+
j.query.slide,
|
|
5289
|
+
j.data.title ?? j.query.widget
|
|
5290
|
+
);
|
|
5291
|
+
break;
|
|
5292
|
+
}
|
|
5286
5293
|
return F;
|
|
5287
5294
|
} else
|
|
5288
5295
|
return console.warn(
|
|
5289
5296
|
"%capi%c %cstorage",
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5297
|
+
l.API,
|
|
5298
|
+
l.NONE,
|
|
5299
|
+
l.STORAGE,
|
|
5293
5300
|
q.ERROR,
|
|
5294
5301
|
k.status
|
|
5295
5302
|
), 400;
|
|
@@ -5308,9 +5315,9 @@ class is {
|
|
|
5308
5315
|
case q.UPDATE:
|
|
5309
5316
|
console.debug(
|
|
5310
5317
|
"%capi%c %cstorage",
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5318
|
+
l.API,
|
|
5319
|
+
l.NONE,
|
|
5320
|
+
l.STORAGE,
|
|
5314
5321
|
q.UPDATE,
|
|
5315
5322
|
n.data
|
|
5316
5323
|
), await this.update();
|
|
@@ -5322,9 +5329,9 @@ class is {
|
|
|
5322
5329
|
if ((u = this.options) != null && u.suspended) {
|
|
5323
5330
|
console.info(
|
|
5324
5331
|
"%cstorage%c %cstorage",
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5332
|
+
l.STORAGE,
|
|
5333
|
+
l.NONE,
|
|
5334
|
+
l.MESSAGES,
|
|
5328
5335
|
"Account suspended"
|
|
5329
5336
|
);
|
|
5330
5337
|
return;
|
|
@@ -5334,9 +5341,9 @@ class is {
|
|
|
5334
5341
|
));
|
|
5335
5342
|
console.info(
|
|
5336
5343
|
"%cstorage%c %cstorage",
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5344
|
+
l.STORAGE,
|
|
5345
|
+
l.NONE,
|
|
5346
|
+
l.MESSAGES,
|
|
5340
5347
|
`${s} messages deleted`
|
|
5341
5348
|
);
|
|
5342
5349
|
});
|
|
@@ -5345,9 +5352,9 @@ class is {
|
|
|
5345
5352
|
const s = await ((u = this.sm) == null ? void 0 : u.hideMessage(n.id, 0));
|
|
5346
5353
|
return console.info(
|
|
5347
5354
|
"%cstorage%c %cstorage",
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5355
|
+
l.STORAGE,
|
|
5356
|
+
l.NONE,
|
|
5357
|
+
l.HIDE,
|
|
5351
5358
|
`${s} messages hidden`
|
|
5352
5359
|
), await this.api.hideMessage(n);
|
|
5353
5360
|
});
|
|
@@ -5405,9 +5412,9 @@ class is {
|
|
|
5405
5412
|
});
|
|
5406
5413
|
console.info(
|
|
5407
5414
|
"%cstorage%c %cslide",
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5415
|
+
l.STORAGE,
|
|
5416
|
+
l.NONE,
|
|
5417
|
+
l.SLIDE,
|
|
5411
5418
|
n.slide,
|
|
5412
5419
|
q.VERSION,
|
|
5413
5420
|
Da
|
|
@@ -5415,9 +5422,9 @@ class is {
|
|
|
5415
5422
|
const s = (n == null ? void 0 : n.slide) || n.app;
|
|
5416
5423
|
switch (this.bc = new BroadcastChannel(s), console.info(
|
|
5417
5424
|
"%capi%c %cbroadcast",
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5425
|
+
l.API,
|
|
5426
|
+
l.NONE,
|
|
5427
|
+
l.BROADCAST,
|
|
5421
5428
|
q.CHANNEL,
|
|
5422
5429
|
s
|
|
5423
5430
|
), this.bc.onmessage = (u) => {
|
|
@@ -5453,9 +5460,9 @@ class Ga {
|
|
|
5453
5460
|
var s;
|
|
5454
5461
|
return n.type !== D.CLOUD ? (console.warn(
|
|
5455
5462
|
"%capp%c %get",
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5463
|
+
l.APP,
|
|
5464
|
+
l.NONE,
|
|
5465
|
+
l.GET_DATA,
|
|
5459
5466
|
n.widget,
|
|
5460
5467
|
"wrong method call for getMessages, type used is",
|
|
5461
5468
|
n.type
|
|
@@ -5474,9 +5481,9 @@ class Ga {
|
|
|
5474
5481
|
var s;
|
|
5475
5482
|
return n.type !== D.MESSAGES ? (console.warn(
|
|
5476
5483
|
"%capp%c %get",
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5484
|
+
l.APP,
|
|
5485
|
+
l.NONE,
|
|
5486
|
+
l.GET_DATA,
|
|
5480
5487
|
n.widget,
|
|
5481
5488
|
"wrong method call for getMessages, type used is",
|
|
5482
5489
|
n.type
|
|
@@ -5495,9 +5502,9 @@ class Ga {
|
|
|
5495
5502
|
var s;
|
|
5496
5503
|
return n.type !== D.SERIES ? (console.warn(
|
|
5497
5504
|
"%capp%c %get",
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5505
|
+
l.APP,
|
|
5506
|
+
l.NONE,
|
|
5507
|
+
l.GET_DATA,
|
|
5501
5508
|
n.widget,
|
|
5502
5509
|
"wrong method call for getMessages, type used is",
|
|
5503
5510
|
n.type
|
|
@@ -5567,12 +5574,18 @@ class os {
|
|
|
5567
5574
|
*/
|
|
5568
5575
|
_(this, "getCloud", async () => this.query.type !== D.CLOUD ? (console.warn(
|
|
5569
5576
|
"%cstorage%c %cwidget",
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5577
|
+
l.STORAGE,
|
|
5578
|
+
l.NONE,
|
|
5579
|
+
l.WIDGET,
|
|
5573
5580
|
this.query.widget,
|
|
5574
5581
|
"Wrong method call for getCloud, expected type is",
|
|
5575
5582
|
this.query.type
|
|
5583
|
+
), console.debug(
|
|
5584
|
+
"%cstorage%c %cwidget",
|
|
5585
|
+
l.API,
|
|
5586
|
+
l.NONE,
|
|
5587
|
+
l.CLOUD,
|
|
5588
|
+
this.query
|
|
5576
5589
|
), {
|
|
5577
5590
|
data: null,
|
|
5578
5591
|
message: `wrong method call for getCloud, expected type is '${this.query.type}'`,
|
|
@@ -5585,9 +5598,9 @@ class os {
|
|
|
5585
5598
|
*/
|
|
5586
5599
|
_(this, "getMessages", async () => this.query.type !== D.MESSAGES ? (console.warn(
|
|
5587
5600
|
"%cstorage%c %cwidget",
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5601
|
+
l.STORAGE,
|
|
5602
|
+
l.NONE,
|
|
5603
|
+
l.WIDGET,
|
|
5591
5604
|
this.query.widget,
|
|
5592
5605
|
"Wrong method call for getMessages, expected type is",
|
|
5593
5606
|
this.query.type
|
|
@@ -5597,9 +5610,9 @@ class os {
|
|
|
5597
5610
|
success: !1
|
|
5598
5611
|
}) : (console.debug(
|
|
5599
5612
|
"%cstorage%c %cwidget",
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5613
|
+
l.API,
|
|
5614
|
+
l.NONE,
|
|
5615
|
+
l.MESSAGES,
|
|
5603
5616
|
this.query
|
|
5604
5617
|
), await this.storageReader.getMessages(this.query)));
|
|
5605
5618
|
/**
|
|
@@ -5609,12 +5622,18 @@ class os {
|
|
|
5609
5622
|
*/
|
|
5610
5623
|
_(this, "getSeries", async () => this.query.type !== D.SERIES ? (console.warn(
|
|
5611
5624
|
"%cstorage%c %cwidget",
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5625
|
+
l.STORAGE,
|
|
5626
|
+
l.NONE,
|
|
5627
|
+
l.WIDGET,
|
|
5615
5628
|
this.query.widget,
|
|
5616
5629
|
"Wrong method call for getSeries, expected type is",
|
|
5617
5630
|
this.query.type
|
|
5631
|
+
), console.debug(
|
|
5632
|
+
"%cstorage%c %cwidget",
|
|
5633
|
+
l.API,
|
|
5634
|
+
l.NONE,
|
|
5635
|
+
l.MESSAGES,
|
|
5636
|
+
this.query
|
|
5618
5637
|
), {
|
|
5619
5638
|
data: null,
|
|
5620
5639
|
message: `wrong method call for getSeries, expected type is '${this.query.type}'`,
|
|
@@ -5629,7 +5648,7 @@ class os {
|
|
|
5629
5648
|
_(this, "showModal", (n) => {
|
|
5630
5649
|
console.debug(
|
|
5631
5650
|
"%cwidget",
|
|
5632
|
-
|
|
5651
|
+
l.WIDGET,
|
|
5633
5652
|
q.SHOW_MODAL,
|
|
5634
5653
|
n.showComponent,
|
|
5635
5654
|
// @ts-ignore
|
|
@@ -5685,16 +5704,16 @@ class os {
|
|
|
5685
5704
|
subscribe() {
|
|
5686
5705
|
console.info(
|
|
5687
5706
|
"%cwidget%c %csubscribe",
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5707
|
+
l.WIDGET,
|
|
5708
|
+
l.NONE,
|
|
5709
|
+
l.SUBSCRIBE,
|
|
5691
5710
|
this.query.slide,
|
|
5692
5711
|
this.query.widget
|
|
5693
5712
|
), console.debug(
|
|
5694
5713
|
"%cwidget%c %csubscribe",
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5714
|
+
l.WIDGET,
|
|
5715
|
+
l.NONE,
|
|
5716
|
+
l.SUBSCRIBE,
|
|
5698
5717
|
this.query
|
|
5699
5718
|
), this.broadcastChannel.postMessage({
|
|
5700
5719
|
event: q.SUBSCRIBE,
|
|
@@ -5709,7 +5728,7 @@ export {
|
|
|
5709
5728
|
D as API,
|
|
5710
5729
|
is as BuzzcastingStorageManager,
|
|
5711
5730
|
Ga as BuzzcastingStorageReader,
|
|
5712
|
-
|
|
5731
|
+
l as CSS,
|
|
5713
5732
|
q as EVENTS,
|
|
5714
5733
|
Vt as MODERATION,
|
|
5715
5734
|
me as STORAGE,
|