buzzcasting-storage 2.12.0 → 2.12.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.
@@ -1,12 +1,12 @@
1
1
  var Ei = Object.defineProperty;
2
- var Oi = (g, i, c) => i in g ? Ei(g, i, { enumerable: !0, configurable: !0, writable: !0, value: c }) : g[i] = c;
3
- var P = (g, i, c) => (Oi(g, typeof i != "symbol" ? i + "" : i, c), c);
4
- const xi = "2.11.7";
2
+ var Oi = (g, i, u) => i in g ? Ei(g, i, { enumerable: !0, configurable: !0, writable: !0, value: u }) : g[i] = u;
3
+ var D = (g, i, u) => (Oi(g, typeof i != "symbol" ? i + "" : i, u), u);
4
+ const xi = "2.12.0";
5
5
  class ki {
6
6
  constructor(i) {
7
- P(this, "options");
8
- P(this, "url");
9
- P(this, "headers", () => {
7
+ D(this, "options");
8
+ D(this, "url");
9
+ D(this, "headers", () => {
10
10
  const i = `Bearer ${this.options.bearer}`;
11
11
  return {
12
12
  headers: new Headers({
@@ -19,9 +19,9 @@ class ki {
19
19
  this.options = i, this.url = `https://${i.app}.buzzcasting.net`;
20
20
  }
21
21
  async get(i) {
22
- const { version: c } = this.options, h = this.headers(), D = Object.assign({}, i);
23
- delete D.slide, delete D.type, delete D.hash;
24
- const R = Object.keys(D).length > 0 ? `?${new URLSearchParams(D).toString()}` : "";
22
+ const { version: u } = this.options, h = this.headers(), P = Object.assign({}, i);
23
+ delete P.slide, delete P.type, delete P.hash;
24
+ const R = Object.keys(P).length > 0 ? `?${new URLSearchParams(P).toString()}` : "";
25
25
  return console.debug(
26
26
  "%capi%c %cget",
27
27
  x.API,
@@ -30,7 +30,7 @@ class ki {
30
30
  i.slide,
31
31
  i.widget
32
32
  ), await fetch(
33
- [this.url, "api", c, i.type].join("/") + R,
33
+ [this.url, "api", u, i.type].join("/") + R,
34
34
  { ...h, method: "get" }
35
35
  ).then(async (K) => {
36
36
  if (!K.ok)
@@ -39,7 +39,7 @@ class ki {
39
39
  }).then((K) => K.json()).then((K) => (K.query = i, K)).catch((K) => ({ success: !1, message: `${K}`, data: null }));
40
40
  }
41
41
  async hideMessage(i) {
42
- const { version: c } = this.options, h = this.headers(), D = "?action=visible";
42
+ const { version: u } = this.options, h = this.headers(), P = "?action=visible";
43
43
  return console.info(
44
44
  "%capi%c %cput",
45
45
  x.API,
@@ -49,7 +49,7 @@ class ki {
49
49
  i.widget,
50
50
  i.id
51
51
  ), await fetch(
52
- [this.url, "api", c, i.type, i.id].join("/") + D,
52
+ [this.url, "api", u, i.type, i.id].join("/") + P,
53
53
  { ...h, method: "put" }
54
54
  ).then((R) => {
55
55
  if (!R.ok)
@@ -58,7 +58,7 @@ class ki {
58
58
  }).then((R) => R.json()).catch((R) => ({ succes: !1, message: R, data: [] }));
59
59
  }
60
60
  async hideLabels(i) {
61
- const { version: c } = this.options, h = this.headers(), D = JSON.stringify(i.labels);
61
+ const { version: u } = this.options, h = this.headers(), P = JSON.stringify(i.labels);
62
62
  return console.info(
63
63
  "%capi%c %cput",
64
64
  x.API,
@@ -66,10 +66,10 @@ class ki {
66
66
  x.GET_DATA,
67
67
  se.HIDE_LABELS,
68
68
  i.widget,
69
- D
69
+ P
70
70
  ), await fetch(
71
- [this.url, "api", c, i.type, i.widget].join("/"),
72
- { ...h, body: D, method: "put" }
71
+ [this.url, "api", u, i.type, i.widget].join("/"),
72
+ { ...h, body: P, method: "put" }
73
73
  ).then((R) => {
74
74
  if (!R.ok)
75
75
  throw new Error(R.statusText);
@@ -83,11 +83,11 @@ function Ai(g) {
83
83
  }
84
84
  var Rr = { exports: {} };
85
85
  (function(g, i) {
86
- (function(c, h) {
86
+ (function(u, h) {
87
87
  g.exports = h();
88
88
  })(Cr, function() {
89
- var c = function(e, t) {
90
- return (c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
89
+ var u = function(e, t) {
90
+ return (u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
91
91
  n.__proto__ = r;
92
92
  } || function(n, r) {
93
93
  for (var o in r)
@@ -101,7 +101,7 @@ var Rr = { exports: {} };
101
101
  return e;
102
102
  }).apply(this, arguments);
103
103
  };
104
- function D(e, t, n) {
104
+ function P(e, t, n) {
105
105
  if (n || arguments.length === 2)
106
106
  for (var r, o = 0, a = t.length; o < a; o++)
107
107
  !r && o in t || ((r = r || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
@@ -160,8 +160,8 @@ var Rr = { exports: {} };
160
160
  }
161
161
  var s = t.indexOf(".");
162
162
  if (s !== -1) {
163
- var u = e[t.substr(0, s)];
164
- return u == null ? void 0 : ve(u, t.substr(s + 1));
163
+ var c = e[t.substr(0, s)];
164
+ return c == null ? void 0 : ve(c, t.substr(s + 1));
165
165
  }
166
166
  }
167
167
  function fe(e, t, n) {
@@ -171,8 +171,8 @@ var Rr = { exports: {} };
171
171
  for (var r = 0, o = t.length; r < o; ++r)
172
172
  fe(e, t[r], n[r]);
173
173
  } else {
174
- var a, s, u = t.indexOf(".");
175
- u !== -1 ? (a = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? N(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : fe(u = !(u = e[a]) || !ie(e, a) ? e[a] = {} : u, s, n)) : n === void 0 ? N(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
174
+ var a, s, c = t.indexOf(".");
175
+ c !== -1 ? (a = t.substr(0, c), (s = t.substr(c + 1)) === "" ? n === void 0 ? N(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : fe(c = !(c = e[a]) || !ie(e, a) ? e[a] = {} : c, s, n)) : n === void 0 ? N(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
176
176
  }
177
177
  }
178
178
  function Qn(e) {
@@ -181,9 +181,9 @@ var Rr = { exports: {} };
181
181
  ie(e, t) && (n[t] = e[t]);
182
182
  return n;
183
183
  }
184
- var Ur = [].concat;
184
+ var $r = [].concat;
185
185
  function Xn(e) {
186
- return Ur.apply([], e);
186
+ return $r.apply([], e);
187
187
  }
188
188
  var ge = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Xn([8, 16, 32, 64].map(function(e) {
189
189
  return ["Int", "Uint", "Float"].map(function(t) {
@@ -208,16 +208,16 @@ var Rr = { exports: {} };
208
208
  } else if (Vn.has(n.constructor))
209
209
  r = n;
210
210
  else {
211
- var s, u = te(n);
212
- for (s in r = u === Object.prototype ? {} : Object.create(u), it.set(n, r), n)
211
+ var s, c = te(n);
212
+ for (s in r = c === Object.prototype ? {} : Object.create(c), it.set(n, r), n)
213
213
  ie(n, s) && (r[s] = t(n[s]));
214
214
  }
215
215
  return r;
216
216
  }(e), it = null, e;
217
217
  }
218
- var $r = {}.toString;
218
+ var Ur = {}.toString;
219
219
  function Jt(e) {
220
- return $r.call(e).slice(8, -1);
220
+ return Ur.call(e).slice(8, -1);
221
221
  }
222
222
  var Zt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Wr = typeof Zt == "symbol" ? function(e) {
223
223
  var t;
@@ -225,7 +225,7 @@ var Rr = { exports: {} };
225
225
  } : function() {
226
226
  return null;
227
227
  };
228
- function Me(e, t) {
228
+ function je(e, t) {
229
229
  return t = e.indexOf(t), 0 <= t && e.splice(t, 1), 0 <= t;
230
230
  }
231
231
  var Ye = {};
@@ -368,7 +368,7 @@ var Rr = { exports: {} };
368
368
  }(), st = ge[0], de = ge[1], ge = ge[2], de = de && de.then, ut = st && st.constructor, nn = !!ge, ct = function(e, t) {
369
369
  lt.push([e, t]), Et && (queueMicrotask(qr), Et = !1);
370
370
  }, rn = !0, Et = !0, Be = [], Ot = [], on = ot, De = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: H, pgp: !1, env: {}, finalize: H }, B = De, lt = [], Ne = 0, xt = [];
371
- function j(e) {
371
+ function M(e) {
372
372
  if (typeof this != "object")
373
373
  throw new TypeError("Promises must be constructed via new");
374
374
  this._listeners = [], this._lib = !1;
@@ -385,8 +385,8 @@ var Rr = { exports: {} };
385
385
  if (a === r)
386
386
  throw new TypeError("A promise cannot be resolved with itself.");
387
387
  var s = r._lib && Xe();
388
- a && typeof a.then == "function" ? n(r, function(u, p) {
389
- a instanceof j ? a._then(u, p) : a.then(u, p);
388
+ a && typeof a.then == "function" ? n(r, function(c, p) {
389
+ a instanceof M ? a._then(c, p) : a.then(c, p);
390
390
  }) : (r._state = !0, r._value = a, nr(r)), s && Ve();
391
391
  }
392
392
  }, sn.bind(null, r));
@@ -398,8 +398,8 @@ var Rr = { exports: {} };
398
398
  var an = { get: function() {
399
399
  var e = B, t = Pt;
400
400
  function n(r, o) {
401
- var a = this, s = !e.global && (e !== B || t !== Pt), u = s && !Ce(), p = new j(function(f, v) {
402
- un(a, new tr(ir(r, e, s, u), ir(o, e, s, u), f, v, e));
401
+ var a = this, s = !e.global && (e !== B || t !== Pt), c = s && !Ce(), p = new M(function(f, v) {
402
+ un(a, new tr(ir(r, e, s, c), ir(o, e, s, c), f, v, e));
403
403
  });
404
404
  return this._consoleTask && (p._consoleTask = this._consoleTask), p;
405
405
  }
@@ -482,7 +482,7 @@ var Rr = { exports: {} };
482
482
  t[--n]();
483
483
  }
484
484
  function kt(e) {
485
- return new j(at, !1, e);
485
+ return new M(at, !1, e);
486
486
  }
487
487
  function J(e, t) {
488
488
  var n = B;
@@ -497,7 +497,7 @@ var Rr = { exports: {} };
497
497
  }
498
498
  };
499
499
  }
500
- xe(j.prototype, { then: an, _then: function(e, t) {
500
+ xe(M.prototype, { then: an, _then: function(e, t) {
501
501
  un(this, new tr(null, null, e, t, B));
502
502
  }, catch: function(e) {
503
503
  if (arguments.length === 1)
@@ -510,42 +510,42 @@ var Rr = { exports: {} };
510
510
  });
511
511
  }, finally: function(e) {
512
512
  return this.then(function(t) {
513
- return j.resolve(e()).then(function() {
513
+ return M.resolve(e()).then(function() {
514
514
  return t;
515
515
  });
516
516
  }, function(t) {
517
- return j.resolve(e()).then(function() {
517
+ return M.resolve(e()).then(function() {
518
518
  return kt(t);
519
519
  });
520
520
  });
521
521
  }, timeout: function(e, t) {
522
522
  var n = this;
523
- return e < 1 / 0 ? new j(function(r, o) {
523
+ return e < 1 / 0 ? new M(function(r, o) {
524
524
  var a = setTimeout(function() {
525
525
  return o(new G.Timeout(t));
526
526
  }, e);
527
527
  n.then(r, o).finally(clearTimeout.bind(null, a));
528
528
  }) : this;
529
- } }), typeof Symbol < "u" && Symbol.toStringTag && ke(j.prototype, Symbol.toStringTag, "Dexie.Promise"), De.env = rr(), xe(j, { all: function() {
529
+ } }), typeof Symbol < "u" && Symbol.toStringTag && ke(M.prototype, Symbol.toStringTag, "Dexie.Promise"), De.env = rr(), xe(M, { all: function() {
530
530
  var e = we.apply(null, arguments).map(Ct);
531
- return new j(function(t, n) {
531
+ return new M(function(t, n) {
532
532
  e.length === 0 && t([]);
533
533
  var r = e.length;
534
534
  e.forEach(function(o, a) {
535
- return j.resolve(o).then(function(s) {
535
+ return M.resolve(o).then(function(s) {
536
536
  e[a] = s, --r || t(e);
537
537
  }, n);
538
538
  });
539
539
  });
540
540
  }, resolve: function(e) {
541
- return e instanceof j ? e : e && typeof e.then == "function" ? new j(function(t, n) {
541
+ return e instanceof M ? e : e && typeof e.then == "function" ? new M(function(t, n) {
542
542
  e.then(t, n);
543
- }) : new j(at, !0, e);
543
+ }) : new M(at, !0, e);
544
544
  }, reject: kt, race: function() {
545
545
  var e = we.apply(null, arguments).map(Ct);
546
- return new j(function(t, n) {
546
+ return new M(function(t, n) {
547
547
  e.map(function(r) {
548
- return j.resolve(r).then(t, n);
548
+ return M.resolve(r).then(t, n);
549
549
  });
550
550
  });
551
551
  }, PSD: { get: function() {
@@ -563,28 +563,28 @@ var Rr = { exports: {} };
563
563
  }, set: function(e) {
564
564
  on = e;
565
565
  } }, follow: function(e, t) {
566
- return new j(function(n, r) {
566
+ return new M(function(n, r) {
567
567
  return Pe(function(o, a) {
568
568
  var s = B;
569
569
  s.unhandleds = [], s.onunhandled = a, s.finalize = Ke(function() {
570
- var u, p = this;
571
- u = function() {
570
+ var c, p = this;
571
+ c = function() {
572
572
  p.unhandleds.length === 0 ? o() : a(p.unhandleds[0]);
573
573
  }, xt.push(function f() {
574
- u(), xt.splice(xt.indexOf(f), 1);
574
+ c(), xt.splice(xt.indexOf(f), 1);
575
575
  }), ++Ne, ct(function() {
576
576
  --Ne == 0 && cn();
577
577
  }, []);
578
578
  }, s.finalize), e();
579
579
  }, t, n, r);
580
580
  });
581
- } }), ut && (ut.allSettled && ke(j, "allSettled", function() {
581
+ } }), ut && (ut.allSettled && ke(M, "allSettled", function() {
582
582
  var e = we.apply(null, arguments).map(Ct);
583
- return new j(function(t) {
583
+ return new M(function(t) {
584
584
  e.length === 0 && t([]);
585
585
  var n = e.length, r = new Array(n);
586
586
  e.forEach(function(o, a) {
587
- return j.resolve(o).then(function(s) {
587
+ return M.resolve(o).then(function(s) {
588
588
  return r[a] = { status: "fulfilled", value: s };
589
589
  }, function(s) {
590
590
  return r[a] = { status: "rejected", reason: s };
@@ -593,16 +593,16 @@ var Rr = { exports: {} };
593
593
  });
594
594
  });
595
595
  });
596
- }), ut.any && typeof AggregateError < "u" && ke(j, "any", function() {
596
+ }), ut.any && typeof AggregateError < "u" && ke(M, "any", function() {
597
597
  var e = we.apply(null, arguments).map(Ct);
598
- return new j(function(t, n) {
598
+ return new M(function(t, n) {
599
599
  e.length === 0 && n(new AggregateError([]));
600
600
  var r = e.length, o = new Array(r);
601
601
  e.forEach(function(a, s) {
602
- return j.resolve(a).then(function(u) {
603
- return t(u);
604
- }, function(u) {
605
- o[s] = u, --r || n(new AggregateError(o));
602
+ return M.resolve(a).then(function(c) {
603
+ return t(c);
604
+ }, function(c) {
605
+ o[s] = c, --r || n(new AggregateError(o));
606
606
  });
607
607
  });
608
608
  });
@@ -610,7 +610,7 @@ var Rr = { exports: {} };
610
610
  var ne = { awaits: 0, echoes: 0, id: 0 }, ei = 0, At = [], Dt = 0, Pt = 0, ti = 0;
611
611
  function Pe(e, t, n, r) {
612
612
  var o = B, a = Object.create(o);
613
- return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ti, De.env, a.env = nn ? { Promise: j, PromiseProp: { value: j, configurable: !0, writable: !0 }, all: j.all, race: j.race, allSettled: j.allSettled, any: j.any, resolve: j.resolve, reject: j.reject } : {}, t && Z(a, t), ++o.ref, a.finalize = function() {
613
+ return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ti, De.env, a.env = nn ? { Promise: M, PromiseProp: { value: M, configurable: !0, writable: !0 }, all: M.all, race: M.race, allSettled: M.allSettled, any: M.any, resolve: M.resolve, reject: M.reject } : {}, t && Z(a, t), ++o.ref, a.finalize = function() {
614
614
  --this.parent.ref || this.parent.finalize();
615
615
  }, r = Le(a, e, n, r), a.ref === 0 && a.finalize(), r;
616
616
  }
@@ -664,7 +664,7 @@ var Rr = { exports: {} };
664
664
  Promise === ut && ne.echoes === 0 ? Dt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
665
665
  }
666
666
  ("" + de).indexOf("[native code]") === -1 && (Je = Ce = H);
667
- var q = j.reject, ge = "4.0.1-beta.10", Ge = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", or = "String expected.", Ze = [], It = "__dbnames", fn = "readonly", dn = "readwrite";
667
+ var q = M.reject, ge = "4.0.1-beta.10", Ge = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", or = "String expected.", Ze = [], It = "__dbnames", fn = "readonly", dn = "readwrite";
668
668
  function Fe(e, t) {
669
669
  return e ? t ? function() {
670
670
  return e.apply(this, arguments) && t.apply(this, arguments);
@@ -693,19 +693,19 @@ var Rr = { exports: {} };
693
693
  return t < e ? 1 : e < t ? -1 : 0;
694
694
  case "binary":
695
695
  return function(o, a) {
696
- for (var s = o.length, u = a.length, p = s < u ? s : u, f = 0; f < p; ++f)
696
+ for (var s = o.length, c = a.length, p = s < c ? s : c, f = 0; f < p; ++f)
697
697
  if (o[f] !== a[f])
698
698
  return o[f] < a[f] ? -1 : 1;
699
- return s === u ? 0 : s < u ? -1 : 1;
699
+ return s === c ? 0 : s < c ? -1 : 1;
700
700
  }(cr(e), cr(t));
701
701
  case "Array":
702
702
  return function(o, a) {
703
- for (var s = o.length, u = a.length, p = s < u ? s : u, f = 0; f < p; ++f) {
703
+ for (var s = o.length, c = a.length, p = s < c ? s : c, f = 0; f < p; ++f) {
704
704
  var v = z(o[f], a[f]);
705
705
  if (v !== 0)
706
706
  return v;
707
707
  }
708
- return s === u ? 0 : s < u ? -1 : 1;
708
+ return s === c ? 0 : s < c ? -1 : 1;
709
709
  }(e, t);
710
710
  }
711
711
  } catch {
@@ -726,7 +726,7 @@ var Rr = { exports: {} };
726
726
  throw new G.NotFound("Table " + o + " not part of transaction");
727
727
  return t(l.idbtrans, l);
728
728
  }
729
- var u = Xe();
729
+ var c = Xe();
730
730
  try {
731
731
  var p = r && r.db._novip === this.db._novip ? r === B.trans ? r._promise(e, s, n) : Pe(function() {
732
732
  return r._promise(e, s, n);
@@ -770,7 +770,7 @@ var Rr = { exports: {} };
770
770
  return console.trace(f), q(f);
771
771
  })), p;
772
772
  } finally {
773
- u && Ve();
773
+ c && Ve();
774
774
  }
775
775
  }, X.prototype.get = function(e, t) {
776
776
  var n = this;
@@ -811,7 +811,7 @@ var Rr = { exports: {} };
811
811
  function a(p, f) {
812
812
  return o.cmp(p, f) === 0;
813
813
  }
814
- var u = t.reduce(function(d, f) {
814
+ var c = t.reduce(function(d, f) {
815
815
  var v = d[0], l = d[1], d = r[f], y = e[f];
816
816
  return [v || d, v || !d ? Fe(l, d && d.multi ? function(b) {
817
817
  return b = ve(b, f), N(b) && b.some(function(w) {
@@ -820,8 +820,8 @@ var Rr = { exports: {} };
820
820
  } : function(b) {
821
821
  return a(y, ve(b, f));
822
822
  }) : l];
823
- }, [null, null]), s = u[0], u = u[1];
824
- return s ? this.where(s.name).equals(e[s.keyPath]).filter(u) : n ? this.filter(u) : this.where(t).equals("");
823
+ }, [null, null]), s = c[0], c = c[1];
824
+ return s ? this.where(s.name).equals(e[s.keyPath]).filter(c) : n ? this.filter(c) : this.where(t).equals("");
825
825
  }, X.prototype.filter = function(e) {
826
826
  return this.toCollection().and(e);
827
827
  }, X.prototype.count = function(e) {
@@ -851,7 +851,7 @@ var Rr = { exports: {} };
851
851
  function v() {
852
852
  this.constructor = p;
853
853
  }
854
- c(p, f), p.prototype = f === null ? Object.create(f) : (v.prototype = f.prototype, new v());
854
+ u(p, f), p.prototype = f === null ? Object.create(f) : (v.prototype = f.prototype, new v());
855
855
  }(o, t = e), Object.defineProperty(o.prototype, "db", { get: function() {
856
856
  return n;
857
857
  }, enumerable: !1, configurable: !0 }), o.prototype.table = function() {
@@ -861,7 +861,7 @@ var Rr = { exports: {} };
861
861
  Object.getOwnPropertyNames(s).forEach(function(p) {
862
862
  return a.add(p);
863
863
  });
864
- function u(p) {
864
+ function c(p) {
865
865
  if (!p)
866
866
  return p;
867
867
  var f, v = Object.create(e.prototype);
@@ -873,54 +873,54 @@ var Rr = { exports: {} };
873
873
  }
874
874
  return v;
875
875
  }
876
- return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = u, this.hook("reading", u), e;
876
+ return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = c, this.hook("reading", c), e;
877
877
  }, X.prototype.defineClass = function() {
878
878
  return this.mapToClass(function(e) {
879
879
  Z(this, e);
880
880
  });
881
881
  }, X.prototype.add = function(e, t) {
882
882
  var n = this, r = this.schema.primKey, o = r.auto, a = r.keyPath, s = e;
883
- return a && o && (s = Rt(a)(e)), this._trans("readwrite", function(u) {
884
- return n.core.mutate({ trans: u, type: "add", keys: t != null ? [t] : null, values: [s] });
885
- }).then(function(u) {
886
- return u.numFailures ? j.reject(u.failures[0]) : u.lastResult;
887
- }).then(function(u) {
883
+ return a && o && (s = Rt(a)(e)), this._trans("readwrite", function(c) {
884
+ return n.core.mutate({ trans: c, type: "add", keys: t != null ? [t] : null, values: [s] });
885
+ }).then(function(c) {
886
+ return c.numFailures ? M.reject(c.failures[0]) : c.lastResult;
887
+ }).then(function(c) {
888
888
  if (a)
889
889
  try {
890
- fe(e, a, u);
890
+ fe(e, a, c);
891
891
  } catch {
892
892
  }
893
- return u;
893
+ return c;
894
894
  });
895
895
  }, X.prototype.update = function(e, t) {
896
896
  return typeof e != "object" || N(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
897
897
  }, X.prototype.put = function(e, t) {
898
898
  var n = this, r = this.schema.primKey, o = r.auto, a = r.keyPath, s = e;
899
- return a && o && (s = Rt(a)(e)), this._trans("readwrite", function(u) {
900
- return n.core.mutate({ trans: u, type: "put", values: [s], keys: t != null ? [t] : null });
901
- }).then(function(u) {
902
- return u.numFailures ? j.reject(u.failures[0]) : u.lastResult;
903
- }).then(function(u) {
899
+ return a && o && (s = Rt(a)(e)), this._trans("readwrite", function(c) {
900
+ return n.core.mutate({ trans: c, type: "put", values: [s], keys: t != null ? [t] : null });
901
+ }).then(function(c) {
902
+ return c.numFailures ? M.reject(c.failures[0]) : c.lastResult;
903
+ }).then(function(c) {
904
904
  if (a)
905
905
  try {
906
- fe(e, a, u);
906
+ fe(e, a, c);
907
907
  } catch {
908
908
  }
909
- return u;
909
+ return c;
910
910
  });
911
911
  }, X.prototype.delete = function(e) {
912
912
  var t = this;
913
913
  return this._trans("readwrite", function(n) {
914
914
  return t.core.mutate({ trans: n, type: "delete", keys: [e] });
915
915
  }).then(function(n) {
916
- return n.numFailures ? j.reject(n.failures[0]) : void 0;
916
+ return n.numFailures ? M.reject(n.failures[0]) : void 0;
917
917
  });
918
918
  }, X.prototype.clear = function() {
919
919
  var e = this;
920
920
  return this._trans("readwrite", function(t) {
921
921
  return e.core.mutate({ trans: t, type: "deleteRange", range: ar });
922
922
  }).then(function(t) {
923
- return t.numFailures ? j.reject(t.failures[0]) : void 0;
923
+ return t.numFailures ? M.reject(t.failures[0]) : void 0;
924
924
  });
925
925
  }, X.prototype.bulkGet = function(e) {
926
926
  var t = this;
@@ -934,12 +934,12 @@ var Rr = { exports: {} };
934
934
  }, X.prototype.bulkAdd = function(e, t, n) {
935
935
  var r = this, o = Array.isArray(t) ? t : void 0, a = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
936
936
  return this._trans("readwrite", function(s) {
937
- var f = r.schema.primKey, u = f.auto, f = f.keyPath;
937
+ var f = r.schema.primKey, c = f.auto, f = f.keyPath;
938
938
  if (f && o)
939
939
  throw new G.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
940
940
  if (o && o.length !== e.length)
941
941
  throw new G.InvalidArgument("Arguments objects and keys must have the same length");
942
- var p = e.length, f = f && u ? e.map(Rt(f)) : e;
942
+ var p = e.length, f = f && c ? e.map(Rt(f)) : e;
943
943
  return r.core.mutate({ trans: s, type: "add", keys: o, values: f, wantResults: a }).then(function(b) {
944
944
  var l = b.numFailures, d = b.results, y = b.lastResult, b = b.failures;
945
945
  if (l === 0)
@@ -950,12 +950,12 @@ var Rr = { exports: {} };
950
950
  }, X.prototype.bulkPut = function(e, t, n) {
951
951
  var r = this, o = Array.isArray(t) ? t : void 0, a = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
952
952
  return this._trans("readwrite", function(s) {
953
- var f = r.schema.primKey, u = f.auto, f = f.keyPath;
953
+ var f = r.schema.primKey, c = f.auto, f = f.keyPath;
954
954
  if (f && o)
955
955
  throw new G.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
956
956
  if (o && o.length !== e.length)
957
957
  throw new G.InvalidArgument("Arguments objects and keys must have the same length");
958
- var p = e.length, f = f && u ? e.map(Rt(f)) : e;
958
+ var p = e.length, f = f && c ? e.map(Rt(f)) : e;
959
959
  return r.core.mutate({ trans: s, type: "put", keys: o, values: f, wantResults: a }).then(function(b) {
960
960
  var l = b.numFailures, d = b.results, y = b.lastResult, b = b.failures;
961
961
  if (l === 0)
@@ -970,10 +970,10 @@ var Rr = { exports: {} };
970
970
  return s.changes;
971
971
  }), a = [];
972
972
  return this._trans("readwrite", function(s) {
973
- return n.getMany({ trans: s, keys: r, cache: "clone" }).then(function(u) {
973
+ return n.getMany({ trans: s, keys: r, cache: "clone" }).then(function(c) {
974
974
  var p = [], f = [];
975
975
  e.forEach(function(l, d) {
976
- var y = l.key, b = l.changes, w = u[d];
976
+ var y = l.key, b = l.changes, w = c[d];
977
977
  if (w) {
978
978
  for (var m = 0, _ = Object.keys(b); m < _.length; m++) {
979
979
  var S = _[m], E = b[S];
@@ -1013,8 +1013,8 @@ var Rr = { exports: {} };
1013
1013
  function X() {
1014
1014
  }
1015
1015
  function ft(e) {
1016
- function t(s, u) {
1017
- if (u) {
1016
+ function t(s, c) {
1017
+ if (c) {
1018
1018
  for (var p = arguments.length, f = new Array(p - 1); --p; )
1019
1019
  f[p - 1] = arguments[p];
1020
1020
  return n[s].subscribe.apply(null, f), e;
@@ -1027,16 +1027,16 @@ var Rr = { exports: {} };
1027
1027
  for (var r = 1, o = arguments.length; r < o; ++r)
1028
1028
  a(arguments[r]);
1029
1029
  return t;
1030
- function a(s, u, p) {
1030
+ function a(s, c, p) {
1031
1031
  if (typeof s != "object") {
1032
1032
  var f;
1033
- u = u || Jr;
1033
+ c = c || Jr;
1034
1034
  var v = { subscribers: [], fire: p = p || H, subscribe: function(l) {
1035
- v.subscribers.indexOf(l) === -1 && (v.subscribers.push(l), v.fire = u(v.fire, l));
1035
+ v.subscribers.indexOf(l) === -1 && (v.subscribers.push(l), v.fire = c(v.fire, l));
1036
1036
  }, unsubscribe: function(l) {
1037
1037
  v.subscribers = v.subscribers.filter(function(d) {
1038
1038
  return d !== l;
1039
- }), v.fire = v.subscribers.reduce(u, p);
1039
+ }), v.fire = v.subscribers.reduce(c, p);
1040
1040
  } };
1041
1041
  return n[s] = t[s] = v;
1042
1042
  }
@@ -1087,24 +1087,24 @@ var Rr = { exports: {} };
1087
1087
  var r = Tt(e, t.schema);
1088
1088
  return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: r, range: e.range } });
1089
1089
  }
1090
- function jt(e, t, n, r) {
1090
+ function Mt(e, t, n, r) {
1091
1091
  var o = e.replayFilter ? Fe(e.filter, e.replayFilter()) : e.filter;
1092
1092
  if (e.or) {
1093
- var a = {}, s = function(u, p, f) {
1093
+ var a = {}, s = function(c, p, f) {
1094
1094
  var v, l;
1095
1095
  o && !o(p, f, function(d) {
1096
1096
  return p.stop(d);
1097
1097
  }, function(d) {
1098
1098
  return p.fail(d);
1099
- }) || ((l = "" + (v = p.primaryKey)) == "[object ArrayBuffer]" && (l = "" + new Uint8Array(v)), ie(a, l) || (a[l] = !0, t(u, p, f)));
1099
+ }) || ((l = "" + (v = p.primaryKey)) == "[object ArrayBuffer]" && (l = "" + new Uint8Array(v)), ie(a, l) || (a[l] = !0, t(c, p, f)));
1100
1100
  };
1101
1101
  return Promise.all([e.or._iterate(s, n), dr(fr(e, r, n), e.algorithm, s, !e.keysOnly && e.valueMapper)]);
1102
1102
  }
1103
1103
  return dr(fr(e, r, n), Fe(e.algorithm, o), t, !e.keysOnly && e.valueMapper);
1104
1104
  }
1105
1105
  function dr(e, t, n, r) {
1106
- var o = J(r ? function(a, s, u) {
1107
- return n(r(a), s, u);
1106
+ var o = J(r ? function(a, s, c) {
1107
+ return n(r(a), s, c);
1108
1108
  } : n);
1109
1109
  return e.then(function(a) {
1110
1110
  if (a)
@@ -1112,14 +1112,14 @@ var Rr = { exports: {} };
1112
1112
  var s = function() {
1113
1113
  return a.continue();
1114
1114
  };
1115
- t && !t(a, function(u) {
1116
- return s = u;
1117
- }, function(u) {
1118
- a.stop(u), s = H;
1119
- }, function(u) {
1120
- a.fail(u), s = H;
1121
- }) || o(a.value, a, function(u) {
1122
- return s = u;
1115
+ t && !t(a, function(c) {
1116
+ return s = c;
1117
+ }, function(c) {
1118
+ a.stop(c), s = H;
1119
+ }, function(c) {
1120
+ a.fail(c), s = H;
1121
+ }) || o(a.value, a, function(c) {
1122
+ return s = c;
1123
1123
  }), s();
1124
1124
  });
1125
1125
  });
@@ -1134,7 +1134,7 @@ var Rr = { exports: {} };
1134
1134
  var t = this._ctx;
1135
1135
  t.algorithm = Fe(t.algorithm, e);
1136
1136
  }, W.prototype._iterate = function(e, t) {
1137
- return jt(this._ctx, e, t, this._ctx.table.core);
1137
+ return Mt(this._ctx, e, t, this._ctx.table.core);
1138
1138
  }, W.prototype.clone = function(e) {
1139
1139
  var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1140
1140
  return e && Z(n, e), t._ctx = n, t;
@@ -1143,7 +1143,7 @@ var Rr = { exports: {} };
1143
1143
  }, W.prototype.each = function(e) {
1144
1144
  var t = this._ctx;
1145
1145
  return this._read(function(n) {
1146
- return jt(t, e, n, t.table.core);
1146
+ return Mt(t, e, n, t.table.core);
1147
1147
  });
1148
1148
  }, W.prototype.count = function(e) {
1149
1149
  var t = this;
@@ -1154,7 +1154,7 @@ var Rr = { exports: {} };
1154
1154
  return Math.min(s, r.limit);
1155
1155
  });
1156
1156
  var a = 0;
1157
- return jt(r, function() {
1157
+ return Mt(r, function() {
1158
1158
  return ++a, !1;
1159
1159
  }, n, o).then(function() {
1160
1160
  return a;
@@ -1166,11 +1166,11 @@ var Rr = { exports: {} };
1166
1166
  return f ? a(p[n[f]], f - 1) : p[r];
1167
1167
  }
1168
1168
  var s = this._ctx.dir === "next" ? 1 : -1;
1169
- function u(p, f) {
1169
+ function c(p, f) {
1170
1170
  return p = a(p, o), f = a(f, o), p < f ? -s : f < p ? s : 0;
1171
1171
  }
1172
1172
  return this.toArray(function(p) {
1173
- return p.sort(u);
1173
+ return p.sort(c);
1174
1174
  }).then(t);
1175
1175
  }, W.prototype.toArray = function(e) {
1176
1176
  var t = this;
@@ -1178,13 +1178,13 @@ var Rr = { exports: {} };
1178
1178
  var r = t._ctx;
1179
1179
  if (r.dir === "next" && qe(r, !0) && 0 < r.limit) {
1180
1180
  var o = r.valueMapper, a = Tt(r, r.table.core.schema);
1181
- return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: a, range: r.range } }).then(function(u) {
1182
- return u = u.result, o ? u.map(o) : u;
1181
+ return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: a, range: r.range } }).then(function(c) {
1182
+ return c = c.result, o ? c.map(o) : c;
1183
1183
  });
1184
1184
  }
1185
1185
  var s = [];
1186
- return jt(r, function(u) {
1187
- return s.push(u);
1186
+ return Mt(r, function(c) {
1187
+ return s.push(c);
1188
1188
  }, n, r.table.core).then(function() {
1189
1189
  return s;
1190
1190
  });
@@ -1299,7 +1299,7 @@ var Rr = { exports: {} };
1299
1299
  }
1300
1300
  return _;
1301
1301
  });
1302
- function u(m, E) {
1302
+ function c(m, E) {
1303
1303
  var S = E.failures, E = E.numFailures;
1304
1304
  b += m - E;
1305
1305
  for (var O = 0, k = K(S); O < k.length; O++) {
@@ -1317,17 +1317,17 @@ var Rr = { exports: {} };
1317
1317
  s.call(F, F.value, F) !== !1 && (F.value == null ? T.push(m[S + C]) : v || z(l(L), l(F.value)) === 0 ? (I.push(F.value), v && A.push(m[S + C])) : (T.push(m[S + C]), k.push(F.value)));
1318
1318
  }
1319
1319
  var Y = qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === gn) && { index: n.index, range: n.range };
1320
- return Promise.resolve(0 < k.length && p.mutate({ trans: r, type: "add", values: k }).then(function($) {
1321
- for (var Q in $.failures)
1320
+ return Promise.resolve(0 < k.length && p.mutate({ trans: r, type: "add", values: k }).then(function(U) {
1321
+ for (var Q in U.failures)
1322
1322
  T.splice(parseInt(Q), 1);
1323
- u(k.length, $);
1323
+ c(k.length, U);
1324
1324
  })).then(function() {
1325
- return (0 < I.length || Y && typeof e == "object") && p.mutate({ trans: r, type: "put", keys: A, values: I, criteria: Y, changeSpec: typeof e != "function" && e }).then(function($) {
1326
- return u(I.length, $);
1325
+ return (0 < I.length || Y && typeof e == "object") && p.mutate({ trans: r, type: "put", keys: A, values: I, criteria: Y, changeSpec: typeof e != "function" && e }).then(function(U) {
1326
+ return c(I.length, U);
1327
1327
  });
1328
1328
  }).then(function() {
1329
- return (0 < T.length || Y && e === gn) && p.mutate({ trans: r, type: "delete", keys: T, criteria: Y }).then(function($) {
1330
- return u(T.length, $);
1329
+ return (0 < T.length || Y && e === gn) && p.mutate({ trans: r, type: "delete", keys: T, criteria: Y }).then(function(U) {
1330
+ return c(T.length, U);
1331
1331
  });
1332
1332
  }).then(function() {
1333
1333
  return m.length > S + E && _(S + d);
@@ -1347,10 +1347,10 @@ var Rr = { exports: {} };
1347
1347
  var r = e.table.core.schema.primaryKey, o = t;
1348
1348
  return e.table.core.count({ trans: n, query: { index: r, range: o } }).then(function(a) {
1349
1349
  return e.table.core.mutate({ trans: n, type: "deleteRange", range: o }).then(function(s) {
1350
- var u = s.failures;
1350
+ var c = s.failures;
1351
1351
  if (s.lastResult, s.results, s = s.numFailures, s)
1352
- throw new _t("Could not delete some values", Object.keys(u).map(function(p) {
1353
- return u[p];
1352
+ throw new _t("Could not delete some values", Object.keys(c).map(function(p) {
1353
+ return c[p];
1354
1354
  }), a - s);
1355
1355
  return a - s;
1356
1356
  });
@@ -1376,8 +1376,8 @@ var Rr = { exports: {} };
1376
1376
  return hr("");
1377
1377
  }).limit(0);
1378
1378
  }
1379
- function Mt(e, t, n, r) {
1380
- var o, a, s, u, p, f, v, l = n.length;
1379
+ function jt(e, t, n, r) {
1380
+ var o, a, s, c, p, f, v, l = n.length;
1381
1381
  if (!n.every(function(b) {
1382
1382
  return typeof b == "string";
1383
1383
  }))
@@ -1397,14 +1397,14 @@ var Rr = { exports: {} };
1397
1397
  }).sort(function(m, _) {
1398
1398
  return s(m.lower, _.lower);
1399
1399
  });
1400
- u = w.map(function(m) {
1400
+ c = w.map(function(m) {
1401
1401
  return m.upper;
1402
1402
  }), p = w.map(function(m) {
1403
1403
  return m.lower;
1404
1404
  }), v = (f = b) === "next" ? "" : r;
1405
1405
  }
1406
1406
  d("next"), e = new e.Collection(e, function() {
1407
- return Re(u[0], p[l - 1] + r);
1407
+ return Re(c[0], p[l - 1] + r);
1408
1408
  }), e._ondirectionchange = function(b) {
1409
1409
  d(b);
1410
1410
  };
@@ -1418,14 +1418,14 @@ var Rr = { exports: {} };
1418
1418
  return !0;
1419
1419
  for (var E = null, O = y; O < l; ++O) {
1420
1420
  var k = function(I, A, T, C, L, F) {
1421
- for (var Y = Math.min(I.length, C.length), $ = -1, Q = 0; Q < Y; ++Q) {
1421
+ for (var Y = Math.min(I.length, C.length), U = -1, Q = 0; Q < Y; ++Q) {
1422
1422
  var le = A[Q];
1423
1423
  if (le !== C[Q])
1424
- return L(I[Q], T[Q]) < 0 ? I.substr(0, Q) + T[Q] + T.substr(Q + 1) : L(I[Q], C[Q]) < 0 ? I.substr(0, Q) + C[Q] + T.substr(Q + 1) : 0 <= $ ? I.substr(0, $) + A[$] + T.substr($ + 1) : null;
1425
- L(I[Q], le) < 0 && ($ = Q);
1424
+ return L(I[Q], T[Q]) < 0 ? I.substr(0, Q) + T[Q] + T.substr(Q + 1) : L(I[Q], C[Q]) < 0 ? I.substr(0, Q) + C[Q] + T.substr(Q + 1) : 0 <= U ? I.substr(0, U) + A[U] + T.substr(U + 1) : null;
1425
+ L(I[Q], le) < 0 && (U = Q);
1426
1426
  }
1427
- return Y < C.length && F === "next" ? I + T.substr(I.length) : Y < I.length && F === "prev" ? I.substr(0, T.length) : $ < 0 ? null : I.substr(0, $) + C[$] + T.substr($ + 1);
1428
- }(_, S, u[O], p[O], s, f);
1427
+ return Y < C.length && F === "next" ? I + T.substr(I.length) : Y < I.length && F === "prev" ? I.substr(0, T.length) : U < 0 ? null : I.substr(0, U) + C[U] + T.substr(U + 1);
1428
+ }(_, S, c[O], p[O], s, f);
1429
1429
  k === null && E === null ? y = O + 1 : (E === null || 0 < s(E, k)) && (E = k);
1430
1430
  }
1431
1431
  return w(E !== null ? function() {
@@ -1473,21 +1473,21 @@ var Rr = { exports: {} };
1473
1473
  }, re.prototype.startsWith = function(e) {
1474
1474
  return typeof e != "string" ? ce(this, or) : this.between(e, e + Ge, !0, !0);
1475
1475
  }, re.prototype.startsWithIgnoreCase = function(e) {
1476
- return e === "" ? this.startsWith(e) : Mt(this, function(t, n) {
1476
+ return e === "" ? this.startsWith(e) : jt(this, function(t, n) {
1477
1477
  return t.indexOf(n[0]) === 0;
1478
1478
  }, [e], Ge);
1479
1479
  }, re.prototype.equalsIgnoreCase = function(e) {
1480
- return Mt(this, function(t, n) {
1480
+ return jt(this, function(t, n) {
1481
1481
  return t === n[0];
1482
1482
  }, [e], "");
1483
1483
  }, re.prototype.anyOfIgnoreCase = function() {
1484
1484
  var e = we.apply(Ye, arguments);
1485
- return e.length === 0 ? et(this) : Mt(this, function(t, n) {
1485
+ return e.length === 0 ? et(this) : jt(this, function(t, n) {
1486
1486
  return n.indexOf(t) !== -1;
1487
1487
  }, e, "");
1488
1488
  }, re.prototype.startsWithAnyOfIgnoreCase = function() {
1489
1489
  var e = we.apply(Ye, arguments);
1490
- return e.length === 0 ? et(this) : Mt(this, function(t, n) {
1490
+ return e.length === 0 ? et(this) : jt(this, function(t, n) {
1491
1491
  return n.some(function(r) {
1492
1492
  return t.indexOf(r) === 0;
1493
1493
  });
@@ -1508,10 +1508,10 @@ var Rr = { exports: {} };
1508
1508
  n = a === "next" ? e._ascending : e._descending, t.sort(n);
1509
1509
  };
1510
1510
  var o = 0;
1511
- return r._addAlgorithm(function(a, s, u) {
1511
+ return r._addAlgorithm(function(a, s, c) {
1512
1512
  for (var p = a.key; 0 < n(p, t[o]); )
1513
1513
  if (++o === t.length)
1514
- return s(u), !1;
1514
+ return s(c), !1;
1515
1515
  return n(p, t[o]) === 0 || (s(function() {
1516
1516
  a.continue(t[o]);
1517
1517
  }), !1);
@@ -1532,7 +1532,7 @@ var Rr = { exports: {} };
1532
1532
  }, null);
1533
1533
  return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
1534
1534
  }, re.prototype.inAnyRange = function(_, t) {
1535
- var n = this, r = this._cmp, o = this._ascending, a = this._descending, s = this._min, u = this._max;
1535
+ var n = this, r = this._cmp, o = this._ascending, a = this._descending, s = this._min, c = this._max;
1536
1536
  if (_.length === 0)
1537
1537
  return et(this);
1538
1538
  if (!_.every(function(S) {
@@ -1548,7 +1548,7 @@ var Rr = { exports: {} };
1548
1548
  for (var O = 0, k = S.length; O < k; ++O) {
1549
1549
  var I = S[O];
1550
1550
  if (r(E[0], I[1]) < 0 && 0 < r(E[1], I[0])) {
1551
- I[0] = s(I[0], E[0]), I[1] = u(I[1], E[1]);
1551
+ I[0] = s(I[0], E[0]), I[1] = c(I[1], E[1]);
1552
1552
  break;
1553
1553
  }
1554
1554
  }
@@ -1640,31 +1640,31 @@ var Rr = { exports: {} };
1640
1640
  if (!this.active)
1641
1641
  return q(new G.TransactionInactive());
1642
1642
  if (this._locked())
1643
- return new j(function(a, s) {
1643
+ return new M(function(a, s) {
1644
1644
  r._blockedFuncs.push([function() {
1645
1645
  r._promise(e, t, n).then(a, s);
1646
1646
  }, B]);
1647
1647
  });
1648
1648
  if (n)
1649
1649
  return Pe(function() {
1650
- var a = new j(function(s, u) {
1650
+ var a = new M(function(s, c) {
1651
1651
  r._lock();
1652
- var p = t(s, u, r);
1653
- p && p.then && p.then(s, u);
1652
+ var p = t(s, c, r);
1653
+ p && p.then && p.then(s, c);
1654
1654
  });
1655
1655
  return a.finally(function() {
1656
1656
  return r._unlock();
1657
1657
  }), a._lib = !0, a;
1658
1658
  });
1659
- var o = new j(function(a, s) {
1660
- var u = t(a, s, r);
1661
- u && u.then && u.then(a, s);
1659
+ var o = new M(function(a, s) {
1660
+ var c = t(a, s, r);
1661
+ c && c.then && c.then(a, s);
1662
1662
  });
1663
1663
  return o._lib = !0, o;
1664
1664
  }, me.prototype._root = function() {
1665
1665
  return this.parent ? this.parent._root() : this;
1666
1666
  }, me.prototype.waitFor = function(e) {
1667
- var t, n = this._root(), r = j.resolve(e);
1667
+ var t, n = this._root(), r = M.resolve(e);
1668
1668
  n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
1669
1669
  return r;
1670
1670
  }) : (n._waitingFor = r, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function a() {
@@ -1673,11 +1673,11 @@ var Rr = { exports: {} };
1673
1673
  n._waitingFor && (t.get(-1 / 0).onsuccess = a);
1674
1674
  }());
1675
1675
  var o = n._waitingFor;
1676
- return new j(function(a, s) {
1677
- r.then(function(u) {
1678
- return n._waitingQueue.push(J(a.bind(null, u)));
1679
- }, function(u) {
1680
- return n._waitingQueue.push(J(s.bind(null, u)));
1676
+ return new M(function(a, s) {
1677
+ r.then(function(c) {
1678
+ return n._waitingQueue.push(J(a.bind(null, c)));
1679
+ }, function(c) {
1680
+ return n._waitingQueue.push(J(s.bind(null, c)));
1681
1681
  }).finally(function() {
1682
1682
  n._waitingFor === o && (n._waitingFor = null);
1683
1683
  });
@@ -1764,24 +1764,24 @@ var Rr = { exports: {} };
1764
1764
  function Y(ue) {
1765
1765
  ++le, ht(ue);
1766
1766
  }
1767
- var $ = [], Q = [], le = 0;
1767
+ var U = [], Q = [], le = 0;
1768
1768
  if (_ === "deleteRange") {
1769
1769
  if (O.type === 4)
1770
1770
  return k({ numFailures: le, failures: Q, results: [], lastResult: void 0 });
1771
- O.type === 3 ? $.push(L = A.clear()) : $.push(L = A.delete(r(O)));
1771
+ O.type === 3 ? U.push(L = A.clear()) : U.push(L = A.delete(r(O)));
1772
1772
  } else {
1773
- var T = C ? T ? [E, S] : [E, null] : [S, null], U = T[0], Ee = T[1];
1773
+ var T = C ? T ? [E, S] : [E, null] : [S, null], $ = T[0], Ee = T[1];
1774
1774
  if (C)
1775
1775
  for (var ae = 0; ae < F; ++ae)
1776
- $.push(L = Ee && Ee[ae] !== void 0 ? A[_](U[ae], Ee[ae]) : A[_](U[ae])), L.onerror = Y;
1776
+ U.push(L = Ee && Ee[ae] !== void 0 ? A[_]($[ae], Ee[ae]) : A[_]($[ae])), L.onerror = Y;
1777
1777
  else
1778
1778
  for (ae = 0; ae < F; ++ae)
1779
- $.push(L = A[_](U[ae])), L.onerror = Y;
1779
+ U.push(L = A[_]($[ae])), L.onerror = Y;
1780
1780
  }
1781
1781
  function Qt(ue) {
1782
- ue = ue.target.result, $.forEach(function(We, Nn) {
1782
+ ue = ue.target.result, U.forEach(function(We, Nn) {
1783
1783
  return We.error != null && (Q[Nn] = We.error);
1784
- }), k({ numFailures: le, failures: Q, results: _ === "delete" ? S : $.map(function(We) {
1784
+ }), k({ numFailures: le, failures: Q, results: _ === "delete" ? S : U.map(function(We) {
1785
1785
  return We.result;
1786
1786
  }), lastResult: ue });
1787
1787
  }
@@ -1793,8 +1793,8 @@ var Rr = { exports: {} };
1793
1793
  var m = w.trans, _ = w.keys;
1794
1794
  return new Promise(function(S, E) {
1795
1795
  S = J(S);
1796
- for (var O, k = m.objectStore(b), I = _.length, A = new Array(I), T = 0, C = 0, L = function($) {
1797
- $ = $.target, A[$._pos] = $.result, ++C === T && S(A);
1796
+ for (var O, k = m.objectStore(b), I = _.length, A = new Array(I), T = 0, C = 0, L = function(U) {
1797
+ U = U.target, A[U._pos] = U.result, ++C === T && S(A);
1798
1798
  }, F = ye(E), Y = 0; Y < I; ++Y)
1799
1799
  _[Y] != null && ((O = k.get(_[Y]))._pos = Y, O.onsuccess = L, O.onerror = F, ++T);
1800
1800
  T === 0 && S(A);
@@ -1827,40 +1827,40 @@ var Rr = { exports: {} };
1827
1827
  k = J(k);
1828
1828
  var C = S.index, A = S.range, T = m.objectStore(b), T = C.isPrimaryKey ? T : T.index(C.name), C = E ? O ? "prevunique" : "prev" : O ? "nextunique" : "next", L = !_ && "openKeyCursor" in T ? T.openKeyCursor(r(A), C) : T.openCursor(r(A), C);
1829
1829
  L.onerror = ye(I), L.onsuccess = J(function(F) {
1830
- var Y, $, Q, le, U = L.result;
1831
- U ? (U.___id = ++si, U.done = !1, Y = U.continue.bind(U), $ = ($ = U.continuePrimaryKey) && $.bind(U), Q = U.advance.bind(U), le = function() {
1830
+ var Y, U, Q, le, $ = L.result;
1831
+ $ ? ($.___id = ++si, $.done = !1, Y = $.continue.bind($), U = (U = $.continuePrimaryKey) && U.bind($), Q = $.advance.bind($), le = function() {
1832
1832
  throw new Error("Cursor not stopped");
1833
- }, U.trans = m, U.stop = U.continue = U.continuePrimaryKey = U.advance = function() {
1833
+ }, $.trans = m, $.stop = $.continue = $.continuePrimaryKey = $.advance = function() {
1834
1834
  throw new Error("Cursor not started");
1835
- }, U.fail = J(I), U.next = function() {
1835
+ }, $.fail = J(I), $.next = function() {
1836
1836
  var Ee = this, ae = 1;
1837
1837
  return this.start(function() {
1838
1838
  return ae-- ? Ee.continue() : Ee.stop();
1839
1839
  }).then(function() {
1840
1840
  return Ee;
1841
1841
  });
1842
- }, U.start = function(Ee) {
1842
+ }, $.start = function(Ee) {
1843
1843
  function ae() {
1844
1844
  if (L.result)
1845
1845
  try {
1846
1846
  Ee();
1847
1847
  } catch (ue) {
1848
- U.fail(ue);
1848
+ $.fail(ue);
1849
1849
  }
1850
1850
  else
1851
- U.done = !0, U.start = function() {
1851
+ $.done = !0, $.start = function() {
1852
1852
  throw new Error("Cursor behind last entry");
1853
- }, U.stop();
1853
+ }, $.stop();
1854
1854
  }
1855
1855
  var Qt = new Promise(function(ue, We) {
1856
- ue = J(ue), L.onerror = ye(We), U.fail = We, U.stop = function(Nn) {
1857
- U.stop = U.continue = U.continuePrimaryKey = U.advance = le, ue(Nn);
1856
+ ue = J(ue), L.onerror = ye(We), $.fail = We, $.stop = function(Nn) {
1857
+ $.stop = $.continue = $.continuePrimaryKey = $.advance = le, ue(Nn);
1858
1858
  };
1859
1859
  });
1860
1860
  return L.onsuccess = J(function(ue) {
1861
1861
  L.onsuccess = ae, ae();
1862
- }), U.continue = Y, U.continuePrimaryKey = $, U.advance = Q, ae(), Qt;
1863
- }, k(U)) : k(null);
1862
+ }), $.continue = Y, $.continuePrimaryKey = U, $.advance = Q, ae(), Qt;
1863
+ }, k($)) : k(null);
1864
1864
  }, I);
1865
1865
  });
1866
1866
  }, count: function(w) {
@@ -1873,7 +1873,7 @@ var Rr = { exports: {} };
1873
1873
  });
1874
1874
  } };
1875
1875
  }
1876
- var a, s, u, v = (s = p, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(d) {
1876
+ var a, s, c, v = (s = p, c = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: c.map(function(d) {
1877
1877
  return s.objectStore(d);
1878
1878
  }).map(function(d) {
1879
1879
  var y = d.keyPath, m = d.autoIncrement, b = N(y), w = {}, m = { name: d.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: y == null, compound: b, keyPath: y, autoIncrement: m, unique: !0, extractKey: vn(y) }, indexes: yr(d.indexNames).map(function(_) {
@@ -1885,7 +1885,7 @@ var Rr = { exports: {} };
1885
1885
  return w[yt(_)];
1886
1886
  } };
1887
1887
  return w[":id"] = m.primaryKey, y != null && (w[yt(y)] = m.primaryKey), m;
1888
- }) }, 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) }), p = v.schema, f = v.hasGetAll, v = p.tables.map(o), l = {};
1888
+ }) }, hasGetAll: 0 < c.length && "getAll" in s.objectStore(c[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), p = v.schema, f = v.hasGetAll, v = p.tables.map(o), l = {};
1889
1889
  return v.forEach(function(d) {
1890
1890
  return l[d.name] = d;
1891
1891
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(d) {
@@ -1913,10 +1913,10 @@ var Rr = { exports: {} };
1913
1913
  n.forEach(function(o) {
1914
1914
  var a = r[o];
1915
1915
  t.forEach(function(s) {
1916
- var u = function p(f, v) {
1916
+ var c = function p(f, v) {
1917
1917
  return Gr(f, v) || (f = te(f)) && p(f, v);
1918
1918
  }(s, o);
1919
- (!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, o, { get: function() {
1919
+ (!c || "value" in c && c.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, o, { get: function() {
1920
1920
  return this.table(o);
1921
1921
  }, set: function(p) {
1922
1922
  zn(this, o, { value: p, writable: !0, configurable: !0, enumerable: !0 });
@@ -1938,11 +1938,11 @@ var Rr = { exports: {} };
1938
1938
  n.objectStoreNames.contains("$meta") && !o.$meta && (o.$meta = bn("$meta", br("")[0], []), e._storeNames.push("$meta"));
1939
1939
  var a = e._createTransaction("readwrite", e._storeNames, o);
1940
1940
  a.create(n), a._completion.catch(r);
1941
- var s = a._reject.bind(a), u = B.transless || B;
1941
+ var s = a._reject.bind(a), c = B.transless || B;
1942
1942
  Pe(function() {
1943
- return B.trans = a, B.transless = u, t !== 0 ? (Kt(e, n), f = t, ((p = a).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(v) {
1943
+ return B.trans = a, B.transless = c, t !== 0 ? (Kt(e, n), f = t, ((p = a).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(v) {
1944
1944
  return v ?? f;
1945
- }) : j.resolve(f)).then(function(v) {
1945
+ }) : M.resolve(f)).then(function(v) {
1946
1946
  return d = v, y = a, b = n, w = [], v = (l = e)._versions, m = l._dbSchema = Lt(0, l.idbdb, b), (v = v.filter(function(_) {
1947
1947
  return _._cfg.version >= d;
1948
1948
  })).length !== 0 ? (v.forEach(function(_) {
@@ -1972,10 +1972,10 @@ var Rr = { exports: {} };
1972
1972
  I[C] = S[C];
1973
1973
  }), wn(l, [l.Transaction.prototype]), Bt(l, [l.Transaction.prototype], K(I), I), y.schema = I;
1974
1974
  var A, T = qt(k);
1975
- return T && Je(), O = j.follow(function() {
1975
+ return T && Je(), O = M.follow(function() {
1976
1976
  var C;
1977
1977
  (A = k(y)) && T && (C = Ce.bind(null, null), A.then(C, C));
1978
- }), A && typeof A.then == "function" ? j.resolve(A) : O.then(function() {
1978
+ }), A && typeof A.then == "function" ? M.resolve(A) : O.then(function() {
1979
1979
  return A;
1980
1980
  });
1981
1981
  }
@@ -1990,14 +1990,14 @@ var Rr = { exports: {} };
1990
1990
  })) : S.objectStore("$meta").put(_._cfg.version, "version"));
1991
1991
  });
1992
1992
  }), function _() {
1993
- return w.length ? j.resolve(w.shift()(y.idbtrans)).then(_) : j.resolve();
1993
+ return w.length ? M.resolve(w.shift()(y.idbtrans)).then(_) : M.resolve();
1994
1994
  }().then(function() {
1995
1995
  mr(m, b);
1996
- })) : j.resolve();
1996
+ })) : M.resolve();
1997
1997
  var l, d, y, b, w, m;
1998
1998
  }).catch(s)) : (K(o).forEach(function(v) {
1999
1999
  Sn(n, v, o[v].primKey, o[v].indexes);
2000
- }), Kt(e, n), void j.follow(function() {
2000
+ }), Kt(e, n), void M.follow(function() {
2001
2001
  return e.on.populate.fire(a);
2002
2002
  }).catch(s));
2003
2003
  var p, f;
@@ -2011,9 +2011,9 @@ var Rr = { exports: {} };
2011
2011
  var a = function(s) {
2012
2012
  if (s.change.length || s.recreate)
2013
2013
  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 };
2014
- var u = t.objectStore(s.name);
2014
+ var c = t.objectStore(s.name);
2015
2015
  s.add.forEach(function(p) {
2016
- pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(p.src)), Nt(u, p);
2016
+ pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(p.src)), Nt(c, p);
2017
2017
  });
2018
2018
  }(o[r]);
2019
2019
  if (typeof a == "object")
@@ -2031,11 +2031,11 @@ var Rr = { exports: {} };
2031
2031
  if ("" + (o.primKey.keyPath || "") != "" + (a.primKey.keyPath || "") || o.primKey.auto !== a.primKey.auto)
2032
2032
  s.recreate = !0, r.change.push(s);
2033
2033
  else {
2034
- var u = o.idxByName, p = a.idxByName, f = void 0;
2035
- for (f in u)
2034
+ var c = o.idxByName, p = a.idxByName, f = void 0;
2035
+ for (f in c)
2036
2036
  p[f] || s.del.push(f);
2037
2037
  for (f in p) {
2038
- var v = u[f], l = p[f];
2038
+ var v = c[f], l = p[f];
2039
2039
  v ? v.src !== l.src && s.change.push(l) : s.add.push(l);
2040
2040
  }
2041
2041
  (0 < s.del.length || 0 < s.add.length || 0 < s.change.length) && r.change.push(s);
@@ -2062,19 +2062,19 @@ var Rr = { exports: {} };
2062
2062
  function Lt(e, t, n) {
2063
2063
  var r = {};
2064
2064
  return wt(t.objectStoreNames, 0).forEach(function(o) {
2065
- for (var a = n.objectStore(o), s = mn(gr(f = a.keyPath), f || "", !0, !1, !!a.autoIncrement, f && typeof f != "string", !0), u = [], p = 0; p < a.indexNames.length; ++p) {
2065
+ for (var a = n.objectStore(o), s = mn(gr(f = a.keyPath), f || "", !0, !1, !!a.autoIncrement, f && typeof f != "string", !0), c = [], p = 0; p < a.indexNames.length; ++p) {
2066
2066
  var v = a.index(a.indexNames[p]), f = v.keyPath, v = mn(v.name, f, !!v.unique, !!v.multiEntry, !1, f && typeof f != "string", !1);
2067
- u.push(v);
2067
+ c.push(v);
2068
2068
  }
2069
- r[o] = bn(o, s, u);
2069
+ r[o] = bn(o, s, c);
2070
2070
  }), r;
2071
2071
  }
2072
2072
  function Gt(e, t, n) {
2073
2073
  for (var r = n.db.objectStoreNames, o = 0; o < r.length; ++o) {
2074
2074
  var a = r[o], s = n.objectStore(a);
2075
2075
  e._hasGetAll = "getAll" in s;
2076
- for (var u = 0; u < s.indexNames.length; ++u) {
2077
- var p = s.indexNames[u], f = s.index(p).keyPath, v = typeof f == "string" ? f : "[" + wt(f).join("+") + "]";
2076
+ for (var c = 0; c < s.indexNames.length; ++c) {
2077
+ var p = s.indexNames[c], f = s.index(p).keyPath, v = typeof f == "string" ? f : "[" + wt(f).join("+") + "]";
2078
2078
  !t[a] || (f = t[a].idxByName[v]) && (f.name = p, delete t[a].idxByName[v], t[a].idxByName[p] = f);
2079
2079
  }
2080
2080
  }
@@ -2151,18 +2151,18 @@ var Rr = { exports: {} };
2151
2151
  }
2152
2152
  function bt(e, t) {
2153
2153
  kn(t) || function n(r, p) {
2154
- var a = p.from, s = p.to, u = p.l, p = p.r;
2155
- mt(r, a, s), u && n(r, u), p && n(r, p);
2154
+ var a = p.from, s = p.to, c = p.l, p = p.r;
2155
+ mt(r, a, s), c && n(r, c), p && n(r, p);
2156
2156
  }(e, t);
2157
2157
  }
2158
- function Ut(e, t) {
2158
+ function $t(e, t) {
2159
2159
  var n = An(t), r = n.next();
2160
2160
  if (r.done)
2161
2161
  return !1;
2162
- for (var o = r.value, a = An(e), s = a.next(o.from), u = s.value; !r.done && !s.done; ) {
2163
- if (z(u.from, o.to) <= 0 && 0 <= z(u.to, o.from))
2162
+ for (var o = r.value, a = An(e), s = a.next(o.from), c = s.value; !r.done && !s.done; ) {
2163
+ if (z(c.from, o.to) <= 0 && 0 <= z(c.to, o.from))
2164
2164
  return !0;
2165
- z(o.from, u.from) < 0 ? o = (r = n.next(u.from)).value : u = (s = a.next(o.from)).value;
2165
+ z(o.from, c.from) < 0 ? o = (r = n.next(c.from)).value : c = (s = a.next(o.from)).value;
2166
2166
  }
2167
2167
  return !1;
2168
2168
  }
@@ -2200,19 +2200,19 @@ var Rr = { exports: {} };
2200
2200
  var t = n.r, n = n.l;
2201
2201
  return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
2202
2202
  }
2203
- function $t(e, t) {
2203
+ function Ut(e, t) {
2204
2204
  return K(t).forEach(function(n) {
2205
2205
  e[n] ? bt(e[n], t[n]) : e[n] = function r(o) {
2206
- var a, s, u = {};
2206
+ var a, s, c = {};
2207
2207
  for (a in o)
2208
- ie(o, a) && (s = o[a], u[a] = !s || typeof s != "object" || Vn.has(s.constructor) ? s : r(s));
2209
- return u;
2208
+ ie(o, a) && (s = o[a], c[a] = !s || typeof s != "object" || Vn.has(s.constructor) ? s : r(s));
2209
+ return c;
2210
2210
  }(t[n]);
2211
2211
  }), e;
2212
2212
  }
2213
2213
  function Dn(e, t) {
2214
2214
  return e.all || t.all || Object.keys(e).some(function(n) {
2215
- return t[n] && Ut(t[n], e[n]);
2215
+ return t[n] && $t(t[n], e[n]);
2216
2216
  });
2217
2217
  }
2218
2218
  xe(oe.prototype, ((de = { add: function(e) {
@@ -2227,9 +2227,9 @@ var Rr = { exports: {} };
2227
2227
  } })[Zt] = function() {
2228
2228
  return An(this);
2229
2229
  }, de));
2230
- var Ue = {}, Pn = {}, Cn = !1;
2230
+ var $e = {}, Pn = {}, Cn = !1;
2231
2231
  function Wt(e) {
2232
- $t(Pn, e), Cn || (Cn = !0, setTimeout(function() {
2232
+ Ut(Pn, e), Cn || (Cn = !0, setTimeout(function() {
2233
2233
  Cn = !1, In(Pn, !(Pn = {}));
2234
2234
  }, 0));
2235
2235
  }
@@ -2237,12 +2237,12 @@ var Rr = { exports: {} };
2237
2237
  t === void 0 && (t = !1);
2238
2238
  var n = /* @__PURE__ */ new Set();
2239
2239
  if (e.all)
2240
- for (var r = 0, o = Object.values(Ue); r < o.length; r++)
2240
+ for (var r = 0, o = Object.values($e); r < o.length; r++)
2241
2241
  _r(s = o[r], e, n, t);
2242
2242
  else
2243
2243
  for (var a in e) {
2244
- var s, u = /^idb\:\/\/(.*)\/(.*)\//.exec(a);
2245
- u && (a = u[1], u = u[2], (s = Ue["idb://".concat(a, "/").concat(u)]) && _r(s, e, n, t));
2244
+ var s, c = /^idb\:\/\/(.*)\/(.*)\//.exec(a);
2245
+ c && (a = c[1], c = c[2], (s = $e["idb://".concat(a, "/").concat(c)]) && _r(s, e, n, t));
2246
2246
  }
2247
2247
  n.forEach(function(p) {
2248
2248
  return p();
@@ -2250,7 +2250,7 @@ var Rr = { exports: {} };
2250
2250
  }
2251
2251
  function _r(e, t, n, r) {
2252
2252
  for (var o = [], a = 0, s = Object.entries(e.queries.query); a < s.length; a++) {
2253
- for (var u = s[a], p = u[0], f = [], v = 0, l = u[1]; v < l.length; v++) {
2253
+ for (var c = s[a], p = c[0], f = [], v = 0, l = c[1]; v < l.length; v++) {
2254
2254
  var d = l[v];
2255
2255
  Dn(t, d.obsSet) ? d.subscribers.forEach(function(m) {
2256
2256
  return n.add(m);
@@ -2276,8 +2276,8 @@ var Rr = { exports: {} };
2276
2276
  if (t.openCanceller !== r)
2277
2277
  throw new G.DatabaseClosed("db.open() was cancelled");
2278
2278
  }
2279
- function u() {
2280
- return new j(function(d, y) {
2279
+ function c() {
2280
+ return new M(function(d, y) {
2281
2281
  if (s(), !n)
2282
2282
  throw new G.MissingAPI();
2283
2283
  var b = e.name, w = t.autoSchema || !o ? n.open(b) : n.open(b, o);
@@ -2299,7 +2299,7 @@ var Rr = { exports: {} };
2299
2299
  else if (Gt(e, e._dbSchema, A), ((O = _n(Lt(0, (O = e).idbdb, A), O._dbSchema)).add.length || O.change.some(function(T) {
2300
2300
  return T.add.length || T.change.length;
2301
2301
  })) && !a)
2302
- 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."), k.close(), o = k.version + 1, a = !0, d(u());
2302
+ 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."), k.close(), o = k.version + 1, a = !0, d(c());
2303
2303
  Kt(e, A);
2304
2304
  } catch {
2305
2305
  }
@@ -2313,30 +2313,30 @@ var Rr = { exports: {} };
2313
2313
  switch (d == null ? void 0 : d.name) {
2314
2314
  case "UnknownError":
2315
2315
  if (0 < t.PR1398_maxLoop)
2316
- return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), u();
2316
+ return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), c();
2317
2317
  break;
2318
2318
  case "VersionError":
2319
2319
  if (0 < o)
2320
- return o = 0, u();
2320
+ return o = 0, c();
2321
2321
  }
2322
- return j.reject(d);
2322
+ return M.reject(d);
2323
2323
  });
2324
2324
  }
2325
2325
  var p, f = t.dbReadyResolve, v = null, l = !1;
2326
- return j.race([r, (typeof navigator > "u" ? j.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(d) {
2326
+ return M.race([r, (typeof navigator > "u" ? M.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(d) {
2327
2327
  function y() {
2328
2328
  return indexedDB.databases().finally(d);
2329
2329
  }
2330
2330
  p = setInterval(y, 100), y();
2331
2331
  }).finally(function() {
2332
2332
  return clearInterval(p);
2333
- }) : Promise.resolve()).then(u)]).then(function() {
2334
- return s(), t.onReadyBeingFired = [], j.resolve(xn(function() {
2333
+ }) : Promise.resolve()).then(c)]).then(function() {
2334
+ return s(), t.onReadyBeingFired = [], M.resolve(xn(function() {
2335
2335
  return e.on.ready.fire(e.vip);
2336
2336
  })).then(function d() {
2337
2337
  if (0 < t.onReadyBeingFired.length) {
2338
2338
  var y = t.onReadyBeingFired.reduce(tn, H);
2339
- return t.onReadyBeingFired = [], j.resolve(xn(function() {
2339
+ return t.onReadyBeingFired = [], M.resolve(xn(function() {
2340
2340
  return y(e.vip);
2341
2341
  })).then(d);
2342
2342
  }
@@ -2370,8 +2370,8 @@ var Rr = { exports: {} };
2370
2370
  });
2371
2371
  function o(a) {
2372
2372
  return function(p) {
2373
- var u = a(p), p = u.value;
2374
- return u.done ? p : p && typeof p.then == "function" ? p.then(n, r) : N(p) ? Promise.all(p).then(n, r) : n(p);
2373
+ var c = a(p), p = c.value;
2374
+ return c.done ? p : p && typeof p.then == "function" ? p.then(n, r) : N(p) ? Promise.all(p).then(n, r) : n(p);
2375
2375
  };
2376
2376
  }
2377
2377
  return o(t)();
@@ -2391,8 +2391,8 @@ var Rr = { exports: {} };
2391
2391
  }), _;
2392
2392
  }
2393
2393
  t = s(r.primaryKey.keyPath, 0, r.primaryKey), o[":id"] = [t];
2394
- for (var u = 0, p = r.indexes; u < p.length; u++) {
2395
- var f = p[u];
2394
+ for (var c = 0, p = r.indexes; c < p.length; c++) {
2395
+ var f = p[c];
2396
2396
  s(f.keyPath, 0, f);
2397
2397
  }
2398
2398
  function v(l) {
@@ -2429,20 +2429,20 @@ var Rr = { exports: {} };
2429
2429
  } };
2430
2430
  function Tn(e, t, n, r) {
2431
2431
  return n = n || {}, r = r || "", K(e).forEach(function(o) {
2432
- var a, s, u;
2433
- ie(t, o) ? (a = e[o], s = t[o], typeof a == "object" && typeof s == "object" && a && s ? (u = Jt(a)) !== Jt(s) ? n[r + o] = t[o] : u === "Object" ? Tn(a, s, n, r + o + ".") : a !== s && (n[r + o] = t[o]) : a !== s && (n[r + o] = t[o])) : n[r + o] = void 0;
2432
+ var a, s, c;
2433
+ ie(t, o) ? (a = e[o], s = t[o], typeof a == "object" && typeof s == "object" && a && s ? (c = Jt(a)) !== Jt(s) ? n[r + o] = t[o] : c === "Object" ? Tn(a, s, n, r + o + ".") : a !== s && (n[r + o] = t[o]) : a !== s && (n[r + o] = t[o])) : n[r + o] = void 0;
2434
2434
  }), K(t).forEach(function(o) {
2435
2435
  ie(e, o) || (n[r + o] = t[o]);
2436
2436
  }), n;
2437
2437
  }
2438
- function jn(e, t) {
2438
+ function Mn(e, t) {
2439
2439
  return t.type === "delete" ? t.keys : t.keys || t.values.map(e.extractKey);
2440
2440
  }
2441
2441
  var yi = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
2442
2442
  return h(h({}, e), { table: function(t) {
2443
2443
  var n = e.table(t), r = n.schema.primaryKey;
2444
2444
  return h(h({}, n), { mutate: function(o) {
2445
- var a = B.trans, s = a.table(t).hook, u = s.deleting, p = s.creating, f = s.updating;
2445
+ var a = B.trans, s = a.table(t).hook, c = s.deleting, p = s.creating, f = s.updating;
2446
2446
  switch (o.type) {
2447
2447
  case "add":
2448
2448
  if (p.fire === H)
@@ -2457,13 +2457,13 @@ var Rr = { exports: {} };
2457
2457
  return v(o);
2458
2458
  }, !0);
2459
2459
  case "delete":
2460
- if (u.fire === H)
2460
+ if (c.fire === H)
2461
2461
  break;
2462
2462
  return a._promise("readwrite", function() {
2463
2463
  return v(o);
2464
2464
  }, !0);
2465
2465
  case "deleteRange":
2466
- if (u.fire === H)
2466
+ if (c.fire === H)
2467
2467
  break;
2468
2468
  return a._promise("readwrite", function() {
2469
2469
  return function l(d, y, b) {
@@ -2478,13 +2478,13 @@ var Rr = { exports: {} };
2478
2478
  }
2479
2479
  return n.mutate(o);
2480
2480
  function v(l) {
2481
- var d, y, b, w = B.trans, m = l.keys || jn(r, l);
2481
+ var d, y, b, w = B.trans, m = l.keys || Mn(r, l);
2482
2482
  if (!m)
2483
2483
  throw new Error("Keys missing");
2484
- return (l = l.type === "add" || l.type === "put" ? h(h({}, l), { keys: m }) : h({}, l)).type !== "delete" && (l.values = D([], l.values, !0)), l.keys && (l.keys = D([], l.keys, !0)), d = n, b = m, ((y = l).type === "add" ? Promise.resolve([]) : d.getMany({ trans: y.trans, keys: b, cache: "immutable" })).then(function(_) {
2484
+ return (l = l.type === "add" || l.type === "put" ? h(h({}, l), { keys: m }) : h({}, l)).type !== "delete" && (l.values = P([], l.values, !0)), l.keys && (l.keys = P([], l.keys, !0)), d = n, b = m, ((y = l).type === "add" ? Promise.resolve([]) : d.getMany({ trans: y.trans, keys: b, cache: "immutable" })).then(function(_) {
2485
2485
  var S = m.map(function(E, O) {
2486
2486
  var k, I, A, T = _[O], C = { onerror: null, onsuccess: null };
2487
- return l.type === "delete" ? u.fire.call(C, E, T, w) : l.type === "add" || T === void 0 ? (k = p.fire.call(C, E, l.values[O], w), E == null && k != null && (l.keys[O] = E = k, r.outbound || fe(l.values[O], r.keyPath, E))) : (k = Tn(T, l.values[O]), (I = f.fire.call(C, k, E, T, w)) && (A = l.values[O], Object.keys(I).forEach(function(L) {
2487
+ return l.type === "delete" ? c.fire.call(C, E, T, w) : l.type === "add" || T === void 0 ? (k = p.fire.call(C, E, l.values[O], w), E == null && k != null && (l.keys[O] = E = k, r.outbound || fe(l.values[O], r.keyPath, E))) : (k = Tn(T, l.values[O]), (I = f.fire.call(C, k, E, T, w)) && (A = l.values[O], Object.keys(I).forEach(function(L) {
2488
2488
  ie(A, L) ? A[L] = I[L] : fe(A, L, I[L]);
2489
2489
  }))), C;
2490
2490
  });
@@ -2522,7 +2522,7 @@ var Rr = { exports: {} };
2522
2522
  if (!r.cache)
2523
2523
  return n.getMany(r);
2524
2524
  var o = Sr(r.keys, r.trans._cache, r.cache === "clone");
2525
- return o ? j.resolve(o) : n.getMany(r).then(function(a) {
2525
+ return o ? M.resolve(o) : n.getMany(r).then(function(a) {
2526
2526
  return r.trans._cache = { keys: r.keys, values: r.cache === "clone" ? Ae(a) : a }, a;
2527
2527
  });
2528
2528
  }, mutate: function(r) {
@@ -2555,36 +2555,36 @@ var Rr = { exports: {} };
2555
2555
  var y = (b = y.query).index, b = b.range;
2556
2556
  return [y, new oe((y = b.lower) !== null && y !== void 0 ? y : e.MIN_KEY, (b = b.upper) !== null && b !== void 0 ? b : e.MAX_KEY)];
2557
2557
  }
2558
- var a = e.table(r), s = a.schema, u = s.primaryKey, p = u.extractKey, f = u.outbound, v = h(h({}, a), { mutate: function(d) {
2558
+ var a = e.table(r), s = a.schema, c = s.primaryKey, p = c.extractKey, f = c.outbound, v = h(h({}, a), { mutate: function(d) {
2559
2559
  function y(C) {
2560
2560
  return C = "idb://".concat(t, "/").concat(r, "/").concat(C), S[C] || (S[C] = new oe());
2561
2561
  }
2562
- var b, w, m, _ = d.trans, S = d.mutatedParts || (d.mutatedParts = {}), E = y(""), O = y(":dels"), k = d.type, T = d.type === "deleteRange" ? [d.range] : d.type === "delete" ? [d.keys] : d.values.length < 50 ? [jn(u, d).filter(function(C) {
2562
+ var b, w, m, _ = d.trans, S = d.mutatedParts || (d.mutatedParts = {}), E = y(""), O = y(":dels"), k = d.type, T = d.type === "deleteRange" ? [d.range] : d.type === "delete" ? [d.keys] : d.values.length < 50 ? [Mn(c, d).filter(function(C) {
2563
2563
  return C;
2564
2564
  }), d.values] : [], I = T[0], A = T[1], T = d.trans._cache;
2565
2565
  return N(I) ? (E.addKeys(I), (T = k === "delete" || I.length === A.length ? Sr(I, T) : null) || O.addKeys(I), (T || A) && (b = y, w = T, m = A, s.indexes.forEach(function(C) {
2566
2566
  var L = b(C.name || "");
2567
- function F($) {
2568
- return $ != null ? C.extractKey($) : null;
2567
+ function F(U) {
2568
+ return U != null ? C.extractKey(U) : null;
2569
2569
  }
2570
- function Y($) {
2571
- return C.multiEntry && N($) ? $.forEach(function(Q) {
2570
+ function Y(U) {
2571
+ return C.multiEntry && N(U) ? U.forEach(function(Q) {
2572
2572
  return L.addKey(Q);
2573
- }) : L.addKey($);
2573
+ }) : L.addKey(U);
2574
2574
  }
2575
- (w || m).forEach(function($, U) {
2576
- var le = w && F(w[U]), U = m && F(m[U]);
2577
- z(le, U) !== 0 && (le != null && Y(le), U != null && Y(U));
2575
+ (w || m).forEach(function(U, $) {
2576
+ var le = w && F(w[$]), $ = m && F(m[$]);
2577
+ z(le, $) !== 0 && (le != null && Y(le), $ != null && Y($));
2578
2578
  });
2579
2579
  }))) : I ? (A = { from: I.lower, to: I.upper }, O.add(A), E.add(A)) : (E.add(n), O.add(n), s.indexes.forEach(function(C) {
2580
2580
  return y(C.name).add(n);
2581
2581
  })), a.mutate(d).then(function(C) {
2582
- return !I || d.type !== "add" && d.type !== "put" || E.addKeys(C.results), _.mutatedParts = $t(_.mutatedParts || {}, S), C;
2582
+ return !I || d.type !== "add" && d.type !== "put" || E.addKeys(C.results), _.mutatedParts = Ut(_.mutatedParts || {}, S), C;
2583
2583
  });
2584
2584
  } }), l = { get: function(d) {
2585
- return [u, new oe(d.key)];
2585
+ return [c, new oe(d.key)];
2586
2586
  }, getMany: function(d) {
2587
- return [u, new oe().addKeys(d.keys)];
2587
+ return [c, new oe().addKeys(d.keys)];
2588
2588
  }, count: o, query: o, openCursor: o };
2589
2589
  return K(l).forEach(function(d) {
2590
2590
  v[d] = function(y) {
@@ -2638,18 +2638,18 @@ var Rr = { exports: {} };
2638
2638
  return !(a in n.failures);
2639
2639
  })), t);
2640
2640
  }
2641
- function Mn(e, t) {
2641
+ function jn(e, t) {
2642
2642
  return n = e, ((r = t).lower === void 0 || (r.lowerOpen ? 0 < z(n, r.lower) : 0 <= z(n, r.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? z(e, t.upper) < 0 : z(e, t.upper) <= 0));
2643
2643
  var n, r;
2644
2644
  }
2645
2645
  function kr(e, t, d, r, o, a) {
2646
2646
  if (!d || d.length === 0)
2647
2647
  return e;
2648
- var s = t.query.index, u = s.multiEntry, p = t.query.range, f = r.schema.primaryKey.extractKey, v = s.extractKey, l = (s.lowLevelIndex || s).extractKey, d = d.reduce(function(y, b) {
2648
+ var s = t.query.index, c = s.multiEntry, p = t.query.range, f = r.schema.primaryKey.extractKey, v = s.extractKey, l = (s.lowLevelIndex || s).extractKey, d = d.reduce(function(y, b) {
2649
2649
  var w = y, m = b.type === "add" || b.type === "put" ? b.values.filter(function(O) {
2650
- return O = v(O), u && N(O) ? O.some(function(k) {
2651
- return Mn(k, p);
2652
- }) : Mn(O, p);
2650
+ return O = v(O), c && N(O) ? O.some(function(k) {
2651
+ return jn(k, p);
2652
+ }) : jn(O, p);
2653
2653
  }).map(function(O) {
2654
2654
  return O = Ae(O), a && Object.freeze(O), O;
2655
2655
  }) : [];
@@ -2663,7 +2663,7 @@ var Rr = { exports: {} };
2663
2663
  var _ = new oe().addKeys(b.values.map(function(k) {
2664
2664
  return f(k);
2665
2665
  })), w = y.filter(function(k) {
2666
- return k = t.values ? f(k) : k, !Ut(new oe(k), _);
2666
+ return k = t.values ? f(k) : k, !$t(new oe(k), _);
2667
2667
  }).concat(t.values ? m : m.map(function(k) {
2668
2668
  return f(k);
2669
2669
  }));
@@ -2671,13 +2671,13 @@ var Rr = { exports: {} };
2671
2671
  case "delete":
2672
2672
  var S = new oe().addKeys(b.keys);
2673
2673
  w = y.filter(function(k) {
2674
- return k = t.values ? f(k) : k, !Ut(new oe(k), S);
2674
+ return k = t.values ? f(k) : k, !$t(new oe(k), S);
2675
2675
  });
2676
2676
  break;
2677
2677
  case "deleteRange":
2678
2678
  var E = b.range;
2679
2679
  w = y.filter(function(k) {
2680
- return !Mn(f(k), E);
2680
+ return !jn(f(k), E);
2681
2681
  });
2682
2682
  }
2683
2683
  return w;
@@ -2724,38 +2724,38 @@ var Rr = { exports: {} };
2724
2724
  e.subscribers.add(n), r.addEventListener("abort", function() {
2725
2725
  var o, a;
2726
2726
  e.subscribers.delete(n), e.subscribers.size === 0 && (o = e, a = t, setTimeout(function() {
2727
- o.subscribers.size === 0 && Me(a, o);
2727
+ o.subscribers.size === 0 && je(a, o);
2728
2728
  }, 3e3));
2729
2729
  });
2730
2730
  }
2731
2731
  var _i = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
2732
2732
  var t = e.schema.name;
2733
2733
  return h(h({}, e), { transaction: function(n, r, o) {
2734
- var a, s, u = e.transaction(n, r, o);
2734
+ var a, s, c = e.transaction(n, r, o);
2735
2735
  return r === "readwrite" && (s = (a = new AbortController()).signal, o = function(p) {
2736
2736
  return function() {
2737
2737
  if (a.abort(), r === "readwrite") {
2738
2738
  for (var f = /* @__PURE__ */ new Set(), v = 0, l = n; v < l.length; v++) {
2739
- var d = l[v], y = Ue["idb://".concat(t, "/").concat(d)];
2739
+ var d = l[v], y = $e["idb://".concat(t, "/").concat(d)];
2740
2740
  if (y) {
2741
2741
  var b = e.table(d), w = y.optimisticOps.filter(function(F) {
2742
- return F.trans === u;
2742
+ return F.trans === c;
2743
2743
  });
2744
- if (u._explicit && p && u.mutatedParts)
2744
+ if (c._explicit && p && c.mutatedParts)
2745
2745
  for (var m = 0, _ = Object.values(y.queries.query); m < _.length; m++)
2746
2746
  for (var S = 0, E = (I = _[m]).slice(); S < E.length; S++)
2747
- Dn((A = E[S]).obsSet, u.mutatedParts) && (Me(I, A), A.subscribers.forEach(function(F) {
2747
+ Dn((A = E[S]).obsSet, c.mutatedParts) && (je(I, A), A.subscribers.forEach(function(F) {
2748
2748
  return f.add(F);
2749
2749
  }));
2750
2750
  else if (0 < w.length) {
2751
2751
  y.optimisticOps = y.optimisticOps.filter(function(F) {
2752
- return F.trans !== u;
2752
+ return F.trans !== c;
2753
2753
  });
2754
2754
  for (var O = 0, k = Object.values(y.queries.query); O < k.length; O++)
2755
2755
  for (var I, A, T, C = 0, L = (I = k[O]).slice(); C < L.length; C++)
2756
- (A = L[C]).res != null && u.mutatedParts && (p && !A.dirty ? (T = Object.isFrozen(A.res), T = kr(A.res, A.req, w, b, A, T), A.dirty ? (Me(I, A), A.subscribers.forEach(function(F) {
2756
+ (A = L[C]).res != null && c.mutatedParts && (p && !A.dirty ? (T = Object.isFrozen(A.res), T = kr(A.res, A.req, w, b, A, T), A.dirty ? (je(I, A), A.subscribers.forEach(function(F) {
2757
2757
  return f.add(F);
2758
- })) : T !== A.res && (A.res = T, A.promise = j.resolve({ result: T }))) : (A.dirty && Me(I, A), A.subscribers.forEach(function(F) {
2758
+ })) : T !== A.res && (A.res = T, A.promise = M.resolve({ result: T }))) : (A.dirty && je(I, A), A.subscribers.forEach(function(F) {
2759
2759
  return f.add(F);
2760
2760
  })));
2761
2761
  }
@@ -2766,34 +2766,34 @@ var Rr = { exports: {} };
2766
2766
  });
2767
2767
  }
2768
2768
  };
2769
- }, u.addEventListener("abort", o(!1), { signal: s }), u.addEventListener("error", o(!1), { signal: s }), u.addEventListener("complete", o(!0), { signal: s })), u;
2769
+ }, c.addEventListener("abort", o(!1), { signal: s }), c.addEventListener("error", o(!1), { signal: s }), c.addEventListener("complete", o(!0), { signal: s })), c;
2770
2770
  }, table: function(n) {
2771
2771
  var r = e.table(n), o = r.schema.primaryKey;
2772
2772
  return h(h({}, r), { mutate: function(a) {
2773
2773
  var s = B.trans;
2774
2774
  if (o.outbound || s.db._options.cache === "disabled" || s.explicit)
2775
2775
  return r.mutate(a);
2776
- var u = Ue["idb://".concat(t, "/").concat(n)];
2777
- return u ? (s = r.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length || jn(o, a).some(function(p) {
2776
+ var c = $e["idb://".concat(t, "/").concat(n)];
2777
+ return c ? (s = r.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length || Mn(o, a).some(function(p) {
2778
2778
  return p == null;
2779
- })) ? (u.optimisticOps.push(a), a.mutatedParts && Wt(a.mutatedParts), s.then(function(p) {
2780
- 0 < p.numFailures && (Me(u.optimisticOps, a), (p = xr(0, a, p)) && u.optimisticOps.push(p), a.mutatedParts && Wt(a.mutatedParts));
2779
+ })) ? (c.optimisticOps.push(a), a.mutatedParts && Wt(a.mutatedParts), s.then(function(p) {
2780
+ 0 < p.numFailures && (je(c.optimisticOps, a), (p = xr(0, a, p)) && c.optimisticOps.push(p), a.mutatedParts && Wt(a.mutatedParts));
2781
2781
  }), s.catch(function() {
2782
- Me(u.optimisticOps, a), a.mutatedParts && Wt(a.mutatedParts);
2782
+ je(c.optimisticOps, a), a.mutatedParts && Wt(a.mutatedParts);
2783
2783
  })) : s.then(function(p) {
2784
2784
  var f = xr(0, h(h({}, a), { values: a.values.map(function(y, l) {
2785
2785
  var d, y = (d = o.keyPath) !== null && d !== void 0 && d.includes(".") ? Ae(y) : h({}, y);
2786
2786
  return fe(y, o.keyPath, p.results[l]), y;
2787
2787
  }) }), p);
2788
- u.optimisticOps.push(f), queueMicrotask(function() {
2788
+ c.optimisticOps.push(f), queueMicrotask(function() {
2789
2789
  return a.mutatedParts && Wt(a.mutatedParts);
2790
2790
  });
2791
2791
  }), s) : r.mutate(a);
2792
2792
  }, query: function(a) {
2793
2793
  if (!Er(B, r) || !Or("query", a))
2794
2794
  return r.query(a);
2795
- var s = ((f = B.trans) === null || f === void 0 ? void 0 : f.db._options.cache) === "immutable", l = B, u = l.requery, p = l.signal, f = function(b, w, m, _) {
2796
- var S = Ue["idb://".concat(b, "/").concat(w)];
2795
+ var s = ((f = B.trans) === null || f === void 0 ? void 0 : f.db._options.cache) === "immutable", l = B, c = l.requery, p = l.signal, f = function(b, w, m, _) {
2796
+ var S = $e["idb://".concat(b, "/").concat(w)];
2797
2797
  if (!S)
2798
2798
  return [];
2799
2799
  if (!(w = S.queries[m]))
@@ -2825,8 +2825,8 @@ var Rr = { exports: {} };
2825
2825
  b.result = Ae(w);
2826
2826
  return b;
2827
2827
  }).catch(function(b) {
2828
- return y && v && Me(y, v), Promise.reject(b);
2829
- }), v = { obsSet: a.obsSet, promise: l, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, y ? y.push(v) : (y = [v], (d = d || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = y)), wi(v, y, u, p), v.promise.then(function(b) {
2828
+ return y && v && je(y, v), Promise.reject(b);
2829
+ }), v = { obsSet: a.obsSet, promise: l, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, y ? y.push(v) : (y = [v], (d = d || ($e["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = y)), wi(v, y, c, p), v.promise.then(function(b) {
2830
2830
  return { result: kr(b.result, a, d == null ? void 0 : d.optimisticOps, r, v, s) };
2831
2831
  });
2832
2832
  } });
@@ -2849,7 +2849,7 @@ var Rr = { exports: {} };
2849
2849
  return n || (n = new this.Version(e), t.push(n), t.sort(li), n.stores({}), this._state.autoSchema = !1, n);
2850
2850
  }, ee.prototype._whenReady = function(e) {
2851
2851
  var t = this;
2852
- return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new j(function(n, r) {
2852
+ return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new M(function(n, r) {
2853
2853
  if (t._state.openComplete)
2854
2854
  return r(new G.DatabaseClosed(t._state.dbOpenError));
2855
2855
  if (!t._state.isBeingOpened) {
@@ -2883,9 +2883,9 @@ var Rr = { exports: {} };
2883
2883
  }
2884
2884
  this.idbdb = null;
2885
2885
  }
2886
- e.isBeingOpened || (e.dbReadyPromise = new j(function(n) {
2886
+ e.isBeingOpened || (e.dbReadyPromise = new M(function(n) {
2887
2887
  e.dbReadyResolve = n;
2888
- }), e.openCanceller = new j(function(n, r) {
2888
+ }), e.openCanceller = new M(function(n, r) {
2889
2889
  e.cancelOpen = r;
2890
2890
  }));
2891
2891
  }, ee.prototype.close = function(n) {
@@ -2895,14 +2895,14 @@ var Rr = { exports: {} };
2895
2895
  var t = this;
2896
2896
  e === void 0 && (e = { disableAutoOpen: !0 });
2897
2897
  var n = 0 < arguments.length, r = this._state;
2898
- return new j(function(o, a) {
2898
+ return new M(function(o, a) {
2899
2899
  function s() {
2900
2900
  t.close(e);
2901
- var u = t._deps.indexedDB.deleteDatabase(t.name);
2902
- u.onsuccess = J(function() {
2901
+ var c = t._deps.indexedDB.deleteDatabase(t.name);
2902
+ c.onsuccess = J(function() {
2903
2903
  var p, f, v;
2904
2904
  p = t._deps, f = t.name, v = p.indexedDB, p = p.IDBKeyRange, On(v) || f === It || En(v, p).delete(f).catch(H), o();
2905
- }), u.onerror = ye(a), u.onblocked = t._fireOnBlocked;
2905
+ }), c.onerror = ye(a), c.onblocked = t._fireOnBlocked;
2906
2906
  }
2907
2907
  if (n)
2908
2908
  throw new G.InvalidArgument("Arguments not allowed in db.delete()");
@@ -2937,7 +2937,7 @@ var Rr = { exports: {} };
2937
2937
  }, ee.prototype._transaction = function(e, t, n) {
2938
2938
  var r = this, o = B.trans;
2939
2939
  o && o.db === this && e.indexOf("!") === -1 || (o = null);
2940
- var a, s, u = e.indexOf("?") !== -1;
2940
+ var a, s, c = e.indexOf("?") !== -1;
2941
2941
  e = e.replace("!", "").replace("?", "");
2942
2942
  try {
2943
2943
  if (s = t.map(function(f) {
@@ -2953,17 +2953,17 @@ var Rr = { exports: {} };
2953
2953
  }
2954
2954
  if (o) {
2955
2955
  if (o.mode === fn && a === dn) {
2956
- if (!u)
2956
+ if (!c)
2957
2957
  throw new G.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
2958
2958
  o = null;
2959
2959
  }
2960
2960
  o && s.forEach(function(f) {
2961
2961
  if (o && o.storeNames.indexOf(f) === -1) {
2962
- if (!u)
2962
+ if (!c)
2963
2963
  throw new G.SubTransaction("Table " + f + " not included in parent transaction.");
2964
2964
  o = null;
2965
2965
  }
2966
- }), u && o && !o.active && (o = null);
2966
+ }), c && o && !o.active && (o = null);
2967
2967
  }
2968
2968
  } catch (f) {
2969
2969
  return o ? o._promise(null, function(v, l) {
@@ -2971,7 +2971,7 @@ var Rr = { exports: {} };
2971
2971
  }) : q(f);
2972
2972
  }
2973
2973
  var p = (function f(v, l, d, y, b) {
2974
- return j.resolve().then(function() {
2974
+ return M.resolve().then(function() {
2975
2975
  var w = B.transless || B, m = v._createTransaction(l, d, v._dbSchema, y);
2976
2976
  if (m.explicit = !0, w = { trans: m, transless: w }, y)
2977
2977
  m.idbtrans = y.idbtrans;
@@ -2984,10 +2984,10 @@ var Rr = { exports: {} };
2984
2984
  })) : q(E);
2985
2985
  }
2986
2986
  var _, S = qt(b);
2987
- return S && Je(), w = j.follow(function() {
2987
+ return S && Je(), w = M.follow(function() {
2988
2988
  var E;
2989
2989
  (_ = b.call(m, m)) && (S ? (E = Ce.bind(null, null), _.then(E, E)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Rn(_)));
2990
- }, w), (_ && typeof _.then == "function" ? j.resolve(_).then(function(E) {
2990
+ }, w), (_ && typeof _.then == "function" ? M.resolve(_).then(function(E) {
2991
2991
  return m.active ? E : q(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2992
2992
  }) : w.then(function() {
2993
2993
  return _;
@@ -3013,16 +3013,16 @@ var Rr = { exports: {} };
3013
3013
  this._middlewares = {}, this.verno = 0;
3014
3014
  var r = ee.dependencies;
3015
3015
  this._options = t = h({ addons: ee.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
3016
- var o, a, s, u, p, f = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: H, dbReadyPromise: null, cancelOpen: H, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
3017
- f.dbReadyPromise = new j(function(l) {
3016
+ var o, a, s, c, p, f = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: H, dbReadyPromise: null, cancelOpen: H, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
3017
+ f.dbReadyPromise = new M(function(l) {
3018
3018
  f.dbReadyResolve = l;
3019
- }), f.openCanceller = new j(function(l, d) {
3019
+ }), f.openCanceller = new M(function(l, d) {
3020
3020
  f.cancelOpen = d;
3021
3021
  }), this._state = f, this.name = e, this.on = ft(this, "populate", "blocked", "versionchange", "close", { ready: [tn, H] }), this.on.ready.subscribe = Yn(this.on.ready.subscribe, function(l) {
3022
3022
  return function(d, y) {
3023
3023
  ee.vip(function() {
3024
3024
  var b, w = n._state;
3025
- w.openComplete ? (w.dbOpenError || j.resolve().then(d), y && l(d)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(d), y && l(d)) : (l(d), b = n, y || l(function m() {
3025
+ w.openComplete ? (w.dbOpenError || M.resolve().then(d), y && l(d)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(d), y && l(d)) : (l(d), b = n, y || l(function m() {
3026
3026
  b.on.ready.unsubscribe(d), b.on.ready.unsubscribe(m);
3027
3027
  }));
3028
3028
  });
@@ -3042,7 +3042,7 @@ var Rr = { exports: {} };
3042
3042
  this.db = a, this._tx = y, this.name = l, this.schema = d, this.hook = a._allTables[l] ? a._allTables[l].hook : ft(null, { creating: [Qr, H], reading: [Hr, ot], updating: [Vr, H], deleting: [Xr, H] });
3043
3043
  })), this.Transaction = (s = this, dt(ai.prototype, function(l, d, y, b, w) {
3044
3044
  var m = this;
3045
- this.db = s, this.mode = l, this.storeNames = d, this.schema = y, this.chromeTransactionDurability = b, this.idbtrans = null, this.on = ft(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 j(function(_, S) {
3045
+ this.db = s, this.mode = l, this.storeNames = d, this.schema = y, this.chromeTransactionDurability = b, this.idbtrans = null, this.on = ft(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 M(function(_, S) {
3046
3046
  m._resolve = _, m._reject = S;
3047
3047
  }), this._completion.then(function() {
3048
3048
  m.active = !1, m.on.complete.fire();
@@ -3050,8 +3050,8 @@ var Rr = { exports: {} };
3050
3050
  var S = m.active;
3051
3051
  return m.active = !1, m.on.error.fire(_), m.parent ? m.parent._reject(_) : S && m.idbtrans && m.idbtrans.abort(), q(_);
3052
3052
  });
3053
- })), this.Version = (u = this, dt(hi.prototype, function(l) {
3054
- this.db = u, this._cfg = { version: l, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3053
+ })), this.Version = (c = this, dt(hi.prototype, function(l) {
3054
+ this.db = c, this._cfg = { version: l, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3055
3055
  })), this.WhereClause = (p = this, dt(pr.prototype, function(l, d, y) {
3056
3056
  if (this.db = p, this._ctx = { table: l, index: d === ":id" ? null : d, or: y }, this._cmp = this._ascending = z, this._descending = function(b, w) {
3057
3057
  return z(w, b);
@@ -3107,19 +3107,19 @@ var Rr = { exports: {} };
3107
3107
  }
3108
3108
  function Dr(e) {
3109
3109
  var t, n = !1, r = new Si(function(o) {
3110
- var a = qt(e), s, u = !1, p = {}, f = {}, v = { get closed() {
3111
- return u;
3110
+ var a = qt(e), s, c = !1, p = {}, f = {}, v = { get closed() {
3111
+ return c;
3112
3112
  }, unsubscribe: function() {
3113
- u || (u = !0, s && s.abort(), l && Te.storagemutated.unsubscribe(y));
3113
+ c || (c = !0, s && s.abort(), l && Te.storagemutated.unsubscribe(y));
3114
3114
  } };
3115
3115
  o.start && o.start(v);
3116
3116
  var l = !1, d = function() {
3117
3117
  return ln(b);
3118
3118
  }, y = function(w) {
3119
- $t(p, w), Dn(f, p) && d();
3119
+ Ut(p, w), Dn(f, p) && d();
3120
3120
  }, b = function() {
3121
3121
  var w, m, _;
3122
- !u && Ht.indexedDB && (p = {}, w = {}, s && s.abort(), s = new AbortController(), _ = function(S) {
3122
+ !c && Ht.indexedDB && (p = {}, w = {}, s && s.abort(), s = new AbortController(), _ = function(S) {
3123
3123
  var E = Xe();
3124
3124
  try {
3125
3125
  a && Je();
@@ -3129,17 +3129,17 @@ var Rr = { exports: {} };
3129
3129
  E && Ve();
3130
3130
  }
3131
3131
  }(m = { subscr: w, signal: s.signal, requery: d, querier: e, trans: null }), Promise.resolve(_).then(function(S) {
3132
- n = !0, t = S, u || m.signal.aborted || (p = {}, function(E) {
3132
+ n = !0, t = S, c || m.signal.aborted || (p = {}, function(E) {
3133
3133
  for (var O in E)
3134
3134
  if (ie(E, O))
3135
3135
  return;
3136
3136
  return 1;
3137
3137
  }(f = w) || l || (Te(pt, y), l = !0), ln(function() {
3138
- return !u && o.next && o.next(S);
3138
+ return !c && o.next && o.next(S);
3139
3139
  }));
3140
3140
  }, function(S) {
3141
- n = !1, ["DatabaseClosedError", "AbortError"].includes(S == null ? void 0 : S.name) || u || ln(function() {
3142
- u || o.error && o.error(S);
3141
+ n = !1, ["DatabaseClosedError", "AbortError"].includes(S == null ? void 0 : S.name) || c || ln(function() {
3142
+ c || o.error && o.error(S);
3143
3143
  });
3144
3144
  }));
3145
3145
  };
@@ -3151,26 +3151,26 @@ var Rr = { exports: {} };
3151
3151
  return t;
3152
3152
  }, r;
3153
3153
  }
3154
- var $e = Se;
3154
+ var Ue = Se;
3155
3155
  function Bn(e) {
3156
- var t = je;
3156
+ var t = Me;
3157
3157
  try {
3158
- je = !0, Te.storagemutated.fire(e), In(e, !0);
3158
+ Me = !0, Te.storagemutated.fire(e), In(e, !0);
3159
3159
  } finally {
3160
- je = t;
3160
+ Me = t;
3161
3161
  }
3162
3162
  }
3163
- xe($e, h(h({}, St), { delete: function(e) {
3164
- return new $e(e, { addons: [] }).delete();
3163
+ xe(Ue, h(h({}, St), { delete: function(e) {
3164
+ return new Ue(e, { addons: [] }).delete();
3165
3165
  }, exists: function(e) {
3166
- return new $e(e, { addons: [] }).open().then(function(t) {
3166
+ return new Ue(e, { addons: [] }).open().then(function(t) {
3167
3167
  return t.close(), !0;
3168
3168
  }).catch("NoSuchDatabaseError", function() {
3169
3169
  return !1;
3170
3170
  });
3171
3171
  }, getDatabaseNames: function(e) {
3172
3172
  try {
3173
- return t = $e.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (On(n) ? Promise.resolve(n.databases()).then(function(r) {
3173
+ return t = Ue.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (On(n) ? Promise.resolve(n.databases()).then(function(r) {
3174
3174
  return r.map(function(o) {
3175
3175
  return o.name;
3176
3176
  }).filter(function(o) {
@@ -3191,7 +3191,7 @@ var Rr = { exports: {} };
3191
3191
  return function() {
3192
3192
  try {
3193
3193
  var t = Rn(e.apply(this, arguments));
3194
- return t && typeof t.then == "function" ? t : j.resolve(t);
3194
+ return t && typeof t.then == "function" ? t : M.resolve(t);
3195
3195
  } catch (n) {
3196
3196
  return q(n);
3197
3197
  }
@@ -3199,39 +3199,39 @@ var Rr = { exports: {} };
3199
3199
  }, spawn: function(e, t, n) {
3200
3200
  try {
3201
3201
  var r = Rn(e.apply(n, t || []));
3202
- return r && typeof r.then == "function" ? r : j.resolve(r);
3202
+ return r && typeof r.then == "function" ? r : M.resolve(r);
3203
3203
  } catch (o) {
3204
3204
  return q(o);
3205
3205
  }
3206
3206
  }, currentTransaction: { get: function() {
3207
3207
  return B.trans || null;
3208
3208
  } }, waitFor: function(e, t) {
3209
- return t = j.resolve(typeof e == "function" ? $e.ignoreTransaction(e) : e).timeout(t || 6e4), B.trans ? B.trans.waitFor(t) : t;
3210
- }, Promise: j, debug: { get: function() {
3209
+ return t = M.resolve(typeof e == "function" ? Ue.ignoreTransaction(e) : e).timeout(t || 6e4), B.trans ? B.trans.waitFor(t) : t;
3210
+ }, Promise: M, debug: { get: function() {
3211
3211
  return pe;
3212
3212
  }, set: function(e) {
3213
3213
  qn(e);
3214
- } }, derive: ze, extend: Z, props: xe, override: Yn, Events: ft, on: Te, liveQuery: Dr, extendObservabilitySet: $t, getByKeyPath: ve, setByKeyPath: fe, delByKeyPath: function(e, t) {
3214
+ } }, derive: ze, extend: Z, props: xe, override: Yn, Events: ft, on: Te, liveQuery: Dr, extendObservabilitySet: Ut, getByKeyPath: ve, setByKeyPath: fe, delByKeyPath: function(e, t) {
3215
3215
  typeof t == "string" ? fe(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3216
3216
  fe(e, n, void 0);
3217
3217
  });
3218
- }, shallowClone: Qn, deepClone: Ae, getObjectDiff: Tn, cmp: z, asap: Hn, minKey: -1 / 0, addons: [], connections: Ze, errnames: en, dependencies: Ht, cache: Ue, semVer: ge, version: ge.split(".").map(function(e) {
3218
+ }, shallowClone: Qn, deepClone: Ae, getObjectDiff: Tn, cmp: z, asap: Hn, minKey: -1 / 0, addons: [], connections: Ze, errnames: en, dependencies: Ht, cache: $e, semVer: ge, version: ge.split(".").map(function(e) {
3219
3219
  return parseInt(e);
3220
3220
  }).reduce(function(e, t, n) {
3221
3221
  return e + t / Math.pow(10, 2 * n);
3222
- }) })), $e.maxKey = gt($e.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Te(pt, function(e) {
3223
- je || (e = new CustomEvent(yn, { detail: e }), je = !0, dispatchEvent(e), je = !1);
3222
+ }) })), Ue.maxKey = gt(Ue.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Te(pt, function(e) {
3223
+ Me || (e = new CustomEvent(yn, { detail: e }), Me = !0, dispatchEvent(e), Me = !1);
3224
3224
  }), addEventListener(yn, function(e) {
3225
- e = e.detail, je || Bn(e);
3225
+ e = e.detail, Me || Bn(e);
3226
3226
  }));
3227
- var tt, je = !1, Pr = function() {
3227
+ var tt, Me = !1, Pr = function() {
3228
3228
  };
3229
3229
  return typeof BroadcastChannel < "u" && ((Pr = function() {
3230
3230
  (tt = new BroadcastChannel(yn)).onmessage = function(e) {
3231
3231
  return e.data && Bn(e.data);
3232
3232
  };
3233
3233
  })(), typeof tt.unref == "function" && tt.unref(), Te(pt, function(e) {
3234
- je || tt.postMessage(e);
3234
+ Me || tt.postMessage(e);
3235
3235
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
3236
3236
  if (!Se.disableBfCache && e.persisted) {
3237
3237
  pe && console.debug("Dexie: handling persisted pagehide"), tt != null && tt.close();
@@ -3240,18 +3240,18 @@ var Rr = { exports: {} };
3240
3240
  }
3241
3241
  }), addEventListener("pageshow", function(e) {
3242
3242
  !Se.disableBfCache && e.persisted && (pe && console.debug("Dexie: handling persisted pageshow"), Pr(), Bn({ all: new oe(-1 / 0, [[]]) }));
3243
- })), j.rejectionMapper = function(e, t) {
3243
+ })), M.rejectionMapper = function(e, t) {
3244
3244
  return !e || e instanceof He || 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() {
3245
3245
  return this.inner.stack;
3246
3246
  } }), t);
3247
- }, qn(pe), h(Se, Object.freeze({ __proto__: null, Dexie: Se, liveQuery: Dr, Entity: sr, cmp: z, default: Se, RangeSet: oe, mergeRanges: bt, rangesOverlap: Ut }), { default: Se }), Se;
3247
+ }, qn(pe), h(Se, Object.freeze({ __proto__: null, Dexie: Se, liveQuery: Dr, Entity: sr, cmp: z, default: Se, RangeSet: oe, mergeRanges: bt, rangesOverlap: $t }), { default: Se }), Se;
3248
3248
  });
3249
3249
  })(Rr);
3250
3250
  var Di = Rr.exports;
3251
- const Un = /* @__PURE__ */ Ai(Di), Ir = Symbol.for("Dexie"), $n = globalThis[Ir] || (globalThis[Ir] = Un);
3252
- if (Un.semVer !== $n.semVer)
3253
- throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${$n.semVer}`);
3254
- var M = /* @__PURE__ */ ((g) => (g.MESSAGES = "messages", g.CLOUD = "cloud", g.SERIES = "series", g.TOPICS = "topics", g.WIDGET = "widget", g.WIDGETS = "widgets", g))(M || {}), x = /* @__PURE__ */ ((g) => (g.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", g.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", g.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", g.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", g.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", g.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", g.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", g.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", g.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", g.NONE = "color:transparent;background-color:transparent;", g.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", g.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", g.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", g.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", g.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", g.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", g.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", g))(x || {}), se = /* @__PURE__ */ ((g) => (g.ADD_SLIDE = "addSlide", g.APP_READY = "appReady", g.API_UPDATE = "apiUpdate", g.APPROVE_MESSAGE = "approveMessage", g.CHANNEL = "channel", g.CLOSE_MODAL = "closeModal", g.ERROR = "error", g.GOTO_SLIDE = "gotoSlide", g.HIDE_MESSAGE = "hideMessage", g.HIDE_LABELS = "hideLabels", g.NEXT_SLIDE = "nextSlide", g.PAUSE_PRESENTATION = "pausePresentation", g.PRESENTATION_READY = "presentationReady", g.PREV_SLIDE = "prevSlide", g.RELOAD_PRESENTATION = "reloadPresentation", g.SHOW_MODAL = "showModal", g.STAR_MESSAGE = "starMessage", g.SLIDE_DID_LOAD = "slideDidLoad", g.SLIDE_GOTO = "slideGoto", g.SLIDE_READY = "slideReady", g.SLIDE_TRANSITIONER = "slideTransitioner", g.START_TRANSITIONER = "startTransitioner", g.STORAGE_INIT = "stroageInit", g.SUBSCRIBE = "subscribe", g.REMOVE_CLOUD = "removeCloud", g.UPDATE = "update", g.VERSION = "version", g.WIDGET_UPDATE = "widgetUpdate", g))(se || {}), Vt = /* @__PURE__ */ ((g) => (g.APPROVED = "approved", g.BEFORE = "before", g.DELAYED = "delayed", g.NONE = "none", g.REALTIME = "realtime", g))(Vt || {}), he = /* @__PURE__ */ ((g) => (g.KEYVAL = "keyval", g.LOCAL = "local", g.SESSION = "session", g.DEXIE = "dexie", g.WINDOW = "window", g))(he || {});
3251
+ const $n = /* @__PURE__ */ Ai(Di), Ir = Symbol.for("Dexie"), Un = globalThis[Ir] || (globalThis[Ir] = $n);
3252
+ if ($n.semVer !== Un.semVer)
3253
+ throw new Error(`Two different versions of Dexie loaded in the same app: ${$n.semVer} and ${Un.semVer}`);
3254
+ var j = /* @__PURE__ */ ((g) => (g.MESSAGES = "messages", g.CLOUD = "cloud", g.SERIES = "series", g.TOPICS = "topics", g.WIDGET = "widget", g.WIDGETS = "widgets", g))(j || {}), x = /* @__PURE__ */ ((g) => (g.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", g.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", g.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", g.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", g.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", g.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", g.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", g.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", g.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", g.NONE = "color:transparent;background-color:transparent;", g.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", g.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", g.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", g.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", g.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", g.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", g.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", g))(x || {}), se = /* @__PURE__ */ ((g) => (g.ADD_SLIDE = "addSlide", g.APP_READY = "appReady", g.API_UPDATE = "apiUpdate", g.APPROVE_MESSAGE = "approveMessage", g.CHANNEL = "channel", g.CLOSE_MODAL = "closeModal", g.ERROR = "error", g.GOTO_SLIDE = "gotoSlide", g.HIDE_MESSAGE = "hideMessage", g.HIDE_LABELS = "hideLabels", g.NEXT_SLIDE = "nextSlide", g.PAUSE_PRESENTATION = "pausePresentation", g.PRESENTATION_READY = "presentationReady", g.PREV_SLIDE = "prevSlide", g.RELOAD_PRESENTATION = "reloadPresentation", g.SHOW_MODAL = "showModal", g.STAR_MESSAGE = "starMessage", g.SLIDE_DID_LOAD = "slideDidLoad", g.SLIDE_GOTO = "slideGoto", g.SLIDE_READY = "slideReady", g.SLIDE_TRANSITIONER = "slideTransitioner", g.START_TRANSITIONER = "startTransitioner", g.STORAGE_INIT = "stroageInit", g.SUBSCRIBE = "subscribe", g.REMOVE_CLOUD = "removeCloud", g.UPDATE = "update", g.VERSION = "version", g.WIDGET_UPDATE = "widgetUpdate", g))(se || {}), Vt = /* @__PURE__ */ ((g) => (g.APPROVED = "approved", g.BEFORE = "before", g.DELAYED = "delayed", g.NONE = "none", g.REALTIME = "realtime", g))(Vt || {}), he = /* @__PURE__ */ ((g) => (g.KEYVAL = "keyval", g.LOCAL = "local", g.SESSION = "session", g.DEXIE = "dexie", g.WINDOW = "window", g))(he || {});
3255
3255
  function V(g) {
3256
3256
  let i = `${g.type}.${g.topics}`;
3257
3257
  return g.order && (i += `.${g.order}`), g.period && (i += `.${g.period}`), i;
@@ -3259,17 +3259,17 @@ function V(g) {
3259
3259
  function nt(g) {
3260
3260
  var i;
3261
3261
  if (g.widget === void 0) {
3262
- const c = (i = g.topics) == null ? void 0 : i.split("-");
3263
- c && c.length > 1 ? (g.dashboard = c ? c[0] : "", g.widget = c ? c[1] : "") : (g.widget = g.topics, g.dashboard = g.slide);
3262
+ const u = (i = g.topics) == null ? void 0 : i.split("-");
3263
+ u && u.length > 1 ? (g.dashboard = u ? u[0] : "", g.widget = u ? u[1] : "") : (g.widget = g.topics, g.dashboard = g.slide);
3264
3264
  }
3265
3265
  return g.topics === void 0 && (g.topics = `${g.dashboard}-${g.widget}`), g;
3266
3266
  }
3267
3267
  function vt(g, i) {
3268
3268
  var N;
3269
- let c, h, D, R, K;
3269
+ let u, h, P, R, K;
3270
3270
  switch (g.moderation) {
3271
3271
  case Vt.BEFORE:
3272
- c = /* @__PURE__ */ new Date(), h = (N = g.beforeTime) == null ? void 0 : N.split(":"), D = Number.parseInt(h ? h[0] : "00"), R = Number.parseInt(h ? h[1] : "00"), K = Number.parseInt(h ? h[2] : "00"), i.before = c.setHours(D, R, K, 0) / 1e3, i.period || (i.period = c.getDay() === 1 ? 72 : 24);
3272
+ u = /* @__PURE__ */ new Date(), h = (N = g.beforeTime) == null ? void 0 : N.split(":"), P = Number.parseInt(h ? h[0] : "00"), R = Number.parseInt(h ? h[1] : "00"), K = Number.parseInt(h ? h[2] : "00"), i.before = u.setHours(P, R, K, 0) / 1e3, i.period || (i.period = u.getDay() === 1 ? 72 : 24);
3273
3273
  break;
3274
3274
  case Vt.DELAYED:
3275
3275
  g.delay && g.delay > 0 && (i.delay = `${g.delay}`);
@@ -3284,16 +3284,16 @@ function vt(g, i) {
3284
3284
  }
3285
3285
  class Tr {
3286
3286
  constructor(i) {
3287
- P(this, "db");
3288
- P(this, "subscribers", []);
3289
- P(this, "options");
3287
+ D(this, "db");
3288
+ D(this, "subscribers", []);
3289
+ D(this, "options");
3290
3290
  /**
3291
3291
  * Retrieve Cloud Data
3292
3292
  * @param query IQuery
3293
3293
  * @returns IResponse
3294
3294
  */
3295
- P(this, "getCloud", async (i) => {
3296
- const c = await this.db.table(M.CLOUD).where({ id: i.widget }).last().catch(() => {
3295
+ D(this, "getCloud", async (i) => {
3296
+ const u = await this.db.table(j.CLOUD).where({ id: i.widget }).last().catch(() => {
3297
3297
  console.warn(
3298
3298
  "%capi%C %ccloud",
3299
3299
  x.API,
@@ -3303,15 +3303,15 @@ class Tr {
3303
3303
  i.widget
3304
3304
  );
3305
3305
  });
3306
- return c === void 0 ? { data: null, message: "Cloud Data error", success: !1 } : (c.data.presentation = (i == null ? void 0 : i.presentation) || "not set", c.data.slide = (i == null ? void 0 : i.slide) || "not set", c.message = "Messages retrieved successfully", c.success = !0, c);
3306
+ return u === void 0 ? { data: null, message: "Cloud Data error", success: !1 } : (u.data.presentation = (i == null ? void 0 : i.presentation) || "not set", u.data.slide = (i == null ? void 0 : i.slide) || "not set", u.message = "Messages retrieved successfully", u.success = !0, u);
3307
3307
  });
3308
3308
  /**
3309
3309
  * Retrieve Cloud Data
3310
3310
  * @param query IQuery
3311
3311
  * @returns IResponse
3312
3312
  */
3313
- P(this, "getSeries", async (i) => {
3314
- const c = await this.db.table(M.SERIES).where({ id: i.widget }).last().catch(() => {
3313
+ D(this, "getSeries", async (i) => {
3314
+ const u = await this.db.table(j.SERIES).where({ id: i.widget }).last().catch(() => {
3315
3315
  console.warn(
3316
3316
  "%capi%c %cseries",
3317
3317
  x.API,
@@ -3321,17 +3321,17 @@ class Tr {
3321
3321
  i.widget
3322
3322
  );
3323
3323
  });
3324
- return c === void 0 ? { data: null, message: "Series Data error", success: !1 } : (c.data.presentation = (i == null ? void 0 : i.presentation) || "not set", c.data.slide = (i == null ? void 0 : i.slide) || "not set", c.message = "Messages retrieved successfully", c.success = !0, c);
3324
+ return u === void 0 ? { data: null, message: "Series Data error", success: !1 } : (u.data.presentation = (i == null ? void 0 : i.presentation) || "not set", u.data.slide = (i == null ? void 0 : i.slide) || "not set", u.message = "Messages retrieved successfully", u.success = !0, u);
3325
3325
  });
3326
3326
  /**
3327
3327
  * Retrieve Cloud Data
3328
3328
  * @param query IQuery
3329
3329
  * @returns IResponse
3330
3330
  */
3331
- P(this, "getMessages", async (i) => {
3332
- const c = (R) => R.widget_id === i.widget, h = (R) => R.utc > ((i == null ? void 0 : i.since) || 0), D = (R) => (R == null ? void 0 : R.visible) !== 0;
3331
+ D(this, "getMessages", async (i) => {
3332
+ const u = (R) => R.widget_id === i.widget, h = (R) => R.utc > ((i == null ? void 0 : i.since) || 0), P = (R) => (R == null ? void 0 : R.visible) !== 0;
3333
3333
  try {
3334
- const R = await this.db.table(M.TOPICS).orderBy("utc").reverse().filter(c).filter(h).filter(D).limit((i == null ? void 0 : i.limit) ?? 25).toArray().catch(() => {
3334
+ const R = await this.db.table(j.TOPICS).orderBy("utc").reverse().filter(u).filter(h).filter(P).limit((i == null ? void 0 : i.limit) ?? 25).toArray().catch(() => {
3335
3335
  console.warn(
3336
3336
  "%capi%c %cmessages",
3337
3337
  x.API,
@@ -3345,7 +3345,7 @@ class Tr {
3345
3345
  return { data: null, message: "No Messages error", success: !1 };
3346
3346
  const K = R[0] ? R[0].title : "No title", N = R.map(
3347
3347
  (be) => be.message_id
3348
- ), te = (await this.db.table(M.MESSAGES).where("id").anyOf(N).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3348
+ ), te = (await this.db.table(j.MESSAGES).where("id").anyOf(N).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3349
3349
  (be) => be.data
3350
3350
  );
3351
3351
  return {
@@ -3370,10 +3370,10 @@ class Tr {
3370
3370
  * @param data
3371
3371
  * @returns number
3372
3372
  */
3373
- P(this, "setCloud", async (i, c) => i.type === M.CLOUD && c !== "" ? await this.db.table(M.CLOUD).put({
3373
+ D(this, "setCloud", async (i, u) => i.type === j.CLOUD && u !== "" ? await this.db.table(j.CLOUD).put({
3374
3374
  id: i.widget,
3375
3375
  dashboard_id: i.dashboard,
3376
- data: c.data
3376
+ data: u.data
3377
3377
  }).then(() => 201).catch((h) => (console.error("%cstorage", x.STORAGE, "set", i, h), 400)) : 400);
3378
3378
  /**
3379
3379
  * Update Series
@@ -3381,10 +3381,10 @@ class Tr {
3381
3381
  * @param data
3382
3382
  * @returns number
3383
3383
  */
3384
- P(this, "setSeries", async (i, c) => i.type === M.SERIES && c !== "" ? await this.db.table(M.SERIES).put({
3384
+ D(this, "setSeries", async (i, u) => i.type === j.SERIES && u !== "" ? await this.db.table(j.SERIES).put({
3385
3385
  id: i.widget,
3386
3386
  dashboard_id: i.dashboard,
3387
- data: c.data
3387
+ data: u.data
3388
3388
  }).then(() => 201).catch((h) => (console.error("%cstorage", x.STORAGE, "set", i, h), 400)) : 400);
3389
3389
  /**
3390
3390
  * Update Messages
@@ -3395,62 +3395,62 @@ class Tr {
3395
3395
  * @param data.data.messages IMessages
3396
3396
  * @returns number
3397
3397
  */
3398
- P(this, "setMessages", async (i, c) => {
3399
- if (i.type !== M.MESSAGES)
3398
+ D(this, "setMessages", async (i, u) => {
3399
+ if (i.type !== j.MESSAGES)
3400
3400
  return 400;
3401
- const h = c.title;
3401
+ const h = u.title;
3402
3402
  try {
3403
- return c.data.messages.forEach(async (D) => {
3403
+ return u.data.messages.forEach(async (P) => {
3404
3404
  var R, K, N;
3405
- await this.db.table(M.MESSAGES).put({ id: D.id, utc: D.utc, data: D }), await this.db.table(M.TOPICS).put({
3405
+ await this.db.table(j.MESSAGES).put({ id: P.id, utc: P.utc, data: P }), await this.db.table(j.TOPICS).put({
3406
3406
  widget_id: i.widget,
3407
- message_id: D.id,
3407
+ message_id: P.id,
3408
3408
  dashboard_id: i.dashboard,
3409
3409
  title: h,
3410
- engagement: (R = D.dynamics) == null ? void 0 : R.engagement,
3411
- impressions: (K = D.dynamics) == null ? void 0 : K.semrush_visits,
3412
- reach: (N = D.dynamics) == null ? void 0 : N.potential_reach,
3413
- sentiment: D.topics[0].sentiment,
3414
- utc: D.utc
3410
+ engagement: (R = P.dynamics) == null ? void 0 : R.engagement,
3411
+ impressions: (K = P.dynamics) == null ? void 0 : K.semrush_visits,
3412
+ reach: (N = P.dynamics) == null ? void 0 : N.potential_reach,
3413
+ sentiment: P.topics[0].sentiment,
3414
+ utc: P.utc
3415
3415
  });
3416
3416
  }), 201;
3417
- } catch (D) {
3418
- return console.error("%cstorage", x.STORAGE, "set", i, D), 400;
3417
+ } catch (P) {
3418
+ return console.error("%cstorage", x.STORAGE, "set", i, P), 400;
3419
3419
  }
3420
3420
  });
3421
3421
  /**
3422
3422
  * Wipe Message data after number of seconds
3423
3423
  * @param retentionDuration
3424
3424
  */
3425
- P(this, "cleanMessages", async (i) => {
3426
- const c = Date.now() / 1e3, h = (R) => R.utc < c - i, D = (R) => R.utc < c - i;
3427
- await this.db.table(M.TOPICS).orderBy("utc").filter(h).modify((R, K) => {
3425
+ D(this, "cleanMessages", async (i) => {
3426
+ const u = Date.now() / 1e3, h = (R) => R.utc < u - i, P = (R) => R.utc < u - i;
3427
+ await this.db.table(j.TOPICS).orderBy("utc").filter(h).modify((R, K) => {
3428
3428
  delete K.value;
3429
- }), await this.db.table(M.MESSAGES).orderBy("utc").filter(D).modify((R, K) => {
3429
+ }), await this.db.table(j.MESSAGES).orderBy("utc").filter(P).modify((R, K) => {
3430
3430
  delete K.value;
3431
3431
  });
3432
3432
  });
3433
- P(this, "hideMessage", async (i, c) => {
3434
- await this.db.table(M.TOPICS).where("message_id").equals(i).modify({ visible: c });
3433
+ D(this, "hideMessage", async (i, u) => {
3434
+ await this.db.table(j.TOPICS).where("message_id").equals(i).modify({ visible: u });
3435
3435
  });
3436
3436
  /**
3437
3437
  * Update Cloud
3438
3438
  * @param query IQuery
3439
3439
  * @returns number
3440
3440
  */
3441
- P(this, "setWidget", async (i) => await this.db.table(M.WIDGETS).put({
3441
+ D(this, "setWidget", async (i) => await this.db.table(j.WIDGETS).put({
3442
3442
  id: i.widget,
3443
3443
  dashboard_id: i.dashboard,
3444
3444
  type: i.type
3445
- }).then(() => 201).catch((c) => (console.error("%cstorage", x.STORAGE, M.WIDGET, i, c), 400)));
3445
+ }).then(() => 201).catch((u) => (console.error("%cstorage", x.STORAGE, j.WIDGET, i, u), 400)));
3446
3446
  /**
3447
3447
  * Add component subscriber
3448
3448
  * @param query IQuery
3449
3449
  * @returns null
3450
3450
  */
3451
- P(this, "subscribe", (i) => (i = nt(i), this.subscribers.filter(
3451
+ D(this, "subscribe", (i) => (i = nt(i), this.subscribers.filter(
3452
3452
  (h) => h.widget === i.widget
3453
- ).length > 0 || (i.type === M.MESSAGES && (i = vt(this.options, i)), console.debug(
3453
+ ).length > 0 || (i.type === j.MESSAGES && (i = vt(this.options, i)), console.debug(
3454
3454
  "%cstorage%c %csubscribe",
3455
3455
  x.STORAGE,
3456
3456
  x.NONE,
@@ -3462,8 +3462,8 @@ class Tr {
3462
3462
  * Get current subscribers
3463
3463
  * @returns IQuery[]
3464
3464
  */
3465
- P(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3466
- this.options = i, this.db = new $n(i.app), this.db.version(2).stores({
3465
+ D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3466
+ this.options = i, this.db = new Un(i.app), this.db.version(2).stores({
3467
3467
  player: "id,title,name,location",
3468
3468
  monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
3469
3469
  display: "id,monitor_id,presentation_id,colstart,colend,rowstart,rowend",
@@ -3478,41 +3478,41 @@ class Tr {
3478
3478
  }
3479
3479
  }
3480
3480
  function Wn(g) {
3481
- return new Promise((i, c) => {
3482
- g.oncomplete = g.onsuccess = () => i(g.result), g.onabort = g.onerror = () => c(g.error);
3481
+ return new Promise((i, u) => {
3482
+ g.oncomplete = g.onsuccess = () => i(g.result), g.onabort = g.onerror = () => u(g.error);
3483
3483
  });
3484
3484
  }
3485
3485
  function Pi(g, i) {
3486
- const c = indexedDB.open(g);
3487
- c.onupgradeneeded = () => c.result.createObjectStore(i);
3488
- const h = Wn(c);
3489
- return (D, R) => h.then((K) => R(K.transaction(i, D).objectStore(i)));
3486
+ const u = indexedDB.open(g);
3487
+ u.onupgradeneeded = () => u.result.createObjectStore(i);
3488
+ const h = Wn(u);
3489
+ return (P, R) => h.then((K) => R(K.transaction(i, P).objectStore(i)));
3490
3490
  }
3491
3491
  let Ln;
3492
- function jr() {
3492
+ function Mr() {
3493
3493
  return Ln || (Ln = Pi("keyval-store", "keyval")), Ln;
3494
3494
  }
3495
- function Gn(g, i = jr()) {
3496
- return i("readonly", (c) => Wn(c.get(g)));
3495
+ function Gn(g, i = Mr()) {
3496
+ return i("readonly", (u) => Wn(u.get(g)));
3497
3497
  }
3498
- function Xt(g, i, c = jr()) {
3499
- return c("readwrite", (h) => (h.put(i, g), Wn(h.transaction)));
3498
+ function Xt(g, i, u = Mr()) {
3499
+ return u("readwrite", (h) => (h.put(i, g), Wn(h.transaction)));
3500
3500
  }
3501
- class Mr {
3501
+ class jr {
3502
3502
  constructor(i) {
3503
- P(this, "subscribers", []);
3504
- P(this, "options");
3505
- P(this, "getCloud", async (i) => {
3506
- const c = V(i);
3507
- return await Gn(c).then((h) => h).catch(() => (console.warn("%capi", x.API, M.CLOUD, i.slide, i.widget), { data: null, message: "Cloud Data error", success: !1 }));
3503
+ D(this, "subscribers", []);
3504
+ D(this, "options");
3505
+ D(this, "getCloud", async (i) => {
3506
+ const u = V(i);
3507
+ return await Gn(u).then((h) => h).catch(() => (console.warn("%capi", x.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Cloud Data error", success: !1 }));
3508
3508
  });
3509
- P(this, "getSeries", async (i) => {
3510
- const c = V(i);
3511
- return await Gn(c).then((h) => h).catch(() => (console.warn("%capi", x.API, M.SERIES, i.slide, i.widget), { data: null, message: "Series Data error", success: !1 }));
3509
+ D(this, "getSeries", async (i) => {
3510
+ const u = V(i);
3511
+ return await Gn(u).then((h) => h).catch(() => (console.warn("%capi", x.API, j.SERIES, i.slide, i.widget), { data: null, message: "Series Data error", success: !1 }));
3512
3512
  });
3513
- P(this, "getMessages", async (i) => {
3514
- const c = V(i);
3515
- return await Gn(c).then((h) => h).catch(() => (console.warn("%capi", x.API, M.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 }));
3513
+ D(this, "getMessages", async (i) => {
3514
+ const u = V(i);
3515
+ return await Gn(u).then((h) => h).catch(() => (console.warn("%capi", x.API, j.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 }));
3516
3516
  });
3517
3517
  /**
3518
3518
  * Update Cloud
@@ -3520,11 +3520,11 @@ class Mr {
3520
3520
  * @param data
3521
3521
  * @returns number
3522
3522
  */
3523
- P(this, "setCloud", async (i, c) => {
3524
- if (!c.success)
3523
+ D(this, "setCloud", async (i, u) => {
3524
+ if (!u.success)
3525
3525
  return 400;
3526
3526
  const h = V(i);
3527
- return delete c.success, delete c.message, await Xt(h, c).then(() => 201).catch((D) => (console.error("%cstorage", x.STORAGE, M.CLOUD, i, D), 400));
3527
+ return delete u.success, delete u.message, await Xt(h, u).then(() => 201).catch((P) => (console.error("%cstorage", x.STORAGE, j.CLOUD, i, P), 400));
3528
3528
  });
3529
3529
  /**
3530
3530
  * Update Series
@@ -3532,11 +3532,11 @@ class Mr {
3532
3532
  * @param data
3533
3533
  * @returns bumber
3534
3534
  */
3535
- P(this, "setSeries", async (i, c) => {
3536
- if (!c.success)
3535
+ D(this, "setSeries", async (i, u) => {
3536
+ if (!u.success)
3537
3537
  return 400;
3538
3538
  const h = V(i);
3539
- return delete c.success, delete c.message, await Xt(h, c).then(() => 201).catch((D) => (console.error("%cstorage", x.STORAGE, M.SERIES, i, D), 400));
3539
+ return delete u.success, delete u.message, await Xt(h, u).then(() => 201).catch((P) => (console.error("%cstorage", x.STORAGE, j.SERIES, i, P), 400));
3540
3540
  });
3541
3541
  /**
3542
3542
  * Update Messages
@@ -3544,32 +3544,35 @@ class Mr {
3544
3544
  * @param data
3545
3545
  * @returns number
3546
3546
  */
3547
- P(this, "setMessages", async (i, c) => {
3548
- if (!c.success)
3547
+ D(this, "setMessages", async (i, u) => {
3548
+ if (!u.success)
3549
3549
  return 400;
3550
3550
  const h = V(i);
3551
- return delete c.success, delete c.message, await Xt(h, c).then(() => 201).catch((D) => (console.error("%cstorage", x.STORAGE, M.MESSAGES, i, D), 400));
3551
+ return delete u.success, delete u.message, await Xt(h, u).then(() => 201).catch((P) => (console.error("%cstorage", x.STORAGE, j.MESSAGES, i, P), 400));
3552
+ });
3553
+ D(this, "cleanMessages", async (i) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((u) => u())));
3554
+ D(this, "hideMessage", async (i, u) => {
3555
+ console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
3552
3556
  });
3553
- P(this, "cleanMessages", async (i) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c())));
3554
3557
  /**
3555
3558
  * Update Cloud
3556
3559
  * @param query IQuery
3557
3560
  * @returns number
3558
3561
  */
3559
- P(this, "setWidget", async (i) => {
3560
- const c = V(i), h = {
3562
+ D(this, "setWidget", async (i) => {
3563
+ const u = V(i), h = {
3561
3564
  id: i.widget,
3562
3565
  dashboard_id: i.dashboard,
3563
3566
  type: i.type
3564
3567
  };
3565
- return await Xt(c, h).then(() => 201).catch((D) => (console.error("%cstorage", x.STORAGE, M.WIDGET, i, D), 400));
3568
+ return await Xt(u, h).then(() => 201).catch((P) => (console.error("%cstorage", x.STORAGE, j.WIDGET, i, P), 400));
3566
3569
  });
3567
3570
  /**
3568
3571
  * Add component subscriber
3569
3572
  * @param query IQuery
3570
3573
  * @returns null
3571
3574
  */
3572
- P(this, "subscribe", (i) => (i = nt(i), i.type === M.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3575
+ D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3573
3576
  (h) => h.widget === i.widget
3574
3577
  ).length > 0 || (console.debug(
3575
3578
  "%cstorage%c %csubscribe",
@@ -3583,36 +3586,36 @@ class Mr {
3583
3586
  * Get current subscribers
3584
3587
  * @returns IQuery[]
3585
3588
  */
3586
- P(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3589
+ D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3587
3590
  this.options = i;
3588
3591
  }
3589
3592
  }
3590
3593
  class Kr {
3591
3594
  constructor(i) {
3592
- P(this, "subscribers", []);
3593
- P(this, "options");
3594
- P(this, "getCloud", async (i) => {
3595
- const c = V(i);
3595
+ D(this, "subscribers", []);
3596
+ D(this, "options");
3597
+ D(this, "getCloud", async (i) => {
3598
+ const u = V(i);
3596
3599
  try {
3597
- return localStorage.getObject(c);
3600
+ return localStorage.getObject(u);
3598
3601
  } catch {
3599
- return console.warn("%capi", x.API, M.CLOUD, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3602
+ return console.warn("%capi", x.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3600
3603
  }
3601
3604
  });
3602
- P(this, "getSeries", async (i) => {
3603
- const c = V(i);
3605
+ D(this, "getSeries", async (i) => {
3606
+ const u = V(i);
3604
3607
  try {
3605
- return localStorage.getObject(c);
3608
+ return localStorage.getObject(u);
3606
3609
  } catch {
3607
- return console.warn("%capi", x.API, M.SERIES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3610
+ return console.warn("%capi", x.API, j.SERIES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3608
3611
  }
3609
3612
  });
3610
- P(this, "getMessages", async (i) => {
3611
- const c = V(i);
3613
+ D(this, "getMessages", async (i) => {
3614
+ const u = V(i);
3612
3615
  try {
3613
- return localStorage.getObject(c);
3616
+ return localStorage.getObject(u);
3614
3617
  } catch {
3615
- return console.warn("%capi", x.API, M.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3618
+ return console.warn("%capi", x.API, j.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3616
3619
  }
3617
3620
  });
3618
3621
  /**
@@ -3621,12 +3624,12 @@ class Kr {
3621
3624
  * @param data
3622
3625
  * @returns number
3623
3626
  */
3624
- P(this, "setCloud", async (i, c) => {
3627
+ D(this, "setCloud", async (i, u) => {
3625
3628
  const h = V(i);
3626
3629
  try {
3627
- return localStorage.setObject(h, c), 201;
3628
- } catch (D) {
3629
- return console.error("%cstorage", x.STORAGE, M.CLOUD, i, D), 400;
3630
+ return localStorage.setObject(h, u), 201;
3631
+ } catch (P) {
3632
+ return console.error("%cstorage", x.STORAGE, j.CLOUD, i, P), 400;
3630
3633
  }
3631
3634
  });
3632
3635
  /**
@@ -3635,12 +3638,12 @@ class Kr {
3635
3638
  * @param data
3636
3639
  * @returns number
3637
3640
  */
3638
- P(this, "setSeries", async (i, c) => {
3641
+ D(this, "setSeries", async (i, u) => {
3639
3642
  const h = V(i);
3640
3643
  try {
3641
- return localStorage.setObject(h, c), 201;
3642
- } catch (D) {
3643
- return console.error("%cstorage", x.STORAGE, M.SERIES, i, D), 400;
3644
+ return localStorage.setObject(h, u), 201;
3645
+ } catch (P) {
3646
+ return console.error("%cstorage", x.STORAGE, j.SERIES, i, P), 400;
3644
3647
  }
3645
3648
  });
3646
3649
  /**
@@ -3649,23 +3652,26 @@ class Kr {
3649
3652
  * @param data
3650
3653
  * @returns number
3651
3654
  */
3652
- P(this, "setMessages", async (i, c) => {
3655
+ D(this, "setMessages", async (i, u) => {
3653
3656
  const h = V(i);
3654
3657
  try {
3655
- return localStorage.setObject(h, c), 200;
3656
- } catch (D) {
3657
- return console.error("%cstorage", x.STORAGE, M.MESSAGES, i, D), 400;
3658
+ return localStorage.setObject(h, u), 200;
3659
+ } catch (P) {
3660
+ return console.error("%cstorage", x.STORAGE, j.MESSAGES, i, P), 400;
3658
3661
  }
3659
3662
  });
3660
- P(this, "cleanMessages", async (i) => {
3663
+ D(this, "cleanMessages", async (i) => {
3661
3664
  console.log("cleanMessages not implemented for ", this.options.storage);
3662
3665
  });
3663
- P(this, "setWidget", async (i) => {
3664
- const c = `widget.${i.widget}`;
3666
+ D(this, "hideMessage", async (i, u) => {
3667
+ console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
3668
+ });
3669
+ D(this, "setWidget", async (i) => {
3670
+ const u = `widget.${i.widget}`;
3665
3671
  try {
3666
- return localStorage.setObject(c, i), 201;
3672
+ return localStorage.setObject(u, i), 201;
3667
3673
  } catch (h) {
3668
- return console.error("%cstorage", x.STORAGE, M.WIDGET, i, h), 400;
3674
+ return console.error("%cstorage", x.STORAGE, j.WIDGET, i, h), 400;
3669
3675
  }
3670
3676
  });
3671
3677
  /**
@@ -3673,7 +3679,7 @@ class Kr {
3673
3679
  * @param query IQuery
3674
3680
  * @returns null
3675
3681
  */
3676
- P(this, "subscribe", (i) => (i = nt(i), i.type === M.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3682
+ D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3677
3683
  (h) => h.widget === i.widget
3678
3684
  ).length || (console.debug(
3679
3685
  "%cstorage%c %csubscribe",
@@ -3687,41 +3693,41 @@ class Kr {
3687
3693
  * Get current subscribers
3688
3694
  * @returns IQuery[]
3689
3695
  */
3690
- P(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3691
- this.options = i, Storage.prototype.setObject = function(c, h) {
3692
- this.setObject(c, JSON.stringify(h));
3693
- }, Storage.prototype.getObject = function(c) {
3694
- const h = this.getObject(c);
3696
+ D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3697
+ this.options = i, Storage.prototype.setObject = function(u, h) {
3698
+ this.setObject(u, JSON.stringify(h));
3699
+ }, Storage.prototype.getObject = function(u) {
3700
+ const h = this.getObject(u);
3695
3701
  return h && JSON.parse(h);
3696
3702
  };
3697
3703
  }
3698
3704
  }
3699
3705
  class Br {
3700
3706
  constructor(i) {
3701
- P(this, "subscribers", []);
3702
- P(this, "options");
3703
- P(this, "getCloud", async (i) => {
3704
- const c = V(i);
3707
+ D(this, "subscribers", []);
3708
+ D(this, "options");
3709
+ D(this, "getCloud", async (i) => {
3710
+ const u = V(i);
3705
3711
  try {
3706
- return sessionStorage.getObject(c);
3712
+ return sessionStorage.getObject(u);
3707
3713
  } catch {
3708
- return console.warn("%capi", x.API, M.CLOUD, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3714
+ return console.warn("%capi", x.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3709
3715
  }
3710
3716
  });
3711
- P(this, "getSeries", async (i) => {
3712
- const c = V(i);
3717
+ D(this, "getSeries", async (i) => {
3718
+ const u = V(i);
3713
3719
  try {
3714
- return sessionStorage.getObject(c);
3720
+ return sessionStorage.getObject(u);
3715
3721
  } catch {
3716
- return console.warn("%capi", x.API, M.SERIES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3722
+ return console.warn("%capi", x.API, j.SERIES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3717
3723
  }
3718
3724
  });
3719
- P(this, "getMessages", async (i) => {
3720
- const c = V(i);
3725
+ D(this, "getMessages", async (i) => {
3726
+ const u = V(i);
3721
3727
  try {
3722
- return sessionStorage.getObject(c);
3728
+ return sessionStorage.getObject(u);
3723
3729
  } catch {
3724
- return console.warn("%capi", x.API, M.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3730
+ return console.warn("%capi", x.API, j.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3725
3731
  }
3726
3732
  });
3727
3733
  /**
@@ -3730,12 +3736,12 @@ class Br {
3730
3736
  * @param data
3731
3737
  * @returns number
3732
3738
  */
3733
- P(this, "setCloud", async (i, c) => {
3739
+ D(this, "setCloud", async (i, u) => {
3734
3740
  const h = V(i);
3735
3741
  try {
3736
- return sessionStorage.setObject(h, c), 201;
3737
- } catch (D) {
3738
- return console.error("%cstorage", x.STORAGE, M.CLOUD, i, D), 400;
3742
+ return sessionStorage.setObject(h, u), 201;
3743
+ } catch (P) {
3744
+ return console.error("%cstorage", x.STORAGE, j.CLOUD, i, P), 400;
3739
3745
  }
3740
3746
  });
3741
3747
  /**
@@ -3744,12 +3750,12 @@ class Br {
3744
3750
  * @param data
3745
3751
  * @returns number
3746
3752
  */
3747
- P(this, "setSeries", async (i, c) => {
3753
+ D(this, "setSeries", async (i, u) => {
3748
3754
  const h = V(i);
3749
3755
  try {
3750
- return sessionStorage.setObject(h, c), 201;
3751
- } catch (D) {
3752
- return console.error("%cstorage", x.STORAGE, M.SERIES, i, D), 400;
3756
+ return sessionStorage.setObject(h, u), 201;
3757
+ } catch (P) {
3758
+ return console.error("%cstorage", x.STORAGE, j.SERIES, i, P), 400;
3753
3759
  }
3754
3760
  });
3755
3761
  /**
@@ -3758,23 +3764,26 @@ class Br {
3758
3764
  * @param data
3759
3765
  * @returns number
3760
3766
  */
3761
- P(this, "setMessages", async (i, c) => {
3767
+ D(this, "setMessages", async (i, u) => {
3762
3768
  const h = V(i);
3763
3769
  try {
3764
- return sessionStorage.setObject(h, c), 200;
3765
- } catch (D) {
3766
- return console.error("%cstorage", x.STORAGE, M.MESSAGES, i, D), 400;
3770
+ return sessionStorage.setObject(h, u), 200;
3771
+ } catch (P) {
3772
+ return console.error("%cstorage", x.STORAGE, j.MESSAGES, i, P), 400;
3767
3773
  }
3768
3774
  });
3769
- P(this, "cleanMessages", async (i) => {
3775
+ D(this, "cleanMessages", async (i) => {
3770
3776
  console.log("cleanMessages not implemented for ", this.options.storage);
3771
3777
  });
3772
- P(this, "setWidget", async (i) => {
3773
- const c = `widget.${i.widget}`;
3778
+ D(this, "hideMessage", async (i, u) => {
3779
+ console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
3780
+ });
3781
+ D(this, "setWidget", async (i) => {
3782
+ const u = `widget.${i.widget}`;
3774
3783
  try {
3775
- return sessionStorage.setObject(c, i), 201;
3784
+ return sessionStorage.setObject(u, i), 201;
3776
3785
  } catch (h) {
3777
- return console.error("%cstorage", x.STORAGE, M.WIDGET, i, h), 400;
3786
+ return console.error("%cstorage", x.STORAGE, j.WIDGET, i, h), 400;
3778
3787
  }
3779
3788
  });
3780
3789
  /**
@@ -3782,7 +3791,7 @@ class Br {
3782
3791
  * @param query IQuery
3783
3792
  * @returns null
3784
3793
  */
3785
- P(this, "subscribe", (i) => (i = nt(i), i.type === M.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3794
+ D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3786
3795
  (h) => h.widget === i.widget
3787
3796
  ).length || (console.debug(
3788
3797
  "%cstorage%c %csubscribe",
@@ -3796,41 +3805,41 @@ class Br {
3796
3805
  * Get current subscribers
3797
3806
  * @returns IQuery[]
3798
3807
  */
3799
- P(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3800
- this.options = i, Storage.prototype.setObject = function(c, h) {
3801
- this.setItem(c, JSON.stringify(h));
3802
- }, Storage.prototype.getObject = function(c) {
3803
- const h = this.getItem(c);
3808
+ D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3809
+ this.options = i, Storage.prototype.setObject = function(u, h) {
3810
+ this.setItem(u, JSON.stringify(h));
3811
+ }, Storage.prototype.getObject = function(u) {
3812
+ const h = this.getItem(u);
3804
3813
  return h && JSON.parse(h);
3805
3814
  };
3806
3815
  }
3807
3816
  }
3808
3817
  class Nr {
3809
3818
  constructor(i) {
3810
- P(this, "subscribers", []);
3811
- P(this, "options");
3812
- P(this, "getCloud", async (i) => {
3813
- const c = V(i);
3819
+ D(this, "subscribers", []);
3820
+ D(this, "options");
3821
+ D(this, "getCloud", async (i) => {
3822
+ const u = V(i);
3814
3823
  try {
3815
- return window.BuzzCasting.WidgetData[c];
3824
+ return window.BuzzCasting.WidgetData[u];
3816
3825
  } catch {
3817
- return console.warn("%capi", x.API, M.CLOUD, i.slide, i.widget), { data: null, message: "Cloud Data error", success: !1 };
3826
+ return console.warn("%capi", x.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Cloud Data error", success: !1 };
3818
3827
  }
3819
3828
  });
3820
- P(this, "getSeries", async (i) => {
3821
- const c = V(i);
3829
+ D(this, "getSeries", async (i) => {
3830
+ const u = V(i);
3822
3831
  try {
3823
- return window.BuzzCasting.WidgetData[c];
3832
+ return window.BuzzCasting.WidgetData[u];
3824
3833
  } catch {
3825
- return console.warn("%capi", x.API, M.SERIES, i.slide, i.widget), { data: null, message: "Series Data error", success: !1 };
3834
+ return console.warn("%capi", x.API, j.SERIES, i.slide, i.widget), { data: null, message: "Series Data error", success: !1 };
3826
3835
  }
3827
3836
  });
3828
- P(this, "getMessages", async (i) => {
3829
- const c = V(i);
3837
+ D(this, "getMessages", async (i) => {
3838
+ const u = V(i);
3830
3839
  try {
3831
- return window.BuzzCasting.WidgetData[c];
3840
+ return window.BuzzCasting.WidgetData[u];
3832
3841
  } catch {
3833
- return console.warn("%capi", x.API, M.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3842
+ return console.warn("%capi", x.API, j.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
3834
3843
  }
3835
3844
  });
3836
3845
  /**
@@ -3839,12 +3848,12 @@ class Nr {
3839
3848
  * @param data
3840
3849
  * @returns number
3841
3850
  */
3842
- P(this, "setCloud", async (i, c) => {
3851
+ D(this, "setCloud", async (i, u) => {
3843
3852
  const h = V(i);
3844
3853
  try {
3845
- return window.BuzzCasting.WidgetData[h] = c, 201;
3846
- } catch (D) {
3847
- return console.error("%cstorage", x.STORAGE, "set", i, D), 400;
3854
+ return window.BuzzCasting.WidgetData[h] = u, 201;
3855
+ } catch (P) {
3856
+ return console.error("%cstorage", x.STORAGE, "set", i, P), 400;
3848
3857
  }
3849
3858
  });
3850
3859
  /**
@@ -3853,12 +3862,12 @@ class Nr {
3853
3862
  * @param data
3854
3863
  * @returns number
3855
3864
  */
3856
- P(this, "setSeries", async (i, c) => {
3865
+ D(this, "setSeries", async (i, u) => {
3857
3866
  const h = V(i);
3858
3867
  try {
3859
- return window.BuzzCasting.WidgetData[h] = c, 201;
3860
- } catch (D) {
3861
- return console.error("%cstorage", x.STORAGE, "set", i, D), 400;
3868
+ return window.BuzzCasting.WidgetData[h] = u, 201;
3869
+ } catch (P) {
3870
+ return console.error("%cstorage", x.STORAGE, "set", i, P), 400;
3862
3871
  }
3863
3872
  });
3864
3873
  /**
@@ -3867,23 +3876,26 @@ class Nr {
3867
3876
  * @param data
3868
3877
  * @returns number
3869
3878
  */
3870
- P(this, "setMessages", async (i, c) => {
3879
+ D(this, "setMessages", async (i, u) => {
3871
3880
  const h = V(i);
3872
3881
  try {
3873
- return window.BuzzCasting.WidgetData[h] = c, 201;
3874
- } catch (D) {
3875
- return console.error("%cstorage", x.STORAGE, "set", i, D), 400;
3882
+ return window.BuzzCasting.WidgetData[h] = u, 201;
3883
+ } catch (P) {
3884
+ return console.error("%cstorage", x.STORAGE, "set", i, P), 400;
3876
3885
  }
3877
3886
  });
3878
- P(this, "cleanMessages", async (i) => {
3887
+ D(this, "cleanMessages", async (i) => {
3879
3888
  console.log("cleanMessages not implemented for ", this.options.storage);
3880
3889
  });
3881
- P(this, "setWidget", async (i) => {
3882
- const c = `widget.${i.widget}`;
3890
+ D(this, "hideMessage", async (i, u) => {
3891
+ console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
3892
+ });
3893
+ D(this, "setWidget", async (i) => {
3894
+ const u = `widget.${i.widget}`;
3883
3895
  try {
3884
- return window.BuzzCasting.WidgetData[c] = i, 201;
3896
+ return window.BuzzCasting.WidgetData[u] = i, 201;
3885
3897
  } catch (h) {
3886
- return console.error("%cstorage", x.STORAGE, M.WIDGET, i, h), 400;
3898
+ return console.error("%cstorage", x.STORAGE, j.WIDGET, i, h), 400;
3887
3899
  }
3888
3900
  });
3889
3901
  /**
@@ -3891,7 +3903,7 @@ class Nr {
3891
3903
  * @param query IQuery
3892
3904
  * @returns null
3893
3905
  */
3894
- P(this, "subscribe", (i) => (i = nt(i), i.type === M.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3906
+ D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
3895
3907
  (h) => h.widget === i.widget
3896
3908
  ).length || (console.debug(
3897
3909
  "%cstorage%c %csubscribe",
@@ -3905,22 +3917,22 @@ class Nr {
3905
3917
  * Get current subscribers
3906
3918
  * @returns IQuery[]
3907
3919
  */
3908
- P(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3920
+ D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
3909
3921
  this.options = i, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
3910
3922
  }
3911
3923
  }
3912
3924
  function Ci(g) {
3913
3925
  const i = {};
3914
- for (let c = 0; c < g.length; c++) {
3915
- const h = g.item(c);
3926
+ for (let u = 0; u < g.length; u++) {
3927
+ const h = g.item(u);
3916
3928
  h != null && h.name && (i[h.name] = h.value);
3917
3929
  }
3918
3930
  return i;
3919
3931
  }
3920
3932
  function Bi(g) {
3921
3933
  const i = {};
3922
- for (let c = 0; c < g.length; c++) {
3923
- const h = g[c];
3934
+ for (let u = 0; u < g.length; u++) {
3935
+ const h = g[u];
3924
3936
  h.name !== "class" && !h.name.includes("data") && (i[h.name] = h.value);
3925
3937
  }
3926
3938
  return i;
@@ -3968,10 +3980,10 @@ function Ni(g, i) {
3968
3980
  }
3969
3981
  }
3970
3982
  function Li(g) {
3971
- return g.replace(/(?:^\w|[A-Z]|\b\w)/g, (i, c) => c === 0 ? i.toLowerCase() : i.toUpperCase()).replace(/\s+/g, "");
3983
+ return g.replace(/(?:^\w|[A-Z]|\b\w)/g, (i, u) => u === 0 ? i.toLowerCase() : i.toUpperCase()).replace(/\s+/g, "");
3972
3984
  }
3973
3985
  function Gi(g) {
3974
- return g.toLowerCase().split("-").reduce((i, c) => i + (c.charAt(0).toUpperCase() + c.slice(1)));
3986
+ return g.toLowerCase().split("-").reduce((i, u) => i + (u.charAt(0).toUpperCase() + u.slice(1)));
3975
3987
  }
3976
3988
  function Ii(g, i) {
3977
3989
  for (; g.length < i; )
@@ -3979,30 +3991,30 @@ function Ii(g, i) {
3979
3991
  return g;
3980
3992
  }
3981
3993
  function Oe(g, i) {
3982
- let c, h, D;
3994
+ let u, h, P;
3983
3995
  if (i.length === 0)
3984
3996
  return g;
3985
- for (c = 0, D = i.length; c < D; c++)
3986
- h = i.charCodeAt(c), g = (g << 5) - g + h, g |= 0;
3997
+ for (u = 0, P = i.length; u < P; u++)
3998
+ h = i.charCodeAt(u), g = (g << 5) - g + h, g |= 0;
3987
3999
  return g < 0 ? g * -2 : g;
3988
4000
  }
3989
- function Ri(g, i, c) {
4001
+ function Ri(g, i, u) {
3990
4002
  return Object.keys(i).sort().reduce(h, g);
3991
- function h(D, R) {
3992
- return Lr(D, i[R], R, c);
4003
+ function h(P, R) {
4004
+ return Lr(P, i[R], R, u);
3993
4005
  }
3994
4006
  }
3995
- function Lr(g, i, c, h) {
3996
- const D = Oe(Oe(Oe(g, c), Ti(i)), typeof i);
4007
+ function Lr(g, i, u, h) {
4008
+ const P = Oe(Oe(Oe(g, u), Ti(i)), typeof i);
3997
4009
  if (i === null)
3998
- return Oe(D, "null");
4010
+ return Oe(P, "null");
3999
4011
  if (i === void 0)
4000
- return Oe(D, "undefined");
4012
+ return Oe(P, "undefined");
4001
4013
  if (typeof i == "object" || typeof i == "function") {
4002
4014
  if (h.includes(i))
4003
- return Oe(D, `[Circular]${c}`);
4015
+ return Oe(P, `[Circular]${u}`);
4004
4016
  h.push(i);
4005
- const R = Ri(D, i, h);
4017
+ const R = Ri(P, i, h);
4006
4018
  if (!("valueOf" in i) || typeof i.valueOf != "function")
4007
4019
  return R;
4008
4020
  try {
@@ -4011,7 +4023,7 @@ function Lr(g, i, c, h) {
4011
4023
  return Oe(R, `[valueOf exception]${K.stack || K.message}`);
4012
4024
  }
4013
4025
  }
4014
- return Oe(D, i.toString());
4026
+ return Oe(P, i.toString());
4015
4027
  }
4016
4028
  function Ti(g) {
4017
4029
  return Object.prototype.toString.call(g);
@@ -4021,28 +4033,28 @@ function Fn(g) {
4021
4033
  }
4022
4034
  function Fi(g) {
4023
4035
  const i = [...g];
4024
- for (let c = i.length - 1; c > 0; c--) {
4025
- const h = Math.floor(Math.random() * (c + 1));
4026
- [i[c], i[h]] = [i[h], i[c]];
4036
+ for (let u = i.length - 1; u > 0; u--) {
4037
+ const h = Math.floor(Math.random() * (u + 1));
4038
+ [i[u], i[h]] = [i[h], i[u]];
4027
4039
  }
4028
4040
  return i;
4029
4041
  }
4030
- function Ui(g) {
4042
+ function $i(g) {
4031
4043
  const i = g.toUpperCase().split(/[\s_-]+/);
4032
- return i.length > 0 ? (i.forEach((c, h) => {
4033
- i[h] = `${c.charAt(0)}.`;
4044
+ return i.length > 0 ? (i.forEach((u, h) => {
4045
+ i[h] = `${u.charAt(0)}.`;
4034
4046
  }), i.join(" ")) : "";
4035
4047
  }
4036
- function ji(g) {
4048
+ function Mi(g) {
4037
4049
  const i = document.createRange();
4038
4050
  i.selectNodeContents(g), i.deleteContents();
4039
4051
  }
4040
- function $i(g) {
4052
+ function Ui(g) {
4041
4053
  return `${g.title.length > 0 ? `<strong>${g.title}</strong>` : ""}${g.content.replace(/\n\n/g, `
4042
4054
  `).replace(/\n/g, "<br />")}`;
4043
4055
  }
4044
4056
  function Wi(g, i) {
4045
- const c = [
4057
+ const u = [
4046
4058
  { value: 1, symbol: "" },
4047
4059
  { value: 1e3, symbol: "K" },
4048
4060
  { value: 1e6, symbol: "M" },
@@ -4051,15 +4063,15 @@ function Wi(g, i) {
4051
4063
  { value: 1e15, symbol: "P" },
4052
4064
  { value: 1e18, symbol: "E" }
4053
4065
  ], h = /\.0+$|(\.[0-9]*[1-9])0+$/;
4054
- let D;
4055
- for (D = c.length - 1; D > 0 && !(g >= c[D].value); D--)
4066
+ let P;
4067
+ for (P = u.length - 1; P > 0 && !(g >= u[P].value); P--)
4056
4068
  ;
4057
- return (g / c[D].value).toFixed(i).replace(h, "$1") + c[D].symbol;
4069
+ return (g / u[P].value).toFixed(i).replace(h, "$1") + u[P].symbol;
4058
4070
  }
4059
4071
  function zi(g, i) {
4060
4072
  if (g = g.toString().replace(/[^0-9.]/g, ""), g < 1e3)
4061
4073
  return g;
4062
- const c = [
4074
+ const u = [
4063
4075
  { v: 1e3, s: "K" },
4064
4076
  { v: 1e6, s: "M" },
4065
4077
  { v: 1e9, s: "B" },
@@ -4068,27 +4080,27 @@ function zi(g, i) {
4068
4080
  { v: 1e18, s: "E" }
4069
4081
  ];
4070
4082
  let h;
4071
- for (h = c.length - 1; h > 0 && !(g >= c[h].v); h--)
4083
+ for (h = u.length - 1; h > 0 && !(g >= u[h].v); h--)
4072
4084
  ;
4073
- return (g / c[h].v).toFixed(i).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + c[h].s;
4085
+ return (g / u[h].v).toFixed(i).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + u[h].s;
4074
4086
  }
4075
4087
  class Yi {
4076
4088
  constructor(i) {
4077
- P(this, "sm");
4078
- P(this, "api");
4079
- P(this, "bc");
4080
- P(this, "options");
4081
- P(this, "update", async (i) => {
4089
+ D(this, "sm");
4090
+ D(this, "api");
4091
+ D(this, "bc");
4092
+ D(this, "options");
4093
+ D(this, "update", async (i) => {
4082
4094
  if (this.sm === null)
4083
4095
  return;
4084
- const c = await this.sm.getSubscribers();
4085
- if (c.length === 0)
4096
+ const u = await this.sm.getSubscribers();
4097
+ if (u.length === 0)
4086
4098
  return;
4087
4099
  const h = [];
4088
- i ? h.push(this.api.get(i)) : c == null || c.forEach((D) => {
4089
- h.push(this.api.get(D));
4100
+ i ? h.push(this.api.get(i)) : u == null || u.forEach((P) => {
4101
+ h.push(this.api.get(P));
4090
4102
  }), await Promise.allSettled(h).then(
4091
- (D) => D.forEach(async (R) => {
4103
+ (P) => P.forEach(async (R) => {
4092
4104
  let K = 400;
4093
4105
  if (R.status === "fulfilled") {
4094
4106
  const N = R.value;
@@ -4100,37 +4112,37 @@ class Yi {
4100
4112
  )[0];
4101
4113
  let te = "";
4102
4114
  switch (N.query.type) {
4103
- case M.MESSAGES:
4115
+ case j.MESSAGES:
4104
4116
  if (te = Fn(N.data.messages), Z.hash === te)
4105
4117
  return console.debug(
4106
4118
  "%capi%c %cno updates",
4107
4119
  x.API,
4108
4120
  x.NONE,
4109
4121
  x.NO_UPDATES,
4110
- M.MESSAGES,
4122
+ j.MESSAGES,
4111
4123
  N.query.slide,
4112
4124
  N.query.widget
4113
4125
  ), 204;
4114
4126
  Z.hash = te, K = await this.sm.setMessages(N.query, N);
4115
4127
  break;
4116
- case M.CLOUD:
4128
+ case j.CLOUD:
4117
4129
  te = Fn(N.data), Z.hash === te ? (console.debug(
4118
4130
  "%capi%c %cno updates",
4119
4131
  x.API,
4120
4132
  x.NONE,
4121
4133
  x.NO_UPDATES,
4122
- M.CLOUD,
4134
+ j.CLOUD,
4123
4135
  N.query.slide,
4124
4136
  N.query.widget
4125
4137
  ), K = 204) : (Z.hash = te, K = await this.sm.setCloud(N.query, N));
4126
4138
  break;
4127
- case M.SERIES:
4139
+ case j.SERIES:
4128
4140
  te = Fn(N.data), Z.hash === te ? (console.debug(
4129
4141
  "%capi%c %cno updates",
4130
4142
  x.API,
4131
4143
  x.NONE,
4132
4144
  x.NO_UPDATES,
4133
- M.SERIES,
4145
+ j.SERIES,
4134
4146
  N.query.slide,
4135
4147
  N.query.widget
4136
4148
  ), K = 204) : (Z.hash = te, K = await this.sm.setSeries(N.query, N));
@@ -4181,14 +4193,14 @@ class Yi {
4181
4193
  })
4182
4194
  );
4183
4195
  });
4184
- P(this, "hide", (i) => {
4196
+ D(this, "hide", (i) => {
4185
4197
  this.api.hideMessage(i);
4186
4198
  });
4187
- P(this, "actions", async (i) => {
4188
- var c;
4199
+ D(this, "actions", async (i) => {
4200
+ var u;
4189
4201
  switch (i.data.event) {
4190
4202
  case se.SUBSCRIBE:
4191
- (c = this.sm) == null || c.subscribe(i.data.data);
4203
+ (u = this.sm) == null || u.subscribe(i.data.data);
4192
4204
  break;
4193
4205
  case se.UPDATE:
4194
4206
  console.debug(
@@ -4202,14 +4214,17 @@ class Yi {
4202
4214
  break;
4203
4215
  }
4204
4216
  });
4205
- P(this, "cleanMessages", async () => {
4206
- var c, h;
4207
- const i = ((c = this.options) == null ? void 0 : c.retention) || 345600;
4217
+ D(this, "cleanMessages", async () => {
4218
+ var u, h;
4219
+ const i = ((u = this.options) == null ? void 0 : u.retention) || 345600;
4208
4220
  return await ((h = this.sm) == null ? void 0 : h.cleanMessages(i));
4209
4221
  });
4210
- P(this, "hideMessage", async (i) => await this.api.hideMessage(i));
4211
- P(this, "hideLabels", async (i) => await this.api.hideLabels(i));
4212
- P(this, "getSubscribers", async () => {
4222
+ D(this, "hideMessage", async (i) => {
4223
+ var u;
4224
+ return await ((u = this.sm) == null ? void 0 : u.hideMessage(i.id, 0)), await this.api.hideMessage(i);
4225
+ });
4226
+ D(this, "hideLabels", async (i) => await this.api.hideLabels(i));
4227
+ D(this, "getSubscribers", async () => {
4213
4228
  var i;
4214
4229
  return await ((i = this.sm) == null ? void 0 : i.getSubscribers());
4215
4230
  });
@@ -4222,14 +4237,14 @@ class Yi {
4222
4237
  se.VERSION,
4223
4238
  xi
4224
4239
  ), this.options = i, this.sm = null;
4225
- const c = (i == null ? void 0 : i.slide) || i.app;
4226
- switch (this.bc = new BroadcastChannel(c), console.info(
4240
+ const u = (i == null ? void 0 : i.slide) || i.app;
4241
+ switch (this.bc = new BroadcastChannel(u), console.info(
4227
4242
  "%capi%c %cbroadcast",
4228
4243
  x.API,
4229
4244
  x.NONE,
4230
4245
  x.BROADCAST,
4231
4246
  se.CHANNEL,
4232
- c
4247
+ u
4233
4248
  ), this.bc.onmessage = (h) => {
4234
4249
  this.actions(h);
4235
4250
  }, this.bc.postMessage({ event: se.STORAGE_INIT, data: {} }), this.api = new ki(i), i.storage) {
@@ -4243,7 +4258,7 @@ class Yi {
4243
4258
  this.sm = new Kr(i);
4244
4259
  break;
4245
4260
  case he.KEYVAL:
4246
- this.sm = new Mr(i);
4261
+ this.sm = new jr(i);
4247
4262
  break;
4248
4263
  case he.WINDOW:
4249
4264
  this.sm = new Nr(i);
@@ -4251,17 +4266,17 @@ class Yi {
4251
4266
  }
4252
4267
  }
4253
4268
  }
4254
- class Mi {
4269
+ class ji {
4255
4270
  constructor(i) {
4256
- P(this, "sm");
4271
+ D(this, "sm");
4257
4272
  /**
4258
4273
  * Retieve Cloud Data
4259
4274
  * @param query Widgets parameters, type "cloud"
4260
4275
  * @returns IResponse
4261
4276
  */
4262
- P(this, "getCloud", async (i) => {
4263
- var c;
4264
- return i.type !== M.CLOUD ? (console.warn(
4277
+ D(this, "getCloud", async (i) => {
4278
+ var u;
4279
+ return i.type !== j.CLOUD ? (console.warn(
4265
4280
  "%capp%c %get",
4266
4281
  x.APP,
4267
4282
  x.NONE,
@@ -4273,16 +4288,16 @@ class Mi {
4273
4288
  data: null,
4274
4289
  message: `'wrong method call for getMessages, type used is ${i.type}`,
4275
4290
  success: !1
4276
- }) : await ((c = this.sm) == null ? void 0 : c.getCloud(i));
4291
+ }) : await ((u = this.sm) == null ? void 0 : u.getCloud(i));
4277
4292
  });
4278
4293
  /**
4279
4294
  * Retieve Message Data
4280
4295
  * @param query Widgets parameters, type "messages"
4281
4296
  * @returns IResponse
4282
4297
  */
4283
- P(this, "getMessages", async (i) => {
4284
- var c;
4285
- return i.type !== M.MESSAGES ? (console.warn(
4298
+ D(this, "getMessages", async (i) => {
4299
+ var u;
4300
+ return i.type !== j.MESSAGES ? (console.warn(
4286
4301
  "%capp%c %get",
4287
4302
  x.APP,
4288
4303
  x.NONE,
@@ -4294,16 +4309,16 @@ class Mi {
4294
4309
  data: null,
4295
4310
  message: `'wrong method call for getMessages, type used is ${i.type}`,
4296
4311
  success: !1
4297
- }) : await ((c = this.sm) == null ? void 0 : c.getMessages(i));
4312
+ }) : await ((u = this.sm) == null ? void 0 : u.getMessages(i));
4298
4313
  });
4299
4314
  /**
4300
4315
  * Retrieve Series Data
4301
4316
  * @param query Widgets parameters, type "series"
4302
4317
  * @returns IResponse
4303
4318
  */
4304
- P(this, "getSeries", async (i) => {
4305
- var c;
4306
- return i.type !== M.SERIES ? (console.warn(
4319
+ D(this, "getSeries", async (i) => {
4320
+ var u;
4321
+ return i.type !== j.SERIES ? (console.warn(
4307
4322
  "%capp%c %get",
4308
4323
  x.APP,
4309
4324
  x.NONE,
@@ -4315,7 +4330,7 @@ class Mi {
4315
4330
  data: null,
4316
4331
  message: `'wrong method call for getSeries, type used is ${i.type}`,
4317
4332
  success: !1
4318
- }) : await ((c = this.sm) == null ? void 0 : c.getSeries(i));
4333
+ }) : await ((u = this.sm) == null ? void 0 : u.getSeries(i));
4319
4334
  });
4320
4335
  switch (this.sm = null, i.storage) {
4321
4336
  case he.DEXIE:
@@ -4328,7 +4343,7 @@ class Mi {
4328
4343
  this.sm = new Kr(i);
4329
4344
  break;
4330
4345
  case he.KEYVAL:
4331
- this.sm = new Mr(i);
4346
+ this.sm = new jr(i);
4332
4347
  break;
4333
4348
  case he.WINDOW:
4334
4349
  this.sm = new Nr(i);
@@ -4344,24 +4359,24 @@ class Hi {
4344
4359
  * @param callbacks functions in the widget that will receive the update
4345
4360
  * @param selector container for the element - by default buzzcasting-slide (optional)
4346
4361
  */
4347
- constructor(i, c, h) {
4348
- P(this, "storageReader");
4349
- P(this, "broadcastChannel");
4350
- P(this, "element");
4351
- P(this, "query");
4352
- P(this, "listeners");
4362
+ constructor(i, u, h) {
4363
+ D(this, "storageReader");
4364
+ D(this, "broadcastChannel");
4365
+ D(this, "element");
4366
+ D(this, "query");
4367
+ D(this, "listeners");
4353
4368
  /**
4354
4369
  * Generic call to any query type
4355
4370
  *
4356
4371
  * @returns IResponse
4357
4372
  */
4358
- P(this, "getData", async () => {
4373
+ D(this, "getData", async () => {
4359
4374
  switch (this.query.type) {
4360
- case M.CLOUD:
4375
+ case j.CLOUD:
4361
4376
  return await this.getCloud();
4362
- case M.MESSAGES:
4377
+ case j.MESSAGES:
4363
4378
  return await this.getMessages();
4364
- case M.SERIES:
4379
+ case j.SERIES:
4365
4380
  return await this.getSeries();
4366
4381
  }
4367
4382
  return {
@@ -4375,7 +4390,7 @@ class Hi {
4375
4390
  *
4376
4391
  * @returns IResponse
4377
4392
  */
4378
- P(this, "getCloud", async () => this.query.type !== M.CLOUD ? (console.warn(
4393
+ D(this, "getCloud", async () => this.query.type !== j.CLOUD ? (console.warn(
4379
4394
  "%cstorage%c %cwidget",
4380
4395
  x.STORAGE,
4381
4396
  x.NONE,
@@ -4393,7 +4408,7 @@ class Hi {
4393
4408
  *
4394
4409
  * @returns IResponse
4395
4410
  */
4396
- P(this, "getMessages", async () => this.query.type !== M.MESSAGES ? (console.warn(
4411
+ D(this, "getMessages", async () => this.query.type !== j.MESSAGES ? (console.warn(
4397
4412
  "%cstorage%c %cwidget",
4398
4413
  x.STORAGE,
4399
4414
  x.NONE,
@@ -4411,7 +4426,7 @@ class Hi {
4411
4426
  *
4412
4427
  * @returns IResponse
4413
4428
  */
4414
- P(this, "getSeries", async () => this.query.type !== M.SERIES ? (console.warn(
4429
+ D(this, "getSeries", async () => this.query.type !== j.SERIES ? (console.warn(
4415
4430
  "%cstorage%c %cwidget",
4416
4431
  x.STORAGE,
4417
4432
  x.NONE,
@@ -4430,22 +4445,22 @@ class Hi {
4430
4445
  *
4431
4446
  * @param modal IModal
4432
4447
  */
4433
- P(this, "showModal", (i) => {
4434
- const c = Ci(this.element.attributes);
4435
- if (Object.prototype.hasOwnProperty.call(c, "data-topics")) {
4436
- const R = c["data-topics"].split("-");
4437
- R.length > 1 ? (c["data-widget"] = R[1], c["data-dashboard"] = R[0]) : (c["data-widget"] = R[0], c["data-dashboard"] = this.query.slide);
4448
+ D(this, "showModal", (i) => {
4449
+ const u = Ci(this.element.attributes);
4450
+ if (Object.prototype.hasOwnProperty.call(u, "data-topics")) {
4451
+ const R = u["data-topics"].split("-");
4452
+ R.length > 1 ? (u["data-widget"] = R[1], u["data-dashboard"] = R[0]) : (u["data-widget"] = R[0], u["data-dashboard"] = this.query.slide);
4438
4453
  }
4439
- const h = { ...i.props, ...c };
4454
+ const h = { ...i.props, ...u };
4440
4455
  console.debug(
4441
4456
  "%cwidget",
4442
4457
  x.WIDGET,
4443
4458
  se.SHOW_MODAL,
4444
4459
  i.showComponent,
4445
4460
  // @ts-expect-error cannot get string type out of IFilteredAttributes props
4446
- c["data-widget"]
4461
+ u["data-widget"]
4447
4462
  );
4448
- const D = new CustomEvent(se.SHOW_MODAL, {
4463
+ const P = new CustomEvent(se.SHOW_MODAL, {
4449
4464
  detail: {
4450
4465
  component: i.showComponent,
4451
4466
  props: h,
@@ -4455,14 +4470,14 @@ class Hi {
4455
4470
  cancelable: !0,
4456
4471
  composed: !0
4457
4472
  });
4458
- window.dispatchEvent(D);
4473
+ window.dispatchEvent(P);
4459
4474
  });
4460
4475
  var K;
4461
- this.element = i, this.listeners = c, h = typeof h < "u" ? h : "buzzcasting-slide";
4462
- let D;
4463
- D = { ...i.dataset }, delete D.hmr, D.slide = ((K = i.closest(h.toUpperCase())) == null ? void 0 : K.id) ?? `${h} not found`, D = nt(D), this.query = D, ji(i);
4476
+ this.element = i, this.listeners = u, h = typeof h < "u" ? h : "buzzcasting-slide";
4477
+ let P;
4478
+ P = { ...i.dataset }, delete P.hmr, P.slide = ((K = i.closest(h.toUpperCase())) == null ? void 0 : K.id) ?? `${h} not found`, P = nt(P), this.query = P, Mi(i);
4464
4479
  const R = window.BuzzCasting.getOptions();
4465
- this.storageReader = new Mi(R), this.broadcastChannel = new BroadcastChannel(D.slide), this.startListener();
4480
+ this.storageReader = new ji(R), this.broadcastChannel = new BroadcastChannel(P.slide), this.startListener();
4466
4481
  }
4467
4482
  addListener(i) {
4468
4483
  this.listeners.push(i);
@@ -4472,12 +4487,12 @@ class Hi {
4472
4487
  */
4473
4488
  startListener() {
4474
4489
  const i = this.query;
4475
- this.broadcastChannel.onmessage = async (c) => {
4476
- const h = c.data.data;
4477
- switch (c.data.event) {
4490
+ this.broadcastChannel.onmessage = async (u) => {
4491
+ const h = u.data.data;
4492
+ switch (u.data.event) {
4478
4493
  case se.WIDGET_UPDATE:
4479
- h.query.slide === i.slide && h.query.widget === i.widget && this.listeners.forEach((D) => {
4480
- D(c.data.data);
4494
+ h.query.slide === i.slide && h.query.widget === i.widget && this.listeners.forEach((P) => {
4495
+ P(u.data.data);
4481
4496
  });
4482
4497
  break;
4483
4498
  case se.SLIDE_READY:
@@ -4508,22 +4523,22 @@ class Hi {
4508
4523
  }
4509
4524
  }
4510
4525
  export {
4511
- M as API,
4526
+ j as API,
4512
4527
  Yi as BuzzcastingStorageManager,
4513
- Mi as BuzzcastingStorageReader,
4528
+ ji as BuzzcastingStorageReader,
4514
4529
  x as CSS,
4515
4530
  se as EVENTS,
4516
4531
  Vt as MODERATION,
4517
4532
  he as STORAGE,
4518
4533
  Hi as Widget,
4519
- Ui as anonymize,
4534
+ $i as anonymize,
4520
4535
  Ci as attrs,
4521
4536
  Ni as brandLogo,
4522
4537
  Gi as camelCase,
4523
4538
  Li as camelize,
4524
- ji as clearContents,
4539
+ Mi as clearContents,
4525
4540
  Bi as filterAttributes,
4526
- $i as formatContent,
4541
+ Ui as formatContent,
4527
4542
  zi as intToString,
4528
4543
  Wi as numberFormatter,
4529
4544
  Fi as shuffleMessages,