buzzcasting-storage 3.5.6 → 3.5.8
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 +476 -459
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Aa = Object.defineProperty;
|
|
2
2
|
var Pa = (l, n, s) => n in l ? Aa(l, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[n] = s;
|
|
3
3
|
var _ = (l, n, s) => Pa(l, typeof n != "symbol" ? n + "" : n, s);
|
|
4
|
-
var D = /* @__PURE__ */ ((l) => (l.MESSAGES = "messages", l.CLOUD = "cloud", l.SERIES = "series", l.TOPICS = "topics", l.WIDGET = "widget", l.WIDGETS = "widgets", l.DASHBOARD = "dashboard", l.DASHBOARDS = "dashboards", l.SLIDE = "slide", l.SLIDES = "slides", l.PRESENTATION = "presentation", l.PRESENTATIONS = "presentations", l.PREFERENCE = "preference", l.PREFERENCES = "preferences", l))(D || {}),
|
|
5
|
-
const Da = "3.5.
|
|
4
|
+
var D = /* @__PURE__ */ ((l) => (l.MESSAGES = "messages", l.CLOUD = "cloud", l.SERIES = "series", l.TOPICS = "topics", l.WIDGET = "widget", l.WIDGETS = "widgets", l.DASHBOARD = "dashboard", l.DASHBOARDS = "dashboards", l.SLIDE = "slide", l.SLIDES = "slides", l.PRESENTATION = "presentation", l.PRESENTATIONS = "presentations", l.PREFERENCE = "preference", l.PREFERENCES = "preferences", l))(D || {}), d = /* @__PURE__ */ ((l) => (l.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", l.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", l.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", l.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", l.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", l.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", l.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", l.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", l.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", l.NONE = "color:transparent;background-color:transparent;", l.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", l.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", l.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", l.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", l.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", l.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", l.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", l))(d || {}), q = /* @__PURE__ */ ((l) => (l.ADD_SLIDE = "addSlide", l.APP_READY = "appReady", l.API_UPDATE = "apiUpdate", l.WS_API_REQUEST = "wsApiRequest", l.WS_API_RESPONSE = "wsApiResponse", l.WS_API_UPDATE = "wsApiRUpdate", l.APPROVE_MESSAGE = "approveMessage", l.CHANNEL = "channel", l.CLEAN_MESSAGES = "cleanMessages", l.CLOSE_MODAL = "closeModal", l.CLOSE_BUILDER_MODAL = "closeBuilderModal", l.DASHBOARD_LOAD = "loadDashboard", l.DASHBOARD_STORE = "storeDashboard", l.ERROR = "error", l.HIDE_MESSAGE = "hideMessage", l.HIDE_LABELS = "hideLabels", l.MAUPPUT_UPDATE = "layoutUpdate", l.PAUSE_PRESENTATION = "pausePresentation", l.PRESENTATION_READY = "presentationReady", l.PREV_SLIDE = "prevSlide", l.RELOAD_PRESENTATION = "reloadPresentation", l.SHOW_MODAL = "showModal", l.STAR_MESSAGE = "starMessage", l.GOTO_SLIDE = "gotoSlide", l.NEXT_SLIDE = "nextSlide", l.PREFERENCE_LOAD = "loadPreference", l.PREFERENCE_STORE = "storePreference", l.PRESENTATION_LOAD = "loadPresentation", l.PRESENTATION_STORE = "storePresentation", l.SHOW_BUILDER_MODAL = "showBuilderModal", l.SLIDE_DID_LOAD = "slideDidLoad", l.SLIDE_GOTO = "slideGoto", l.SLIDE_READY = "slideReady", l.SLIDE_LOAD = "loadSlide", l.SLIDE_STORE = "storeSlide", l.SLIDE_TRANSITIONER = "slideTransitioner", l.START_TRANSITIONER = "startTransitioner", l.STORAGE_INIT = "storageInit", l.SUBSCRIBE = "subscribe", l.SUSPEND_ACCOUNT = "suspendAccount", l.SWITCH_PRESENTATION = "switchPresentation", l.REMOVE_CLOUD = "removeCloud", l.UPDATE = "update", l.VERSION = "version", l.WIDGET_LOAD = "widgetLoad", l.WIDGET_STORE = "widgetStore", l.WIDGET_UPDATE = "widgetUpdate", l))(q || {}), Vt = /* @__PURE__ */ ((l) => (l.APPROVED = "approved", l.BEFORE = "before", l.DELAYED = "delayed", l.NONE = "none", l.REALTIME = "realtime", l))(Vt || {}), me = /* @__PURE__ */ ((l) => (l.KEYVAL = "keyval", l.LOCAL = "local", l.SESSION = "session", l.DEXIE = "dexie", l.WINDOW = "window", l))(me || {});
|
|
5
|
+
const Da = "3.5.7";
|
|
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
|
+
d.API,
|
|
41
|
+
d.NONE,
|
|
42
|
+
d.GET_DATA,
|
|
43
43
|
n.widget
|
|
44
|
-
), console.debug("%capi%c %cfetch",
|
|
44
|
+
), console.debug("%capi%c %cfetch", d.API, d.NONE, d.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
|
+
d.API,
|
|
58
|
+
d.NONE,
|
|
59
|
+
d.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
|
+
d.API,
|
|
79
|
+
d.NONE,
|
|
80
|
+
d.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
|
+
d.API,
|
|
98
|
+
d.NONE,
|
|
99
|
+
d.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
|
+
d.API,
|
|
124
|
+
d.NONE,
|
|
125
|
+
d.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
|
+
d.API,
|
|
142
|
+
d.NONE,
|
|
143
|
+
d.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", d.API, d.NONE, d.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
|
+
d.API,
|
|
179
|
+
d.NONE,
|
|
180
|
+
d.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
|
+
d.API,
|
|
198
|
+
d.NONE,
|
|
199
|
+
d.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
|
+
d.API,
|
|
215
|
+
d.NONE,
|
|
216
|
+
d.SLIDE,
|
|
217
217
|
n.id
|
|
218
218
|
), await fetch(
|
|
219
219
|
[this.url, "api", s, D.WIDGETS, n.id].join("/"),
|
|
@@ -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
|
};
|
|
@@ -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
|
+
d.API,
|
|
3292
|
+
d.NONE,
|
|
3293
|
+
d.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
|
+
d.STORAGE,
|
|
3301
|
+
d.NONE,
|
|
3302
|
+
d.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
|
+
d.API,
|
|
3316
|
+
d.NONE,
|
|
3317
|
+
d.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
|
+
d.STORAGE,
|
|
3325
|
+
d.NONE,
|
|
3326
|
+
d.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
|
+
d.STORAGE,
|
|
3360
|
+
d.NONE,
|
|
3361
|
+
d.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
|
+
d.STORAGE,
|
|
3369
|
+
d.NONE,
|
|
3370
|
+
d.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", d.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", d.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
|
+
d.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
|
+
d.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
|
+
d.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
|
+
d.STORAGE,
|
|
3470
|
+
d.NONE,
|
|
3471
|
+
d.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
|
+
d.STORAGE,
|
|
3476
|
+
d.NONE,
|
|
3477
|
+
d.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
|
+
d.STORAGE,
|
|
3485
|
+
d.NONE,
|
|
3486
|
+
d.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", d.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
|
+
d.STORAGE,
|
|
3503
3515
|
D.WIDGET,
|
|
3504
3516
|
n,
|
|
3505
3517
|
s.message
|
|
@@ -3510,7 +3522,7 @@ 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", d.STORAGE, q.WIDGET_LOAD, n.id);
|
|
3514
3526
|
});
|
|
3515
3527
|
return s === void 0 ? {
|
|
3516
3528
|
data: null,
|
|
@@ -3554,7 +3566,7 @@ class Nr {
|
|
|
3554
3566
|
success: !0
|
|
3555
3567
|
})).catch((s) => (console.error(
|
|
3556
3568
|
"%cstorage",
|
|
3557
|
-
|
|
3569
|
+
d.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
|
+
d.STORAGE,
|
|
3588
|
+
d.NONE,
|
|
3589
|
+
d.SUBSCRIBE,
|
|
3578
3590
|
n.slide,
|
|
3579
3591
|
n.widget
|
|
3580
3592
|
), console.debug(
|
|
3581
3593
|
"%cstorage%c %csubscribe",
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3594
|
+
d.STORAGE,
|
|
3595
|
+
d.NONE,
|
|
3596
|
+
d.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", d.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
|
+
d.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
|
+
d.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
|
+
d.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
|
+
d.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
|
+
d.STORAGE,
|
|
3715
3727
|
q.PREFERENCE_STORE,
|
|
3716
3728
|
n,
|
|
3717
3729
|
s.message
|
|
@@ -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", d.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", d.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", d.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
|
+
d.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
|
+
d.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
|
+
d.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", d.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
|
+
d.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", d.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
|
+
d.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
|
+
d.STORAGE,
|
|
3929
|
+
d.NONE,
|
|
3930
|
+
d.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", d.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
|
+
d.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", d.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
|
+
d.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", d.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
|
+
d.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
|
+
d.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
|
+
d.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
|
+
d.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", d.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", d.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", d.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", d.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", d.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", d.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", d.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
|
+
d.STORAGE,
|
|
4195
|
+
d.NONE,
|
|
4196
|
+
d.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", d.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", d.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", d.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", d.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", d.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
|
+
d.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
|
+
d.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
|
+
d.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
|
+
d.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", d.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", d.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", d.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", d.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", d.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", d.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", d.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
|
+
d.STORAGE,
|
|
4466
|
+
d.NONE,
|
|
4467
|
+
d.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", d.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", d.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", d.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", d.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", d.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
|
+
d.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
|
+
d.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
|
+
d.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
|
+
d.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", d.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", d.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", d.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", d.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", d.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", d.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", d.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
|
+
d.STORAGE,
|
|
4742
|
+
d.NONE,
|
|
4743
|
+
d.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", d.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", d.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", d.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", d.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", d.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
|
+
d.STORAGE,
|
|
4819
4831
|
D.PREFERENCE,
|
|
4820
4832
|
n,
|
|
4821
4833
|
s
|
|
@@ -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
|
+
d.API,
|
|
5148
|
+
d.NONE,
|
|
5149
|
+
d.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
|
+
d.API,
|
|
5156
|
+
d.NONE,
|
|
5157
|
+
d.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
|
+
d.API,
|
|
5167
|
+
d.NONE,
|
|
5168
|
+
d.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
|
+
d.API,
|
|
5175
|
+
d.NONE,
|
|
5176
|
+
d.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
|
+
d.API,
|
|
5198
|
+
d.NONE,
|
|
5199
|
+
d.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
|
+
d.API,
|
|
5206
|
+
d.NONE,
|
|
5207
|
+
d.NO_UPDATES,
|
|
5196
5208
|
D.SERIES,
|
|
5197
5209
|
j
|
|
5198
5210
|
), F = 204) : (J.hash = ie, M = {
|
|
@@ -5213,78 +5225,83 @@ class is {
|
|
|
5213
5225
|
default:
|
|
5214
5226
|
console.warn(
|
|
5215
5227
|
"%capi%c %cstorage",
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5228
|
+
d.API,
|
|
5229
|
+
d.NONE,
|
|
5230
|
+
d.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
|
-
|
|
5237
|
+
if (
|
|
5238
|
+
// @ts-ignore
|
|
5239
|
+
typeof WorkerGlobalScope < "u" && // @ts-ignore
|
|
5240
|
+
self instanceof WorkerGlobalScope
|
|
5241
|
+
)
|
|
5242
|
+
switch (F) {
|
|
5243
|
+
case 201:
|
|
5244
|
+
console.info(
|
|
5245
|
+
"%capp%c %cbroadcast",
|
|
5246
|
+
d.API,
|
|
5247
|
+
d.NONE,
|
|
5248
|
+
d.BROADCAST,
|
|
5249
|
+
j.query.slide,
|
|
5250
|
+
j.data.title ?? j.query.widget
|
|
5251
|
+
), console.debug(
|
|
5252
|
+
"%capp%c %cbroadcast",
|
|
5253
|
+
d.API,
|
|
5254
|
+
d.NONE,
|
|
5255
|
+
d.BROADCAST,
|
|
5256
|
+
j
|
|
5257
|
+
);
|
|
5258
|
+
const J = structuredClone(M.query);
|
|
5259
|
+
switch (j.query.type) {
|
|
5260
|
+
case "messages":
|
|
5261
|
+
j = await this.sm.getMessages(J);
|
|
5262
|
+
break;
|
|
5263
|
+
case "cloud":
|
|
5264
|
+
j = await this.sm.getCloud(J), j && (j.query = J);
|
|
5265
|
+
break;
|
|
5266
|
+
case "series":
|
|
5267
|
+
j = await this.sm.getSeries(J), j && (j.query = J);
|
|
5268
|
+
break;
|
|
5269
|
+
default:
|
|
5270
|
+
console.warn(
|
|
5271
|
+
"%capp%c %cbroadcast",
|
|
5272
|
+
d.API,
|
|
5273
|
+
d.NONE,
|
|
5274
|
+
d.BROADCAST,
|
|
5275
|
+
"Unhandled data type",
|
|
5276
|
+
j.query
|
|
5277
|
+
);
|
|
5278
|
+
}
|
|
5279
|
+
j && this.bc.postMessage({
|
|
5280
|
+
event: q.WIDGET_UPDATE,
|
|
5281
|
+
data: j.data
|
|
5282
|
+
});
|
|
5283
|
+
break;
|
|
5284
|
+
case 204:
|
|
5285
|
+
break;
|
|
5286
|
+
default:
|
|
5287
|
+
console.warn(
|
|
5288
|
+
"%capp%c %cbroadcast",
|
|
5289
|
+
d.API,
|
|
5290
|
+
d.NONE,
|
|
5291
|
+
d.BROADCAST,
|
|
5292
|
+
"Fetch error",
|
|
5293
|
+
j.query.slide,
|
|
5294
|
+
j.data.title ?? j.query.widget
|
|
5295
|
+
);
|
|
5296
|
+
break;
|
|
5297
|
+
}
|
|
5281
5298
|
return F;
|
|
5282
5299
|
} else
|
|
5283
5300
|
return console.warn(
|
|
5284
5301
|
"%capi%c %cstorage",
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5302
|
+
d.API,
|
|
5303
|
+
d.NONE,
|
|
5304
|
+
d.STORAGE,
|
|
5288
5305
|
q.ERROR,
|
|
5289
5306
|
k.status
|
|
5290
5307
|
), 400;
|
|
@@ -5303,9 +5320,9 @@ class is {
|
|
|
5303
5320
|
case q.UPDATE:
|
|
5304
5321
|
console.debug(
|
|
5305
5322
|
"%capi%c %cstorage",
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5323
|
+
d.API,
|
|
5324
|
+
d.NONE,
|
|
5325
|
+
d.STORAGE,
|
|
5309
5326
|
q.UPDATE,
|
|
5310
5327
|
n.data
|
|
5311
5328
|
), await this.update();
|
|
@@ -5317,9 +5334,9 @@ class is {
|
|
|
5317
5334
|
if ((u = this.options) != null && u.suspended) {
|
|
5318
5335
|
console.info(
|
|
5319
5336
|
"%cstorage%c %cstorage",
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5337
|
+
d.STORAGE,
|
|
5338
|
+
d.NONE,
|
|
5339
|
+
d.MESSAGES,
|
|
5323
5340
|
"Account suspended"
|
|
5324
5341
|
);
|
|
5325
5342
|
return;
|
|
@@ -5329,9 +5346,9 @@ class is {
|
|
|
5329
5346
|
));
|
|
5330
5347
|
console.info(
|
|
5331
5348
|
"%cstorage%c %cstorage",
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5349
|
+
d.STORAGE,
|
|
5350
|
+
d.NONE,
|
|
5351
|
+
d.MESSAGES,
|
|
5335
5352
|
`${s} messages deleted`
|
|
5336
5353
|
);
|
|
5337
5354
|
});
|
|
@@ -5340,9 +5357,9 @@ class is {
|
|
|
5340
5357
|
const s = await ((u = this.sm) == null ? void 0 : u.hideMessage(n.id, 0));
|
|
5341
5358
|
return console.info(
|
|
5342
5359
|
"%cstorage%c %cstorage",
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5360
|
+
d.STORAGE,
|
|
5361
|
+
d.NONE,
|
|
5362
|
+
d.HIDE,
|
|
5346
5363
|
`${s} messages hidden`
|
|
5347
5364
|
), await this.api.hideMessage(n);
|
|
5348
5365
|
});
|
|
@@ -5400,9 +5417,9 @@ class is {
|
|
|
5400
5417
|
});
|
|
5401
5418
|
console.info(
|
|
5402
5419
|
"%cstorage%c %cslide",
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5420
|
+
d.STORAGE,
|
|
5421
|
+
d.NONE,
|
|
5422
|
+
d.SLIDE,
|
|
5406
5423
|
n.slide,
|
|
5407
5424
|
q.VERSION,
|
|
5408
5425
|
Da
|
|
@@ -5410,9 +5427,9 @@ class is {
|
|
|
5410
5427
|
const s = (n == null ? void 0 : n.slide) || n.app;
|
|
5411
5428
|
switch (this.bc = new BroadcastChannel(s), console.info(
|
|
5412
5429
|
"%capi%c %cbroadcast",
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5430
|
+
d.API,
|
|
5431
|
+
d.NONE,
|
|
5432
|
+
d.BROADCAST,
|
|
5416
5433
|
q.CHANNEL,
|
|
5417
5434
|
s
|
|
5418
5435
|
), this.bc.onmessage = (u) => {
|
|
@@ -5448,9 +5465,9 @@ class Ga {
|
|
|
5448
5465
|
var s;
|
|
5449
5466
|
return n.type !== D.CLOUD ? (console.warn(
|
|
5450
5467
|
"%capp%c %get",
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5468
|
+
d.APP,
|
|
5469
|
+
d.NONE,
|
|
5470
|
+
d.GET_DATA,
|
|
5454
5471
|
n.widget,
|
|
5455
5472
|
"wrong method call for getMessages, type used is",
|
|
5456
5473
|
n.type
|
|
@@ -5469,9 +5486,9 @@ class Ga {
|
|
|
5469
5486
|
var s;
|
|
5470
5487
|
return n.type !== D.MESSAGES ? (console.warn(
|
|
5471
5488
|
"%capp%c %get",
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5489
|
+
d.APP,
|
|
5490
|
+
d.NONE,
|
|
5491
|
+
d.GET_DATA,
|
|
5475
5492
|
n.widget,
|
|
5476
5493
|
"wrong method call for getMessages, type used is",
|
|
5477
5494
|
n.type
|
|
@@ -5490,9 +5507,9 @@ class Ga {
|
|
|
5490
5507
|
var s;
|
|
5491
5508
|
return n.type !== D.SERIES ? (console.warn(
|
|
5492
5509
|
"%capp%c %get",
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5510
|
+
d.APP,
|
|
5511
|
+
d.NONE,
|
|
5512
|
+
d.GET_DATA,
|
|
5496
5513
|
n.widget,
|
|
5497
5514
|
"wrong method call for getMessages, type used is",
|
|
5498
5515
|
n.type
|
|
@@ -5562,9 +5579,9 @@ class os {
|
|
|
5562
5579
|
*/
|
|
5563
5580
|
_(this, "getCloud", async () => this.query.type !== D.CLOUD ? (console.warn(
|
|
5564
5581
|
"%cstorage%c %cwidget",
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5582
|
+
d.STORAGE,
|
|
5583
|
+
d.NONE,
|
|
5584
|
+
d.WIDGET,
|
|
5568
5585
|
this.query.widget,
|
|
5569
5586
|
"Wrong method call for getCloud, expected type is",
|
|
5570
5587
|
this.query.type
|
|
@@ -5580,9 +5597,9 @@ class os {
|
|
|
5580
5597
|
*/
|
|
5581
5598
|
_(this, "getMessages", async () => this.query.type !== D.MESSAGES ? (console.warn(
|
|
5582
5599
|
"%cstorage%c %cwidget",
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5600
|
+
d.STORAGE,
|
|
5601
|
+
d.NONE,
|
|
5602
|
+
d.WIDGET,
|
|
5586
5603
|
this.query.widget,
|
|
5587
5604
|
"Wrong method call for getMessages, expected type is",
|
|
5588
5605
|
this.query.type
|
|
@@ -5592,9 +5609,9 @@ class os {
|
|
|
5592
5609
|
success: !1
|
|
5593
5610
|
}) : (console.debug(
|
|
5594
5611
|
"%cstorage%c %cwidget",
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5612
|
+
d.API,
|
|
5613
|
+
d.NONE,
|
|
5614
|
+
d.MESSAGES,
|
|
5598
5615
|
this.query
|
|
5599
5616
|
), await this.storageReader.getMessages(this.query)));
|
|
5600
5617
|
/**
|
|
@@ -5604,9 +5621,9 @@ class os {
|
|
|
5604
5621
|
*/
|
|
5605
5622
|
_(this, "getSeries", async () => this.query.type !== D.SERIES ? (console.warn(
|
|
5606
5623
|
"%cstorage%c %cwidget",
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5624
|
+
d.STORAGE,
|
|
5625
|
+
d.NONE,
|
|
5626
|
+
d.WIDGET,
|
|
5610
5627
|
this.query.widget,
|
|
5611
5628
|
"Wrong method call for getSeries, expected type is",
|
|
5612
5629
|
this.query.type
|
|
@@ -5624,7 +5641,7 @@ class os {
|
|
|
5624
5641
|
_(this, "showModal", (n) => {
|
|
5625
5642
|
console.debug(
|
|
5626
5643
|
"%cwidget",
|
|
5627
|
-
|
|
5644
|
+
d.WIDGET,
|
|
5628
5645
|
q.SHOW_MODAL,
|
|
5629
5646
|
n.showComponent,
|
|
5630
5647
|
// @ts-ignore
|
|
@@ -5680,16 +5697,16 @@ class os {
|
|
|
5680
5697
|
subscribe() {
|
|
5681
5698
|
console.info(
|
|
5682
5699
|
"%cwidget%c %csubscribe",
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5700
|
+
d.WIDGET,
|
|
5701
|
+
d.NONE,
|
|
5702
|
+
d.SUBSCRIBE,
|
|
5686
5703
|
this.query.slide,
|
|
5687
5704
|
this.query.widget
|
|
5688
5705
|
), console.debug(
|
|
5689
5706
|
"%cwidget%c %csubscribe",
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5707
|
+
d.WIDGET,
|
|
5708
|
+
d.NONE,
|
|
5709
|
+
d.SUBSCRIBE,
|
|
5693
5710
|
this.query
|
|
5694
5711
|
), this.broadcastChannel.postMessage({
|
|
5695
5712
|
event: q.SUBSCRIBE,
|
|
@@ -5704,7 +5721,7 @@ export {
|
|
|
5704
5721
|
D as API,
|
|
5705
5722
|
is as BuzzcastingStorageManager,
|
|
5706
5723
|
Ga as BuzzcastingStorageReader,
|
|
5707
|
-
|
|
5724
|
+
d as CSS,
|
|
5708
5725
|
q as EVENTS,
|
|
5709
5726
|
Vt as MODERATION,
|
|
5710
5727
|
me as STORAGE,
|