buzzcasting-storage 2.14.4 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-storage.esm.js +619 -607
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var xa = Object.defineProperty;
|
|
2
2
|
var ka = (h, r, c) => r in h ? xa(h, r, { enumerable: !0, configurable: !0, writable: !0, value: c }) : h[r] = c;
|
|
3
3
|
var A = (h, r, c) => ka(h, typeof r != "symbol" ? r + "" : r, c);
|
|
4
|
-
|
|
4
|
+
var K = /* @__PURE__ */ ((h) => (h.MESSAGES = "messages", h.CLOUD = "cloud", h.SERIES = "series", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h.SLIDE = "slide", h))(K || {}), _ = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(_ || {}), re = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_MODAL = "closeModal", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.SHOW_MODAL = "showModal", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GOTO = "slideGoto", h.SLIDE_READY = "slideReady", h.SLIDE_LOAD = "loadSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGET_UPDATE = "widgetUpdate", h))(re || {}), Zt = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(Zt || {}), ge = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(ge || {});
|
|
5
|
+
const Aa = "2.15.1";
|
|
5
6
|
class Da {
|
|
6
7
|
constructor(r) {
|
|
7
8
|
A(this, "options");
|
|
@@ -35,28 +36,28 @@ class Da {
|
|
|
35
36
|
const D = Object.keys(k).length > 0 ? `?${new URLSearchParams(k).toString()}` : "";
|
|
36
37
|
return console.debug(
|
|
37
38
|
"%capi%c %cget",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
_.API,
|
|
40
|
+
_.NONE,
|
|
41
|
+
_.GET_DATA,
|
|
41
42
|
r.slide,
|
|
42
43
|
r.widget
|
|
43
44
|
), await fetch(
|
|
44
45
|
[this.url, "api", c, r.type].join("/") + D,
|
|
45
46
|
{ ...l, method: "get" }
|
|
46
|
-
).then(async (
|
|
47
|
-
if (!
|
|
48
|
-
throw new Error(`${
|
|
49
|
-
return
|
|
50
|
-
}).then((
|
|
47
|
+
).then(async (I) => {
|
|
48
|
+
if (!I.ok)
|
|
49
|
+
throw new Error(`${I.status}`);
|
|
50
|
+
return I;
|
|
51
|
+
}).then((I) => I.json()).then((I) => (I.query = r, I)).catch((I) => ({ success: !1, message: `${I}`, data: null }));
|
|
51
52
|
}
|
|
52
53
|
async hideMessage(r) {
|
|
53
54
|
const { version: c } = this.options, l = this.headers(), k = "?action=visible";
|
|
54
55
|
return console.info(
|
|
55
56
|
"%capi%c %cput",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
_.API,
|
|
58
|
+
_.NONE,
|
|
59
|
+
_.GET_DATA,
|
|
60
|
+
re.HIDE_MESSAGE,
|
|
60
61
|
r.widget,
|
|
61
62
|
r.id
|
|
62
63
|
), await fetch(
|
|
@@ -70,24 +71,24 @@ class Da {
|
|
|
70
71
|
}
|
|
71
72
|
async hideLabels(r) {
|
|
72
73
|
const { version: c } = this.options, l = this.formHeaders(), k = new URLSearchParams(), D = r.labels || [];
|
|
73
|
-
for (const [
|
|
74
|
-
k.append(`custom_filters[${
|
|
74
|
+
for (const [I, B] of D.entries())
|
|
75
|
+
k.append(`custom_filters[${I}]`, B);
|
|
75
76
|
return console.info(
|
|
76
77
|
"%capi%c %cput",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
_.API,
|
|
79
|
+
_.NONE,
|
|
80
|
+
_.GET_DATA,
|
|
81
|
+
re.HIDE_LABELS,
|
|
81
82
|
r.widget,
|
|
82
83
|
D
|
|
83
84
|
), await fetch(
|
|
84
85
|
[this.url, "api", c, r.type, r.widget].join("/"),
|
|
85
86
|
{ ...l, body: k, method: "put" }
|
|
86
|
-
).then((
|
|
87
|
-
if (!
|
|
88
|
-
throw new Error(
|
|
89
|
-
return
|
|
90
|
-
}).then((
|
|
87
|
+
).then((I) => {
|
|
88
|
+
if (!I.ok)
|
|
89
|
+
throw new Error(I.statusText);
|
|
90
|
+
return I;
|
|
91
|
+
}).then((I) => I.json()).catch((I) => ({ succes: !1, message: I, data: [] }));
|
|
91
92
|
}
|
|
92
93
|
async loadSlide(r) {
|
|
93
94
|
const { version: c } = this.options, l = this.headers(), k = Object.assign({}, r);
|
|
@@ -95,19 +96,19 @@ class Da {
|
|
|
95
96
|
const D = Object.keys(k).length > 0 ? `?${new URLSearchParams(k).toString()}` : "";
|
|
96
97
|
return console.debug(
|
|
97
98
|
"%capi%c %cget",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
_.API,
|
|
100
|
+
_.NONE,
|
|
101
|
+
_.SLIDE,
|
|
102
|
+
re.SLIDE_LOAD,
|
|
102
103
|
r.slide
|
|
103
104
|
), await fetch(
|
|
104
105
|
[this.url, "api", c, r.type].join("/") + D,
|
|
105
106
|
{ ...l, method: "get" }
|
|
106
|
-
).then(async (
|
|
107
|
-
if (!
|
|
108
|
-
throw new Error(`${
|
|
109
|
-
return
|
|
110
|
-
}).then((
|
|
107
|
+
).then(async (I) => {
|
|
108
|
+
if (!I.ok)
|
|
109
|
+
throw new Error(`${I.status}`);
|
|
110
|
+
return I;
|
|
111
|
+
}).then((I) => I.json()).then((I) => (I.query = r, I)).catch((I) => ({ success: !1, message: `${I}`, data: null }));
|
|
111
112
|
}
|
|
112
113
|
/**
|
|
113
114
|
* Store slide definition
|
|
@@ -120,10 +121,10 @@ class Da {
|
|
|
120
121
|
const { version: c } = this.options, l = this.formHeaders(), k = JSON.stringify(r.data);
|
|
121
122
|
return console.info(
|
|
122
123
|
"%capi%c %cput",
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
_.API,
|
|
125
|
+
_.NONE,
|
|
126
|
+
_.SLIDE,
|
|
127
|
+
re.SLIDE_STORE,
|
|
127
128
|
r.id
|
|
128
129
|
), await fetch(
|
|
129
130
|
[this.url, "api", c, r.type, r.id].join("/"),
|
|
@@ -160,25 +161,25 @@ var jr = { exports: {} };
|
|
|
160
161
|
for (var a, i = 0, o = t.length; i < o; i++) !a && i in t || ((a = a || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
|
|
161
162
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
162
163
|
}
|
|
163
|
-
var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Rr,
|
|
164
|
+
var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Rr, I = Object.keys, B = Array.isArray;
|
|
164
165
|
function J(e, t) {
|
|
165
|
-
return typeof t != "object" ||
|
|
166
|
+
return typeof t != "object" || I(t).forEach(function(n) {
|
|
166
167
|
e[n] = t[n];
|
|
167
168
|
}), e;
|
|
168
169
|
}
|
|
169
170
|
typeof Promise > "u" || D.Promise || (D.Promise = Promise);
|
|
170
|
-
var
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
var ee = Object.getPrototypeOf, fe = {}.hasOwnProperty;
|
|
172
|
+
function q(e, t) {
|
|
173
|
+
return fe.call(e, t);
|
|
173
174
|
}
|
|
174
175
|
function xe(e, t) {
|
|
175
|
-
typeof t == "function" && (t = t(
|
|
176
|
+
typeof t == "function" && (t = t(ee(e))), (typeof Reflect > "u" ? I : Reflect.ownKeys)(t).forEach(function(n) {
|
|
176
177
|
ke(e, n, t[n]);
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
180
|
var zn = Object.defineProperty;
|
|
180
181
|
function ke(e, t, n, a) {
|
|
181
|
-
zn(e, t, J(n &&
|
|
182
|
+
zn(e, t, J(n && q(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
|
|
182
183
|
}
|
|
183
184
|
function ze(e) {
|
|
184
185
|
return { from: function(t) {
|
|
@@ -199,7 +200,7 @@ var jr = { exports: {} };
|
|
|
199
200
|
D.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
200
201
|
}
|
|
201
202
|
function ve(e, t) {
|
|
202
|
-
if (typeof t == "string" &&
|
|
203
|
+
if (typeof t == "string" && q(e, t)) return e[t];
|
|
203
204
|
if (!t) return e;
|
|
204
205
|
if (typeof t != "string") {
|
|
205
206
|
for (var n = [], a = 0, i = t.length; a < i; ++a) {
|
|
@@ -220,12 +221,12 @@ var jr = { exports: {} };
|
|
|
220
221
|
for (var a = 0, i = t.length; a < i; ++a) le(e, t[a], n[a]);
|
|
221
222
|
} else {
|
|
222
223
|
var o, s, u = t.indexOf(".");
|
|
223
|
-
u !== -1 ? (o = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? B(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : le(u = !(u = e[o]) || !
|
|
224
|
+
u !== -1 ? (o = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? B(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : le(u = !(u = e[o]) || !q(e, o) ? e[o] = {} : u, s, n)) : n === void 0 ? B(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
227
|
function Qn(e) {
|
|
227
228
|
var t, n = {};
|
|
228
|
-
for (t in e)
|
|
229
|
+
for (t in e) q(e, t) && (n[t] = e[t]);
|
|
229
230
|
return n;
|
|
230
231
|
}
|
|
231
232
|
var Wr = [].concat;
|
|
@@ -251,8 +252,8 @@ var jr = { exports: {} };
|
|
|
251
252
|
for (var i = 0, o = n.length; i < o; ++i) a.push(t(n[i]));
|
|
252
253
|
} else if (Vn.has(n.constructor)) a = n;
|
|
253
254
|
else {
|
|
254
|
-
var s, u =
|
|
255
|
-
for (s in a = u === Object.prototype ? {} : Object.create(u), at.set(n, a), n)
|
|
255
|
+
var s, u = ee(n);
|
|
256
|
+
for (s in a = u === Object.prototype ? {} : Object.create(u), at.set(n, a), n) q(n, s) && (a[s] = t(n[s]));
|
|
256
257
|
}
|
|
257
258
|
return a;
|
|
258
259
|
}(e), at = null, e;
|
|
@@ -292,7 +293,7 @@ var jr = { exports: {} };
|
|
|
292
293
|
return e[Symbol.toStringTag] === "AsyncFunction";
|
|
293
294
|
} : function() {
|
|
294
295
|
return !1;
|
|
295
|
-
}, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
|
|
296
|
+
}, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], he = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(st), Yr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
|
|
296
297
|
function Ye(e, t) {
|
|
297
298
|
this.name = e, this.message = t;
|
|
298
299
|
}
|
|
@@ -315,9 +316,9 @@ var jr = { exports: {} };
|
|
|
315
316
|
ze(Ye).from(Error).extend({ toString: function() {
|
|
316
317
|
return this.name + ": " + this.message;
|
|
317
318
|
} }), ze(Et).from(Ye), ze(Qe).from(Ye);
|
|
318
|
-
var nn =
|
|
319
|
+
var nn = he.reduce(function(e, t) {
|
|
319
320
|
return e[t] = t + "Error", e;
|
|
320
|
-
}, {}), Qr = Ye, G =
|
|
321
|
+
}, {}), Qr = Ye, G = he.reduce(function(e, t) {
|
|
321
322
|
var n = t + "Error";
|
|
322
323
|
function a(i, o) {
|
|
323
324
|
this.name = n, i ? typeof i == "string" ? (this.message = "".concat(i).concat(o ? `
|
|
@@ -328,7 +329,7 @@ var jr = { exports: {} };
|
|
|
328
329
|
G.Syntax = SyntaxError, G.Type = TypeError, G.Range = RangeError;
|
|
329
330
|
var Zn = st.reduce(function(e, t) {
|
|
330
331
|
return e[t + "Error"] = G[t], e;
|
|
331
|
-
}, {}), Ot =
|
|
332
|
+
}, {}), Ot = he.reduce(function(e, t) {
|
|
332
333
|
return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = G[t]), e;
|
|
333
334
|
}, {});
|
|
334
335
|
function Q() {
|
|
@@ -389,16 +390,16 @@ var jr = { exports: {} };
|
|
|
389
390
|
};
|
|
390
391
|
}
|
|
391
392
|
Ot.ModifyError = Et, Ot.DexieError = Ye, Ot.BulkError = Qe;
|
|
392
|
-
var
|
|
393
|
+
var ye = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
|
|
393
394
|
function qn(e) {
|
|
394
|
-
|
|
395
|
+
ye = e;
|
|
395
396
|
}
|
|
396
397
|
var ot = {}, er = 100, Se = typeof Promise > "u" ? [] : function() {
|
|
397
398
|
var e = Promise.resolve();
|
|
398
|
-
if (typeof crypto > "u" || !crypto.subtle) return [e,
|
|
399
|
+
if (typeof crypto > "u" || !crypto.subtle) return [e, ee(e), e];
|
|
399
400
|
var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
|
|
400
|
-
return [t,
|
|
401
|
-
}(), st = Se[0],
|
|
401
|
+
return [t, ee(t), e];
|
|
402
|
+
}(), st = Se[0], he = Se[1], Se = Se[2], he = he && he.then, ct = st && st.constructor, an = !!Se, ut = function(e, t) {
|
|
402
403
|
lt.push([e, t]), xt && (queueMicrotask(ta), xt = !1);
|
|
403
404
|
}, on = !0, xt = !0, Ne = [], kt = [], sn = it, Ae = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, L = Ae, lt = [], Be = 0, At = [];
|
|
404
405
|
function N(e) {
|
|
@@ -467,7 +468,7 @@ var jr = { exports: {} };
|
|
|
467
468
|
function ea(e, t, n) {
|
|
468
469
|
try {
|
|
469
470
|
var a, i = t._value;
|
|
470
|
-
!t._state && kt.length && (kt = []), a =
|
|
471
|
+
!t._state && kt.length && (kt = []), a = ye && t._consoleTask ? t._consoleTask.run(function() {
|
|
471
472
|
return e(i);
|
|
472
473
|
}) : e(i), t._state || kt.indexOf(i) !== -1 || function(o) {
|
|
473
474
|
for (var s = Ne.length; s; ) if (Ne[--s]._value === o._value) return Ne.splice(s, 1);
|
|
@@ -629,7 +630,7 @@ var jr = { exports: {} };
|
|
|
629
630
|
});
|
|
630
631
|
});
|
|
631
632
|
}));
|
|
632
|
-
var
|
|
633
|
+
var ae = { awaits: 0, echoes: 0, id: 0 }, na = 0, Pt = [], It = 0, Ct = 0, ra = 0;
|
|
633
634
|
function De(e, t, n, a) {
|
|
634
635
|
var i = L, o = Object.create(i);
|
|
635
636
|
return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, Ae.env, o.env = an ? { Promise: N, PromiseProp: { value: N, configurable: !0, writable: !0 }, all: N.all, race: N.race, allSettled: N.allSettled, any: N.any, resolve: N.resolve, reject: N.reject } : {}, t && J(o, t), ++i.ref, o.finalize = function() {
|
|
@@ -637,16 +638,16 @@ var jr = { exports: {} };
|
|
|
637
638
|
}, a = Le(o, e, n, a), o.ref === 0 && o.finalize(), a;
|
|
638
639
|
}
|
|
639
640
|
function Je() {
|
|
640
|
-
return
|
|
641
|
+
return ae.id || (ae.id = ++na), ++ae.awaits, ae.echoes += er, ae.id;
|
|
641
642
|
}
|
|
642
643
|
function Pe() {
|
|
643
|
-
return !!
|
|
644
|
+
return !!ae.awaits && (--ae.awaits == 0 && (ae.id = 0), ae.echoes = ae.awaits * er, !0);
|
|
644
645
|
}
|
|
645
646
|
function Rt(e) {
|
|
646
|
-
return
|
|
647
|
+
return ae.echoes && e && e.constructor === ct ? (Je(), e.then(function(t) {
|
|
647
648
|
return Pe(), t;
|
|
648
649
|
}, function(t) {
|
|
649
|
-
return Pe(),
|
|
650
|
+
return Pe(), te(t);
|
|
650
651
|
})) : e;
|
|
651
652
|
}
|
|
652
653
|
function aa() {
|
|
@@ -655,8 +656,8 @@ var jr = { exports: {} };
|
|
|
655
656
|
}
|
|
656
657
|
function Ie(e, t) {
|
|
657
658
|
var n, a = L;
|
|
658
|
-
(t ? !
|
|
659
|
-
++Ct,
|
|
659
|
+
(t ? !ae.echoes || It++ && e === L : !It || --It && e === L) || queueMicrotask(t ? (function(i) {
|
|
660
|
+
++Ct, ae.echoes && --ae.echoes != 0 || (ae.echoes = ae.awaits = ae.id = 0), Pt.push(L), Ie(i, !0);
|
|
660
661
|
}).bind(null, e) : aa), e !== L && (L = e, a === Ae && (Ae.env = rr()), an && (n = Ae.env.Promise, t = e.env, (a.global || e.global) && (Object.defineProperty(D, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
|
|
661
662
|
}
|
|
662
663
|
function rr() {
|
|
@@ -683,10 +684,10 @@ var jr = { exports: {} };
|
|
|
683
684
|
};
|
|
684
685
|
}
|
|
685
686
|
function fn(e) {
|
|
686
|
-
Promise === ct &&
|
|
687
|
+
Promise === ct && ae.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
687
688
|
}
|
|
688
|
-
("" +
|
|
689
|
-
var
|
|
689
|
+
("" + he).indexOf("[native code]") === -1 && (Je = Pe = Q);
|
|
690
|
+
var te = N.reject, Ge = "", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Ze = [], Tt = "__dbnames", hn = "readonly", pn = "readwrite";
|
|
690
691
|
function $e(e, t) {
|
|
691
692
|
return e ? t ? function() {
|
|
692
693
|
return e.apply(this, arguments) && t.apply(this, arguments);
|
|
@@ -738,7 +739,7 @@ var jr = { exports: {} };
|
|
|
738
739
|
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
739
740
|
}
|
|
740
741
|
var lr = (V.prototype._trans = function(e, t, n) {
|
|
741
|
-
var a = this._tx || L.trans, i = this.name, o =
|
|
742
|
+
var a = this._tx || L.trans, i = this.name, o = ye && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
742
743
|
function s(f, b, d) {
|
|
743
744
|
if (!d.schema[i]) throw new G.NotFound("Table " + i + " not part of transaction");
|
|
744
745
|
return t(d.idbtrans, d);
|
|
@@ -755,7 +756,7 @@ var jr = { exports: {} };
|
|
|
755
756
|
} catch (w) {
|
|
756
757
|
return w.name === nn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
|
|
757
758
|
return f(b, d, v, p);
|
|
758
|
-
})) :
|
|
759
|
+
})) : te(w);
|
|
759
760
|
}
|
|
760
761
|
return m._promise(d, function(w, y) {
|
|
761
762
|
return De(function() {
|
|
@@ -771,9 +772,9 @@ var jr = { exports: {} };
|
|
|
771
772
|
});
|
|
772
773
|
});
|
|
773
774
|
}
|
|
774
|
-
if (b._state.openComplete) return
|
|
775
|
+
if (b._state.openComplete) return te(new G.DatabaseClosed(b._state.dbOpenError));
|
|
775
776
|
if (!b._state.isBeingOpened) {
|
|
776
|
-
if (!b._state.autoOpen) return
|
|
777
|
+
if (!b._state.autoOpen) return te(new G.DatabaseClosed());
|
|
777
778
|
b.open().catch(Q);
|
|
778
779
|
}
|
|
779
780
|
return b._state.dbReadyPromise.then(function() {
|
|
@@ -781,14 +782,14 @@ var jr = { exports: {} };
|
|
|
781
782
|
});
|
|
782
783
|
}(this.db, e, [this.name], s);
|
|
783
784
|
return o && (g._consoleTask = o, g = g.catch(function(f) {
|
|
784
|
-
return console.trace(f),
|
|
785
|
+
return console.trace(f), te(f);
|
|
785
786
|
})), g;
|
|
786
787
|
} finally {
|
|
787
788
|
u && Ve();
|
|
788
789
|
}
|
|
789
790
|
}, V.prototype.get = function(e, t) {
|
|
790
791
|
var n = this;
|
|
791
|
-
return e && e.constructor === Object ? this.where(e).first(t) : e == null ?
|
|
792
|
+
return e && e.constructor === Object ? this.where(e).first(t) : e == null ? te(new G.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
|
|
792
793
|
return n.core.get({ trans: a, key: e }).then(function(i) {
|
|
793
794
|
return n.hook.reading.fire(i);
|
|
794
795
|
});
|
|
@@ -796,7 +797,7 @@ var jr = { exports: {} };
|
|
|
796
797
|
}, V.prototype.where = function(e) {
|
|
797
798
|
if (typeof e == "string") return new this.db.WhereClause(this, e);
|
|
798
799
|
if (B(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
|
|
799
|
-
var t =
|
|
800
|
+
var t = I(e);
|
|
800
801
|
if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
|
|
801
802
|
var n = this.schema.indexes.concat(this.schema.primKey).filter(function(g) {
|
|
802
803
|
if (g.compound && t.every(function(b) {
|
|
@@ -815,7 +816,7 @@ var jr = { exports: {} };
|
|
|
815
816
|
return e[f];
|
|
816
817
|
}));
|
|
817
818
|
}
|
|
818
|
-
!n &&
|
|
819
|
+
!n && ye && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
|
|
819
820
|
var a = this.schema.idxByName, i = this.db._deps.indexedDB;
|
|
820
821
|
function o(g, f) {
|
|
821
822
|
return i.cmp(g, f) === 0;
|
|
@@ -865,7 +866,7 @@ var jr = { exports: {} };
|
|
|
865
866
|
}, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
|
|
866
867
|
return a;
|
|
867
868
|
}, e = i);
|
|
868
|
-
for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s =
|
|
869
|
+
for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s = ee(s)) Object.getOwnPropertyNames(s).forEach(function(g) {
|
|
869
870
|
return o.add(g);
|
|
870
871
|
});
|
|
871
872
|
function u(g) {
|
|
@@ -896,7 +897,7 @@ var jr = { exports: {} };
|
|
|
896
897
|
return u;
|
|
897
898
|
});
|
|
898
899
|
}, V.prototype.update = function(e, t) {
|
|
899
|
-
return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ?
|
|
900
|
+
return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? te(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
|
|
900
901
|
}, V.prototype.put = function(e, t) {
|
|
901
902
|
var n = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, s = e;
|
|
902
903
|
return o && i && (s = jt(o)(e)), this._trans("readwrite", function(u) {
|
|
@@ -971,8 +972,8 @@ var jr = { exports: {} };
|
|
|
971
972
|
e.forEach(function(d, v) {
|
|
972
973
|
var p = d.key, m = d.changes, w = u[v];
|
|
973
974
|
if (w) {
|
|
974
|
-
for (var y = 0,
|
|
975
|
-
var E =
|
|
975
|
+
for (var y = 0, S = Object.keys(m); y < S.length; y++) {
|
|
976
|
+
var E = S[y], O = m[E];
|
|
976
977
|
if (E === t.schema.primKey.keyPath) {
|
|
977
978
|
if (H(O, p) !== 0) throw new G.Constraint("Cannot update primary key in bulkUpdate()");
|
|
978
979
|
} else le(w, E, O);
|
|
@@ -985,8 +986,8 @@ var jr = { exports: {} };
|
|
|
985
986
|
var v = d.numFailures, p = d.failures;
|
|
986
987
|
if (v === 0) return b;
|
|
987
988
|
for (var m = 0, w = Object.keys(p); m < w.length; m++) {
|
|
988
|
-
var y,
|
|
989
|
-
E != null && (y = p[
|
|
989
|
+
var y, S = w[m], E = o[Number(S)];
|
|
990
|
+
E != null && (y = p[S], delete p[S], p[E] = y);
|
|
990
991
|
}
|
|
991
992
|
throw new Qe("".concat(t.name, ".bulkUpdate(): ").concat(v, " of ").concat(b, " operations failed"), p);
|
|
992
993
|
});
|
|
@@ -1029,7 +1030,7 @@ var jr = { exports: {} };
|
|
|
1029
1030
|
} };
|
|
1030
1031
|
return n[s] = t[s] = b;
|
|
1031
1032
|
}
|
|
1032
|
-
|
|
1033
|
+
I(f = s).forEach(function(d) {
|
|
1033
1034
|
var v = f[d];
|
|
1034
1035
|
if (B(v)) o(d, f[d][0], f[d][1]);
|
|
1035
1036
|
else {
|
|
@@ -1080,7 +1081,7 @@ var jr = { exports: {} };
|
|
|
1080
1081
|
return g.stop(v);
|
|
1081
1082
|
}, function(v) {
|
|
1082
1083
|
return g.fail(v);
|
|
1083
|
-
}) || ((d = "" + (b = g.primaryKey)) == "[object ArrayBuffer]" && (d = "" + new Uint8Array(b)),
|
|
1084
|
+
}) || ((d = "" + (b = g.primaryKey)) == "[object ArrayBuffer]" && (d = "" + new Uint8Array(b)), q(o, d) || (o[d] = !0, t(u, g, f)));
|
|
1084
1085
|
};
|
|
1085
1086
|
return Promise.all([e.or._iterate(s, n), fr(dr(e, a, n), e.algorithm, s, !e.keysOnly && e.valueMapper)]);
|
|
1086
1087
|
}
|
|
@@ -1139,10 +1140,10 @@ var jr = { exports: {} };
|
|
|
1139
1140
|
}
|
|
1140
1141
|
var ia = (Y.prototype._read = function(e, t) {
|
|
1141
1142
|
var n = this._ctx;
|
|
1142
|
-
return n.error ? n.table._trans(null,
|
|
1143
|
+
return n.error ? n.table._trans(null, te.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
|
|
1143
1144
|
}, Y.prototype._write = function(e) {
|
|
1144
1145
|
var t = this._ctx;
|
|
1145
|
-
return t.error ? t.table._trans(null,
|
|
1146
|
+
return t.error ? t.table._trans(null, te.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
|
|
1146
1147
|
}, Y.prototype._addAlgorithm = function(e) {
|
|
1147
1148
|
var t = this._ctx;
|
|
1148
1149
|
t.algorithm = $e(t.algorithm, e);
|
|
@@ -1295,55 +1296,55 @@ var jr = { exports: {} };
|
|
|
1295
1296
|
if (!e || !e.multi) return this;
|
|
1296
1297
|
var t = {};
|
|
1297
1298
|
return gn(this._ctx, function(i) {
|
|
1298
|
-
var a = i.primaryKey.toString(), i =
|
|
1299
|
+
var a = i.primaryKey.toString(), i = q(t, a);
|
|
1299
1300
|
return t[a] = !0, !i;
|
|
1300
1301
|
}), this;
|
|
1301
1302
|
}, Y.prototype.modify = function(e) {
|
|
1302
1303
|
var t = this, n = this._ctx;
|
|
1303
1304
|
return this._write(function(a) {
|
|
1304
1305
|
var i, o, s;
|
|
1305
|
-
s = typeof e == "function" ? e : (i =
|
|
1306
|
-
for (var
|
|
1307
|
-
var O = i[E], x = e[O],
|
|
1308
|
-
x instanceof ht ? (le(y, O, x.execute(
|
|
1306
|
+
s = typeof e == "function" ? e : (i = I(e), o = i.length, function(y) {
|
|
1307
|
+
for (var S = !1, E = 0; E < o; ++E) {
|
|
1308
|
+
var O = i[E], x = e[O], C = ve(y, O);
|
|
1309
|
+
x instanceof ht ? (le(y, O, x.execute(C)), S = !0) : C !== x && (le(y, O, x), S = !0);
|
|
1309
1310
|
}
|
|
1310
|
-
return
|
|
1311
|
+
return S;
|
|
1311
1312
|
});
|
|
1312
1313
|
function u(y, O) {
|
|
1313
1314
|
var E = O.failures, O = O.numFailures;
|
|
1314
1315
|
m += y - O;
|
|
1315
|
-
for (var x = 0,
|
|
1316
|
-
var j =
|
|
1316
|
+
for (var x = 0, C = I(E); x < C.length; x++) {
|
|
1317
|
+
var j = C[x];
|
|
1317
1318
|
p.push(E[j]);
|
|
1318
1319
|
}
|
|
1319
1320
|
}
|
|
1320
1321
|
var g = n.table.core, f = g.schema.primaryKey, b = f.outbound, d = f.extractKey, v = t.db._options.modifyChunkSize || 200, p = [], m = 0, w = [];
|
|
1321
1322
|
return t.clone().primaryKeys().then(function(y) {
|
|
1322
|
-
function
|
|
1323
|
+
function S(O) {
|
|
1323
1324
|
var x = Math.min(v, y.length - O);
|
|
1324
|
-
return g.getMany({ trans: a, keys: y.slice(O, O + x), cache: "immutable" }).then(function(
|
|
1325
|
-
for (var j = [],
|
|
1326
|
-
var $ =
|
|
1327
|
-
s.call(F, F.value, F) !== !1 && (F.value == null ? M.push(y[O + P]) : b || H(d($), d(F.value)) === 0 ? (
|
|
1325
|
+
return g.getMany({ trans: a, keys: y.slice(O, O + x), cache: "immutable" }).then(function(C) {
|
|
1326
|
+
for (var j = [], R = [], T = b ? [] : null, M = [], P = 0; P < x; ++P) {
|
|
1327
|
+
var $ = C[P], F = { value: je($), primKey: y[O + P] };
|
|
1328
|
+
s.call(F, F.value, F) !== !1 && (F.value == null ? M.push(y[O + P]) : b || H(d($), d(F.value)) === 0 ? (R.push(F.value), b && T.push(y[O + P])) : (M.push(y[O + P]), j.push(F.value)));
|
|
1328
1329
|
}
|
|
1329
1330
|
return Promise.resolve(0 < j.length && g.mutate({ trans: a, type: "add", values: j }).then(function(z) {
|
|
1330
1331
|
for (var U in z.failures) M.splice(parseInt(U), 1);
|
|
1331
1332
|
u(j.length, z);
|
|
1332
1333
|
})).then(function() {
|
|
1333
|
-
return (0 <
|
|
1334
|
-
return u(
|
|
1334
|
+
return (0 < R.length || E && typeof e == "object") && g.mutate({ trans: a, type: "put", keys: T, values: R, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(z) {
|
|
1335
|
+
return u(R.length, z);
|
|
1335
1336
|
});
|
|
1336
1337
|
}).then(function() {
|
|
1337
1338
|
return (0 < M.length || E && e === mn) && g.mutate({ trans: a, type: "delete", keys: M, criteria: E, isAdditionalChunk: 0 < O }).then(function(z) {
|
|
1338
1339
|
return u(M.length, z);
|
|
1339
1340
|
});
|
|
1340
1341
|
}).then(function() {
|
|
1341
|
-
return y.length > O + x &&
|
|
1342
|
+
return y.length > O + x && S(O + v);
|
|
1342
1343
|
});
|
|
1343
1344
|
});
|
|
1344
1345
|
}
|
|
1345
1346
|
var E = qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === mn) && { index: n.index, range: n.range };
|
|
1346
|
-
return
|
|
1347
|
+
return S(0).then(function() {
|
|
1347
1348
|
if (0 < p.length) throw new Et("Error modifying one or more objects", p, m, w);
|
|
1348
1349
|
return y.length;
|
|
1349
1350
|
});
|
|
@@ -1400,8 +1401,8 @@ var jr = { exports: {} };
|
|
|
1400
1401
|
}, s = m === "next" ? oa : sa;
|
|
1401
1402
|
var w = n.map(function(y) {
|
|
1402
1403
|
return { lower: o(y), upper: i(y) };
|
|
1403
|
-
}).sort(function(y,
|
|
1404
|
-
return s(y.lower,
|
|
1404
|
+
}).sort(function(y, S) {
|
|
1405
|
+
return s(y.lower, S.lower);
|
|
1405
1406
|
});
|
|
1406
1407
|
u = w.map(function(y) {
|
|
1407
1408
|
return y.upper;
|
|
@@ -1416,20 +1417,20 @@ var jr = { exports: {} };
|
|
|
1416
1417
|
};
|
|
1417
1418
|
var p = 0;
|
|
1418
1419
|
return e._addAlgorithm(function(m, w, y) {
|
|
1419
|
-
var
|
|
1420
|
-
if (typeof
|
|
1421
|
-
var E = o(
|
|
1420
|
+
var S = m.key;
|
|
1421
|
+
if (typeof S != "string") return !1;
|
|
1422
|
+
var E = o(S);
|
|
1422
1423
|
if (t(E, g, p)) return !0;
|
|
1423
1424
|
for (var O = null, x = p; x < d; ++x) {
|
|
1424
|
-
var
|
|
1425
|
+
var C = function(j, R, T, M, P, $) {
|
|
1425
1426
|
for (var F = Math.min(j.length, M.length), z = -1, U = 0; U < F; ++U) {
|
|
1426
|
-
var
|
|
1427
|
-
if (
|
|
1428
|
-
P(j[U],
|
|
1427
|
+
var pe = R[U];
|
|
1428
|
+
if (pe !== M[U]) return P(j[U], T[U]) < 0 ? j.substr(0, U) + T[U] + T.substr(U + 1) : P(j[U], M[U]) < 0 ? j.substr(0, U) + M[U] + T.substr(U + 1) : 0 <= z ? j.substr(0, z) + R[z] + T.substr(z + 1) : null;
|
|
1429
|
+
P(j[U], pe) < 0 && (z = U);
|
|
1429
1430
|
}
|
|
1430
|
-
return F < M.length && $ === "next" ? j +
|
|
1431
|
-
}(
|
|
1432
|
-
|
|
1431
|
+
return F < M.length && $ === "next" ? j + T.substr(j.length) : F < j.length && $ === "prev" ? j.substr(0, T.length) : z < 0 ? null : j.substr(0, z) + M[z] + T.substr(z + 1);
|
|
1432
|
+
}(S, E, u[x], g[x], s, f);
|
|
1433
|
+
C === null && O === null ? p = x + 1 : (O === null || 0 < s(O, C)) && (O = C);
|
|
1433
1434
|
}
|
|
1434
1435
|
return w(O !== null ? function() {
|
|
1435
1436
|
m.continue(O + b);
|
|
@@ -1442,9 +1443,9 @@ var jr = { exports: {} };
|
|
|
1442
1443
|
function pr(e) {
|
|
1443
1444
|
return { type: 1, lower: e, upper: e };
|
|
1444
1445
|
}
|
|
1445
|
-
var gr = (Object.defineProperty(
|
|
1446
|
+
var gr = (Object.defineProperty(ie.prototype, "Collection", { get: function() {
|
|
1446
1447
|
return this._ctx.table.db.Collection;
|
|
1447
|
-
}, enumerable: !1, configurable: !0 }),
|
|
1448
|
+
}, enumerable: !1, configurable: !0 }), ie.prototype.between = function(e, t, n, a) {
|
|
1448
1449
|
n = n !== !1, a = a === !0;
|
|
1449
1450
|
try {
|
|
1450
1451
|
return 0 < this._cmp(e, t) || this._cmp(e, t) === 0 && (n || a) && (!n || !a) ? et(this) : new this.Collection(this, function() {
|
|
@@ -1453,49 +1454,49 @@ var jr = { exports: {} };
|
|
|
1453
1454
|
} catch {
|
|
1454
1455
|
return de(this, _e);
|
|
1455
1456
|
}
|
|
1456
|
-
},
|
|
1457
|
+
}, ie.prototype.equals = function(e) {
|
|
1457
1458
|
return e == null ? de(this, _e) : new this.Collection(this, function() {
|
|
1458
1459
|
return pr(e);
|
|
1459
1460
|
});
|
|
1460
|
-
},
|
|
1461
|
+
}, ie.prototype.above = function(e) {
|
|
1461
1462
|
return e == null ? de(this, _e) : new this.Collection(this, function() {
|
|
1462
1463
|
return Ce(e, void 0, !0);
|
|
1463
1464
|
});
|
|
1464
|
-
},
|
|
1465
|
+
}, ie.prototype.aboveOrEqual = function(e) {
|
|
1465
1466
|
return e == null ? de(this, _e) : new this.Collection(this, function() {
|
|
1466
1467
|
return Ce(e, void 0, !1);
|
|
1467
1468
|
});
|
|
1468
|
-
},
|
|
1469
|
+
}, ie.prototype.below = function(e) {
|
|
1469
1470
|
return e == null ? de(this, _e) : new this.Collection(this, function() {
|
|
1470
1471
|
return Ce(void 0, e, !1, !0);
|
|
1471
1472
|
});
|
|
1472
|
-
},
|
|
1473
|
+
}, ie.prototype.belowOrEqual = function(e) {
|
|
1473
1474
|
return e == null ? de(this, _e) : new this.Collection(this, function() {
|
|
1474
1475
|
return Ce(void 0, e);
|
|
1475
1476
|
});
|
|
1476
|
-
},
|
|
1477
|
+
}, ie.prototype.startsWith = function(e) {
|
|
1477
1478
|
return typeof e != "string" ? de(this, ir) : this.between(e, e + Ge, !0, !0);
|
|
1478
|
-
},
|
|
1479
|
+
}, ie.prototype.startsWithIgnoreCase = function(e) {
|
|
1479
1480
|
return e === "" ? this.startsWith(e) : Nt(this, function(t, n) {
|
|
1480
1481
|
return t.indexOf(n[0]) === 0;
|
|
1481
1482
|
}, [e], Ge);
|
|
1482
|
-
},
|
|
1483
|
+
}, ie.prototype.equalsIgnoreCase = function(e) {
|
|
1483
1484
|
return Nt(this, function(t, n) {
|
|
1484
1485
|
return t === n[0];
|
|
1485
1486
|
}, [e], "");
|
|
1486
|
-
},
|
|
1487
|
+
}, ie.prototype.anyOfIgnoreCase = function() {
|
|
1487
1488
|
var e = we.apply(He, arguments);
|
|
1488
1489
|
return e.length === 0 ? et(this) : Nt(this, function(t, n) {
|
|
1489
1490
|
return n.indexOf(t) !== -1;
|
|
1490
1491
|
}, e, "");
|
|
1491
|
-
},
|
|
1492
|
+
}, ie.prototype.startsWithAnyOfIgnoreCase = function() {
|
|
1492
1493
|
var e = we.apply(He, arguments);
|
|
1493
1494
|
return e.length === 0 ? et(this) : Nt(this, function(t, n) {
|
|
1494
1495
|
return n.some(function(a) {
|
|
1495
1496
|
return t.indexOf(a) === 0;
|
|
1496
1497
|
});
|
|
1497
1498
|
}, e, Ge);
|
|
1498
|
-
},
|
|
1499
|
+
}, ie.prototype.anyOf = function() {
|
|
1499
1500
|
var e = this, t = we.apply(He, arguments), n = this._cmp;
|
|
1500
1501
|
try {
|
|
1501
1502
|
t.sort(n);
|
|
@@ -1516,9 +1517,9 @@ var jr = { exports: {} };
|
|
|
1516
1517
|
o.continue(t[i]);
|
|
1517
1518
|
}), !1);
|
|
1518
1519
|
}), a;
|
|
1519
|
-
},
|
|
1520
|
+
}, ie.prototype.notEqual = function(e) {
|
|
1520
1521
|
return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
|
|
1521
|
-
},
|
|
1522
|
+
}, ie.prototype.noneOf = function() {
|
|
1522
1523
|
var e = we.apply(He, arguments);
|
|
1523
1524
|
if (e.length === 0) return new this.Collection(this);
|
|
1524
1525
|
try {
|
|
@@ -1530,10 +1531,10 @@ var jr = { exports: {} };
|
|
|
1530
1531
|
return n ? n.concat([[n[n.length - 1][1], a]]) : [[-1 / 0, a]];
|
|
1531
1532
|
}, null);
|
|
1532
1533
|
return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
|
|
1533
|
-
},
|
|
1534
|
+
}, ie.prototype.inAnyRange = function(S, t) {
|
|
1534
1535
|
var n = this, a = this._cmp, i = this._ascending, o = this._descending, s = this._min, u = this._max;
|
|
1535
|
-
if (
|
|
1536
|
-
if (!
|
|
1536
|
+
if (S.length === 0) return et(this);
|
|
1537
|
+
if (!S.every(function(E) {
|
|
1537
1538
|
return E[0] !== void 0 && E[1] !== void 0 && i(E[0], E[1]) <= 0;
|
|
1538
1539
|
})) return de(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", G.InvalidArgument);
|
|
1539
1540
|
var g = !t || t.includeLowers !== !1, f = t && t.includeUppers === !0, b, d = i;
|
|
@@ -1541,15 +1542,15 @@ var jr = { exports: {} };
|
|
|
1541
1542
|
return d(E[0], O[0]);
|
|
1542
1543
|
}
|
|
1543
1544
|
try {
|
|
1544
|
-
(b =
|
|
1545
|
-
for (var x = 0,
|
|
1545
|
+
(b = S.reduce(function(E, O) {
|
|
1546
|
+
for (var x = 0, C = E.length; x < C; ++x) {
|
|
1546
1547
|
var j = E[x];
|
|
1547
1548
|
if (a(O[0], j[1]) < 0 && 0 < a(O[1], j[0])) {
|
|
1548
1549
|
j[0] = s(j[0], O[0]), j[1] = u(j[1], O[1]);
|
|
1549
1550
|
break;
|
|
1550
1551
|
}
|
|
1551
1552
|
}
|
|
1552
|
-
return x ===
|
|
1553
|
+
return x === C && E.push(O), E;
|
|
1553
1554
|
}, [])).sort(v);
|
|
1554
1555
|
} catch {
|
|
1555
1556
|
return de(this, _e);
|
|
@@ -1562,28 +1563,28 @@ var jr = { exports: {} };
|
|
|
1562
1563
|
return 0 < o(E, b[p][0]);
|
|
1563
1564
|
} : function(E) {
|
|
1564
1565
|
return 0 <= o(E, b[p][0]);
|
|
1565
|
-
}, y = m,
|
|
1566
|
+
}, y = m, S = new this.Collection(this, function() {
|
|
1566
1567
|
return Ce(b[0][0], b[b.length - 1][1], !g, !f);
|
|
1567
1568
|
});
|
|
1568
|
-
return
|
|
1569
|
+
return S._ondirectionchange = function(E) {
|
|
1569
1570
|
d = E === "next" ? (y = m, i) : (y = w, o), b.sort(v);
|
|
1570
|
-
},
|
|
1571
|
-
for (var
|
|
1572
|
-
return !m(
|
|
1571
|
+
}, S._addAlgorithm(function(E, O, x) {
|
|
1572
|
+
for (var C, j = E.key; y(j); ) if (++p === b.length) return O(x), !1;
|
|
1573
|
+
return !m(C = j) && !w(C) || (n._cmp(j, b[p][1]) === 0 || n._cmp(j, b[p][0]) === 0 || O(function() {
|
|
1573
1574
|
d === i ? E.continue(b[p][0]) : E.continue(b[p][1]);
|
|
1574
1575
|
}), !1);
|
|
1575
|
-
}),
|
|
1576
|
-
},
|
|
1576
|
+
}), S;
|
|
1577
|
+
}, ie.prototype.startsWithAnyOf = function() {
|
|
1577
1578
|
var e = we.apply(He, arguments);
|
|
1578
1579
|
return e.every(function(t) {
|
|
1579
1580
|
return typeof t == "string";
|
|
1580
1581
|
}) ? e.length === 0 ? et(this) : this.inAnyRange(e.map(function(t) {
|
|
1581
1582
|
return [t, t + Ge];
|
|
1582
1583
|
})) : de(this, "startsWithAnyOf() only works with strings");
|
|
1583
|
-
},
|
|
1584
|
-
function
|
|
1584
|
+
}, ie);
|
|
1585
|
+
function ie() {
|
|
1585
1586
|
}
|
|
1586
|
-
function
|
|
1587
|
+
function me(e) {
|
|
1587
1588
|
return Z(function(t) {
|
|
1588
1589
|
return pt(t), e(t.target.error), !1;
|
|
1589
1590
|
});
|
|
@@ -1591,9 +1592,9 @@ var jr = { exports: {} };
|
|
|
1591
1592
|
function pt(e) {
|
|
1592
1593
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1593
1594
|
}
|
|
1594
|
-
var gt = "storagemutated", bn = "x-storagemutated-1", Re = dt(null, gt), ca = (
|
|
1595
|
+
var gt = "storagemutated", bn = "x-storagemutated-1", Re = dt(null, gt), ca = (be.prototype._lock = function() {
|
|
1595
1596
|
return rt(!L.global), ++this._reculock, this._reculock !== 1 || L.global || (L.lockOwnerFor = this), this;
|
|
1596
|
-
},
|
|
1597
|
+
}, be.prototype._unlock = function() {
|
|
1597
1598
|
if (rt(!L.global), --this._reculock == 0) for (L.global || (L.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
1598
1599
|
var e = this._blockedFuncs.shift();
|
|
1599
1600
|
try {
|
|
@@ -1602,9 +1603,9 @@ var jr = { exports: {} };
|
|
|
1602
1603
|
}
|
|
1603
1604
|
}
|
|
1604
1605
|
return this;
|
|
1605
|
-
},
|
|
1606
|
+
}, be.prototype._locked = function() {
|
|
1606
1607
|
return this._reculock && L.lockOwnerFor !== this;
|
|
1607
|
-
},
|
|
1608
|
+
}, be.prototype.create = function(e) {
|
|
1608
1609
|
var t = this;
|
|
1609
1610
|
if (!this.mode) return this;
|
|
1610
1611
|
var n = this.db.idbdb, a = this.db._state.dbOpenError;
|
|
@@ -1624,10 +1625,10 @@ var jr = { exports: {} };
|
|
|
1624
1625
|
}), e.oncomplete = Z(function() {
|
|
1625
1626
|
t.active = !1, t._resolve(), "mutatedParts" in e && Re.storagemutated.fire(e.mutatedParts);
|
|
1626
1627
|
}), this;
|
|
1627
|
-
},
|
|
1628
|
+
}, be.prototype._promise = function(e, t, n) {
|
|
1628
1629
|
var a = this;
|
|
1629
|
-
if (e === "readwrite" && this.mode !== "readwrite") return
|
|
1630
|
-
if (!this.active) return
|
|
1630
|
+
if (e === "readwrite" && this.mode !== "readwrite") return te(new G.ReadOnly("Transaction is readonly"));
|
|
1631
|
+
if (!this.active) return te(new G.TransactionInactive());
|
|
1631
1632
|
if (this._locked()) return new N(function(o, s) {
|
|
1632
1633
|
a._blockedFuncs.push([function() {
|
|
1633
1634
|
a._promise(e, t, n).then(o, s);
|
|
@@ -1648,9 +1649,9 @@ var jr = { exports: {} };
|
|
|
1648
1649
|
u && u.then && u.then(o, s);
|
|
1649
1650
|
});
|
|
1650
1651
|
return i._lib = !0, i;
|
|
1651
|
-
},
|
|
1652
|
+
}, be.prototype._root = function() {
|
|
1652
1653
|
return this.parent ? this.parent._root() : this;
|
|
1653
|
-
},
|
|
1654
|
+
}, be.prototype.waitFor = function(e) {
|
|
1654
1655
|
var t, n = this._root(), a = N.resolve(e);
|
|
1655
1656
|
n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
|
|
1656
1657
|
return a;
|
|
@@ -1668,16 +1669,16 @@ var jr = { exports: {} };
|
|
|
1668
1669
|
n._waitingFor === i && (n._waitingFor = null);
|
|
1669
1670
|
});
|
|
1670
1671
|
});
|
|
1671
|
-
},
|
|
1672
|
+
}, be.prototype.abort = function() {
|
|
1672
1673
|
this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new G.Abort()));
|
|
1673
|
-
},
|
|
1674
|
+
}, be.prototype.table = function(e) {
|
|
1674
1675
|
var t = this._memoizedTables || (this._memoizedTables = {});
|
|
1675
|
-
if (
|
|
1676
|
+
if (q(t, e)) return t[e];
|
|
1676
1677
|
var n = this.schema[e];
|
|
1677
1678
|
if (!n) throw new G.NotFound("Table " + e + " not part of transaction");
|
|
1678
1679
|
return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
|
|
1679
|
-
},
|
|
1680
|
-
function
|
|
1680
|
+
}, be);
|
|
1681
|
+
function be() {
|
|
1681
1682
|
}
|
|
1682
1683
|
function vn(e, t, n, a, i, o, s) {
|
|
1683
1684
|
return { name: e, keyPath: t, unique: n, multi: a, auto: i, compound: o, src: (n && !s ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + yr(t) };
|
|
@@ -1732,30 +1733,30 @@ var jr = { exports: {} };
|
|
|
1732
1733
|
function i(v) {
|
|
1733
1734
|
var p, m = v.name;
|
|
1734
1735
|
return { name: m, schema: v, mutate: function(w) {
|
|
1735
|
-
var y = w.trans,
|
|
1736
|
-
return new Promise(function(
|
|
1737
|
-
|
|
1738
|
-
var
|
|
1739
|
-
if (!M &&
|
|
1736
|
+
var y = w.trans, S = w.type, E = w.keys, O = w.values, x = w.range;
|
|
1737
|
+
return new Promise(function(C, j) {
|
|
1738
|
+
C = Z(C);
|
|
1739
|
+
var R = y.objectStore(m), T = R.keyPath == null, M = S === "put" || S === "add";
|
|
1740
|
+
if (!M && S !== "delete" && S !== "deleteRange") throw new Error("Invalid operation type: " + S);
|
|
1740
1741
|
var P, $ = (E || O || { length: 1 }).length;
|
|
1741
1742
|
if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
|
|
1742
|
-
if ($ === 0) return
|
|
1743
|
+
if ($ === 0) return C({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1743
1744
|
function F(ue) {
|
|
1744
|
-
++
|
|
1745
|
+
++pe, pt(ue);
|
|
1745
1746
|
}
|
|
1746
|
-
var z = [], U = [],
|
|
1747
|
-
if (
|
|
1748
|
-
if (x.type === 4) return
|
|
1749
|
-
x.type === 3 ? z.push(P =
|
|
1747
|
+
var z = [], U = [], pe = 0;
|
|
1748
|
+
if (S === "deleteRange") {
|
|
1749
|
+
if (x.type === 4) return C({ numFailures: pe, failures: U, results: [], lastResult: void 0 });
|
|
1750
|
+
x.type === 3 ? z.push(P = R.clear()) : z.push(P = R.delete(a(x)));
|
|
1750
1751
|
} else {
|
|
1751
|
-
var
|
|
1752
|
-
if (M) for (var se = 0; se < $; ++se) z.push(P = oe && oe[se] !== void 0 ?
|
|
1753
|
-
else for (se = 0; se < $; ++se) z.push(P =
|
|
1752
|
+
var T = M ? T ? [O, E] : [O, null] : [E, null], W = T[0], oe = T[1];
|
|
1753
|
+
if (M) for (var se = 0; se < $; ++se) z.push(P = oe && oe[se] !== void 0 ? R[S](W[se], oe[se]) : R[S](W[se])), P.onerror = F;
|
|
1754
|
+
else for (se = 0; se < $; ++se) z.push(P = R[S](W[se])), P.onerror = F;
|
|
1754
1755
|
}
|
|
1755
1756
|
function Vt(ue) {
|
|
1756
1757
|
ue = ue.target.result, z.forEach(function(We, Ln) {
|
|
1757
1758
|
return We.error != null && (U[Ln] = We.error);
|
|
1758
|
-
}),
|
|
1759
|
+
}), C({ numFailures: pe, failures: U, results: S === "delete" ? E : z.map(function(We) {
|
|
1759
1760
|
return We.result;
|
|
1760
1761
|
}), lastResult: ue });
|
|
1761
1762
|
}
|
|
@@ -1764,43 +1765,43 @@ var jr = { exports: {} };
|
|
|
1764
1765
|
}, P.onsuccess = Vt;
|
|
1765
1766
|
});
|
|
1766
1767
|
}, getMany: function(w) {
|
|
1767
|
-
var y = w.trans,
|
|
1768
|
+
var y = w.trans, S = w.keys;
|
|
1768
1769
|
return new Promise(function(E, O) {
|
|
1769
1770
|
E = Z(E);
|
|
1770
|
-
for (var x,
|
|
1771
|
-
z = z.target,
|
|
1772
|
-
}, $ =
|
|
1773
|
-
|
|
1771
|
+
for (var x, C = y.objectStore(m), j = S.length, R = new Array(j), T = 0, M = 0, P = function(z) {
|
|
1772
|
+
z = z.target, R[z._pos] = z.result, ++M === T && E(R);
|
|
1773
|
+
}, $ = me(O), F = 0; F < j; ++F) S[F] != null && ((x = C.get(S[F]))._pos = F, x.onsuccess = P, x.onerror = $, ++T);
|
|
1774
|
+
T === 0 && E(R);
|
|
1774
1775
|
});
|
|
1775
1776
|
}, get: function(w) {
|
|
1776
|
-
var y = w.trans,
|
|
1777
|
+
var y = w.trans, S = w.key;
|
|
1777
1778
|
return new Promise(function(E, O) {
|
|
1778
1779
|
E = Z(E);
|
|
1779
|
-
var x = y.objectStore(m).get(
|
|
1780
|
-
x.onsuccess = function(
|
|
1781
|
-
return E(
|
|
1782
|
-
}, x.onerror =
|
|
1780
|
+
var x = y.objectStore(m).get(S);
|
|
1781
|
+
x.onsuccess = function(C) {
|
|
1782
|
+
return E(C.target.result);
|
|
1783
|
+
}, x.onerror = me(O);
|
|
1783
1784
|
});
|
|
1784
1785
|
}, query: (p = f, function(w) {
|
|
1785
|
-
return new Promise(function(y,
|
|
1786
|
+
return new Promise(function(y, S) {
|
|
1786
1787
|
y = Z(y);
|
|
1787
|
-
var E, O, x,
|
|
1788
|
+
var E, O, x, T = w.trans, C = w.values, j = w.limit, P = w.query, R = j === 1 / 0 ? void 0 : j, M = P.index, P = P.range, T = T.objectStore(m), M = M.isPrimaryKey ? T : T.index(M.name), P = a(P);
|
|
1788
1789
|
if (j === 0) return y({ result: [] });
|
|
1789
|
-
p ? ((
|
|
1790
|
+
p ? ((R = C ? M.getAll(P, R) : M.getAllKeys(P, R)).onsuccess = function($) {
|
|
1790
1791
|
return y({ result: $.target.result });
|
|
1791
|
-
},
|
|
1792
|
+
}, R.onerror = me(S)) : (E = 0, O = !C && "openKeyCursor" in M ? M.openKeyCursor(P) : M.openCursor(P), x = [], O.onsuccess = function($) {
|
|
1792
1793
|
var F = O.result;
|
|
1793
|
-
return F ? (x.push(
|
|
1794
|
-
}, O.onerror =
|
|
1794
|
+
return F ? (x.push(C ? F.value : F.primaryKey), ++E === j ? y({ result: x }) : void F.continue()) : y({ result: x });
|
|
1795
|
+
}, O.onerror = me(S));
|
|
1795
1796
|
});
|
|
1796
1797
|
}), openCursor: function(w) {
|
|
1797
|
-
var y = w.trans,
|
|
1798
|
-
return new Promise(function(
|
|
1799
|
-
|
|
1800
|
-
var M = E.index,
|
|
1801
|
-
P.onerror =
|
|
1802
|
-
var F, z, U,
|
|
1803
|
-
W ? (W.___id = ++ua, W.done = !1, F = W.continue.bind(W), z = (z = W.continuePrimaryKey) && z.bind(W), U = W.advance.bind(W),
|
|
1798
|
+
var y = w.trans, S = w.values, E = w.query, O = w.reverse, x = w.unique;
|
|
1799
|
+
return new Promise(function(C, j) {
|
|
1800
|
+
C = Z(C);
|
|
1801
|
+
var M = E.index, R = E.range, T = y.objectStore(m), T = M.isPrimaryKey ? T : T.index(M.name), M = O ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", P = !S && "openKeyCursor" in T ? T.openKeyCursor(a(R), M) : T.openCursor(a(R), M);
|
|
1802
|
+
P.onerror = me(j), P.onsuccess = Z(function($) {
|
|
1803
|
+
var F, z, U, pe, W = P.result;
|
|
1804
|
+
W ? (W.___id = ++ua, W.done = !1, F = W.continue.bind(W), z = (z = W.continuePrimaryKey) && z.bind(W), U = W.advance.bind(W), pe = function() {
|
|
1804
1805
|
throw new Error("Cursor not stopped");
|
|
1805
1806
|
}, W.trans = y, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
|
|
1806
1807
|
throw new Error("Cursor not started");
|
|
@@ -1823,36 +1824,36 @@ var jr = { exports: {} };
|
|
|
1823
1824
|
}, W.stop();
|
|
1824
1825
|
}
|
|
1825
1826
|
var Vt = new Promise(function(ue, We) {
|
|
1826
|
-
ue = Z(ue), P.onerror =
|
|
1827
|
-
W.stop = W.continue = W.continuePrimaryKey = W.advance =
|
|
1827
|
+
ue = Z(ue), P.onerror = me(We), W.fail = We, W.stop = function(Ln) {
|
|
1828
|
+
W.stop = W.continue = W.continuePrimaryKey = W.advance = pe, ue(Ln);
|
|
1828
1829
|
};
|
|
1829
1830
|
});
|
|
1830
1831
|
return P.onsuccess = Z(function(ue) {
|
|
1831
1832
|
P.onsuccess = se, se();
|
|
1832
1833
|
}), W.continue = F, W.continuePrimaryKey = z, W.advance = U, se(), Vt;
|
|
1833
|
-
},
|
|
1834
|
+
}, C(W)) : C(null);
|
|
1834
1835
|
}, j);
|
|
1835
1836
|
});
|
|
1836
1837
|
}, count: function(w) {
|
|
1837
|
-
var y = w.query,
|
|
1838
|
-
return new Promise(function(x,
|
|
1839
|
-
var j =
|
|
1840
|
-
|
|
1841
|
-
return x(
|
|
1842
|
-
}),
|
|
1838
|
+
var y = w.query, S = w.trans, E = y.index, O = y.range;
|
|
1839
|
+
return new Promise(function(x, C) {
|
|
1840
|
+
var j = S.objectStore(m), R = E.isPrimaryKey ? j : j.index(E.name), j = a(O), R = j ? R.count(j) : R.count();
|
|
1841
|
+
R.onsuccess = Z(function(T) {
|
|
1842
|
+
return x(T.target.result);
|
|
1843
|
+
}), R.onerror = me(C);
|
|
1843
1844
|
});
|
|
1844
1845
|
} };
|
|
1845
1846
|
}
|
|
1846
1847
|
var o, s, u, b = (s = g, u = mr((o = e).objectStoreNames), { schema: { name: o.name, tables: u.map(function(v) {
|
|
1847
1848
|
return s.objectStore(v);
|
|
1848
1849
|
}).map(function(v) {
|
|
1849
|
-
var p = v.keyPath, y = v.autoIncrement, m = B(p), w = {}, y = { name: v.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: y, unique: !0, extractKey: _n(p) }, indexes: mr(v.indexNames).map(function(
|
|
1850
|
-
return v.index(
|
|
1850
|
+
var p = v.keyPath, y = v.autoIncrement, m = B(p), w = {}, y = { name: v.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: y, unique: !0, extractKey: _n(p) }, indexes: mr(v.indexNames).map(function(S) {
|
|
1851
|
+
return v.index(S);
|
|
1851
1852
|
}).map(function(x) {
|
|
1852
|
-
var E = x.name, O = x.unique,
|
|
1853
|
-
return w[mt(x)] =
|
|
1854
|
-
}), getIndexByKeyPath: function(
|
|
1855
|
-
return w[mt(
|
|
1853
|
+
var E = x.name, O = x.unique, C = x.multiEntry, x = x.keyPath, C = { name: E, compound: B(x), keyPath: x, unique: O, multiEntry: C, extractKey: _n(x) };
|
|
1854
|
+
return w[mt(x)] = C;
|
|
1855
|
+
}), getIndexByKeyPath: function(S) {
|
|
1856
|
+
return w[mt(S)];
|
|
1856
1857
|
} };
|
|
1857
1858
|
return w[":id"] = y.primaryKey, p != null && (w[mt(p)] = y.primaryKey), y;
|
|
1858
1859
|
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), g = b.schema, f = b.hasGetAll, b = g.tables.map(i), d = {};
|
|
@@ -1883,7 +1884,7 @@ var jr = { exports: {} };
|
|
|
1883
1884
|
var o = a[i];
|
|
1884
1885
|
t.forEach(function(s) {
|
|
1885
1886
|
var u = function g(f, b) {
|
|
1886
|
-
return Fr(f, b) || (f =
|
|
1887
|
+
return Fr(f, b) || (f = ee(f)) && g(f, b);
|
|
1887
1888
|
}(s, i);
|
|
1888
1889
|
(!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, i, { get: function() {
|
|
1889
1890
|
return this.table(i);
|
|
@@ -1911,11 +1912,11 @@ var jr = { exports: {} };
|
|
|
1911
1912
|
return L.trans = o, L.transless = u, t !== 0 ? (Bt(e, n), f = t, ((g = o).storeNames.includes("$meta") ? g.table("$meta").get("version").then(function(b) {
|
|
1912
1913
|
return b ?? f;
|
|
1913
1914
|
}) : N.resolve(f)).then(function(b) {
|
|
1914
|
-
return v = b, p = o, m = n, w = [], b = (d = e)._versions, y = d._dbSchema = $t(0, d.idbdb, m), (b = b.filter(function(
|
|
1915
|
-
return
|
|
1916
|
-
})).length !== 0 ? (b.forEach(function(
|
|
1915
|
+
return v = b, p = o, m = n, w = [], b = (d = e)._versions, y = d._dbSchema = $t(0, d.idbdb, m), (b = b.filter(function(S) {
|
|
1916
|
+
return S._cfg.version >= v;
|
|
1917
|
+
})).length !== 0 ? (b.forEach(function(S) {
|
|
1917
1918
|
w.push(function() {
|
|
1918
|
-
var E = y, O =
|
|
1919
|
+
var E = y, O = S._cfg.dbschema;
|
|
1919
1920
|
Ft(d, E, m), Ft(d, O, m), y = d._dbSchema = O;
|
|
1920
1921
|
var x = En(E, O);
|
|
1921
1922
|
x.add.forEach(function(M) {
|
|
@@ -1931,38 +1932,38 @@ var jr = { exports: {} };
|
|
|
1931
1932
|
return P.deleteIndex($);
|
|
1932
1933
|
});
|
|
1933
1934
|
});
|
|
1934
|
-
var
|
|
1935
|
-
if (
|
|
1935
|
+
var C = S._cfg.contentUpgrade;
|
|
1936
|
+
if (C && S._cfg.version > v) {
|
|
1936
1937
|
Bt(d, m), p._memoizedTables = {};
|
|
1937
1938
|
var j = Qn(O);
|
|
1938
1939
|
x.del.forEach(function(M) {
|
|
1939
1940
|
j[M] = E[M];
|
|
1940
|
-
}), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype],
|
|
1941
|
-
var
|
|
1942
|
-
return
|
|
1941
|
+
}), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype], I(j), j), p.schema = j;
|
|
1942
|
+
var R, T = tn(C);
|
|
1943
|
+
return T && Je(), x = N.follow(function() {
|
|
1943
1944
|
var M;
|
|
1944
|
-
(
|
|
1945
|
-
}),
|
|
1946
|
-
return
|
|
1945
|
+
(R = C(p)) && T && (M = Pe.bind(null, null), R.then(M, M));
|
|
1946
|
+
}), R && typeof R.then == "function" ? N.resolve(R) : x.then(function() {
|
|
1947
|
+
return R;
|
|
1947
1948
|
});
|
|
1948
1949
|
}
|
|
1949
1950
|
}), w.push(function(E) {
|
|
1950
|
-
var O, x,
|
|
1951
|
-
O =
|
|
1951
|
+
var O, x, C = S._cfg.dbschema;
|
|
1952
|
+
O = C, x = E, [].slice.call(x.db.objectStoreNames).forEach(function(j) {
|
|
1952
1953
|
return O[j] == null && x.db.deleteObjectStore(j);
|
|
1953
1954
|
}), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype], d._storeNames, d._dbSchema), p.schema = d._dbSchema;
|
|
1954
1955
|
}), w.push(function(E) {
|
|
1955
|
-
d.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(d.idbdb.version / 10) ===
|
|
1956
|
+
d.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(d.idbdb.version / 10) === S._cfg.version ? (d.idbdb.deleteObjectStore("$meta"), delete d._dbSchema.$meta, d._storeNames = d._storeNames.filter(function(O) {
|
|
1956
1957
|
return O !== "$meta";
|
|
1957
|
-
})) : E.objectStore("$meta").put(
|
|
1958
|
+
})) : E.objectStore("$meta").put(S._cfg.version, "version"));
|
|
1958
1959
|
});
|
|
1959
|
-
}), function
|
|
1960
|
-
return w.length ? N.resolve(w.shift()(p.idbtrans)).then(
|
|
1960
|
+
}), function S() {
|
|
1961
|
+
return w.length ? N.resolve(w.shift()(p.idbtrans)).then(S) : N.resolve();
|
|
1961
1962
|
}().then(function() {
|
|
1962
1963
|
br(y, m);
|
|
1963
1964
|
})) : N.resolve();
|
|
1964
1965
|
var d, v, p, m, w, y;
|
|
1965
|
-
}).catch(s)) : (
|
|
1966
|
+
}).catch(s)) : (I(i).forEach(function(b) {
|
|
1966
1967
|
On(n, b, i[b].primKey, i[b].indexes);
|
|
1967
1968
|
}), Bt(e, n), void N.follow(function() {
|
|
1968
1969
|
return e.on.populate.fire(o);
|
|
@@ -1979,7 +1980,7 @@ var jr = { exports: {} };
|
|
|
1979
1980
|
if (s.change.length || s.recreate) return console.warn("Unable to patch indexes of table ".concat(s.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
1980
1981
|
var u = t.objectStore(s.name);
|
|
1981
1982
|
s.add.forEach(function(g) {
|
|
1982
|
-
|
|
1983
|
+
ye && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(g.src)), Gt(u, g);
|
|
1983
1984
|
});
|
|
1984
1985
|
}(i[a]);
|
|
1985
1986
|
if (typeof o == "object") return o.value;
|
|
@@ -2013,8 +2014,8 @@ var jr = { exports: {} };
|
|
|
2013
2014
|
}), i;
|
|
2014
2015
|
}
|
|
2015
2016
|
function br(e, t) {
|
|
2016
|
-
|
|
2017
|
-
t.db.objectStoreNames.contains(n) || (
|
|
2017
|
+
I(e).forEach(function(n) {
|
|
2018
|
+
t.db.objectStoreNames.contains(n) || (ye && console.debug("Dexie: Creating missing table", n), On(t, n, e[n].primKey, e[n].indexes));
|
|
2018
2019
|
});
|
|
2019
2020
|
}
|
|
2020
2021
|
function Gt(e, t) {
|
|
@@ -2048,7 +2049,7 @@ var jr = { exports: {} };
|
|
|
2048
2049
|
});
|
|
2049
2050
|
}
|
|
2050
2051
|
var ga = (Ut.prototype._parseStoresSpec = function(e, t) {
|
|
2051
|
-
|
|
2052
|
+
I(e).forEach(function(n) {
|
|
2052
2053
|
if (e[n] !== null) {
|
|
2053
2054
|
var a = vr(e[n]), i = a.shift();
|
|
2054
2055
|
if (i.unique = !0, i.multi) throw new G.Schema("Primary key cannot be multi-valued");
|
|
@@ -2064,7 +2065,7 @@ var jr = { exports: {} };
|
|
|
2064
2065
|
var n = t._versions, a = {}, i = {};
|
|
2065
2066
|
return n.forEach(function(o) {
|
|
2066
2067
|
J(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
|
|
2067
|
-
}), t._dbSchema = i, Sn(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables],
|
|
2068
|
+
}), t._dbSchema = i, Sn(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], I(i), i), t._storeNames = I(i), this;
|
|
2068
2069
|
}, Ut.prototype.upgrade = function(e) {
|
|
2069
2070
|
return this._cfg.contentUpgrade = rn(this._cfg.contentUpgrade || Q, e), this;
|
|
2070
2071
|
}, Ut);
|
|
@@ -2147,10 +2148,10 @@ var jr = { exports: {} };
|
|
|
2147
2148
|
return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
|
|
2148
2149
|
}
|
|
2149
2150
|
function zt(e, t) {
|
|
2150
|
-
return
|
|
2151
|
+
return I(t).forEach(function(n) {
|
|
2151
2152
|
e[n] ? vt(e[n], t[n]) : e[n] = function a(i) {
|
|
2152
2153
|
var o, s, u = {};
|
|
2153
|
-
for (o in i)
|
|
2154
|
+
for (o in i) q(i, o) && (s = i[o], u[o] = !s || typeof s != "object" || Vn.has(s.constructor) ? s : a(s));
|
|
2154
2155
|
return u;
|
|
2155
2156
|
}(t[n]);
|
|
2156
2157
|
}), e;
|
|
@@ -2160,7 +2161,7 @@ var jr = { exports: {} };
|
|
|
2160
2161
|
return t[n] && wr(t[n], e[n]);
|
|
2161
2162
|
});
|
|
2162
2163
|
}
|
|
2163
|
-
xe(ce.prototype, ((
|
|
2164
|
+
xe(ce.prototype, ((he = { add: function(e) {
|
|
2164
2165
|
return vt(this, e), this;
|
|
2165
2166
|
}, addKey: function(e) {
|
|
2166
2167
|
return bt(this, e, e), this;
|
|
@@ -2174,7 +2175,7 @@ var jr = { exports: {} };
|
|
|
2174
2175
|
return t && H(t.from, e) <= 0 && 0 <= H(t.to, e);
|
|
2175
2176
|
} })[en] = function() {
|
|
2176
2177
|
return Wt(this);
|
|
2177
|
-
},
|
|
2178
|
+
}, he));
|
|
2178
2179
|
var Fe = {}, In = {}, Cn = !1;
|
|
2179
2180
|
function Ht(e) {
|
|
2180
2181
|
zt(In, e), Cn || (Cn = !0, setTimeout(function() {
|
|
@@ -2211,7 +2212,7 @@ var jr = { exports: {} };
|
|
|
2211
2212
|
function ya(e) {
|
|
2212
2213
|
var t = e._state, n = e._deps.indexedDB;
|
|
2213
2214
|
if (t.isBeingOpened || e.idbdb) return t.dbReadyPromise.then(function() {
|
|
2214
|
-
return t.dbOpenError ?
|
|
2215
|
+
return t.dbOpenError ? te(t.dbOpenError) : e;
|
|
2215
2216
|
});
|
|
2216
2217
|
t.isBeingOpened = !0, t.dbOpenError = null, t.openComplete = !1;
|
|
2217
2218
|
var a = t.openCanceller, i = Math.round(10 * e.verno), o = !1;
|
|
@@ -2223,28 +2224,28 @@ var jr = { exports: {} };
|
|
|
2223
2224
|
if (s(), !n) throw new G.MissingAPI();
|
|
2224
2225
|
var m = e.name, w = t.autoSchema || !i ? n.open(m) : n.open(m, i);
|
|
2225
2226
|
if (!w) throw new G.MissingAPI();
|
|
2226
|
-
w.onerror =
|
|
2227
|
-
var
|
|
2228
|
-
b = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, b.abort(), w.result.close(), (
|
|
2227
|
+
w.onerror = me(p), w.onblocked = Z(e._fireOnBlocked), w.onupgradeneeded = Z(function(y) {
|
|
2228
|
+
var S;
|
|
2229
|
+
b = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, b.abort(), w.result.close(), (S = n.deleteDatabase(m)).onsuccess = S.onerror = Z(function() {
|
|
2229
2230
|
p(new G.NoSuchDatabase("Database ".concat(m, " doesnt exist")));
|
|
2230
|
-
})) : (b.onerror =
|
|
2231
|
+
})) : (b.onerror = me(p), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, d = y < 1, e.idbdb = w.result, o && pa(e, b), ha(e, y / 10, b, p));
|
|
2231
2232
|
}, p), w.onsuccess = Z(function() {
|
|
2232
2233
|
b = null;
|
|
2233
|
-
var y,
|
|
2234
|
+
var y, S, E, O, x, C = e.idbdb = w.result, j = St(C.objectStoreNames);
|
|
2234
2235
|
if (0 < j.length) try {
|
|
2235
|
-
var
|
|
2236
|
-
if (t.autoSchema)
|
|
2237
|
-
else if (Ft(e, e._dbSchema,
|
|
2238
|
-
return
|
|
2239
|
-
})) && !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."),
|
|
2240
|
-
Bt(e,
|
|
2236
|
+
var R = C.transaction((O = j).length === 1 ? O[0] : O, "readonly");
|
|
2237
|
+
if (t.autoSchema) S = C, E = R, (y = e).verno = S.version / 10, E = y._dbSchema = $t(0, S, E), y._storeNames = St(S.objectStoreNames, 0), Lt(y, [y._allTables], I(E), E);
|
|
2238
|
+
else if (Ft(e, e._dbSchema, R), ((x = En($t(0, (x = e).idbdb, R), x._dbSchema)).add.length || x.change.some(function(T) {
|
|
2239
|
+
return T.add.length || T.change.length;
|
|
2240
|
+
})) && !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."), C.close(), i = C.version + 1, o = !0, v(u());
|
|
2241
|
+
Bt(e, R);
|
|
2241
2242
|
} catch {
|
|
2242
2243
|
}
|
|
2243
|
-
Ze.push(e),
|
|
2244
|
-
t.vcFired = !0, e.on("versionchange").fire(
|
|
2245
|
-
}),
|
|
2246
|
-
e.on("close").fire(
|
|
2247
|
-
}), d && (x = e._deps,
|
|
2244
|
+
Ze.push(e), C.onversionchange = Z(function(T) {
|
|
2245
|
+
t.vcFired = !0, e.on("versionchange").fire(T);
|
|
2246
|
+
}), C.onclose = Z(function(T) {
|
|
2247
|
+
e.on("close").fire(T);
|
|
2248
|
+
}), d && (x = e._deps, R = m, C = x.indexedDB, x = x.IDBKeyRange, kn(C) || R === Tt || xn(C, x).put({ name: R }).catch(Q)), v();
|
|
2248
2249
|
}, p);
|
|
2249
2250
|
}).catch(function(v) {
|
|
2250
2251
|
switch (v == null ? void 0 : v.name) {
|
|
@@ -2284,7 +2285,7 @@ var jr = { exports: {} };
|
|
|
2284
2285
|
b && b.abort();
|
|
2285
2286
|
} catch {
|
|
2286
2287
|
}
|
|
2287
|
-
return a === t.openCanceller && e._close(),
|
|
2288
|
+
return a === t.openCanceller && e._close(), te(v);
|
|
2288
2289
|
}).finally(function() {
|
|
2289
2290
|
t.openComplete = !0, f();
|
|
2290
2291
|
}).then(function() {
|
|
@@ -2319,10 +2320,10 @@ var jr = { exports: {} };
|
|
|
2319
2320
|
return l(l({}, e), { table: function(t) {
|
|
2320
2321
|
var n = e.table(t), a = n.schema, i = {}, o = [];
|
|
2321
2322
|
function s(d, v, p) {
|
|
2322
|
-
var m = mt(d), w = i[m] = i[m] || [], y = d == null ? 0 : typeof d == "string" ? 1 : d.length,
|
|
2323
|
-
return w.push(
|
|
2323
|
+
var m = mt(d), w = i[m] = i[m] || [], y = d == null ? 0 : typeof d == "string" ? 1 : d.length, S = 0 < v, S = l(l({}, p), { name: S ? "".concat(m, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: S, keyTail: v, keyLength: y, extractKey: _n(d), unique: !S && p.unique });
|
|
2324
|
+
return w.push(S), S.isPrimaryKey || o.push(S), 1 < y && s(y === 2 ? d[0] : d.slice(0, y - 1), v + 1, p), w.sort(function(E, O) {
|
|
2324
2325
|
return E.keyTail - O.keyTail;
|
|
2325
|
-
}),
|
|
2326
|
+
}), S;
|
|
2326
2327
|
}
|
|
2327
2328
|
t = s(a.primaryKey.keyPath, 0, a.primaryKey), i[":id"] = [t];
|
|
2328
2329
|
for (var u = 0, g = a.indexes; u < g.length; u++) {
|
|
@@ -2341,32 +2342,32 @@ var jr = { exports: {} };
|
|
|
2341
2342
|
return n.query(b(d));
|
|
2342
2343
|
}, openCursor: function(d) {
|
|
2343
2344
|
var v = d.query.index, p = v.keyTail, m = v.isVirtual, w = v.keyLength;
|
|
2344
|
-
return m ? n.openCursor(b(d)).then(function(
|
|
2345
|
-
return
|
|
2345
|
+
return m ? n.openCursor(b(d)).then(function(S) {
|
|
2346
|
+
return S && y(S);
|
|
2346
2347
|
}) : n.openCursor(d);
|
|
2347
|
-
function y(
|
|
2348
|
-
return Object.create(
|
|
2349
|
-
E != null ?
|
|
2348
|
+
function y(S) {
|
|
2349
|
+
return Object.create(S, { continue: { value: function(E) {
|
|
2350
|
+
E != null ? S.continue(Yt(E, d.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : d.unique ? S.continue(S.key.slice(0, w).concat(d.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : S.continue();
|
|
2350
2351
|
} }, continuePrimaryKey: { value: function(E, O) {
|
|
2351
|
-
|
|
2352
|
+
S.continuePrimaryKey(Yt(E, e.MAX_KEY, p), O);
|
|
2352
2353
|
} }, primaryKey: { get: function() {
|
|
2353
|
-
return
|
|
2354
|
+
return S.primaryKey;
|
|
2354
2355
|
} }, key: { get: function() {
|
|
2355
|
-
var E =
|
|
2356
|
+
var E = S.key;
|
|
2356
2357
|
return w === 1 ? E[0] : E.slice(0, w);
|
|
2357
2358
|
} }, value: { get: function() {
|
|
2358
|
-
return
|
|
2359
|
+
return S.value;
|
|
2359
2360
|
} } });
|
|
2360
2361
|
}
|
|
2361
2362
|
} });
|
|
2362
2363
|
} });
|
|
2363
2364
|
} };
|
|
2364
2365
|
function jn(e, t, n, a) {
|
|
2365
|
-
return n = n || {}, a = a || "",
|
|
2366
|
+
return n = n || {}, a = a || "", I(e).forEach(function(i) {
|
|
2366
2367
|
var o, s, u;
|
|
2367
|
-
|
|
2368
|
-
}),
|
|
2369
|
-
|
|
2368
|
+
q(t, i) ? (o = e[i], s = t[i], typeof o == "object" && typeof s == "object" && o && s ? (u = qt(o)) !== qt(s) ? n[a + i] = t[i] : u === "Object" ? jn(o, s, n, a + i + ".") : o !== s && (n[a + i] = t[i]) : o !== s && (n[a + i] = t[i])) : n[a + i] = void 0;
|
|
2369
|
+
}), I(t).forEach(function(i) {
|
|
2370
|
+
q(e, i) || (n[a + i] = t[i]);
|
|
2370
2371
|
}), n;
|
|
2371
2372
|
}
|
|
2372
2373
|
function Mn(e, t) {
|
|
@@ -2399,8 +2400,8 @@ var jr = { exports: {} };
|
|
|
2399
2400
|
return function d(v, p, m) {
|
|
2400
2401
|
return n.query({ trans: v, values: !1, query: { index: a, range: p }, limit: m }).then(function(w) {
|
|
2401
2402
|
var y = w.result;
|
|
2402
|
-
return b({ type: "delete", keys: y, trans: v }).then(function(
|
|
2403
|
-
return 0 <
|
|
2403
|
+
return b({ type: "delete", keys: y, trans: v }).then(function(S) {
|
|
2404
|
+
return 0 < S.numFailures ? Promise.reject(S.failures[0]) : y.length < m ? { failures: [], numFailures: 0, lastResult: void 0 } : d(v, l(l({}, p), { lower: y[y.length - 1], lowerOpen: !0 }), m);
|
|
2404
2405
|
});
|
|
2405
2406
|
});
|
|
2406
2407
|
}(i.trans, i.range, 1e4);
|
|
@@ -2410,19 +2411,19 @@ var jr = { exports: {} };
|
|
|
2410
2411
|
function b(d) {
|
|
2411
2412
|
var v, p, m, w = L.trans, y = d.keys || Mn(a, d);
|
|
2412
2413
|
if (!y) throw new Error("Keys missing");
|
|
2413
|
-
return (d = d.type === "add" || d.type === "put" ? l(l({}, d), { keys: y }) : l({}, d)).type !== "delete" && (d.values = k([], d.values)), d.keys && (d.keys = k([], d.keys)), v = n, m = y, ((p = d).type === "add" ? Promise.resolve([]) : v.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(
|
|
2414
|
+
return (d = d.type === "add" || d.type === "put" ? l(l({}, d), { keys: y }) : l({}, d)).type !== "delete" && (d.values = k([], d.values)), d.keys && (d.keys = k([], d.keys)), v = n, m = y, ((p = d).type === "add" ? Promise.resolve([]) : v.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(S) {
|
|
2414
2415
|
var E = y.map(function(O, x) {
|
|
2415
|
-
var
|
|
2416
|
-
return d.type === "delete" ? u.fire.call(M, O,
|
|
2417
|
-
|
|
2416
|
+
var C, j, R, T = S[x], M = { onerror: null, onsuccess: null };
|
|
2417
|
+
return d.type === "delete" ? u.fire.call(M, O, T, w) : d.type === "add" || T === void 0 ? (C = g.fire.call(M, O, d.values[x], w), O == null && C != null && (d.keys[x] = O = C, a.outbound || le(d.values[x], a.keyPath, O))) : (C = jn(T, d.values[x]), (j = f.fire.call(M, C, O, T, w)) && (R = d.values[x], Object.keys(j).forEach(function(P) {
|
|
2418
|
+
q(R, P) ? R[P] = j[P] : le(R, P, j[P]);
|
|
2418
2419
|
}))), M;
|
|
2419
2420
|
});
|
|
2420
2421
|
return n.mutate(d).then(function(O) {
|
|
2421
|
-
for (var x = O.failures,
|
|
2422
|
-
var
|
|
2423
|
-
|
|
2422
|
+
for (var x = O.failures, C = O.results, j = O.numFailures, O = O.lastResult, R = 0; R < y.length; ++R) {
|
|
2423
|
+
var T = (C || y)[R], M = E[R];
|
|
2424
|
+
T == null ? M.onerror && M.onerror(x[R]) : M.onsuccess && M.onsuccess(d.type === "put" && S[R] ? d.values[R] : T);
|
|
2424
2425
|
}
|
|
2425
|
-
return { failures: x, results:
|
|
2426
|
+
return { failures: x, results: C, numFailures: j, lastResult: O };
|
|
2426
2427
|
}).catch(function(O) {
|
|
2427
2428
|
return E.forEach(function(x) {
|
|
2428
2429
|
return x.onerror && x.onerror(O);
|
|
@@ -2482,27 +2483,27 @@ var jr = { exports: {} };
|
|
|
2482
2483
|
function m(P) {
|
|
2483
2484
|
return P = "idb://".concat(t, "/").concat(a, "/").concat(P), O[P] || (O[P] = new ce());
|
|
2484
2485
|
}
|
|
2485
|
-
var w, y,
|
|
2486
|
+
var w, y, S, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), x = m(""), C = m(":dels"), j = p.type, M = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Mn(s, p).filter(function(P) {
|
|
2486
2487
|
return P;
|
|
2487
|
-
}), p.values] : [],
|
|
2488
|
-
return B(
|
|
2488
|
+
}), p.values] : [], R = M[0], T = M[1], M = p.trans._cache;
|
|
2489
|
+
return B(R) ? (x.addKeys(R), (M = j === "delete" || R.length === T.length ? Or(R, M) : null) || C.addKeys(R), (M || T) && (w = m, y = M, S = T, o.indexes.forEach(function(P) {
|
|
2489
2490
|
var $ = w(P.name || "");
|
|
2490
2491
|
function F(U) {
|
|
2491
2492
|
return U != null ? P.extractKey(U) : null;
|
|
2492
2493
|
}
|
|
2493
2494
|
function z(U) {
|
|
2494
|
-
return P.multiEntry && B(U) ? U.forEach(function(
|
|
2495
|
-
return $.addKey(
|
|
2495
|
+
return P.multiEntry && B(U) ? U.forEach(function(pe) {
|
|
2496
|
+
return $.addKey(pe);
|
|
2496
2497
|
}) : $.addKey(U);
|
|
2497
2498
|
}
|
|
2498
|
-
(y ||
|
|
2499
|
-
var W = y && F(y[oe]), oe =
|
|
2499
|
+
(y || S).forEach(function(U, oe) {
|
|
2500
|
+
var W = y && F(y[oe]), oe = S && F(S[oe]);
|
|
2500
2501
|
H(W, oe) !== 0 && (W != null && z(W), oe != null && z(oe));
|
|
2501
2502
|
});
|
|
2502
|
-
}))) :
|
|
2503
|
+
}))) : R ? (T = { from: R.lower, to: R.upper }, C.add(T), x.add(T)) : (x.add(n), C.add(n), o.indexes.forEach(function(P) {
|
|
2503
2504
|
return m(P.name).add(n);
|
|
2504
2505
|
})), i.mutate(p).then(function(P) {
|
|
2505
|
-
return !
|
|
2506
|
+
return !R || p.type !== "add" && p.type !== "put" || (x.addKeys(P.results), f && f.forEach(function($) {
|
|
2506
2507
|
var F = p.values.map(function(U) {
|
|
2507
2508
|
return $.extractKey(U);
|
|
2508
2509
|
}), z = $.keyPath.findIndex(function(U) {
|
|
@@ -2521,25 +2522,25 @@ var jr = { exports: {} };
|
|
|
2521
2522
|
}, getMany: function(p) {
|
|
2522
2523
|
return [s, new ce().addKeys(p.keys)];
|
|
2523
2524
|
}, count: d, query: d, openCursor: d };
|
|
2524
|
-
return
|
|
2525
|
+
return I(v).forEach(function(p) {
|
|
2525
2526
|
b[p] = function(m) {
|
|
2526
|
-
var w = L.subscr, y = !!w,
|
|
2527
|
+
var w = L.subscr, y = !!w, S = xr(L, i) && kr(p, m) ? m.obsSet = {} : w;
|
|
2527
2528
|
if (y) {
|
|
2528
|
-
var E = function(
|
|
2529
|
-
return
|
|
2529
|
+
var E = function(T) {
|
|
2530
|
+
return T = "idb://".concat(t, "/").concat(a, "/").concat(T), S[T] || (S[T] = new ce());
|
|
2530
2531
|
}, O = E(""), x = E(":dels"), w = v[p](m), y = w[0], w = w[1];
|
|
2531
2532
|
if ((p === "query" && y.isPrimaryKey && !m.values ? x : E(y.name || "")).add(w), !y.isPrimaryKey) {
|
|
2532
2533
|
if (p !== "count") {
|
|
2533
|
-
var
|
|
2534
|
-
return i[p].apply(this, arguments).then(function(
|
|
2534
|
+
var C = p === "query" && g && m.values && i.query(l(l({}, m), { values: !1 }));
|
|
2535
|
+
return i[p].apply(this, arguments).then(function(T) {
|
|
2535
2536
|
if (p === "query") {
|
|
2536
|
-
if (g && m.values) return
|
|
2537
|
-
return F = F.result, O.addKeys(F),
|
|
2537
|
+
if (g && m.values) return C.then(function(F) {
|
|
2538
|
+
return F = F.result, O.addKeys(F), T;
|
|
2538
2539
|
});
|
|
2539
|
-
var M = m.values ?
|
|
2540
|
+
var M = m.values ? T.result.map(u) : T.result;
|
|
2540
2541
|
(m.values ? O : x).addKeys(M);
|
|
2541
2542
|
} else if (p === "openCursor") {
|
|
2542
|
-
var P =
|
|
2543
|
+
var P = T, $ = m.values;
|
|
2543
2544
|
return P && Object.create(P, { key: { get: function() {
|
|
2544
2545
|
return x.addKey(P.primaryKey), P.key;
|
|
2545
2546
|
} }, primaryKey: { get: function() {
|
|
@@ -2549,7 +2550,7 @@ var jr = { exports: {} };
|
|
|
2549
2550
|
return $ && O.addKey(P.primaryKey), P.value;
|
|
2550
2551
|
} } });
|
|
2551
2552
|
}
|
|
2552
|
-
return
|
|
2553
|
+
return T;
|
|
2553
2554
|
});
|
|
2554
2555
|
}
|
|
2555
2556
|
x.add(n);
|
|
@@ -2578,11 +2579,11 @@ var jr = { exports: {} };
|
|
|
2578
2579
|
if (!v || v.length === 0) return e;
|
|
2579
2580
|
var s = t.query.index, u = s.multiEntry, g = t.query.range, f = a.schema.primaryKey.extractKey, b = s.extractKey, d = (s.lowLevelIndex || s).extractKey, v = v.reduce(function(p, m) {
|
|
2580
2581
|
var w = p, y = [];
|
|
2581
|
-
if (m.type === "add" || m.type === "put") for (var
|
|
2582
|
-
var O, x = m.values[E],
|
|
2583
|
-
|
|
2582
|
+
if (m.type === "add" || m.type === "put") for (var S = new ce(), E = m.values.length - 1; 0 <= E; --E) {
|
|
2583
|
+
var O, x = m.values[E], C = f(x);
|
|
2584
|
+
S.hasKey(C) || (O = b(x), (u && B(O) ? O.some(function(M) {
|
|
2584
2585
|
return Kn(M, g);
|
|
2585
|
-
}) : Kn(O, g)) && (
|
|
2586
|
+
}) : Kn(O, g)) && (S.addKey(C), y.push(x)));
|
|
2586
2587
|
}
|
|
2587
2588
|
switch (m.type) {
|
|
2588
2589
|
case "add":
|
|
@@ -2600,15 +2601,15 @@ var jr = { exports: {} };
|
|
|
2600
2601
|
}));
|
|
2601
2602
|
break;
|
|
2602
2603
|
case "delete":
|
|
2603
|
-
var
|
|
2604
|
+
var R = new ce().addKeys(m.keys);
|
|
2604
2605
|
w = p.filter(function(P) {
|
|
2605
|
-
return !
|
|
2606
|
+
return !R.hasKey(t.values ? f(P) : P);
|
|
2606
2607
|
});
|
|
2607
2608
|
break;
|
|
2608
2609
|
case "deleteRange":
|
|
2609
|
-
var
|
|
2610
|
+
var T = m.range;
|
|
2610
2611
|
w = p.filter(function(P) {
|
|
2611
|
-
return !Kn(f(P),
|
|
2612
|
+
return !Kn(f(P), T);
|
|
2612
2613
|
});
|
|
2613
2614
|
}
|
|
2614
2615
|
return w;
|
|
@@ -2662,16 +2663,16 @@ var jr = { exports: {} };
|
|
|
2662
2663
|
var m = e.table(v), w = p.optimisticOps.filter(function($) {
|
|
2663
2664
|
return $.trans === u;
|
|
2664
2665
|
});
|
|
2665
|
-
if (u._explicit && g && u.mutatedParts) for (var y = 0,
|
|
2666
|
+
if (u._explicit && g && u.mutatedParts) for (var y = 0, S = Object.values(p.queries.query); y < S.length; y++) for (var E = 0, O = (j = S[y]).slice(); E < O.length; E++) Pn((R = O[E]).obsSet, u.mutatedParts) && (Me(j, R), R.subscribers.forEach(function($) {
|
|
2666
2667
|
return f.add($);
|
|
2667
2668
|
}));
|
|
2668
2669
|
else if (0 < w.length) {
|
|
2669
2670
|
p.optimisticOps = p.optimisticOps.filter(function($) {
|
|
2670
2671
|
return $.trans !== u;
|
|
2671
2672
|
});
|
|
2672
|
-
for (var x = 0,
|
|
2673
|
+
for (var x = 0, C = Object.values(p.queries.query); x < C.length; x++) for (var j, R, T, M = 0, P = (j = C[x]).slice(); M < P.length; M++) (R = P[M]).res != null && u.mutatedParts && (g && !R.dirty ? (T = Object.isFrozen(R.res), T = Dr(R.res, R.req, w, m, R, T), R.dirty ? (Me(j, R), R.subscribers.forEach(function($) {
|
|
2673
2674
|
return f.add($);
|
|
2674
|
-
})) :
|
|
2675
|
+
})) : T !== R.res && (R.res = T, R.promise = N.resolve({ result: T }))) : (R.dirty && Me(j, R), R.subscribers.forEach(function($) {
|
|
2675
2676
|
return f.add($);
|
|
2676
2677
|
})));
|
|
2677
2678
|
}
|
|
@@ -2706,30 +2707,30 @@ var jr = { exports: {} };
|
|
|
2706
2707
|
}), s) : a.mutate(o);
|
|
2707
2708
|
}, query: function(o) {
|
|
2708
2709
|
if (!xr(L, a) || !kr("query", o)) return a.query(o);
|
|
2709
|
-
var s = ((f = L.trans) === null || f === void 0 ? void 0 : f.db._options.cache) === "immutable", d = L, u = d.requery, g = d.signal, f = function(m, w, y,
|
|
2710
|
+
var s = ((f = L.trans) === null || f === void 0 ? void 0 : f.db._options.cache) === "immutable", d = L, u = d.requery, g = d.signal, f = function(m, w, y, S) {
|
|
2710
2711
|
var E = Fe["idb://".concat(m, "/").concat(w)];
|
|
2711
2712
|
if (!E) return [];
|
|
2712
2713
|
if (!(w = E.queries[y])) return [null, !1, E, null];
|
|
2713
|
-
var O = w[(
|
|
2714
|
+
var O = w[(S.query ? S.query.index.name : null) || ""];
|
|
2714
2715
|
if (!O) return [null, !1, E, null];
|
|
2715
2716
|
switch (y) {
|
|
2716
2717
|
case "query":
|
|
2717
|
-
var x = O.find(function(
|
|
2718
|
-
return
|
|
2718
|
+
var x = O.find(function(C) {
|
|
2719
|
+
return C.req.limit === S.limit && C.req.values === S.values && Pr(C.req.query.range, S.query.range);
|
|
2719
2720
|
});
|
|
2720
|
-
return x ? [x, !0, E, O] : [O.find(function(
|
|
2721
|
-
return ("limit" in
|
|
2721
|
+
return x ? [x, !0, E, O] : [O.find(function(C) {
|
|
2722
|
+
return ("limit" in C.req ? C.req.limit : 1 / 0) >= S.limit && (!S.values || C.req.values) && _a(C.req.query.range, S.query.range);
|
|
2722
2723
|
}), !1, E, O];
|
|
2723
2724
|
case "count":
|
|
2724
|
-
return x = O.find(function(
|
|
2725
|
-
return Pr(
|
|
2725
|
+
return x = O.find(function(C) {
|
|
2726
|
+
return Pr(C.req.query.range, S.query.range);
|
|
2726
2727
|
}), [x, !!x, E, O];
|
|
2727
2728
|
}
|
|
2728
2729
|
}(t, n, "query", o), b = f[0], d = f[1], v = f[2], p = f[3];
|
|
2729
2730
|
return b && d ? b.obsSet = o.obsSet : (d = a.query(o).then(function(m) {
|
|
2730
2731
|
var w = m.result;
|
|
2731
2732
|
if (b && (b.res = w), s) {
|
|
2732
|
-
for (var y = 0,
|
|
2733
|
+
for (var y = 0, S = w.length; y < S; ++y) Object.freeze(w[y]);
|
|
2733
2734
|
Object.freeze(w);
|
|
2734
2735
|
} else m.result = je(w);
|
|
2735
2736
|
return m;
|
|
@@ -2746,7 +2747,7 @@ var jr = { exports: {} };
|
|
|
2746
2747
|
return a === "db" ? t : Reflect.get(n, a, i);
|
|
2747
2748
|
} });
|
|
2748
2749
|
}
|
|
2749
|
-
var Ee = (
|
|
2750
|
+
var Ee = (ne.prototype.version = function(e) {
|
|
2750
2751
|
if (isNaN(e) || e < 0.1) throw new G.Type("Given version is not a positive number");
|
|
2751
2752
|
if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new G.Schema("Cannot add version when database is open");
|
|
2752
2753
|
this.verno = Math.max(this.verno, e);
|
|
@@ -2754,7 +2755,7 @@ var jr = { exports: {} };
|
|
|
2754
2755
|
return a._cfg.version === e;
|
|
2755
2756
|
})[0];
|
|
2756
2757
|
return n || (n = new this.Version(e), t.push(n), t.sort(fa), n.stores({}), this._state.autoSchema = !1, n);
|
|
2757
|
-
},
|
|
2758
|
+
}, ne.prototype._whenReady = function(e) {
|
|
2758
2759
|
var t = this;
|
|
2759
2760
|
return this.idbdb && (this._state.openComplete || L.letThrough || this._vip) ? e() : new N(function(n, a) {
|
|
2760
2761
|
if (t._state.openComplete) return a(new G.DatabaseClosed(t._state.dbOpenError));
|
|
@@ -2764,22 +2765,22 @@ var jr = { exports: {} };
|
|
|
2764
2765
|
}
|
|
2765
2766
|
t._state.dbReadyPromise.then(n, a);
|
|
2766
2767
|
}).then(e);
|
|
2767
|
-
},
|
|
2768
|
+
}, ne.prototype.use = function(e) {
|
|
2768
2769
|
var t = e.stack, n = e.create, a = e.level, i = e.name;
|
|
2769
2770
|
return i && this.unuse({ stack: t, name: i }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: a ?? 10, name: i }), e.sort(function(o, s) {
|
|
2770
2771
|
return o.level - s.level;
|
|
2771
2772
|
}), this;
|
|
2772
|
-
},
|
|
2773
|
+
}, ne.prototype.unuse = function(e) {
|
|
2773
2774
|
var t = e.stack, n = e.name, a = e.create;
|
|
2774
2775
|
return t && this._middlewares[t] && (this._middlewares[t] = this._middlewares[t].filter(function(i) {
|
|
2775
2776
|
return a ? i.create !== a : !!n && i.name !== n;
|
|
2776
2777
|
})), this;
|
|
2777
|
-
},
|
|
2778
|
+
}, ne.prototype.open = function() {
|
|
2778
2779
|
var e = this;
|
|
2779
2780
|
return Le(Ae, function() {
|
|
2780
2781
|
return ya(e);
|
|
2781
2782
|
});
|
|
2782
|
-
},
|
|
2783
|
+
}, ne.prototype._close = function() {
|
|
2783
2784
|
var e = this._state, t = Ze.indexOf(this);
|
|
2784
2785
|
if (0 <= t && Ze.splice(t, 1), this.idbdb) {
|
|
2785
2786
|
try {
|
|
@@ -2793,10 +2794,10 @@ var jr = { exports: {} };
|
|
|
2793
2794
|
}), e.openCanceller = new N(function(n, a) {
|
|
2794
2795
|
e.cancelOpen = a;
|
|
2795
2796
|
}));
|
|
2796
|
-
},
|
|
2797
|
+
}, ne.prototype.close = function(n) {
|
|
2797
2798
|
var t = (n === void 0 ? { disableAutoOpen: !0 } : n).disableAutoOpen, n = this._state;
|
|
2798
2799
|
t ? (n.isBeingOpened && n.cancelOpen(new G.DatabaseClosed()), this._close(), n.autoOpen = !1, n.dbOpenError = new G.DatabaseClosed()) : (this._close(), n.autoOpen = this._options.autoOpen || n.isBeingOpened, n.openComplete = !1, n.dbOpenError = null);
|
|
2799
|
-
},
|
|
2800
|
+
}, ne.prototype.delete = function(e) {
|
|
2800
2801
|
var t = this;
|
|
2801
2802
|
e === void 0 && (e = { disableAutoOpen: !0 });
|
|
2802
2803
|
var n = 0 < arguments.length && typeof arguments[0] != "object", a = this._state;
|
|
@@ -2807,28 +2808,28 @@ var jr = { exports: {} };
|
|
|
2807
2808
|
u.onsuccess = Z(function() {
|
|
2808
2809
|
var g, f, b;
|
|
2809
2810
|
g = t._deps, f = t.name, b = g.indexedDB, g = g.IDBKeyRange, kn(b) || f === Tt || xn(b, g).delete(f).catch(Q), i();
|
|
2810
|
-
}), u.onerror =
|
|
2811
|
+
}), u.onerror = me(o), u.onblocked = t._fireOnBlocked;
|
|
2811
2812
|
}
|
|
2812
2813
|
if (n) throw new G.InvalidArgument("Invalid closeOptions argument to db.delete()");
|
|
2813
2814
|
a.isBeingOpened ? a.dbReadyPromise.then(s) : s();
|
|
2814
2815
|
});
|
|
2815
|
-
},
|
|
2816
|
+
}, ne.prototype.backendDB = function() {
|
|
2816
2817
|
return this.idbdb;
|
|
2817
|
-
},
|
|
2818
|
+
}, ne.prototype.isOpen = function() {
|
|
2818
2819
|
return this.idbdb !== null;
|
|
2819
|
-
},
|
|
2820
|
+
}, ne.prototype.hasBeenClosed = function() {
|
|
2820
2821
|
var e = this._state.dbOpenError;
|
|
2821
2822
|
return e && e.name === "DatabaseClosed";
|
|
2822
|
-
},
|
|
2823
|
+
}, ne.prototype.hasFailed = function() {
|
|
2823
2824
|
return this._state.dbOpenError !== null;
|
|
2824
|
-
},
|
|
2825
|
+
}, ne.prototype.dynamicallyOpened = function() {
|
|
2825
2826
|
return this._state.autoSchema;
|
|
2826
|
-
}, Object.defineProperty(
|
|
2827
|
+
}, Object.defineProperty(ne.prototype, "tables", { get: function() {
|
|
2827
2828
|
var e = this;
|
|
2828
|
-
return
|
|
2829
|
+
return I(this._allTables).map(function(t) {
|
|
2829
2830
|
return e._allTables[t];
|
|
2830
2831
|
});
|
|
2831
|
-
}, enumerable: !1, configurable: !0 }),
|
|
2832
|
+
}, enumerable: !1, configurable: !0 }), ne.prototype.transaction = function() {
|
|
2832
2833
|
var e = (function(t, n, a) {
|
|
2833
2834
|
var i = arguments.length;
|
|
2834
2835
|
if (i < 2) throw new G.InvalidArgument("Too few arguments");
|
|
@@ -2836,7 +2837,7 @@ var jr = { exports: {} };
|
|
|
2836
2837
|
return a = o.pop(), [t, Xn(o), a];
|
|
2837
2838
|
}).apply(this, arguments);
|
|
2838
2839
|
return this._transaction.apply(this, e);
|
|
2839
|
-
},
|
|
2840
|
+
}, ne.prototype._transaction = function(e, t, n) {
|
|
2840
2841
|
var a = this, i = L.trans;
|
|
2841
2842
|
i && i.db === this && e.indexOf("!") === -1 || (i = null);
|
|
2842
2843
|
var o, s, u = e.indexOf("?") !== -1;
|
|
@@ -2865,7 +2866,7 @@ var jr = { exports: {} };
|
|
|
2865
2866
|
} catch (f) {
|
|
2866
2867
|
return i ? i._promise(null, function(b, d) {
|
|
2867
2868
|
d(f);
|
|
2868
|
-
}) :
|
|
2869
|
+
}) : te(f);
|
|
2869
2870
|
}
|
|
2870
2871
|
var g = (function f(b, d, v, p, m) {
|
|
2871
2872
|
return N.resolve().then(function() {
|
|
@@ -2876,37 +2877,37 @@ var jr = { exports: {} };
|
|
|
2876
2877
|
} catch (O) {
|
|
2877
2878
|
return O.name === nn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
|
|
2878
2879
|
return f(b, d, v, null, m);
|
|
2879
|
-
})) :
|
|
2880
|
+
})) : te(O);
|
|
2880
2881
|
}
|
|
2881
|
-
var
|
|
2882
|
+
var S, E = tn(m);
|
|
2882
2883
|
return E && Je(), w = N.follow(function() {
|
|
2883
2884
|
var O;
|
|
2884
|
-
(
|
|
2885
|
-
}, w), (
|
|
2886
|
-
return y.active ? O :
|
|
2885
|
+
(S = m.call(y, y)) && (E ? (O = Pe.bind(null, null), S.then(O, O)) : typeof S.next == "function" && typeof S.throw == "function" && (S = Tn(S)));
|
|
2886
|
+
}, w), (S && typeof S.then == "function" ? N.resolve(S).then(function(O) {
|
|
2887
|
+
return y.active ? O : te(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
2887
2888
|
}) : w.then(function() {
|
|
2888
|
-
return
|
|
2889
|
+
return S;
|
|
2889
2890
|
})).then(function(O) {
|
|
2890
2891
|
return p && y._resolve(), y._completion.then(function() {
|
|
2891
2892
|
return O;
|
|
2892
2893
|
});
|
|
2893
2894
|
}).catch(function(O) {
|
|
2894
|
-
return y._reject(O),
|
|
2895
|
+
return y._reject(O), te(O);
|
|
2895
2896
|
});
|
|
2896
2897
|
});
|
|
2897
2898
|
}).bind(null, this, o, s, i, n);
|
|
2898
2899
|
return i ? i._promise(o, g, "lock") : L.trans ? Le(L.transless, function() {
|
|
2899
2900
|
return a._whenReady(g);
|
|
2900
2901
|
}) : this._whenReady(g);
|
|
2901
|
-
},
|
|
2902
|
-
if (!
|
|
2902
|
+
}, ne.prototype.table = function(e) {
|
|
2903
|
+
if (!q(this._allTables, e)) throw new G.InvalidTable("Table ".concat(e, " does not exist"));
|
|
2903
2904
|
return this._allTables[e];
|
|
2904
|
-
},
|
|
2905
|
-
function
|
|
2905
|
+
}, ne);
|
|
2906
|
+
function ne(e, t) {
|
|
2906
2907
|
var n = this;
|
|
2907
2908
|
this._middlewares = {}, this.verno = 0;
|
|
2908
|
-
var a =
|
|
2909
|
-
this._options = t = l({ addons:
|
|
2909
|
+
var a = ne.dependencies;
|
|
2910
|
+
this._options = t = l({ addons: ne.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;
|
|
2910
2911
|
var i, o, s, u, g, f = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
2911
2912
|
f.dbReadyPromise = new N(function(d) {
|
|
2912
2913
|
f.dbReadyResolve = d;
|
|
@@ -2914,14 +2915,14 @@ var jr = { exports: {} };
|
|
|
2914
2915
|
f.cancelOpen = v;
|
|
2915
2916
|
}), this._state = f, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [rn, Q] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(d) {
|
|
2916
2917
|
return function(v, p) {
|
|
2917
|
-
|
|
2918
|
+
ne.vip(function() {
|
|
2918
2919
|
var m, w = n._state;
|
|
2919
2920
|
w.openComplete ? (w.dbOpenError || N.resolve().then(v), p && d(v)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(v), p && d(v)) : (d(v), m = n, p || d(function y() {
|
|
2920
2921
|
m.on.ready.unsubscribe(v), m.on.ready.unsubscribe(y);
|
|
2921
2922
|
}));
|
|
2922
2923
|
});
|
|
2923
2924
|
};
|
|
2924
|
-
}), this.Collection = (i = this, ft(ia.prototype, function(
|
|
2925
|
+
}), this.Collection = (i = this, ft(ia.prototype, function(S, y) {
|
|
2925
2926
|
this.db = i;
|
|
2926
2927
|
var p = or, m = null;
|
|
2927
2928
|
if (y) try {
|
|
@@ -2929,19 +2930,19 @@ var jr = { exports: {} };
|
|
|
2929
2930
|
} catch (E) {
|
|
2930
2931
|
m = E;
|
|
2931
2932
|
}
|
|
2932
|
-
var w =
|
|
2933
|
-
this._ctx = { table: y, index: w.index, isPrimKey: !w.index || y.schema.primKey.keyPath && w.index === y.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: m, or: w.or, valueMapper:
|
|
2933
|
+
var w = S._ctx, y = w.table, S = y.hook.reading.fire;
|
|
2934
|
+
this._ctx = { table: y, index: w.index, isPrimKey: !w.index || y.schema.primKey.keyPath && w.index === y.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: m, or: w.or, valueMapper: S !== it ? S : null };
|
|
2934
2935
|
})), this.Table = (o = this, ft(lr.prototype, function(d, v, p) {
|
|
2935
2936
|
this.db = o, this._tx = p, this.name = d, this.schema = v, this.hook = o._allTables[d] ? o._allTables[d].hook : dt(null, { creating: [Vr, Q], reading: [Xr, it], updating: [Zr, Q], deleting: [Jr, Q] });
|
|
2936
2937
|
})), this.Transaction = (s = this, ft(ca.prototype, function(d, v, p, m, w) {
|
|
2937
2938
|
var y = this;
|
|
2938
|
-
this.db = s, this.mode = d, this.storeNames = v, this.schema = p, this.chromeTransactionDurability = m, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = w || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new N(function(
|
|
2939
|
-
y._resolve =
|
|
2939
|
+
this.db = s, this.mode = d, this.storeNames = v, this.schema = p, this.chromeTransactionDurability = m, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = w || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new N(function(S, E) {
|
|
2940
|
+
y._resolve = S, y._reject = E;
|
|
2940
2941
|
}), this._completion.then(function() {
|
|
2941
2942
|
y.active = !1, y.on.complete.fire();
|
|
2942
|
-
}, function(
|
|
2943
|
+
}, function(S) {
|
|
2943
2944
|
var E = y.active;
|
|
2944
|
-
return y.active = !1, y.on.error.fire(
|
|
2945
|
+
return y.active = !1, y.on.error.fire(S), y.parent ? y.parent._reject(S) : E && y.idbtrans && y.idbtrans.abort(), te(S);
|
|
2945
2946
|
});
|
|
2946
2947
|
})), this.Version = (u = this, ft(ga.prototype, function(d) {
|
|
2947
2948
|
this.db = u, this._cfg = { version: d, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
@@ -2982,9 +2983,9 @@ var jr = { exports: {} };
|
|
|
2982
2983
|
return d(n);
|
|
2983
2984
|
});
|
|
2984
2985
|
}
|
|
2985
|
-
var Xt,
|
|
2986
|
+
var Xt, he = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Oa = (Nn.prototype.subscribe = function(e, t, n) {
|
|
2986
2987
|
return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: n });
|
|
2987
|
-
}, Nn.prototype[
|
|
2988
|
+
}, Nn.prototype[he] = function() {
|
|
2988
2989
|
return this;
|
|
2989
2990
|
}, Nn);
|
|
2990
2991
|
function Nn(e) {
|
|
@@ -3008,8 +3009,8 @@ var jr = { exports: {} };
|
|
|
3008
3009
|
}, p = function(w) {
|
|
3009
3010
|
zt(g, w), Pn(f, g) && v();
|
|
3010
3011
|
}, m = function() {
|
|
3011
|
-
var w, y,
|
|
3012
|
-
!u && Xt.indexedDB && (g = {}, w = {}, s && s.abort(), s = new AbortController(),
|
|
3012
|
+
var w, y, S;
|
|
3013
|
+
!u && Xt.indexedDB && (g = {}, w = {}, s && s.abort(), s = new AbortController(), S = function(E) {
|
|
3013
3014
|
var O = Xe();
|
|
3014
3015
|
try {
|
|
3015
3016
|
o && Je();
|
|
@@ -3018,9 +3019,9 @@ var jr = { exports: {} };
|
|
|
3018
3019
|
} finally {
|
|
3019
3020
|
O && Ve();
|
|
3020
3021
|
}
|
|
3021
|
-
}(y = { subscr: w, signal: s.signal, requery: v, querier: e, trans: null }), Promise.resolve(
|
|
3022
|
+
}(y = { subscr: w, signal: s.signal, requery: v, querier: e, trans: null }), Promise.resolve(S).then(function(E) {
|
|
3022
3023
|
n = !0, t = E, u || y.signal.aborted || (g = {}, function(O) {
|
|
3023
|
-
for (var x in O) if (
|
|
3024
|
+
for (var x in O) if (q(O, x)) return;
|
|
3024
3025
|
return 1;
|
|
3025
3026
|
}(f = w) || d || (Re(gt, p), d = !0), fn(function() {
|
|
3026
3027
|
return !u && i.next && i.next(E);
|
|
@@ -3066,7 +3067,7 @@ var jr = { exports: {} };
|
|
|
3066
3067
|
});
|
|
3067
3068
|
}) : xn(n, t).toCollection().primaryKeys()).then(e);
|
|
3068
3069
|
} catch {
|
|
3069
|
-
return
|
|
3070
|
+
return te(new G.MissingAPI());
|
|
3070
3071
|
}
|
|
3071
3072
|
var t, n;
|
|
3072
3073
|
}, defineClass: function() {
|
|
@@ -3081,7 +3082,7 @@ var jr = { exports: {} };
|
|
|
3081
3082
|
var t = Tn(e.apply(this, arguments));
|
|
3082
3083
|
return t && typeof t.then == "function" ? t : N.resolve(t);
|
|
3083
3084
|
} catch (n) {
|
|
3084
|
-
return
|
|
3085
|
+
return te(n);
|
|
3085
3086
|
}
|
|
3086
3087
|
};
|
|
3087
3088
|
}, spawn: function(e, t, n) {
|
|
@@ -3089,14 +3090,14 @@ var jr = { exports: {} };
|
|
|
3089
3090
|
var a = Tn(e.apply(n, t || []));
|
|
3090
3091
|
return a && typeof a.then == "function" ? a : N.resolve(a);
|
|
3091
3092
|
} catch (i) {
|
|
3092
|
-
return
|
|
3093
|
+
return te(i);
|
|
3093
3094
|
}
|
|
3094
3095
|
}, currentTransaction: { get: function() {
|
|
3095
3096
|
return L.trans || null;
|
|
3096
3097
|
} }, waitFor: function(e, t) {
|
|
3097
3098
|
return t = N.resolve(typeof e == "function" ? Ue.ignoreTransaction(e) : e).timeout(t || 6e4), L.trans ? L.trans.waitFor(t) : t;
|
|
3098
3099
|
}, Promise: N, debug: { get: function() {
|
|
3099
|
-
return
|
|
3100
|
+
return ye;
|
|
3100
3101
|
}, set: function(e) {
|
|
3101
3102
|
qn(e);
|
|
3102
3103
|
} }, derive: ze, extend: J, props: xe, override: Hn, Events: dt, on: Re, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: ve, setByKeyPath: le, delByKeyPath: function(e, t) {
|
|
@@ -3122,16 +3123,16 @@ var jr = { exports: {} };
|
|
|
3122
3123
|
Te || tt.postMessage(e);
|
|
3123
3124
|
})), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
|
|
3124
3125
|
if (!Ee.disableBfCache && e.persisted) {
|
|
3125
|
-
|
|
3126
|
+
ye && console.debug("Dexie: handling persisted pagehide"), tt != null && tt.close();
|
|
3126
3127
|
for (var t = 0, n = Ze; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
|
|
3127
3128
|
}
|
|
3128
3129
|
}), addEventListener("pageshow", function(e) {
|
|
3129
|
-
!Ee.disableBfCache && e.persisted && (
|
|
3130
|
+
!Ee.disableBfCache && e.persisted && (ye && console.debug("Dexie: handling persisted pageshow"), Cr(), Bn({ all: new ce(-1 / 0, [[]]) }));
|
|
3130
3131
|
})), N.rejectionMapper = function(e, t) {
|
|
3131
3132
|
return !e || e instanceof Ye || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Zn[e.name] ? e : (t = new Zn[e.name](t || e.message, e), "stack" in e && ke(t, "stack", { get: function() {
|
|
3132
3133
|
return this.inner.stack;
|
|
3133
3134
|
} }), t);
|
|
3134
|
-
}, qn(
|
|
3135
|
+
}, qn(ye), l(Ee, Object.freeze({ __proto__: null, Dexie: Ee, liveQuery: Ir, Entity: sr, cmp: H, PropModSymbol: Se, PropModification: ht, replacePrefix: function(e, t) {
|
|
3135
3136
|
return new ht({ replacePrefix: [e, t] });
|
|
3136
3137
|
}, add: function(e) {
|
|
3137
3138
|
return new ht({ add: e });
|
|
@@ -3144,7 +3145,6 @@ var Ia = jr.exports;
|
|
|
3144
3145
|
const Fn = /* @__PURE__ */ Pa(Ia), Tr = Symbol.for("Dexie"), Un = globalThis[Tr] || (globalThis[Tr] = Fn);
|
|
3145
3146
|
if (Fn.semVer !== Un.semVer)
|
|
3146
3147
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Fn.semVer} and ${Un.semVer}`);
|
|
3147
|
-
var K = /* @__PURE__ */ ((h) => (h.MESSAGES = "messages", h.CLOUD = "cloud", h.SERIES = "series", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h.SLIDE = "slide", h))(K || {}), S = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(S || {}), ne = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_MODAL = "closeModal", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.SHOW_MODAL = "showModal", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GOTO = "slideGoto", h.SLIDE_READY = "slideReady", h.SLIDE_LOAD = "loadSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGET_UPDATE = "widgetUpdate", h))(ne || {}), Zt = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(Zt || {}), pe = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(pe || {});
|
|
3148
3148
|
function X(h) {
|
|
3149
3149
|
let r = `${h.type}.${h.topics}`;
|
|
3150
3150
|
return h.order && (r += `.${h.order}`), h.period && (r += `.${h.period}`), r;
|
|
@@ -3159,10 +3159,10 @@ function nt(h) {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
function _t(h, r) {
|
|
3161
3161
|
var B;
|
|
3162
|
-
let c, l, k, D,
|
|
3162
|
+
let c, l, k, D, I;
|
|
3163
3163
|
switch (h.moderation) {
|
|
3164
3164
|
case Zt.BEFORE:
|
|
3165
|
-
c = /* @__PURE__ */ new Date(), l = (B = h.beforeTime) == null ? void 0 : B.split(":"), k = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"),
|
|
3165
|
+
c = /* @__PURE__ */ new Date(), l = (B = h.beforeTime) == null ? void 0 : B.split(":"), k = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), I = Number.parseInt(l ? l[2] : "00"), r.before = c.setHours(k, D, I, 0) / 1e3, r.period || (r.period = c.getDay() === 1 ? 72 : 24);
|
|
3166
3166
|
break;
|
|
3167
3167
|
case Zt.DELAYED:
|
|
3168
3168
|
h.delay && h.delay > 0 && (r.delay = `${h.delay}`);
|
|
@@ -3189,9 +3189,9 @@ class Mr {
|
|
|
3189
3189
|
const c = await this.db.table(K.CLOUD).where({ id: r.widget }).last().catch(() => {
|
|
3190
3190
|
console.warn(
|
|
3191
3191
|
"%capi%C %ccloud",
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3192
|
+
_.API,
|
|
3193
|
+
_.NONE,
|
|
3194
|
+
_.CLOUD,
|
|
3195
3195
|
r.slide,
|
|
3196
3196
|
r.widget
|
|
3197
3197
|
);
|
|
@@ -3207,9 +3207,9 @@ class Mr {
|
|
|
3207
3207
|
const c = await this.db.table(K.SERIES).where({ id: r.widget }).last().catch(() => {
|
|
3208
3208
|
console.warn(
|
|
3209
3209
|
"%capi%c %cseries",
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3210
|
+
_.API,
|
|
3211
|
+
_.NONE,
|
|
3212
|
+
_.SERIES,
|
|
3213
3213
|
r.slide,
|
|
3214
3214
|
r.widget
|
|
3215
3215
|
);
|
|
@@ -3227,26 +3227,26 @@ class Mr {
|
|
|
3227
3227
|
const D = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(c).filter(l).filter(k).limit((r == null ? void 0 : r.limit) ?? 25).toArray().catch(() => {
|
|
3228
3228
|
console.warn(
|
|
3229
3229
|
"%capi%c %cmessages",
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3230
|
+
_.API,
|
|
3231
|
+
_.NONE,
|
|
3232
|
+
_.MESSAGES,
|
|
3233
3233
|
r.slide,
|
|
3234
3234
|
r.widget
|
|
3235
3235
|
);
|
|
3236
3236
|
});
|
|
3237
3237
|
if (D.length === 0)
|
|
3238
3238
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3239
|
-
const
|
|
3240
|
-
(
|
|
3241
|
-
),
|
|
3242
|
-
(
|
|
3239
|
+
const I = D[0] ? D[0].title : "No title", B = D.map(
|
|
3240
|
+
(fe) => fe.message_id
|
|
3241
|
+
), ee = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((fe) => fe.sort((q, xe) => xe.utc - q.utc))).map(
|
|
3242
|
+
(fe) => fe.data
|
|
3243
3243
|
);
|
|
3244
3244
|
return {
|
|
3245
3245
|
data: {
|
|
3246
3246
|
presentation: (r == null ? void 0 : r.presentation) || "not set",
|
|
3247
3247
|
slide: (r == null ? void 0 : r.slide) || "not set",
|
|
3248
|
-
messages:
|
|
3249
|
-
title:
|
|
3248
|
+
messages: ee,
|
|
3249
|
+
title: I,
|
|
3250
3250
|
topics: [r.dashboard, r.widget].join("-"),
|
|
3251
3251
|
query: r
|
|
3252
3252
|
},
|
|
@@ -3254,7 +3254,7 @@ class Mr {
|
|
|
3254
3254
|
success: !0
|
|
3255
3255
|
};
|
|
3256
3256
|
} catch (D) {
|
|
3257
|
-
return console.error("%cstorage",
|
|
3257
|
+
return console.error("%cstorage", _.STORAGE, "set", r, D), { data: null, message: "Messages Data error", success: !1 };
|
|
3258
3258
|
}
|
|
3259
3259
|
});
|
|
3260
3260
|
/**
|
|
@@ -3267,7 +3267,7 @@ class Mr {
|
|
|
3267
3267
|
id: r.widget,
|
|
3268
3268
|
dashboard_id: r.dashboard,
|
|
3269
3269
|
data: c.data
|
|
3270
|
-
}).then(() => 201).catch((l) => (console.error("%cstorage",
|
|
3270
|
+
}).then(() => 201).catch((l) => (console.error("%cstorage", _.STORAGE, "set", r, l.message), 400)) : 400);
|
|
3271
3271
|
/**
|
|
3272
3272
|
* Update Series
|
|
3273
3273
|
* @param query IQuery
|
|
@@ -3278,53 +3278,60 @@ class Mr {
|
|
|
3278
3278
|
id: r.widget,
|
|
3279
3279
|
dashboard_id: r.dashboard,
|
|
3280
3280
|
data: c.data
|
|
3281
|
-
}).then(() => 201).catch((l) => (console.error("%cstorage",
|
|
3281
|
+
}).then(() => 201).catch((l) => (console.error("%cstorage", _.STORAGE, "set", r, l.message), 400)) : 400);
|
|
3282
3282
|
/**
|
|
3283
3283
|
* Update Messages
|
|
3284
3284
|
* @param query IQuery
|
|
3285
|
-
* @param data
|
|
3286
|
-
* @param data.title Widget name or id
|
|
3287
|
-
* @param data.data any
|
|
3288
|
-
* @param data.data.messages IMessages
|
|
3285
|
+
* @param data any
|
|
3289
3286
|
* @returns number
|
|
3290
3287
|
*/
|
|
3291
3288
|
A(this, "setMessages", async (r, c) => {
|
|
3292
3289
|
if (r.type !== K.MESSAGES)
|
|
3293
3290
|
return 400;
|
|
3294
|
-
const l = c.data.title;
|
|
3295
|
-
let
|
|
3296
|
-
return c.data.messages.forEach(async (
|
|
3297
|
-
var
|
|
3298
|
-
await this.db.table(K.MESSAGES).put({ id:
|
|
3299
|
-
|
|
3291
|
+
const l = c.data.title, k = c.data.topics;
|
|
3292
|
+
let D = 0;
|
|
3293
|
+
return c.data.messages.forEach(async (I) => {
|
|
3294
|
+
var B, J, ee, fe;
|
|
3295
|
+
I != null && I.id && (await this.db.table(K.MESSAGES).put({ id: I.id, utc: I.utc, data: I }).catch((q) => {
|
|
3296
|
+
D++, console.error(
|
|
3300
3297
|
"%cstorage",
|
|
3301
|
-
|
|
3298
|
+
_.STORAGE,
|
|
3299
|
+
"set message",
|
|
3300
|
+
l,
|
|
3301
|
+
k,
|
|
3302
|
+
I,
|
|
3303
|
+
q.message
|
|
3304
|
+
);
|
|
3305
|
+
}).catch((q) => {
|
|
3306
|
+
D++, console.error(
|
|
3307
|
+
"%cstorage",
|
|
3308
|
+
_.STORAGE,
|
|
3302
3309
|
"set message",
|
|
3303
3310
|
`title: ${l}`,
|
|
3304
|
-
|
|
3305
|
-
q
|
|
3311
|
+
I,
|
|
3312
|
+
q.message
|
|
3306
3313
|
);
|
|
3307
3314
|
}), await this.db.table(K.TOPICS).put({
|
|
3308
3315
|
widget_id: r.widget,
|
|
3309
|
-
message_id:
|
|
3316
|
+
message_id: I.id,
|
|
3310
3317
|
dashboard_id: r.dashboard,
|
|
3311
3318
|
title: l,
|
|
3312
|
-
engagement: (
|
|
3313
|
-
impressions: (
|
|
3314
|
-
reach: (
|
|
3315
|
-
sentiment:
|
|
3316
|
-
utc:
|
|
3319
|
+
engagement: (B = I.dynamics) == null ? void 0 : B.engagement,
|
|
3320
|
+
impressions: (J = I.dynamics) == null ? void 0 : J.semrush_visits,
|
|
3321
|
+
reach: (ee = I.dynamics) == null ? void 0 : ee.potential_reach,
|
|
3322
|
+
sentiment: ((fe = I.topics[0]) == null ? void 0 : fe.sentiment) || 0,
|
|
3323
|
+
utc: I.utc
|
|
3317
3324
|
}).catch((q) => {
|
|
3318
|
-
|
|
3325
|
+
D++, console.error(
|
|
3319
3326
|
"%cstorage",
|
|
3320
|
-
|
|
3327
|
+
_.STORAGE,
|
|
3321
3328
|
"set topic",
|
|
3322
3329
|
`title: ${l}`,
|
|
3323
|
-
|
|
3324
|
-
q
|
|
3330
|
+
I,
|
|
3331
|
+
q.message
|
|
3325
3332
|
);
|
|
3326
|
-
});
|
|
3327
|
-
}),
|
|
3333
|
+
}));
|
|
3334
|
+
}), D === 0 ? 201 : 400;
|
|
3328
3335
|
});
|
|
3329
3336
|
/**
|
|
3330
3337
|
* Wipe Message data after number of seconds
|
|
@@ -3332,31 +3339,31 @@ class Mr {
|
|
|
3332
3339
|
*/
|
|
3333
3340
|
A(this, "cleanMessages", async (r) => {
|
|
3334
3341
|
const c = Date.now() / 1e3, l = (D) => D.utc < c - r, k = (D) => D.utc < c - r;
|
|
3335
|
-
return await this.db.table(K.TOPICS).orderBy("utc").filter(l).modify((D,
|
|
3336
|
-
delete
|
|
3342
|
+
return await this.db.table(K.TOPICS).orderBy("utc").filter(l).modify((D, I) => {
|
|
3343
|
+
delete I.value;
|
|
3337
3344
|
}).catch((D) => (console.error(
|
|
3338
3345
|
"%cstorage%c %clean",
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
D
|
|
3343
|
-
), 0)), await this.db.table(K.MESSAGES).orderBy("utc").filter(k).modify((D,
|
|
3344
|
-
delete
|
|
3346
|
+
_.STORAGE,
|
|
3347
|
+
_.NONE,
|
|
3348
|
+
_.MESSAGES,
|
|
3349
|
+
D.message
|
|
3350
|
+
), 0)), await this.db.table(K.MESSAGES).orderBy("utc").filter(k).modify((D, I) => {
|
|
3351
|
+
delete I.value;
|
|
3345
3352
|
}).catch((D) => (console.error(
|
|
3346
3353
|
"%cstorage%c %clean",
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
D
|
|
3354
|
+
_.STORAGE,
|
|
3355
|
+
_.NONE,
|
|
3356
|
+
_.MESSAGES,
|
|
3357
|
+
D.message
|
|
3351
3358
|
), 0));
|
|
3352
3359
|
});
|
|
3353
3360
|
A(this, "hideMessage", async (r, c) => {
|
|
3354
3361
|
await this.db.table(K.TOPICS).where("message_id").equals(r).modify({ visible: c }).catch((l) => (console.error(
|
|
3355
3362
|
"%cstorage%c %chide",
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
l
|
|
3363
|
+
_.STORAGE,
|
|
3364
|
+
_.NONE,
|
|
3365
|
+
_.HIDE,
|
|
3366
|
+
l.message
|
|
3360
3367
|
), 0));
|
|
3361
3368
|
});
|
|
3362
3369
|
/**
|
|
@@ -3368,7 +3375,13 @@ class Mr {
|
|
|
3368
3375
|
id: r.widget,
|
|
3369
3376
|
dashboard_id: r.dashboard,
|
|
3370
3377
|
type: r.type
|
|
3371
|
-
}).then(() => 201).catch((c) => (console.error(
|
|
3378
|
+
}).then(() => 201).catch((c) => (console.error(
|
|
3379
|
+
"%cstorage",
|
|
3380
|
+
_.STORAGE,
|
|
3381
|
+
K.WIDGET,
|
|
3382
|
+
r,
|
|
3383
|
+
c.message
|
|
3384
|
+
), 400)));
|
|
3372
3385
|
/**
|
|
3373
3386
|
* Add component subscriber
|
|
3374
3387
|
* @param query IQuery
|
|
@@ -3378,9 +3391,9 @@ class Mr {
|
|
|
3378
3391
|
(l) => l.widget === r.widget
|
|
3379
3392
|
).length > 0 || (r.type === K.MESSAGES && (r = _t(this.options, r)), console.debug(
|
|
3380
3393
|
"%cstorage%c %csubscribe",
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3394
|
+
_.STORAGE,
|
|
3395
|
+
_.NONE,
|
|
3396
|
+
_.SUBSCRIBE,
|
|
3384
3397
|
r.slide,
|
|
3385
3398
|
r.widget
|
|
3386
3399
|
), this.subscribers.push(r)), null));
|
|
@@ -3395,17 +3408,16 @@ class Mr {
|
|
|
3395
3408
|
* @returns IResponse
|
|
3396
3409
|
*/
|
|
3397
3410
|
A(this, "loadSlide", async (r) => {
|
|
3398
|
-
const c = await this.db.table(K.SLIDE).where({ id: r.
|
|
3411
|
+
const c = await this.db.table(K.SLIDE).where({ id: r.id }).last().catch(() => {
|
|
3399
3412
|
console.warn(
|
|
3400
3413
|
"%capi%c %cseries",
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
r.
|
|
3405
|
-
r.widget
|
|
3414
|
+
_.API,
|
|
3415
|
+
_.NONE,
|
|
3416
|
+
_.SERIES,
|
|
3417
|
+
r.id
|
|
3406
3418
|
);
|
|
3407
3419
|
});
|
|
3408
|
-
return c === void 0 ? { data: null, message: "Slide Load error", success: !1 } : (c.data.
|
|
3420
|
+
return c === void 0 ? { data: null, message: "Slide Load error", success: !1 } : (c.data.id = (r == null ? void 0 : r.id) || "not set", c.message = "Slide retrieved successfully", c.success = !0, c);
|
|
3409
3421
|
});
|
|
3410
3422
|
/**
|
|
3411
3423
|
* Update Slide
|
|
@@ -3418,13 +3430,13 @@ class Mr {
|
|
|
3418
3430
|
json: r.data.json || {},
|
|
3419
3431
|
html: r.data.html || "",
|
|
3420
3432
|
css: r.data.css || ""
|
|
3421
|
-
}).then(() =>
|
|
3433
|
+
}).then(() => 200).catch((c) => (console.error(
|
|
3422
3434
|
"%cstorage",
|
|
3423
|
-
|
|
3424
|
-
|
|
3435
|
+
_.STORAGE,
|
|
3436
|
+
re.SLIDE_STORE,
|
|
3425
3437
|
r,
|
|
3426
|
-
c
|
|
3427
|
-
),
|
|
3438
|
+
c.message
|
|
3439
|
+
), 422)) : 422);
|
|
3428
3440
|
this.options = r, this.db = new Un(r.app), this.db.version(3).stores({
|
|
3429
3441
|
player: "id,title,name,location",
|
|
3430
3442
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
@@ -3449,7 +3461,7 @@ function Ca(h, r) {
|
|
|
3449
3461
|
const c = indexedDB.open(h);
|
|
3450
3462
|
c.onupgradeneeded = () => c.result.createObjectStore(r);
|
|
3451
3463
|
const l = Wn(c);
|
|
3452
|
-
return (k, D) => l.then((
|
|
3464
|
+
return (k, D) => l.then((I) => D(I.transaction(r, k).objectStore(r)));
|
|
3453
3465
|
}
|
|
3454
3466
|
let Gn;
|
|
3455
3467
|
function Kr() {
|
|
@@ -3467,15 +3479,15 @@ class Nr {
|
|
|
3467
3479
|
A(this, "options");
|
|
3468
3480
|
A(this, "getCloud", async (r) => {
|
|
3469
3481
|
const c = X(r);
|
|
3470
|
-
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi",
|
|
3482
|
+
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3471
3483
|
});
|
|
3472
3484
|
A(this, "getSeries", async (r) => {
|
|
3473
3485
|
const c = X(r);
|
|
3474
|
-
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi",
|
|
3486
|
+
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi", _.API, K.SERIES, r.slide, r.widget), { data: null, message: "Series Data error", success: !1 }));
|
|
3475
3487
|
});
|
|
3476
3488
|
A(this, "getMessages", async (r) => {
|
|
3477
3489
|
const c = X(r);
|
|
3478
|
-
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi",
|
|
3490
|
+
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget), { data: null, message: "Messages Data error", success: !1 }));
|
|
3479
3491
|
});
|
|
3480
3492
|
/**
|
|
3481
3493
|
* Update Cloud
|
|
@@ -3487,7 +3499,7 @@ class Nr {
|
|
|
3487
3499
|
if (!c.success)
|
|
3488
3500
|
return 400;
|
|
3489
3501
|
const l = X(r);
|
|
3490
|
-
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage",
|
|
3502
|
+
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", _.STORAGE, K.CLOUD, r, k.message), 400));
|
|
3491
3503
|
});
|
|
3492
3504
|
/**
|
|
3493
3505
|
* Update Series
|
|
@@ -3499,7 +3511,7 @@ class Nr {
|
|
|
3499
3511
|
if (!c.success)
|
|
3500
3512
|
return 400;
|
|
3501
3513
|
const l = X(r);
|
|
3502
|
-
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage",
|
|
3514
|
+
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", _.STORAGE, K.SERIES, r, k.message), 400));
|
|
3503
3515
|
});
|
|
3504
3516
|
/**
|
|
3505
3517
|
* Update Messages
|
|
@@ -3511,7 +3523,7 @@ class Nr {
|
|
|
3511
3523
|
if (!c.success)
|
|
3512
3524
|
return 400;
|
|
3513
3525
|
const l = X(r);
|
|
3514
|
-
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage",
|
|
3526
|
+
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", _.STORAGE, K.MESSAGES, r, k.message), 400));
|
|
3515
3527
|
});
|
|
3516
3528
|
A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
|
|
3517
3529
|
A(this, "hideMessage", async (r, c) => {
|
|
@@ -3530,7 +3542,7 @@ class Nr {
|
|
|
3530
3542
|
dashboard_id: r.dashboard,
|
|
3531
3543
|
type: r.type
|
|
3532
3544
|
};
|
|
3533
|
-
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage",
|
|
3545
|
+
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", _.STORAGE, K.WIDGET, r, k.message), 400));
|
|
3534
3546
|
});
|
|
3535
3547
|
/**
|
|
3536
3548
|
* Add component subscriber
|
|
@@ -3541,9 +3553,9 @@ class Nr {
|
|
|
3541
3553
|
(l) => l.widget === r.widget
|
|
3542
3554
|
).length > 0 || (console.debug(
|
|
3543
3555
|
"%cstorage%c %csubscribe",
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3556
|
+
_.STORAGE,
|
|
3557
|
+
_.NONE,
|
|
3558
|
+
_.SUBSCRIBE,
|
|
3547
3559
|
r.slide,
|
|
3548
3560
|
r.widget
|
|
3549
3561
|
), this.subscribers.push(r)), null));
|
|
@@ -3554,7 +3566,7 @@ class Nr {
|
|
|
3554
3566
|
A(this, "getSubscribers", async () => await new Promise((r) => r(this.subscribers)));
|
|
3555
3567
|
A(this, "loadSlide", async (r) => {
|
|
3556
3568
|
const c = X(r);
|
|
3557
|
-
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi",
|
|
3569
|
+
return await Jt(c).then((l) => l).catch(() => (console.warn("%capi", _.API, K.SLIDE, r.slide), { data: null, message: "Slide Load error", success: !1 }));
|
|
3558
3570
|
});
|
|
3559
3571
|
/**
|
|
3560
3572
|
* Update Slide
|
|
@@ -3569,7 +3581,7 @@ class Nr {
|
|
|
3569
3581
|
html: r.data.html || "",
|
|
3570
3582
|
css: r.data.css || ""
|
|
3571
3583
|
};
|
|
3572
|
-
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage",
|
|
3584
|
+
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", _.STORAGE, K.SLIDE, r, k.message), 400));
|
|
3573
3585
|
});
|
|
3574
3586
|
this.options = r;
|
|
3575
3587
|
}
|
|
@@ -3583,7 +3595,7 @@ class Br {
|
|
|
3583
3595
|
try {
|
|
3584
3596
|
return localStorage.getObject(c);
|
|
3585
3597
|
} catch (l) {
|
|
3586
|
-
return console.warn("%capi",
|
|
3598
|
+
return console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3587
3599
|
}
|
|
3588
3600
|
});
|
|
3589
3601
|
A(this, "getSeries", async (r) => {
|
|
@@ -3591,7 +3603,7 @@ class Br {
|
|
|
3591
3603
|
try {
|
|
3592
3604
|
return localStorage.getObject(c);
|
|
3593
3605
|
} catch (l) {
|
|
3594
|
-
return console.warn("%capi",
|
|
3606
|
+
return console.warn("%capi", _.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3595
3607
|
}
|
|
3596
3608
|
});
|
|
3597
3609
|
A(this, "getMessages", async (r) => {
|
|
@@ -3599,7 +3611,7 @@ class Br {
|
|
|
3599
3611
|
try {
|
|
3600
3612
|
return localStorage.getObject(c);
|
|
3601
3613
|
} catch (l) {
|
|
3602
|
-
return console.warn("%capi",
|
|
3614
|
+
return console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3603
3615
|
}
|
|
3604
3616
|
});
|
|
3605
3617
|
/**
|
|
@@ -3613,7 +3625,7 @@ class Br {
|
|
|
3613
3625
|
try {
|
|
3614
3626
|
return localStorage.setObject(l, c), 201;
|
|
3615
3627
|
} catch (k) {
|
|
3616
|
-
return console.error("%cstorage",
|
|
3628
|
+
return console.error("%cstorage", _.STORAGE, K.CLOUD, r, k), 400;
|
|
3617
3629
|
}
|
|
3618
3630
|
});
|
|
3619
3631
|
/**
|
|
@@ -3627,7 +3639,7 @@ class Br {
|
|
|
3627
3639
|
try {
|
|
3628
3640
|
return localStorage.setObject(l, c), 201;
|
|
3629
3641
|
} catch (k) {
|
|
3630
|
-
return console.error("%cstorage",
|
|
3642
|
+
return console.error("%cstorage", _.STORAGE, K.SERIES, r, k), 400;
|
|
3631
3643
|
}
|
|
3632
3644
|
});
|
|
3633
3645
|
/**
|
|
@@ -3641,7 +3653,7 @@ class Br {
|
|
|
3641
3653
|
try {
|
|
3642
3654
|
return localStorage.setObject(l, c), 200;
|
|
3643
3655
|
} catch (k) {
|
|
3644
|
-
return console.error("%cstorage",
|
|
3656
|
+
return console.error("%cstorage", _.STORAGE, K.MESSAGES, r, k), 400;
|
|
3645
3657
|
}
|
|
3646
3658
|
});
|
|
3647
3659
|
A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
|
|
@@ -3653,7 +3665,7 @@ class Br {
|
|
|
3653
3665
|
try {
|
|
3654
3666
|
return localStorage.setObject(c, r), 201;
|
|
3655
3667
|
} catch (l) {
|
|
3656
|
-
return console.error("%cstorage",
|
|
3668
|
+
return console.error("%cstorage", _.STORAGE, K.WIDGET, r, l), 400;
|
|
3657
3669
|
}
|
|
3658
3670
|
});
|
|
3659
3671
|
/**
|
|
@@ -3665,9 +3677,9 @@ class Br {
|
|
|
3665
3677
|
(l) => l.widget === r.widget
|
|
3666
3678
|
).length || (console.debug(
|
|
3667
3679
|
"%cstorage%c %csubscribe",
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3680
|
+
_.STORAGE,
|
|
3681
|
+
_.NONE,
|
|
3682
|
+
_.SUBSCRIBE,
|
|
3671
3683
|
r.slide,
|
|
3672
3684
|
r.widget
|
|
3673
3685
|
), this.subscribers.push(r)), null));
|
|
@@ -3680,7 +3692,7 @@ class Br {
|
|
|
3680
3692
|
try {
|
|
3681
3693
|
return localStorage.getObject(`${r.type}.${r.id}`);
|
|
3682
3694
|
} catch (c) {
|
|
3683
|
-
return console.warn("%capi",
|
|
3695
|
+
return console.warn("%capi", _.API, K.SLIDE, r.id, c), { data: null, message: "Slide Load error", success: !1 };
|
|
3684
3696
|
}
|
|
3685
3697
|
});
|
|
3686
3698
|
A(this, "storeSlide", async (r) => {
|
|
@@ -3693,7 +3705,7 @@ class Br {
|
|
|
3693
3705
|
css: r.data.css || ""
|
|
3694
3706
|
}), 201;
|
|
3695
3707
|
} catch (c) {
|
|
3696
|
-
return console.error("%cstorage",
|
|
3708
|
+
return console.error("%cstorage", _.STORAGE, K.SLIDE, r, c), 400;
|
|
3697
3709
|
}
|
|
3698
3710
|
});
|
|
3699
3711
|
this.options = r, Storage.prototype.setObject = function(c, l) {
|
|
@@ -3713,7 +3725,7 @@ class Lr {
|
|
|
3713
3725
|
try {
|
|
3714
3726
|
return sessionStorage.getObject(c);
|
|
3715
3727
|
} catch (l) {
|
|
3716
|
-
return console.warn("%capi",
|
|
3728
|
+
return console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3717
3729
|
}
|
|
3718
3730
|
});
|
|
3719
3731
|
A(this, "getSeries", async (r) => {
|
|
@@ -3721,7 +3733,7 @@ class Lr {
|
|
|
3721
3733
|
try {
|
|
3722
3734
|
return sessionStorage.getObject(c);
|
|
3723
3735
|
} catch (l) {
|
|
3724
|
-
return console.warn("%capi",
|
|
3736
|
+
return console.warn("%capi", _.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3725
3737
|
}
|
|
3726
3738
|
});
|
|
3727
3739
|
A(this, "getMessages", async (r) => {
|
|
@@ -3729,7 +3741,7 @@ class Lr {
|
|
|
3729
3741
|
try {
|
|
3730
3742
|
return sessionStorage.getObject(c);
|
|
3731
3743
|
} catch (l) {
|
|
3732
|
-
return console.warn("%capi",
|
|
3744
|
+
return console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3733
3745
|
}
|
|
3734
3746
|
});
|
|
3735
3747
|
/**
|
|
@@ -3743,7 +3755,7 @@ class Lr {
|
|
|
3743
3755
|
try {
|
|
3744
3756
|
return sessionStorage.setObject(l, c), 201;
|
|
3745
3757
|
} catch (k) {
|
|
3746
|
-
return console.error("%cstorage",
|
|
3758
|
+
return console.error("%cstorage", _.STORAGE, K.CLOUD, r, k), 400;
|
|
3747
3759
|
}
|
|
3748
3760
|
});
|
|
3749
3761
|
/**
|
|
@@ -3757,7 +3769,7 @@ class Lr {
|
|
|
3757
3769
|
try {
|
|
3758
3770
|
return sessionStorage.setObject(l, c), 201;
|
|
3759
3771
|
} catch (k) {
|
|
3760
|
-
return console.error("%cstorage",
|
|
3772
|
+
return console.error("%cstorage", _.STORAGE, K.SERIES, r, k), 400;
|
|
3761
3773
|
}
|
|
3762
3774
|
});
|
|
3763
3775
|
/**
|
|
@@ -3771,7 +3783,7 @@ class Lr {
|
|
|
3771
3783
|
try {
|
|
3772
3784
|
return sessionStorage.setObject(l, c), 200;
|
|
3773
3785
|
} catch (k) {
|
|
3774
|
-
return console.error("%cstorage",
|
|
3786
|
+
return console.error("%cstorage", _.STORAGE, K.MESSAGES, r, k), 400;
|
|
3775
3787
|
}
|
|
3776
3788
|
});
|
|
3777
3789
|
A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
|
|
@@ -3783,7 +3795,7 @@ class Lr {
|
|
|
3783
3795
|
try {
|
|
3784
3796
|
return sessionStorage.setObject(c, r), 201;
|
|
3785
3797
|
} catch (l) {
|
|
3786
|
-
return console.error("%cstorage",
|
|
3798
|
+
return console.error("%cstorage", _.STORAGE, K.WIDGET, r, l), 400;
|
|
3787
3799
|
}
|
|
3788
3800
|
});
|
|
3789
3801
|
/**
|
|
@@ -3795,9 +3807,9 @@ class Lr {
|
|
|
3795
3807
|
(l) => l.widget === r.widget
|
|
3796
3808
|
).length || (console.debug(
|
|
3797
3809
|
"%cstorage%c %csubscribe",
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3810
|
+
_.STORAGE,
|
|
3811
|
+
_.NONE,
|
|
3812
|
+
_.SUBSCRIBE,
|
|
3801
3813
|
r.slide,
|
|
3802
3814
|
r.widget
|
|
3803
3815
|
), this.subscribers.push(r)), null));
|
|
@@ -3810,7 +3822,7 @@ class Lr {
|
|
|
3810
3822
|
try {
|
|
3811
3823
|
return sessionStorage.getObject(`${r.type}.${r.id}`);
|
|
3812
3824
|
} catch (c) {
|
|
3813
|
-
return console.warn("%capi",
|
|
3825
|
+
return console.warn("%capi", _.API, K.SLIDE, r.id, c), { data: null, message: "Store Load error", success: !1 };
|
|
3814
3826
|
}
|
|
3815
3827
|
});
|
|
3816
3828
|
/**
|
|
@@ -3828,7 +3840,7 @@ class Lr {
|
|
|
3828
3840
|
css: r.data.css || ""
|
|
3829
3841
|
}), 200;
|
|
3830
3842
|
} catch (c) {
|
|
3831
|
-
return console.error("%cstorage",
|
|
3843
|
+
return console.error("%cstorage", _.STORAGE, K.SLIDE, r, c), 400;
|
|
3832
3844
|
}
|
|
3833
3845
|
});
|
|
3834
3846
|
this.options = r, Storage.prototype.setObject = function(c, l) {
|
|
@@ -3848,7 +3860,7 @@ class Gr {
|
|
|
3848
3860
|
try {
|
|
3849
3861
|
return window.BuzzCasting.WidgetData[c];
|
|
3850
3862
|
} catch (l) {
|
|
3851
|
-
return console.warn("%capi",
|
|
3863
|
+
return console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Cloud Data error", success: !1 };
|
|
3852
3864
|
}
|
|
3853
3865
|
});
|
|
3854
3866
|
A(this, "getSeries", async (r) => {
|
|
@@ -3856,7 +3868,7 @@ class Gr {
|
|
|
3856
3868
|
try {
|
|
3857
3869
|
return window.BuzzCasting.WidgetData[c];
|
|
3858
3870
|
} catch (l) {
|
|
3859
|
-
return console.warn("%capi",
|
|
3871
|
+
return console.warn("%capi", _.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Series Data error", success: !1 };
|
|
3860
3872
|
}
|
|
3861
3873
|
});
|
|
3862
3874
|
A(this, "getMessages", async (r) => {
|
|
@@ -3864,7 +3876,7 @@ class Gr {
|
|
|
3864
3876
|
try {
|
|
3865
3877
|
return window.BuzzCasting.WidgetData[c];
|
|
3866
3878
|
} catch (l) {
|
|
3867
|
-
return console.warn("%capi",
|
|
3879
|
+
return console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3868
3880
|
}
|
|
3869
3881
|
});
|
|
3870
3882
|
/**
|
|
@@ -3878,7 +3890,7 @@ class Gr {
|
|
|
3878
3890
|
try {
|
|
3879
3891
|
return window.BuzzCasting.WidgetData[l] = c, 201;
|
|
3880
3892
|
} catch (k) {
|
|
3881
|
-
return console.error("%cstorage",
|
|
3893
|
+
return console.error("%cstorage", _.STORAGE, "set", r, k), 400;
|
|
3882
3894
|
}
|
|
3883
3895
|
});
|
|
3884
3896
|
/**
|
|
@@ -3892,7 +3904,7 @@ class Gr {
|
|
|
3892
3904
|
try {
|
|
3893
3905
|
return window.BuzzCasting.WidgetData[l] = c, 201;
|
|
3894
3906
|
} catch (k) {
|
|
3895
|
-
return console.error("%cstorage",
|
|
3907
|
+
return console.error("%cstorage", _.STORAGE, "set", r, k), 400;
|
|
3896
3908
|
}
|
|
3897
3909
|
});
|
|
3898
3910
|
/**
|
|
@@ -3906,7 +3918,7 @@ class Gr {
|
|
|
3906
3918
|
try {
|
|
3907
3919
|
return window.BuzzCasting.WidgetData[l] = c, 201;
|
|
3908
3920
|
} catch (k) {
|
|
3909
|
-
return console.error("%cstorage",
|
|
3921
|
+
return console.error("%cstorage", _.STORAGE, "set", r, k), 400;
|
|
3910
3922
|
}
|
|
3911
3923
|
});
|
|
3912
3924
|
A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
|
|
@@ -3918,7 +3930,7 @@ class Gr {
|
|
|
3918
3930
|
try {
|
|
3919
3931
|
return window.BuzzCasting.WidgetData[c] = r, 201;
|
|
3920
3932
|
} catch (l) {
|
|
3921
|
-
return console.error("%cstorage",
|
|
3933
|
+
return console.error("%cstorage", _.STORAGE, K.WIDGET, r, l), 400;
|
|
3922
3934
|
}
|
|
3923
3935
|
});
|
|
3924
3936
|
/**
|
|
@@ -3930,9 +3942,9 @@ class Gr {
|
|
|
3930
3942
|
(l) => l.widget === r.widget
|
|
3931
3943
|
).length || (console.debug(
|
|
3932
3944
|
"%cstorage%c %csubscribe",
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3945
|
+
_.STORAGE,
|
|
3946
|
+
_.NONE,
|
|
3947
|
+
_.SUBSCRIBE,
|
|
3936
3948
|
r.slide,
|
|
3937
3949
|
r.widget
|
|
3938
3950
|
), this.subscribers.push(r)), null));
|
|
@@ -3945,7 +3957,7 @@ class Gr {
|
|
|
3945
3957
|
try {
|
|
3946
3958
|
return window.BuzzCasting.SlideData[r.id];
|
|
3947
3959
|
} catch (c) {
|
|
3948
|
-
return console.warn("%capi",
|
|
3960
|
+
return console.warn("%capi", _.API, K.SLIDE, r.id, c), { data: null, message: "Slide Load error", success: !1 };
|
|
3949
3961
|
}
|
|
3950
3962
|
});
|
|
3951
3963
|
A(this, "storeSlide", async (r) => {
|
|
@@ -3958,7 +3970,7 @@ class Gr {
|
|
|
3958
3970
|
css: r.data.css || ""
|
|
3959
3971
|
}, 201;
|
|
3960
3972
|
} catch (c) {
|
|
3961
|
-
return console.error("%cstorage",
|
|
3973
|
+
return console.error("%cstorage", _.STORAGE, K.SLIDE, r, c), 400;
|
|
3962
3974
|
}
|
|
3963
3975
|
});
|
|
3964
3976
|
this.options = r, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
@@ -4090,8 +4102,8 @@ function $r(h, r, c, l) {
|
|
|
4090
4102
|
return D;
|
|
4091
4103
|
try {
|
|
4092
4104
|
return Oe(D, String(r.valueOf()));
|
|
4093
|
-
} catch (
|
|
4094
|
-
return Oe(D, `[valueOf exception]${
|
|
4105
|
+
} catch (I) {
|
|
4106
|
+
return Oe(D, `[valueOf exception]${I.stack || I.message}`);
|
|
4095
4107
|
}
|
|
4096
4108
|
}
|
|
4097
4109
|
return Oe(k, r.toString());
|
|
@@ -4178,94 +4190,94 @@ class Ja {
|
|
|
4178
4190
|
l.push(this.api.get(k));
|
|
4179
4191
|
}), await Promise.allSettled(l).then(
|
|
4180
4192
|
(k) => k.forEach(async (D) => {
|
|
4181
|
-
let
|
|
4193
|
+
let I = 400;
|
|
4182
4194
|
if (D.status === "fulfilled") {
|
|
4183
4195
|
const B = D.value;
|
|
4184
4196
|
if (this.sm === null)
|
|
4185
4197
|
return 400;
|
|
4186
4198
|
if (B.success === !0) {
|
|
4187
4199
|
const J = this.sm.subscribers.filter(
|
|
4188
|
-
(
|
|
4200
|
+
(fe) => fe.widget === B.query.widget
|
|
4189
4201
|
)[0];
|
|
4190
|
-
let
|
|
4202
|
+
let ee = "";
|
|
4191
4203
|
switch (B.query.type) {
|
|
4192
4204
|
case K.MESSAGES:
|
|
4193
|
-
if (
|
|
4205
|
+
if (ee = $n(B.data.messages), J.hash === ee)
|
|
4194
4206
|
return console.debug(
|
|
4195
4207
|
"%capi%c %cno updates",
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4208
|
+
_.API,
|
|
4209
|
+
_.NONE,
|
|
4210
|
+
_.NO_UPDATES,
|
|
4199
4211
|
K.MESSAGES,
|
|
4200
4212
|
B.query.slide,
|
|
4201
4213
|
B.query.widget
|
|
4202
4214
|
), 204;
|
|
4203
|
-
J.hash =
|
|
4215
|
+
J.hash = ee, I = await this.sm.setMessages(B.query, B);
|
|
4204
4216
|
break;
|
|
4205
4217
|
case K.CLOUD:
|
|
4206
|
-
|
|
4218
|
+
ee = $n(B.data), J.hash === ee ? (console.debug(
|
|
4207
4219
|
"%capi%c %cno updates",
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4220
|
+
_.API,
|
|
4221
|
+
_.NONE,
|
|
4222
|
+
_.NO_UPDATES,
|
|
4211
4223
|
K.CLOUD,
|
|
4212
4224
|
B.query.slide,
|
|
4213
4225
|
B.query.widget
|
|
4214
|
-
),
|
|
4226
|
+
), I = 204) : (J.hash = ee, I = await this.sm.setCloud(B.query, B));
|
|
4215
4227
|
break;
|
|
4216
4228
|
case K.SERIES:
|
|
4217
|
-
|
|
4229
|
+
ee = $n(B.data), J.hash === ee ? (console.debug(
|
|
4218
4230
|
"%capi%c %cno updates",
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4231
|
+
_.API,
|
|
4232
|
+
_.NONE,
|
|
4233
|
+
_.NO_UPDATES,
|
|
4222
4234
|
K.SERIES,
|
|
4223
4235
|
B.query.slide,
|
|
4224
4236
|
B.query.widget
|
|
4225
|
-
),
|
|
4237
|
+
), I = 204) : (J.hash = ee, I = await this.sm.setSeries(B.query, B));
|
|
4226
4238
|
break;
|
|
4227
4239
|
default:
|
|
4228
4240
|
console.warn(
|
|
4229
4241
|
"%capi%c %cstorage",
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4242
|
+
_.API,
|
|
4243
|
+
_.NONE,
|
|
4244
|
+
_.STORAGE,
|
|
4233
4245
|
"error",
|
|
4234
4246
|
`data type ${B.query.type} unknown`
|
|
4235
4247
|
);
|
|
4236
4248
|
}
|
|
4237
4249
|
} else
|
|
4238
|
-
|
|
4239
|
-
switch (
|
|
4250
|
+
I = 401;
|
|
4251
|
+
switch (I) {
|
|
4240
4252
|
case 201:
|
|
4241
4253
|
console.info(
|
|
4242
4254
|
"%capp%c %cbroadcast",
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4255
|
+
_.API,
|
|
4256
|
+
_.NONE,
|
|
4257
|
+
_.BROADCAST,
|
|
4246
4258
|
B.query.slide,
|
|
4247
4259
|
B.data.title ?? B.query.widget
|
|
4248
|
-
), this.bc.postMessage({ event:
|
|
4260
|
+
), this.bc.postMessage({ event: re.WIDGET_UPDATE, data: B });
|
|
4249
4261
|
break;
|
|
4250
4262
|
case 400:
|
|
4251
4263
|
console.warn(
|
|
4252
4264
|
"%capp%c %cbroadcast",
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4265
|
+
_.API,
|
|
4266
|
+
_.NONE,
|
|
4267
|
+
_.BROADCAST,
|
|
4256
4268
|
B.query.slide,
|
|
4257
4269
|
B.data.title ?? B.query.widget
|
|
4258
4270
|
);
|
|
4259
4271
|
break;
|
|
4260
4272
|
}
|
|
4261
|
-
return
|
|
4273
|
+
return I;
|
|
4262
4274
|
} else
|
|
4263
4275
|
return console.warn(
|
|
4264
4276
|
"%capi%c %cstorage",
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4277
|
+
_.API,
|
|
4278
|
+
_.NONE,
|
|
4279
|
+
_.STORAGE,
|
|
4280
|
+
re.ERROR
|
|
4269
4281
|
), 400;
|
|
4270
4282
|
})
|
|
4271
4283
|
);
|
|
@@ -4276,16 +4288,16 @@ class Ja {
|
|
|
4276
4288
|
A(this, "actions", async (r) => {
|
|
4277
4289
|
var c;
|
|
4278
4290
|
switch (r.data.event) {
|
|
4279
|
-
case
|
|
4291
|
+
case re.SUBSCRIBE:
|
|
4280
4292
|
(c = this.sm) == null || c.subscribe(r.data.data);
|
|
4281
4293
|
break;
|
|
4282
|
-
case
|
|
4294
|
+
case re.UPDATE:
|
|
4283
4295
|
console.debug(
|
|
4284
4296
|
"%capi%c %cstorage",
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4297
|
+
_.API,
|
|
4298
|
+
_.NONE,
|
|
4299
|
+
_.STORAGE,
|
|
4300
|
+
re.UPDATE,
|
|
4289
4301
|
r.data
|
|
4290
4302
|
), await this.update();
|
|
4291
4303
|
break;
|
|
@@ -4298,9 +4310,9 @@ class Ja {
|
|
|
4298
4310
|
));
|
|
4299
4311
|
console.info(
|
|
4300
4312
|
"%cstorage%c %cstorage",
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4313
|
+
_.STORAGE,
|
|
4314
|
+
_.NONE,
|
|
4315
|
+
_.MESSAGES,
|
|
4304
4316
|
`${c} messages deleted`
|
|
4305
4317
|
);
|
|
4306
4318
|
});
|
|
@@ -4309,9 +4321,9 @@ class Ja {
|
|
|
4309
4321
|
const c = await ((l = this.sm) == null ? void 0 : l.hideMessage(r.id, 0));
|
|
4310
4322
|
return console.info(
|
|
4311
4323
|
"%cstorage%c %cstorage",
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4324
|
+
_.STORAGE,
|
|
4325
|
+
_.NONE,
|
|
4326
|
+
_.HIDE,
|
|
4315
4327
|
`${c} messages hidden`
|
|
4316
4328
|
), await this.api.hideMessage(r);
|
|
4317
4329
|
});
|
|
@@ -4329,37 +4341,37 @@ class Ja {
|
|
|
4329
4341
|
});
|
|
4330
4342
|
console.info(
|
|
4331
4343
|
"%cstorage%c %cslide",
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4344
|
+
_.STORAGE,
|
|
4345
|
+
_.NONE,
|
|
4346
|
+
_.SLIDE,
|
|
4335
4347
|
r.slide,
|
|
4336
|
-
|
|
4348
|
+
re.VERSION,
|
|
4337
4349
|
Aa
|
|
4338
4350
|
), this.options = r, this.sm = null;
|
|
4339
4351
|
const c = (r == null ? void 0 : r.slide) || r.app;
|
|
4340
4352
|
switch (this.bc = new BroadcastChannel(c), console.info(
|
|
4341
4353
|
"%capi%c %cbroadcast",
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4354
|
+
_.API,
|
|
4355
|
+
_.NONE,
|
|
4356
|
+
_.BROADCAST,
|
|
4357
|
+
re.CHANNEL,
|
|
4346
4358
|
c
|
|
4347
4359
|
), this.bc.onmessage = (l) => {
|
|
4348
4360
|
this.actions(l);
|
|
4349
|
-
}, this.bc.postMessage({ event:
|
|
4350
|
-
case
|
|
4361
|
+
}, this.bc.postMessage({ event: re.STORAGE_INIT, data: {} }), this.api = new Da(r), r.storage) {
|
|
4362
|
+
case ge.DEXIE:
|
|
4351
4363
|
this.sm = new Mr(r);
|
|
4352
4364
|
break;
|
|
4353
|
-
case
|
|
4365
|
+
case ge.LOCAL:
|
|
4354
4366
|
this.sm = new Lr(r);
|
|
4355
4367
|
break;
|
|
4356
|
-
case
|
|
4368
|
+
case ge.SESSION:
|
|
4357
4369
|
this.sm = new Br(r);
|
|
4358
4370
|
break;
|
|
4359
|
-
case
|
|
4371
|
+
case ge.KEYVAL:
|
|
4360
4372
|
this.sm = new Nr(r);
|
|
4361
4373
|
break;
|
|
4362
|
-
case
|
|
4374
|
+
case ge.WINDOW:
|
|
4363
4375
|
this.sm = new Gr(r);
|
|
4364
4376
|
break;
|
|
4365
4377
|
}
|
|
@@ -4377,9 +4389,9 @@ class Na {
|
|
|
4377
4389
|
var c;
|
|
4378
4390
|
return r.type !== K.CLOUD ? (console.warn(
|
|
4379
4391
|
"%capp%c %get",
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4392
|
+
_.APP,
|
|
4393
|
+
_.NONE,
|
|
4394
|
+
_.GET_DATA,
|
|
4383
4395
|
r.widget,
|
|
4384
4396
|
"wrong method call for getMessages, type used is",
|
|
4385
4397
|
r.type
|
|
@@ -4398,9 +4410,9 @@ class Na {
|
|
|
4398
4410
|
var c;
|
|
4399
4411
|
return r.type !== K.MESSAGES ? (console.warn(
|
|
4400
4412
|
"%capp%c %get",
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4413
|
+
_.APP,
|
|
4414
|
+
_.NONE,
|
|
4415
|
+
_.GET_DATA,
|
|
4404
4416
|
r.widget,
|
|
4405
4417
|
"wrong method call for getMessages, type used is",
|
|
4406
4418
|
r.type
|
|
@@ -4419,9 +4431,9 @@ class Na {
|
|
|
4419
4431
|
var c;
|
|
4420
4432
|
return r.type !== K.SERIES ? (console.warn(
|
|
4421
4433
|
"%capp%c %get",
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4434
|
+
_.APP,
|
|
4435
|
+
_.NONE,
|
|
4436
|
+
_.GET_DATA,
|
|
4425
4437
|
r.widget,
|
|
4426
4438
|
"wrong method call for getMessages, type used is",
|
|
4427
4439
|
r.type
|
|
@@ -4432,19 +4444,19 @@ class Na {
|
|
|
4432
4444
|
}) : await ((c = this.sm) == null ? void 0 : c.getSeries(r));
|
|
4433
4445
|
});
|
|
4434
4446
|
switch (this.sm = null, r.storage) {
|
|
4435
|
-
case
|
|
4447
|
+
case ge.DEXIE:
|
|
4436
4448
|
this.sm = new Mr(r);
|
|
4437
4449
|
break;
|
|
4438
|
-
case
|
|
4450
|
+
case ge.LOCAL:
|
|
4439
4451
|
this.sm = new Lr(r);
|
|
4440
4452
|
break;
|
|
4441
|
-
case
|
|
4453
|
+
case ge.SESSION:
|
|
4442
4454
|
this.sm = new Br(r);
|
|
4443
4455
|
break;
|
|
4444
|
-
case
|
|
4456
|
+
case ge.KEYVAL:
|
|
4445
4457
|
this.sm = new Nr(r);
|
|
4446
4458
|
break;
|
|
4447
|
-
case
|
|
4459
|
+
case ge.WINDOW:
|
|
4448
4460
|
this.sm = new Gr(r);
|
|
4449
4461
|
break;
|
|
4450
4462
|
}
|
|
@@ -4491,9 +4503,9 @@ class Za {
|
|
|
4491
4503
|
*/
|
|
4492
4504
|
A(this, "getCloud", async () => this.query.type !== K.CLOUD ? (console.warn(
|
|
4493
4505
|
"%cstorage%c %cwidget",
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4506
|
+
_.STORAGE,
|
|
4507
|
+
_.NONE,
|
|
4508
|
+
_.WIDGET,
|
|
4497
4509
|
this.query.widget,
|
|
4498
4510
|
"Wrong method call for getCloud, expected type is",
|
|
4499
4511
|
this.query.type
|
|
@@ -4509,9 +4521,9 @@ class Za {
|
|
|
4509
4521
|
*/
|
|
4510
4522
|
A(this, "getMessages", async () => this.query.type !== K.MESSAGES ? (console.warn(
|
|
4511
4523
|
"%cstorage%c %cwidget",
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4524
|
+
_.STORAGE,
|
|
4525
|
+
_.NONE,
|
|
4526
|
+
_.WIDGET,
|
|
4515
4527
|
this.query.widget,
|
|
4516
4528
|
"Wrong method call for getMessages, expected type is",
|
|
4517
4529
|
this.query.type
|
|
@@ -4527,9 +4539,9 @@ class Za {
|
|
|
4527
4539
|
*/
|
|
4528
4540
|
A(this, "getSeries", async () => this.query.type !== K.SERIES ? (console.warn(
|
|
4529
4541
|
"%cstorage%c %cwidget",
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4542
|
+
_.STORAGE,
|
|
4543
|
+
_.NONE,
|
|
4544
|
+
_.WIDGET,
|
|
4533
4545
|
this.query.widget,
|
|
4534
4546
|
"Wrong method call for getSeries, expected type is",
|
|
4535
4547
|
this.query.type
|
|
@@ -4553,13 +4565,13 @@ class Za {
|
|
|
4553
4565
|
const l = { ...r.props, ...c };
|
|
4554
4566
|
console.debug(
|
|
4555
4567
|
"%cwidget",
|
|
4556
|
-
|
|
4557
|
-
|
|
4568
|
+
_.WIDGET,
|
|
4569
|
+
re.SHOW_MODAL,
|
|
4558
4570
|
r.showComponent,
|
|
4559
4571
|
// @ts-expect-error cannot get string type out of IFilteredAttributes props
|
|
4560
4572
|
c["data-widget"]
|
|
4561
4573
|
);
|
|
4562
|
-
const k = new CustomEvent(
|
|
4574
|
+
const k = new CustomEvent(re.SHOW_MODAL, {
|
|
4563
4575
|
detail: {
|
|
4564
4576
|
component: r.showComponent,
|
|
4565
4577
|
props: l,
|
|
@@ -4571,10 +4583,10 @@ class Za {
|
|
|
4571
4583
|
});
|
|
4572
4584
|
window.dispatchEvent(k);
|
|
4573
4585
|
});
|
|
4574
|
-
var
|
|
4586
|
+
var I;
|
|
4575
4587
|
this.element = r, this.listeners = c, l = typeof l < "u" ? l : "buzzcasting-slide";
|
|
4576
4588
|
let k;
|
|
4577
|
-
k = { ...r.dataset }, delete k.hmr, k.slide = ((
|
|
4589
|
+
k = { ...r.dataset }, delete k.hmr, k.slide = ((I = r.closest(l.toUpperCase())) == null ? void 0 : I.id) ?? `${l} not found`, k = nt(k), this.query = k, Ta(r);
|
|
4578
4590
|
const D = window.BuzzCasting.getOptions();
|
|
4579
4591
|
this.storageReader = new Na(D), this.broadcastChannel = new BroadcastChannel(k.slide), this.startListener();
|
|
4580
4592
|
}
|
|
@@ -4589,12 +4601,12 @@ class Za {
|
|
|
4589
4601
|
this.broadcastChannel.onmessage = async (c) => {
|
|
4590
4602
|
const l = c.data.data;
|
|
4591
4603
|
switch (c.data.event) {
|
|
4592
|
-
case
|
|
4604
|
+
case re.WIDGET_UPDATE:
|
|
4593
4605
|
l.query.slide === r.slide && l.query.widget === r.widget && this.listeners.forEach((k) => {
|
|
4594
4606
|
k(c.data.data);
|
|
4595
4607
|
});
|
|
4596
4608
|
break;
|
|
4597
|
-
case
|
|
4609
|
+
case re.SLIDE_READY:
|
|
4598
4610
|
this.subscribe();
|
|
4599
4611
|
break;
|
|
4600
4612
|
}
|
|
@@ -4607,13 +4619,13 @@ class Za {
|
|
|
4607
4619
|
subscribe() {
|
|
4608
4620
|
console.debug(
|
|
4609
4621
|
"%cwidget%c %csubscribe",
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4622
|
+
_.WIDGET,
|
|
4623
|
+
_.NONE,
|
|
4624
|
+
_.SUBSCRIBE,
|
|
4613
4625
|
this.query.slide,
|
|
4614
4626
|
this.query.widget
|
|
4615
4627
|
), this.broadcastChannel.postMessage({
|
|
4616
|
-
event:
|
|
4628
|
+
event: re.SUBSCRIBE,
|
|
4617
4629
|
data: this.query
|
|
4618
4630
|
});
|
|
4619
4631
|
}
|
|
@@ -4625,10 +4637,10 @@ export {
|
|
|
4625
4637
|
K as API,
|
|
4626
4638
|
Ja as BuzzcastingStorageManager,
|
|
4627
4639
|
Na as BuzzcastingStorageReader,
|
|
4628
|
-
|
|
4629
|
-
|
|
4640
|
+
_ as CSS,
|
|
4641
|
+
re as EVENTS,
|
|
4630
4642
|
Zt as MODERATION,
|
|
4631
|
-
|
|
4643
|
+
ge as STORAGE,
|
|
4632
4644
|
Za as Widget,
|
|
4633
4645
|
La as anonymize,
|
|
4634
4646
|
Ga as attachedMedia,
|