buzzcasting-storage 3.21.4 → 3.21.5

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.
@@ -5,10 +5,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
5
5
  enumerable: !(s = n(i, d)) || s.enumerable
6
6
  });
7
7
  return e;
8
- }, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
8
+ }, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
9
9
  value: n,
10
10
  enumerable: !0
11
- }) : a, n)), l = function(e) {
11
+ }) : o, n)), l = function(e) {
12
12
  return e.CARDS = "cards", e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TEMPLATES = "templates", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e;
13
13
  }({}), u = function(e) {
14
14
  return e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e;
@@ -76,44 +76,8 @@ var S = (e) => {
76
76
  return t;
77
77
  };
78
78
  S("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"), S("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"), S("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), S("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), S("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), S("script,style");
79
- function C(e) {
80
- return `"${e}"`;
81
- }
82
- var ee = (e) => {
83
- let t = [
84
- "area",
85
- "base",
86
- "basefont",
87
- "br",
88
- "col",
89
- "frame",
90
- "hr",
91
- "img",
92
- "input",
93
- "isindex",
94
- "link",
95
- "meta",
96
- "param",
97
- "embed"
98
- ], n = "";
99
- e.child && (n = e.child.map(function(e) {
100
- return ee(e);
101
- }).join(""));
102
- let r = "";
103
- if (e.attr && (r = Object.keys(e.attr).map(function(t) {
104
- let n = e.attr[t];
105
- return Array.isArray(n) && (n = n.join(" ")), `${t}=${C(n)}`;
106
- }).join(" "), r !== "" && (r = ` ${r}`)), e.node === "element") {
107
- let i = e.tag;
108
- if (t.indexOf(i) > -1) return `<${e.tag}${r}/>`;
109
- let a = `<${e.tag}${r}>`, o = `</${e.tag}>`;
110
- return `${a}${n}${o}`;
111
- }
112
- if (e.node === "text") return e.text;
113
- if (e.node === "comment") return `<!-- ${e.text} -->`;
114
- if (e.node === "root") return n;
115
- }, w = new BroadcastChannel("logging"), T = async (e = 0, t) => {
116
- w.postMessage({
79
+ var C = new BroadcastChannel("logging"), w = async (e = 0, t) => {
80
+ C.postMessage({
117
81
  action: "log",
118
82
  level: e,
119
83
  message: t
@@ -153,7 +117,7 @@ var ee = (e) => {
153
117
  return t.length < 64 ? "0000000000000000000000000000000000000000000000000000000000000000".substring(0, 64 - t.length) + t : t;
154
118
  }
155
119
  });
156
- var E = (e) => {
120
+ var T = (e) => {
157
121
  switch (e?.type) {
158
122
  case l.MESSAGES: return u.MESSAGES;
159
123
  case l.SERIES: return u.SERIES;
@@ -161,18 +125,18 @@ var E = (e) => {
161
125
  default: return u.NO_UPDATES;
162
126
  }
163
127
  };
164
- function D(e) {
128
+ function E(e) {
165
129
  let t = `${e.type}.${e.topics}`;
166
130
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
167
131
  }
168
- function te(e) {
132
+ function ee(e) {
169
133
  if (e.widget === void 0) {
170
134
  let t = e.topics?.split("-");
171
135
  t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
172
136
  }
173
137
  return e;
174
138
  }
175
- function ne(e, t) {
139
+ function D(e, t) {
176
140
  let n, r, i, a, o;
177
141
  switch (e.moderation) {
178
142
  case f.BEFORE:
@@ -195,7 +159,7 @@ function ne(e, t) {
195
159
  }({});
196
160
  //#endregion
197
161
  //#region package.json
198
- var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
162
+ var te = "3.21.4", ne = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
199
163
  (function(n, r) {
200
164
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.readNDJSONStream = r());
201
165
  })(e, (function() {
@@ -211,7 +175,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
211
175
  }
212
176
  return e;
213
177
  }));
214
- })))(), 1), ae = class {
178
+ })))(), 1), re = class {
215
179
  options;
216
180
  url;
217
181
  constructor(e) {
@@ -247,11 +211,9 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
247
211
  case l.SERIES:
248
212
  a = u.SERIES;
249
213
  break;
250
- case l.CLOUD:
251
- a = u.CLOUD;
252
- break;
214
+ case l.CLOUD: a = u.CLOUD;
253
215
  }
254
- return T(3, [
216
+ return w(3, [
255
217
  `%cfetch%c %capi%c %c${e.type}`,
256
218
  u.OK,
257
219
  u.NONE,
@@ -289,11 +251,11 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
289
251
  body: JSON.stringify({ data: e }),
290
252
  method: "post"
291
253
  });
292
- for await (let e of (0, ie.default)(r.body)) console.log("Received", e);
254
+ for await (let e of (0, ne.default)(r.body)) console.log("Received", e);
293
255
  }
294
256
  async hideMessage(e) {
295
257
  let { version: t } = this.options, n = this.headers();
296
- return T(3, [
258
+ return w(3, [
297
259
  "%capi%c %cput",
298
260
  u.API,
299
261
  u.NONE,
@@ -343,7 +305,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
343
305
  }
344
306
  async loadSlide(e) {
345
307
  let { version: t } = this.options, n = this.headers(), r = Object.assign({}, e);
346
- return delete r.type, delete r.hash, T(3, [
308
+ return delete r.type, delete r.hash, w(3, [
347
309
  "%cload%c %capi%c %cslide",
348
310
  u.OK,
349
311
  u.NONE,
@@ -378,7 +340,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
378
340
  let { version: t } = this.options, n = this.formHeaders();
379
341
  delete e.update, delete e.type;
380
342
  let r = JSON.stringify(e);
381
- return T(3, [
343
+ return w(3, [
382
344
  "%cput%c %capi%c %cslide",
383
345
  u.OK,
384
346
  u.NONE,
@@ -408,7 +370,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
408
370
  }
409
371
  async loadPresentation(e) {
410
372
  let { version: t } = this.options, n = this.headers();
411
- return delete e.update, T(3, [
373
+ return delete e.update, w(3, [
412
374
  "%cload%c %capi%c %cpresentation",
413
375
  u.OK,
414
376
  u.NONE,
@@ -441,7 +403,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
441
403
  let { version: t } = this.options, n = this.formHeaders();
442
404
  delete e.update;
443
405
  let r = JSON.stringify(e);
444
- return T(2, [
406
+ return w(2, [
445
407
  "%capi%c %cput",
446
408
  u.API,
447
409
  u.NONE,
@@ -468,7 +430,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
468
430
  }
469
431
  async loadPreference(e) {
470
432
  let { version: t } = this.options, n = this.headers();
471
- return T(3, [
433
+ return w(3, [
472
434
  "%cload%c %capi%c %cpreference",
473
435
  u.OK,
474
436
  u.NONE,
@@ -498,7 +460,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
498
460
  let { version: t } = this.options, n = this.formHeaders();
499
461
  delete e.update;
500
462
  let r = JSON.stringify({ data: e });
501
- return T(3, [
463
+ return w(3, [
502
464
  "%capi%c %cstorePreference",
503
465
  u.API,
504
466
  u.NONE,
@@ -525,7 +487,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
525
487
  }
526
488
  async loadDashboards(e) {
527
489
  let { version: t } = this.options, n = this.headers();
528
- return T(3, [
490
+ return w(3, [
529
491
  "%capi%c %cdashboards",
530
492
  u.API,
531
493
  u.NONE,
@@ -554,7 +516,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
554
516
  }
555
517
  async loadImages(e) {
556
518
  let { version: t } = this.options, n = this.headers();
557
- return T(3, [
519
+ return w(3, [
558
520
  "%cload%c %capi%c %cimage",
559
521
  u.OK,
560
522
  u.NONE,
@@ -622,7 +584,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
622
584
  data: []
623
585
  }));
624
586
  }
625
- }, O = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
587
+ }, ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
626
588
  ((n, r) => {
627
589
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).Dexie = r();
628
590
  })(e, function() {
@@ -702,12 +664,14 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
702
664
  return s === -1 || (o = e[t.substr(0, s)]) == null ? void 0 : b(o, t.substr(s + 1));
703
665
  }
704
666
  function x(e, t, n) {
705
- if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof t != "string" && "length" in t) {
706
- v(typeof n != "string" && "length" in n);
707
- for (var r = 0, i = t.length; r < i; ++r) x(e, t[r], n[r]);
708
- } else {
709
- var o, s, c = t.indexOf(".");
710
- c === -1 ? n === void 0 ? a(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n : (o = t.substr(0, c), (c = t.substr(c + 1)) === "" ? n === void 0 ? a(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : x(s = (s = e[o]) && l(e, o) ? s : e[o] = {}, c, n));
667
+ if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) {
668
+ if (typeof t != "string" && "length" in t) {
669
+ v(typeof n != "string" && "length" in n);
670
+ for (var r = 0, i = t.length; r < i; ++r) x(e, t[r], n[r]);
671
+ } else {
672
+ var o, s, c = t.indexOf(".");
673
+ c === -1 ? n === void 0 ? a(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n : (o = t.substr(0, c), (c = t.substr(c + 1)) === "" ? n === void 0 ? a(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : x(s = (s = e[o]) && l(e, o) ? s : e[o] = {}, c, n));
674
+ }
711
675
  }
712
676
  }
713
677
  function S(e) {
@@ -716,10 +680,10 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
716
680
  return n;
717
681
  }
718
682
  var C = [].concat;
719
- function ee(e) {
683
+ function w(e) {
720
684
  return C.apply([], e);
721
685
  }
722
- var w = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ee([
686
+ var T = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(w([
723
687
  8,
724
688
  16,
725
689
  32,
@@ -734,24 +698,24 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
734
698
  });
735
699
  }))).filter(function(e) {
736
700
  return r[e];
737
- }), T = new Set(w.map(function(e) {
701
+ }), E = new Set(T.map(function(e) {
738
702
  return r[e];
739
- })), E = null;
703
+ })), ee = null;
740
704
  function D(e) {
741
- return E = /* @__PURE__ */ new WeakMap(), e = function e(t) {
705
+ return ee = /* @__PURE__ */ new WeakMap(), e = function e(t) {
742
706
  if (!t || typeof t != "object") return t;
743
- var n = E.get(t);
707
+ var n = ee.get(t);
744
708
  if (n) return n;
745
709
  if (a(t)) {
746
- n = [], E.set(t, n);
710
+ n = [], ee.set(t, n);
747
711
  for (var r = 0, i = t.length; r < i; ++r) n.push(e(t[r]));
748
- } else if (T.has(t.constructor)) n = t;
712
+ } else if (E.has(t.constructor)) n = t;
749
713
  else {
750
714
  var o, c = s(t);
751
- for (o in n = c === Object.prototype ? {} : Object.create(c), E.set(t, n), t) l(t, o) && (n[o] = e(t[o]));
715
+ for (o in n = c === Object.prototype ? {} : Object.create(c), ee.set(t, n), t) l(t, o) && (n[o] = e(t[o]));
752
716
  }
753
717
  return n;
754
- }(e), E = null, e;
718
+ }(e), ee = null, e;
755
719
  }
756
720
  var te = {}.toString;
757
721
  function ne(e) {
@@ -763,15 +727,15 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
763
727
  } : function() {
764
728
  return null;
765
729
  };
766
- function ae(e, t) {
730
+ function O(e, t) {
767
731
  t = e.indexOf(t), 0 <= t && e.splice(t, 1);
768
732
  }
769
- var O = {};
770
- function k(e) {
733
+ var k = {};
734
+ function A(e) {
771
735
  var t, n, r, i;
772
736
  if (arguments.length === 1) {
773
737
  if (a(e)) return e.slice();
774
- if (this === O && typeof e == "string") return [e];
738
+ if (this === k && typeof e == "string") return [e];
775
739
  if (i = ie(e)) for (n = []; !(r = i.next()).done;) n.push(r.value);
776
740
  else {
777
741
  if (e == null || typeof (t = e.length) != "number") return [e];
@@ -780,11 +744,11 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
780
744
  } else for (t = arguments.length, n = Array(t); t--;) n[t] = arguments[t];
781
745
  return n;
782
746
  }
783
- var A = typeof Symbol < "u" ? function(e) {
747
+ var ae = typeof Symbol < "u" ? function(e) {
784
748
  return e[Symbol.toStringTag] === "AsyncFunction";
785
749
  } : function() {
786
750
  return !1;
787
- }, w = [
751
+ }, T = [
788
752
  "Unknown",
789
753
  "Constraint",
790
754
  "Data",
@@ -816,7 +780,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
816
780
  "DatabaseClosed",
817
781
  "PrematureCommit",
818
782
  "ForeignAwait"
819
- ].concat(w), oe = {
783
+ ].concat(T), oe = {
820
784
  VersionChanged: "Database version changed by other database connection",
821
785
  DatabaseClosed: "Database has been closed",
822
786
  Abort: "Transaction aborted",
@@ -852,10 +816,10 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
852
816
  this.name = n, e ? typeof e == "string" ? (this.message = `${e}${r ? "\n " + r : ""}`, this.inner = r || null) : typeof e == "object" && (this.message = `${e.name} ${e.message}`, this.inner = e) : (this.message = oe[t] || n, this.inner = null);
853
817
  }
854
818
  return p(r).from(fe), e[t] = r, e;
855
- }, {}), pe = (M.Syntax = SyntaxError, M.Type = TypeError, M.Range = RangeError, w.reduce(function(e, t) {
819
+ }, {}), pe = (M.Syntax = SyntaxError, M.Type = TypeError, M.Range = RangeError, T.reduce(function(e, t) {
856
820
  return e[t + "Error"] = M[t], e;
857
821
  }, {}));
858
- w = j.reduce(function(e, t) {
822
+ T = j.reduce(function(e, t) {
859
823
  return [
860
824
  "Syntax",
861
825
  "Type",
@@ -876,26 +840,26 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
876
840
  e.apply(this, arguments), t.apply(this, arguments);
877
841
  };
878
842
  }
879
- function ge(e, t) {
843
+ function F(e, t) {
880
844
  return e === N ? t : function() {
881
845
  var n = e.apply(this, arguments), r = (n !== void 0 && (arguments[0] = n), this.onsuccess), i = this.onerror, a = (this.onsuccess = null, this.onerror = null, t.apply(this, arguments));
882
846
  return r && (this.onsuccess = this.onsuccess ? P(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? P(i, this.onerror) : i), a === void 0 ? n : a;
883
847
  };
884
848
  }
885
- function _e(e, t) {
849
+ function I(e, t) {
886
850
  return e === N ? t : function() {
887
851
  e.apply(this, arguments);
888
852
  var n = this.onsuccess, r = this.onerror;
889
853
  this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? P(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? P(r, this.onerror) : r);
890
854
  };
891
855
  }
892
- function F(e, t) {
856
+ function ge(e, t) {
893
857
  return e === N ? t : function(n) {
894
858
  var r = e.apply(this, arguments), n = (o(n, r), this.onsuccess), i = this.onerror, a = (this.onsuccess = null, this.onerror = null, t.apply(this, arguments));
895
859
  return n && (this.onsuccess = this.onsuccess ? P(n, this.onsuccess) : n), i && (this.onerror = this.onerror ? P(i, this.onerror) : i), r === void 0 ? a === void 0 ? void 0 : a : o(r, a);
896
860
  };
897
861
  }
898
- function I(e, t) {
862
+ function _e(e, t) {
899
863
  return e === N ? t : function() {
900
864
  return !1 !== t.apply(this, arguments) && e.apply(this, arguments);
901
865
  };
@@ -912,7 +876,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
912
876
  return t.apply(this, arguments);
913
877
  };
914
878
  }
915
- w.ModifyError = le, w.DexieError = se, w.BulkError = ue;
879
+ T.ModifyError = le, T.DexieError = se, T.BulkError = ue;
916
880
  var L = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
917
881
  function ye(e) {
918
882
  L = e;
@@ -1090,7 +1054,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1090
1054
  },
1091
1055
  timeout: function(e, t) {
1092
1056
  var n = this;
1093
- return e < Infinity ? new z(function(r, i) {
1057
+ return e < 1 / 0 ? new z(function(r, i) {
1094
1058
  var a = setTimeout(function() {
1095
1059
  return i(new M.Timeout(t));
1096
1060
  }, e);
@@ -1099,7 +1063,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1099
1063
  }
1100
1064
  }), typeof Symbol < "u" && Symbol.toStringTag && f(z.prototype, Symbol.toStringTag, "Dexie.Promise"), Me.env = it(), u(z, {
1101
1065
  all: function() {
1102
- var e = k.apply(null, arguments).map(tt);
1066
+ var e = A.apply(null, arguments).map(tt);
1103
1067
  return new z(function(t, n) {
1104
1068
  e.length === 0 && t([]);
1105
1069
  var r = e.length;
@@ -1117,7 +1081,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1117
1081
  },
1118
1082
  reject: Ke,
1119
1083
  race: function() {
1120
- var e = k.apply(null, arguments).map(tt);
1084
+ var e = A.apply(null, arguments).map(tt);
1121
1085
  return new z(function(t, n) {
1122
1086
  e.map(function(e) {
1123
1087
  return z.resolve(e).then(t, n);
@@ -1171,7 +1135,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1171
1135
  });
1172
1136
  }
1173
1137
  }), we && (we.allSettled && f(z, "allSettled", function() {
1174
- var e = k.apply(null, arguments).map(tt);
1138
+ var e = A.apply(null, arguments).map(tt);
1175
1139
  return new z(function(t) {
1176
1140
  e.length === 0 && t([]);
1177
1141
  var n = e.length, r = Array(n);
@@ -1192,7 +1156,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1192
1156
  });
1193
1157
  });
1194
1158
  }), we.any && typeof AggregateError < "u" && f(z, "any", function() {
1195
- var e = k.apply(null, arguments).map(tt);
1159
+ var e = A.apply(null, arguments).map(tt);
1196
1160
  return new z(function(t, n) {
1197
1161
  e.length === 0 && n(/* @__PURE__ */ AggregateError([]));
1198
1162
  var r = e.length, i = Array(r);
@@ -1296,7 +1260,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1296
1260
  }
1297
1261
  var ht = {
1298
1262
  type: 3,
1299
- lower: -Infinity,
1263
+ lower: -1 / 0,
1300
1264
  lowerOpen: !1,
1301
1265
  upper: [[]],
1302
1266
  upperOpen: !1
@@ -1748,7 +1712,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1748
1712
  return t;
1749
1713
  function s(e, r, o) {
1750
1714
  var c, l;
1751
- if (typeof e != "object") return r ||= I, l = {
1715
+ if (typeof e != "object") return r ||= _e, l = {
1752
1716
  subscribers: [],
1753
1717
  fire: o ||= N,
1754
1718
  subscribe: function(e) {
@@ -2081,7 +2045,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2081
2045
  });
2082
2046
  });
2083
2047
  }
2084
- var c = Dt(n) && n.limit === Infinity && (typeof e != "function" || h) && {
2048
+ var c = Dt(n) && n.limit === 1 / 0 && (typeof e != "function" || h) && {
2085
2049
  index: n.index,
2086
2050
  range: n.range
2087
2051
  };
@@ -2255,19 +2219,19 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2255
2219
  return e === t[0];
2256
2220
  }, [e], "");
2257
2221
  }, J.prototype.anyOfIgnoreCase = function() {
2258
- var e = k.apply(O, arguments);
2222
+ var e = A.apply(k, arguments);
2259
2223
  return e.length === 0 ? Rt(this) : zt(this, function(e, t) {
2260
2224
  return t.indexOf(e) !== -1;
2261
2225
  }, e, "");
2262
2226
  }, J.prototype.startsWithAnyOfIgnoreCase = function() {
2263
- var e = k.apply(O, arguments);
2227
+ var e = A.apply(k, arguments);
2264
2228
  return e.length === 0 ? Rt(this) : zt(this, function(e, t) {
2265
2229
  return t.some(function(t) {
2266
2230
  return e.indexOf(t) === 0;
2267
2231
  });
2268
2232
  }, e, ct);
2269
2233
  }, J.prototype.anyOf = function() {
2270
- var e, t, n = this, r = k.apply(O, arguments), i = this._cmp;
2234
+ var e, t, n = this, r = A.apply(k, arguments), i = this._cmp;
2271
2235
  try {
2272
2236
  r.sort(i);
2273
2237
  } catch {
@@ -2284,12 +2248,12 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2284
2248
  }), !1);
2285
2249
  }), e);
2286
2250
  }, J.prototype.notEqual = function(e) {
2287
- return this.inAnyRange([[-Infinity, e], [e, this.db._maxKey]], {
2251
+ return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], {
2288
2252
  includeLowers: !1,
2289
2253
  includeUppers: !1
2290
2254
  });
2291
2255
  }, J.prototype.noneOf = function() {
2292
- var e = k.apply(O, arguments);
2256
+ var e = A.apply(k, arguments);
2293
2257
  if (e.length === 0) return new this.Collection(this);
2294
2258
  try {
2295
2259
  e.sort(this._ascending);
@@ -2297,7 +2261,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2297
2261
  return q(this, U);
2298
2262
  }
2299
2263
  var t = e.reduce(function(e, t) {
2300
- return e ? e.concat([[e[e.length - 1][1], t]]) : [[-Infinity, t]];
2264
+ return e ? e.concat([[e[e.length - 1][1], t]]) : [[-1 / 0, t]];
2301
2265
  }, null);
2302
2266
  return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, {
2303
2267
  includeLowers: !1,
@@ -2347,7 +2311,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2347
2311
  }), !1);
2348
2312
  }), t;
2349
2313
  }, J.prototype.startsWithAnyOf = function() {
2350
- var e = k.apply(O, arguments);
2314
+ var e = A.apply(k, arguments);
2351
2315
  return e.every(function(e) {
2352
2316
  return typeof e == "string";
2353
2317
  }) ? e.length === 0 ? Rt(this) : this.inAnyRange(e.map(function(e) {
@@ -2421,7 +2385,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2421
2385
  return r;
2422
2386
  }) : (n._waitingFor = r, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function e() {
2423
2387
  for (++n._spinCount; n._waitingQueue.length;) n._waitingQueue.shift()();
2424
- n._waitingFor && (t.get(-Infinity).onsuccess = e);
2388
+ n._waitingFor && (t.get(-1 / 0).onsuccess = e);
2425
2389
  }()), n._waitingFor);
2426
2390
  return new z(function(e, t) {
2427
2391
  r.then(function(t) {
@@ -2582,7 +2546,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2582
2546
  query: (t = c, function(e) {
2583
2547
  return new Promise(function(i, a) {
2584
2548
  i = B(i);
2585
- var o, s, c, l = e.trans, u = e.values, d = e.limit, f = e.query, p = d === Infinity ? void 0 : d, m = f.index, f = f.range, l = l.objectStore(n), l = m.isPrimaryKey ? l : l.index(m.name), m = r(f);
2549
+ var o, s, c, l = e.trans, u = e.values, d = e.limit, f = e.query, p = d === 1 / 0 ? void 0 : d, m = f.index, f = f.range, l = l.objectStore(n), l = m.isPrimaryKey ? l : l.index(m.name), m = r(f);
2586
2550
  if (d === 0) return i({ result: [] });
2587
2551
  t ? ((f = u ? l.getAll(m, p) : l.getAllKeys(m, p)).onsuccess = function(e) {
2588
2552
  return i({ result: e.target.result });
@@ -2694,7 +2658,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2694
2658
  if (l[e]) return l[e];
2695
2659
  throw Error(`Table '${e}' not found`);
2696
2660
  },
2697
- MIN_KEY: -Infinity,
2661
+ MIN_KEY: -1 / 0,
2698
2662
  MAX_KEY: Zt(t),
2699
2663
  schema: s
2700
2664
  };
@@ -2770,7 +2734,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2770
2734
  }), e._cfg.contentUpgrade);
2771
2735
  if (p && e._cfg.version > a) return an(r, c), s._memoizedTables = {}, t = S(d), f.del.forEach(function(e) {
2772
2736
  t[e] = l[e];
2773
- }), sn(r, [r.Transaction.prototype]), on(r, [r.Transaction.prototype], i(t), t), s.schema = t, (n = A(p)) && $e(), d = z.follow(function() {
2737
+ }), sn(r, [r.Transaction.prototype]), on(r, [r.Transaction.prototype], i(t), t), s.schema = t, (n = ae(p)) && $e(), d = z.follow(function() {
2774
2738
  var e;
2775
2739
  (o = p(s)) && n && (e = et.bind(null, null), o.then(e, e));
2776
2740
  }), o && typeof o.then == "function" ? z.resolve(o) : d.then(function() {
@@ -3041,7 +3005,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3041
3005
  return i(t).forEach(function(n) {
3042
3006
  e[n] ? Tn(e[n], t[n]) : e[n] = function e(t) {
3043
3007
  var n, r, i = {};
3044
- for (n in t) l(t, n) && (r = t[n], i[n] = !r || typeof r != "object" || T.has(r.constructor) ? r : e(r));
3008
+ for (n in t) l(t, n) && (r = t[n], i[n] = !r || typeof r != "object" || E.has(r.constructor) ? r : e(r));
3045
3009
  return i;
3046
3010
  }(t[n]);
3047
3011
  }), e;
@@ -3182,8 +3146,8 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3182
3146
  var t;
3183
3147
  return f && (t = {}, e.tables.forEach(function(n) {
3184
3148
  n.schema.indexes.forEach(function(r) {
3185
- r.name && (t[`idb://${e.name}/${n.name}/${r.name}`] = new Z(-Infinity, [[[]]]));
3186
- }), t[`idb://${e.name}/${n.name}/`] = t[`idb://${e.name}/${n.name}/:dels`] = new Z(-Infinity, [[[]]]);
3149
+ r.name && (t[`idb://${e.name}/${n.name}/${r.name}`] = new Z(-1 / 0, [[[]]]));
3150
+ }), t[`idb://${e.name}/${n.name}/`] = t[`idb://${e.name}/${n.name}/:dels`] = new Z(-1 / 0, [[[]]]);
3187
3151
  }), Kt(Wt).fire(t), In(t, !0)), e;
3188
3152
  });
3189
3153
  }
@@ -3361,7 +3325,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3361
3325
  return i.mutate(e);
3362
3326
  function f(e) {
3363
3327
  var r, o, s, f = R.trans, p = e.keys || Un(a, e);
3364
- if (p) return (e = e.type === "add" || e.type === "put" ? t(t({}, e), { keys: p }) : t({}, e)).type !== "delete" && (e.values = n([], e.values, !0)), e.keys &&= n([], e.keys, !0), r = i, s = p, ((o = e).type === "add" ? Promise.resolve([]) : r.getMany({
3328
+ if (p) return (e = e.type === "add" || e.type === "put" ? t(t({}, e), { keys: p }) : t({}, e)).type !== "delete" && (e.values = n([], e.values, !0)), e.keys && (e.keys = n([], e.keys, !0)), r = i, s = p, ((o = e).type === "add" ? Promise.resolve([]) : r.getMany({
3365
3329
  trans: o.trans,
3366
3330
  keys: s,
3367
3331
  cache: "immutable"
@@ -3608,7 +3572,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3608
3572
  return r;
3609
3573
  }, e)) === e) ? e : (r.sort(function(e, t) {
3610
3574
  return W(f(e), f(t)) || W(u(e), u(t));
3611
- }), t.limit && t.limit < Infinity && (r.length > t.limit ? r.length = t.limit : e.length === t.limit && r.length < t.limit && (i.dirty = !0)), o ? Object.freeze(r) : r);
3575
+ }), t.limit && t.limit < 1 / 0 && (r.length > t.limit ? r.length = t.limit : e.length === t.limit && r.length < t.limit && (i.dirty = !0)), o ? Object.freeze(r) : r);
3612
3576
  }
3613
3577
  function $n(e, t) {
3614
3578
  return W(e.lower, t.lower) === 0 && W(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
@@ -3638,7 +3602,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3638
3602
  e.subscribers.add(n), r.addEventListener("abort", function() {
3639
3603
  var r, i;
3640
3604
  e.subscribers.delete(n), e.subscribers.size === 0 && (r = e, i = t, setTimeout(function() {
3641
- r.subscribers.size === 0 && ae(i, r);
3605
+ r.subscribers.size === 0 && O(i, r);
3642
3606
  }, 3e3));
3643
3607
  });
3644
3608
  }
@@ -3660,16 +3624,16 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3660
3624
  var f = e.table(u), p = d.optimisticOps.filter(function(e) {
3661
3625
  return e.trans === s;
3662
3626
  });
3663
- if (s._explicit && i && s.mutatedParts) for (var m = 0, h = Object.values(d.queries.query); m < h.length; m++) for (var g = 0, _ = (b = h[m]).slice(); g < _.length; g++) jn((x = _[g]).obsSet, s.mutatedParts) && (ae(b, x), x.subscribers.forEach(function(e) {
3627
+ if (s._explicit && i && s.mutatedParts) for (var m = 0, h = Object.values(d.queries.query); m < h.length; m++) for (var g = 0, _ = (b = h[m]).slice(); g < _.length; g++) jn((x = _[g]).obsSet, s.mutatedParts) && (O(b, x), x.subscribers.forEach(function(e) {
3664
3628
  return o.add(e);
3665
3629
  }));
3666
3630
  else if (0 < p.length) {
3667
3631
  d.optimisticOps = d.optimisticOps.filter(function(e) {
3668
3632
  return e.trans !== s;
3669
3633
  });
3670
- for (var v = 0, y = Object.values(d.queries.query); v < y.length; v++) for (var b, x, S, C = 0, ee = (b = y[v]).slice(); C < ee.length; C++) (x = ee[C]).res != null && s.mutatedParts && (i && !x.dirty ? (S = Object.isFrozen(x.res), S = Qn(x.res, x.req, p, f, x, S), x.dirty ? (ae(b, x), x.subscribers.forEach(function(e) {
3634
+ for (var v = 0, y = Object.values(d.queries.query); v < y.length; v++) for (var b, x, S, C = 0, w = (b = y[v]).slice(); C < w.length; C++) (x = w[C]).res != null && s.mutatedParts && (i && !x.dirty ? (S = Object.isFrozen(x.res), S = Qn(x.res, x.req, p, f, x, S), x.dirty ? (O(b, x), x.subscribers.forEach(function(e) {
3671
3635
  return o.add(e);
3672
- })) : S !== x.res && (x.res = S, x.promise = z.resolve({ result: S }))) : (x.dirty && ae(b, x), x.subscribers.forEach(function(e) {
3636
+ })) : S !== x.res && (x.res = S, x.promise = z.resolve({ result: S }))) : (x.dirty && O(b, x), x.subscribers.forEach(function(e) {
3673
3637
  return o.add(e);
3674
3638
  })));
3675
3639
  }
@@ -3690,9 +3654,9 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3690
3654
  return !a.outbound && s.db._options.cache !== "disabled" && !s.explicit && s.idbtrans.mode === "readwrite" && (o = Mn[`idb://${n}/${r}`]) ? (s = i.mutate(e), e.type !== "add" && e.type !== "put" || !(50 <= e.values.length || Un(a, e).some(function(e) {
3691
3655
  return e == null;
3692
3656
  })) ? (o.optimisticOps.push(e), e.mutatedParts && Fn(e.mutatedParts), s.then(function(t) {
3693
- 0 < t.numFailures && (ae(o.optimisticOps, e), (t = Xn(0, e, t)) && o.optimisticOps.push(t), e.mutatedParts) && Fn(e.mutatedParts);
3657
+ 0 < t.numFailures && (O(o.optimisticOps, e), (t = Xn(0, e, t)) && o.optimisticOps.push(t), e.mutatedParts) && Fn(e.mutatedParts);
3694
3658
  }), s.catch(function() {
3695
- ae(o.optimisticOps, e), e.mutatedParts && Fn(e.mutatedParts);
3659
+ O(o.optimisticOps, e), e.mutatedParts && Fn(e.mutatedParts);
3696
3660
  })) : s.then(function(n) {
3697
3661
  var r = Xn(0, t(t({}, e), { values: e.values.map(function(e, r) {
3698
3662
  var i;
@@ -3733,7 +3697,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3733
3697
  a
3734
3698
  ] : [
3735
3699
  a.find(function(e) {
3736
- return ("limit" in e.req ? e.req.limit : Infinity) >= r.limit && (!r.values || e.req.values) && er(e.req.query.range, r.query.range);
3700
+ return ("limit" in e.req ? e.req.limit : 1 / 0) >= r.limit && (!r.values || e.req.values) && er(e.req.query.range, r.query.range);
3737
3701
  }),
3738
3702
  !1,
3739
3703
  i,
@@ -3756,7 +3720,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3756
3720
  } else e.result = D(n);
3757
3721
  return e;
3758
3722
  }).catch(function(e) {
3759
- return c && u && ae(c, u), Promise.reject(e);
3723
+ return c && u && O(c, u), Promise.reject(e);
3760
3724
  }), u = {
3761
3725
  obsSet: e.obsSet,
3762
3726
  promise: l,
@@ -3885,7 +3849,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3885
3849
  for (var i = Array(r - 1); --r;) i[r - 1] = arguments[r];
3886
3850
  return n = i.pop(), [
3887
3851
  e,
3888
- ee(i),
3852
+ w(i),
3889
3853
  n
3890
3854
  ];
3891
3855
  }.apply(this, arguments);
@@ -3933,7 +3897,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3933
3897
  return e(t, n, r, null, a);
3934
3898
  })) : H(i);
3935
3899
  }
3936
- var c, l = A(a), o = (l && $e(), z.follow(function() {
3900
+ var c, l = ae(a), o = (l && $e(), z.follow(function() {
3937
3901
  var e;
3938
3902
  (c = a.call(s, s)) && (l ? (e = et.bind(null, null), c.then(e, e)) : typeof c.next == "function" && typeof c.throw == "function" && (c = zn(c)));
3939
3903
  }, o));
@@ -4022,17 +3986,17 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4022
3986
  justLimit: !0,
4023
3987
  isMatch: null,
4024
3988
  offset: 0,
4025
- limit: Infinity,
3989
+ limit: 1 / 0,
4026
3990
  error: i,
4027
3991
  or: t.or,
4028
3992
  valueMapper: a === me ? null : a
4029
3993
  };
4030
3994
  })), this.Table = (i = this, Et(wt.prototype, function(e, t, n) {
4031
3995
  this.db = i, this._tx = n, this.name = e, this.schema = t, this.hook = i._allTables[e] ? i._allTables[e].hook : Tt(null, {
4032
- creating: [ge, N],
3996
+ creating: [F, N],
4033
3997
  reading: [he, me],
4034
- updating: [F, N],
4035
- deleting: [_e, N]
3998
+ updating: [ge, N],
3999
+ deleting: [I, N]
4036
4000
  });
4037
4001
  })), this.Transaction = (a = this, Et(qt.prototype, function(e, t, n, r, i) {
4038
4002
  var o = this;
@@ -4119,7 +4083,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4119
4083
  }
4120
4084
  function sr(e) {
4121
4085
  var t, n = !1, r = new ar(function(r) {
4122
- var i = A(e), a, o = !1, s = {}, c = {}, u = {
4086
+ var i = ae(e), a, o = !1, s = {}, c = {}, u = {
4123
4087
  get closed() {
4124
4088
  return o;
4125
4089
  },
@@ -4177,7 +4141,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4177
4141
  dr = t;
4178
4142
  }
4179
4143
  }
4180
- u(cr, t(t({}, w), {
4144
+ u(cr, t(t({}, T), {
4181
4145
  delete: function(e) {
4182
4146
  return new cr(e, { addons: [] }).delete();
4183
4147
  },
@@ -4264,7 +4228,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4264
4228
  getObjectDiff: Hn,
4265
4229
  cmp: W,
4266
4230
  asap: y,
4267
- minKey: -Infinity,
4231
+ minKey: -1 / 0,
4268
4232
  addons: [],
4269
4233
  connections: ut,
4270
4234
  errnames: de,
@@ -4294,7 +4258,7 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4294
4258
  for (var t = 0, n = ut; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
4295
4259
  }
4296
4260
  }), addEventListener("pageshow", function(e) {
4297
- !Q.disableBfCache && e.persisted && (L && console.debug("Dexie: handling persisted pageshow"), fr(), lr({ all: new Z(-Infinity, [[]]) }));
4261
+ !Q.disableBfCache && e.persisted && (L && console.debug("Dexie: handling persisted pageshow"), fr(), lr({ all: new Z(-1 / 0, [[]]) }));
4298
4262
  })), z.rejectionMapper = function(e, t) {
4299
4263
  return !e || e instanceof se || e instanceof TypeError || e instanceof SyntaxError || !e.name || !pe[e.name] ? e : (t = new pe[e.name](t || e.message, e), "stack" in e && f(t, "stack", { get: function() {
4300
4264
  return this.inner.stack;
@@ -4321,14 +4285,14 @@ var re = "3.21.3", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4321
4285
  }
4322
4286
  }), { default: Q }), Q;
4323
4287
  });
4324
- })))(), 1), k = Symbol.for("Dexie"), A = globalThis[k] || (globalThis[k] = O.default);
4325
- if (O.default.semVer !== A.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${O.default.semVer} and ${A.semVer}`);
4326
- var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, Entity: ue, PropModification: de, replacePrefix: fe, add: M, remove: pe, DexieYProvider: N } = A, me = class {
4288
+ })))(), 1), O = Symbol.for("Dexie"), k = globalThis[O] || (globalThis[O] = ie.default);
4289
+ if (ie.default.semVer !== k.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${ie.default.semVer} and ${k.semVer}`);
4290
+ var { liveQuery: A, mergeRanges: ae, rangesOverlap: j, RangeSet: oe, cmp: se, Entity: ce, PropModification: le, replacePrefix: ue, add: de, remove: fe, DexieYProvider: M } = k, pe = class {
4327
4291
  db;
4328
4292
  subscribers = [];
4329
4293
  options;
4330
4294
  constructor(e) {
4331
- this.options = e, this.db = new A(e.app), this.db.version(19).stores({
4295
+ this.options = e, this.db = new k(e.app), this.db.version(19).stores({
4332
4296
  channel: "id,slide_index",
4333
4297
  cloud: "id,dashboard_id",
4334
4298
  dashboard: "id,name,update",
@@ -4349,14 +4313,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4349
4313
  }
4350
4314
  getHash = async (e) => {
4351
4315
  let t = await this.db.table("hashtable").where({ id: e.widget }).last().catch(() => {
4352
- T(2, [
4316
+ w(2, [
4353
4317
  "%chash%c %capi%C %chash",
4354
4318
  u.API,
4355
4319
  u.NONE,
4356
4320
  u.APP
4357
4321
  ]);
4358
4322
  });
4359
- return T(3, [
4323
+ return w(3, [
4360
4324
  "%cget%c %chash%c %chash",
4361
4325
  u.OK,
4362
4326
  u.NONE,
@@ -4366,7 +4330,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4366
4330
  e
4367
4331
  ]), t?.hash ?? "none";
4368
4332
  };
4369
- setHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).modify({ hash: e.hash }).then(() => (T(3, [
4333
+ setHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).modify({ hash: e.hash }).then(() => (w(3, [
4370
4334
  "%cset%c %chash%c %chash}",
4371
4335
  u.OK,
4372
4336
  u.NONE,
@@ -4374,7 +4338,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4374
4338
  u.NONE,
4375
4339
  u.WIDGET,
4376
4340
  e
4377
- ]), 201)).catch((t) => (T(2, [
4341
+ ]), 201)).catch((t) => (w(2, [
4378
4342
  "%cget%c %chash%c %chash",
4379
4343
  u.OK,
4380
4344
  u.NONE,
@@ -4384,7 +4348,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4384
4348
  e,
4385
4349
  t.message
4386
4350
  ]), 400));
4387
- clearHash = async () => await this.db.table("hashtable").clear().then(() => 201).catch((e) => (T(2, [
4351
+ clearHash = async () => await this.db.table("hashtable").clear().then(() => 201).catch((e) => (w(2, [
4388
4352
  "%cclear%c %cstorage%c %chash",
4389
4353
  u.KO,
4390
4354
  u.NONE,
@@ -4393,7 +4357,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4393
4357
  u.WIDGET,
4394
4358
  "clear hashes"
4395
4359
  ]), 400));
4396
- deleteHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).delete().then(() => 201).catch((t) => (T(2, [
4360
+ deleteHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).delete().then(() => 201).catch((t) => (w(2, [
4397
4361
  "%cdelete%c %cstorage%c %chash",
4398
4362
  u.KO,
4399
4363
  u.NONE,
@@ -4406,7 +4370,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4406
4370
  createHash = async (e) => await this.db.table("hashtable").put({
4407
4371
  id: e.widget,
4408
4372
  hash: e.hash
4409
- }).then(() => 201).catch((t) => (T(2, [
4373
+ }).then(() => 201).catch((t) => (w(2, [
4410
4374
  "%cset%c %cstorage%c %chash",
4411
4375
  u.KO,
4412
4376
  u.NONE,
@@ -4417,7 +4381,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4417
4381
  t.message
4418
4382
  ]), 400));
4419
4383
  getCloud = async (e) => {
4420
- if (e.widget === "") return T(3, [
4384
+ if (e.widget === "") return w(3, [
4421
4385
  "%cget%c %cstorage%c %ccloud",
4422
4386
  u.NO_UPDATES,
4423
4387
  u.NONE,
@@ -4432,7 +4396,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4432
4396
  query: e
4433
4397
  };
4434
4398
  let t = await this.db.table(l.CLOUD).where({ id: e.widget }).last().catch(() => {
4435
- T(2, [
4399
+ w(2, [
4436
4400
  "%capi%C %ccloud",
4437
4401
  u.API,
4438
4402
  u.NONE,
@@ -4452,7 +4416,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4452
4416
  success: t !== void 0,
4453
4417
  query: e
4454
4418
  };
4455
- return T(3, [
4419
+ return w(3, [
4456
4420
  "%cget%c %cstorage%c %ccloud",
4457
4421
  u.OK,
4458
4422
  u.NONE,
@@ -4462,7 +4426,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4462
4426
  n
4463
4427
  ]), n;
4464
4428
  };
4465
- setCloud = async (e, t) => e.type === l.CLOUD && t !== "" ? (T(3, [
4429
+ setCloud = async (e, t) => e.type === l.CLOUD && t !== "" ? (w(3, [
4466
4430
  "%cset%c %cstorage%c %ccloud",
4467
4431
  u.OK,
4468
4432
  u.NONE,
@@ -4475,7 +4439,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4475
4439
  dashboard_id: e.dashboard,
4476
4440
  hash: e.hash,
4477
4441
  data: t
4478
- }).then(() => 201).catch((t) => (T(2, [
4442
+ }).then(() => 201).catch((t) => (w(2, [
4479
4443
  "%cset%c %cstorage%c %ccloud",
4480
4444
  u.KO,
4481
4445
  u.NONE,
@@ -4489,7 +4453,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4489
4453
  data: null,
4490
4454
  message: `Bulk add ${t.length} items to ${e}`,
4491
4455
  success: !0
4492
- })).catch((n) => (T(4, [
4456
+ })).catch((n) => (w(4, [
4493
4457
  "%cstorage",
4494
4458
  u.STORAGE,
4495
4459
  e,
@@ -4502,7 +4466,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4502
4466
  }));
4503
4467
  get = async (e, t) => {
4504
4468
  let n = await this.db.table(e).where({ id: t.id }).last().catch(() => {
4505
- T(2, [
4469
+ w(2, [
4506
4470
  "%cstorage",
4507
4471
  u.STORAGE,
4508
4472
  `loading ${e}`,
@@ -4519,7 +4483,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4519
4483
  data: null,
4520
4484
  message: `${e} ${t.id} saved to storage`,
4521
4485
  success: !0
4522
- })).catch((n) => (T(4, [
4486
+ })).catch((n) => (w(4, [
4523
4487
  "%cstorage",
4524
4488
  u.STORAGE,
4525
4489
  e,
@@ -4532,7 +4496,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4532
4496
  }));
4533
4497
  getDashboard = async (e) => {
4534
4498
  let t = await this.db.table(l.DASHBOARD).where({ id: e.id }).last().catch(() => {
4535
- T(2, [
4499
+ w(2, [
4536
4500
  "%cstorage",
4537
4501
  u.STORAGE,
4538
4502
  d.DASHBOARD_LOAD,
@@ -4547,14 +4511,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4547
4511
  };
4548
4512
  getDashboards = async (e) => {
4549
4513
  let t = (t) => e?.id === t.id, n = (t) => e?.name ? t.name.includes(e?.name) : !1, r = await this.db.table(l.DASHBOARD).toArray().then((n) => e?.id ? n.filter(t) : n).then((t) => e?.name ? t.filter(n) : t).catch(() => {
4550
- T(2, [
4514
+ w(2, [
4551
4515
  "%cstorage",
4552
4516
  u.STORAGE,
4553
4517
  d.DASHBOARD_LOAD,
4554
4518
  e
4555
4519
  ]);
4556
4520
  });
4557
- return r !== void 0 && T(3, [
4521
+ return r !== void 0 && w(3, [
4558
4522
  "%cstorage%c %cdashboards",
4559
4523
  u.STORAGE,
4560
4524
  u.NONE,
@@ -4580,7 +4544,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4580
4544
  data: null,
4581
4545
  message: `Dashboard ${t.data.id} saved to storage`,
4582
4546
  success: !0
4583
- })).catch((n) => (T(4, [
4547
+ })).catch((n) => (w(4, [
4584
4548
  "%cstorage",
4585
4549
  u.STORAGE,
4586
4550
  l.WIDGET,
@@ -4596,7 +4560,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4596
4560
  data: null,
4597
4561
  message: `Dashboard ${e.id} deleted`,
4598
4562
  success: !0
4599
- })).catch((t) => (T(4, [
4563
+ })).catch((t) => (w(4, [
4600
4564
  "%cstorage",
4601
4565
  u.STORAGE,
4602
4566
  l.DASHBOARD,
@@ -4621,7 +4585,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4621
4585
  return await this.db.table(l.TOPICS).orderBy("expires").filter((t) => t.expires < e).delete().catch((e) => (console.error("%cstorage%c %cclean", u.STORAGE, u.NONE, u.MESSAGES, e.message), 0)), await this.db.table(l.MESSAGES).orderBy("expires").filter((t) => t.expires < e).delete().catch((e) => (console.error("%clean%c %cstorage%c %cmessages", u.OK, u.NONE, u.STORAGE, u.NONE, u.MESSAGES, e.message), 0));
4622
4586
  };
4623
4587
  getMessages = async (e) => {
4624
- if (e.widget === "") return T(3, [
4588
+ if (e.widget === "") return w(3, [
4625
4589
  "%cget%c %cstorage%c %cmessages",
4626
4590
  u.NO_UPDATES,
4627
4591
  u.NONE,
@@ -4636,7 +4600,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4636
4600
  query: e
4637
4601
  };
4638
4602
  let t = e?.order ?? "utc", n = Math.floor(Date.now() / 1e3), r = e?.period ?? 0;
4639
- e.since = r === 0 ? n - 3600 * 24 * 30 : n - r, this.options.delay === 0 ? e.before = n : e.before = n - (this.options.delay || 0);
4603
+ e.since = r === 0 ? n - 2592e3 : n - r, e.before = this.options.delay === 0 ? n : n - (this.options.delay || 0);
4640
4604
  let i = (t) => t.utc > (e?.since || 0), a = (t) => t.utc < (e?.before || n);
4641
4605
  try {
4642
4606
  let n = this.db.table(l.TOPICS).where("widget_id").equals(e.widget).filter(i).filter(a);
@@ -4649,7 +4613,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4649
4613
  query: e
4650
4614
  };
4651
4615
  let o = r.map((e) => this.db.table(l.MESSAGES).get({ id: e.message_id }));
4652
- return A.Promise.all(o).then(async (t) => {
4616
+ return k.Promise.all(o).then(async (t) => {
4653
4617
  let n = {
4654
4618
  data: { messages: t.map((e) => {
4655
4619
  if (e !== void 0) return e.data;
@@ -4658,7 +4622,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4658
4622
  message: "Messages retrieved successfully",
4659
4623
  success: !0
4660
4624
  };
4661
- return T(3, [
4625
+ return w(3, [
4662
4626
  "%cget%c %cstorage%c %cmessages",
4663
4627
  u.OK,
4664
4628
  u.NONE,
@@ -4669,7 +4633,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4669
4633
  ]), n;
4670
4634
  });
4671
4635
  } catch (t) {
4672
- return T(2, [
4636
+ return w(2, [
4673
4637
  "%cget%c %cstorage%c %cmessages",
4674
4638
  u.OK,
4675
4639
  u.NONE,
@@ -4691,7 +4655,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4691
4655
  setMessages = async (e, t) => {
4692
4656
  if (e.type !== l.MESSAGES) return 400;
4693
4657
  let n = t.data.title, r = 0;
4694
- return T(3, [
4658
+ return w(3, [
4695
4659
  "%cset%c %cstorage%c %cmessages",
4696
4660
  u.OK,
4697
4661
  u.NONE,
@@ -4714,7 +4678,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4714
4678
  data: i,
4715
4679
  expires: i.expires
4716
4680
  }).catch((e) => {
4717
- r++, T(4, [
4681
+ r++, w(4, [
4718
4682
  "%cset%c %cstorage",
4719
4683
  u.KO,
4720
4684
  u.NONE,
@@ -4740,7 +4704,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4740
4704
  expires: i.expires
4741
4705
  };
4742
4706
  await this.db.table(l.TOPICS).put(a).catch((e) => {
4743
- r++, T(4, [
4707
+ r++, w(4, [
4744
4708
  "%cset%c %cstorage",
4745
4709
  u.KO,
4746
4710
  u.NONE,
@@ -4756,7 +4720,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4756
4720
  visible: n,
4757
4721
  approve: i
4758
4722
  }).catch((t) => {
4759
- r++, T(4, [
4723
+ r++, w(4, [
4760
4724
  "%cset%c %cstorage",
4761
4725
  u.KO,
4762
4726
  u.NONE,
@@ -4772,7 +4736,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4772
4736
  }), r === 0 ? 201 : 400;
4773
4737
  };
4774
4738
  getSeries = async (e) => {
4775
- if (e.widget === "") return T(3, [
4739
+ if (e.widget === "") return w(3, [
4776
4740
  "%cget%c %cstorage%c %cseries",
4777
4741
  u.NO_UPDATES,
4778
4742
  u.NONE,
@@ -4787,7 +4751,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4787
4751
  query: e
4788
4752
  };
4789
4753
  let t = await this.db.table(l.SERIES).where({ id: e.widget }).last().catch(() => {
4790
- T(2, [
4754
+ w(2, [
4791
4755
  "%cget%c %cstorage%c %cseries",
4792
4756
  u.KO,
4793
4757
  u.NONE,
@@ -4802,7 +4766,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4802
4766
  success: t !== void 0,
4803
4767
  query: e
4804
4768
  };
4805
- return T(3, [
4769
+ return w(3, [
4806
4770
  "%cget%c %cstorage%c %cseries",
4807
4771
  u.OK,
4808
4772
  u.NONE,
@@ -4812,7 +4776,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4812
4776
  n
4813
4777
  ]), n;
4814
4778
  };
4815
- setSeries = async (e, t) => (delete t?.query, e.type === l.SERIES && t !== "" ? (T(3, [
4779
+ setSeries = async (e, t) => (delete t?.query, e.type === l.SERIES && t !== "" ? (w(3, [
4816
4780
  "%cset%c %cstorage%c %cseries",
4817
4781
  u.OK,
4818
4782
  u.NONE,
@@ -4825,7 +4789,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4825
4789
  dashboard_id: e.dashboard,
4826
4790
  hash: e.hash,
4827
4791
  data: t
4828
- }).then(() => 201).catch((t) => (T(2, [
4792
+ }).then(() => 201).catch((t) => (w(2, [
4829
4793
  "%cset%c %cstorage%c %cseries",
4830
4794
  u.KO,
4831
4795
  u.NONE,
@@ -4836,7 +4800,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4836
4800
  t.message
4837
4801
  ]), 400))) : 400);
4838
4802
  getWidget = async (e) => {
4839
- if (e.id === "") return T(3, [
4803
+ if (e.id === "") return w(3, [
4840
4804
  "%cget%c %cstorage%c %cwidget",
4841
4805
  u.KO,
4842
4806
  u.NONE,
@@ -4861,14 +4825,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4861
4825
  };
4862
4826
  getWidgets = async (e) => {
4863
4827
  let t = (t) => e?.dashboard === t.dashboard_id, n = (t) => e?.type === t.type, r = (t) => e?.name ? t.name.includes(e?.name) : !1, i = await this.db.table(l.WIDGET).toArray().then((n) => e?.dashboard ? n.filter(t) : n).then((t) => e?.type ? t.filter(n) : t).then((t) => e?.name ? t.filter(r) : t).catch(() => {
4864
- T(2, [
4828
+ w(2, [
4865
4829
  "%cstorage",
4866
4830
  u.STORAGE,
4867
4831
  d.WIDGET_LOAD,
4868
4832
  e
4869
4833
  ]);
4870
4834
  });
4871
- return i !== void 0 && T(3, [
4835
+ return i !== void 0 && w(3, [
4872
4836
  "%cstorage%c %cwidgets",
4873
4837
  u.STORAGE,
4874
4838
  u.NONE,
@@ -4916,11 +4880,11 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4916
4880
  message: `Widgets table deleted error: ${e.message}`,
4917
4881
  success: !1
4918
4882
  }));
4919
- subscribe = (e) => (e = te(e), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (e.type === l.MESSAGES && (e = ne(this.options, e)), console.info("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e), this.subscribers.push(e), null));
4883
+ subscribe = (e) => (e = ee(e), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (e.type === l.MESSAGES && (e = D(this.options, e)), console.info("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e), this.subscribers.push(e), null));
4920
4884
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
4921
4885
  getSlide = async (e) => {
4922
4886
  let t = await this.db.table(l.SLIDE).where({ id: e.id }).last().catch(() => {
4923
- T(2, [
4887
+ w(2, [
4924
4888
  "%cstorage",
4925
4889
  u.STORAGE,
4926
4890
  d.SLIDE_LOAD,
@@ -4936,7 +4900,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4936
4900
  };
4937
4901
  getSlides = async (e) => {
4938
4902
  let t = (t) => e?.id ? t.id === e.id : !1, n = (t) => e?.name ? t.name.includes(e?.name) : !1, r = (t) => e?.presentation_id ? t.presentation_id === e.presentation_id : !1, i = await this.db.table(l.SLIDE).toArray().then((t) => e?.presentation_id ? t.filter(r) : t).then((n) => e?.id ? n.filter(t) : n).then((t) => e?.name ? t.filter(n) : t);
4939
- return i && i.sort((e, t) => e.order_index - t.order_index), i !== void 0 && T(3, [
4903
+ return i && i.sort((e, t) => e.order_index - t.order_index), i !== void 0 && w(3, [
4940
4904
  "%cstorage%c %cslides",
4941
4905
  u.STORAGE,
4942
4906
  u.NONE,
@@ -4996,7 +4960,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4996
4960
  };
4997
4961
  getPresentations = async (e) => {
4998
4962
  let t = (t) => e?.name ? t.name.includes(e?.name) : !1, n = await this.db.table(l.PRESENTATION).toArray().then((n) => e?.name ? n.filter(t) : n);
4999
- return n !== void 0 && T(3, [
4963
+ return n !== void 0 && w(3, [
5000
4964
  "%cstorage%c %cpresentations",
5001
4965
  u.STORAGE,
5002
4966
  u.NONE,
@@ -5045,7 +5009,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5045
5009
  }));
5046
5010
  getPreference = async (e) => {
5047
5011
  let t = await this.db.table(l.PREFERENCE).where({ id: e.id }).last().catch(() => {
5048
- T(2, [
5012
+ w(2, [
5049
5013
  "%cstorage",
5050
5014
  u.STORAGE,
5051
5015
  d.PREFERENCE_LOAD,
@@ -5064,7 +5028,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5064
5028
  };
5065
5029
  getPreferences = async (e) => {
5066
5030
  let t = (t) => e?.id ? e.id = t.id : !1, n = await this.db.table(l.PREFERENCE).toArray().then((n) => e?.id ? n.filter(t) : n);
5067
- return n !== void 0 && T(3, [
5031
+ return n !== void 0 && w(3, [
5068
5032
  "%cstorage%c %cpreferences",
5069
5033
  u.STORAGE,
5070
5034
  u.NONE,
@@ -5103,7 +5067,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5103
5067
  }));
5104
5068
  getImages = async (e) => {
5105
5069
  let t = (t) => e?.id ? t.includes(e.id) : !1, n = await this.db.table(l.IMAGES).toArray().then((n) => e?.id ? n.filter(t) : n);
5106
- return n !== void 0 && T(3, [
5070
+ return n !== void 0 && w(3, [
5107
5071
  "%cstorage%c %cimages",
5108
5072
  u.STORAGE,
5109
5073
  u.NONE,
@@ -5137,34 +5101,34 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5137
5101
  };
5138
5102
  //#endregion
5139
5103
  //#region node_modules/idb-keyval/dist/index.js
5140
- function he(e) {
5104
+ function N(e) {
5141
5105
  return new Promise((t, n) => {
5142
5106
  e.oncomplete = e.onsuccess = () => t(e.result), e.onabort = e.onerror = () => n(e.error);
5143
5107
  });
5144
5108
  }
5145
- function P(e, t) {
5109
+ function me(e, t) {
5146
5110
  let n, r = () => {
5147
5111
  if (n) return n;
5148
5112
  let r = indexedDB.open(e);
5149
- return r.onupgradeneeded = () => r.result.createObjectStore(t), n = he(r), n.then((e) => {
5113
+ return r.onupgradeneeded = () => r.result.createObjectStore(t), n = N(r), n.then((e) => {
5150
5114
  e.onclose = () => n = void 0;
5151
5115
  }, () => {}), n;
5152
5116
  };
5153
5117
  return (e, n) => r().then((r) => n(r.transaction(t, e).objectStore(t)));
5154
5118
  }
5155
- var ge;
5156
- function _e() {
5157
- return ge ||= P("keyval-store", "keyval"), ge;
5119
+ var he;
5120
+ function P() {
5121
+ return he ||= me("keyval-store", "keyval"), he;
5158
5122
  }
5159
- function F(e, t = _e()) {
5160
- return t("readonly", (t) => he(t.get(e)));
5123
+ function F(e, t = P()) {
5124
+ return t("readonly", (t) => N(t.get(e)));
5161
5125
  }
5162
- function I(e, t, n = _e()) {
5163
- return n("readwrite", (n) => (n.put(t, e), he(n.transaction)));
5126
+ function I(e, t, n = P()) {
5127
+ return n("readwrite", (n) => (n.put(t, e), N(n.transaction)));
5164
5128
  }
5165
5129
  //#endregion
5166
5130
  //#region src/storage/keyval.ts
5167
- var ve = class {
5131
+ var ge = class {
5168
5132
  subscribers = [];
5169
5133
  options;
5170
5134
  constructor(e) {
@@ -5175,41 +5139,41 @@ var ve = class {
5175
5139
  createHash = async (e) => 404;
5176
5140
  clearHash = async () => 404;
5177
5141
  deleteHash = async (e) => 404;
5178
- getCloud = async (e) => await F(D(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.CLOUD, e.slide, e.widget), {
5142
+ getCloud = async (e) => await F(E(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.CLOUD, e.slide, e.widget), {
5179
5143
  data: null,
5180
5144
  message: "Cloud Data error",
5181
5145
  success: !1
5182
5146
  }));
5183
- getSeries = async (e) => await F(D(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.SERIES, e.slide, e.widget), {
5147
+ getSeries = async (e) => await F(E(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.SERIES, e.slide, e.widget), {
5184
5148
  data: null,
5185
5149
  message: "Series Data error",
5186
5150
  success: !1
5187
5151
  }));
5188
- getMessages = async (e) => await F(D(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.MESSAGES, e.slide, e.widget), {
5152
+ getMessages = async (e) => await F(E(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.MESSAGES, e.slide, e.widget), {
5189
5153
  data: null,
5190
5154
  message: "Messages Data error",
5191
5155
  success: !1
5192
5156
  }));
5193
5157
  setCloud = async (e, t) => {
5194
5158
  if (!t.success) return 400;
5195
- let n = D(e);
5159
+ let n = E(e);
5196
5160
  return delete t.success, delete t.message, await I(n, t).then(() => 201).catch((t) => (console.error("%cstorage", u.STORAGE, l.CLOUD, e, t.message), 400));
5197
5161
  };
5198
5162
  setSeries = async (e, t) => {
5199
5163
  if (!t.success) return 400;
5200
- let n = D(e);
5164
+ let n = E(e);
5201
5165
  return delete t.success, delete t.message, await I(n, t).then(() => 201).catch((t) => (console.error("%cstorage", u.STORAGE, l.SERIES, e, t.message), 400));
5202
5166
  };
5203
5167
  setMessages = async (e, t) => {
5204
5168
  if (!t.success) return 400;
5205
- let n = D(e);
5169
+ let n = E(e);
5206
5170
  return delete t.success, delete t.message, await I(n, t).then(() => 201).catch((t) => (console.error("%cstorage", u.STORAGE, l.MESSAGES, e, t.message), 400));
5207
5171
  };
5208
5172
  cleanMessages = async (e) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((e) => e(0)));
5209
5173
  hideMessage = async (e, t) => {
5210
5174
  console.debug(`hideMessage ${e} ${t} not implemented for ${this.options.storage}`);
5211
5175
  };
5212
- getDashboard = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5176
+ getDashboard = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5213
5177
  data: null,
5214
5178
  message: `Widget ${e.data.id} load error: ${t.message}`,
5215
5179
  success: !1
@@ -5219,7 +5183,7 @@ var ve = class {
5219
5183
  message: "Dashboards get error: ",
5220
5184
  success: !1
5221
5185
  });
5222
- setDashboard = async (e) => await I(D(e), {
5186
+ setDashboard = async (e) => await I(E(e), {
5223
5187
  id: e.dashboard,
5224
5188
  name: e.name
5225
5189
  }).then(() => ({
@@ -5231,7 +5195,7 @@ var ve = class {
5231
5195
  message: `Slide ${e.data.id} save error: ${t.message}`,
5232
5196
  success: !1
5233
5197
  }));
5234
- getWidget = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5198
+ getWidget = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5235
5199
  data: null,
5236
5200
  message: `Widget ${e.data.id} load error: ${t.message}`,
5237
5201
  success: !1
@@ -5241,7 +5205,7 @@ var ve = class {
5241
5205
  message: "Widgets load error: ",
5242
5206
  success: !1
5243
5207
  });
5244
- setWidget = async (e) => await I(D(e), {
5208
+ setWidget = async (e) => await I(E(e), {
5245
5209
  id: e.widget,
5246
5210
  name: e.name,
5247
5211
  dashboard_id: e.dashboard,
@@ -5274,9 +5238,9 @@ var ve = class {
5274
5238
  deleteSlides = async () => 404;
5275
5239
  deletePresentation = async (e) => 404;
5276
5240
  deletePresentations = async () => 404;
5277
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5241
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5278
5242
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
5279
- getSlide = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5243
+ getSlide = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5280
5244
  data: null,
5281
5245
  message: `Slide ${e.data.id} load error: ${t.message}`,
5282
5246
  success: !1
@@ -5286,7 +5250,7 @@ var ve = class {
5286
5250
  message: `Slided ${e.presentation} load error: `,
5287
5251
  success: !1
5288
5252
  });
5289
- setSlide = async (e) => await I(D(e), {
5253
+ setSlide = async (e) => await I(E(e), {
5290
5254
  id: e.data.id,
5291
5255
  title: e.data.title || "Not set",
5292
5256
  json: e.data.json || {},
@@ -5300,7 +5264,7 @@ var ve = class {
5300
5264
  message: `Slide ${e.data.id} save error: ${t.message}`,
5301
5265
  success: !1
5302
5266
  }));
5303
- getPresentation = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.PRESENTATION, e.id), {
5267
+ getPresentation = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.PRESENTATION, e.id), {
5304
5268
  data: null,
5305
5269
  message: `Slide ${e.data.id} load error: ${t.message}`,
5306
5270
  success: !1
@@ -5311,7 +5275,7 @@ var ve = class {
5311
5275
  success: !1
5312
5276
  });
5313
5277
  setPresentation = async (e) => {
5314
- let t = D(e), n = e.data;
5278
+ let t = E(e), n = e.data;
5315
5279
  return await I(t, n).then(() => ({
5316
5280
  data: null,
5317
5281
  message: `Presentation ${e.data.id} saved to storage`,
@@ -5351,7 +5315,7 @@ var ve = class {
5351
5315
  message: `Image ${e.id} saved`,
5352
5316
  success: !1
5353
5317
  });
5354
- }, L = class {
5318
+ }, _e = class {
5355
5319
  subscribers = [];
5356
5320
  options;
5357
5321
  constructor(e) {
@@ -5368,7 +5332,7 @@ var ve = class {
5368
5332
  clearHash = async () => 404;
5369
5333
  deleteHash = async (e) => 404;
5370
5334
  getCloud = async (e) => {
5371
- let t = D(e);
5335
+ let t = E(e);
5372
5336
  try {
5373
5337
  return localStorage.getObject(t);
5374
5338
  } catch (t) {
@@ -5380,7 +5344,7 @@ var ve = class {
5380
5344
  }
5381
5345
  };
5382
5346
  getSeries = async (e) => {
5383
- let t = D(e);
5347
+ let t = E(e);
5384
5348
  try {
5385
5349
  return localStorage.getObject(t);
5386
5350
  } catch (t) {
@@ -5392,7 +5356,7 @@ var ve = class {
5392
5356
  }
5393
5357
  };
5394
5358
  getMessages = async (e) => {
5395
- let t = D(e);
5359
+ let t = E(e);
5396
5360
  try {
5397
5361
  return localStorage.getObject(t);
5398
5362
  } catch (t) {
@@ -5407,7 +5371,7 @@ var ve = class {
5407
5371
  get = async (e, t) => 404;
5408
5372
  set = async (e, t) => 404;
5409
5373
  setCloud = async (e, t) => {
5410
- let n = D(e);
5374
+ let n = E(e);
5411
5375
  try {
5412
5376
  return localStorage.setObject(n, t), 201;
5413
5377
  } catch (t) {
@@ -5415,7 +5379,7 @@ var ve = class {
5415
5379
  }
5416
5380
  };
5417
5381
  setSeries = async (e, t) => {
5418
- let n = D(e);
5382
+ let n = E(e);
5419
5383
  try {
5420
5384
  return localStorage.setObject(n, t), 201;
5421
5385
  } catch (t) {
@@ -5423,7 +5387,7 @@ var ve = class {
5423
5387
  }
5424
5388
  };
5425
5389
  setMessages = async (e, t) => {
5426
- let n = D(e);
5390
+ let n = E(e);
5427
5391
  try {
5428
5392
  return localStorage.setObject(n, t), 200;
5429
5393
  } catch (t) {
@@ -5506,7 +5470,7 @@ var ve = class {
5506
5470
  deleteSlides = async () => 404;
5507
5471
  deletePresentation = async (e) => 404;
5508
5472
  deletePresentations = async () => 404;
5509
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5473
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5510
5474
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
5511
5475
  getSlide = async (e) => {
5512
5476
  try {
@@ -5634,7 +5598,7 @@ var ve = class {
5634
5598
  message: `Image ${e.id} saved `,
5635
5599
  success: !1
5636
5600
  });
5637
- }, ye = class {
5601
+ }, ve = class {
5638
5602
  subscribers = [];
5639
5603
  options;
5640
5604
  constructor(e) {
@@ -5651,7 +5615,7 @@ var ve = class {
5651
5615
  clearHash = async () => 404;
5652
5616
  deleteHash = async (e) => 404;
5653
5617
  getCloud = async (e) => {
5654
- let t = D(e);
5618
+ let t = E(e);
5655
5619
  try {
5656
5620
  return sessionStorage.getObject(t);
5657
5621
  } catch (t) {
@@ -5663,7 +5627,7 @@ var ve = class {
5663
5627
  }
5664
5628
  };
5665
5629
  getSeries = async (e) => {
5666
- let t = D(e);
5630
+ let t = E(e);
5667
5631
  try {
5668
5632
  return sessionStorage.getObject(t);
5669
5633
  } catch (t) {
@@ -5675,7 +5639,7 @@ var ve = class {
5675
5639
  }
5676
5640
  };
5677
5641
  getMessages = async (e) => {
5678
- let t = D(e);
5642
+ let t = E(e);
5679
5643
  try {
5680
5644
  return sessionStorage.getObject(t);
5681
5645
  } catch (t) {
@@ -5687,7 +5651,7 @@ var ve = class {
5687
5651
  }
5688
5652
  };
5689
5653
  setCloud = async (e, t) => {
5690
- let n = D(e);
5654
+ let n = E(e);
5691
5655
  try {
5692
5656
  return sessionStorage.setObject(n, t), 201;
5693
5657
  } catch (t) {
@@ -5695,7 +5659,7 @@ var ve = class {
5695
5659
  }
5696
5660
  };
5697
5661
  setSeries = async (e, t) => {
5698
- let n = D(e);
5662
+ let n = E(e);
5699
5663
  try {
5700
5664
  return sessionStorage.setObject(n, t), 201;
5701
5665
  } catch (t) {
@@ -5703,7 +5667,7 @@ var ve = class {
5703
5667
  }
5704
5668
  };
5705
5669
  setMessages = async (e, t) => {
5706
- let n = D(e);
5670
+ let n = E(e);
5707
5671
  try {
5708
5672
  return sessionStorage.setObject(n, t), 200;
5709
5673
  } catch (t) {
@@ -5789,7 +5753,7 @@ var ve = class {
5789
5753
  deleteSlides = async () => 404;
5790
5754
  deletePresentation = async (e) => 404;
5791
5755
  deletePresentations = async () => 404;
5792
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5756
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5793
5757
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
5794
5758
  getSlide = async (e) => {
5795
5759
  try {
@@ -5917,7 +5881,7 @@ var ve = class {
5917
5881
  message: `Image ${e.id} saved`,
5918
5882
  success: !1
5919
5883
  });
5920
- }, be = class {
5884
+ }, L = class {
5921
5885
  subscribers = [];
5922
5886
  options;
5923
5887
  constructor(e) {
@@ -5929,7 +5893,7 @@ var ve = class {
5929
5893
  clearHash = async () => 404;
5930
5894
  deleteHash = async (e) => 404;
5931
5895
  getCloud = async (e) => {
5932
- let t = D(e);
5896
+ let t = E(e);
5933
5897
  try {
5934
5898
  return window.__bc.WidgetData[t];
5935
5899
  } catch (t) {
@@ -5941,7 +5905,7 @@ var ve = class {
5941
5905
  }
5942
5906
  };
5943
5907
  getSeries = async (e) => {
5944
- let t = D(e);
5908
+ let t = E(e);
5945
5909
  try {
5946
5910
  return window.__bc.WidgetData[t];
5947
5911
  } catch (t) {
@@ -5953,7 +5917,7 @@ var ve = class {
5953
5917
  }
5954
5918
  };
5955
5919
  getMessages = async (e) => {
5956
- let t = D(e);
5920
+ let t = E(e);
5957
5921
  try {
5958
5922
  return window.__bc.WidgetData[t];
5959
5923
  } catch (t) {
@@ -5965,7 +5929,7 @@ var ve = class {
5965
5929
  }
5966
5930
  };
5967
5931
  setCloud = async (e, t) => {
5968
- let n = D(e);
5932
+ let n = E(e);
5969
5933
  try {
5970
5934
  return window.__bc.WidgetData[n] = t, 201;
5971
5935
  } catch (t) {
@@ -5973,7 +5937,7 @@ var ve = class {
5973
5937
  }
5974
5938
  };
5975
5939
  setSeries = async (e, t) => {
5976
- let n = D(e);
5940
+ let n = E(e);
5977
5941
  try {
5978
5942
  return window.__bc.WidgetData[n] = t, 201;
5979
5943
  } catch (t) {
@@ -5981,7 +5945,7 @@ var ve = class {
5981
5945
  }
5982
5946
  };
5983
5947
  setMessages = async (e, t) => {
5984
- let n = D(e);
5948
+ let n = E(e);
5985
5949
  try {
5986
5950
  return window.__bc.WidgetData[n] = t, 201;
5987
5951
  } catch (t) {
@@ -6067,7 +6031,7 @@ var ve = class {
6067
6031
  deleteSlides = async () => 404;
6068
6032
  deletePresentation = async (e) => 404;
6069
6033
  deletePresentations = async () => 404;
6070
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
6034
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
6071
6035
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
6072
6036
  getSlide = async (e) => {
6073
6037
  try {
@@ -6196,36 +6160,33 @@ var ve = class {
6196
6160
  message: `Image ${e.name} saved`,
6197
6161
  success: !1
6198
6162
  });
6199
- }, xe = class {
6163
+ }, ye = class {
6200
6164
  sm;
6201
6165
  api;
6202
6166
  bc;
6203
6167
  options;
6204
6168
  subscribers = [];
6205
6169
  constructor(e) {
6206
- switch (T(3, [
6170
+ switch (w(3, [
6207
6171
  "%cpresentation",
6208
6172
  u.PRESENTATION,
6209
6173
  e.presentation,
6210
6174
  d.VERSION,
6211
- re
6212
- ]), this.options = e, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new ae(e), e.storage) {
6175
+ te
6176
+ ]), this.options = e, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new re(e), e.storage) {
6213
6177
  case p.DEXIE:
6214
- this.sm = new me(e);
6178
+ this.sm = new pe(e);
6215
6179
  break;
6216
6180
  case p.LOCAL:
6217
- this.sm = new ye(e);
6181
+ this.sm = new ve(e);
6218
6182
  break;
6219
6183
  case p.SESSION:
6220
- this.sm = new L(e);
6184
+ this.sm = new _e(e);
6221
6185
  break;
6222
6186
  case p.KEYVAL:
6223
- this.sm = new ve(e);
6224
- break;
6225
- case p.WINDOW:
6226
- this.sm = new be(e);
6187
+ this.sm = new ge(e);
6227
6188
  break;
6228
- default:
6189
+ case p.WINDOW: this.sm = new L(e);
6229
6190
  }
6230
6191
  }
6231
6192
  addSubscriber(e) {
@@ -6235,7 +6196,7 @@ var ve = class {
6235
6196
  delete this.subscribers[e.widget];
6236
6197
  }
6237
6198
  update = async (e) => {
6238
- if (T(3, [
6199
+ if (w(3, [
6239
6200
  "%cupdate%c %cdata",
6240
6201
  u.NO_UPDATES,
6241
6202
  u.NONE,
@@ -6268,7 +6229,7 @@ var ve = class {
6268
6229
  let o = e.query;
6269
6230
  switch (o.type) {
6270
6231
  case l.MESSAGES:
6271
- a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), e.data.messages = e.data.messages.filter((e) => e.id !== null), i = e.data.messages.length > 0 ? x(e.data.messages[0].utc) : "none", a === i && t.refresh === !1 ? (T(3, [
6232
+ a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), e.data.messages = e.data.messages.filter((e) => e.id !== null), i = e.data.messages.length > 0 ? x(e.data.messages[0].utc) : "none", a === i && t.refresh === !1 ? (w(3, [
6272
6233
  "%cset%c %cstorage%c %cmessages",
6273
6234
  u.NO_UPDATES,
6274
6235
  u.NONE,
@@ -6280,7 +6241,7 @@ var ve = class {
6280
6241
  ]), r.code = 204) : this.sm === null ? r.code = 500 : (o.hash = i, await this.sm?.setHash(o), r.code = await this.sm.setMessages(e.query, e).then(async (n) => (t.refresh && n === 204 && (n = 201), this.broadcastUpdate(n, e), n)).catch((e) => 500));
6281
6242
  break;
6282
6243
  case l.CLOUD:
6283
- a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.cloud), a === i && t.refresh === !1 ? (T(3, [
6244
+ a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.cloud), a === i && t.refresh === !1 ? (w(3, [
6284
6245
  "%cset%c %cstorage%c %ccloud",
6285
6246
  u.NO_UPDATES,
6286
6247
  u.NONE,
@@ -6289,7 +6250,7 @@ var ve = class {
6289
6250
  u.CLOUD,
6290
6251
  e.data?.title ?? o.widget,
6291
6252
  `same hash:${i}`
6292
- ]), T(4, [
6253
+ ]), w(4, [
6293
6254
  "%cdebug%c %ccloud",
6294
6255
  u.NO_UPDATES,
6295
6256
  u.NONE,
@@ -6306,7 +6267,7 @@ var ve = class {
6306
6267
  }, this.sm === null ? r.code = 500 : r.code = await this.sm.setCloud(e.query, n.data).then((n) => (t.refresh && n === 204 && (n = 201), this.broadcastUpdate(n, e), n)).catch((e) => 500));
6307
6268
  break;
6308
6269
  case l.SERIES:
6309
- a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.series), a === i && t.refresh === !1 ? (T(3, [
6270
+ a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.series), a === i && t.refresh === !1 ? (w(3, [
6310
6271
  "%cset%c %cstorage%c %cseries",
6311
6272
  u.NO_UPDATES,
6312
6273
  u.NONE,
@@ -6315,7 +6276,7 @@ var ve = class {
6315
6276
  u.SERIES,
6316
6277
  e.data?.title ?? e.query.widget,
6317
6278
  `same hash:${i}`
6318
- ]), T(4, [
6279
+ ]), w(4, [
6319
6280
  "%cdebug%c %cseries",
6320
6281
  u.NO_UPDATES,
6321
6282
  u.NONE,
@@ -6331,7 +6292,7 @@ var ve = class {
6331
6292
  query: e.query
6332
6293
  }, this.sm === null ? r.code = 500 : r.code = await this.sm.setSeries(o, e.data).then((n) => (t.refresh && n === 204 && (n = 201), this.broadcastUpdate(n, e), n)).catch((e) => 500));
6333
6294
  break;
6334
- default: T(3, [
6295
+ default: w(3, [
6335
6296
  `%cfetch%c %capi% %c${o.type} `,
6336
6297
  u.KO,
6337
6298
  u.NONE,
@@ -6344,7 +6305,7 @@ var ve = class {
6344
6305
  hash: i
6345
6306
  };
6346
6307
  }
6347
- } else switch (T(3, [
6308
+ } else switch (w(3, [
6348
6309
  `%cset%c %c${e.query.type}%c %cunauthorized`,
6349
6310
  u.KO,
6350
6311
  u.NONE,
@@ -6379,7 +6340,7 @@ var ve = class {
6379
6340
  };
6380
6341
  startBroadcastListener = () => {
6381
6342
  let e = this.options.presentation;
6382
- T(3, [
6343
+ w(3, [
6383
6344
  "%cchannel%c %capi",
6384
6345
  u.BROADCAST,
6385
6346
  u.NONE,
@@ -6401,15 +6362,15 @@ var ve = class {
6401
6362
  broadcastUpdate = (e, t) => {
6402
6363
  switch (e) {
6403
6364
  case 201:
6404
- T(3, [
6365
+ w(3, [
6405
6366
  `%cupdate%c %cwidget%c %c${t.query?.type}`,
6406
6367
  u.BROADCAST,
6407
6368
  u.NONE,
6408
6369
  u.WIDGET,
6409
6370
  u.NONE,
6410
- E(t.query),
6371
+ T(t.query),
6411
6372
  `${t?.data?.title ?? ""} ${t.query.widget}`
6412
- ]), T(4, [
6373
+ ]), w(4, [
6413
6374
  "%cdebug%c %cevent",
6414
6375
  u.NO_UPDATES,
6415
6376
  u.NONE,
@@ -6421,18 +6382,16 @@ var ve = class {
6421
6382
  });
6422
6383
  break;
6423
6384
  case 204: break;
6424
- default:
6425
- T(2, [
6426
- `%cupdate%c %cwidget%c %c${t.query?.type}`,
6427
- u.KO,
6428
- u.NONE,
6429
- u.WIDGET,
6430
- u.NONE,
6431
- E(t.query),
6432
- "Fetch error",
6433
- t.query
6434
- ]);
6435
- break;
6385
+ default: w(2, [
6386
+ `%cupdate%c %cwidget%c %c${t.query?.type}`,
6387
+ u.KO,
6388
+ u.NONE,
6389
+ u.WIDGET,
6390
+ u.NONE,
6391
+ T(t.query),
6392
+ "Fetch error",
6393
+ t.query
6394
+ ]);
6436
6395
  }
6437
6396
  };
6438
6397
  hide = (e) => {
@@ -6442,18 +6401,18 @@ var ve = class {
6442
6401
  switch (e.data.event) {
6443
6402
  case d.SUBSCRIBE:
6444
6403
  let t = e.data.data;
6445
- t.widget !== void 0 && (T(3, [
6404
+ t.widget !== void 0 && (w(3, [
6446
6405
  `%csubscribe%c %cwidget%c %c${e.data.data.type}`,
6447
6406
  u.BROADCAST,
6448
6407
  u.NONE,
6449
6408
  u.WIDGET,
6450
6409
  u.NONE,
6451
- E(t),
6410
+ T(t),
6452
6411
  t
6453
6412
  ]), this.addSubscriber(t));
6454
6413
  break;
6455
6414
  case d.UPDATE:
6456
- T(3, [
6415
+ w(3, [
6457
6416
  "%cupdate%c %capi%c %cstorage",
6458
6417
  u.BROADCAST,
6459
6418
  u.NONE,
@@ -6463,23 +6422,20 @@ var ve = class {
6463
6422
  e.data
6464
6423
  ]), await this.update(e.data.data);
6465
6424
  break;
6466
- case "stream":
6467
- T(3, [
6468
- "%cupdate%c %capi%c %cstorage",
6469
- u.BROADCAST,
6470
- u.NONE,
6471
- u.API,
6472
- u.NONE,
6473
- u.STORAGE,
6474
- e.data
6475
- ]), await this.stream();
6476
- break;
6477
- default:
6425
+ case "stream": w(3, [
6426
+ "%cupdate%c %capi%c %cstorage",
6427
+ u.BROADCAST,
6428
+ u.NONE,
6429
+ u.API,
6430
+ u.NONE,
6431
+ u.STORAGE,
6432
+ e.data
6433
+ ]), await this.stream();
6478
6434
  }
6479
6435
  };
6480
6436
  cleanMessages = async () => {
6481
6437
  if (this.options?.suspended) {
6482
- T(2, [
6438
+ w(2, [
6483
6439
  "%cclean%c %cstorage%c %cmessages",
6484
6440
  u.KO,
6485
6441
  u.NONE,
@@ -6490,8 +6446,8 @@ var ve = class {
6490
6446
  ]);
6491
6447
  return;
6492
6448
  }
6493
- let e = this.options?.retention || 86400 * 40, t = await this.sm?.cleanMessages(e);
6494
- T(3, [
6449
+ let e = this.options?.retention || 3456e3, t = await this.sm?.cleanMessages(e);
6450
+ w(3, [
6495
6451
  "%cclean%c %cstorage%c %cmessages",
6496
6452
  u.OK,
6497
6453
  u.NONE,
@@ -6503,7 +6459,7 @@ var ve = class {
6503
6459
  };
6504
6460
  hideMessage = async (e) => {
6505
6461
  let t = await this.sm?.hideMessage(e.id, 0);
6506
- return T(3, [
6462
+ return w(3, [
6507
6463
  "%chide%c %cstorage%c %cmessages",
6508
6464
  u.OK,
6509
6465
  u.NONE,
@@ -6557,26 +6513,23 @@ var ve = class {
6557
6513
  getHash = async (e, t) => await this.sm?.getHash(t);
6558
6514
  setHash = async (e, t) => await this.sm?.setHash(t) ?? 400;
6559
6515
  clearHash = async () => await this.sm?.clearHash() ?? 400;
6560
- }, Se = class {
6516
+ }, be = class {
6561
6517
  sm;
6562
6518
  constructor(e) {
6563
6519
  switch (this.sm = null, e.storage) {
6564
6520
  case p.DEXIE:
6565
- this.sm = new me(e);
6521
+ this.sm = new pe(e);
6566
6522
  break;
6567
6523
  case p.LOCAL:
6568
- this.sm = new ye(e);
6524
+ this.sm = new ve(e);
6569
6525
  break;
6570
6526
  case p.SESSION:
6571
- this.sm = new L(e);
6527
+ this.sm = new _e(e);
6572
6528
  break;
6573
6529
  case p.KEYVAL:
6574
- this.sm = new ve(e);
6530
+ this.sm = new ge(e);
6575
6531
  break;
6576
- case p.WINDOW:
6577
- this.sm = new be(e);
6578
- break;
6579
- default:
6532
+ case p.WINDOW: this.sm = new L(e);
6580
6533
  }
6581
6534
  }
6582
6535
  getCloud = async (e) => e.type === l.CLOUD ? await this.sm?.getCloud(e) : (console.warn("%cget%c %cstorage%c %ccloud", u.KO, u.NONE, u.STORAGE, u.NONE, u.CLOUD, e.widget, "wrong method call for getCloud, type used is", e.type), {
@@ -6594,7 +6547,7 @@ var ve = class {
6594
6547
  message: `'wrong method call for getSeries, type used is ${e.type}`,
6595
6548
  success: !1
6596
6549
  });
6597
- }, Ce = class {
6550
+ }, xe = class {
6598
6551
  storageReader;
6599
6552
  broadcastChannel;
6600
6553
  element;
@@ -6605,7 +6558,7 @@ var ve = class {
6605
6558
  let r = { ...e.dataset };
6606
6559
  delete r.hmr;
6607
6560
  let i = window.__bc.opts;
6608
- r.presentation = i?.presentation ?? `${n} not found`, this.query = r, h(e), this.storageReader = new Se(i), this.broadcastChannel = new BroadcastChannel(r.presentation), this.broadcastListener();
6561
+ r.presentation = i?.presentation ?? `${n} not found`, this.query = r, h(e), this.storageReader = new be(i), this.broadcastChannel = new BroadcastChannel(r.presentation), this.broadcastListener();
6609
6562
  }
6610
6563
  addCallbackListener(e) {
6611
6564
  this.callbacks.push(e);
@@ -6619,20 +6572,20 @@ var ve = class {
6619
6572
  try {
6620
6573
  if (n.dashboard === e.dashboard && n.widget === e.widget) {
6621
6574
  let e = await this.getData();
6622
- e?.success && (T(4, [
6575
+ e?.success && (w(4, [
6623
6576
  `%cset%c %cwidget%c %c${this.query.type}`,
6624
6577
  u.OK,
6625
6578
  u.NONE,
6626
6579
  u.WIDGET,
6627
6580
  u.NONE,
6628
- E(this.query),
6581
+ T(this.query),
6629
6582
  this.query
6630
6583
  ]), this.callbacks.forEach(async (t) => {
6631
6584
  t(e);
6632
6585
  }));
6633
6586
  }
6634
6587
  } catch (e) {
6635
- T(4, [
6588
+ w(4, [
6636
6589
  d.WIDGET_UPDATE,
6637
6590
  n,
6638
6591
  e.message,
@@ -6640,10 +6593,7 @@ var ve = class {
6640
6593
  ]);
6641
6594
  }
6642
6595
  break;
6643
- case d.APP_READY:
6644
- this.subscribe();
6645
- break;
6646
- default:
6596
+ case d.APP_READY: this.subscribe();
6647
6597
  }
6648
6598
  };
6649
6599
  }
@@ -6651,15 +6601,15 @@ var ve = class {
6651
6601
  this.query.dashboard?.length && this.query.widget?.length && this.query.type?.length && (this.broadcastChannel.postMessage({
6652
6602
  event: d.SUBSCRIBE,
6653
6603
  data: this.query
6654
- }), T(3, [
6604
+ }), w(3, [
6655
6605
  `%csubscribe%c %cwidget%c %c${this.query.type}`,
6656
6606
  u.SUBSCRIBE,
6657
6607
  u.NONE,
6658
6608
  u.WIDGET,
6659
6609
  u.NONE,
6660
- E(this.query),
6610
+ T(this.query),
6661
6611
  this.query.widget
6662
- ]), T(4, [
6612
+ ]), w(4, [
6663
6613
  "%cdebug%c %cwidget",
6664
6614
  u.NO_UPDATES,
6665
6615
  u.NONE,
@@ -6680,7 +6630,7 @@ var ve = class {
6680
6630
  query: this.query
6681
6631
  };
6682
6632
  };
6683
- getCloud = async () => this.query.type === l.CLOUD ? await this.storageReader.getCloud(this.query) : (T(3, [
6633
+ getCloud = async () => this.query.type === l.CLOUD ? await this.storageReader.getCloud(this.query) : (w(3, [
6684
6634
  "%cget%c %cstorage%c %cwidget",
6685
6635
  u.KO,
6686
6636
  u.NONE,
@@ -6690,7 +6640,7 @@ var ve = class {
6690
6640
  this.query.widget,
6691
6641
  "Wrong method call for getCloud, expected type is",
6692
6642
  this.query.type
6693
- ]), T(4, [
6643
+ ]), w(4, [
6694
6644
  "%cdebug%c %ccloud",
6695
6645
  u.NO_UPDATES,
6696
6646
  u.NONE,
@@ -6702,7 +6652,7 @@ var ve = class {
6702
6652
  success: !1,
6703
6653
  query: this.query
6704
6654
  });
6705
- getMessages = async () => this.query.type === l.MESSAGES ? await this.storageReader.getMessages(this.query) : (T(3, [
6655
+ getMessages = async () => this.query.type === l.MESSAGES ? await this.storageReader.getMessages(this.query) : (w(3, [
6706
6656
  "%cget%c %cstorage%c %cwidget",
6707
6657
  u.KO,
6708
6658
  u.NONE,
@@ -6712,7 +6662,7 @@ var ve = class {
6712
6662
  this.query.widget,
6713
6663
  "Wrong method call for getMessages, expected type is",
6714
6664
  this.query.type
6715
- ]), T(4, [
6665
+ ]), w(4, [
6716
6666
  "%debug%c %cmessages",
6717
6667
  u.NO_UPDATES,
6718
6668
  u.NONE,
@@ -6723,7 +6673,7 @@ var ve = class {
6723
6673
  message: `wrong method call for getMessages, expected type is '${this.query.type}'`,
6724
6674
  success: !1
6725
6675
  });
6726
- getSeries = async () => this.query.type === l.SERIES ? await this.storageReader.getSeries(this.query) : (T(3, [
6676
+ getSeries = async () => this.query.type === l.SERIES ? await this.storageReader.getSeries(this.query) : (w(3, [
6727
6677
  "%cget%c %cstorage%c %cwidget",
6728
6678
  u.KO,
6729
6679
  u.NONE,
@@ -6733,7 +6683,7 @@ var ve = class {
6733
6683
  this.query.widget,
6734
6684
  "Wrong method call for getSeries, expected type is",
6735
6685
  this.query.type
6736
- ]), T(4, [
6686
+ ]), w(4, [
6737
6687
  "%cdebug%c %cseries",
6738
6688
  u.NO_UPDATES,
6739
6689
  u.NONE,
@@ -6746,7 +6696,7 @@ var ve = class {
6746
6696
  query: this.query
6747
6697
  });
6748
6698
  showModal = (e) => {
6749
- T(3, [
6699
+ w(3, [
6750
6700
  "%cmodal%c %cwidget",
6751
6701
  u.OK,
6752
6702
  u.NONE,
@@ -6772,4 +6722,4 @@ var ve = class {
6772
6722
  }
6773
6723
  };
6774
6724
  //#endregion
6775
- export { xe as BuzzcastingStorageManager, Se as BuzzcastingStorageReader, Ce as Widget };
6725
+ export { ye as BuzzcastingStorageManager, be as BuzzcastingStorageReader, xe as Widget };