buzzcasting-storage 3.7.0 → 3.7.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 +182 -178
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Pa = Object.defineProperty;
|
|
2
2
|
var Da = (d, t, s) => t in d ? Pa(d, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[t] = s;
|
|
3
3
|
var b = (d, t, s) => Da(d, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
var _ = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(_ || {}), l = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(l || {}), Z = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(Z || {}), qt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(qt || {}),
|
|
5
|
-
const Ra = "3.
|
|
4
|
+
var _ = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(_ || {}), l = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(l || {}), Z = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(Z || {}), qt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(qt || {}), me = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(me || {});
|
|
5
|
+
const Ra = "3.7.0";
|
|
6
6
|
class xa {
|
|
7
7
|
constructor(t) {
|
|
8
8
|
b(this, "options");
|
|
@@ -293,11 +293,11 @@ function Ca() {
|
|
|
293
293
|
}), e;
|
|
294
294
|
}
|
|
295
295
|
typeof Promise > "u" || A.Promise || (A.Promise = Promise);
|
|
296
|
-
var V = Object.getPrototypeOf,
|
|
296
|
+
var V = Object.getPrototypeOf, we = {}.hasOwnProperty;
|
|
297
297
|
function te(e, n) {
|
|
298
|
-
return
|
|
298
|
+
return we.call(e, n);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function ge(e, n) {
|
|
301
301
|
typeof n == "function" && (n = n(V(e))), (typeof Reflect > "u" ? I : Reflect.ownKeys)(n).forEach(function(r) {
|
|
302
302
|
De(e, r, n[r]);
|
|
303
303
|
});
|
|
@@ -308,7 +308,7 @@ function Ca() {
|
|
|
308
308
|
}
|
|
309
309
|
function Qe(e) {
|
|
310
310
|
return { from: function(n) {
|
|
311
|
-
return e.prototype = Object.create(n.prototype), De(e.prototype, "constructor", e), { extend:
|
|
311
|
+
return e.prototype = Object.create(n.prototype), De(e.prototype, "constructor", e), { extend: ge.bind(null, e.prototype) };
|
|
312
312
|
} };
|
|
313
313
|
}
|
|
314
314
|
var Wr = Object.getOwnPropertyDescriptor, Ur = [].slice;
|
|
@@ -324,12 +324,12 @@ function Ca() {
|
|
|
324
324
|
function Xn(e) {
|
|
325
325
|
A.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Ee(e, n) {
|
|
328
328
|
if (typeof n == "string" && te(e, n)) return e[n];
|
|
329
329
|
if (!n) return e;
|
|
330
330
|
if (typeof n != "string") {
|
|
331
331
|
for (var r = [], a = 0, i = n.length; a < i; ++a) {
|
|
332
|
-
var o =
|
|
332
|
+
var o = Ee(e, n[a]);
|
|
333
333
|
r.push(o);
|
|
334
334
|
}
|
|
335
335
|
return r;
|
|
@@ -337,16 +337,16 @@ function Ca() {
|
|
|
337
337
|
var c = n.indexOf(".");
|
|
338
338
|
if (c !== -1) {
|
|
339
339
|
var f = e[n.substr(0, c)];
|
|
340
|
-
return f == null ? void 0 :
|
|
340
|
+
return f == null ? void 0 : Ee(f, n.substr(c + 1));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function de(e, n, r) {
|
|
344
344
|
if (e && n !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof n != "string" && "length" in n) {
|
|
345
345
|
ot(typeof r != "string" && "length" in r);
|
|
346
|
-
for (var a = 0, i = n.length; a < i; ++a)
|
|
346
|
+
for (var a = 0, i = n.length; a < i; ++a) de(e, n[a], r[a]);
|
|
347
347
|
} else {
|
|
348
348
|
var o, c, f = n.indexOf(".");
|
|
349
|
-
f !== -1 ? (o = n.substr(0, f), (c = n.substr(f + 1)) === "" ? r === void 0 ? k(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r :
|
|
349
|
+
f !== -1 ? (o = n.substr(0, f), (c = n.substr(f + 1)) === "" ? r === void 0 ? k(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r : de(f = !(f = e[o]) || !te(e, o) ? e[o] = {} : f, c, r)) : r === void 0 ? k(e) && !isNaN(parseInt(n)) ? e.splice(n, 1) : delete e[n] : e[n] = r;
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
function Jn(e) {
|
|
@@ -397,7 +397,7 @@ function Ca() {
|
|
|
397
397
|
return n = e.indexOf(n), 0 <= n && e.splice(n, 1), 0 <= n;
|
|
398
398
|
}
|
|
399
399
|
var Ze = {};
|
|
400
|
-
function
|
|
400
|
+
function Se(e) {
|
|
401
401
|
var n, r, a, i;
|
|
402
402
|
if (arguments.length === 1) {
|
|
403
403
|
if (k(e)) return e.slice();
|
|
@@ -418,7 +418,7 @@ function Ca() {
|
|
|
418
418
|
return e[Symbol.toStringTag] === "AsyncFunction";
|
|
419
419
|
} : function() {
|
|
420
420
|
return !1;
|
|
421
|
-
}, dt = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
|
|
421
|
+
}, dt = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], pe = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(dt), Xr = { 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" };
|
|
422
422
|
function Ve(e, n) {
|
|
423
423
|
this.name = e, this.message = n;
|
|
424
424
|
}
|
|
@@ -441,9 +441,9 @@ function Ca() {
|
|
|
441
441
|
Qe(Ve).from(Error).extend({ toString: function() {
|
|
442
442
|
return this.name + ": " + this.message;
|
|
443
443
|
} }), Qe(At).from(Ve), Qe(qe).from(Ve);
|
|
444
|
-
var sn =
|
|
444
|
+
var sn = pe.reduce(function(e, n) {
|
|
445
445
|
return e[n] = n + "Error", e;
|
|
446
|
-
}, {}), Jr = Ve, L =
|
|
446
|
+
}, {}), Jr = Ve, L = pe.reduce(function(e, n) {
|
|
447
447
|
var r = n + "Error";
|
|
448
448
|
function a(i, o) {
|
|
449
449
|
this.name = r, i ? typeof i == "string" ? (this.message = "".concat(i).concat(o ? `
|
|
@@ -454,7 +454,7 @@ function Ca() {
|
|
|
454
454
|
L.Syntax = SyntaxError, L.Type = TypeError, L.Range = RangeError;
|
|
455
455
|
var qn = dt.reduce(function(e, n) {
|
|
456
456
|
return e[n + "Error"] = L[n], e;
|
|
457
|
-
}, {}), Pt =
|
|
457
|
+
}, {}), Pt = pe.reduce(function(e, n) {
|
|
458
458
|
return ["Syntax", "Type", "Range"].indexOf(n) === -1 && (e[n + "Error"] = L[n]), e;
|
|
459
459
|
}, {});
|
|
460
460
|
function Q() {
|
|
@@ -515,16 +515,16 @@ function Ca() {
|
|
|
515
515
|
};
|
|
516
516
|
}
|
|
517
517
|
Pt.ModifyError = At, Pt.DexieError = Ve, Pt.BulkError = qe;
|
|
518
|
-
var
|
|
518
|
+
var be = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
|
|
519
519
|
function er(e) {
|
|
520
|
-
|
|
520
|
+
be = e;
|
|
521
521
|
}
|
|
522
522
|
var lt = {}, tr = 100, Ke = typeof Promise > "u" ? [] : function() {
|
|
523
523
|
var e = Promise.resolve();
|
|
524
524
|
if (typeof crypto > "u" || !crypto.subtle) return [e, V(e), e];
|
|
525
525
|
var n = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
|
|
526
526
|
return [n, V(n), e];
|
|
527
|
-
}(), dt = Ke[0],
|
|
527
|
+
}(), dt = Ke[0], pe = Ke[1], Ke = Ke[2], pe = pe && pe.then, Ge = dt && dt.constructor, cn = !!Ke, ft = function(e, n) {
|
|
528
528
|
ht.push([e, n]), Dt && (queueMicrotask(na), Dt = !1);
|
|
529
529
|
}, un = !0, Dt = !0, Le = [], Rt = [], ln = ut, Re = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, G = Re, ht = [], Fe = 0, xt = [];
|
|
530
530
|
function B(e) {
|
|
@@ -593,7 +593,7 @@ function Ca() {
|
|
|
593
593
|
function ta(e, n, r) {
|
|
594
594
|
try {
|
|
595
595
|
var a, i = n._value;
|
|
596
|
-
!n._state && Rt.length && (Rt = []), a =
|
|
596
|
+
!n._state && Rt.length && (Rt = []), a = be && n._consoleTask ? n._consoleTask.run(function() {
|
|
597
597
|
return e(i);
|
|
598
598
|
}) : e(i), n._state || Rt.indexOf(i) !== -1 || function(o) {
|
|
599
599
|
for (var c = Le.length; c; ) if (Le[--c]._value === o._value) return Le.splice(c, 1);
|
|
@@ -646,7 +646,7 @@ function Ca() {
|
|
|
646
646
|
}
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
ge(B.prototype, { then: dn, _then: function(e, n) {
|
|
650
650
|
hn(this, new nr(null, null, e, n, G));
|
|
651
651
|
}, catch: function(e) {
|
|
652
652
|
if (arguments.length === 1) return this.then(null, e);
|
|
@@ -674,8 +674,8 @@ function Ca() {
|
|
|
674
674
|
}, e);
|
|
675
675
|
r.then(a, i).finally(clearTimeout.bind(null, o));
|
|
676
676
|
}) : this;
|
|
677
|
-
} }), typeof Symbol < "u" && Symbol.toStringTag && De(B.prototype, Symbol.toStringTag, "Dexie.Promise"), Re.env = ar(),
|
|
678
|
-
var e =
|
|
677
|
+
} }), typeof Symbol < "u" && Symbol.toStringTag && De(B.prototype, Symbol.toStringTag, "Dexie.Promise"), Re.env = ar(), ge(B, { all: function() {
|
|
678
|
+
var e = Se.apply(null, arguments).map(Nt);
|
|
679
679
|
return new B(function(n, r) {
|
|
680
680
|
e.length === 0 && n([]);
|
|
681
681
|
var a = e.length;
|
|
@@ -690,7 +690,7 @@ function Ca() {
|
|
|
690
690
|
e.then(n, r);
|
|
691
691
|
}) : new B(lt, !0, e);
|
|
692
692
|
}, reject: It, race: function() {
|
|
693
|
-
var e =
|
|
693
|
+
var e = Se.apply(null, arguments).map(Nt);
|
|
694
694
|
return new B(function(n, r) {
|
|
695
695
|
e.map(function(a) {
|
|
696
696
|
return B.resolve(a).then(n, r);
|
|
@@ -727,7 +727,7 @@ function Ca() {
|
|
|
727
727
|
}, n, r, a);
|
|
728
728
|
});
|
|
729
729
|
} }), Ge && (Ge.allSettled && De(B, "allSettled", function() {
|
|
730
|
-
var e =
|
|
730
|
+
var e = Se.apply(null, arguments).map(Nt);
|
|
731
731
|
return new B(function(n) {
|
|
732
732
|
e.length === 0 && n([]);
|
|
733
733
|
var r = e.length, a = new Array(r);
|
|
@@ -742,7 +742,7 @@ function Ca() {
|
|
|
742
742
|
});
|
|
743
743
|
});
|
|
744
744
|
}), Ge.any && typeof AggregateError < "u" && De(B, "any", function() {
|
|
745
|
-
var e =
|
|
745
|
+
var e = Se.apply(null, arguments).map(Nt);
|
|
746
746
|
return new B(function(n, r) {
|
|
747
747
|
e.length === 0 && r(new AggregateError([]));
|
|
748
748
|
var a = e.length, i = new Array(a);
|
|
@@ -811,8 +811,8 @@ function Ca() {
|
|
|
811
811
|
function gn(e) {
|
|
812
812
|
Promise === Ge && ae.echoes === 0 ? Tt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
813
813
|
}
|
|
814
|
-
("" +
|
|
815
|
-
var ne = B.reject, Ue = "",
|
|
814
|
+
("" + pe).indexOf("[native code]") === -1 && (nt = Ie = Q);
|
|
815
|
+
var ne = B.reject, Ue = "", Oe = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", rt = [], $t = "__dbnames", mn = "readonly", bn = "readwrite";
|
|
816
816
|
function ze(e, n) {
|
|
817
817
|
return e ? n ? function() {
|
|
818
818
|
return e.apply(this, arguments) && n.apply(this, arguments);
|
|
@@ -864,7 +864,7 @@ function Ca() {
|
|
|
864
864
|
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
865
865
|
}
|
|
866
866
|
var dr = (q.prototype._trans = function(e, n, r) {
|
|
867
|
-
var a = this._tx || G.trans, i = this.name, o =
|
|
867
|
+
var a = this._tx || G.trans, i = this.name, o = be && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
868
868
|
function c(m, E, h) {
|
|
869
869
|
if (!h.schema[i]) throw new L.NotFound("Table " + i + " not part of transaction");
|
|
870
870
|
return n(h.idbtrans, h);
|
|
@@ -941,7 +941,7 @@ function Ca() {
|
|
|
941
941
|
return e[p];
|
|
942
942
|
}));
|
|
943
943
|
}
|
|
944
|
-
!r &&
|
|
944
|
+
!r && be && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(n.join("+"), "]"));
|
|
945
945
|
var a = this.schema.idxByName;
|
|
946
946
|
function i(f, p) {
|
|
947
947
|
return Y(f, p) === 0;
|
|
@@ -949,11 +949,11 @@ function Ca() {
|
|
|
949
949
|
var c = n.reduce(function(h, p) {
|
|
950
950
|
var m = h[0], E = h[1], h = a[p], O = e[p];
|
|
951
951
|
return [m || h, m || !h ? ze(E, h && h.multi ? function(g) {
|
|
952
|
-
return g =
|
|
952
|
+
return g = Ee(g, p), k(g) && g.some(function(w) {
|
|
953
953
|
return i(O, w);
|
|
954
954
|
});
|
|
955
955
|
} : function(g) {
|
|
956
|
-
return i(O,
|
|
956
|
+
return i(O, Ee(g, p));
|
|
957
957
|
}) : E];
|
|
958
958
|
}, [null, null]), o = c[0], c = c[1];
|
|
959
959
|
return o ? this.where(o.name).equals(e[o.keyPath]).filter(c) : r ? this.filter(c) : this.where(n).equals("");
|
|
@@ -1016,13 +1016,13 @@ function Ca() {
|
|
|
1016
1016
|
return f.numFailures ? B.reject(f.failures[0]) : f.lastResult;
|
|
1017
1017
|
}).then(function(f) {
|
|
1018
1018
|
if (o) try {
|
|
1019
|
-
|
|
1019
|
+
de(e, o, f);
|
|
1020
1020
|
} catch {
|
|
1021
1021
|
}
|
|
1022
1022
|
return f;
|
|
1023
1023
|
});
|
|
1024
1024
|
}, q.prototype.update = function(e, n) {
|
|
1025
|
-
return typeof e != "object" || k(e) ? this.where(":id").equals(e).modify(n) : (e =
|
|
1025
|
+
return typeof e != "object" || k(e) ? this.where(":id").equals(e).modify(n) : (e = Ee(e, this.schema.primKey.keyPath), e === void 0 ? ne(new L.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(n));
|
|
1026
1026
|
}, q.prototype.put = function(e, n) {
|
|
1027
1027
|
var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, c = e;
|
|
1028
1028
|
return o && i && (c = jt(o)(e)), this._trans("readwrite", function(f) {
|
|
@@ -1031,7 +1031,7 @@ function Ca() {
|
|
|
1031
1031
|
return f.numFailures ? B.reject(f.failures[0]) : f.lastResult;
|
|
1032
1032
|
}).then(function(f) {
|
|
1033
1033
|
if (o) try {
|
|
1034
|
-
|
|
1034
|
+
de(e, o, f);
|
|
1035
1035
|
} catch {
|
|
1036
1036
|
}
|
|
1037
1037
|
return f;
|
|
@@ -1101,7 +1101,7 @@ function Ca() {
|
|
|
1101
1101
|
var D = P[y], R = w[D];
|
|
1102
1102
|
if (D === n.schema.primKey.keyPath) {
|
|
1103
1103
|
if (Y(R, g) !== 0) throw new L.Constraint("Cannot update primary key in bulkUpdate()");
|
|
1104
|
-
} else
|
|
1104
|
+
} else de(S, D, R);
|
|
1105
1105
|
}
|
|
1106
1106
|
o.push(O), p.push(g), m.push(S);
|
|
1107
1107
|
}
|
|
@@ -1431,8 +1431,8 @@ function Ca() {
|
|
|
1431
1431
|
var i, o, c;
|
|
1432
1432
|
c = typeof e == "function" ? e : (i = I(e), o = i.length, function(y) {
|
|
1433
1433
|
for (var P = !1, D = 0; D < o; ++D) {
|
|
1434
|
-
var R = i[D], x = e[R], T =
|
|
1435
|
-
x instanceof mt ? (
|
|
1434
|
+
var R = i[D], x = e[R], T = Ee(y, R);
|
|
1435
|
+
x instanceof mt ? (de(y, R, x.execute(T)), P = !0) : T !== x && (de(y, R, x), P = !0);
|
|
1436
1436
|
}
|
|
1437
1437
|
return P;
|
|
1438
1438
|
});
|
|
@@ -1504,7 +1504,7 @@ function Ca() {
|
|
|
1504
1504
|
function ca(e, n) {
|
|
1505
1505
|
return n < e ? -1 : e === n ? 0 : 1;
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1507
|
+
function fe(e, n, r) {
|
|
1508
1508
|
return e = e instanceof mr ? new e.Collection(e) : e, e._ctx.error = new (r || TypeError)(n), e;
|
|
1509
1509
|
}
|
|
1510
1510
|
function st(e) {
|
|
@@ -1516,7 +1516,7 @@ function Ca() {
|
|
|
1516
1516
|
var i, o, c, f, p, m, E, h = r.length;
|
|
1517
1517
|
if (!r.every(function(w) {
|
|
1518
1518
|
return typeof w == "string";
|
|
1519
|
-
})) return
|
|
1519
|
+
})) return fe(e, ir);
|
|
1520
1520
|
function O(w) {
|
|
1521
1521
|
i = w === "next" ? function(y) {
|
|
1522
1522
|
return y.toUpperCase();
|
|
@@ -1552,9 +1552,9 @@ function Ca() {
|
|
|
1552
1552
|
for (var R = null, x = g; x < h; ++x) {
|
|
1553
1553
|
var T = function(j, C, N, M, $, K) {
|
|
1554
1554
|
for (var U = Math.min(j.length, M.length), z = -1, H = 0; H < U; ++H) {
|
|
1555
|
-
var
|
|
1556
|
-
if (
|
|
1557
|
-
$(j[H],
|
|
1555
|
+
var he = C[H];
|
|
1556
|
+
if (he !== M[H]) return $(j[H], N[H]) < 0 ? j.substr(0, H) + N[H] + N.substr(H + 1) : $(j[H], M[H]) < 0 ? j.substr(0, H) + M[H] + N.substr(H + 1) : 0 <= z ? j.substr(0, z) + C[z] + N.substr(z + 1) : null;
|
|
1557
|
+
$(j[H], he) < 0 && (z = H);
|
|
1558
1558
|
}
|
|
1559
1559
|
return U < M.length && K === "next" ? j + N.substr(j.length) : U < j.length && K === "prev" ? j.substr(0, N.length) : z < 0 ? null : j.substr(0, z) + M[z] + N.substr(z + 1);
|
|
1560
1560
|
}(P, D, f[x], p[x], c, m);
|
|
@@ -1580,30 +1580,30 @@ function Ca() {
|
|
|
1580
1580
|
return Te(e, n, !r, !a);
|
|
1581
1581
|
});
|
|
1582
1582
|
} catch {
|
|
1583
|
-
return
|
|
1583
|
+
return fe(this, Oe);
|
|
1584
1584
|
}
|
|
1585
1585
|
}, se.prototype.equals = function(e) {
|
|
1586
|
-
return e == null ?
|
|
1586
|
+
return e == null ? fe(this, Oe) : new this.Collection(this, function() {
|
|
1587
1587
|
return gr(e);
|
|
1588
1588
|
});
|
|
1589
1589
|
}, se.prototype.above = function(e) {
|
|
1590
|
-
return e == null ?
|
|
1590
|
+
return e == null ? fe(this, Oe) : new this.Collection(this, function() {
|
|
1591
1591
|
return Te(e, void 0, !0);
|
|
1592
1592
|
});
|
|
1593
1593
|
}, se.prototype.aboveOrEqual = function(e) {
|
|
1594
|
-
return e == null ?
|
|
1594
|
+
return e == null ? fe(this, Oe) : new this.Collection(this, function() {
|
|
1595
1595
|
return Te(e, void 0, !1);
|
|
1596
1596
|
});
|
|
1597
1597
|
}, se.prototype.below = function(e) {
|
|
1598
|
-
return e == null ?
|
|
1598
|
+
return e == null ? fe(this, Oe) : new this.Collection(this, function() {
|
|
1599
1599
|
return Te(void 0, e, !1, !0);
|
|
1600
1600
|
});
|
|
1601
1601
|
}, se.prototype.belowOrEqual = function(e) {
|
|
1602
|
-
return e == null ?
|
|
1602
|
+
return e == null ? fe(this, Oe) : new this.Collection(this, function() {
|
|
1603
1603
|
return Te(void 0, e);
|
|
1604
1604
|
});
|
|
1605
1605
|
}, se.prototype.startsWith = function(e) {
|
|
1606
|
-
return typeof e != "string" ?
|
|
1606
|
+
return typeof e != "string" ? fe(this, ir) : this.between(e, e + Ue, !0, !0);
|
|
1607
1607
|
}, se.prototype.startsWithIgnoreCase = function(e) {
|
|
1608
1608
|
return e === "" ? this.startsWith(e) : Kt(this, function(n, r) {
|
|
1609
1609
|
return n.indexOf(r[0]) === 0;
|
|
@@ -1613,23 +1613,23 @@ function Ca() {
|
|
|
1613
1613
|
return n === r[0];
|
|
1614
1614
|
}, [e], "");
|
|
1615
1615
|
}, se.prototype.anyOfIgnoreCase = function() {
|
|
1616
|
-
var e =
|
|
1616
|
+
var e = Se.apply(Ze, arguments);
|
|
1617
1617
|
return e.length === 0 ? st(this) : Kt(this, function(n, r) {
|
|
1618
1618
|
return r.indexOf(n) !== -1;
|
|
1619
1619
|
}, e, "");
|
|
1620
1620
|
}, se.prototype.startsWithAnyOfIgnoreCase = function() {
|
|
1621
|
-
var e =
|
|
1621
|
+
var e = Se.apply(Ze, arguments);
|
|
1622
1622
|
return e.length === 0 ? st(this) : Kt(this, function(n, r) {
|
|
1623
1623
|
return r.some(function(a) {
|
|
1624
1624
|
return n.indexOf(a) === 0;
|
|
1625
1625
|
});
|
|
1626
1626
|
}, e, Ue);
|
|
1627
1627
|
}, se.prototype.anyOf = function() {
|
|
1628
|
-
var e = this, n =
|
|
1628
|
+
var e = this, n = Se.apply(Ze, arguments), r = this._cmp;
|
|
1629
1629
|
try {
|
|
1630
1630
|
n.sort(r);
|
|
1631
1631
|
} catch {
|
|
1632
|
-
return
|
|
1632
|
+
return fe(this, Oe);
|
|
1633
1633
|
}
|
|
1634
1634
|
if (n.length === 0) return st(this);
|
|
1635
1635
|
var a = new this.Collection(this, function() {
|
|
@@ -1648,12 +1648,12 @@ function Ca() {
|
|
|
1648
1648
|
}, se.prototype.notEqual = function(e) {
|
|
1649
1649
|
return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
|
|
1650
1650
|
}, se.prototype.noneOf = function() {
|
|
1651
|
-
var e =
|
|
1651
|
+
var e = Se.apply(Ze, arguments);
|
|
1652
1652
|
if (e.length === 0) return new this.Collection(this);
|
|
1653
1653
|
try {
|
|
1654
1654
|
e.sort(this._ascending);
|
|
1655
1655
|
} catch {
|
|
1656
|
-
return
|
|
1656
|
+
return fe(this, Oe);
|
|
1657
1657
|
}
|
|
1658
1658
|
var n = e.reduce(function(r, a) {
|
|
1659
1659
|
return r ? r.concat([[r[r.length - 1][1], a]]) : [[-1 / 0, a]];
|
|
@@ -1664,7 +1664,7 @@ function Ca() {
|
|
|
1664
1664
|
if (P.length === 0) return st(this);
|
|
1665
1665
|
if (!P.every(function(D) {
|
|
1666
1666
|
return D[0] !== void 0 && D[1] !== void 0 && i(D[0], D[1]) <= 0;
|
|
1667
|
-
})) return
|
|
1667
|
+
})) return fe(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", L.InvalidArgument);
|
|
1668
1668
|
var p = !n || n.includeLowers !== !1, m = n && n.includeUppers === !0, E, h = i;
|
|
1669
1669
|
function O(D, R) {
|
|
1670
1670
|
return h(D[0], R[0]);
|
|
@@ -1681,7 +1681,7 @@ function Ca() {
|
|
|
1681
1681
|
return x === T && D.push(R), D;
|
|
1682
1682
|
}, [])).sort(O);
|
|
1683
1683
|
} catch {
|
|
1684
|
-
return
|
|
1684
|
+
return fe(this, Oe);
|
|
1685
1685
|
}
|
|
1686
1686
|
var g = 0, w = m ? function(D) {
|
|
1687
1687
|
return 0 < i(D, E[g][1]);
|
|
@@ -1703,16 +1703,16 @@ function Ca() {
|
|
|
1703
1703
|
}), !1);
|
|
1704
1704
|
}), P;
|
|
1705
1705
|
}, se.prototype.startsWithAnyOf = function() {
|
|
1706
|
-
var e =
|
|
1706
|
+
var e = Se.apply(Ze, arguments);
|
|
1707
1707
|
return e.every(function(n) {
|
|
1708
1708
|
return typeof n == "string";
|
|
1709
1709
|
}) ? e.length === 0 ? st(this) : this.inAnyRange(e.map(function(n) {
|
|
1710
1710
|
return [n, n + Ue];
|
|
1711
|
-
})) :
|
|
1711
|
+
})) : fe(this, "startsWithAnyOf() only works with strings");
|
|
1712
1712
|
}, se);
|
|
1713
1713
|
function se() {
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1715
|
+
function ye(e) {
|
|
1716
1716
|
return ee(function(n) {
|
|
1717
1717
|
return bt(n), e(n.target.error), !1;
|
|
1718
1718
|
});
|
|
@@ -1720,9 +1720,9 @@ function Ca() {
|
|
|
1720
1720
|
function bt(e) {
|
|
1721
1721
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1722
1722
|
}
|
|
1723
|
-
var yt = "storagemutated", En = "x-storagemutated-1", Ce = pt(null, yt), ua = (
|
|
1723
|
+
var yt = "storagemutated", En = "x-storagemutated-1", Ce = pt(null, yt), ua = (ve.prototype._lock = function() {
|
|
1724
1724
|
return ot(!G.global), ++this._reculock, this._reculock !== 1 || G.global || (G.lockOwnerFor = this), this;
|
|
1725
|
-
},
|
|
1725
|
+
}, ve.prototype._unlock = function() {
|
|
1726
1726
|
if (ot(!G.global), --this._reculock == 0) for (G.global || (G.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
1727
1727
|
var e = this._blockedFuncs.shift();
|
|
1728
1728
|
try {
|
|
@@ -1731,9 +1731,9 @@ function Ca() {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
return this;
|
|
1734
|
-
},
|
|
1734
|
+
}, ve.prototype._locked = function() {
|
|
1735
1735
|
return this._reculock && G.lockOwnerFor !== this;
|
|
1736
|
-
},
|
|
1736
|
+
}, ve.prototype.create = function(e) {
|
|
1737
1737
|
var n = this;
|
|
1738
1738
|
if (!this.mode) return this;
|
|
1739
1739
|
var r = this.db.idbdb, a = this.db._state.dbOpenError;
|
|
@@ -1753,7 +1753,7 @@ function Ca() {
|
|
|
1753
1753
|
}), e.oncomplete = ee(function() {
|
|
1754
1754
|
n.active = !1, n._resolve(), "mutatedParts" in e && Ce.storagemutated.fire(e.mutatedParts);
|
|
1755
1755
|
}), this;
|
|
1756
|
-
},
|
|
1756
|
+
}, ve.prototype._promise = function(e, n, r) {
|
|
1757
1757
|
var a = this;
|
|
1758
1758
|
if (e === "readwrite" && this.mode !== "readwrite") return ne(new L.ReadOnly("Transaction is readonly"));
|
|
1759
1759
|
if (!this.active) return ne(new L.TransactionInactive());
|
|
@@ -1777,9 +1777,9 @@ function Ca() {
|
|
|
1777
1777
|
f && f.then && f.then(o, c);
|
|
1778
1778
|
});
|
|
1779
1779
|
return i._lib = !0, i;
|
|
1780
|
-
},
|
|
1780
|
+
}, ve.prototype._root = function() {
|
|
1781
1781
|
return this.parent ? this.parent._root() : this;
|
|
1782
|
-
},
|
|
1782
|
+
}, ve.prototype.waitFor = function(e) {
|
|
1783
1783
|
var n, r = this._root(), a = B.resolve(e);
|
|
1784
1784
|
r._waitingFor ? r._waitingFor = r._waitingFor.then(function() {
|
|
1785
1785
|
return a;
|
|
@@ -1797,16 +1797,16 @@ function Ca() {
|
|
|
1797
1797
|
r._waitingFor === i && (r._waitingFor = null);
|
|
1798
1798
|
});
|
|
1799
1799
|
});
|
|
1800
|
-
},
|
|
1800
|
+
}, ve.prototype.abort = function() {
|
|
1801
1801
|
this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new L.Abort()));
|
|
1802
|
-
},
|
|
1802
|
+
}, ve.prototype.table = function(e) {
|
|
1803
1803
|
var n = this._memoizedTables || (this._memoizedTables = {});
|
|
1804
1804
|
if (te(n, e)) return n[e];
|
|
1805
1805
|
var r = this.schema[e];
|
|
1806
1806
|
if (!r) throw new L.NotFound("Table " + e + " not part of transaction");
|
|
1807
1807
|
return r = new this.db.Table(e, r, this), r.core = this.db.core.table(e), n[e] = r;
|
|
1808
|
-
},
|
|
1809
|
-
function
|
|
1808
|
+
}, ve);
|
|
1809
|
+
function ve() {
|
|
1810
1810
|
}
|
|
1811
1811
|
function Sn(e, n, r, a, i, o, c) {
|
|
1812
1812
|
return { name: e, keyPath: n, unique: r, multi: a, auto: i, compound: o, src: (r && !c ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + br(n) };
|
|
@@ -1838,9 +1838,9 @@ function Ca() {
|
|
|
1838
1838
|
} : typeof e == "string" ? (n = e).split(".").length === 1 ? function(r) {
|
|
1839
1839
|
return r[n];
|
|
1840
1840
|
} : function(r) {
|
|
1841
|
-
return
|
|
1841
|
+
return Ee(r, n);
|
|
1842
1842
|
} : function(r) {
|
|
1843
|
-
return
|
|
1843
|
+
return Ee(r, e);
|
|
1844
1844
|
};
|
|
1845
1845
|
var n;
|
|
1846
1846
|
}
|
|
@@ -1869,27 +1869,27 @@ function Ca() {
|
|
|
1869
1869
|
var $, K = (D || R || { length: 1 }).length;
|
|
1870
1870
|
if (D && R && D.length !== R.length) throw new Error("Given keys array must have same length as given values array.");
|
|
1871
1871
|
if (K === 0) return T({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1872
|
-
function U(
|
|
1873
|
-
++
|
|
1872
|
+
function U(le) {
|
|
1873
|
+
++he, bt(le);
|
|
1874
1874
|
}
|
|
1875
|
-
var z = [], H = [],
|
|
1875
|
+
var z = [], H = [], he = 0;
|
|
1876
1876
|
if (P === "deleteRange") {
|
|
1877
|
-
if (x.type === 4) return T({ numFailures:
|
|
1877
|
+
if (x.type === 4) return T({ numFailures: he, failures: H, results: [], lastResult: void 0 });
|
|
1878
1878
|
x.type === 3 ? z.push($ = C.clear()) : z.push($ = C.delete(a(x)));
|
|
1879
1879
|
} else {
|
|
1880
1880
|
var N = M ? N ? [R, D] : [R, null] : [D, null], F = N[0], oe = N[1];
|
|
1881
1881
|
if (M) for (var ce = 0; ce < K; ++ce) z.push($ = oe && oe[ce] !== void 0 ? C[P](F[ce], oe[ce]) : C[P](F[ce])), $.onerror = U;
|
|
1882
1882
|
else for (ce = 0; ce < K; ++ce) z.push($ = C[P](F[ce])), $.onerror = U;
|
|
1883
1883
|
}
|
|
1884
|
-
function Vt(
|
|
1885
|
-
|
|
1884
|
+
function Vt(le) {
|
|
1885
|
+
le = le.target.result, z.forEach(function(Xe, Fn) {
|
|
1886
1886
|
return Xe.error != null && (H[Fn] = Xe.error);
|
|
1887
|
-
}), T({ numFailures:
|
|
1887
|
+
}), T({ numFailures: he, failures: H, results: P === "delete" ? D : z.map(function(Xe) {
|
|
1888
1888
|
return Xe.result;
|
|
1889
|
-
}), lastResult:
|
|
1889
|
+
}), lastResult: le });
|
|
1890
1890
|
}
|
|
1891
|
-
$.onerror = function(
|
|
1892
|
-
U(
|
|
1891
|
+
$.onerror = function(le) {
|
|
1892
|
+
U(le), Vt(le);
|
|
1893
1893
|
}, $.onsuccess = Vt;
|
|
1894
1894
|
});
|
|
1895
1895
|
}, getMany: function(S) {
|
|
@@ -1898,7 +1898,7 @@ function Ca() {
|
|
|
1898
1898
|
D = ee(D);
|
|
1899
1899
|
for (var x, T = y.objectStore(w), j = P.length, C = new Array(j), N = 0, M = 0, $ = function(z) {
|
|
1900
1900
|
z = z.target, C[z._pos] = z.result, ++M === N && D(C);
|
|
1901
|
-
}, K =
|
|
1901
|
+
}, K = ye(R), U = 0; U < j; ++U) P[U] != null && ((x = T.get(P[U]))._pos = U, x.onsuccess = $, x.onerror = K, ++N);
|
|
1902
1902
|
N === 0 && D(C);
|
|
1903
1903
|
});
|
|
1904
1904
|
}, get: function(S) {
|
|
@@ -1908,7 +1908,7 @@ function Ca() {
|
|
|
1908
1908
|
var x = y.objectStore(w).get(P);
|
|
1909
1909
|
x.onsuccess = function(T) {
|
|
1910
1910
|
return D(T.target.result);
|
|
1911
|
-
}, x.onerror =
|
|
1911
|
+
}, x.onerror = ye(R);
|
|
1912
1912
|
});
|
|
1913
1913
|
}, query: (g = m, function(S) {
|
|
1914
1914
|
return new Promise(function(y, P) {
|
|
@@ -1917,19 +1917,19 @@ function Ca() {
|
|
|
1917
1917
|
if (j === 0) return y({ result: [] });
|
|
1918
1918
|
g ? ((C = T ? M.getAll($, C) : M.getAllKeys($, C)).onsuccess = function(K) {
|
|
1919
1919
|
return y({ result: K.target.result });
|
|
1920
|
-
}, C.onerror =
|
|
1920
|
+
}, C.onerror = ye(P)) : (D = 0, R = !T && "openKeyCursor" in M ? M.openKeyCursor($) : M.openCursor($), x = [], R.onsuccess = function(K) {
|
|
1921
1921
|
var U = R.result;
|
|
1922
1922
|
return U ? (x.push(T ? U.value : U.primaryKey), ++D === j ? y({ result: x }) : void U.continue()) : y({ result: x });
|
|
1923
|
-
}, R.onerror =
|
|
1923
|
+
}, R.onerror = ye(P));
|
|
1924
1924
|
});
|
|
1925
1925
|
}), openCursor: function(S) {
|
|
1926
1926
|
var y = S.trans, P = S.values, D = S.query, R = S.reverse, x = S.unique;
|
|
1927
1927
|
return new Promise(function(T, j) {
|
|
1928
1928
|
T = ee(T);
|
|
1929
1929
|
var M = D.index, C = D.range, N = y.objectStore(w), N = M.isPrimaryKey ? N : N.index(M.name), M = R ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", $ = !P && "openKeyCursor" in N ? N.openKeyCursor(a(C), M) : N.openCursor(a(C), M);
|
|
1930
|
-
$.onerror =
|
|
1931
|
-
var U, z, H,
|
|
1932
|
-
F ? (F.___id = ++la, F.done = !1, U = F.continue.bind(F), z = (z = F.continuePrimaryKey) && z.bind(F), H = F.advance.bind(F),
|
|
1930
|
+
$.onerror = ye(j), $.onsuccess = ee(function(K) {
|
|
1931
|
+
var U, z, H, he, F = $.result;
|
|
1932
|
+
F ? (F.___id = ++la, F.done = !1, U = F.continue.bind(F), z = (z = F.continuePrimaryKey) && z.bind(F), H = F.advance.bind(F), he = function() {
|
|
1933
1933
|
throw new Error("Cursor not stopped");
|
|
1934
1934
|
}, F.trans = y, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
|
|
1935
1935
|
throw new Error("Cursor not started");
|
|
@@ -1944,19 +1944,19 @@ function Ca() {
|
|
|
1944
1944
|
function ce() {
|
|
1945
1945
|
if ($.result) try {
|
|
1946
1946
|
oe();
|
|
1947
|
-
} catch (
|
|
1948
|
-
F.fail(
|
|
1947
|
+
} catch (le) {
|
|
1948
|
+
F.fail(le);
|
|
1949
1949
|
}
|
|
1950
1950
|
else F.done = !0, F.start = function() {
|
|
1951
1951
|
throw new Error("Cursor behind last entry");
|
|
1952
1952
|
}, F.stop();
|
|
1953
1953
|
}
|
|
1954
|
-
var Vt = new Promise(function(
|
|
1955
|
-
|
|
1956
|
-
F.stop = F.continue = F.continuePrimaryKey = F.advance =
|
|
1954
|
+
var Vt = new Promise(function(le, Xe) {
|
|
1955
|
+
le = ee(le), $.onerror = ye(Xe), F.fail = Xe, F.stop = function(Fn) {
|
|
1956
|
+
F.stop = F.continue = F.continuePrimaryKey = F.advance = he, le(Fn);
|
|
1957
1957
|
};
|
|
1958
1958
|
});
|
|
1959
|
-
return $.onsuccess = ee(function(
|
|
1959
|
+
return $.onsuccess = ee(function(le) {
|
|
1960
1960
|
$.onsuccess = ce, ce();
|
|
1961
1961
|
}), F.continue = U, F.continuePrimaryKey = z, F.advance = H, ce(), Vt;
|
|
1962
1962
|
}, T(F)) : T(null);
|
|
@@ -1968,7 +1968,7 @@ function Ca() {
|
|
|
1968
1968
|
var j = P.objectStore(w), C = D.isPrimaryKey ? j : j.index(D.name), j = a(R), C = j ? C.count(j) : C.count();
|
|
1969
1969
|
C.onsuccess = ee(function(N) {
|
|
1970
1970
|
return x(N.target.result);
|
|
1971
|
-
}), C.onerror =
|
|
1971
|
+
}), C.onerror = ye(T);
|
|
1972
1972
|
});
|
|
1973
1973
|
} };
|
|
1974
1974
|
}
|
|
@@ -2108,7 +2108,7 @@ function Ca() {
|
|
|
2108
2108
|
if (c.change.length || c.recreate) return console.warn("Unable to patch indexes of table ".concat(c.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
2109
2109
|
var f = n.objectStore(c.name);
|
|
2110
2110
|
c.add.forEach(function(p) {
|
|
2111
|
-
|
|
2111
|
+
be && console.debug("Dexie upgrade patch: Creating missing index ".concat(c.name, ".").concat(p.src)), Ft(f, p);
|
|
2112
2112
|
});
|
|
2113
2113
|
}(i[a]);
|
|
2114
2114
|
if (typeof o == "object") return o.value;
|
|
@@ -2143,7 +2143,7 @@ function Ca() {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
function vr(e, n) {
|
|
2145
2145
|
I(e).forEach(function(r) {
|
|
2146
|
-
n.db.objectStoreNames.contains(r) || (
|
|
2146
|
+
n.db.objectStoreNames.contains(r) || (be && console.debug("Dexie: Creating missing table", r), Dn(n, r, e[r].primKey, e[r].indexes));
|
|
2147
2147
|
});
|
|
2148
2148
|
}
|
|
2149
2149
|
function Ft(e, n) {
|
|
@@ -2201,7 +2201,7 @@ function Ca() {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
function Rn(e, n) {
|
|
2203
2203
|
var r = e._dbNamesDB;
|
|
2204
|
-
return r || (r = e._dbNamesDB = new
|
|
2204
|
+
return r || (r = e._dbNamesDB = new _e($t, { addons: [], indexedDB: e, IDBKeyRange: n })).version(1).stores({ dbnames: "name" }), r.table("dbnames");
|
|
2205
2205
|
}
|
|
2206
2206
|
function xn(e) {
|
|
2207
2207
|
return e && typeof e.databases == "function";
|
|
@@ -2289,7 +2289,7 @@ function Ca() {
|
|
|
2289
2289
|
return n[r] && Er(n[r], e[r]);
|
|
2290
2290
|
});
|
|
2291
2291
|
}
|
|
2292
|
-
|
|
2292
|
+
ge(ie.prototype, ((pe = { add: function(e) {
|
|
2293
2293
|
return St(this, e), this;
|
|
2294
2294
|
}, addKey: function(e) {
|
|
2295
2295
|
return Et(this, e, e), this;
|
|
@@ -2303,7 +2303,7 @@ function Ca() {
|
|
|
2303
2303
|
return n && Y(n.from, e) <= 0 && 0 <= Y(n.to, e);
|
|
2304
2304
|
} })[rn] = function() {
|
|
2305
2305
|
return Ht(this);
|
|
2306
|
-
},
|
|
2306
|
+
}, pe));
|
|
2307
2307
|
var He = {}, Cn = {}, Nn = !1;
|
|
2308
2308
|
function Xt(e) {
|
|
2309
2309
|
Yt(Cn, e), Nn || (Nn = !0, setTimeout(function() {
|
|
@@ -2352,11 +2352,11 @@ function Ca() {
|
|
|
2352
2352
|
if (c(), !r) throw new L.MissingAPI();
|
|
2353
2353
|
var w = e.name, S = n.autoSchema || !i ? r.open(w) : r.open(w, i);
|
|
2354
2354
|
if (!S) throw new L.MissingAPI();
|
|
2355
|
-
S.onerror =
|
|
2355
|
+
S.onerror = ye(g), S.onblocked = ee(e._fireOnBlocked), S.onupgradeneeded = ee(function(y) {
|
|
2356
2356
|
var P;
|
|
2357
2357
|
E = S.transaction, n.autoSchema && !e._options.allowEmptyDB ? (S.onerror = bt, E.abort(), S.result.close(), (P = r.deleteDatabase(w)).onsuccess = P.onerror = ee(function() {
|
|
2358
2358
|
g(new L.NoSuchDatabase("Database ".concat(w, " doesnt exist")));
|
|
2359
|
-
})) : (E.onerror =
|
|
2359
|
+
})) : (E.onerror = ye(g), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, h = y < 1, e.idbdb = S.result, o && ga(e, E), pa(e, y / 10, E, g));
|
|
2360
2360
|
}, g), S.onsuccess = ee(function() {
|
|
2361
2361
|
E = null;
|
|
2362
2362
|
var y, P, D, R, x, T = e.idbdb = S.result, j = _t(T.objectStoreNames);
|
|
@@ -2542,8 +2542,8 @@ function Ca() {
|
|
|
2542
2542
|
return (h = h.type === "add" || h.type === "put" ? u(u({}, h), { keys: y }) : u({}, h)).type !== "delete" && (h.values = v([], h.values)), h.keys && (h.keys = v([], h.keys)), O = r, w = y, ((g = h).type === "add" ? Promise.resolve([]) : O.getMany({ trans: g.trans, keys: w, cache: "immutable" })).then(function(P) {
|
|
2543
2543
|
var D = y.map(function(R, x) {
|
|
2544
2544
|
var T, j, C, N = P[x], M = { onerror: null, onsuccess: null };
|
|
2545
|
-
return h.type === "delete" ? f.fire.call(M, R, N, S) : h.type === "add" || N === void 0 ? (T = p.fire.call(M, R, h.values[x], S), R == null && T != null && (h.keys[x] = R = T, a.outbound ||
|
|
2546
|
-
te(C, $) ? C[$] = j[$] :
|
|
2545
|
+
return h.type === "delete" ? f.fire.call(M, R, N, S) : h.type === "add" || N === void 0 ? (T = p.fire.call(M, R, h.values[x], S), R == null && T != null && (h.keys[x] = R = T, a.outbound || de(h.values[x], a.keyPath, R))) : (T = Mn(N, h.values[x]), (j = m.fire.call(M, T, R, N, S)) && (C = h.values[x], Object.keys(j).forEach(function($) {
|
|
2546
|
+
te(C, $) ? C[$] = j[$] : de(C, $, j[$]);
|
|
2547
2547
|
}))), M;
|
|
2548
2548
|
});
|
|
2549
2549
|
return r.mutate(h).then(function(R) {
|
|
@@ -2620,8 +2620,8 @@ function Ca() {
|
|
|
2620
2620
|
return H != null ? $.extractKey(H) : null;
|
|
2621
2621
|
}
|
|
2622
2622
|
function z(H) {
|
|
2623
|
-
return $.multiEntry && k(H) ? H.forEach(function(
|
|
2624
|
-
return K.addKey(
|
|
2623
|
+
return $.multiEntry && k(H) ? H.forEach(function(he) {
|
|
2624
|
+
return K.addKey(he);
|
|
2625
2625
|
}) : K.addKey(H);
|
|
2626
2626
|
}
|
|
2627
2627
|
(y || P).forEach(function(H, oe) {
|
|
@@ -2636,7 +2636,7 @@ function Ca() {
|
|
|
2636
2636
|
return K.extractKey(F);
|
|
2637
2637
|
}), z = K.keyPath.findIndex(function(F) {
|
|
2638
2638
|
return F === c.keyPath;
|
|
2639
|
-
}), H = 0,
|
|
2639
|
+
}), H = 0, he = $.results.length; H < he; ++H) U[H][z] = $.results[H];
|
|
2640
2640
|
w(K.name).addKeys(U);
|
|
2641
2641
|
})), D.mutatedParts = Yt(D.mutatedParts || {}, R), $;
|
|
2642
2642
|
});
|
|
@@ -2832,7 +2832,7 @@ function Ca() {
|
|
|
2832
2832
|
})) : c.then(function(p) {
|
|
2833
2833
|
var m = Rr(0, u(u({}, o), { values: o.values.map(function(E, h) {
|
|
2834
2834
|
var O;
|
|
2835
|
-
return p.failures[h] ? E : (E = (O = i.keyPath) !== null && O !== void 0 && O.includes(".") ? je(E) : u({}, E),
|
|
2835
|
+
return p.failures[h] ? E : (E = (O = i.keyPath) !== null && O !== void 0 && O.includes(".") ? je(E) : u({}, E), de(E, i.keyPath, p.results[h]), E);
|
|
2836
2836
|
}) }), p);
|
|
2837
2837
|
f.optimisticOps.push(m), queueMicrotask(function() {
|
|
2838
2838
|
return o.mutatedParts && Xt(o.mutatedParts);
|
|
@@ -2880,7 +2880,7 @@ function Ca() {
|
|
|
2880
2880
|
return a === "db" ? n : Reflect.get(r, a, i);
|
|
2881
2881
|
} });
|
|
2882
2882
|
}
|
|
2883
|
-
var
|
|
2883
|
+
var _e = (re.prototype.version = function(e) {
|
|
2884
2884
|
if (isNaN(e) || e < 0.1) throw new L.Type("Given version is not a positive number");
|
|
2885
2885
|
if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new L.Schema("Cannot add version when database is open");
|
|
2886
2886
|
this.verno = Math.max(this.verno, e);
|
|
@@ -2941,7 +2941,7 @@ function Ca() {
|
|
|
2941
2941
|
f.onsuccess = ee(function() {
|
|
2942
2942
|
var p, m, E;
|
|
2943
2943
|
p = n._deps, m = n.name, E = p.indexedDB, p = p.IDBKeyRange, xn(E) || m === $t || Rn(E, p).delete(m).catch(Q), i();
|
|
2944
|
-
}), f.onerror =
|
|
2944
|
+
}), f.onerror = ye(o), f.onblocked = n._fireOnBlocked;
|
|
2945
2945
|
}
|
|
2946
2946
|
if (r) throw new L.InvalidArgument("Invalid closeOptions argument to db.delete()");
|
|
2947
2947
|
a.isBeingOpened ? a.dbReadyPromise.then(c) : c();
|
|
@@ -3116,9 +3116,9 @@ function Ca() {
|
|
|
3116
3116
|
return h(r);
|
|
3117
3117
|
});
|
|
3118
3118
|
}
|
|
3119
|
-
var Zt,
|
|
3119
|
+
var Zt, pe = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Aa = (Gn.prototype.subscribe = function(e, n, r) {
|
|
3120
3120
|
return this._subscribe(e && typeof e != "function" ? e : { next: e, error: n, complete: r });
|
|
3121
|
-
}, Gn.prototype[
|
|
3121
|
+
}, Gn.prototype[pe] = function() {
|
|
3122
3122
|
return this;
|
|
3123
3123
|
}, Gn);
|
|
3124
3124
|
function Gn(e) {
|
|
@@ -3173,7 +3173,7 @@ function Ca() {
|
|
|
3173
3173
|
return n;
|
|
3174
3174
|
}, a;
|
|
3175
3175
|
}
|
|
3176
|
-
var Ye =
|
|
3176
|
+
var Ye = _e;
|
|
3177
3177
|
function Ln(e) {
|
|
3178
3178
|
var n = Ne;
|
|
3179
3179
|
try {
|
|
@@ -3182,7 +3182,7 @@ function Ca() {
|
|
|
3182
3182
|
Ne = n;
|
|
3183
3183
|
}
|
|
3184
3184
|
}
|
|
3185
|
-
|
|
3185
|
+
ge(Ye, u(u({}, Pt), { delete: function(e) {
|
|
3186
3186
|
return new Ye(e, { addons: [] }).delete();
|
|
3187
3187
|
}, exists: function(e) {
|
|
3188
3188
|
return new Ye(e, { addons: [] }).open().then(function(n) {
|
|
@@ -3230,12 +3230,12 @@ function Ca() {
|
|
|
3230
3230
|
} }, waitFor: function(e, n) {
|
|
3231
3231
|
return n = B.resolve(typeof e == "function" ? Ye.ignoreTransaction(e) : e).timeout(n || 6e4), G.trans ? G.trans.waitFor(n) : n;
|
|
3232
3232
|
}, Promise: B, debug: { get: function() {
|
|
3233
|
-
return
|
|
3233
|
+
return be;
|
|
3234
3234
|
}, set: function(e) {
|
|
3235
3235
|
er(e);
|
|
3236
|
-
} }, derive: Qe, extend: W, props:
|
|
3237
|
-
typeof n == "string" ?
|
|
3238
|
-
|
|
3236
|
+
} }, derive: Qe, extend: W, props: ge, override: Yn, Events: pt, on: Ce, liveQuery: kr, extendObservabilitySet: Yt, getByKeyPath: Ee, setByKeyPath: de, delByKeyPath: function(e, n) {
|
|
3237
|
+
typeof n == "string" ? de(e, n, void 0) : "length" in n && [].map.call(n, function(r) {
|
|
3238
|
+
de(e, r, void 0);
|
|
3239
3239
|
});
|
|
3240
3240
|
}, shallowClone: Jn, deepClone: je, getObjectDiff: Mn, cmp: Y, asap: Xn, minKey: -1 / 0, addons: [], connections: rt, errnames: sn, dependencies: Zt, cache: He, semVer: "4.0.11", version: "4.0.11".split(".").map(function(e) {
|
|
3241
3241
|
return parseInt(e);
|
|
@@ -3255,23 +3255,23 @@ function Ca() {
|
|
|
3255
3255
|
})(), typeof it.unref == "function" && it.unref(), Ce(yt, function(e) {
|
|
3256
3256
|
Ne || it.postMessage(e);
|
|
3257
3257
|
})), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
|
|
3258
|
-
if (!
|
|
3259
|
-
|
|
3258
|
+
if (!_e.disableBfCache && e.persisted) {
|
|
3259
|
+
be && console.debug("Dexie: handling persisted pagehide"), it != null && it.close();
|
|
3260
3260
|
for (var n = 0, r = rt; n < r.length; n++) r[n].close({ disableAutoOpen: !1 });
|
|
3261
3261
|
}
|
|
3262
3262
|
}), addEventListener("pageshow", function(e) {
|
|
3263
|
-
!
|
|
3263
|
+
!_e.disableBfCache && e.persisted && (be && console.debug("Dexie: handling persisted pageshow"), Tr(), Ln({ all: new ie(-1 / 0, [[]]) }));
|
|
3264
3264
|
})), B.rejectionMapper = function(e, n) {
|
|
3265
3265
|
return !e || e instanceof Ve || e instanceof TypeError || e instanceof SyntaxError || !e.name || !qn[e.name] ? e : (n = new qn[e.name](n || e.message, e), "stack" in e && De(n, "stack", { get: function() {
|
|
3266
3266
|
return this.inner.stack;
|
|
3267
3267
|
} }), n);
|
|
3268
|
-
}, er(
|
|
3268
|
+
}, er(be), u(_e, Object.freeze({ __proto__: null, Dexie: _e, liveQuery: kr, Entity: cr, cmp: Y, PropModification: mt, replacePrefix: function(e, n) {
|
|
3269
3269
|
return new mt({ replacePrefix: [e, n] });
|
|
3270
3270
|
}, add: function(e) {
|
|
3271
3271
|
return new mt({ add: e });
|
|
3272
3272
|
}, remove: function(e) {
|
|
3273
3273
|
return new mt({ remove: e });
|
|
3274
|
-
}, default:
|
|
3274
|
+
}, default: _e, RangeSet: ie, mergeRanges: St, rangesOverlap: Er }), { default: _e }), _e;
|
|
3275
3275
|
});
|
|
3276
3276
|
}(en)), en.exports;
|
|
3277
3277
|
}
|
|
@@ -3421,7 +3421,7 @@ function Ba(d, t) {
|
|
|
3421
3421
|
d = `0${d}`;
|
|
3422
3422
|
return d;
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function Ae(d, t) {
|
|
3425
3425
|
let s, u, v;
|
|
3426
3426
|
if (t.length === 0)
|
|
3427
3427
|
return d;
|
|
@@ -3436,25 +3436,25 @@ function Ka(d, t, s) {
|
|
|
3436
3436
|
}
|
|
3437
3437
|
}
|
|
3438
3438
|
function jr(d, t, s, u) {
|
|
3439
|
-
const v =
|
|
3439
|
+
const v = Ae(Ae(Ae(d, s), Ga(t)), typeof t);
|
|
3440
3440
|
if (t === null)
|
|
3441
|
-
return
|
|
3441
|
+
return Ae(v, "null");
|
|
3442
3442
|
if (t === void 0)
|
|
3443
|
-
return
|
|
3443
|
+
return Ae(v, "undefined");
|
|
3444
3444
|
if (typeof t == "object" || typeof t == "function") {
|
|
3445
3445
|
if (u.includes(t))
|
|
3446
|
-
return
|
|
3446
|
+
return Ae(v, `[Circular]${s}`);
|
|
3447
3447
|
u.push(t);
|
|
3448
3448
|
const A = Ka(v, t, u);
|
|
3449
3449
|
if (!("valueOf" in t) || typeof t.valueOf != "function")
|
|
3450
3450
|
return A;
|
|
3451
3451
|
try {
|
|
3452
|
-
return
|
|
3452
|
+
return Ae(A, String(t.valueOf()));
|
|
3453
3453
|
} catch (I) {
|
|
3454
|
-
return
|
|
3454
|
+
return Ae(A, `[valueOf exception]${I.stack || I.message}`);
|
|
3455
3455
|
}
|
|
3456
3456
|
}
|
|
3457
|
-
return
|
|
3457
|
+
return Ae(v, t.toString());
|
|
3458
3458
|
}
|
|
3459
3459
|
function Ga(d) {
|
|
3460
3460
|
return Object.prototype.toString.call(d);
|
|
@@ -3478,7 +3478,7 @@ function Va(d, t) {
|
|
|
3478
3478
|
;
|
|
3479
3479
|
return (d / s[u].v).toFixed(t).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1") + s[u].s;
|
|
3480
3480
|
}
|
|
3481
|
-
const
|
|
3481
|
+
const ue = (d = 0, t) => {
|
|
3482
3482
|
switch (!0) {
|
|
3483
3483
|
case d > 3:
|
|
3484
3484
|
console.debug(...t);
|
|
@@ -3648,9 +3648,9 @@ class Mr {
|
|
|
3648
3648
|
b(this, "getDashboards", async (t) => {
|
|
3649
3649
|
const s = (A) => (t == null ? void 0 : t.id) === A.id, u = (A) => t != null && t.name ? A.name.includes(t == null ? void 0 : t.name) : !1;
|
|
3650
3650
|
let v = await this.db.table(_.DASHBOARD).toArray().then((A) => t != null && t.id ? A.filter(s) : A).then((A) => t != null && t.name ? A.filter(u) : A).catch(() => {
|
|
3651
|
-
|
|
3651
|
+
ue(2, ["%cstorage", l.STORAGE, Z.DASHBOARD_LOAD, t]);
|
|
3652
3652
|
});
|
|
3653
|
-
return v !== void 0 &&
|
|
3653
|
+
return v !== void 0 && ue(3, [
|
|
3654
3654
|
"%cstorage%c %cdashboards",
|
|
3655
3655
|
l.STORAGE,
|
|
3656
3656
|
l.NONE,
|
|
@@ -3725,11 +3725,11 @@ class Mr {
|
|
|
3725
3725
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3726
3726
|
let W = k.map((V) => this.db.table(_.MESSAGES).get({ id: V.message_id }));
|
|
3727
3727
|
return tn.Promise.all(W).then(async (V) => {
|
|
3728
|
-
const
|
|
3728
|
+
const we = V.map((ge) => ge.data), te = {
|
|
3729
3729
|
data: {
|
|
3730
3730
|
presentation: (t == null ? void 0 : t.presentation) || "not set",
|
|
3731
3731
|
slide: (t == null ? void 0 : t.slide) || "not set",
|
|
3732
|
-
messages:
|
|
3732
|
+
messages: we,
|
|
3733
3733
|
dashboard: t.dashboard,
|
|
3734
3734
|
widget: t.widget,
|
|
3735
3735
|
query: t
|
|
@@ -3777,7 +3777,7 @@ class Mr {
|
|
|
3777
3777
|
const u = s.data.title;
|
|
3778
3778
|
let v = 0;
|
|
3779
3779
|
return s.data.messages.forEach(async (A) => {
|
|
3780
|
-
var I, k, W, V,
|
|
3780
|
+
var I, k, W, V, we, te, ge;
|
|
3781
3781
|
A.id !== null && (await this.db.table(_.MESSAGES).put({
|
|
3782
3782
|
id: A.id,
|
|
3783
3783
|
utc: A.utc,
|
|
@@ -3799,8 +3799,8 @@ class Mr {
|
|
|
3799
3799
|
dashboard_id: t.dashboard,
|
|
3800
3800
|
engagement: ((I = A.topics[0]) == null ? void 0 : I.engagement) || ((k = A.dynamics) == null ? void 0 : k.engagement) || 0,
|
|
3801
3801
|
impressions: ((W = A.topics[0]) == null ? void 0 : W.impressions) || ((V = A.dynamics) == null ? void 0 : V.semrush_visits) || 0,
|
|
3802
|
-
reach: ((
|
|
3803
|
-
sentiment: ((
|
|
3802
|
+
reach: ((we = A.topics[0]) == null ? void 0 : we.reach) || ((te = A.dynamics) == null ? void 0 : te.potential_reach) || 0,
|
|
3803
|
+
sentiment: ((ge = A.topics[0]) == null ? void 0 : ge.sentiment) || 0,
|
|
3804
3804
|
utc: A.utc,
|
|
3805
3805
|
expires: A.expires
|
|
3806
3806
|
}).catch((Je) => {
|
|
@@ -3886,9 +3886,9 @@ class Mr {
|
|
|
3886
3886
|
b(this, "getWidgets", async (t) => {
|
|
3887
3887
|
const s = (I) => (t == null ? void 0 : t.dashboard) === I.dashboard_id, u = (I) => (t == null ? void 0 : t.type) === I.type, v = (I) => t != null && t.name ? I.name.includes(t == null ? void 0 : t.name) : !1;
|
|
3888
3888
|
let A = await this.db.table(_.WIDGET).toArray().then((I) => t != null && t.dashboard ? I.filter(s) : I).then((I) => t != null && t.type ? I.filter(u) : I).then((I) => t != null && t.name ? I.filter(v) : I).catch(() => {
|
|
3889
|
-
|
|
3889
|
+
ue(2, ["%cstorage", l.STORAGE, Z.WIDGET_LOAD, t]);
|
|
3890
3890
|
});
|
|
3891
|
-
return A !== void 0 &&
|
|
3891
|
+
return A !== void 0 && ue(3, [
|
|
3892
3892
|
"%cstorage%c %cwidgets",
|
|
3893
3893
|
l.STORAGE,
|
|
3894
3894
|
l.NONE,
|
|
@@ -3960,7 +3960,7 @@ class Mr {
|
|
|
3960
3960
|
*/
|
|
3961
3961
|
b(this, "getSlide", async (t) => {
|
|
3962
3962
|
const s = await this.db.table(_.SLIDE).where({ id: t.id }).last().catch(() => {
|
|
3963
|
-
|
|
3963
|
+
ue(2, ["%cstorage", l.STORAGE, Z.SLIDE_LOAD, t.id]);
|
|
3964
3964
|
});
|
|
3965
3965
|
return {
|
|
3966
3966
|
// @ts-ignore
|
|
@@ -3976,7 +3976,7 @@ class Mr {
|
|
|
3976
3976
|
*/
|
|
3977
3977
|
b(this, "getSlides", async (t) => {
|
|
3978
3978
|
const s = (I) => t != null && t.id ? t.id = I.id : !1, u = (I) => t != null && t.name ? I.name.includes(t == null ? void 0 : t.name) : !1, A = await this.db.table(_.SLIDE).toArray().then((I) => t != null && t.id ? I.filter(s) : I).then((I) => t != null && t.name ? I.filter(u) : I);
|
|
3979
|
-
return A !== void 0 &&
|
|
3979
|
+
return A !== void 0 && ue(3, ["%cstorage%c %cslides", l.STORAGE, l.NONE, l.SLIDE, t]), {
|
|
3980
3980
|
// @ts-ignore
|
|
3981
3981
|
data: A !== void 0 ? { slides: A, query: t } : null,
|
|
3982
3982
|
message: A !== void 0 ? "Slides loaded from storage" : "Slides load error",
|
|
@@ -4038,7 +4038,7 @@ class Mr {
|
|
|
4038
4038
|
*/
|
|
4039
4039
|
b(this, "getPresentations", async (t) => {
|
|
4040
4040
|
const s = (A) => t != null && t.name ? A.name.includes(t == null ? void 0 : t.name) : !1, v = await this.db.table(_.PRESENTATION).toArray().then((A) => t != null && t.name ? A.filter(s) : A);
|
|
4041
|
-
return v !== void 0 &&
|
|
4041
|
+
return v !== void 0 && ue(3, [
|
|
4042
4042
|
"%cstorage%c %cpresentations",
|
|
4043
4043
|
l.STORAGE,
|
|
4044
4044
|
l.NONE,
|
|
@@ -4083,7 +4083,7 @@ class Mr {
|
|
|
4083
4083
|
*/
|
|
4084
4084
|
b(this, "getPreference", async (t) => {
|
|
4085
4085
|
const s = await this.db.table(_.PREFERENCE).where({ id: t.id }).last().catch(() => {
|
|
4086
|
-
|
|
4086
|
+
ue(2, [
|
|
4087
4087
|
"%cstorage",
|
|
4088
4088
|
l.STORAGE,
|
|
4089
4089
|
Z.PREFERENCE_LOAD,
|
|
@@ -4104,7 +4104,7 @@ class Mr {
|
|
|
4104
4104
|
*/
|
|
4105
4105
|
b(this, "getPreferences", async (t) => {
|
|
4106
4106
|
const s = (A) => t != null && t.id ? t.id = A.id : !1, v = await this.db.table(_.SLIDE).toArray().then((A) => t != null && t.id ? A.filter(s) : A);
|
|
4107
|
-
return v !== void 0 &&
|
|
4107
|
+
return v !== void 0 && ue(3, [
|
|
4108
4108
|
"%cstorage%c %cpreferences",
|
|
4109
4109
|
l.STORAGE,
|
|
4110
4110
|
l.NONE,
|
|
@@ -5426,12 +5426,12 @@ class os {
|
|
|
5426
5426
|
return 400;
|
|
5427
5427
|
if (k.success === !0) {
|
|
5428
5428
|
const W = this.subscribers[k.query.widget];
|
|
5429
|
-
let V = "",
|
|
5429
|
+
let V = "", we;
|
|
5430
5430
|
switch (k.query.type) {
|
|
5431
5431
|
case _.MESSAGES:
|
|
5432
|
-
if (
|
|
5432
|
+
if (we = k.data.messages.filter(
|
|
5433
5433
|
(te) => te.id !== null
|
|
5434
|
-
), k.data.messages =
|
|
5434
|
+
), k.data.messages = we, V = Wn(k.data.messages), W != null && W.hash && W.hash === V)
|
|
5435
5435
|
return console.info(
|
|
5436
5436
|
"%capi%c %cno updates",
|
|
5437
5437
|
l.API,
|
|
@@ -5740,19 +5740,19 @@ class os {
|
|
|
5740
5740
|
), this.bc.onmessage = (u) => {
|
|
5741
5741
|
this.actions(u);
|
|
5742
5742
|
}, this.bc.postMessage({ event: Z.STORAGE_INIT, data: {} }), this.api = new xa(t), t.storage) {
|
|
5743
|
-
case
|
|
5743
|
+
case me.DEXIE:
|
|
5744
5744
|
this.sm = new Mr(t);
|
|
5745
5745
|
break;
|
|
5746
|
-
case
|
|
5746
|
+
case me.LOCAL:
|
|
5747
5747
|
this.sm = new Lr(t);
|
|
5748
5748
|
break;
|
|
5749
|
-
case
|
|
5749
|
+
case me.SESSION:
|
|
5750
5750
|
this.sm = new Gr(t);
|
|
5751
5751
|
break;
|
|
5752
|
-
case
|
|
5752
|
+
case me.KEYVAL:
|
|
5753
5753
|
this.sm = new Kr(t);
|
|
5754
5754
|
break;
|
|
5755
|
-
case
|
|
5755
|
+
case me.WINDOW:
|
|
5756
5756
|
this.sm = new Fr(t);
|
|
5757
5757
|
break;
|
|
5758
5758
|
}
|
|
@@ -5828,19 +5828,19 @@ class Fa {
|
|
|
5828
5828
|
}) : await ((s = this.sm) == null ? void 0 : s.getSeries(t));
|
|
5829
5829
|
});
|
|
5830
5830
|
switch (this.sm = null, t.storage) {
|
|
5831
|
-
case
|
|
5831
|
+
case me.DEXIE:
|
|
5832
5832
|
this.sm = new Mr(t);
|
|
5833
5833
|
break;
|
|
5834
|
-
case
|
|
5834
|
+
case me.LOCAL:
|
|
5835
5835
|
this.sm = new Lr(t);
|
|
5836
5836
|
break;
|
|
5837
|
-
case
|
|
5837
|
+
case me.SESSION:
|
|
5838
5838
|
this.sm = new Gr(t);
|
|
5839
5839
|
break;
|
|
5840
|
-
case
|
|
5840
|
+
case me.KEYVAL:
|
|
5841
5841
|
this.sm = new Kr(t);
|
|
5842
5842
|
break;
|
|
5843
|
-
case
|
|
5843
|
+
case me.WINDOW:
|
|
5844
5844
|
this.sm = new Fr(t);
|
|
5845
5845
|
break;
|
|
5846
5846
|
}
|
|
@@ -5893,13 +5893,13 @@ class cs {
|
|
|
5893
5893
|
this.query.widget,
|
|
5894
5894
|
"Wrong method call for getCloud, expected type is",
|
|
5895
5895
|
this.query.type
|
|
5896
|
-
),
|
|
5896
|
+
), ue(3, [
|
|
5897
5897
|
"%cstorage%c %cwidget",
|
|
5898
5898
|
l.API,
|
|
5899
5899
|
l.NONE,
|
|
5900
5900
|
l.CLOUD,
|
|
5901
5901
|
this.query
|
|
5902
|
-
), {
|
|
5902
|
+
]), {
|
|
5903
5903
|
data: null,
|
|
5904
5904
|
message: `wrong method call for getCloud, expected type is '${this.query.type}'`,
|
|
5905
5905
|
success: !1
|
|
@@ -5921,13 +5921,13 @@ class cs {
|
|
|
5921
5921
|
data: null,
|
|
5922
5922
|
message: `wrong method call for getMessages, expected type is '${this.query.type}'`,
|
|
5923
5923
|
success: !1
|
|
5924
|
-
}) : (
|
|
5924
|
+
}) : (ue(3, [
|
|
5925
5925
|
"%cstorage%c %cwidget",
|
|
5926
5926
|
l.API,
|
|
5927
5927
|
l.NONE,
|
|
5928
5928
|
l.MESSAGES,
|
|
5929
5929
|
this.query
|
|
5930
|
-
), await this.storageReader.getMessages(this.query)));
|
|
5930
|
+
]), await this.storageReader.getMessages(this.query)));
|
|
5931
5931
|
/**
|
|
5932
5932
|
* Get Widget Series Data
|
|
5933
5933
|
*
|
|
@@ -5941,13 +5941,13 @@ class cs {
|
|
|
5941
5941
|
this.query.widget,
|
|
5942
5942
|
"Wrong method call for getSeries, expected type is",
|
|
5943
5943
|
this.query.type
|
|
5944
|
-
),
|
|
5944
|
+
), ue(3, [
|
|
5945
5945
|
"%cstorage%c %cwidget",
|
|
5946
5946
|
l.API,
|
|
5947
5947
|
l.NONE,
|
|
5948
5948
|
l.MESSAGES,
|
|
5949
5949
|
this.query
|
|
5950
|
-
), {
|
|
5950
|
+
]), {
|
|
5951
5951
|
data: null,
|
|
5952
5952
|
message: `wrong method call for getSeries, expected type is '${this.query.type}'`,
|
|
5953
5953
|
success: !1
|
|
@@ -5959,7 +5959,7 @@ class cs {
|
|
|
5959
5959
|
* @param modal IModal
|
|
5960
5960
|
*/
|
|
5961
5961
|
b(this, "showModal", (t) => {
|
|
5962
|
-
|
|
5962
|
+
ue(3, [
|
|
5963
5963
|
"%cwidget",
|
|
5964
5964
|
l.WIDGET,
|
|
5965
5965
|
Z.SHOW_MODAL,
|
|
@@ -5967,7 +5967,7 @@ class cs {
|
|
|
5967
5967
|
// @ts-ignore
|
|
5968
5968
|
$a(this.element.attributes)
|
|
5969
5969
|
//props['data-widget'],
|
|
5970
|
-
);
|
|
5970
|
+
]);
|
|
5971
5971
|
const s = new CustomEvent(Z.SHOW_MODAL, {
|
|
5972
5972
|
detail: {
|
|
5973
5973
|
component: t.showComponent,
|
|
@@ -6000,9 +6000,13 @@ class cs {
|
|
|
6000
6000
|
const u = s.data.data;
|
|
6001
6001
|
switch (s.data.event) {
|
|
6002
6002
|
case Z.WIDGET_UPDATE:
|
|
6003
|
-
|
|
6004
|
-
v
|
|
6005
|
-
|
|
6003
|
+
try {
|
|
6004
|
+
u.query.slide === t.slide && u.query.widget === t.widget && this.listeners.forEach((v) => {
|
|
6005
|
+
v(s.data);
|
|
6006
|
+
});
|
|
6007
|
+
} catch {
|
|
6008
|
+
ue(4, [Z.WIDGET_UPDATE, u]);
|
|
6009
|
+
}
|
|
6006
6010
|
break;
|
|
6007
6011
|
case Z.SLIDE_READY:
|
|
6008
6012
|
this.subscribe();
|
|
@@ -6015,20 +6019,20 @@ class cs {
|
|
|
6015
6019
|
* This takes place when the container indicates it has finished loading (ready)
|
|
6016
6020
|
*/
|
|
6017
6021
|
subscribe() {
|
|
6018
|
-
|
|
6022
|
+
ue(2, [
|
|
6019
6023
|
"%cwidget%c %csubscribe",
|
|
6020
6024
|
l.WIDGET,
|
|
6021
6025
|
l.NONE,
|
|
6022
6026
|
l.SUBSCRIBE,
|
|
6023
6027
|
this.query.slide,
|
|
6024
6028
|
this.query.widget
|
|
6025
|
-
),
|
|
6029
|
+
]), ue(3, [
|
|
6026
6030
|
"%cwidget%c %csubscribe",
|
|
6027
6031
|
l.WIDGET,
|
|
6028
6032
|
l.NONE,
|
|
6029
6033
|
l.SUBSCRIBE,
|
|
6030
6034
|
this.query
|
|
6031
|
-
), this.broadcastChannel.postMessage({
|
|
6035
|
+
]), this.broadcastChannel.postMessage({
|
|
6032
6036
|
event: Z.SUBSCRIBE,
|
|
6033
6037
|
data: this.query
|
|
6034
6038
|
});
|
|
@@ -6044,7 +6048,7 @@ export {
|
|
|
6044
6048
|
l as CSS,
|
|
6045
6049
|
Z as EVENTS,
|
|
6046
6050
|
qt as MODERATION,
|
|
6047
|
-
|
|
6051
|
+
me as STORAGE,
|
|
6048
6052
|
cs as Widget,
|
|
6049
6053
|
Ua as anonymize,
|
|
6050
6054
|
za as attachedMedia,
|