buzzcasting-storage 2.1.2 → 2.2.0

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,8 +1,8 @@
1
- var gi = Object.defineProperty;
2
- var bi = (D, s, k) => s in D ? gi(D, s, { enumerable: !0, configurable: !0, writable: !0, value: k }) : D[s] = k;
3
- var T = (D, s, k) => (bi(D, typeof s != "symbol" ? s + "" : s, k), k);
4
- const le = "messages", ze = "cloud", $e = "series", wi = "topics", gt = "widget", _i = "widgets", bt = "subscribe", xi = "keyval", ki = "local", Oi = "session", Si = "dexie", Ei = "window", V = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", Nn = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", vt = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;";
5
- class Pi {
1
+ var ki = Object.defineProperty;
2
+ var xi = (D, s, x) => s in D ? ki(D, s, { enumerable: !0, configurable: !0, writable: !0, value: x }) : D[s] = x;
3
+ var T = (D, s, x) => (xi(D, typeof s != "symbol" ? s + "" : s, x), x);
4
+ const Oi = "2.1.2", le = "messages", Ue = "cloud", We = "series", Si = "topics", bt = "widget", Ei = "widgets", wt = "subscribe", Pi = "keyval", ji = "local", Ci = "session", Ki = "dexie", Ai = "window", _t = "padding:0 4px 0 4px;border-radius:5px;", V = `color:black;background-color:cyan;${_t}`, $n = `color:white;background-color:orange;${_t}`, fe = `color:white;background-color:grey;${_t}`, Dr = `color:black;background-color:lime;${_t}`, zn = `color:grey;border:1px solid grey;${_t}`, he = "color:transparent;background-color:transparent;";
5
+ class Di {
6
6
  constructor(s) {
7
7
  T(this, "options");
8
8
  T(this, "url");
@@ -19,16 +19,18 @@ class Pi {
19
19
  this.options = s, this.url = `https://${s.app}.buzzcasting.net`;
20
20
  }
21
21
  async get(s) {
22
- const { version: k } = this.options, w = this.headers(), O = Object.assign({}, s);
22
+ const { version: x } = this.options, w = this.headers(), O = Object.assign({}, s);
23
23
  delete O.slide, delete O.type, delete O.hash;
24
- const F = Object.keys(O).length > 0 ? `?${new URLSearchParams(O).toString()}` : "";
24
+ const N = Object.keys(O).length > 0 ? `?${new URLSearchParams(O).toString()}` : "";
25
25
  return console.debug(
26
- "%capi",
27
- vt,
26
+ "%capi%c %cget",
27
+ fe,
28
+ he,
29
+ Dr,
28
30
  s.slide,
29
31
  s.widget
30
32
  ), await fetch(
31
- [this.url, "api", k, s.type].join("/") + F,
33
+ [this.url, "api", x, s.type].join("/") + N,
32
34
  { ...w, method: "get" }
33
35
  ).then(async (C) => {
34
36
  if (!C.ok)
@@ -37,15 +39,17 @@ class Pi {
37
39
  }).then((C) => C.json()).then((C) => (C.query = s, C)).catch((C) => ({ success: !1, message: `${C}`, data: null }));
38
40
  }
39
41
  async hideMessage(s) {
40
- const { app: k, version: w } = this.options, O = this.headers(), F = "?action=visible";
42
+ const { app: x, version: w } = this.options, O = this.headers(), N = "?action=visible";
41
43
  return console.info(
42
- "%capi",
43
- vt,
44
+ "%capi%c %cpost",
45
+ fe,
46
+ he,
47
+ Dr,
44
48
  "hide",
45
- [k, "api", w, s.type, s.id].join("/") + F,
49
+ [x, "api", w, s.type, s.id].join("/") + N,
46
50
  { ...O, method: "put" }
47
51
  ), await fetch(
48
- [k, "api", w, s.type, s.id].join("/") + F,
52
+ [x, "api", w, s.type, s.id].join("/") + N,
49
53
  { ...O, method: "put" }
50
54
  ).then((C) => {
51
55
  if (!C.ok)
@@ -54,17 +58,17 @@ class Pi {
54
58
  }).then((C) => C.json()).catch((C) => ({ succes: !1, message: C, data: [] }));
55
59
  }
56
60
  }
57
- var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
58
- function ji(D) {
61
+ var Tr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
62
+ function Ti(D) {
59
63
  return D && D.__esModule && Object.prototype.hasOwnProperty.call(D, "default") ? D.default : D;
60
64
  }
61
- var Ar = { exports: {} };
65
+ var Ir = { exports: {} };
62
66
  (function(D, s) {
63
- (function(k, w) {
67
+ (function(x, w) {
64
68
  D.exports = w();
65
- })(Cr, function() {
66
- var k = function(e, t) {
67
- return (k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
69
+ })(Tr, function() {
70
+ var x = function(e, t) {
71
+ return (x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
68
72
  n.__proto__ = r;
69
73
  } || function(n, r) {
70
74
  for (var i in r)
@@ -84,53 +88,53 @@ var Ar = { exports: {} };
84
88
  !r && i in t || ((r = r || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
85
89
  return e.concat(r || Array.prototype.slice.call(t));
86
90
  }
87
- var F = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr, C = Object.keys, z = Array.isArray;
91
+ var N = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Tr, C = Object.keys, $ = Array.isArray;
88
92
  function Q(e, t) {
89
93
  return typeof t != "object" || C(t).forEach(function(n) {
90
94
  e[n] = t[n];
91
95
  }), e;
92
96
  }
93
- typeof Promise > "u" || F.Promise || (F.Promise = Promise);
94
- var _e = Object.getPrototypeOf, Br = {}.hasOwnProperty;
97
+ typeof Promise > "u" || N.Promise || (N.Promise = Promise);
98
+ var xe = Object.getPrototypeOf, Nr = {}.hasOwnProperty;
95
99
  function ie(e, t) {
96
- return Br.call(e, t);
100
+ return Nr.call(e, t);
97
101
  }
98
- function Ue(e, t) {
99
- typeof t == "function" && (t = t(_e(e))), (typeof Reflect > "u" ? C : Reflect.ownKeys)(t).forEach(function(n) {
100
- xe(e, n, t[n]);
102
+ function Ve(e, t) {
103
+ typeof t == "function" && (t = t(xe(e))), (typeof Reflect > "u" ? C : Reflect.ownKeys)(t).forEach(function(n) {
104
+ Oe(e, n, t[n]);
101
105
  });
102
106
  }
103
- var Wn = Object.defineProperty;
104
- function xe(e, t, n, r) {
105
- Wn(e, t, Q(n && ie(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
107
+ var Gn = Object.defineProperty;
108
+ function Oe(e, t, n, r) {
109
+ Gn(e, t, Q(n && ie(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
106
110
  }
107
- function We(e) {
111
+ function qe(e) {
108
112
  return { from: function(t) {
109
- return e.prototype = Object.create(t.prototype), xe(e.prototype, "constructor", e), { extend: Ue.bind(null, e.prototype) };
113
+ return e.prototype = Object.create(t.prototype), Oe(e.prototype, "constructor", e), { extend: Ve.bind(null, e.prototype) };
110
114
  } };
111
115
  }
112
- var Ir = Object.getOwnPropertyDescriptor, Rr = [].slice;
113
- function _t(e, t, n) {
114
- return Rr.call(e, t, n);
116
+ var Fr = Object.getOwnPropertyDescriptor, Lr = [].slice;
117
+ function xt(e, t, n) {
118
+ return Lr.call(e, t, n);
115
119
  }
116
- function Vn(e, t) {
120
+ function Yn(e, t) {
117
121
  return t(e);
118
122
  }
119
- function tt(e) {
123
+ function rt(e) {
120
124
  if (!e)
121
125
  throw new Error("Assertion Failed");
122
126
  }
123
- function qn(e) {
124
- F.setImmediate ? setImmediate(e) : setTimeout(e, 0);
127
+ function Hn(e) {
128
+ N.setImmediate ? setImmediate(e) : setTimeout(e, 0);
125
129
  }
126
- function ye(e, t) {
130
+ function ve(e, t) {
127
131
  if (typeof t == "string" && ie(e, t))
128
132
  return e[t];
129
133
  if (!t)
130
134
  return e;
131
135
  if (typeof t != "string") {
132
136
  for (var n = [], r = 0, i = t.length; r < i; ++r) {
133
- var o = ye(e, t[r]);
137
+ var o = ve(e, t[r]);
134
138
  n.push(o);
135
139
  }
136
140
  return n;
@@ -138,82 +142,82 @@ var Ar = { exports: {} };
138
142
  var a = t.indexOf(".");
139
143
  if (a !== -1) {
140
144
  var u = e[t.substr(0, a)];
141
- return u == null ? void 0 : ye(u, t.substr(a + 1));
145
+ return u == null ? void 0 : ve(u, t.substr(a + 1));
142
146
  }
143
147
  }
144
148
  function ue(e, t, n) {
145
149
  if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e)))
146
150
  if (typeof t != "string" && "length" in t) {
147
- tt(typeof n != "string" && "length" in n);
151
+ rt(typeof n != "string" && "length" in n);
148
152
  for (var r = 0, i = t.length; r < i; ++r)
149
153
  ue(e, t[r], n[r]);
150
154
  } else {
151
155
  var o, a, u = t.indexOf(".");
152
- u !== -1 ? (o = t.substr(0, u), (a = t.substr(u + 1)) === "" ? n === void 0 ? z(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : ue(u = !(u = e[o]) || !ie(e, o) ? e[o] = {} : u, a, n)) : n === void 0 ? z(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
156
+ u !== -1 ? (o = t.substr(0, u), (a = t.substr(u + 1)) === "" ? n === void 0 ? $(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : ue(u = !(u = e[o]) || !ie(e, o) ? e[o] = {} : u, a, n)) : n === void 0 ? $(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
153
157
  }
154
158
  }
155
- function Gn(e) {
159
+ function Qn(e) {
156
160
  var t, n = {};
157
161
  for (t in e)
158
162
  ie(e, t) && (n[t] = e[t]);
159
163
  return n;
160
164
  }
161
- var Mr = [].concat;
162
- function Yn(e) {
163
- return Mr.apply([], e);
165
+ var $r = [].concat;
166
+ function Xn(e) {
167
+ return $r.apply([], e);
164
168
  }
165
- var he = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Yn([8, 16, 32, 64].map(function(e) {
169
+ var pe = "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) {
166
170
  return ["Int", "Uint", "Float"].map(function(t) {
167
171
  return t + e + "Array";
168
172
  });
169
173
  }))).filter(function(e) {
170
- return F[e];
171
- }), Hn = new Set(he.map(function(e) {
172
- return F[e];
173
- })), nt = null;
174
- function ke(e) {
175
- return nt = /* @__PURE__ */ new WeakMap(), e = function t(n) {
174
+ return N[e];
175
+ }), Jn = new Set(pe.map(function(e) {
176
+ return N[e];
177
+ })), it = null;
178
+ function Se(e) {
179
+ return it = /* @__PURE__ */ new WeakMap(), e = function t(n) {
176
180
  if (!n || typeof n != "object")
177
181
  return n;
178
- var r = nt.get(n);
182
+ var r = it.get(n);
179
183
  if (r)
180
184
  return r;
181
- if (z(n)) {
182
- r = [], nt.set(n, r);
185
+ if ($(n)) {
186
+ r = [], it.set(n, r);
183
187
  for (var i = 0, o = n.length; i < o; ++i)
184
188
  r.push(t(n[i]));
185
- } else if (Hn.has(n.constructor))
189
+ } else if (Jn.has(n.constructor))
186
190
  r = n;
187
191
  else {
188
- var a, u = _e(n);
189
- for (a in r = u === Object.prototype ? {} : Object.create(u), nt.set(n, r), n)
192
+ var a, u = xe(n);
193
+ for (a in r = u === Object.prototype ? {} : Object.create(u), it.set(n, r), n)
190
194
  ie(n, a) && (r[a] = t(n[a]));
191
195
  }
192
196
  return r;
193
- }(e), nt = null, e;
197
+ }(e), it = null, e;
194
198
  }
195
- var Fr = {}.toString;
196
- function Xt(e) {
197
- return Fr.call(e).slice(8, -1);
199
+ var zr = {}.toString;
200
+ function Zt(e) {
201
+ return zr.call(e).slice(8, -1);
198
202
  }
199
- var Jt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Nr = typeof Jt == "symbol" ? function(e) {
203
+ var en = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Ur = typeof en == "symbol" ? function(e) {
200
204
  var t;
201
- return e != null && (t = e[Jt]) && t.apply(e);
205
+ return e != null && (t = e[en]) && t.apply(e);
202
206
  } : function() {
203
207
  return null;
204
208
  };
205
- function Ae(e, t) {
209
+ function Te(e, t) {
206
210
  return t = e.indexOf(t), 0 <= t && e.splice(t, 1), 0 <= t;
207
211
  }
208
- var Ve = {};
209
- function me(e) {
212
+ var Ge = {};
213
+ function ge(e) {
210
214
  var t, n, r, i;
211
215
  if (arguments.length === 1) {
212
- if (z(e))
216
+ if ($(e))
213
217
  return e.slice();
214
- if (this === Ve && typeof e == "string")
218
+ if (this === Ge && typeof e == "string")
215
219
  return [e];
216
- if (i = Nr(e)) {
220
+ if (i = Ur(e)) {
217
221
  for (n = []; !(r = i.next()).done; )
218
222
  n.push(r.value);
219
223
  return n;
@@ -230,15 +234,15 @@ var Ar = { exports: {} };
230
234
  n[t] = arguments[t];
231
235
  return n;
232
236
  }
233
- var Zt = typeof Symbol < "u" ? function(e) {
237
+ var tn = typeof Symbol < "u" ? function(e) {
234
238
  return e[Symbol.toStringTag] === "AsyncFunction";
235
239
  } : function() {
236
240
  return !1;
237
- }, ot = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], ce = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(ot), Lr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
238
- function qe(e, t) {
241
+ }, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], ce = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(st), Wr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
242
+ function Ye(e, t) {
239
243
  this.name = e, this.message = t;
240
244
  }
241
- function Qn(e, t) {
245
+ function Zn(e, t) {
242
246
  return e + ". Errors: " + Object.keys(t).map(function(n) {
243
247
  return t[n].toString();
244
248
  }).filter(function(n, r, i) {
@@ -246,79 +250,79 @@ var Ar = { exports: {} };
246
250
  }).join(`
247
251
  `);
248
252
  }
249
- function xt(e, t, n, r) {
250
- this.failures = t, this.failedKeys = r, this.successCount = n, this.message = Qn(e, t);
253
+ function Ot(e, t, n, r) {
254
+ this.failures = t, this.failedKeys = r, this.successCount = n, this.message = Zn(e, t);
251
255
  }
252
- function Ge(e, t) {
256
+ function He(e, t) {
253
257
  this.name = "BulkError", this.failures = Object.keys(t).map(function(n) {
254
258
  return t[n];
255
- }), this.failuresByPos = t, this.message = Qn(e, this.failures);
259
+ }), this.failuresByPos = t, this.message = Zn(e, this.failures);
256
260
  }
257
- We(qe).from(Error).extend({ toString: function() {
261
+ qe(Ye).from(Error).extend({ toString: function() {
258
262
  return this.name + ": " + this.message;
259
- } }), We(xt).from(qe), We(Ge).from(qe);
260
- var en = ce.reduce(function(e, t) {
263
+ } }), qe(Ot).from(Ye), qe(He).from(Ye);
264
+ var nn = ce.reduce(function(e, t) {
261
265
  return e[t] = t + "Error", e;
262
- }, {}), zr = qe, R = ce.reduce(function(e, t) {
266
+ }, {}), Vr = Ye, R = ce.reduce(function(e, t) {
263
267
  var n = t + "Error";
264
268
  function r(i, o) {
265
269
  this.name = n, i ? typeof i == "string" ? (this.message = "".concat(i).concat(o ? `
266
- ` + o : ""), this.inner = o || null) : typeof i == "object" && (this.message = "".concat(i.name, " ").concat(i.message), this.inner = i) : (this.message = Lr[t] || n, this.inner = null);
270
+ ` + o : ""), this.inner = o || null) : typeof i == "object" && (this.message = "".concat(i.name, " ").concat(i.message), this.inner = i) : (this.message = Wr[t] || n, this.inner = null);
267
271
  }
268
- return We(r).from(zr), e[t] = r, e;
272
+ return qe(r).from(Vr), e[t] = r, e;
269
273
  }, {});
270
274
  R.Syntax = SyntaxError, R.Type = TypeError, R.Range = RangeError;
271
- var Xn = ot.reduce(function(e, t) {
275
+ var er = st.reduce(function(e, t) {
272
276
  return e[t + "Error"] = R[t], e;
273
- }, {}), kt = ce.reduce(function(e, t) {
277
+ }, {}), St = ce.reduce(function(e, t) {
274
278
  return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = R[t]), e;
275
279
  }, {});
276
280
  function q() {
277
281
  }
278
- function rt(e) {
282
+ function ot(e) {
279
283
  return e;
280
284
  }
281
- function $r(e, t) {
282
- return e == null || e === rt ? t : function(n) {
285
+ function qr(e, t) {
286
+ return e == null || e === ot ? t : function(n) {
283
287
  return t(e(n));
284
288
  };
285
289
  }
286
- function De(e, t) {
290
+ function Be(e, t) {
287
291
  return function() {
288
292
  e.apply(this, arguments), t.apply(this, arguments);
289
293
  };
290
294
  }
291
- function Ur(e, t) {
295
+ function Gr(e, t) {
292
296
  return e === q ? t : function() {
293
297
  var n = e.apply(this, arguments);
294
298
  n !== void 0 && (arguments[0] = n);
295
299
  var r = this.onsuccess, i = this.onerror;
296
300
  this.onsuccess = null, this.onerror = null;
297
301
  var o = t.apply(this, arguments);
298
- return r && (this.onsuccess = this.onsuccess ? De(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? De(i, this.onerror) : i), o !== void 0 ? o : n;
302
+ return r && (this.onsuccess = this.onsuccess ? Be(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? Be(i, this.onerror) : i), o !== void 0 ? o : n;
299
303
  };
300
304
  }
301
- function Wr(e, t) {
305
+ function Yr(e, t) {
302
306
  return e === q ? t : function() {
303
307
  e.apply(this, arguments);
304
308
  var n = this.onsuccess, r = this.onerror;
305
- this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? De(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? De(r, this.onerror) : r);
309
+ this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? Be(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? Be(r, this.onerror) : r);
306
310
  };
307
311
  }
308
- function Vr(e, t) {
312
+ function Hr(e, t) {
309
313
  return e === q ? t : function(n) {
310
314
  var r = e.apply(this, arguments);
311
315
  Q(n, r);
312
316
  var i = this.onsuccess, o = this.onerror;
313
- return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? De(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? De(o, this.onerror) : o), r === void 0 ? n === void 0 ? void 0 : n : Q(r, n);
317
+ return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? Be(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? Be(o, this.onerror) : o), r === void 0 ? n === void 0 ? void 0 : n : Q(r, n);
314
318
  };
315
319
  }
316
- function qr(e, t) {
320
+ function Qr(e, t) {
317
321
  return e === q ? t : function() {
318
322
  return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
319
323
  };
320
324
  }
321
- function tn(e, t) {
325
+ function rn(e, t) {
322
326
  return e === q ? t : function() {
323
327
  var n = e.apply(this, arguments);
324
328
  if (n && typeof n.then == "function") {
@@ -331,29 +335,29 @@ var Ar = { exports: {} };
331
335
  return t.apply(this, arguments);
332
336
  };
333
337
  }
334
- kt.ModifyError = xt, kt.DexieError = qe, kt.BulkError = Ge;
335
- var fe = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
336
- function Jn(e) {
337
- fe = e;
338
+ St.ModifyError = Ot, St.DexieError = Ye, St.BulkError = He;
339
+ var de = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
340
+ function tr(e) {
341
+ de = e;
338
342
  }
339
- var it = {}, Zn = 100, he = typeof Promise > "u" ? [] : function() {
343
+ var at = {}, nr = 100, pe = typeof Promise > "u" ? [] : function() {
340
344
  var e = Promise.resolve();
341
345
  if (typeof crypto > "u" || !crypto.subtle)
342
- return [e, _e(e), e];
346
+ return [e, xe(e), e];
343
347
  var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
344
- return [t, _e(t), e];
345
- }(), ot = he[0], ce = he[1], he = he[2], ce = ce && ce.then, at = ot && ot.constructor, nn = !!he, st = function(e, t) {
346
- ut.push([e, t]), Ot && (queueMicrotask(Yr), Ot = !1);
347
- }, rn = !0, Ot = !0, Te = [], St = [], on = rt, Oe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: q, pgp: !1, env: {}, finalize: q }, B = Oe, ut = [], Be = 0, Et = [];
348
+ return [t, xe(t), e];
349
+ }(), st = pe[0], ce = pe[1], pe = pe[2], ce = ce && ce.then, ut = st && st.constructor, on = !!pe, ct = function(e, t) {
350
+ lt.push([e, t]), Et && (queueMicrotask(Jr), Et = !1);
351
+ }, an = !0, Et = !0, Ie = [], Pt = [], sn = ot, Ee = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: q, pgp: !1, env: {}, finalize: q }, B = Ee, lt = [], Re = 0, jt = [];
348
352
  function A(e) {
349
353
  if (typeof this != "object")
350
354
  throw new TypeError("Promises must be constructed via new");
351
355
  this._listeners = [], this._lib = !1;
352
356
  var t = this._PSD = B;
353
357
  if (typeof e != "function") {
354
- if (e !== it)
358
+ if (e !== at)
355
359
  throw new TypeError("Not a function");
356
- return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && sn(this, this._value));
360
+ return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && cn(this, this._value));
357
361
  }
358
362
  this._state = null, this._value = null, ++t.ref, function n(r, i) {
359
363
  try {
@@ -361,129 +365,129 @@ var Ar = { exports: {} };
361
365
  if (r._state === null) {
362
366
  if (o === r)
363
367
  throw new TypeError("A promise cannot be resolved with itself.");
364
- var a = r._lib && Ye();
368
+ var a = r._lib && Qe();
365
369
  o && typeof o.then == "function" ? n(r, function(u, h) {
366
370
  o instanceof A ? o._then(u, h) : o.then(u, h);
367
- }) : (r._state = !0, r._value = o, tr(r)), a && He();
371
+ }) : (r._state = !0, r._value = o, ir(r)), a && Xe();
368
372
  }
369
- }, sn.bind(null, r));
373
+ }, cn.bind(null, r));
370
374
  } catch (o) {
371
- sn(r, o);
375
+ cn(r, o);
372
376
  }
373
377
  }(this, e);
374
378
  }
375
- var an = { get: function() {
376
- var e = B, t = Kt;
379
+ var un = { get: function() {
380
+ var e = B, t = Dt;
377
381
  function n(r, i) {
378
- var o = this, a = !e.global && (e !== B || t !== Kt), u = a && !Ee(), h = new A(function(l, m) {
379
- un(o, new er(rr(r, e, a, u), rr(i, e, a, u), l, m, e));
382
+ var o = this, a = !e.global && (e !== B || t !== Dt), u = a && !je(), h = new A(function(l, m) {
383
+ ln(o, new rr(ar(r, e, a, u), ar(i, e, a, u), l, m, e));
380
384
  });
381
385
  return this._consoleTask && (h._consoleTask = this._consoleTask), h;
382
386
  }
383
- return n.prototype = it, n;
387
+ return n.prototype = at, n;
384
388
  }, set: function(e) {
385
- xe(this, "then", e && e.prototype === it ? an : { get: function() {
389
+ Oe(this, "then", e && e.prototype === at ? un : { get: function() {
386
390
  return e;
387
- }, set: an.set });
391
+ }, set: un.set });
388
392
  } };
389
- function er(e, t, n, r, i) {
393
+ function rr(e, t, n, r, i) {
390
394
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.resolve = n, this.reject = r, this.psd = i;
391
395
  }
392
- function sn(e, t) {
396
+ function cn(e, t) {
393
397
  var n, r;
394
- St.push(t), e._state === null && (n = e._lib && Ye(), t = on(t), e._state = !1, e._value = t, r = e, Te.some(function(i) {
398
+ Pt.push(t), e._state === null && (n = e._lib && Qe(), t = sn(t), e._state = !1, e._value = t, r = e, Ie.some(function(i) {
395
399
  return i._value === r._value;
396
- }) || Te.push(r), tr(e), n && He());
400
+ }) || Ie.push(r), ir(e), n && Xe());
397
401
  }
398
- function tr(e) {
402
+ function ir(e) {
399
403
  var t = e._listeners;
400
404
  e._listeners = [];
401
405
  for (var n = 0, r = t.length; n < r; ++n)
402
- un(e, t[n]);
406
+ ln(e, t[n]);
403
407
  var i = e._PSD;
404
- --i.ref || i.finalize(), Be === 0 && (++Be, st(function() {
405
- --Be == 0 && cn();
408
+ --i.ref || i.finalize(), Re === 0 && (++Re, ct(function() {
409
+ --Re == 0 && fn();
406
410
  }, []));
407
411
  }
408
- function un(e, t) {
412
+ function ln(e, t) {
409
413
  if (e._state !== null) {
410
414
  var n = e._state ? t.onFulfilled : t.onRejected;
411
415
  if (n === null)
412
416
  return (e._state ? t.resolve : t.reject)(e._value);
413
- ++t.psd.ref, ++Be, st(Gr, [n, e, t]);
417
+ ++t.psd.ref, ++Re, ct(Xr, [n, e, t]);
414
418
  } else
415
419
  e._listeners.push(t);
416
420
  }
417
- function Gr(e, t, n) {
421
+ function Xr(e, t, n) {
418
422
  try {
419
423
  var r, i = t._value;
420
- !t._state && St.length && (St = []), r = fe && t._consoleTask ? t._consoleTask.run(function() {
424
+ !t._state && Pt.length && (Pt = []), r = de && t._consoleTask ? t._consoleTask.run(function() {
421
425
  return e(i);
422
- }) : e(i), t._state || St.indexOf(i) !== -1 || function(o) {
423
- for (var a = Te.length; a; )
424
- if (Te[--a]._value === o._value)
425
- return Te.splice(a, 1);
426
+ }) : e(i), t._state || Pt.indexOf(i) !== -1 || function(o) {
427
+ for (var a = Ie.length; a; )
428
+ if (Ie[--a]._value === o._value)
429
+ return Ie.splice(a, 1);
426
430
  }(t), n.resolve(r);
427
431
  } catch (o) {
428
432
  n.reject(o);
429
433
  } finally {
430
- --Be == 0 && cn(), --n.psd.ref || n.psd.finalize();
434
+ --Re == 0 && fn(), --n.psd.ref || n.psd.finalize();
431
435
  }
432
436
  }
433
- function Yr() {
434
- Ie(Oe, function() {
435
- Ye() && He();
437
+ function Jr() {
438
+ Me(Ee, function() {
439
+ Qe() && Xe();
436
440
  });
437
441
  }
438
- function Ye() {
439
- var e = rn;
440
- return Ot = rn = !1, e;
442
+ function Qe() {
443
+ var e = an;
444
+ return Et = an = !1, e;
441
445
  }
442
- function He() {
446
+ function Xe() {
443
447
  var e, t, n;
444
448
  do
445
- for (; 0 < ut.length; )
446
- for (e = ut, ut = [], n = e.length, t = 0; t < n; ++t) {
449
+ for (; 0 < lt.length; )
450
+ for (e = lt, lt = [], n = e.length, t = 0; t < n; ++t) {
447
451
  var r = e[t];
448
452
  r[0].apply(null, r[1]);
449
453
  }
450
- while (0 < ut.length);
451
- Ot = rn = !0;
454
+ while (0 < lt.length);
455
+ Et = an = !0;
452
456
  }
453
- function cn() {
454
- var e = Te;
455
- Te = [], e.forEach(function(r) {
457
+ function fn() {
458
+ var e = Ie;
459
+ Ie = [], e.forEach(function(r) {
456
460
  r._PSD.onunhandled.call(null, r._value, r);
457
461
  });
458
- for (var t = Et.slice(0), n = t.length; n; )
462
+ for (var t = jt.slice(0), n = t.length; n; )
459
463
  t[--n]();
460
464
  }
461
- function Pt(e) {
462
- return new A(it, !1, e);
465
+ function Ct(e) {
466
+ return new A(at, !1, e);
463
467
  }
464
468
  function H(e, t) {
465
469
  var n = B;
466
470
  return function() {
467
- var r = Ye(), i = B;
471
+ var r = Qe(), i = B;
468
472
  try {
469
- return Pe(n, !0), e.apply(this, arguments);
473
+ return Ce(n, !0), e.apply(this, arguments);
470
474
  } catch (o) {
471
475
  t && t(o);
472
476
  } finally {
473
- Pe(i, !1), r && He();
477
+ Ce(i, !1), r && Xe();
474
478
  }
475
479
  };
476
480
  }
477
- Ue(A.prototype, { then: an, _then: function(e, t) {
478
- un(this, new er(null, null, e, t, B));
481
+ Ve(A.prototype, { then: un, _then: function(e, t) {
482
+ ln(this, new rr(null, null, e, t, B));
479
483
  }, catch: function(e) {
480
484
  if (arguments.length === 1)
481
485
  return this.then(null, e);
482
486
  var t = e, n = arguments[1];
483
487
  return typeof t == "function" ? this.then(null, function(r) {
484
- return (r instanceof t ? n : Pt)(r);
488
+ return (r instanceof t ? n : Ct)(r);
485
489
  }) : this.then(null, function(r) {
486
- return (r && r.name === t ? n : Pt)(r);
490
+ return (r && r.name === t ? n : Ct)(r);
487
491
  });
488
492
  }, finally: function(e) {
489
493
  return this.then(function(t) {
@@ -492,7 +496,7 @@ var Ar = { exports: {} };
492
496
  });
493
497
  }, function(t) {
494
498
  return A.resolve(e()).then(function() {
495
- return Pt(t);
499
+ return Ct(t);
496
500
  });
497
501
  });
498
502
  }, timeout: function(e, t) {
@@ -503,8 +507,8 @@ var Ar = { exports: {} };
503
507
  }, e);
504
508
  n.then(r, i).finally(clearTimeout.bind(null, o));
505
509
  }) : this;
506
- } }), typeof Symbol < "u" && Symbol.toStringTag && xe(A.prototype, Symbol.toStringTag, "Dexie.Promise"), Oe.env = nr(), Ue(A, { all: function() {
507
- var e = me.apply(null, arguments).map(At);
510
+ } }), typeof Symbol < "u" && Symbol.toStringTag && Oe(A.prototype, Symbol.toStringTag, "Dexie.Promise"), Ee.env = or(), Ve(A, { all: function() {
511
+ var e = ge.apply(null, arguments).map(Tt);
508
512
  return new A(function(t, n) {
509
513
  e.length === 0 && t([]);
510
514
  var r = e.length;
@@ -517,9 +521,9 @@ var Ar = { exports: {} };
517
521
  }, resolve: function(e) {
518
522
  return e instanceof A ? e : e && typeof e.then == "function" ? new A(function(t, n) {
519
523
  e.then(t, n);
520
- }) : new A(it, !0, e);
521
- }, reject: Pt, race: function() {
522
- var e = me.apply(null, arguments).map(At);
524
+ }) : new A(at, !0, e);
525
+ }, reject: Ct, race: function() {
526
+ var e = ge.apply(null, arguments).map(Tt);
523
527
  return new A(function(t, n) {
524
528
  e.map(function(r) {
525
529
  return A.resolve(r).then(t, n);
@@ -530,33 +534,33 @@ var Ar = { exports: {} };
530
534
  }, set: function(e) {
531
535
  return B = e;
532
536
  } }, totalEchoes: { get: function() {
533
- return Kt;
534
- } }, newPSD: Se, usePSD: Ie, scheduler: { get: function() {
535
- return st;
537
+ return Dt;
538
+ } }, newPSD: Pe, usePSD: Me, scheduler: { get: function() {
539
+ return ct;
536
540
  }, set: function(e) {
537
- st = e;
541
+ ct = e;
538
542
  } }, rejectionMapper: { get: function() {
539
- return on;
543
+ return sn;
540
544
  }, set: function(e) {
541
- on = e;
545
+ sn = e;
542
546
  } }, follow: function(e, t) {
543
547
  return new A(function(n, r) {
544
- return Se(function(i, o) {
548
+ return Pe(function(i, o) {
545
549
  var a = B;
546
- a.unhandleds = [], a.onunhandled = o, a.finalize = De(function() {
550
+ a.unhandleds = [], a.onunhandled = o, a.finalize = Be(function() {
547
551
  var u, h = this;
548
552
  u = function() {
549
553
  h.unhandleds.length === 0 ? i() : o(h.unhandleds[0]);
550
- }, Et.push(function l() {
551
- u(), Et.splice(Et.indexOf(l), 1);
552
- }), ++Be, st(function() {
553
- --Be == 0 && cn();
554
+ }, jt.push(function l() {
555
+ u(), jt.splice(jt.indexOf(l), 1);
556
+ }), ++Re, ct(function() {
557
+ --Re == 0 && fn();
554
558
  }, []);
555
559
  }, a.finalize), e();
556
560
  }, t, n, r);
557
561
  });
558
- } }), at && (at.allSettled && xe(A, "allSettled", function() {
559
- var e = me.apply(null, arguments).map(At);
562
+ } }), ut && (ut.allSettled && Oe(A, "allSettled", function() {
563
+ var e = ge.apply(null, arguments).map(Tt);
560
564
  return new A(function(t) {
561
565
  e.length === 0 && t([]);
562
566
  var n = e.length, r = new Array(n);
@@ -570,8 +574,8 @@ var Ar = { exports: {} };
570
574
  });
571
575
  });
572
576
  });
573
- }), at.any && typeof AggregateError < "u" && xe(A, "any", function() {
574
- var e = me.apply(null, arguments).map(At);
577
+ }), ut.any && typeof AggregateError < "u" && Oe(A, "any", function() {
578
+ var e = ge.apply(null, arguments).map(Tt);
575
579
  return new A(function(t, n) {
576
580
  e.length === 0 && n(new AggregateError([]));
577
581
  var r = e.length, i = new Array(r);
@@ -584,83 +588,83 @@ var Ar = { exports: {} };
584
588
  });
585
589
  });
586
590
  }));
587
- var Z = { awaits: 0, echoes: 0, id: 0 }, Hr = 0, jt = [], Ct = 0, Kt = 0, Qr = 0;
588
- function Se(e, t, n, r) {
591
+ var Z = { awaits: 0, echoes: 0, id: 0 }, Zr = 0, Kt = [], At = 0, Dt = 0, ei = 0;
592
+ function Pe(e, t, n, r) {
589
593
  var i = B, o = Object.create(i);
590
- return o.parent = i, o.ref = 0, o.global = !1, o.id = ++Qr, Oe.env, o.env = nn ? { Promise: A, PromiseProp: { value: A, configurable: !0, writable: !0 }, all: A.all, race: A.race, allSettled: A.allSettled, any: A.any, resolve: A.resolve, reject: A.reject } : {}, t && Q(o, t), ++i.ref, o.finalize = function() {
594
+ return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ei, Ee.env, o.env = on ? { Promise: A, PromiseProp: { value: A, configurable: !0, writable: !0 }, all: A.all, race: A.race, allSettled: A.allSettled, any: A.any, resolve: A.resolve, reject: A.reject } : {}, t && Q(o, t), ++i.ref, o.finalize = function() {
591
595
  --this.parent.ref || this.parent.finalize();
592
- }, r = Ie(o, e, n, r), o.ref === 0 && o.finalize(), r;
596
+ }, r = Me(o, e, n, r), o.ref === 0 && o.finalize(), r;
593
597
  }
594
- function Qe() {
595
- return Z.id || (Z.id = ++Hr), ++Z.awaits, Z.echoes += Zn, Z.id;
598
+ function Je() {
599
+ return Z.id || (Z.id = ++Zr), ++Z.awaits, Z.echoes += nr, Z.id;
596
600
  }
597
- function Ee() {
598
- return !!Z.awaits && (--Z.awaits == 0 && (Z.id = 0), Z.echoes = Z.awaits * Zn, !0);
601
+ function je() {
602
+ return !!Z.awaits && (--Z.awaits == 0 && (Z.id = 0), Z.echoes = Z.awaits * nr, !0);
599
603
  }
600
- function At(e) {
601
- return Z.echoes && e && e.constructor === at ? (Qe(), e.then(function(t) {
602
- return Ee(), t;
604
+ function Tt(e) {
605
+ return Z.echoes && e && e.constructor === ut ? (Je(), e.then(function(t) {
606
+ return je(), t;
603
607
  }, function(t) {
604
- return Ee(), X(t);
608
+ return je(), X(t);
605
609
  })) : e;
606
610
  }
607
- function Xr() {
608
- var e = jt[jt.length - 1];
609
- jt.pop(), Pe(e, !1);
611
+ function ti() {
612
+ var e = Kt[Kt.length - 1];
613
+ Kt.pop(), Ce(e, !1);
610
614
  }
611
- function Pe(e, t) {
615
+ function Ce(e, t) {
612
616
  var n, r = B;
613
- (t ? !Z.echoes || Ct++ && e === B : !Ct || --Ct && e === B) || queueMicrotask(t ? (function(i) {
614
- ++Kt, Z.echoes && --Z.echoes != 0 || (Z.echoes = Z.awaits = Z.id = 0), jt.push(B), Pe(i, !0);
615
- }).bind(null, e) : Xr), e !== B && (B = e, r === Oe && (Oe.env = nr()), nn && (n = Oe.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(F, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
617
+ (t ? !Z.echoes || At++ && e === B : !At || --At && e === B) || queueMicrotask(t ? (function(i) {
618
+ ++Dt, Z.echoes && --Z.echoes != 0 || (Z.echoes = Z.awaits = Z.id = 0), Kt.push(B), Ce(i, !0);
619
+ }).bind(null, e) : ti), e !== B && (B = e, r === Ee && (Ee.env = or()), on && (n = Ee.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(N, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
616
620
  }
617
- function nr() {
618
- var e = F.Promise;
619
- return nn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(F, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
621
+ function or() {
622
+ var e = N.Promise;
623
+ return on ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(N, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
620
624
  }
621
- function Ie(e, t, n, r, i) {
625
+ function Me(e, t, n, r, i) {
622
626
  var o = B;
623
627
  try {
624
- return Pe(e, !0), t(n, r, i);
628
+ return Ce(e, !0), t(n, r, i);
625
629
  } finally {
626
- Pe(o, !1);
630
+ Ce(o, !1);
627
631
  }
628
632
  }
629
- function rr(e, t, n, r) {
633
+ function ar(e, t, n, r) {
630
634
  return typeof e != "function" ? e : function() {
631
635
  var i = B;
632
- n && Qe(), Pe(t, !0);
636
+ n && Je(), Ce(t, !0);
633
637
  try {
634
638
  return e.apply(this, arguments);
635
639
  } finally {
636
- Pe(i, !1), r && queueMicrotask(Ee);
640
+ Ce(i, !1), r && queueMicrotask(je);
637
641
  }
638
642
  };
639
643
  }
640
- function ln(e) {
641
- Promise === at && Z.echoes === 0 ? Ct === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
644
+ function hn(e) {
645
+ Promise === ut && Z.echoes === 0 ? At === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
642
646
  }
643
- ("" + ce).indexOf("[native code]") === -1 && (Qe = Ee = q);
644
- var X = A.reject, he = "4.0.1-beta.10", Re = "￿", ve = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Xe = [], Dt = "__dbnames", fn = "readonly", hn = "readwrite";
645
- function Me(e, t) {
647
+ ("" + ce).indexOf("[native code]") === -1 && (Je = je = q);
648
+ var X = A.reject, pe = "4.0.1-beta.10", Ne = "￿", be = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", sr = "String expected.", Ze = [], Bt = "__dbnames", dn = "readonly", pn = "readwrite";
649
+ function Fe(e, t) {
646
650
  return e ? t ? function() {
647
651
  return e.apply(this, arguments) && t.apply(this, arguments);
648
652
  } : e : t;
649
653
  }
650
- var or = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
651
- function Tt(e) {
654
+ var ur = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
655
+ function It(e) {
652
656
  return typeof e != "string" || /\./.test(e) ? function(t) {
653
657
  return t;
654
658
  } : function(t) {
655
- return t[e] === void 0 && e in t && delete (t = ke(t))[e], t;
659
+ return t[e] === void 0 && e in t && delete (t = Se(t))[e], t;
656
660
  };
657
661
  }
658
- function ar() {
662
+ function cr() {
659
663
  throw R.Type();
660
664
  }
661
665
  function U(e, t) {
662
666
  try {
663
- var n = sr(e), r = sr(t);
667
+ var n = lr(e), r = lr(t);
664
668
  if (n !== r)
665
669
  return n === "Array" ? 1 : r === "Array" ? -1 : n === "binary" ? 1 : r === "binary" ? -1 : n === "string" ? 1 : r === "string" ? -1 : n === "Date" ? 1 : r !== "Date" ? NaN : -1;
666
670
  switch (n) {
@@ -674,7 +678,7 @@ var Ar = { exports: {} };
674
678
  if (i[l] !== o[l])
675
679
  return i[l] < o[l] ? -1 : 1;
676
680
  return a === u ? 0 : a < u ? -1 : 1;
677
- }(ur(e), ur(t));
681
+ }(fr(e), fr(t));
678
682
  case "Array":
679
683
  return function(i, o) {
680
684
  for (var a = i.length, u = o.length, h = a < u ? a : u, l = 0; l < h; ++l) {
@@ -689,23 +693,23 @@ var Ar = { exports: {} };
689
693
  }
690
694
  return NaN;
691
695
  }
692
- function sr(e) {
696
+ function lr(e) {
693
697
  var t = typeof e;
694
- return t != "object" ? t : ArrayBuffer.isView(e) ? "binary" : (e = Xt(e), e === "ArrayBuffer" ? "binary" : e);
698
+ return t != "object" ? t : ArrayBuffer.isView(e) ? "binary" : (e = Zt(e), e === "ArrayBuffer" ? "binary" : e);
695
699
  }
696
- function ur(e) {
700
+ function fr(e) {
697
701
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
698
702
  }
699
- var cr = (Y.prototype._trans = function(e, t, n) {
700
- var r = this._tx || B.trans, i = this.name, o = fe && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
703
+ var hr = (Y.prototype._trans = function(e, t, n) {
704
+ var r = this._tx || B.trans, i = this.name, o = de && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
701
705
  function a(l, m, c) {
702
706
  if (!c.schema[i])
703
707
  throw new R.NotFound("Table " + i + " not part of transaction");
704
708
  return t(c.idbtrans, c);
705
709
  }
706
- var u = Ye();
710
+ var u = Qe();
707
711
  try {
708
- var h = r && r.db._novip === this.db._novip ? r === B.trans ? r._promise(e, a, n) : Se(function() {
712
+ var h = r && r.db._novip === this.db._novip ? r === B.trans ? r._promise(e, a, n) : Pe(function() {
709
713
  return r._promise(e, a, n);
710
714
  }, { trans: r, transless: B.transless || B }) : function l(m, c, f, d) {
711
715
  if (m.idbdb && (m._state.openComplete || B.letThrough || m._vip)) {
@@ -713,12 +717,12 @@ var Ar = { exports: {} };
713
717
  try {
714
718
  y.create(), m._state.PR1398_maxLoop = 3;
715
719
  } catch (v) {
716
- return v.name === en.InvalidState && m.isOpen() && 0 < --m._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), m.close({ disableAutoOpen: !1 }), m.open().then(function() {
720
+ return v.name === nn.InvalidState && m.isOpen() && 0 < --m._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), m.close({ disableAutoOpen: !1 }), m.open().then(function() {
717
721
  return l(m, c, f, d);
718
722
  })) : X(v);
719
723
  }
720
724
  return y._promise(c, function(v, p) {
721
- return Se(function() {
725
+ return Pe(function() {
722
726
  return B.trans = y, d(v, p, y);
723
727
  });
724
728
  }).then(function(v) {
@@ -747,7 +751,7 @@ var Ar = { exports: {} };
747
751
  return console.trace(l), X(l);
748
752
  })), h;
749
753
  } finally {
750
- u && He();
754
+ u && Xe();
751
755
  }
752
756
  }, Y.prototype.get = function(e, t) {
753
757
  var n = this;
@@ -759,7 +763,7 @@ var Ar = { exports: {} };
759
763
  }, Y.prototype.where = function(e) {
760
764
  if (typeof e == "string")
761
765
  return new this.db.WhereClause(this, e);
762
- if (z(e))
766
+ if ($(e))
763
767
  return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
764
768
  var t = C(e);
765
769
  if (t.length === 1)
@@ -777,25 +781,25 @@ var Ar = { exports: {} };
777
781
  }).sort(function(h, l) {
778
782
  return h.keyPath.length - l.keyPath.length;
779
783
  })[0];
780
- if (n && this.db._maxKey !== Re) {
784
+ if (n && this.db._maxKey !== Ne) {
781
785
  var a = n.keyPath.slice(0, t.length);
782
786
  return this.where(a).equals(a.map(function(l) {
783
787
  return e[l];
784
788
  }));
785
789
  }
786
- !n && fe && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
790
+ !n && de && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
787
791
  var r = this.schema.idxByName, i = this.db._deps.indexedDB;
788
792
  function o(h, l) {
789
793
  return i.cmp(h, l) === 0;
790
794
  }
791
795
  var u = t.reduce(function(f, l) {
792
796
  var m = f[0], c = f[1], f = r[l], d = e[l];
793
- return [m || f, m || !f ? Me(c, f && f.multi ? function(y) {
794
- return y = ye(y, l), z(y) && y.some(function(v) {
797
+ return [m || f, m || !f ? Fe(c, f && f.multi ? function(y) {
798
+ return y = ve(y, l), $(y) && y.some(function(v) {
795
799
  return o(d, v);
796
800
  });
797
801
  } : function(y) {
798
- return o(d, ye(y, l));
802
+ return o(d, ve(y, l));
799
803
  }) : c];
800
804
  }, [null, null]), a = u[0], u = u[1];
801
805
  return a ? this.where(a.name).equals(e[a.keyPath]).filter(u) : n ? this.filter(u) : this.where(t).equals("");
@@ -814,7 +818,7 @@ var Ar = { exports: {} };
814
818
  }, Y.prototype.toCollection = function() {
815
819
  return new this.db.Collection(new this.db.WhereClause(this));
816
820
  }, Y.prototype.orderBy = function(e) {
817
- return new this.db.Collection(new this.db.WhereClause(this, z(e) ? "[".concat(e.join("+"), "]") : e));
821
+ return new this.db.Collection(new this.db.WhereClause(this, $(e) ? "[".concat(e.join("+"), "]") : e));
818
822
  }, Y.prototype.reverse = function() {
819
823
  return this.toCollection().reverse();
820
824
  }, Y.prototype.mapToClass = function(e) {
@@ -822,19 +826,19 @@ var Ar = { exports: {} };
822
826
  function i() {
823
827
  return t !== null && t.apply(this, arguments) || this;
824
828
  }
825
- (this.schema.mappedClass = e).prototype instanceof ar && (function(h, l) {
829
+ (this.schema.mappedClass = e).prototype instanceof cr && (function(h, l) {
826
830
  if (typeof l != "function" && l !== null)
827
831
  throw new TypeError("Class extends value " + String(l) + " is not a constructor or null");
828
832
  function m() {
829
833
  this.constructor = h;
830
834
  }
831
- k(h, l), h.prototype = l === null ? Object.create(l) : (m.prototype = l.prototype, new m());
835
+ x(h, l), h.prototype = l === null ? Object.create(l) : (m.prototype = l.prototype, new m());
832
836
  }(i, t = e), Object.defineProperty(i.prototype, "db", { get: function() {
833
837
  return n;
834
838
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
835
839
  return r;
836
840
  }, e = i);
837
- for (var o = /* @__PURE__ */ new Set(), a = e.prototype; a; a = _e(a))
841
+ for (var o = /* @__PURE__ */ new Set(), a = e.prototype; a; a = xe(a))
838
842
  Object.getOwnPropertyNames(a).forEach(function(h) {
839
843
  return o.add(h);
840
844
  });
@@ -857,7 +861,7 @@ var Ar = { exports: {} };
857
861
  });
858
862
  }, Y.prototype.add = function(e, t) {
859
863
  var n = this, r = this.schema.primKey, i = r.auto, o = r.keyPath, a = e;
860
- return o && i && (a = Tt(o)(e)), this._trans("readwrite", function(u) {
864
+ return o && i && (a = It(o)(e)), this._trans("readwrite", function(u) {
861
865
  return n.core.mutate({ trans: u, type: "add", keys: t != null ? [t] : null, values: [a] });
862
866
  }).then(function(u) {
863
867
  return u.numFailures ? A.reject(u.failures[0]) : u.lastResult;
@@ -870,10 +874,10 @@ var Ar = { exports: {} };
870
874
  return u;
871
875
  });
872
876
  }, Y.prototype.update = function(e, t) {
873
- return typeof e != "object" || z(e) ? this.where(":id").equals(e).modify(t) : (e = ye(e, this.schema.primKey.keyPath), e === void 0 ? X(new R.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
877
+ return typeof e != "object" || $(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? X(new R.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
874
878
  }, Y.prototype.put = function(e, t) {
875
879
  var n = this, r = this.schema.primKey, i = r.auto, o = r.keyPath, a = e;
876
- return o && i && (a = Tt(o)(e)), this._trans("readwrite", function(u) {
880
+ return o && i && (a = It(o)(e)), this._trans("readwrite", function(u) {
877
881
  return n.core.mutate({ trans: u, type: "put", values: [a], keys: t != null ? [t] : null });
878
882
  }).then(function(u) {
879
883
  return u.numFailures ? A.reject(u.failures[0]) : u.lastResult;
@@ -895,7 +899,7 @@ var Ar = { exports: {} };
895
899
  }, Y.prototype.clear = function() {
896
900
  var e = this;
897
901
  return this._trans("readwrite", function(t) {
898
- return e.core.mutate({ trans: t, type: "deleteRange", range: or });
902
+ return e.core.mutate({ trans: t, type: "deleteRange", range: ur });
899
903
  }).then(function(t) {
900
904
  return t.numFailures ? A.reject(t.failures[0]) : void 0;
901
905
  });
@@ -916,12 +920,12 @@ var Ar = { exports: {} };
916
920
  throw new R.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
917
921
  if (i && i.length !== e.length)
918
922
  throw new R.InvalidArgument("Arguments objects and keys must have the same length");
919
- var h = e.length, l = l && u ? e.map(Tt(l)) : e;
923
+ var h = e.length, l = l && u ? e.map(It(l)) : e;
920
924
  return r.core.mutate({ trans: a, type: "add", keys: i, values: l, wantResults: o }).then(function(y) {
921
925
  var c = y.numFailures, f = y.results, d = y.lastResult, y = y.failures;
922
926
  if (c === 0)
923
927
  return o ? f : d;
924
- throw new Ge("".concat(r.name, ".bulkAdd(): ").concat(c, " of ").concat(h, " operations failed"), y);
928
+ throw new He("".concat(r.name, ".bulkAdd(): ").concat(c, " of ").concat(h, " operations failed"), y);
925
929
  });
926
930
  });
927
931
  }, Y.prototype.bulkPut = function(e, t, n) {
@@ -932,12 +936,12 @@ var Ar = { exports: {} };
932
936
  throw new R.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
933
937
  if (i && i.length !== e.length)
934
938
  throw new R.InvalidArgument("Arguments objects and keys must have the same length");
935
- var h = e.length, l = l && u ? e.map(Tt(l)) : e;
939
+ var h = e.length, l = l && u ? e.map(It(l)) : e;
936
940
  return r.core.mutate({ trans: a, type: "put", keys: i, values: l, wantResults: o }).then(function(y) {
937
941
  var c = y.numFailures, f = y.results, d = y.lastResult, y = y.failures;
938
942
  if (c === 0)
939
943
  return o ? f : d;
940
- throw new Ge("".concat(r.name, ".bulkPut(): ").concat(c, " of ").concat(h, " operations failed"), y);
944
+ throw new He("".concat(r.name, ".bulkPut(): ").concat(c, " of ").concat(h, " operations failed"), y);
941
945
  });
942
946
  });
943
947
  }, Y.prototype.bulkUpdate = function(e) {
@@ -972,7 +976,7 @@ var Ar = { exports: {} };
972
976
  var p, g = v[y], b = o[Number(g)];
973
977
  b != null && (p = d[g], delete d[g], d[b] = p);
974
978
  }
975
- throw new Ge("".concat(t.name, ".bulkUpdate(): ").concat(f, " of ").concat(m, " operations failed"), d);
979
+ throw new He("".concat(t.name, ".bulkUpdate(): ").concat(f, " of ").concat(m, " operations failed"), d);
976
980
  });
977
981
  });
978
982
  });
@@ -984,12 +988,12 @@ var Ar = { exports: {} };
984
988
  var i = a.numFailures, o = a.lastResult, a = a.failures;
985
989
  if (i === 0)
986
990
  return o;
987
- throw new Ge("".concat(t.name, ".bulkDelete(): ").concat(i, " of ").concat(n, " operations failed"), a);
991
+ throw new He("".concat(t.name, ".bulkDelete(): ").concat(i, " of ").concat(n, " operations failed"), a);
988
992
  });
989
993
  }, Y);
990
994
  function Y() {
991
995
  }
992
- function ct(e) {
996
+ function ft(e) {
993
997
  function t(a, u) {
994
998
  if (u) {
995
999
  for (var h = arguments.length, l = new Array(h - 1); --h; )
@@ -1007,7 +1011,7 @@ var Ar = { exports: {} };
1007
1011
  function o(a, u, h) {
1008
1012
  if (typeof a != "object") {
1009
1013
  var l;
1010
- u = u || qr;
1014
+ u = u || Qr;
1011
1015
  var m = { subscribers: [], fire: h = h || q, subscribe: function(c) {
1012
1016
  m.subscribers.indexOf(c) === -1 && (m.subscribers.push(c), m.fire = u(m.fire, c));
1013
1017
  }, unsubscribe: function(c) {
@@ -1019,16 +1023,16 @@ var Ar = { exports: {} };
1019
1023
  }
1020
1024
  C(l = a).forEach(function(c) {
1021
1025
  var f = l[c];
1022
- if (z(f))
1026
+ if ($(f))
1023
1027
  o(c, l[c][0], l[c][1]);
1024
1028
  else {
1025
1029
  if (f !== "asap")
1026
1030
  throw new R.InvalidArgument("Invalid event config");
1027
- var d = o(c, rt, function() {
1031
+ var d = o(c, ot, function() {
1028
1032
  for (var y = arguments.length, v = new Array(y); y--; )
1029
1033
  v[y] = arguments[y];
1030
1034
  d.subscribers.forEach(function(p) {
1031
- qn(function() {
1035
+ Hn(function() {
1032
1036
  p.apply(null, v);
1033
1037
  });
1034
1038
  });
@@ -1037,22 +1041,22 @@ var Ar = { exports: {} };
1037
1041
  });
1038
1042
  }
1039
1043
  }
1040
- function lt(e, t) {
1041
- return We(t).from({ prototype: e }), t;
1044
+ function ht(e, t) {
1045
+ return qe(t).from({ prototype: e }), t;
1042
1046
  }
1043
- function Je(e, t) {
1047
+ function et(e, t) {
1044
1048
  return !(e.filter || e.algorithm || e.or) && (t ? e.justLimit : !e.replayFilter);
1045
1049
  }
1046
- function dn(e, t) {
1047
- e.filter = Me(e.filter, t);
1050
+ function yn(e, t) {
1051
+ e.filter = Fe(e.filter, t);
1048
1052
  }
1049
- function pn(e, t, n) {
1053
+ function mn(e, t, n) {
1050
1054
  var r = e.replayFilter;
1051
1055
  e.replayFilter = r ? function() {
1052
- return Me(r(), t());
1056
+ return Fe(r(), t());
1053
1057
  } : t, e.justLimit = n && !r;
1054
1058
  }
1055
- function Bt(e, t) {
1059
+ function Rt(e, t) {
1056
1060
  if (e.isPrimKey)
1057
1061
  return t.primaryKey;
1058
1062
  var n = t.getIndexByKeyPath(e.index);
@@ -1060,12 +1064,12 @@ var Ar = { exports: {} };
1060
1064
  throw new R.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
1061
1065
  return n;
1062
1066
  }
1063
- function lr(e, t, n) {
1064
- var r = Bt(e, t.schema);
1067
+ function dr(e, t, n) {
1068
+ var r = Rt(e, t.schema);
1065
1069
  return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: r, range: e.range } });
1066
1070
  }
1067
- function It(e, t, n, r) {
1068
- var i = e.replayFilter ? Me(e.filter, e.replayFilter()) : e.filter;
1071
+ function Mt(e, t, n, r) {
1072
+ var i = e.replayFilter ? Fe(e.filter, e.replayFilter()) : e.filter;
1069
1073
  if (e.or) {
1070
1074
  var o = {}, a = function(u, h, l) {
1071
1075
  var m, c;
@@ -1075,11 +1079,11 @@ var Ar = { exports: {} };
1075
1079
  return h.fail(f);
1076
1080
  }) || ((c = "" + (m = h.primaryKey)) == "[object ArrayBuffer]" && (c = "" + new Uint8Array(m)), ie(o, c) || (o[c] = !0, t(u, h, l)));
1077
1081
  };
1078
- return Promise.all([e.or._iterate(a, n), fr(lr(e, r, n), e.algorithm, a, !e.keysOnly && e.valueMapper)]);
1082
+ return Promise.all([e.or._iterate(a, n), pr(dr(e, r, n), e.algorithm, a, !e.keysOnly && e.valueMapper)]);
1079
1083
  }
1080
- return fr(lr(e, r, n), Me(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
1084
+ return pr(dr(e, r, n), Fe(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
1081
1085
  }
1082
- function fr(e, t, n, r) {
1086
+ function pr(e, t, n, r) {
1083
1087
  var i = H(r ? function(o, a, u) {
1084
1088
  return n(r(o), a, u);
1085
1089
  } : n);
@@ -1101,43 +1105,43 @@ var Ar = { exports: {} };
1101
1105
  });
1102
1106
  });
1103
1107
  }
1104
- var Jr = ($.prototype._read = function(e, t) {
1108
+ var ni = (z.prototype._read = function(e, t) {
1105
1109
  var n = this._ctx;
1106
1110
  return n.error ? n.table._trans(null, X.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
1107
- }, $.prototype._write = function(e) {
1111
+ }, z.prototype._write = function(e) {
1108
1112
  var t = this._ctx;
1109
1113
  return t.error ? t.table._trans(null, X.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1110
- }, $.prototype._addAlgorithm = function(e) {
1114
+ }, z.prototype._addAlgorithm = function(e) {
1111
1115
  var t = this._ctx;
1112
- t.algorithm = Me(t.algorithm, e);
1113
- }, $.prototype._iterate = function(e, t) {
1114
- return It(this._ctx, e, t, this._ctx.table.core);
1115
- }, $.prototype.clone = function(e) {
1116
+ t.algorithm = Fe(t.algorithm, e);
1117
+ }, z.prototype._iterate = function(e, t) {
1118
+ return Mt(this._ctx, e, t, this._ctx.table.core);
1119
+ }, z.prototype.clone = function(e) {
1116
1120
  var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1117
1121
  return e && Q(n, e), t._ctx = n, t;
1118
- }, $.prototype.raw = function() {
1122
+ }, z.prototype.raw = function() {
1119
1123
  return this._ctx.valueMapper = null, this;
1120
- }, $.prototype.each = function(e) {
1124
+ }, z.prototype.each = function(e) {
1121
1125
  var t = this._ctx;
1122
1126
  return this._read(function(n) {
1123
- return It(t, e, n, t.table.core);
1127
+ return Mt(t, e, n, t.table.core);
1124
1128
  });
1125
- }, $.prototype.count = function(e) {
1129
+ }, z.prototype.count = function(e) {
1126
1130
  var t = this;
1127
1131
  return this._read(function(n) {
1128
1132
  var r = t._ctx, i = r.table.core;
1129
- if (Je(r, !0))
1130
- return i.count({ trans: n, query: { index: Bt(r, i.schema), range: r.range } }).then(function(a) {
1133
+ if (et(r, !0))
1134
+ return i.count({ trans: n, query: { index: Rt(r, i.schema), range: r.range } }).then(function(a) {
1131
1135
  return Math.min(a, r.limit);
1132
1136
  });
1133
1137
  var o = 0;
1134
- return It(r, function() {
1138
+ return Mt(r, function() {
1135
1139
  return ++o, !1;
1136
1140
  }, n, i).then(function() {
1137
1141
  return o;
1138
1142
  });
1139
1143
  }).then(e);
1140
- }, $.prototype.sortBy = function(e, t) {
1144
+ }, z.prototype.sortBy = function(e, t) {
1141
1145
  var n = e.split(".").reverse(), r = n[0], i = n.length - 1;
1142
1146
  function o(h, l) {
1143
1147
  return l ? o(h[n[l]], l - 1) : h[r];
@@ -1149,81 +1153,81 @@ var Ar = { exports: {} };
1149
1153
  return this.toArray(function(h) {
1150
1154
  return h.sort(u);
1151
1155
  }).then(t);
1152
- }, $.prototype.toArray = function(e) {
1156
+ }, z.prototype.toArray = function(e) {
1153
1157
  var t = this;
1154
1158
  return this._read(function(n) {
1155
1159
  var r = t._ctx;
1156
- if (r.dir === "next" && Je(r, !0) && 0 < r.limit) {
1157
- var i = r.valueMapper, o = Bt(r, r.table.core.schema);
1160
+ if (r.dir === "next" && et(r, !0) && 0 < r.limit) {
1161
+ var i = r.valueMapper, o = Rt(r, r.table.core.schema);
1158
1162
  return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: o, range: r.range } }).then(function(u) {
1159
1163
  return u = u.result, i ? u.map(i) : u;
1160
1164
  });
1161
1165
  }
1162
1166
  var a = [];
1163
- return It(r, function(u) {
1167
+ return Mt(r, function(u) {
1164
1168
  return a.push(u);
1165
1169
  }, n, r.table.core).then(function() {
1166
1170
  return a;
1167
1171
  });
1168
1172
  }, e);
1169
- }, $.prototype.offset = function(e) {
1173
+ }, z.prototype.offset = function(e) {
1170
1174
  var t = this._ctx;
1171
- return e <= 0 || (t.offset += e, Je(t) ? pn(t, function() {
1175
+ return e <= 0 || (t.offset += e, et(t) ? mn(t, function() {
1172
1176
  var n = e;
1173
1177
  return function(r, i) {
1174
1178
  return n === 0 || (n === 1 ? --n : i(function() {
1175
1179
  r.advance(n), n = 0;
1176
1180
  }), !1);
1177
1181
  };
1178
- }) : pn(t, function() {
1182
+ }) : mn(t, function() {
1179
1183
  var n = e;
1180
1184
  return function() {
1181
1185
  return --n < 0;
1182
1186
  };
1183
1187
  })), this;
1184
- }, $.prototype.limit = function(e) {
1185
- return this._ctx.limit = Math.min(this._ctx.limit, e), pn(this._ctx, function() {
1188
+ }, z.prototype.limit = function(e) {
1189
+ return this._ctx.limit = Math.min(this._ctx.limit, e), mn(this._ctx, function() {
1186
1190
  var t = e;
1187
1191
  return function(n, r, i) {
1188
1192
  return --t <= 0 && r(i), 0 <= t;
1189
1193
  };
1190
1194
  }, !0), this;
1191
- }, $.prototype.until = function(e, t) {
1192
- return dn(this._ctx, function(n, r, i) {
1195
+ }, z.prototype.until = function(e, t) {
1196
+ return yn(this._ctx, function(n, r, i) {
1193
1197
  return !e(n.value) || (r(i), t);
1194
1198
  }), this;
1195
- }, $.prototype.first = function(e) {
1199
+ }, z.prototype.first = function(e) {
1196
1200
  return this.limit(1).toArray(function(t) {
1197
1201
  return t[0];
1198
1202
  }).then(e);
1199
- }, $.prototype.last = function(e) {
1203
+ }, z.prototype.last = function(e) {
1200
1204
  return this.reverse().first(e);
1201
- }, $.prototype.filter = function(e) {
1205
+ }, z.prototype.filter = function(e) {
1202
1206
  var t;
1203
- return dn(this._ctx, function(n) {
1207
+ return yn(this._ctx, function(n) {
1204
1208
  return e(n.value);
1205
- }), (t = this._ctx).isMatch = Me(t.isMatch, e), this;
1206
- }, $.prototype.and = function(e) {
1209
+ }), (t = this._ctx).isMatch = Fe(t.isMatch, e), this;
1210
+ }, z.prototype.and = function(e) {
1207
1211
  return this.filter(e);
1208
- }, $.prototype.or = function(e) {
1212
+ }, z.prototype.or = function(e) {
1209
1213
  return new this.db.WhereClause(this._ctx.table, e, this);
1210
- }, $.prototype.reverse = function() {
1214
+ }, z.prototype.reverse = function() {
1211
1215
  return this._ctx.dir = this._ctx.dir === "prev" ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this;
1212
- }, $.prototype.desc = function() {
1216
+ }, z.prototype.desc = function() {
1213
1217
  return this.reverse();
1214
- }, $.prototype.eachKey = function(e) {
1218
+ }, z.prototype.eachKey = function(e) {
1215
1219
  var t = this._ctx;
1216
1220
  return t.keysOnly = !t.isMatch, this.each(function(n, r) {
1217
1221
  e(r.key, r);
1218
1222
  });
1219
- }, $.prototype.eachUniqueKey = function(e) {
1223
+ }, z.prototype.eachUniqueKey = function(e) {
1220
1224
  return this._ctx.unique = "unique", this.eachKey(e);
1221
- }, $.prototype.eachPrimaryKey = function(e) {
1225
+ }, z.prototype.eachPrimaryKey = function(e) {
1222
1226
  var t = this._ctx;
1223
1227
  return t.keysOnly = !t.isMatch, this.each(function(n, r) {
1224
1228
  e(r.primaryKey, r);
1225
1229
  });
1226
- }, $.prototype.keys = function(e) {
1230
+ }, z.prototype.keys = function(e) {
1227
1231
  var t = this._ctx;
1228
1232
  t.keysOnly = !t.isMatch;
1229
1233
  var n = [];
@@ -1232,11 +1236,11 @@ var Ar = { exports: {} };
1232
1236
  }).then(function() {
1233
1237
  return n;
1234
1238
  }).then(e);
1235
- }, $.prototype.primaryKeys = function(e) {
1239
+ }, z.prototype.primaryKeys = function(e) {
1236
1240
  var t = this._ctx;
1237
- if (t.dir === "next" && Je(t, !0) && 0 < t.limit)
1241
+ if (t.dir === "next" && et(t, !0) && 0 < t.limit)
1238
1242
  return this._read(function(r) {
1239
- var i = Bt(t, t.table.core.schema);
1243
+ var i = Rt(t, t.table.core.schema);
1240
1244
  return t.table.core.query({ trans: r, values: !1, limit: t.limit, query: { index: i, range: t.range } });
1241
1245
  }).then(function(r) {
1242
1246
  return r.result;
@@ -1248,39 +1252,39 @@ var Ar = { exports: {} };
1248
1252
  }).then(function() {
1249
1253
  return n;
1250
1254
  }).then(e);
1251
- }, $.prototype.uniqueKeys = function(e) {
1255
+ }, z.prototype.uniqueKeys = function(e) {
1252
1256
  return this._ctx.unique = "unique", this.keys(e);
1253
- }, $.prototype.firstKey = function(e) {
1257
+ }, z.prototype.firstKey = function(e) {
1254
1258
  return this.limit(1).keys(function(t) {
1255
1259
  return t[0];
1256
1260
  }).then(e);
1257
- }, $.prototype.lastKey = function(e) {
1261
+ }, z.prototype.lastKey = function(e) {
1258
1262
  return this.reverse().firstKey(e);
1259
- }, $.prototype.distinct = function() {
1263
+ }, z.prototype.distinct = function() {
1260
1264
  var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
1261
1265
  if (!e || !e.multi)
1262
1266
  return this;
1263
1267
  var t = {};
1264
- return dn(this._ctx, function(i) {
1268
+ return yn(this._ctx, function(i) {
1265
1269
  var r = i.primaryKey.toString(), i = ie(t, r);
1266
1270
  return t[r] = !0, !i;
1267
1271
  }), this;
1268
- }, $.prototype.modify = function(e) {
1272
+ }, z.prototype.modify = function(e) {
1269
1273
  var t = this, n = this._ctx;
1270
1274
  return this._write(function(r) {
1271
1275
  var i, o, a;
1272
1276
  a = typeof e == "function" ? e : (i = C(e), o = i.length, function(p) {
1273
1277
  for (var g = !1, b = 0; b < o; ++b) {
1274
- var _ = i[b], x = e[_];
1275
- ye(p, _) !== x && (ue(p, _, x), g = !0);
1278
+ var _ = i[b], k = e[_];
1279
+ ve(p, _) !== k && (ue(p, _, k), g = !0);
1276
1280
  }
1277
1281
  return g;
1278
1282
  });
1279
1283
  function u(p, _) {
1280
1284
  var b = _.failures, _ = _.numFailures;
1281
1285
  y += p - _;
1282
- for (var x = 0, S = C(b); x < S.length; x++) {
1283
- var j = S[x];
1286
+ for (var k = 0, S = C(b); k < S.length; k++) {
1287
+ var j = S[k];
1284
1288
  d.push(b[j]);
1285
1289
  }
1286
1290
  }
@@ -1288,12 +1292,12 @@ var Ar = { exports: {} };
1288
1292
  return t.clone().primaryKeys().then(function(p) {
1289
1293
  function g(b) {
1290
1294
  var _ = Math.min(f, p.length - b);
1291
- return h.getMany({ trans: r, keys: p.slice(b, b + _), cache: "immutable" }).then(function(x) {
1295
+ return h.getMany({ trans: r, keys: p.slice(b, b + _), cache: "immutable" }).then(function(k) {
1292
1296
  for (var S = [], j = [], E = m ? [] : null, K = [], P = 0; P < _; ++P) {
1293
- var I = x[P], M = { value: ke(I), primKey: p[b + P] };
1297
+ var I = k[P], M = { value: Se(I), primKey: p[b + P] };
1294
1298
  a.call(M, M.value, M) !== !1 && (M.value == null ? K.push(p[b + P]) : m || U(c(I), c(M.value)) === 0 ? (j.push(M.value), m && E.push(p[b + P])) : (K.push(p[b + P]), S.push(M.value)));
1295
1299
  }
1296
- var W = Je(n) && n.limit === 1 / 0 && (typeof e != "function" || e === yn) && { index: n.index, range: n.range };
1300
+ var W = et(n) && n.limit === 1 / 0 && (typeof e != "function" || e === vn) && { index: n.index, range: n.range };
1297
1301
  return Promise.resolve(0 < S.length && h.mutate({ trans: r, type: "add", values: S }).then(function(L) {
1298
1302
  for (var G in L.failures)
1299
1303
  K.splice(parseInt(G), 1);
@@ -1303,7 +1307,7 @@ var Ar = { exports: {} };
1303
1307
  return u(j.length, L);
1304
1308
  });
1305
1309
  }).then(function() {
1306
- return (0 < K.length || W && e === yn) && h.mutate({ trans: r, type: "delete", keys: K, criteria: W }).then(function(L) {
1310
+ return (0 < K.length || W && e === vn) && h.mutate({ trans: r, type: "delete", keys: K, criteria: W }).then(function(L) {
1307
1311
  return u(K.length, L);
1308
1312
  });
1309
1313
  }).then(function() {
@@ -1313,52 +1317,52 @@ var Ar = { exports: {} };
1313
1317
  }
1314
1318
  return g(0).then(function() {
1315
1319
  if (0 < d.length)
1316
- throw new xt("Error modifying one or more objects", d, y, v);
1320
+ throw new Ot("Error modifying one or more objects", d, y, v);
1317
1321
  return p.length;
1318
1322
  });
1319
1323
  });
1320
1324
  });
1321
- }, $.prototype.delete = function() {
1325
+ }, z.prototype.delete = function() {
1322
1326
  var e = this._ctx, t = e.range;
1323
- return Je(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
1327
+ return et(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
1324
1328
  var r = e.table.core.schema.primaryKey, i = t;
1325
1329
  return e.table.core.count({ trans: n, query: { index: r, range: i } }).then(function(o) {
1326
1330
  return e.table.core.mutate({ trans: n, type: "deleteRange", range: i }).then(function(a) {
1327
1331
  var u = a.failures;
1328
1332
  if (a.lastResult, a.results, a = a.numFailures, a)
1329
- throw new xt("Could not delete some values", Object.keys(u).map(function(h) {
1333
+ throw new Ot("Could not delete some values", Object.keys(u).map(function(h) {
1330
1334
  return u[h];
1331
1335
  }), o - a);
1332
1336
  return o - a;
1333
1337
  });
1334
1338
  });
1335
- }) : this.modify(yn);
1336
- }, $);
1337
- function $() {
1339
+ }) : this.modify(vn);
1340
+ }, z);
1341
+ function z() {
1338
1342
  }
1339
- var yn = function(e, t) {
1343
+ var vn = function(e, t) {
1340
1344
  return t.value = null;
1341
1345
  };
1342
- function Zr(e, t) {
1346
+ function ri(e, t) {
1343
1347
  return e < t ? -1 : e === t ? 0 : 1;
1344
1348
  }
1345
- function ei(e, t) {
1349
+ function ii(e, t) {
1346
1350
  return t < e ? -1 : e === t ? 0 : 1;
1347
1351
  }
1348
1352
  function oe(e, t, n) {
1349
- return e = e instanceof dr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
1353
+ return e = e instanceof mr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
1350
1354
  }
1351
- function Ze(e) {
1355
+ function tt(e) {
1352
1356
  return new e.Collection(e, function() {
1353
- return hr("");
1357
+ return yr("");
1354
1358
  }).limit(0);
1355
1359
  }
1356
- function Rt(e, t, n, r) {
1360
+ function Nt(e, t, n, r) {
1357
1361
  var i, o, a, u, h, l, m, c = n.length;
1358
1362
  if (!n.every(function(y) {
1359
1363
  return typeof y == "string";
1360
1364
  }))
1361
- return oe(e, ir);
1365
+ return oe(e, sr);
1362
1366
  function f(y) {
1363
1367
  i = y === "next" ? function(p) {
1364
1368
  return p.toUpperCase();
@@ -1368,7 +1372,7 @@ var Ar = { exports: {} };
1368
1372
  return p.toLowerCase();
1369
1373
  } : function(p) {
1370
1374
  return p.toUpperCase();
1371
- }, a = y === "next" ? Zr : ei;
1375
+ }, a = y === "next" ? ri : ii;
1372
1376
  var v = n.map(function(p) {
1373
1377
  return { lower: o(p), upper: i(p) };
1374
1378
  }).sort(function(p, g) {
@@ -1381,7 +1385,7 @@ var Ar = { exports: {} };
1381
1385
  }), m = (l = y) === "next" ? "" : r;
1382
1386
  }
1383
1387
  f("next"), e = new e.Collection(e, function() {
1384
- return je(u[0], h[c - 1] + r);
1388
+ return Ke(u[0], h[c - 1] + r);
1385
1389
  }), e._ondirectionchange = function(y) {
1386
1390
  f(y);
1387
1391
  };
@@ -1393,7 +1397,7 @@ var Ar = { exports: {} };
1393
1397
  var b = o(g);
1394
1398
  if (t(b, h, d))
1395
1399
  return !0;
1396
- for (var _ = null, x = d; x < c; ++x) {
1400
+ for (var _ = null, k = d; k < c; ++k) {
1397
1401
  var S = function(j, E, K, P, I, M) {
1398
1402
  for (var W = Math.min(j.length, P.length), L = -1, G = 0; G < W; ++G) {
1399
1403
  var ae = E[G];
@@ -1402,84 +1406,84 @@ var Ar = { exports: {} };
1402
1406
  I(j[G], ae) < 0 && (L = G);
1403
1407
  }
1404
1408
  return W < P.length && M === "next" ? j + K.substr(j.length) : W < j.length && M === "prev" ? j.substr(0, K.length) : L < 0 ? null : j.substr(0, L) + P[L] + K.substr(L + 1);
1405
- }(g, b, u[x], h[x], a, l);
1406
- S === null && _ === null ? d = x + 1 : (_ === null || 0 < a(_, S)) && (_ = S);
1409
+ }(g, b, u[k], h[k], a, l);
1410
+ S === null && _ === null ? d = k + 1 : (_ === null || 0 < a(_, S)) && (_ = S);
1407
1411
  }
1408
1412
  return v(_ !== null ? function() {
1409
1413
  y.continue(_ + m);
1410
1414
  } : p), !1;
1411
1415
  }), e;
1412
1416
  }
1413
- function je(e, t, n, r) {
1417
+ function Ke(e, t, n, r) {
1414
1418
  return { type: 2, lower: e, upper: t, lowerOpen: n, upperOpen: r };
1415
1419
  }
1416
- function hr(e) {
1420
+ function yr(e) {
1417
1421
  return { type: 1, lower: e, upper: e };
1418
1422
  }
1419
- var dr = (Object.defineProperty(ee.prototype, "Collection", { get: function() {
1423
+ var mr = (Object.defineProperty(ee.prototype, "Collection", { get: function() {
1420
1424
  return this._ctx.table.db.Collection;
1421
1425
  }, enumerable: !1, configurable: !0 }), ee.prototype.between = function(e, t, n, r) {
1422
1426
  n = n !== !1, r = r === !0;
1423
1427
  try {
1424
- return 0 < this._cmp(e, t) || this._cmp(e, t) === 0 && (n || r) && (!n || !r) ? Ze(this) : new this.Collection(this, function() {
1425
- return je(e, t, !n, !r);
1428
+ return 0 < this._cmp(e, t) || this._cmp(e, t) === 0 && (n || r) && (!n || !r) ? tt(this) : new this.Collection(this, function() {
1429
+ return Ke(e, t, !n, !r);
1426
1430
  });
1427
1431
  } catch {
1428
- return oe(this, ve);
1432
+ return oe(this, be);
1429
1433
  }
1430
1434
  }, ee.prototype.equals = function(e) {
1431
- return e == null ? oe(this, ve) : new this.Collection(this, function() {
1432
- return hr(e);
1435
+ return e == null ? oe(this, be) : new this.Collection(this, function() {
1436
+ return yr(e);
1433
1437
  });
1434
1438
  }, ee.prototype.above = function(e) {
1435
- return e == null ? oe(this, ve) : new this.Collection(this, function() {
1436
- return je(e, void 0, !0);
1439
+ return e == null ? oe(this, be) : new this.Collection(this, function() {
1440
+ return Ke(e, void 0, !0);
1437
1441
  });
1438
1442
  }, ee.prototype.aboveOrEqual = function(e) {
1439
- return e == null ? oe(this, ve) : new this.Collection(this, function() {
1440
- return je(e, void 0, !1);
1443
+ return e == null ? oe(this, be) : new this.Collection(this, function() {
1444
+ return Ke(e, void 0, !1);
1441
1445
  });
1442
1446
  }, ee.prototype.below = function(e) {
1443
- return e == null ? oe(this, ve) : new this.Collection(this, function() {
1444
- return je(void 0, e, !1, !0);
1447
+ return e == null ? oe(this, be) : new this.Collection(this, function() {
1448
+ return Ke(void 0, e, !1, !0);
1445
1449
  });
1446
1450
  }, ee.prototype.belowOrEqual = function(e) {
1447
- return e == null ? oe(this, ve) : new this.Collection(this, function() {
1448
- return je(void 0, e);
1451
+ return e == null ? oe(this, be) : new this.Collection(this, function() {
1452
+ return Ke(void 0, e);
1449
1453
  });
1450
1454
  }, ee.prototype.startsWith = function(e) {
1451
- return typeof e != "string" ? oe(this, ir) : this.between(e, e + Re, !0, !0);
1455
+ return typeof e != "string" ? oe(this, sr) : this.between(e, e + Ne, !0, !0);
1452
1456
  }, ee.prototype.startsWithIgnoreCase = function(e) {
1453
- return e === "" ? this.startsWith(e) : Rt(this, function(t, n) {
1457
+ return e === "" ? this.startsWith(e) : Nt(this, function(t, n) {
1454
1458
  return t.indexOf(n[0]) === 0;
1455
- }, [e], Re);
1459
+ }, [e], Ne);
1456
1460
  }, ee.prototype.equalsIgnoreCase = function(e) {
1457
- return Rt(this, function(t, n) {
1461
+ return Nt(this, function(t, n) {
1458
1462
  return t === n[0];
1459
1463
  }, [e], "");
1460
1464
  }, ee.prototype.anyOfIgnoreCase = function() {
1461
- var e = me.apply(Ve, arguments);
1462
- return e.length === 0 ? Ze(this) : Rt(this, function(t, n) {
1465
+ var e = ge.apply(Ge, arguments);
1466
+ return e.length === 0 ? tt(this) : Nt(this, function(t, n) {
1463
1467
  return n.indexOf(t) !== -1;
1464
1468
  }, e, "");
1465
1469
  }, ee.prototype.startsWithAnyOfIgnoreCase = function() {
1466
- var e = me.apply(Ve, arguments);
1467
- return e.length === 0 ? Ze(this) : Rt(this, function(t, n) {
1470
+ var e = ge.apply(Ge, arguments);
1471
+ return e.length === 0 ? tt(this) : Nt(this, function(t, n) {
1468
1472
  return n.some(function(r) {
1469
1473
  return t.indexOf(r) === 0;
1470
1474
  });
1471
- }, e, Re);
1475
+ }, e, Ne);
1472
1476
  }, ee.prototype.anyOf = function() {
1473
- var e = this, t = me.apply(Ve, arguments), n = this._cmp;
1477
+ var e = this, t = ge.apply(Ge, arguments), n = this._cmp;
1474
1478
  try {
1475
1479
  t.sort(n);
1476
1480
  } catch {
1477
- return oe(this, ve);
1481
+ return oe(this, be);
1478
1482
  }
1479
1483
  if (t.length === 0)
1480
- return Ze(this);
1484
+ return tt(this);
1481
1485
  var r = new this.Collection(this, function() {
1482
- return je(t[0], t[t.length - 1]);
1486
+ return Ke(t[0], t[t.length - 1]);
1483
1487
  });
1484
1488
  r._ondirectionchange = function(o) {
1485
1489
  n = o === "next" ? e._ascending : e._descending, t.sort(n);
@@ -1496,13 +1500,13 @@ var Ar = { exports: {} };
1496
1500
  }, ee.prototype.notEqual = function(e) {
1497
1501
  return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
1498
1502
  }, ee.prototype.noneOf = function() {
1499
- var e = me.apply(Ve, arguments);
1503
+ var e = ge.apply(Ge, arguments);
1500
1504
  if (e.length === 0)
1501
1505
  return new this.Collection(this);
1502
1506
  try {
1503
1507
  e.sort(this._ascending);
1504
1508
  } catch {
1505
- return oe(this, ve);
1509
+ return oe(this, be);
1506
1510
  }
1507
1511
  var t = e.reduce(function(n, r) {
1508
1512
  return n ? n.concat([[n[n.length - 1][1], r]]) : [[-1 / 0, r]];
@@ -1511,7 +1515,7 @@ var Ar = { exports: {} };
1511
1515
  }, ee.prototype.inAnyRange = function(g, t) {
1512
1516
  var n = this, r = this._cmp, i = this._ascending, o = this._descending, a = this._min, u = this._max;
1513
1517
  if (g.length === 0)
1514
- return Ze(this);
1518
+ return tt(this);
1515
1519
  if (!g.every(function(b) {
1516
1520
  return b[0] !== void 0 && b[1] !== void 0 && i(b[0], b[1]) <= 0;
1517
1521
  }))
@@ -1522,17 +1526,17 @@ var Ar = { exports: {} };
1522
1526
  }
1523
1527
  try {
1524
1528
  (m = g.reduce(function(b, _) {
1525
- for (var x = 0, S = b.length; x < S; ++x) {
1526
- var j = b[x];
1529
+ for (var k = 0, S = b.length; k < S; ++k) {
1530
+ var j = b[k];
1527
1531
  if (r(_[0], j[1]) < 0 && 0 < r(_[1], j[0])) {
1528
1532
  j[0] = a(j[0], _[0]), j[1] = u(j[1], _[1]);
1529
1533
  break;
1530
1534
  }
1531
1535
  }
1532
- return x === S && b.push(_), b;
1536
+ return k === S && b.push(_), b;
1533
1537
  }, [])).sort(f);
1534
1538
  } catch {
1535
- return oe(this, ve);
1539
+ return oe(this, be);
1536
1540
  }
1537
1541
  var d = 0, y = l ? function(b) {
1538
1542
  return 0 < i(b, m[d][1]);
@@ -1543,56 +1547,56 @@ var Ar = { exports: {} };
1543
1547
  } : function(b) {
1544
1548
  return 0 <= o(b, m[d][0]);
1545
1549
  }, p = y, g = new this.Collection(this, function() {
1546
- return je(m[0][0], m[m.length - 1][1], !h, !l);
1550
+ return Ke(m[0][0], m[m.length - 1][1], !h, !l);
1547
1551
  });
1548
1552
  return g._ondirectionchange = function(b) {
1549
1553
  c = b === "next" ? (p = y, i) : (p = v, o), m.sort(f);
1550
- }, g._addAlgorithm(function(b, _, x) {
1554
+ }, g._addAlgorithm(function(b, _, k) {
1551
1555
  for (var S, j = b.key; p(j); )
1552
1556
  if (++d === m.length)
1553
- return _(x), !1;
1557
+ return _(k), !1;
1554
1558
  return !y(S = j) && !v(S) || (n._cmp(j, m[d][1]) === 0 || n._cmp(j, m[d][0]) === 0 || _(function() {
1555
1559
  c === i ? b.continue(m[d][0]) : b.continue(m[d][1]);
1556
1560
  }), !1);
1557
1561
  }), g;
1558
1562
  }, ee.prototype.startsWithAnyOf = function() {
1559
- var e = me.apply(Ve, arguments);
1563
+ var e = ge.apply(Ge, arguments);
1560
1564
  return e.every(function(t) {
1561
1565
  return typeof t == "string";
1562
- }) ? e.length === 0 ? Ze(this) : this.inAnyRange(e.map(function(t) {
1563
- return [t, t + Re];
1566
+ }) ? e.length === 0 ? tt(this) : this.inAnyRange(e.map(function(t) {
1567
+ return [t, t + Ne];
1564
1568
  })) : oe(this, "startsWithAnyOf() only works with strings");
1565
1569
  }, ee);
1566
1570
  function ee() {
1567
1571
  }
1568
- function de(e) {
1572
+ function ye(e) {
1569
1573
  return H(function(t) {
1570
- return ft(t), e(t.target.error), !1;
1574
+ return dt(t), e(t.target.error), !1;
1571
1575
  });
1572
1576
  }
1573
- function ft(e) {
1577
+ function dt(e) {
1574
1578
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
1575
1579
  }
1576
- var ht = "storagemutated", mn = "x-storagemutated-1", Ce = ct(null, ht), ti = (pe.prototype._lock = function() {
1577
- return tt(!B.global), ++this._reculock, this._reculock !== 1 || B.global || (B.lockOwnerFor = this), this;
1578
- }, pe.prototype._unlock = function() {
1579
- if (tt(!B.global), --this._reculock == 0)
1580
+ var pt = "storagemutated", gn = "x-storagemutated-1", Ae = ft(null, pt), oi = (me.prototype._lock = function() {
1581
+ return rt(!B.global), ++this._reculock, this._reculock !== 1 || B.global || (B.lockOwnerFor = this), this;
1582
+ }, me.prototype._unlock = function() {
1583
+ if (rt(!B.global), --this._reculock == 0)
1580
1584
  for (B.global || (B.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
1581
1585
  var e = this._blockedFuncs.shift();
1582
1586
  try {
1583
- Ie(e[1], e[0]);
1587
+ Me(e[1], e[0]);
1584
1588
  } catch {
1585
1589
  }
1586
1590
  }
1587
1591
  return this;
1588
- }, pe.prototype._locked = function() {
1592
+ }, me.prototype._locked = function() {
1589
1593
  return this._reculock && B.lockOwnerFor !== this;
1590
- }, pe.prototype.create = function(e) {
1594
+ }, me.prototype.create = function(e) {
1591
1595
  var t = this;
1592
1596
  if (!this.mode)
1593
1597
  return this;
1594
1598
  var n = this.db.idbdb, r = this.db._state.dbOpenError;
1595
- if (tt(!this.idbtrans), !e && !n)
1599
+ if (rt(!this.idbtrans), !e && !n)
1596
1600
  switch (r && r.name) {
1597
1601
  case "DatabaseClosedError":
1598
1602
  throw new R.DatabaseClosed(r);
@@ -1603,14 +1607,14 @@ var Ar = { exports: {} };
1603
1607
  }
1604
1608
  if (!this.active)
1605
1609
  throw new R.TransactionInactive();
1606
- return tt(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = H(function(i) {
1607
- ft(i), t._reject(e.error);
1610
+ return rt(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = H(function(i) {
1611
+ dt(i), t._reject(e.error);
1608
1612
  }), e.onabort = H(function(i) {
1609
- ft(i), t.active && t._reject(new R.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
1613
+ dt(i), t.active && t._reject(new R.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
1610
1614
  }), e.oncomplete = H(function() {
1611
- t.active = !1, t._resolve(), "mutatedParts" in e && Ce.storagemutated.fire(e.mutatedParts);
1615
+ t.active = !1, t._resolve(), "mutatedParts" in e && Ae.storagemutated.fire(e.mutatedParts);
1612
1616
  }), this;
1613
- }, pe.prototype._promise = function(e, t, n) {
1617
+ }, me.prototype._promise = function(e, t, n) {
1614
1618
  var r = this;
1615
1619
  if (e === "readwrite" && this.mode !== "readwrite")
1616
1620
  return X(new R.ReadOnly("Transaction is readonly"));
@@ -1623,7 +1627,7 @@ var Ar = { exports: {} };
1623
1627
  }, B]);
1624
1628
  });
1625
1629
  if (n)
1626
- return Se(function() {
1630
+ return Pe(function() {
1627
1631
  var o = new A(function(a, u) {
1628
1632
  r._lock();
1629
1633
  var h = t(a, u, r);
@@ -1638,9 +1642,9 @@ var Ar = { exports: {} };
1638
1642
  u && u.then && u.then(o, a);
1639
1643
  });
1640
1644
  return i._lib = !0, i;
1641
- }, pe.prototype._root = function() {
1645
+ }, me.prototype._root = function() {
1642
1646
  return this.parent ? this.parent._root() : this;
1643
- }, pe.prototype.waitFor = function(e) {
1647
+ }, me.prototype.waitFor = function(e) {
1644
1648
  var t, n = this._root(), r = A.resolve(e);
1645
1649
  n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
1646
1650
  return r;
@@ -1659,9 +1663,9 @@ var Ar = { exports: {} };
1659
1663
  n._waitingFor === i && (n._waitingFor = null);
1660
1664
  });
1661
1665
  });
1662
- }, pe.prototype.abort = function() {
1666
+ }, me.prototype.abort = function() {
1663
1667
  this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new R.Abort()));
1664
- }, pe.prototype.table = function(e) {
1668
+ }, me.prototype.table = function(e) {
1665
1669
  var t = this._memoizedTables || (this._memoizedTables = {});
1666
1670
  if (ie(t, e))
1667
1671
  return t[e];
@@ -1669,16 +1673,16 @@ var Ar = { exports: {} };
1669
1673
  if (!n)
1670
1674
  throw new R.NotFound("Table " + e + " not part of transaction");
1671
1675
  return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
1672
- }, pe);
1673
- function pe() {
1676
+ }, me);
1677
+ function me() {
1674
1678
  }
1675
- function vn(e, t, n, r, i, o, a) {
1676
- return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: o, src: (n && !a ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + pr(t) };
1679
+ function bn(e, t, n, r, i, o, a) {
1680
+ return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: o, src: (n && !a ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + vr(t) };
1677
1681
  }
1678
- function pr(e) {
1682
+ function vr(e) {
1679
1683
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
1680
1684
  }
1681
- function gn(e, t, n) {
1685
+ function wn(e, t, n) {
1682
1686
  return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (r = function(i) {
1683
1687
  return [i.name, i];
1684
1688
  }, n.reduce(function(i, o, a) {
@@ -1686,36 +1690,36 @@ var Ar = { exports: {} };
1686
1690
  }, {})) };
1687
1691
  var r;
1688
1692
  }
1689
- var dt = function(e) {
1693
+ var yt = function(e) {
1690
1694
  try {
1691
- return e.only([[]]), dt = function() {
1695
+ return e.only([[]]), yt = function() {
1692
1696
  return [[]];
1693
1697
  }, [[]];
1694
1698
  } catch {
1695
- return dt = function() {
1696
- return Re;
1697
- }, Re;
1699
+ return yt = function() {
1700
+ return Ne;
1701
+ }, Ne;
1698
1702
  }
1699
1703
  };
1700
- function bn(e) {
1704
+ function _n(e) {
1701
1705
  return e == null ? function() {
1702
1706
  } : typeof e == "string" ? (t = e).split(".").length === 1 ? function(n) {
1703
1707
  return n[t];
1704
1708
  } : function(n) {
1705
- return ye(n, t);
1709
+ return ve(n, t);
1706
1710
  } : function(n) {
1707
- return ye(n, e);
1711
+ return ve(n, e);
1708
1712
  };
1709
1713
  var t;
1710
1714
  }
1711
- function yr(e) {
1715
+ function gr(e) {
1712
1716
  return [].slice.call(e);
1713
1717
  }
1714
- var ni = 0;
1715
- function pt(e) {
1718
+ var ai = 0;
1719
+ function mt(e) {
1716
1720
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
1717
1721
  }
1718
- function ri(e, t, h) {
1722
+ function si(e, t, h) {
1719
1723
  function r(p) {
1720
1724
  if (p.type === 3)
1721
1725
  return null;
@@ -1727,7 +1731,7 @@ var Ar = { exports: {} };
1727
1731
  function i(f) {
1728
1732
  var d, y = f.name;
1729
1733
  return { name: y, schema: f, mutate: function(v) {
1730
- var p = v.trans, g = v.type, b = v.keys, _ = v.values, x = v.range;
1734
+ var p = v.trans, g = v.type, b = v.keys, _ = v.values, k = v.range;
1731
1735
  return new Promise(function(S, j) {
1732
1736
  S = H(S);
1733
1737
  var E = p.objectStore(y), K = E.keyPath == null, P = g === "put" || g === "add";
@@ -1739,129 +1743,129 @@ var Ar = { exports: {} };
1739
1743
  if (M === 0)
1740
1744
  return S({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1741
1745
  function W(re) {
1742
- ++ae, ft(re);
1746
+ ++ae, dt(re);
1743
1747
  }
1744
1748
  var L = [], G = [], ae = 0;
1745
1749
  if (g === "deleteRange") {
1746
- if (x.type === 4)
1750
+ if (k.type === 4)
1747
1751
  return S({ numFailures: ae, failures: G, results: [], lastResult: void 0 });
1748
- x.type === 3 ? L.push(I = E.clear()) : L.push(I = E.delete(r(x)));
1752
+ k.type === 3 ? L.push(I = E.clear()) : L.push(I = E.delete(r(k)));
1749
1753
  } else {
1750
- var K = P ? K ? [_, b] : [_, null] : [b, null], N = K[0], be = K[1];
1754
+ var K = P ? K ? [_, b] : [_, null] : [b, null], F = K[0], _e = K[1];
1751
1755
  if (P)
1752
1756
  for (var ne = 0; ne < M; ++ne)
1753
- L.push(I = be && be[ne] !== void 0 ? E[g](N[ne], be[ne]) : E[g](N[ne])), I.onerror = W;
1757
+ L.push(I = _e && _e[ne] !== void 0 ? E[g](F[ne], _e[ne]) : E[g](F[ne])), I.onerror = W;
1754
1758
  else
1755
1759
  for (ne = 0; ne < M; ++ne)
1756
- L.push(I = E[g](N[ne])), I.onerror = W;
1760
+ L.push(I = E[g](F[ne])), I.onerror = W;
1757
1761
  }
1758
- function Ht(re) {
1759
- re = re.target.result, L.forEach(function(Le, Fn) {
1760
- return Le.error != null && (G[Fn] = Le.error);
1761
- }), S({ numFailures: ae, failures: G, results: g === "delete" ? b : L.map(function(Le) {
1762
- return Le.result;
1762
+ function Xt(re) {
1763
+ re = re.target.result, L.forEach(function(ze, Ln) {
1764
+ return ze.error != null && (G[Ln] = ze.error);
1765
+ }), S({ numFailures: ae, failures: G, results: g === "delete" ? b : L.map(function(ze) {
1766
+ return ze.result;
1763
1767
  }), lastResult: re });
1764
1768
  }
1765
1769
  I.onerror = function(re) {
1766
- W(re), Ht(re);
1767
- }, I.onsuccess = Ht;
1770
+ W(re), Xt(re);
1771
+ }, I.onsuccess = Xt;
1768
1772
  });
1769
1773
  }, getMany: function(v) {
1770
1774
  var p = v.trans, g = v.keys;
1771
1775
  return new Promise(function(b, _) {
1772
1776
  b = H(b);
1773
- for (var x, S = p.objectStore(y), j = g.length, E = new Array(j), K = 0, P = 0, I = function(L) {
1777
+ for (var k, S = p.objectStore(y), j = g.length, E = new Array(j), K = 0, P = 0, I = function(L) {
1774
1778
  L = L.target, E[L._pos] = L.result, ++P === K && b(E);
1775
- }, M = de(_), W = 0; W < j; ++W)
1776
- g[W] != null && ((x = S.get(g[W]))._pos = W, x.onsuccess = I, x.onerror = M, ++K);
1779
+ }, M = ye(_), W = 0; W < j; ++W)
1780
+ g[W] != null && ((k = S.get(g[W]))._pos = W, k.onsuccess = I, k.onerror = M, ++K);
1777
1781
  K === 0 && b(E);
1778
1782
  });
1779
1783
  }, get: function(v) {
1780
1784
  var p = v.trans, g = v.key;
1781
1785
  return new Promise(function(b, _) {
1782
1786
  b = H(b);
1783
- var x = p.objectStore(y).get(g);
1784
- x.onsuccess = function(S) {
1787
+ var k = p.objectStore(y).get(g);
1788
+ k.onsuccess = function(S) {
1785
1789
  return b(S.target.result);
1786
- }, x.onerror = de(_);
1790
+ }, k.onerror = ye(_);
1787
1791
  });
1788
1792
  }, query: (d = l, function(v) {
1789
1793
  return new Promise(function(p, g) {
1790
1794
  p = H(p);
1791
- var b, _, x, K = v.trans, S = v.values, j = v.limit, I = v.query, E = j === 1 / 0 ? void 0 : j, P = I.index, I = I.range, K = K.objectStore(y), P = P.isPrimaryKey ? K : K.index(P.name), I = r(I);
1795
+ var b, _, k, K = v.trans, S = v.values, j = v.limit, I = v.query, E = j === 1 / 0 ? void 0 : j, P = I.index, I = I.range, K = K.objectStore(y), P = P.isPrimaryKey ? K : K.index(P.name), I = r(I);
1792
1796
  if (j === 0)
1793
1797
  return p({ result: [] });
1794
1798
  d ? ((E = S ? P.getAll(I, E) : P.getAllKeys(I, E)).onsuccess = function(M) {
1795
1799
  return p({ result: M.target.result });
1796
- }, E.onerror = de(g)) : (b = 0, _ = !S && "openKeyCursor" in P ? P.openKeyCursor(I) : P.openCursor(I), x = [], _.onsuccess = function(M) {
1800
+ }, E.onerror = ye(g)) : (b = 0, _ = !S && "openKeyCursor" in P ? P.openKeyCursor(I) : P.openCursor(I), k = [], _.onsuccess = function(M) {
1797
1801
  var W = _.result;
1798
- return W ? (x.push(S ? W.value : W.primaryKey), ++b === j ? p({ result: x }) : void W.continue()) : p({ result: x });
1799
- }, _.onerror = de(g));
1802
+ return W ? (k.push(S ? W.value : W.primaryKey), ++b === j ? p({ result: k }) : void W.continue()) : p({ result: k });
1803
+ }, _.onerror = ye(g));
1800
1804
  });
1801
1805
  }), openCursor: function(v) {
1802
- var p = v.trans, g = v.values, b = v.query, _ = v.reverse, x = v.unique;
1806
+ var p = v.trans, g = v.values, b = v.query, _ = v.reverse, k = v.unique;
1803
1807
  return new Promise(function(S, j) {
1804
1808
  S = H(S);
1805
- var P = b.index, E = b.range, K = p.objectStore(y), K = P.isPrimaryKey ? K : K.index(P.name), P = _ ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", I = !g && "openKeyCursor" in K ? K.openKeyCursor(r(E), P) : K.openCursor(r(E), P);
1806
- I.onerror = de(j), I.onsuccess = H(function(M) {
1807
- var W, L, G, ae, N = I.result;
1808
- N ? (N.___id = ++ni, N.done = !1, W = N.continue.bind(N), L = (L = N.continuePrimaryKey) && L.bind(N), G = N.advance.bind(N), ae = function() {
1809
+ var P = b.index, E = b.range, K = p.objectStore(y), K = P.isPrimaryKey ? K : K.index(P.name), P = _ ? k ? "prevunique" : "prev" : k ? "nextunique" : "next", I = !g && "openKeyCursor" in K ? K.openKeyCursor(r(E), P) : K.openCursor(r(E), P);
1810
+ I.onerror = ye(j), I.onsuccess = H(function(M) {
1811
+ var W, L, G, ae, F = I.result;
1812
+ F ? (F.___id = ++ai, F.done = !1, W = F.continue.bind(F), L = (L = F.continuePrimaryKey) && L.bind(F), G = F.advance.bind(F), ae = function() {
1809
1813
  throw new Error("Cursor not stopped");
1810
- }, N.trans = p, N.stop = N.continue = N.continuePrimaryKey = N.advance = function() {
1814
+ }, F.trans = p, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
1811
1815
  throw new Error("Cursor not started");
1812
- }, N.fail = H(j), N.next = function() {
1813
- var be = this, ne = 1;
1816
+ }, F.fail = H(j), F.next = function() {
1817
+ var _e = this, ne = 1;
1814
1818
  return this.start(function() {
1815
- return ne-- ? be.continue() : be.stop();
1819
+ return ne-- ? _e.continue() : _e.stop();
1816
1820
  }).then(function() {
1817
- return be;
1821
+ return _e;
1818
1822
  });
1819
- }, N.start = function(be) {
1823
+ }, F.start = function(_e) {
1820
1824
  function ne() {
1821
1825
  if (I.result)
1822
1826
  try {
1823
- be();
1827
+ _e();
1824
1828
  } catch (re) {
1825
- N.fail(re);
1829
+ F.fail(re);
1826
1830
  }
1827
1831
  else
1828
- N.done = !0, N.start = function() {
1832
+ F.done = !0, F.start = function() {
1829
1833
  throw new Error("Cursor behind last entry");
1830
- }, N.stop();
1834
+ }, F.stop();
1831
1835
  }
1832
- var Ht = new Promise(function(re, Le) {
1833
- re = H(re), I.onerror = de(Le), N.fail = Le, N.stop = function(Fn) {
1834
- N.stop = N.continue = N.continuePrimaryKey = N.advance = ae, re(Fn);
1836
+ var Xt = new Promise(function(re, ze) {
1837
+ re = H(re), I.onerror = ye(ze), F.fail = ze, F.stop = function(Ln) {
1838
+ F.stop = F.continue = F.continuePrimaryKey = F.advance = ae, re(Ln);
1835
1839
  };
1836
1840
  });
1837
1841
  return I.onsuccess = H(function(re) {
1838
1842
  I.onsuccess = ne, ne();
1839
- }), N.continue = W, N.continuePrimaryKey = L, N.advance = G, ne(), Ht;
1840
- }, S(N)) : S(null);
1843
+ }), F.continue = W, F.continuePrimaryKey = L, F.advance = G, ne(), Xt;
1844
+ }, S(F)) : S(null);
1841
1845
  }, j);
1842
1846
  });
1843
1847
  }, count: function(v) {
1844
1848
  var p = v.query, g = v.trans, b = p.index, _ = p.range;
1845
- return new Promise(function(x, S) {
1849
+ return new Promise(function(k, S) {
1846
1850
  var j = g.objectStore(y), E = b.isPrimaryKey ? j : j.index(b.name), j = r(_), E = j ? E.count(j) : E.count();
1847
1851
  E.onsuccess = H(function(K) {
1848
- return x(K.target.result);
1849
- }), E.onerror = de(S);
1852
+ return k(K.target.result);
1853
+ }), E.onerror = ye(S);
1850
1854
  });
1851
1855
  } };
1852
1856
  }
1853
- var o, a, u, m = (a = h, u = yr((o = e).objectStoreNames), { schema: { name: o.name, tables: u.map(function(f) {
1857
+ var o, a, u, m = (a = h, u = gr((o = e).objectStoreNames), { schema: { name: o.name, tables: u.map(function(f) {
1854
1858
  return a.objectStore(f);
1855
1859
  }).map(function(f) {
1856
- var d = f.keyPath, p = f.autoIncrement, y = z(d), v = {}, p = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: d == null, compound: y, keyPath: d, autoIncrement: p, unique: !0, extractKey: bn(d) }, indexes: yr(f.indexNames).map(function(g) {
1860
+ var d = f.keyPath, p = f.autoIncrement, y = $(d), v = {}, p = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: d == null, compound: y, keyPath: d, autoIncrement: p, unique: !0, extractKey: _n(d) }, indexes: gr(f.indexNames).map(function(g) {
1857
1861
  return f.index(g);
1858
- }).map(function(x) {
1859
- var b = x.name, _ = x.unique, S = x.multiEntry, x = x.keyPath, S = { name: b, compound: z(x), keyPath: x, unique: _, multiEntry: S, extractKey: bn(x) };
1860
- return v[pt(x)] = S;
1862
+ }).map(function(k) {
1863
+ var b = k.name, _ = k.unique, S = k.multiEntry, k = k.keyPath, S = { name: b, compound: $(k), keyPath: k, unique: _, multiEntry: S, extractKey: _n(k) };
1864
+ return v[mt(k)] = S;
1861
1865
  }), getIndexByKeyPath: function(g) {
1862
- return v[pt(g)];
1866
+ return v[mt(g)];
1863
1867
  } };
1864
- return v[":id"] = p.primaryKey, d != null && (v[pt(d)] = p.primaryKey), p;
1868
+ return v[":id"] = p.primaryKey, d != null && (v[mt(d)] = p.primaryKey), p;
1865
1869
  }) }, hasGetAll: 0 < u.length && "getAll" in a.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = m.schema, l = m.hasGetAll, m = h.tables.map(i), c = {};
1866
1870
  return m.forEach(function(f) {
1867
1871
  return c[f.name] = f;
@@ -1869,16 +1873,16 @@ var Ar = { exports: {} };
1869
1873
  if (!c[f])
1870
1874
  throw new Error("Table '".concat(f, "' not found"));
1871
1875
  return c[f];
1872
- }, MIN_KEY: -1 / 0, MAX_KEY: dt(t), schema: h };
1876
+ }, MIN_KEY: -1 / 0, MAX_KEY: yt(t), schema: h };
1873
1877
  }
1874
- function ii(e, t, n, r) {
1878
+ function ui(e, t, n, r) {
1875
1879
  var i = n.IDBKeyRange;
1876
- return n.indexedDB, { dbcore: (r = ri(t, i, r), e.dbcore.reduce(function(o, a) {
1880
+ return n.indexedDB, { dbcore: (r = si(t, i, r), e.dbcore.reduce(function(o, a) {
1877
1881
  return a = a.create, w(w({}, o), a(o));
1878
1882
  }, r)) };
1879
1883
  }
1880
- function Mt(e, r) {
1881
- var n = r.db, r = ii(e._middlewares, n, e._deps, r);
1884
+ function Ft(e, r) {
1885
+ var n = r.db, r = ui(e._middlewares, n, e._deps, r);
1882
1886
  e.core = r.dbcore, e.tables.forEach(function(i) {
1883
1887
  var o = i.name;
1884
1888
  e.core.schema.tables.some(function(a) {
@@ -1886,81 +1890,81 @@ var Ar = { exports: {} };
1886
1890
  }) && (i.core = e.core.table(o), e[o] instanceof e.Table && (e[o].core = i.core));
1887
1891
  });
1888
1892
  }
1889
- function Ft(e, t, n, r) {
1893
+ function Lt(e, t, n, r) {
1890
1894
  n.forEach(function(i) {
1891
1895
  var o = r[i];
1892
1896
  t.forEach(function(a) {
1893
1897
  var u = function h(l, m) {
1894
- return Ir(l, m) || (l = _e(l)) && h(l, m);
1898
+ return Fr(l, m) || (l = xe(l)) && h(l, m);
1895
1899
  }(a, i);
1896
- (!u || "value" in u && u.value === void 0) && (a === e.Transaction.prototype || a instanceof e.Transaction ? xe(a, i, { get: function() {
1900
+ (!u || "value" in u && u.value === void 0) && (a === e.Transaction.prototype || a instanceof e.Transaction ? Oe(a, i, { get: function() {
1897
1901
  return this.table(i);
1898
1902
  }, set: function(h) {
1899
- Wn(this, i, { value: h, writable: !0, configurable: !0, enumerable: !0 });
1903
+ Gn(this, i, { value: h, writable: !0, configurable: !0, enumerable: !0 });
1900
1904
  } }) : a[i] = new e.Table(i, o));
1901
1905
  });
1902
1906
  });
1903
1907
  }
1904
- function wn(e, t) {
1908
+ function kn(e, t) {
1905
1909
  t.forEach(function(n) {
1906
1910
  for (var r in n)
1907
1911
  n[r] instanceof e.Table && delete n[r];
1908
1912
  });
1909
1913
  }
1910
- function oi(e, t) {
1914
+ function ci(e, t) {
1911
1915
  return e._cfg.version - t._cfg.version;
1912
1916
  }
1913
- function ai(e, t, n, r) {
1917
+ function li(e, t, n, r) {
1914
1918
  var i = e._dbSchema;
1915
- n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = gn("$meta", vr("")[0], []), e._storeNames.push("$meta"));
1919
+ n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = wn("$meta", wr("")[0], []), e._storeNames.push("$meta"));
1916
1920
  var o = e._createTransaction("readwrite", e._storeNames, i);
1917
1921
  o.create(n), o._completion.catch(r);
1918
1922
  var a = o._reject.bind(o), u = B.transless || B;
1919
- Se(function() {
1920
- return B.trans = o, B.transless = u, t !== 0 ? (Mt(e, n), l = t, ((h = o).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(m) {
1923
+ Pe(function() {
1924
+ return B.trans = o, B.transless = u, t !== 0 ? (Ft(e, n), l = t, ((h = o).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(m) {
1921
1925
  return m ?? l;
1922
1926
  }) : A.resolve(l)).then(function(m) {
1923
- return f = m, d = o, y = n, v = [], m = (c = e)._versions, p = c._dbSchema = Lt(0, c.idbdb, y), (m = m.filter(function(g) {
1927
+ return f = m, d = o, y = n, v = [], m = (c = e)._versions, p = c._dbSchema = zt(0, c.idbdb, y), (m = m.filter(function(g) {
1924
1928
  return g._cfg.version >= f;
1925
1929
  })).length !== 0 ? (m.forEach(function(g) {
1926
1930
  v.push(function() {
1927
1931
  var b = p, _ = g._cfg.dbschema;
1928
- zt(c, b, y), zt(c, _, y), p = c._dbSchema = _;
1929
- var x = _n(b, _);
1930
- x.add.forEach(function(P) {
1931
- xn(y, P[0], P[1].primKey, P[1].indexes);
1932
- }), x.change.forEach(function(P) {
1932
+ Ut(c, b, y), Ut(c, _, y), p = c._dbSchema = _;
1933
+ var k = xn(b, _);
1934
+ k.add.forEach(function(P) {
1935
+ On(y, P[0], P[1].primKey, P[1].indexes);
1936
+ }), k.change.forEach(function(P) {
1933
1937
  if (P.recreate)
1934
1938
  throw new R.Upgrade("Not yet support for changing primary key");
1935
1939
  var I = y.objectStore(P.name);
1936
1940
  P.add.forEach(function(M) {
1937
- return Nt(I, M);
1941
+ return $t(I, M);
1938
1942
  }), P.change.forEach(function(M) {
1939
- I.deleteIndex(M.name), Nt(I, M);
1943
+ I.deleteIndex(M.name), $t(I, M);
1940
1944
  }), P.del.forEach(function(M) {
1941
1945
  return I.deleteIndex(M);
1942
1946
  });
1943
1947
  });
1944
1948
  var S = g._cfg.contentUpgrade;
1945
1949
  if (S && g._cfg.version > f) {
1946
- Mt(c, y), d._memoizedTables = {};
1947
- var j = Gn(_);
1948
- x.del.forEach(function(P) {
1950
+ Ft(c, y), d._memoizedTables = {};
1951
+ var j = Qn(_);
1952
+ k.del.forEach(function(P) {
1949
1953
  j[P] = b[P];
1950
- }), wn(c, [c.Transaction.prototype]), Ft(c, [c.Transaction.prototype], C(j), j), d.schema = j;
1951
- var E, K = Zt(S);
1952
- return K && Qe(), x = A.follow(function() {
1954
+ }), kn(c, [c.Transaction.prototype]), Lt(c, [c.Transaction.prototype], C(j), j), d.schema = j;
1955
+ var E, K = tn(S);
1956
+ return K && Je(), k = A.follow(function() {
1953
1957
  var P;
1954
- (E = S(d)) && K && (P = Ee.bind(null, null), E.then(P, P));
1955
- }), E && typeof E.then == "function" ? A.resolve(E) : x.then(function() {
1958
+ (E = S(d)) && K && (P = je.bind(null, null), E.then(P, P));
1959
+ }), E && typeof E.then == "function" ? A.resolve(E) : k.then(function() {
1956
1960
  return E;
1957
1961
  });
1958
1962
  }
1959
1963
  }), v.push(function(b) {
1960
- var _, x, S = g._cfg.dbschema;
1961
- _ = S, x = b, [].slice.call(x.db.objectStoreNames).forEach(function(j) {
1962
- return _[j] == null && x.db.deleteObjectStore(j);
1963
- }), wn(c, [c.Transaction.prototype]), Ft(c, [c.Transaction.prototype], c._storeNames, c._dbSchema), d.schema = c._dbSchema;
1964
+ var _, k, S = g._cfg.dbschema;
1965
+ _ = S, k = b, [].slice.call(k.db.objectStoreNames).forEach(function(j) {
1966
+ return _[j] == null && k.db.deleteObjectStore(j);
1967
+ }), kn(c, [c.Transaction.prototype]), Lt(c, [c.Transaction.prototype], c._storeNames, c._dbSchema), d.schema = c._dbSchema;
1964
1968
  }), v.push(function(b) {
1965
1969
  c.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(c.idbdb.version / 10) === g._cfg.version ? (c.idbdb.deleteObjectStore("$meta"), delete c._dbSchema.$meta, c._storeNames = c._storeNames.filter(function(_) {
1966
1970
  return _ !== "$meta";
@@ -1969,35 +1973,35 @@ var Ar = { exports: {} };
1969
1973
  }), function g() {
1970
1974
  return v.length ? A.resolve(v.shift()(d.idbtrans)).then(g) : A.resolve();
1971
1975
  }().then(function() {
1972
- mr(p, y);
1976
+ br(p, y);
1973
1977
  })) : A.resolve();
1974
1978
  var c, f, d, y, v, p;
1975
1979
  }).catch(a)) : (C(i).forEach(function(m) {
1976
- xn(n, m, i[m].primKey, i[m].indexes);
1977
- }), Mt(e, n), void A.follow(function() {
1980
+ On(n, m, i[m].primKey, i[m].indexes);
1981
+ }), Ft(e, n), void A.follow(function() {
1978
1982
  return e.on.populate.fire(o);
1979
1983
  }).catch(a));
1980
1984
  var h, l;
1981
1985
  });
1982
1986
  }
1983
- function si(e, t) {
1984
- mr(e._dbSchema, t), t.db.version % 10 != 0 || t.objectStoreNames.contains("$meta") || t.db.createObjectStore("$meta").add(Math.ceil(t.db.version / 10 - 1), "version");
1985
- var n = Lt(0, e.idbdb, t);
1986
- zt(e, e._dbSchema, t);
1987
- for (var r = 0, i = _n(n, e._dbSchema).change; r < i.length; r++) {
1987
+ function fi(e, t) {
1988
+ br(e._dbSchema, t), t.db.version % 10 != 0 || t.objectStoreNames.contains("$meta") || t.db.createObjectStore("$meta").add(Math.ceil(t.db.version / 10 - 1), "version");
1989
+ var n = zt(0, e.idbdb, t);
1990
+ Ut(e, e._dbSchema, t);
1991
+ for (var r = 0, i = xn(n, e._dbSchema).change; r < i.length; r++) {
1988
1992
  var o = function(a) {
1989
1993
  if (a.change.length || a.recreate)
1990
1994
  return console.warn("Unable to patch indexes of table ".concat(a.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
1991
1995
  var u = t.objectStore(a.name);
1992
1996
  a.add.forEach(function(h) {
1993
- fe && console.debug("Dexie upgrade patch: Creating missing index ".concat(a.name, ".").concat(h.src)), Nt(u, h);
1997
+ de && console.debug("Dexie upgrade patch: Creating missing index ".concat(a.name, ".").concat(h.src)), $t(u, h);
1994
1998
  });
1995
1999
  }(i[r]);
1996
2000
  if (typeof o == "object")
1997
2001
  return o.value;
1998
2002
  }
1999
2003
  }
2000
- function _n(e, t) {
2004
+ function xn(e, t) {
2001
2005
  var n, r = { del: [], add: [], change: [] };
2002
2006
  for (n in e)
2003
2007
  t[n] || r.del.push(n);
@@ -2022,51 +2026,51 @@ var Ar = { exports: {} };
2022
2026
  }
2023
2027
  return r;
2024
2028
  }
2025
- function xn(e, t, n, r) {
2029
+ function On(e, t, n, r) {
2026
2030
  var i = e.db.createObjectStore(t, n.keyPath ? { keyPath: n.keyPath, autoIncrement: n.auto } : { autoIncrement: n.auto });
2027
2031
  return r.forEach(function(o) {
2028
- return Nt(i, o);
2032
+ return $t(i, o);
2029
2033
  }), i;
2030
2034
  }
2031
- function mr(e, t) {
2035
+ function br(e, t) {
2032
2036
  C(e).forEach(function(n) {
2033
- t.db.objectStoreNames.contains(n) || (fe && console.debug("Dexie: Creating missing table", n), xn(t, n, e[n].primKey, e[n].indexes));
2037
+ t.db.objectStoreNames.contains(n) || (de && console.debug("Dexie: Creating missing table", n), On(t, n, e[n].primKey, e[n].indexes));
2034
2038
  });
2035
2039
  }
2036
- function Nt(e, t) {
2040
+ function $t(e, t) {
2037
2041
  e.createIndex(t.name, t.keyPath, { unique: t.unique, multiEntry: t.multi });
2038
2042
  }
2039
- function Lt(e, t, n) {
2043
+ function zt(e, t, n) {
2040
2044
  var r = {};
2041
- return _t(t.objectStoreNames, 0).forEach(function(i) {
2042
- for (var o = n.objectStore(i), a = vn(pr(l = o.keyPath), l || "", !0, !1, !!o.autoIncrement, l && typeof l != "string", !0), u = [], h = 0; h < o.indexNames.length; ++h) {
2043
- var m = o.index(o.indexNames[h]), l = m.keyPath, m = vn(m.name, l, !!m.unique, !!m.multiEntry, !1, l && typeof l != "string", !1);
2045
+ return xt(t.objectStoreNames, 0).forEach(function(i) {
2046
+ for (var o = n.objectStore(i), a = bn(vr(l = o.keyPath), l || "", !0, !1, !!o.autoIncrement, l && typeof l != "string", !0), u = [], h = 0; h < o.indexNames.length; ++h) {
2047
+ var m = o.index(o.indexNames[h]), l = m.keyPath, m = bn(m.name, l, !!m.unique, !!m.multiEntry, !1, l && typeof l != "string", !1);
2044
2048
  u.push(m);
2045
2049
  }
2046
- r[i] = gn(i, a, u);
2050
+ r[i] = wn(i, a, u);
2047
2051
  }), r;
2048
2052
  }
2049
- function zt(e, t, n) {
2053
+ function Ut(e, t, n) {
2050
2054
  for (var r = n.db.objectStoreNames, i = 0; i < r.length; ++i) {
2051
2055
  var o = r[i], a = n.objectStore(o);
2052
2056
  e._hasGetAll = "getAll" in a;
2053
2057
  for (var u = 0; u < a.indexNames.length; ++u) {
2054
- var h = a.indexNames[u], l = a.index(h).keyPath, m = typeof l == "string" ? l : "[" + _t(l).join("+") + "]";
2058
+ var h = a.indexNames[u], l = a.index(h).keyPath, m = typeof l == "string" ? l : "[" + xt(l).join("+") + "]";
2055
2059
  !t[o] || (l = t[o].idxByName[m]) && (l.name = h, delete t[o].idxByName[m], t[o].idxByName[h] = l);
2056
2060
  }
2057
2061
  }
2058
- typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && F.WorkerGlobalScope && F instanceof F.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2062
+ typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && N.WorkerGlobalScope && N instanceof N.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2059
2063
  }
2060
- function vr(e) {
2064
+ function wr(e) {
2061
2065
  return e.split(",").map(function(t, n) {
2062
2066
  var r = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), i = /^\[/.test(r) ? r.match(/^\[(.*)\]$/)[1].split("+") : r;
2063
- return vn(r, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), z(i), n === 0);
2067
+ return bn(r, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), $(i), n === 0);
2064
2068
  });
2065
2069
  }
2066
- var ui = ($t.prototype._parseStoresSpec = function(e, t) {
2070
+ var hi = (Wt.prototype._parseStoresSpec = function(e, t) {
2067
2071
  C(e).forEach(function(n) {
2068
2072
  if (e[n] !== null) {
2069
- var r = vr(e[n]), i = r.shift();
2073
+ var r = wr(e[n]), i = r.shift();
2070
2074
  if (i.unique = !0, i.multi)
2071
2075
  throw new R.Schema("Primary key cannot be multi-valued");
2072
2076
  r.forEach(function(o) {
@@ -2074,34 +2078,34 @@ var Ar = { exports: {} };
2074
2078
  throw new R.Schema("Only primary key can be marked as autoIncrement (++)");
2075
2079
  if (!o.keyPath)
2076
2080
  throw new R.Schema("Index must have a name and cannot be an empty string");
2077
- }), t[n] = gn(n, i, r);
2081
+ }), t[n] = wn(n, i, r);
2078
2082
  }
2079
2083
  });
2080
- }, $t.prototype.stores = function(n) {
2084
+ }, Wt.prototype.stores = function(n) {
2081
2085
  var t = this.db;
2082
2086
  this._cfg.storesSource = this._cfg.storesSource ? Q(this._cfg.storesSource, n) : n;
2083
2087
  var n = t._versions, r = {}, i = {};
2084
2088
  return n.forEach(function(o) {
2085
2089
  Q(r, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(r, i);
2086
- }), t._dbSchema = i, wn(t, [t._allTables, t, t.Transaction.prototype]), Ft(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], C(i), i), t._storeNames = C(i), this;
2087
- }, $t.prototype.upgrade = function(e) {
2088
- return this._cfg.contentUpgrade = tn(this._cfg.contentUpgrade || q, e), this;
2089
- }, $t);
2090
- function $t() {
2090
+ }), t._dbSchema = i, kn(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], C(i), i), t._storeNames = C(i), this;
2091
+ }, Wt.prototype.upgrade = function(e) {
2092
+ return this._cfg.contentUpgrade = rn(this._cfg.contentUpgrade || q, e), this;
2093
+ }, Wt);
2094
+ function Wt() {
2091
2095
  }
2092
- function kn(e, t) {
2096
+ function Sn(e, t) {
2093
2097
  var n = e._dbNamesDB;
2094
- return n || (n = e._dbNamesDB = new ge(Dt, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
2098
+ return n || (n = e._dbNamesDB = new we(Bt, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
2095
2099
  }
2096
- function On(e) {
2100
+ function En(e) {
2097
2101
  return e && typeof e.databases == "function";
2098
2102
  }
2099
- function Sn(e) {
2100
- return Se(function() {
2103
+ function Pn(e) {
2104
+ return Pe(function() {
2101
2105
  return B.letThrough = !0, e();
2102
2106
  });
2103
2107
  }
2104
- function En(e) {
2108
+ function jn(e) {
2105
2109
  return !("from" in e);
2106
2110
  }
2107
2111
  var te = function(e, t) {
@@ -2111,40 +2115,40 @@ var Ar = { exports: {} };
2111
2115
  }
2112
2116
  Q(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2113
2117
  };
2114
- function yt(e, t, n) {
2118
+ function vt(e, t, n) {
2115
2119
  var r = U(t, n);
2116
2120
  if (!isNaN(r)) {
2117
2121
  if (0 < r)
2118
2122
  throw RangeError();
2119
- if (En(e))
2123
+ if (jn(e))
2120
2124
  return Q(e, { from: t, to: n, d: 1 });
2121
2125
  var i = e.l, r = e.r;
2122
2126
  if (U(n, e.from) < 0)
2123
- return i ? yt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, gr(e);
2127
+ return i ? vt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
2124
2128
  if (0 < U(t, e.to))
2125
- return r ? yt(r, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, gr(e);
2126
- U(t, e.from) < 0 && (e.from = t, e.l = null, e.d = r ? r.d + 1 : 1), 0 < U(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, i && !e.l && mt(e, i), r && n && mt(e, r);
2129
+ return r ? vt(r, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
2130
+ U(t, e.from) < 0 && (e.from = t, e.l = null, e.d = r ? r.d + 1 : 1), 0 < U(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, i && !e.l && gt(e, i), r && n && gt(e, r);
2127
2131
  }
2128
2132
  }
2129
- function mt(e, t) {
2130
- En(t) || function n(r, h) {
2133
+ function gt(e, t) {
2134
+ jn(t) || function n(r, h) {
2131
2135
  var o = h.from, a = h.to, u = h.l, h = h.r;
2132
- yt(r, o, a), u && n(r, u), h && n(r, h);
2136
+ vt(r, o, a), u && n(r, u), h && n(r, h);
2133
2137
  }(e, t);
2134
2138
  }
2135
- function Ut(e, t) {
2136
- var n = Pn(t), r = n.next();
2139
+ function Vt(e, t) {
2140
+ var n = Cn(t), r = n.next();
2137
2141
  if (r.done)
2138
2142
  return !1;
2139
- for (var i = r.value, o = Pn(e), a = o.next(i.from), u = a.value; !r.done && !a.done; ) {
2143
+ for (var i = r.value, o = Cn(e), a = o.next(i.from), u = a.value; !r.done && !a.done; ) {
2140
2144
  if (U(u.from, i.to) <= 0 && 0 <= U(u.to, i.from))
2141
2145
  return !0;
2142
2146
  U(i.from, u.from) < 0 ? i = (r = n.next(u.from)).value : u = (a = o.next(i.from)).value;
2143
2147
  }
2144
2148
  return !1;
2145
2149
  }
2146
- function Pn(e) {
2147
- var t = En(e) ? null : { s: 0, n: e };
2150
+ function Cn(e) {
2151
+ var t = jn(e) ? null : { s: 0, n: e };
2148
2152
  return { next: function(n) {
2149
2153
  for (var r = 0 < arguments.length; t; )
2150
2154
  switch (t.s) {
@@ -2169,67 +2173,67 @@ var Ar = { exports: {} };
2169
2173
  return { done: !0 };
2170
2174
  } };
2171
2175
  }
2172
- function gr(e) {
2176
+ function _r(e) {
2173
2177
  var t, n, r = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), i = 1 < r ? "r" : r < -1 ? "l" : "";
2174
- i && (t = i == "r" ? "l" : "r", n = w({}, e), r = e[i], e.from = r.from, e.to = r.to, e[i] = r[i], n[i] = r[t], (e[t] = n).d = br(n)), e.d = br(e);
2178
+ i && (t = i == "r" ? "l" : "r", n = w({}, e), r = e[i], e.from = r.from, e.to = r.to, e[i] = r[i], n[i] = r[t], (e[t] = n).d = kr(n)), e.d = kr(e);
2175
2179
  }
2176
- function br(n) {
2180
+ function kr(n) {
2177
2181
  var t = n.r, n = n.l;
2178
2182
  return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
2179
2183
  }
2180
- function Wt(e, t) {
2184
+ function qt(e, t) {
2181
2185
  return C(t).forEach(function(n) {
2182
- e[n] ? mt(e[n], t[n]) : e[n] = function r(i) {
2186
+ e[n] ? gt(e[n], t[n]) : e[n] = function r(i) {
2183
2187
  var o, a, u = {};
2184
2188
  for (o in i)
2185
- ie(i, o) && (a = i[o], u[o] = !a || typeof a != "object" || Hn.has(a.constructor) ? a : r(a));
2189
+ ie(i, o) && (a = i[o], u[o] = !a || typeof a != "object" || Jn.has(a.constructor) ? a : r(a));
2186
2190
  return u;
2187
2191
  }(t[n]);
2188
2192
  }), e;
2189
2193
  }
2190
- function jn(e, t) {
2194
+ function Kn(e, t) {
2191
2195
  return e.all || t.all || Object.keys(e).some(function(n) {
2192
- return t[n] && Ut(t[n], e[n]);
2196
+ return t[n] && Vt(t[n], e[n]);
2193
2197
  });
2194
2198
  }
2195
- Ue(te.prototype, ((ce = { add: function(e) {
2196
- return mt(this, e), this;
2199
+ Ve(te.prototype, ((ce = { add: function(e) {
2200
+ return gt(this, e), this;
2197
2201
  }, addKey: function(e) {
2198
- return yt(this, e, e), this;
2202
+ return vt(this, e, e), this;
2199
2203
  }, addKeys: function(e) {
2200
2204
  var t = this;
2201
2205
  return e.forEach(function(n) {
2202
- return yt(t, n, n);
2206
+ return vt(t, n, n);
2203
2207
  }), this;
2204
- } })[Jt] = function() {
2205
- return Pn(this);
2208
+ } })[en] = function() {
2209
+ return Cn(this);
2206
2210
  }, ce));
2207
- var Fe = {}, Cn = {}, Kn = !1;
2208
- function Vt(e) {
2209
- Wt(Cn, e), Kn || (Kn = !0, setTimeout(function() {
2210
- Kn = !1, An(Cn, !(Cn = {}));
2211
+ var Le = {}, An = {}, Dn = !1;
2212
+ function Gt(e) {
2213
+ qt(An, e), Dn || (Dn = !0, setTimeout(function() {
2214
+ Dn = !1, Tn(An, !(An = {}));
2211
2215
  }, 0));
2212
2216
  }
2213
- function An(e, t) {
2217
+ function Tn(e, t) {
2214
2218
  t === void 0 && (t = !1);
2215
2219
  var n = /* @__PURE__ */ new Set();
2216
2220
  if (e.all)
2217
- for (var r = 0, i = Object.values(Fe); r < i.length; r++)
2218
- wr(a = i[r], e, n, t);
2221
+ for (var r = 0, i = Object.values(Le); r < i.length; r++)
2222
+ xr(a = i[r], e, n, t);
2219
2223
  else
2220
2224
  for (var o in e) {
2221
2225
  var a, u = /^idb\:\/\/(.*)\/(.*)\//.exec(o);
2222
- u && (o = u[1], u = u[2], (a = Fe["idb://".concat(o, "/").concat(u)]) && wr(a, e, n, t));
2226
+ u && (o = u[1], u = u[2], (a = Le["idb://".concat(o, "/").concat(u)]) && xr(a, e, n, t));
2223
2227
  }
2224
2228
  n.forEach(function(h) {
2225
2229
  return h();
2226
2230
  });
2227
2231
  }
2228
- function wr(e, t, n, r) {
2232
+ function xr(e, t, n, r) {
2229
2233
  for (var i = [], o = 0, a = Object.entries(e.queries.query); o < a.length; o++) {
2230
2234
  for (var u = a[o], h = u[0], l = [], m = 0, c = u[1]; m < c.length; m++) {
2231
2235
  var f = c[m];
2232
- jn(t, f.obsSet) ? f.subscribers.forEach(function(p) {
2236
+ Kn(t, f.obsSet) ? f.subscribers.forEach(function(p) {
2233
2237
  return n.add(p);
2234
2238
  }) : r && l.push(f);
2235
2239
  }
@@ -2241,7 +2245,7 @@ var Ar = { exports: {} };
2241
2245
  e.queries.query[h] = l;
2242
2246
  }
2243
2247
  }
2244
- function ci(e) {
2248
+ function di(e) {
2245
2249
  var t = e._state, n = e._deps.indexedDB;
2246
2250
  if (t.isBeingOpened || e.idbdb)
2247
2251
  return t.dbReadyPromise.then(function() {
@@ -2260,31 +2264,31 @@ var Ar = { exports: {} };
2260
2264
  var y = e.name, v = t.autoSchema || !i ? n.open(y) : n.open(y, i);
2261
2265
  if (!v)
2262
2266
  throw new R.MissingAPI();
2263
- v.onerror = de(d), v.onblocked = H(e._fireOnBlocked), v.onupgradeneeded = H(function(p) {
2267
+ v.onerror = ye(d), v.onblocked = H(e._fireOnBlocked), v.onupgradeneeded = H(function(p) {
2264
2268
  var g;
2265
- m = v.transaction, t.autoSchema && !e._options.allowEmptyDB ? (v.onerror = ft, m.abort(), v.result.close(), (g = n.deleteDatabase(y)).onsuccess = g.onerror = H(function() {
2269
+ m = v.transaction, t.autoSchema && !e._options.allowEmptyDB ? (v.onerror = dt, m.abort(), v.result.close(), (g = n.deleteDatabase(y)).onsuccess = g.onerror = H(function() {
2266
2270
  d(new R.NoSuchDatabase("Database ".concat(y, " doesnt exist")));
2267
- })) : (m.onerror = de(d), p = p.oldVersion > Math.pow(2, 62) ? 0 : p.oldVersion, c = p < 1, e.idbdb = v.result, o && si(e, m), ai(e, p / 10, m, d));
2271
+ })) : (m.onerror = ye(d), p = p.oldVersion > Math.pow(2, 62) ? 0 : p.oldVersion, c = p < 1, e.idbdb = v.result, o && fi(e, m), li(e, p / 10, m, d));
2268
2272
  }, d), v.onsuccess = H(function() {
2269
2273
  m = null;
2270
- var p, g, b, _, x, S = e.idbdb = v.result, j = _t(S.objectStoreNames);
2274
+ var p, g, b, _, k, S = e.idbdb = v.result, j = xt(S.objectStoreNames);
2271
2275
  if (0 < j.length)
2272
2276
  try {
2273
2277
  var E = S.transaction((_ = j).length === 1 ? _[0] : _, "readonly");
2274
2278
  if (t.autoSchema)
2275
- g = S, b = E, (p = e).verno = g.version / 10, b = p._dbSchema = Lt(0, g, b), p._storeNames = _t(g.objectStoreNames, 0), Ft(p, [p._allTables], C(b), b);
2276
- else if (zt(e, e._dbSchema, E), ((x = _n(Lt(0, (x = e).idbdb, E), x._dbSchema)).add.length || x.change.some(function(K) {
2279
+ g = S, b = E, (p = e).verno = g.version / 10, b = p._dbSchema = zt(0, g, b), p._storeNames = xt(g.objectStoreNames, 0), Lt(p, [p._allTables], C(b), b);
2280
+ else if (Ut(e, e._dbSchema, E), ((k = xn(zt(0, (k = e).idbdb, E), k._dbSchema)).add.length || k.change.some(function(K) {
2277
2281
  return K.add.length || K.change.length;
2278
2282
  })) && !o)
2279
2283
  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."), S.close(), i = S.version + 1, o = !0, f(u());
2280
- Mt(e, E);
2284
+ Ft(e, E);
2281
2285
  } catch {
2282
2286
  }
2283
- Xe.push(e), S.onversionchange = H(function(K) {
2287
+ Ze.push(e), S.onversionchange = H(function(K) {
2284
2288
  t.vcFired = !0, e.on("versionchange").fire(K);
2285
2289
  }), S.onclose = H(function(K) {
2286
2290
  e.on("close").fire(K);
2287
- }), c && (x = e._deps, E = y, S = x.indexedDB, x = x.IDBKeyRange, On(S) || E === Dt || kn(S, x).put({ name: E }).catch(q)), f();
2291
+ }), c && (k = e._deps, E = y, S = k.indexedDB, k = k.IDBKeyRange, En(S) || E === Bt || Sn(S, k).put({ name: E }).catch(q)), f();
2288
2292
  }, d);
2289
2293
  }).catch(function(f) {
2290
2294
  switch (f == null ? void 0 : f.name) {
@@ -2308,12 +2312,12 @@ var Ar = { exports: {} };
2308
2312
  }).finally(function() {
2309
2313
  return clearInterval(h);
2310
2314
  }) : Promise.resolve()).then(u)]).then(function() {
2311
- return a(), t.onReadyBeingFired = [], A.resolve(Sn(function() {
2315
+ return a(), t.onReadyBeingFired = [], A.resolve(Pn(function() {
2312
2316
  return e.on.ready.fire(e.vip);
2313
2317
  })).then(function f() {
2314
2318
  if (0 < t.onReadyBeingFired.length) {
2315
- var d = t.onReadyBeingFired.reduce(tn, q);
2316
- return t.onReadyBeingFired = [], A.resolve(Sn(function() {
2319
+ var d = t.onReadyBeingFired.reduce(rn, q);
2320
+ return t.onReadyBeingFired = [], A.resolve(Pn(function() {
2317
2321
  return d(e.vip);
2318
2322
  })).then(f);
2319
2323
  }
@@ -2335,10 +2339,10 @@ var Ar = { exports: {} };
2335
2339
  d.schema.indexes.forEach(function(y) {
2336
2340
  y.name && (f["idb://".concat(e.name, "/").concat(d.name, "/").concat(y.name)] = new te(-1 / 0, [[[]]]));
2337
2341
  }), f["idb://".concat(e.name, "/").concat(d.name, "/")] = f["idb://".concat(e.name, "/").concat(d.name, "/:dels")] = new te(-1 / 0, [[[]]]);
2338
- }), Ce(ht).fire(f), An(f, !0)), e;
2342
+ }), Ae(pt).fire(f), Tn(f, !0)), e;
2339
2343
  });
2340
2344
  }
2341
- function Dn(e) {
2345
+ function Bn(e) {
2342
2346
  function t(o) {
2343
2347
  return e.next(o);
2344
2348
  }
@@ -2348,21 +2352,21 @@ var Ar = { exports: {} };
2348
2352
  function i(o) {
2349
2353
  return function(h) {
2350
2354
  var u = o(h), h = u.value;
2351
- return u.done ? h : h && typeof h.then == "function" ? h.then(n, r) : z(h) ? Promise.all(h).then(n, r) : n(h);
2355
+ return u.done ? h : h && typeof h.then == "function" ? h.then(n, r) : $(h) ? Promise.all(h).then(n, r) : n(h);
2352
2356
  };
2353
2357
  }
2354
2358
  return i(t)();
2355
2359
  }
2356
- function qt(e, t, n) {
2357
- for (var r = z(e) ? e.slice() : [e], i = 0; i < n; ++i)
2360
+ function Yt(e, t, n) {
2361
+ for (var r = $(e) ? e.slice() : [e], i = 0; i < n; ++i)
2358
2362
  r.push(t);
2359
2363
  return r;
2360
2364
  }
2361
- var li = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2365
+ var pi = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2362
2366
  return w(w({}, e), { table: function(t) {
2363
2367
  var n = e.table(t), r = n.schema, i = {}, o = [];
2364
2368
  function a(c, f, d) {
2365
- var y = pt(c), v = i[y] = i[y] || [], p = c == null ? 0 : typeof c == "string" ? 1 : c.length, g = 0 < f, g = w(w({}, d), { name: g ? "".concat(y, "(virtual-from:").concat(d.name, ")") : d.name, lowLevelIndex: d, isVirtual: g, keyTail: f, keyLength: p, extractKey: bn(c), unique: !g && d.unique });
2369
+ var y = mt(c), v = i[y] = i[y] || [], p = c == null ? 0 : typeof c == "string" ? 1 : c.length, g = 0 < f, g = w(w({}, d), { name: g ? "".concat(y, "(virtual-from:").concat(d.name, ")") : d.name, lowLevelIndex: d, isVirtual: g, keyTail: f, keyLength: p, extractKey: _n(c), unique: !g && d.unique });
2366
2370
  return v.push(g), g.isPrimaryKey || o.push(g), 1 < p && a(p === 2 ? c[0] : c.slice(0, p - 1), f + 1, d), v.sort(function(b, _) {
2367
2371
  return b.keyTail - _.keyTail;
2368
2372
  }), g;
@@ -2374,10 +2378,10 @@ var Ar = { exports: {} };
2374
2378
  }
2375
2379
  function m(c) {
2376
2380
  var f, d = c.query.index;
2377
- return d.isVirtual ? w(w({}, c), { query: { index: d.lowLevelIndex, range: (f = c.query.range, d = d.keyTail, { type: f.type === 1 ? 2 : f.type, lower: qt(f.lower, f.lowerOpen ? e.MAX_KEY : e.MIN_KEY, d), lowerOpen: !0, upper: qt(f.upper, f.upperOpen ? e.MIN_KEY : e.MAX_KEY, d), upperOpen: !0 }) } }) : c;
2381
+ return d.isVirtual ? w(w({}, c), { query: { index: d.lowLevelIndex, range: (f = c.query.range, d = d.keyTail, { type: f.type === 1 ? 2 : f.type, lower: Yt(f.lower, f.lowerOpen ? e.MAX_KEY : e.MIN_KEY, d), lowerOpen: !0, upper: Yt(f.upper, f.upperOpen ? e.MIN_KEY : e.MAX_KEY, d), upperOpen: !0 }) } }) : c;
2378
2382
  }
2379
2383
  return w(w({}, n), { schema: w(w({}, r), { primaryKey: t, indexes: o, getIndexByKeyPath: function(c) {
2380
- return (c = i[pt(c)]) && c[0];
2384
+ return (c = i[mt(c)]) && c[0];
2381
2385
  } }), count: function(c) {
2382
2386
  return n.count(m(c));
2383
2387
  }, query: function(c) {
@@ -2389,9 +2393,9 @@ var Ar = { exports: {} };
2389
2393
  }) : n.openCursor(c);
2390
2394
  function p(g) {
2391
2395
  return Object.create(g, { continue: { value: function(b) {
2392
- b != null ? g.continue(qt(b, c.reverse ? e.MAX_KEY : e.MIN_KEY, d)) : c.unique ? g.continue(g.key.slice(0, v).concat(c.reverse ? e.MIN_KEY : e.MAX_KEY, d)) : g.continue();
2396
+ b != null ? g.continue(Yt(b, c.reverse ? e.MAX_KEY : e.MIN_KEY, d)) : c.unique ? g.continue(g.key.slice(0, v).concat(c.reverse ? e.MIN_KEY : e.MAX_KEY, d)) : g.continue();
2393
2397
  } }, continuePrimaryKey: { value: function(b, _) {
2394
- g.continuePrimaryKey(qt(b, e.MAX_KEY, d), _);
2398
+ g.continuePrimaryKey(Yt(b, e.MAX_KEY, d), _);
2395
2399
  } }, primaryKey: { get: function() {
2396
2400
  return g.primaryKey;
2397
2401
  } }, key: { get: function() {
@@ -2404,18 +2408,18 @@ var Ar = { exports: {} };
2404
2408
  } });
2405
2409
  } });
2406
2410
  } };
2407
- function Tn(e, t, n, r) {
2411
+ function In(e, t, n, r) {
2408
2412
  return n = n || {}, r = r || "", C(e).forEach(function(i) {
2409
2413
  var o, a, u;
2410
- ie(t, i) ? (o = e[i], a = t[i], typeof o == "object" && typeof a == "object" && o && a ? (u = Xt(o)) !== Xt(a) ? n[r + i] = t[i] : u === "Object" ? Tn(o, a, n, r + i + ".") : o !== a && (n[r + i] = t[i]) : o !== a && (n[r + i] = t[i])) : n[r + i] = void 0;
2414
+ ie(t, i) ? (o = e[i], a = t[i], typeof o == "object" && typeof a == "object" && o && a ? (u = Zt(o)) !== Zt(a) ? n[r + i] = t[i] : u === "Object" ? In(o, a, n, r + i + ".") : o !== a && (n[r + i] = t[i]) : o !== a && (n[r + i] = t[i])) : n[r + i] = void 0;
2411
2415
  }), C(t).forEach(function(i) {
2412
2416
  ie(e, i) || (n[r + i] = t[i]);
2413
2417
  }), n;
2414
2418
  }
2415
- function Bn(e, t) {
2419
+ function Rn(e, t) {
2416
2420
  return t.type === "delete" ? t.keys : t.keys || t.values.map(e.extractKey);
2417
2421
  }
2418
- var fi = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
2422
+ var yi = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
2419
2423
  return w(w({}, e), { table: function(t) {
2420
2424
  var n = e.table(t), r = n.schema.primaryKey;
2421
2425
  return w(w({}, n), { mutate: function(i) {
@@ -2455,25 +2459,25 @@ var Ar = { exports: {} };
2455
2459
  }
2456
2460
  return n.mutate(i);
2457
2461
  function m(c) {
2458
- var f, d, y, v = B.trans, p = c.keys || Bn(r, c);
2462
+ var f, d, y, v = B.trans, p = c.keys || Rn(r, c);
2459
2463
  if (!p)
2460
2464
  throw new Error("Keys missing");
2461
2465
  return (c = c.type === "add" || c.type === "put" ? w(w({}, c), { keys: p }) : w({}, c)).type !== "delete" && (c.values = O([], c.values, !0)), c.keys && (c.keys = O([], c.keys, !0)), f = n, y = p, ((d = c).type === "add" ? Promise.resolve([]) : f.getMany({ trans: d.trans, keys: y, cache: "immutable" })).then(function(g) {
2462
- var b = p.map(function(_, x) {
2463
- var S, j, E, K = g[x], P = { onerror: null, onsuccess: null };
2464
- return c.type === "delete" ? u.fire.call(P, _, K, v) : c.type === "add" || K === void 0 ? (S = h.fire.call(P, _, c.values[x], v), _ == null && S != null && (c.keys[x] = _ = S, r.outbound || ue(c.values[x], r.keyPath, _))) : (S = Tn(K, c.values[x]), (j = l.fire.call(P, S, _, K, v)) && (E = c.values[x], Object.keys(j).forEach(function(I) {
2466
+ var b = p.map(function(_, k) {
2467
+ var S, j, E, K = g[k], P = { onerror: null, onsuccess: null };
2468
+ return c.type === "delete" ? u.fire.call(P, _, K, v) : c.type === "add" || K === void 0 ? (S = h.fire.call(P, _, c.values[k], v), _ == null && S != null && (c.keys[k] = _ = S, r.outbound || ue(c.values[k], r.keyPath, _))) : (S = In(K, c.values[k]), (j = l.fire.call(P, S, _, K, v)) && (E = c.values[k], Object.keys(j).forEach(function(I) {
2465
2469
  ie(E, I) ? E[I] = j[I] : ue(E, I, j[I]);
2466
2470
  }))), P;
2467
2471
  });
2468
2472
  return n.mutate(c).then(function(_) {
2469
- for (var x = _.failures, S = _.results, j = _.numFailures, _ = _.lastResult, E = 0; E < p.length; ++E) {
2473
+ for (var k = _.failures, S = _.results, j = _.numFailures, _ = _.lastResult, E = 0; E < p.length; ++E) {
2470
2474
  var K = (S || p)[E], P = b[E];
2471
- K == null ? P.onerror && P.onerror(x[E]) : P.onsuccess && P.onsuccess(c.type === "put" && g[E] ? c.values[E] : K);
2475
+ K == null ? P.onerror && P.onerror(k[E]) : P.onsuccess && P.onsuccess(c.type === "put" && g[E] ? c.values[E] : K);
2472
2476
  }
2473
- return { failures: x, results: S, numFailures: j, lastResult: _ };
2477
+ return { failures: k, results: S, numFailures: j, lastResult: _ };
2474
2478
  }).catch(function(_) {
2475
- return b.forEach(function(x) {
2476
- return x.onerror && x.onerror(_);
2479
+ return b.forEach(function(k) {
2480
+ return k.onerror && k.onerror(_);
2477
2481
  }), Promise.reject(_);
2478
2482
  });
2479
2483
  });
@@ -2481,36 +2485,36 @@ var Ar = { exports: {} };
2481
2485
  } });
2482
2486
  } });
2483
2487
  } };
2484
- function _r(e, t, n) {
2488
+ function Or(e, t, n) {
2485
2489
  try {
2486
2490
  if (!t || t.keys.length < e.length)
2487
2491
  return null;
2488
2492
  for (var r = [], i = 0, o = 0; i < t.keys.length && o < e.length; ++i)
2489
- U(t.keys[i], e[o]) === 0 && (r.push(n ? ke(t.values[i]) : t.values[i]), ++o);
2493
+ U(t.keys[i], e[o]) === 0 && (r.push(n ? Se(t.values[i]) : t.values[i]), ++o);
2490
2494
  return r.length === e.length ? r : null;
2491
2495
  } catch {
2492
2496
  return null;
2493
2497
  }
2494
2498
  }
2495
- var hi = { stack: "dbcore", level: -1, create: function(e) {
2499
+ var mi = { stack: "dbcore", level: -1, create: function(e) {
2496
2500
  return { table: function(t) {
2497
2501
  var n = e.table(t);
2498
2502
  return w(w({}, n), { getMany: function(r) {
2499
2503
  if (!r.cache)
2500
2504
  return n.getMany(r);
2501
- var i = _r(r.keys, r.trans._cache, r.cache === "clone");
2505
+ var i = Or(r.keys, r.trans._cache, r.cache === "clone");
2502
2506
  return i ? A.resolve(i) : n.getMany(r).then(function(o) {
2503
- return r.trans._cache = { keys: r.keys, values: r.cache === "clone" ? ke(o) : o }, o;
2507
+ return r.trans._cache = { keys: r.keys, values: r.cache === "clone" ? Se(o) : o }, o;
2504
2508
  });
2505
2509
  }, mutate: function(r) {
2506
2510
  return r.type !== "add" && (r.trans._cache = null), n.mutate(r);
2507
2511
  } });
2508
2512
  } };
2509
2513
  } };
2510
- function xr(e, t) {
2514
+ function Sr(e, t) {
2511
2515
  return e.trans.mode === "readonly" && !!e.subscr && !e.trans.explicit && e.trans.db._options.cache !== "disabled" && !t.schema.primaryKey.outbound;
2512
2516
  }
2513
- function kr(e, t) {
2517
+ function Er(e, t) {
2514
2518
  switch (e) {
2515
2519
  case "query":
2516
2520
  return t.values && !t.unique;
@@ -2521,7 +2525,7 @@ var Ar = { exports: {} };
2521
2525
  return !1;
2522
2526
  }
2523
2527
  }
2524
- var di = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
2528
+ var vi = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
2525
2529
  var t = e.schema.name, n = new te(e.MIN_KEY, e.MAX_KEY);
2526
2530
  return w(w({}, e), { transaction: function(r, i, o) {
2527
2531
  if (B.subscr && i !== "readonly")
@@ -2536,27 +2540,27 @@ var Ar = { exports: {} };
2536
2540
  function d(P) {
2537
2541
  return P = "idb://".concat(t, "/").concat(r, "/").concat(P), b[P] || (b[P] = new te());
2538
2542
  }
2539
- var y, v, p, g = f.trans, b = f.mutatedParts || (f.mutatedParts = {}), _ = d(""), x = d(":dels"), S = f.type, K = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [Bn(u, f).filter(function(P) {
2543
+ var y, v, p, g = f.trans, b = f.mutatedParts || (f.mutatedParts = {}), _ = d(""), k = d(":dels"), S = f.type, K = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [Rn(u, f).filter(function(P) {
2540
2544
  return P;
2541
2545
  }), f.values] : [], j = K[0], E = K[1], K = f.trans._cache;
2542
- return z(j) ? (_.addKeys(j), (K = S === "delete" || j.length === E.length ? _r(j, K) : null) || x.addKeys(j), (K || E) && (y = d, v = K, p = E, a.indexes.forEach(function(P) {
2546
+ return $(j) ? (_.addKeys(j), (K = S === "delete" || j.length === E.length ? Or(j, K) : null) || k.addKeys(j), (K || E) && (y = d, v = K, p = E, a.indexes.forEach(function(P) {
2543
2547
  var I = y(P.name || "");
2544
2548
  function M(L) {
2545
2549
  return L != null ? P.extractKey(L) : null;
2546
2550
  }
2547
2551
  function W(L) {
2548
- return P.multiEntry && z(L) ? L.forEach(function(G) {
2552
+ return P.multiEntry && $(L) ? L.forEach(function(G) {
2549
2553
  return I.addKey(G);
2550
2554
  }) : I.addKey(L);
2551
2555
  }
2552
- (v || p).forEach(function(L, N) {
2553
- var ae = v && M(v[N]), N = p && M(p[N]);
2554
- U(ae, N) !== 0 && (ae != null && W(ae), N != null && W(N));
2556
+ (v || p).forEach(function(L, F) {
2557
+ var ae = v && M(v[F]), F = p && M(p[F]);
2558
+ U(ae, F) !== 0 && (ae != null && W(ae), F != null && W(F));
2555
2559
  });
2556
- }))) : j ? (E = { from: j.lower, to: j.upper }, x.add(E), _.add(E)) : (_.add(n), x.add(n), a.indexes.forEach(function(P) {
2560
+ }))) : j ? (E = { from: j.lower, to: j.upper }, k.add(E), _.add(E)) : (_.add(n), k.add(n), a.indexes.forEach(function(P) {
2557
2561
  return d(P.name).add(n);
2558
2562
  })), o.mutate(f).then(function(P) {
2559
- return !j || f.type !== "add" && f.type !== "put" || _.addKeys(P.results), g.mutatedParts = Wt(g.mutatedParts || {}, b), P;
2563
+ return !j || f.type !== "add" && f.type !== "put" || _.addKeys(P.results), g.mutatedParts = qt(g.mutatedParts || {}, b), P;
2560
2564
  });
2561
2565
  } }), c = { get: function(f) {
2562
2566
  return [u, new te(f.key)];
@@ -2565,18 +2569,18 @@ var Ar = { exports: {} };
2565
2569
  }, count: i, query: i, openCursor: i };
2566
2570
  return C(c).forEach(function(f) {
2567
2571
  m[f] = function(d) {
2568
- var y = B.subscr, v = !!y, p = xr(B, o) && kr(f, d) ? d.obsSet = {} : y;
2572
+ var y = B.subscr, v = !!y, p = Sr(B, o) && Er(f, d) ? d.obsSet = {} : y;
2569
2573
  if (v) {
2570
2574
  var g = function(E) {
2571
2575
  return E = "idb://".concat(t, "/").concat(r, "/").concat(E), p[E] || (p[E] = new te());
2572
2576
  }, b = g(""), _ = g(":dels"), y = c[f](d), v = y[0], y = y[1];
2573
2577
  if ((f === "query" && v.isPrimaryKey && !d.values ? _ : g(v.name || "")).add(y), !v.isPrimaryKey) {
2574
2578
  if (f !== "count") {
2575
- var x = f === "query" && l && d.values && o.query(w(w({}, d), { values: !1 }));
2579
+ var k = f === "query" && l && d.values && o.query(w(w({}, d), { values: !1 }));
2576
2580
  return o[f].apply(this, arguments).then(function(E) {
2577
2581
  if (f === "query") {
2578
2582
  if (l && d.values)
2579
- return x.then(function(M) {
2583
+ return k.then(function(M) {
2580
2584
  return M = M.result, b.addKeys(M), E;
2581
2585
  });
2582
2586
  var K = d.values ? E.result.map(h) : E.result;
@@ -2603,32 +2607,32 @@ var Ar = { exports: {} };
2603
2607
  }), m;
2604
2608
  } });
2605
2609
  } };
2606
- function Or(e, t, n) {
2610
+ function Pr(e, t, n) {
2607
2611
  if (n.numFailures === 0)
2608
2612
  return t;
2609
2613
  if (t.type === "deleteRange")
2610
2614
  return null;
2611
2615
  var r = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
2612
- return n.numFailures === r ? null : (t = w({}, t), z(t.keys) && (t.keys = t.keys.filter(function(i, o) {
2616
+ return n.numFailures === r ? null : (t = w({}, t), $(t.keys) && (t.keys = t.keys.filter(function(i, o) {
2613
2617
  return !(o in n.failures);
2614
- })), "values" in t && z(t.values) && (t.values = t.values.filter(function(i, o) {
2618
+ })), "values" in t && $(t.values) && (t.values = t.values.filter(function(i, o) {
2615
2619
  return !(o in n.failures);
2616
2620
  })), t);
2617
2621
  }
2618
- function In(e, t) {
2622
+ function Mn(e, t) {
2619
2623
  return n = e, ((r = t).lower === void 0 || (r.lowerOpen ? 0 < U(n, r.lower) : 0 <= U(n, r.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? U(e, t.upper) < 0 : U(e, t.upper) <= 0));
2620
2624
  var n, r;
2621
2625
  }
2622
- function Sr(e, t, f, r, i, o) {
2626
+ function jr(e, t, f, r, i, o) {
2623
2627
  if (!f || f.length === 0)
2624
2628
  return e;
2625
2629
  var a = t.query.index, u = a.multiEntry, h = t.query.range, l = r.schema.primaryKey.extractKey, m = a.extractKey, c = (a.lowLevelIndex || a).extractKey, f = f.reduce(function(d, y) {
2626
- var v = d, p = y.type === "add" || y.type === "put" ? y.values.filter(function(x) {
2627
- return x = m(x), u && z(x) ? x.some(function(S) {
2628
- return In(S, h);
2629
- }) : In(x, h);
2630
- }).map(function(x) {
2631
- return x = ke(x), o && Object.freeze(x), x;
2630
+ var v = d, p = y.type === "add" || y.type === "put" ? y.values.filter(function(k) {
2631
+ return k = m(k), u && $(k) ? k.some(function(S) {
2632
+ return Mn(S, h);
2633
+ }) : Mn(k, h);
2634
+ }).map(function(k) {
2635
+ return k = Se(k), o && Object.freeze(k), k;
2632
2636
  }) : [];
2633
2637
  switch (y.type) {
2634
2638
  case "add":
@@ -2640,7 +2644,7 @@ var Ar = { exports: {} };
2640
2644
  var g = new te().addKeys(y.values.map(function(S) {
2641
2645
  return l(S);
2642
2646
  })), v = d.filter(function(S) {
2643
- return S = t.values ? l(S) : S, !Ut(new te(S), g);
2647
+ return S = t.values ? l(S) : S, !Vt(new te(S), g);
2644
2648
  }).concat(t.values ? p : p.map(function(S) {
2645
2649
  return l(S);
2646
2650
  }));
@@ -2648,13 +2652,13 @@ var Ar = { exports: {} };
2648
2652
  case "delete":
2649
2653
  var b = new te().addKeys(y.keys);
2650
2654
  v = d.filter(function(S) {
2651
- return S = t.values ? l(S) : S, !Ut(new te(S), b);
2655
+ return S = t.values ? l(S) : S, !Vt(new te(S), b);
2652
2656
  });
2653
2657
  break;
2654
2658
  case "deleteRange":
2655
2659
  var _ = y.range;
2656
2660
  v = d.filter(function(S) {
2657
- return !In(l(S), _);
2661
+ return !Mn(l(S), _);
2658
2662
  });
2659
2663
  }
2660
2664
  return v;
@@ -2663,10 +2667,10 @@ var Ar = { exports: {} };
2663
2667
  return U(c(d), c(y)) || U(l(d), l(y));
2664
2668
  }), t.limit && t.limit < 1 / 0 && (f.length > t.limit ? f.length = t.limit : e.length === t.limit && f.length < t.limit && (i.dirty = !0)), o ? Object.freeze(f) : f);
2665
2669
  }
2666
- function Er(e, t) {
2670
+ function Cr(e, t) {
2667
2671
  return U(e.lower, t.lower) === 0 && U(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
2668
2672
  }
2669
- function pi(e, t) {
2673
+ function gi(e, t) {
2670
2674
  return function(n, r, i, o) {
2671
2675
  if (n === void 0)
2672
2676
  return r !== void 0 ? -1 : 0;
@@ -2697,15 +2701,15 @@ var Ar = { exports: {} };
2697
2701
  return r;
2698
2702
  }(e.upper, t.upper, e.upperOpen, t.upperOpen);
2699
2703
  }
2700
- function yi(e, t, n, r) {
2704
+ function bi(e, t, n, r) {
2701
2705
  e.subscribers.add(n), r.addEventListener("abort", function() {
2702
2706
  var i, o;
2703
2707
  e.subscribers.delete(n), e.subscribers.size === 0 && (i = e, o = t, setTimeout(function() {
2704
- i.subscribers.size === 0 && Ae(o, i);
2708
+ i.subscribers.size === 0 && Te(o, i);
2705
2709
  }, 3e3));
2706
2710
  });
2707
2711
  }
2708
- var mi = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
2712
+ var wi = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
2709
2713
  var t = e.schema.name;
2710
2714
  return w(w({}, e), { transaction: function(n, r, i) {
2711
2715
  var o, a, u = e.transaction(n, r, i);
@@ -2713,7 +2717,7 @@ var Ar = { exports: {} };
2713
2717
  return function() {
2714
2718
  if (o.abort(), r === "readwrite") {
2715
2719
  for (var l = /* @__PURE__ */ new Set(), m = 0, c = n; m < c.length; m++) {
2716
- var f = c[m], d = Fe["idb://".concat(t, "/").concat(f)];
2720
+ var f = c[m], d = Le["idb://".concat(t, "/").concat(f)];
2717
2721
  if (d) {
2718
2722
  var y = e.table(f), v = d.optimisticOps.filter(function(M) {
2719
2723
  return M.trans === u;
@@ -2721,18 +2725,18 @@ var Ar = { exports: {} };
2721
2725
  if (u._explicit && h && u.mutatedParts)
2722
2726
  for (var p = 0, g = Object.values(d.queries.query); p < g.length; p++)
2723
2727
  for (var b = 0, _ = (j = g[p]).slice(); b < _.length; b++)
2724
- jn((E = _[b]).obsSet, u.mutatedParts) && (Ae(j, E), E.subscribers.forEach(function(M) {
2728
+ Kn((E = _[b]).obsSet, u.mutatedParts) && (Te(j, E), E.subscribers.forEach(function(M) {
2725
2729
  return l.add(M);
2726
2730
  }));
2727
2731
  else if (0 < v.length) {
2728
2732
  d.optimisticOps = d.optimisticOps.filter(function(M) {
2729
2733
  return M.trans !== u;
2730
2734
  });
2731
- for (var x = 0, S = Object.values(d.queries.query); x < S.length; x++)
2732
- for (var j, E, K, P = 0, I = (j = S[x]).slice(); P < I.length; P++)
2733
- (E = I[P]).res != null && u.mutatedParts && (h && !E.dirty ? (K = Object.isFrozen(E.res), K = Sr(E.res, E.req, v, y, E, K), E.dirty ? (Ae(j, E), E.subscribers.forEach(function(M) {
2735
+ for (var k = 0, S = Object.values(d.queries.query); k < S.length; k++)
2736
+ for (var j, E, K, P = 0, I = (j = S[k]).slice(); P < I.length; P++)
2737
+ (E = I[P]).res != null && u.mutatedParts && (h && !E.dirty ? (K = Object.isFrozen(E.res), K = jr(E.res, E.req, v, y, E, K), E.dirty ? (Te(j, E), E.subscribers.forEach(function(M) {
2734
2738
  return l.add(M);
2735
- })) : K !== E.res && (E.res = K, E.promise = A.resolve({ result: K }))) : (E.dirty && Ae(j, E), E.subscribers.forEach(function(M) {
2739
+ })) : K !== E.res && (E.res = K, E.promise = A.resolve({ result: K }))) : (E.dirty && Te(j, E), E.subscribers.forEach(function(M) {
2736
2740
  return l.add(M);
2737
2741
  })));
2738
2742
  }
@@ -2750,27 +2754,27 @@ var Ar = { exports: {} };
2750
2754
  var a = B.trans;
2751
2755
  if (i.outbound || a.db._options.cache === "disabled" || a.explicit)
2752
2756
  return r.mutate(o);
2753
- var u = Fe["idb://".concat(t, "/").concat(n)];
2754
- return u ? (a = r.mutate(o), o.type !== "add" && o.type !== "put" || !(50 <= o.values.length || Bn(i, o).some(function(h) {
2757
+ var u = Le["idb://".concat(t, "/").concat(n)];
2758
+ return u ? (a = r.mutate(o), o.type !== "add" && o.type !== "put" || !(50 <= o.values.length || Rn(i, o).some(function(h) {
2755
2759
  return h == null;
2756
- })) ? (u.optimisticOps.push(o), o.mutatedParts && Vt(o.mutatedParts), a.then(function(h) {
2757
- 0 < h.numFailures && (Ae(u.optimisticOps, o), (h = Or(0, o, h)) && u.optimisticOps.push(h), o.mutatedParts && Vt(o.mutatedParts));
2760
+ })) ? (u.optimisticOps.push(o), o.mutatedParts && Gt(o.mutatedParts), a.then(function(h) {
2761
+ 0 < h.numFailures && (Te(u.optimisticOps, o), (h = Pr(0, o, h)) && u.optimisticOps.push(h), o.mutatedParts && Gt(o.mutatedParts));
2758
2762
  }), a.catch(function() {
2759
- Ae(u.optimisticOps, o), o.mutatedParts && Vt(o.mutatedParts);
2763
+ Te(u.optimisticOps, o), o.mutatedParts && Gt(o.mutatedParts);
2760
2764
  })) : a.then(function(h) {
2761
- var l = Or(0, w(w({}, o), { values: o.values.map(function(d, c) {
2762
- var f, d = (f = i.keyPath) !== null && f !== void 0 && f.includes(".") ? ke(d) : w({}, d);
2765
+ var l = Pr(0, w(w({}, o), { values: o.values.map(function(d, c) {
2766
+ var f, d = (f = i.keyPath) !== null && f !== void 0 && f.includes(".") ? Se(d) : w({}, d);
2763
2767
  return ue(d, i.keyPath, h.results[c]), d;
2764
2768
  }) }), h);
2765
2769
  u.optimisticOps.push(l), queueMicrotask(function() {
2766
- return o.mutatedParts && Vt(o.mutatedParts);
2770
+ return o.mutatedParts && Gt(o.mutatedParts);
2767
2771
  });
2768
2772
  }), a) : r.mutate(o);
2769
2773
  }, query: function(o) {
2770
- if (!xr(B, r) || !kr("query", o))
2774
+ if (!Sr(B, r) || !Er("query", o))
2771
2775
  return r.query(o);
2772
2776
  var a = ((l = B.trans) === null || l === void 0 ? void 0 : l.db._options.cache) === "immutable", c = B, u = c.requery, h = c.signal, l = function(y, v, p, g) {
2773
- var b = Fe["idb://".concat(y, "/").concat(v)];
2777
+ var b = Le["idb://".concat(y, "/").concat(v)];
2774
2778
  if (!b)
2775
2779
  return [];
2776
2780
  if (!(v = b.queries[p]))
@@ -2780,16 +2784,16 @@ var Ar = { exports: {} };
2780
2784
  return [null, !1, b, null];
2781
2785
  switch (p) {
2782
2786
  case "query":
2783
- var x = _.find(function(S) {
2784
- return S.req.limit === g.limit && S.req.values === g.values && Er(S.req.query.range, g.query.range);
2787
+ var k = _.find(function(S) {
2788
+ return S.req.limit === g.limit && S.req.values === g.values && Cr(S.req.query.range, g.query.range);
2785
2789
  });
2786
- return x ? [x, !0, b, _] : [_.find(function(S) {
2787
- return ("limit" in S.req ? S.req.limit : 1 / 0) >= g.limit && (!g.values || S.req.values) && pi(S.req.query.range, g.query.range);
2790
+ return k ? [k, !0, b, _] : [_.find(function(S) {
2791
+ return ("limit" in S.req ? S.req.limit : 1 / 0) >= g.limit && (!g.values || S.req.values) && gi(S.req.query.range, g.query.range);
2788
2792
  }), !1, b, _];
2789
2793
  case "count":
2790
- return x = _.find(function(S) {
2791
- return Er(S.req.query.range, g.query.range);
2792
- }), [x, !!x, b, _];
2794
+ return k = _.find(function(S) {
2795
+ return Cr(S.req.query.range, g.query.range);
2796
+ }), [k, !!k, b, _];
2793
2797
  }
2794
2798
  }(t, n, "query", o), m = l[0], c = l[1], f = l[2], d = l[3];
2795
2799
  return m && c ? m.obsSet = o.obsSet : (c = r.query(o).then(function(y) {
@@ -2799,22 +2803,22 @@ var Ar = { exports: {} };
2799
2803
  Object.freeze(v[p]);
2800
2804
  Object.freeze(v);
2801
2805
  } else
2802
- y.result = ke(v);
2806
+ y.result = Se(v);
2803
2807
  return y;
2804
2808
  }).catch(function(y) {
2805
- return d && m && Ae(d, m), Promise.reject(y);
2806
- }), m = { obsSet: o.obsSet, promise: c, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, d ? d.push(m) : (d = [m], (f = f || (Fe["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = d)), yi(m, d, u, h), m.promise.then(function(y) {
2807
- return { result: Sr(y.result, o, f == null ? void 0 : f.optimisticOps, r, m, a) };
2809
+ return d && m && Te(d, m), Promise.reject(y);
2810
+ }), m = { obsSet: o.obsSet, promise: c, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, d ? d.push(m) : (d = [m], (f = f || (Le["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = d)), bi(m, d, u, h), m.promise.then(function(y) {
2811
+ return { result: jr(y.result, o, f == null ? void 0 : f.optimisticOps, r, m, a) };
2808
2812
  });
2809
2813
  } });
2810
2814
  } });
2811
2815
  } };
2812
- function Gt(e, t) {
2816
+ function Ht(e, t) {
2813
2817
  return new Proxy(e, { get: function(n, r, i) {
2814
2818
  return r === "db" ? t : Reflect.get(n, r, i);
2815
2819
  } });
2816
2820
  }
2817
- var ge = (J.prototype.version = function(e) {
2821
+ var we = (J.prototype.version = function(e) {
2818
2822
  if (isNaN(e) || e < 0.1)
2819
2823
  throw new R.Type("Given version is not a positive number");
2820
2824
  if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened)
@@ -2823,7 +2827,7 @@ var Ar = { exports: {} };
2823
2827
  var t = this._versions, n = t.filter(function(r) {
2824
2828
  return r._cfg.version === e;
2825
2829
  })[0];
2826
- return n || (n = new this.Version(e), t.push(n), t.sort(oi), n.stores({}), this._state.autoSchema = !1, n);
2830
+ return n || (n = new this.Version(e), t.push(n), t.sort(ci), n.stores({}), this._state.autoSchema = !1, n);
2827
2831
  }, J.prototype._whenReady = function(e) {
2828
2832
  var t = this;
2829
2833
  return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new A(function(n, r) {
@@ -2848,12 +2852,12 @@ var Ar = { exports: {} };
2848
2852
  })), this;
2849
2853
  }, J.prototype.open = function() {
2850
2854
  var e = this;
2851
- return Ie(Oe, function() {
2852
- return ci(e);
2855
+ return Me(Ee, function() {
2856
+ return di(e);
2853
2857
  });
2854
2858
  }, J.prototype._close = function() {
2855
- var e = this._state, t = Xe.indexOf(this);
2856
- if (0 <= t && Xe.splice(t, 1), this.idbdb) {
2859
+ var e = this._state, t = Ze.indexOf(this);
2860
+ if (0 <= t && Ze.splice(t, 1), this.idbdb) {
2857
2861
  try {
2858
2862
  this.idbdb.close();
2859
2863
  } catch {
@@ -2878,8 +2882,8 @@ var Ar = { exports: {} };
2878
2882
  var u = t._deps.indexedDB.deleteDatabase(t.name);
2879
2883
  u.onsuccess = H(function() {
2880
2884
  var h, l, m;
2881
- h = t._deps, l = t.name, m = h.indexedDB, h = h.IDBKeyRange, On(m) || l === Dt || kn(m, h).delete(l).catch(q), i();
2882
- }), u.onerror = de(o), u.onblocked = t._fireOnBlocked;
2885
+ h = t._deps, l = t.name, m = h.indexedDB, h = h.IDBKeyRange, En(m) || l === Bt || Sn(m, h).delete(l).catch(q), i();
2886
+ }), u.onerror = ye(o), u.onblocked = t._fireOnBlocked;
2883
2887
  }
2884
2888
  if (n)
2885
2889
  throw new R.InvalidArgument("Arguments not allowed in db.delete()");
@@ -2908,7 +2912,7 @@ var Ar = { exports: {} };
2908
2912
  throw new R.InvalidArgument("Too few arguments");
2909
2913
  for (var o = new Array(i - 1); --i; )
2910
2914
  o[i - 1] = arguments[i];
2911
- return r = o.pop(), [t, Yn(o), r];
2915
+ return r = o.pop(), [t, Xn(o), r];
2912
2916
  }).apply(this, arguments);
2913
2917
  return this._transaction.apply(this, e);
2914
2918
  }, J.prototype._transaction = function(e, t, n) {
@@ -2921,15 +2925,15 @@ var Ar = { exports: {} };
2921
2925
  if (l = l instanceof r.Table ? l.name : l, typeof l != "string")
2922
2926
  throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
2923
2927
  return l;
2924
- }), e == "r" || e === fn)
2925
- o = fn;
2928
+ }), e == "r" || e === dn)
2929
+ o = dn;
2926
2930
  else {
2927
- if (e != "rw" && e != hn)
2931
+ if (e != "rw" && e != pn)
2928
2932
  throw new R.InvalidArgument("Invalid transaction mode: " + e);
2929
- o = hn;
2933
+ o = pn;
2930
2934
  }
2931
2935
  if (i) {
2932
- if (i.mode === fn && o === hn) {
2936
+ if (i.mode === dn && o === pn) {
2933
2937
  if (!u)
2934
2938
  throw new R.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
2935
2939
  i = null;
@@ -2956,14 +2960,14 @@ var Ar = { exports: {} };
2956
2960
  try {
2957
2961
  p.create(), p.idbtrans._explicit = !0, m._state.PR1398_maxLoop = 3;
2958
2962
  } catch (_) {
2959
- return _.name === en.InvalidState && m.isOpen() && 0 < --m._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), m.close({ disableAutoOpen: !1 }), m.open().then(function() {
2963
+ return _.name === nn.InvalidState && m.isOpen() && 0 < --m._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), m.close({ disableAutoOpen: !1 }), m.open().then(function() {
2960
2964
  return l(m, c, f, null, y);
2961
2965
  })) : X(_);
2962
2966
  }
2963
- var g, b = Zt(y);
2964
- return b && Qe(), v = A.follow(function() {
2967
+ var g, b = tn(y);
2968
+ return b && Je(), v = A.follow(function() {
2965
2969
  var _;
2966
- (g = y.call(p, p)) && (b ? (_ = Ee.bind(null, null), g.then(_, _)) : typeof g.next == "function" && typeof g.throw == "function" && (g = Dn(g)));
2970
+ (g = y.call(p, p)) && (b ? (_ = je.bind(null, null), g.then(_, _)) : typeof g.next == "function" && typeof g.throw == "function" && (g = Bn(g)));
2967
2971
  }, v), (g && typeof g.then == "function" ? A.resolve(g).then(function(_) {
2968
2972
  return p.active ? _ : X(new R.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2969
2973
  }) : v.then(function() {
@@ -2977,7 +2981,7 @@ var Ar = { exports: {} };
2977
2981
  });
2978
2982
  });
2979
2983
  }).bind(null, this, o, a, i, n);
2980
- return i ? i._promise(o, h, "lock") : B.trans ? Ie(B.transless, function() {
2984
+ return i ? i._promise(o, h, "lock") : B.trans ? Me(B.transless, function() {
2981
2985
  return r._whenReady(h);
2982
2986
  }) : this._whenReady(h);
2983
2987
  }, J.prototype.table = function(e) {
@@ -2995,7 +2999,7 @@ var Ar = { exports: {} };
2995
2999
  l.dbReadyResolve = c;
2996
3000
  }), l.openCanceller = new A(function(c, f) {
2997
3001
  l.cancelOpen = f;
2998
- }), this._state = l, this.name = e, this.on = ct(this, "populate", "blocked", "versionchange", "close", { ready: [tn, q] }), this.on.ready.subscribe = Vn(this.on.ready.subscribe, function(c) {
3002
+ }), this._state = l, this.name = e, this.on = ft(this, "populate", "blocked", "versionchange", "close", { ready: [rn, q] }), this.on.ready.subscribe = Yn(this.on.ready.subscribe, function(c) {
2999
3003
  return function(f, d) {
3000
3004
  J.vip(function() {
3001
3005
  var y, v = n._state;
@@ -3004,9 +3008,9 @@ var Ar = { exports: {} };
3004
3008
  }));
3005
3009
  });
3006
3010
  };
3007
- }), this.Collection = (i = this, lt(Jr.prototype, function(g, p) {
3011
+ }), this.Collection = (i = this, ht(ni.prototype, function(g, p) {
3008
3012
  this.db = i;
3009
- var d = or, y = null;
3013
+ var d = ur, y = null;
3010
3014
  if (p)
3011
3015
  try {
3012
3016
  d = p();
@@ -3014,12 +3018,12 @@ var Ar = { exports: {} };
3014
3018
  y = b;
3015
3019
  }
3016
3020
  var v = g._ctx, p = v.table, g = p.hook.reading.fire;
3017
- this._ctx = { table: p, index: v.index, isPrimKey: !v.index || p.schema.primKey.keyPath && v.index === p.schema.primKey.name, range: d, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: y, or: v.or, valueMapper: g !== rt ? g : null };
3018
- })), this.Table = (o = this, lt(cr.prototype, function(c, f, d) {
3019
- this.db = o, this._tx = d, this.name = c, this.schema = f, this.hook = o._allTables[c] ? o._allTables[c].hook : ct(null, { creating: [Ur, q], reading: [$r, rt], updating: [Vr, q], deleting: [Wr, q] });
3020
- })), this.Transaction = (a = this, lt(ti.prototype, function(c, f, d, y, v) {
3021
+ this._ctx = { table: p, index: v.index, isPrimKey: !v.index || p.schema.primKey.keyPath && v.index === p.schema.primKey.name, range: d, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: y, or: v.or, valueMapper: g !== ot ? g : null };
3022
+ })), this.Table = (o = this, ht(hr.prototype, function(c, f, d) {
3023
+ this.db = o, this._tx = d, this.name = c, this.schema = f, this.hook = o._allTables[c] ? o._allTables[c].hook : ft(null, { creating: [Gr, q], reading: [qr, ot], updating: [Hr, q], deleting: [Yr, q] });
3024
+ })), this.Transaction = (a = this, ht(oi.prototype, function(c, f, d, y, v) {
3021
3025
  var p = this;
3022
- this.db = a, this.mode = c, this.storeNames = f, this.schema = d, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = ct(this, "complete", "error", "abort"), this.parent = v || 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 A(function(g, b) {
3026
+ this.db = a, this.mode = c, this.storeNames = f, this.schema = d, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = ft(this, "complete", "error", "abort"), this.parent = v || 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 A(function(g, b) {
3023
3027
  p._resolve = g, p._reject = b;
3024
3028
  }), this._completion.then(function() {
3025
3029
  p.active = !1, p.on.complete.fire();
@@ -3027,9 +3031,9 @@ var Ar = { exports: {} };
3027
3031
  var b = p.active;
3028
3032
  return p.active = !1, p.on.error.fire(g), p.parent ? p.parent._reject(g) : b && p.idbtrans && p.idbtrans.abort(), X(g);
3029
3033
  });
3030
- })), this.Version = (u = this, lt(ui.prototype, function(c) {
3034
+ })), this.Version = (u = this, ht(hi.prototype, function(c) {
3031
3035
  this.db = u, this._cfg = { version: c, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3032
- })), this.WhereClause = (h = this, lt(dr.prototype, function(c, f, d) {
3036
+ })), this.WhereClause = (h = this, ht(mr.prototype, function(c, f, d) {
3033
3037
  if (this.db = h, this._ctx = { table: c, index: f === ":id" ? null : f, or: d }, this._cmp = this._ascending = U, this._descending = function(y, v) {
3034
3038
  return U(v, y);
3035
3039
  }, this._max = function(y, v) {
@@ -3042,80 +3046,80 @@ var Ar = { exports: {} };
3042
3046
  0 < c.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
3043
3047
  }), this.on("blocked", function(c) {
3044
3048
  !c.newVersion || c.newVersion < c.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(c.oldVersion / 10));
3045
- }), this._maxKey = dt(t.IDBKeyRange), this._createTransaction = function(c, f, d, y) {
3049
+ }), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(c, f, d, y) {
3046
3050
  return new n.Transaction(c, f, d, n._options.chromeTransactionDurability, y);
3047
3051
  }, this._fireOnBlocked = function(c) {
3048
- n.on("blocked").fire(c), Xe.filter(function(f) {
3052
+ n.on("blocked").fire(c), Ze.filter(function(f) {
3049
3053
  return f.name === n.name && f !== n && !f._state.vcFired;
3050
3054
  }).map(function(f) {
3051
3055
  return f.on("versionchange").fire(c);
3052
3056
  });
3053
- }, this.use(hi), this.use(mi), this.use(di), this.use(li), this.use(fi);
3057
+ }, this.use(mi), this.use(wi), this.use(vi), this.use(pi), this.use(yi);
3054
3058
  var m = new Proxy(this, { get: function(c, f, d) {
3055
3059
  if (f === "_vip")
3056
3060
  return !0;
3057
3061
  if (f === "table")
3058
3062
  return function(v) {
3059
- return Gt(n.table(v), m);
3063
+ return Ht(n.table(v), m);
3060
3064
  };
3061
3065
  var y = Reflect.get(c, f, d);
3062
- return y instanceof cr ? Gt(y, m) : f === "tables" ? y.map(function(v) {
3063
- return Gt(v, m);
3066
+ return y instanceof hr ? Ht(y, m) : f === "tables" ? y.map(function(v) {
3067
+ return Ht(v, m);
3064
3068
  }) : f === "_createTransaction" ? function() {
3065
- return Gt(y.apply(this, arguments), m);
3069
+ return Ht(y.apply(this, arguments), m);
3066
3070
  } : y;
3067
3071
  } });
3068
3072
  this.vip = m, r.forEach(function(c) {
3069
3073
  return c(n);
3070
3074
  });
3071
3075
  }
3072
- var Yt, ce = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", vi = (Rn.prototype.subscribe = function(e, t, n) {
3076
+ var Qt, ce = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", _i = (Nn.prototype.subscribe = function(e, t, n) {
3073
3077
  return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: n });
3074
- }, Rn.prototype[ce] = function() {
3078
+ }, Nn.prototype[ce] = function() {
3075
3079
  return this;
3076
- }, Rn);
3077
- function Rn(e) {
3080
+ }, Nn);
3081
+ function Nn(e) {
3078
3082
  this._subscribe = e;
3079
3083
  }
3080
3084
  try {
3081
- Yt = { indexedDB: F.indexedDB || F.mozIndexedDB || F.webkitIndexedDB || F.msIndexedDB, IDBKeyRange: F.IDBKeyRange || F.webkitIDBKeyRange };
3085
+ Qt = { indexedDB: N.indexedDB || N.mozIndexedDB || N.webkitIndexedDB || N.msIndexedDB, IDBKeyRange: N.IDBKeyRange || N.webkitIDBKeyRange };
3082
3086
  } catch {
3083
- Yt = { indexedDB: null, IDBKeyRange: null };
3087
+ Qt = { indexedDB: null, IDBKeyRange: null };
3084
3088
  }
3085
- function Pr(e) {
3086
- var t, n = !1, r = new vi(function(i) {
3087
- var o = Zt(e), a, u = !1, h = {}, l = {}, m = { get closed() {
3089
+ function Kr(e) {
3090
+ var t, n = !1, r = new _i(function(i) {
3091
+ var o = tn(e), a, u = !1, h = {}, l = {}, m = { get closed() {
3088
3092
  return u;
3089
3093
  }, unsubscribe: function() {
3090
- u || (u = !0, a && a.abort(), c && Ce.storagemutated.unsubscribe(d));
3094
+ u || (u = !0, a && a.abort(), c && Ae.storagemutated.unsubscribe(d));
3091
3095
  } };
3092
3096
  i.start && i.start(m);
3093
3097
  var c = !1, f = function() {
3094
- return ln(y);
3098
+ return hn(y);
3095
3099
  }, d = function(v) {
3096
- Wt(h, v), jn(l, h) && f();
3100
+ qt(h, v), Kn(l, h) && f();
3097
3101
  }, y = function() {
3098
3102
  var v, p, g;
3099
- !u && Yt.indexedDB && (h = {}, v = {}, a && a.abort(), a = new AbortController(), g = function(b) {
3100
- var _ = Ye();
3103
+ !u && Qt.indexedDB && (h = {}, v = {}, a && a.abort(), a = new AbortController(), g = function(b) {
3104
+ var _ = Qe();
3101
3105
  try {
3102
- o && Qe();
3103
- var x = Se(e, b);
3104
- return x = o ? x.finally(Ee) : x;
3106
+ o && Je();
3107
+ var k = Pe(e, b);
3108
+ return k = o ? k.finally(je) : k;
3105
3109
  } finally {
3106
- _ && He();
3110
+ _ && Xe();
3107
3111
  }
3108
3112
  }(p = { subscr: v, signal: a.signal, requery: f, querier: e, trans: null }), Promise.resolve(g).then(function(b) {
3109
3113
  n = !0, t = b, u || p.signal.aborted || (h = {}, function(_) {
3110
- for (var x in _)
3111
- if (ie(_, x))
3114
+ for (var k in _)
3115
+ if (ie(_, k))
3112
3116
  return;
3113
3117
  return 1;
3114
- }(l = v) || c || (Ce(ht, d), c = !0), ln(function() {
3118
+ }(l = v) || c || (Ae(pt, d), c = !0), hn(function() {
3115
3119
  return !u && i.next && i.next(b);
3116
3120
  }));
3117
3121
  }, function(b) {
3118
- n = !1, ["DatabaseClosedError", "AbortError"].includes(b == null ? void 0 : b.name) || u || ln(function() {
3122
+ n = !1, ["DatabaseClosedError", "AbortError"].includes(b == null ? void 0 : b.name) || u || hn(function() {
3119
3123
  u || i.error && i.error(b);
3120
3124
  });
3121
3125
  }));
@@ -3128,32 +3132,32 @@ var Ar = { exports: {} };
3128
3132
  return t;
3129
3133
  }, r;
3130
3134
  }
3131
- var Ne = ge;
3132
- function Mn(e) {
3133
- var t = Ke;
3135
+ var $e = we;
3136
+ function Fn(e) {
3137
+ var t = De;
3134
3138
  try {
3135
- Ke = !0, Ce.storagemutated.fire(e), An(e, !0);
3139
+ De = !0, Ae.storagemutated.fire(e), Tn(e, !0);
3136
3140
  } finally {
3137
- Ke = t;
3141
+ De = t;
3138
3142
  }
3139
3143
  }
3140
- Ue(Ne, w(w({}, kt), { delete: function(e) {
3141
- return new Ne(e, { addons: [] }).delete();
3144
+ Ve($e, w(w({}, St), { delete: function(e) {
3145
+ return new $e(e, { addons: [] }).delete();
3142
3146
  }, exists: function(e) {
3143
- return new Ne(e, { addons: [] }).open().then(function(t) {
3147
+ return new $e(e, { addons: [] }).open().then(function(t) {
3144
3148
  return t.close(), !0;
3145
3149
  }).catch("NoSuchDatabaseError", function() {
3146
3150
  return !1;
3147
3151
  });
3148
3152
  }, getDatabaseNames: function(e) {
3149
3153
  try {
3150
- return t = Ne.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (On(n) ? Promise.resolve(n.databases()).then(function(r) {
3154
+ return t = $e.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (En(n) ? Promise.resolve(n.databases()).then(function(r) {
3151
3155
  return r.map(function(i) {
3152
3156
  return i.name;
3153
3157
  }).filter(function(i) {
3154
- return i !== Dt;
3158
+ return i !== Bt;
3155
3159
  });
3156
- }) : kn(n, t).toCollection().primaryKeys()).then(e);
3160
+ }) : Sn(n, t).toCollection().primaryKeys()).then(e);
3157
3161
  } catch {
3158
3162
  return X(new R.MissingAPI());
3159
3163
  }
@@ -3163,11 +3167,11 @@ var Ar = { exports: {} };
3163
3167
  Q(this, e);
3164
3168
  };
3165
3169
  }, ignoreTransaction: function(e) {
3166
- return B.trans ? Ie(B.transless, e) : e();
3167
- }, vip: Sn, async: function(e) {
3170
+ return B.trans ? Me(B.transless, e) : e();
3171
+ }, vip: Pn, async: function(e) {
3168
3172
  return function() {
3169
3173
  try {
3170
- var t = Dn(e.apply(this, arguments));
3174
+ var t = Bn(e.apply(this, arguments));
3171
3175
  return t && typeof t.then == "function" ? t : A.resolve(t);
3172
3176
  } catch (n) {
3173
3177
  return X(n);
@@ -3175,7 +3179,7 @@ var Ar = { exports: {} };
3175
3179
  };
3176
3180
  }, spawn: function(e, t, n) {
3177
3181
  try {
3178
- var r = Dn(e.apply(n, t || []));
3182
+ var r = Bn(e.apply(n, t || []));
3179
3183
  return r && typeof r.then == "function" ? r : A.resolve(r);
3180
3184
  } catch (i) {
3181
3185
  return X(i);
@@ -3183,61 +3187,61 @@ var Ar = { exports: {} };
3183
3187
  }, currentTransaction: { get: function() {
3184
3188
  return B.trans || null;
3185
3189
  } }, waitFor: function(e, t) {
3186
- return t = A.resolve(typeof e == "function" ? Ne.ignoreTransaction(e) : e).timeout(t || 6e4), B.trans ? B.trans.waitFor(t) : t;
3190
+ return t = A.resolve(typeof e == "function" ? $e.ignoreTransaction(e) : e).timeout(t || 6e4), B.trans ? B.trans.waitFor(t) : t;
3187
3191
  }, Promise: A, debug: { get: function() {
3188
- return fe;
3192
+ return de;
3189
3193
  }, set: function(e) {
3190
- Jn(e);
3191
- } }, derive: We, extend: Q, props: Ue, override: Vn, Events: ct, on: Ce, liveQuery: Pr, extendObservabilitySet: Wt, getByKeyPath: ye, setByKeyPath: ue, delByKeyPath: function(e, t) {
3194
+ tr(e);
3195
+ } }, derive: qe, extend: Q, props: Ve, override: Yn, Events: ft, on: Ae, liveQuery: Kr, extendObservabilitySet: qt, getByKeyPath: ve, setByKeyPath: ue, delByKeyPath: function(e, t) {
3192
3196
  typeof t == "string" ? ue(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3193
3197
  ue(e, n, void 0);
3194
3198
  });
3195
- }, shallowClone: Gn, deepClone: ke, getObjectDiff: Tn, cmp: U, asap: qn, minKey: -1 / 0, addons: [], connections: Xe, errnames: en, dependencies: Yt, cache: Fe, semVer: he, version: he.split(".").map(function(e) {
3199
+ }, shallowClone: Qn, deepClone: Se, getObjectDiff: In, cmp: U, asap: Hn, minKey: -1 / 0, addons: [], connections: Ze, errnames: nn, dependencies: Qt, cache: Le, semVer: pe, version: pe.split(".").map(function(e) {
3196
3200
  return parseInt(e);
3197
3201
  }).reduce(function(e, t, n) {
3198
3202
  return e + t / Math.pow(10, 2 * n);
3199
- }) })), Ne.maxKey = dt(Ne.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Ce(ht, function(e) {
3200
- Ke || (e = new CustomEvent(mn, { detail: e }), Ke = !0, dispatchEvent(e), Ke = !1);
3201
- }), addEventListener(mn, function(e) {
3202
- e = e.detail, Ke || Mn(e);
3203
+ }) })), $e.maxKey = yt($e.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Ae(pt, function(e) {
3204
+ De || (e = new CustomEvent(gn, { detail: e }), De = !0, dispatchEvent(e), De = !1);
3205
+ }), addEventListener(gn, function(e) {
3206
+ e = e.detail, De || Fn(e);
3203
3207
  }));
3204
- var et, Ke = !1, jr = function() {
3208
+ var nt, De = !1, Ar = function() {
3205
3209
  };
3206
- return typeof BroadcastChannel < "u" && ((jr = function() {
3207
- (et = new BroadcastChannel(mn)).onmessage = function(e) {
3208
- return e.data && Mn(e.data);
3210
+ return typeof BroadcastChannel < "u" && ((Ar = function() {
3211
+ (nt = new BroadcastChannel(gn)).onmessage = function(e) {
3212
+ return e.data && Fn(e.data);
3209
3213
  };
3210
- })(), typeof et.unref == "function" && et.unref(), Ce(ht, function(e) {
3211
- Ke || et.postMessage(e);
3214
+ })(), typeof nt.unref == "function" && nt.unref(), Ae(pt, function(e) {
3215
+ De || nt.postMessage(e);
3212
3216
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
3213
- if (!ge.disableBfCache && e.persisted) {
3214
- fe && console.debug("Dexie: handling persisted pagehide"), et != null && et.close();
3215
- for (var t = 0, n = Xe; t < n.length; t++)
3217
+ if (!we.disableBfCache && e.persisted) {
3218
+ de && console.debug("Dexie: handling persisted pagehide"), nt != null && nt.close();
3219
+ for (var t = 0, n = Ze; t < n.length; t++)
3216
3220
  n[t].close({ disableAutoOpen: !1 });
3217
3221
  }
3218
3222
  }), addEventListener("pageshow", function(e) {
3219
- !ge.disableBfCache && e.persisted && (fe && console.debug("Dexie: handling persisted pageshow"), jr(), Mn({ all: new te(-1 / 0, [[]]) }));
3223
+ !we.disableBfCache && e.persisted && (de && console.debug("Dexie: handling persisted pageshow"), Ar(), Fn({ all: new te(-1 / 0, [[]]) }));
3220
3224
  })), A.rejectionMapper = function(e, t) {
3221
- return !e || e instanceof qe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Xn[e.name] ? e : (t = new Xn[e.name](t || e.message, e), "stack" in e && xe(t, "stack", { get: function() {
3225
+ return !e || e instanceof Ye || e instanceof TypeError || e instanceof SyntaxError || !e.name || !er[e.name] ? e : (t = new er[e.name](t || e.message, e), "stack" in e && Oe(t, "stack", { get: function() {
3222
3226
  return this.inner.stack;
3223
3227
  } }), t);
3224
- }, Jn(fe), w(ge, Object.freeze({ __proto__: null, Dexie: ge, liveQuery: Pr, Entity: ar, cmp: U, default: ge, RangeSet: te, mergeRanges: mt, rangesOverlap: Ut }), { default: ge }), ge;
3228
+ }, tr(de), w(we, Object.freeze({ __proto__: null, Dexie: we, liveQuery: Kr, Entity: cr, cmp: U, default: we, RangeSet: te, mergeRanges: gt, rangesOverlap: Vt }), { default: we }), we;
3225
3229
  });
3226
- })(Ar);
3227
- var Ci = Ar.exports;
3228
- const $n = /* @__PURE__ */ ji(Ci), Kr = Symbol.for("Dexie"), Un = globalThis[Kr] || (globalThis[Kr] = $n);
3229
- if ($n.semVer !== Un.semVer)
3230
- throw new Error(`Two different versions of Dexie loaded in the same app: ${$n.semVer} and ${Un.semVer}`);
3230
+ })(Ir);
3231
+ var Bi = Ir.exports;
3232
+ const Vn = /* @__PURE__ */ Ti(Bi), Br = Symbol.for("Dexie"), qn = globalThis[Br] || (globalThis[Br] = Vn);
3233
+ if (Vn.semVer !== qn.semVer)
3234
+ throw new Error(`Two different versions of Dexie loaded in the same app: ${Vn.semVer} and ${qn.semVer}`);
3231
3235
  function se(D) {
3232
3236
  let s = `${D.type}.${D.topics}`;
3233
3237
  return D.order && (s += `.${D.order}`), D.period && (s += `.${D.period}`), s;
3234
3238
  }
3235
- function wt(D, s) {
3236
- var z;
3237
- let k, w, O, F, C;
3239
+ function kt(D, s) {
3240
+ var $;
3241
+ let x, w, O, N, C;
3238
3242
  switch (D.moderation) {
3239
3243
  case "before":
3240
- k = /* @__PURE__ */ new Date(), w = (z = D.beforeTime) == null ? void 0 : z.split(":"), O = Number.parseInt(w ? w[0] : "00"), F = Number.parseInt(w ? w[1] : "00"), C = Number.parseInt(w ? w[2] : "00"), s.before = k.setHours(O, F, C, 0) / 1e3, s.period || (s.period = k.getDay() === 1 ? 72 : 24);
3244
+ x = /* @__PURE__ */ new Date(), w = ($ = D.beforeTime) == null ? void 0 : $.split(":"), O = Number.parseInt(w ? w[0] : "00"), N = Number.parseInt(w ? w[1] : "00"), C = Number.parseInt(w ? w[2] : "00"), s.before = x.setHours(O, N, C, 0) / 1e3, s.period || (s.period = x.getDay() === 1 ? 72 : 24);
3241
3245
  break;
3242
3246
  case "delayed":
3243
3247
  D.delay && D.delay > 0 && (s.delay = `${D.delay}`);
@@ -3250,7 +3254,7 @@ function wt(D, s) {
3250
3254
  }
3251
3255
  return s;
3252
3256
  }
3253
- class Ki {
3257
+ class Ii {
3254
3258
  constructor(s) {
3255
3259
  T(this, "db");
3256
3260
  T(this, "subscribers", []);
@@ -3261,10 +3265,10 @@ class Ki {
3261
3265
  * @param data
3262
3266
  * @returns number
3263
3267
  */
3264
- T(this, "setCloud", async (s, k) => s.type === ze && k !== "" ? await this.db.table(ze).put({
3268
+ T(this, "setCloud", async (s, x) => s.type === Ue && x !== "" ? await this.db.table(Ue).put({
3265
3269
  id: s.widget,
3266
3270
  dashboard_id: s.dashboard,
3267
- data: k.data
3271
+ data: x.data
3268
3272
  }).then(() => 201).catch((w) => (console.error("%cstorage", V, "set", s, w), 400)) : 400);
3269
3273
  /**
3270
3274
  * Update Series
@@ -3272,10 +3276,10 @@ class Ki {
3272
3276
  * @param data
3273
3277
  * @returns number
3274
3278
  */
3275
- T(this, "setSeries", async (s, k) => s.type === $e && k !== "" ? await this.db.table($e).put({
3279
+ T(this, "setSeries", async (s, x) => s.type === We && x !== "" ? await this.db.table(We).put({
3276
3280
  id: s.widget,
3277
3281
  dashboard_id: s.dashboard,
3278
- data: k.data
3282
+ data: x.data
3279
3283
  }).then(() => 201).catch((w) => (console.error("%cstorage", V, "set", s, w), 400)) : 400);
3280
3284
  /**
3281
3285
  * Update Messages
@@ -3286,21 +3290,21 @@ class Ki {
3286
3290
  * @param data.data.messages IMessages
3287
3291
  * @returns number
3288
3292
  */
3289
- T(this, "setMessages", async (s, k) => {
3293
+ T(this, "setMessages", async (s, x) => {
3290
3294
  if (s.type !== le)
3291
3295
  return 400;
3292
- const w = k.title;
3296
+ const w = x.title;
3293
3297
  try {
3294
- return k.data.messages.forEach(async (O) => {
3295
- var F, C, z;
3296
- await this.db.table(le).put({ id: O.id, utc: O.utc, data: O }), await this.db.table(wi).put({
3298
+ return x.data.messages.forEach(async (O) => {
3299
+ var N, C, $;
3300
+ await this.db.table(le).put({ id: O.id, utc: O.utc, data: O }), await this.db.table(Si).put({
3297
3301
  widget_id: s.widget,
3298
3302
  message_id: O.id,
3299
3303
  dashboard_id: s.dashboard,
3300
3304
  title: w,
3301
- engagement: (F = O.dynamics) == null ? void 0 : F.engagement,
3305
+ engagement: (N = O.dynamics) == null ? void 0 : N.engagement,
3302
3306
  impressions: (C = O.dynamics) == null ? void 0 : C.semrush_visits,
3303
- reach: (z = O.dynamics) == null ? void 0 : z.potential_reach,
3307
+ reach: ($ = O.dynamics) == null ? void 0 : $.potential_reach,
3304
3308
  sentiment: O.topics[0].sentiment,
3305
3309
  utc: O.utc
3306
3310
  });
@@ -3314,9 +3318,9 @@ class Ki {
3314
3318
  * @param retentionDuration
3315
3319
  */
3316
3320
  T(this, "cleanMessages", async (s) => {
3317
- const k = Date.now() / 1e3, w = (O) => O.utc < s - k;
3318
- await this.db.table("topics").orderBy("utc").filter(w).modify((O, F) => {
3319
- delete F.value;
3321
+ const x = Date.now() / 1e3, w = (O) => O.utc < s - x;
3322
+ await this.db.table("topics").orderBy("utc").filter(w).modify((O, N) => {
3323
+ delete N.value;
3320
3324
  });
3321
3325
  });
3322
3326
  /**
@@ -3324,11 +3328,11 @@ class Ki {
3324
3328
  * @param query IQuery
3325
3329
  * @returns number
3326
3330
  */
3327
- T(this, "setWidget", async (s) => await this.db.table(_i).put({
3331
+ T(this, "setWidget", async (s) => await this.db.table(Ei).put({
3328
3332
  id: s.widget,
3329
3333
  dashboard_id: s.dashboard,
3330
3334
  type: s.type
3331
- }).then(() => 201).catch((k) => (console.error("%cstorage", V, gt, s, k), 400)));
3335
+ }).then(() => 201).catch((x) => (console.error("%cstorage", V, bt, s, x), 400)));
3332
3336
  /**
3333
3337
  * Add component subscriber
3334
3338
  * @param query IQuery
@@ -3342,10 +3346,10 @@ class Ki {
3342
3346
  }
3343
3347
  return this.subscribers.filter(
3344
3348
  (O) => O.widget === s.widget
3345
- ).length > 0 || (s.type === le && (s = wt(this.options, s)), console.info(
3349
+ ).length > 0 || (s.type === le && (s = kt(this.options, s)), console.info(
3346
3350
  "%cstorage",
3347
3351
  V,
3348
- bt,
3352
+ wt,
3349
3353
  s.slide,
3350
3354
  s.widget
3351
3355
  ), this.subscribers.push(s)), null;
@@ -3355,7 +3359,7 @@ class Ki {
3355
3359
  * @returns IQuery[]
3356
3360
  */
3357
3361
  T(this, "getSubscribers", async () => await new Promise((s) => s(this.subscribers)));
3358
- this.options = s, this.db = new Un(s.app), this.db.version(2).stores({
3362
+ this.options = s, this.db = new qn(s.app), this.db.version(2).stores({
3359
3363
  player: "id,title,name,location",
3360
3364
  monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
3361
3365
  display: "id,monitor_id,presentation_id,colstart,colend,rowstart,rowend",
@@ -3369,25 +3373,25 @@ class Ki {
3369
3373
  }), this.db.open();
3370
3374
  }
3371
3375
  }
3372
- function Dr(D) {
3373
- return new Promise((s, k) => {
3374
- D.oncomplete = D.onsuccess = () => s(D.result), D.onabort = D.onerror = () => k(D.error);
3376
+ function Rr(D) {
3377
+ return new Promise((s, x) => {
3378
+ D.oncomplete = D.onsuccess = () => s(D.result), D.onabort = D.onerror = () => x(D.error);
3375
3379
  });
3376
3380
  }
3377
- function Ai(D, s) {
3378
- const k = indexedDB.open(D);
3379
- k.onupgradeneeded = () => k.result.createObjectStore(s);
3380
- const w = Dr(k);
3381
- return (O, F) => w.then((C) => F(C.transaction(s, O).objectStore(s)));
3381
+ function Ri(D, s) {
3382
+ const x = indexedDB.open(D);
3383
+ x.onupgradeneeded = () => x.result.createObjectStore(s);
3384
+ const w = Rr(x);
3385
+ return (O, N) => w.then((C) => N(C.transaction(s, O).objectStore(s)));
3382
3386
  }
3383
- let Ln;
3384
- function Di() {
3385
- return Ln || (Ln = Ai("keyval-store", "keyval")), Ln;
3387
+ let Un;
3388
+ function Mi() {
3389
+ return Un || (Un = Ri("keyval-store", "keyval")), Un;
3386
3390
  }
3387
- function Qt(D, s, k = Di()) {
3388
- return k("readwrite", (w) => (w.put(s, D), Dr(w.transaction)));
3391
+ function Jt(D, s, x = Mi()) {
3392
+ return x("readwrite", (w) => (w.put(s, D), Rr(w.transaction)));
3389
3393
  }
3390
- class Ti {
3394
+ class Ni {
3391
3395
  constructor(s) {
3392
3396
  T(this, "subscribers", []);
3393
3397
  T(this, "options");
@@ -3397,11 +3401,11 @@ class Ti {
3397
3401
  * @param data
3398
3402
  * @returns number
3399
3403
  */
3400
- T(this, "setCloud", async (s, k) => {
3401
- if (!k.success)
3404
+ T(this, "setCloud", async (s, x) => {
3405
+ if (!x.success)
3402
3406
  return 400;
3403
3407
  const w = se(s);
3404
- return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage", V, ze, s, O), 400));
3408
+ return delete x.success, delete x.message, await Jt(w, x).then(() => 201).catch((O) => (console.error("%cstorage", V, Ue, s, O), 400));
3405
3409
  });
3406
3410
  /**
3407
3411
  * Update Series
@@ -3409,11 +3413,11 @@ class Ti {
3409
3413
  * @param data
3410
3414
  * @returns bumber
3411
3415
  */
3412
- T(this, "setSeries", async (s, k) => {
3413
- if (!k.success)
3416
+ T(this, "setSeries", async (s, x) => {
3417
+ if (!x.success)
3414
3418
  return 400;
3415
3419
  const w = se(s);
3416
- return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage", V, $e, s, O), 400));
3420
+ return delete x.success, delete x.message, await Jt(w, x).then(() => 201).catch((O) => (console.error("%cstorage", V, We, s, O), 400));
3417
3421
  });
3418
3422
  /**
3419
3423
  * Update Messages
@@ -3421,25 +3425,25 @@ class Ti {
3421
3425
  * @param data
3422
3426
  * @returns number
3423
3427
  */
3424
- T(this, "setMessages", async (s, k) => {
3425
- if (!k.success)
3428
+ T(this, "setMessages", async (s, x) => {
3429
+ if (!x.success)
3426
3430
  return 400;
3427
3431
  const w = se(s);
3428
- return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage", V, le, s, O), 400));
3432
+ return delete x.success, delete x.message, await Jt(w, x).then(() => 201).catch((O) => (console.error("%cstorage", V, le, s, O), 400));
3429
3433
  });
3430
- T(this, "cleanMessages", async (s) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((k) => k())));
3434
+ T(this, "cleanMessages", async (s) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((x) => x())));
3431
3435
  /**
3432
3436
  * Update Cloud
3433
3437
  * @param query IQuery
3434
3438
  * @returns number
3435
3439
  */
3436
3440
  T(this, "setWidget", async (s) => {
3437
- const k = se(s), w = {
3441
+ const x = se(s), w = {
3438
3442
  id: s.widget,
3439
3443
  dashboard_id: s.dashboard,
3440
3444
  type: s.type
3441
3445
  };
3442
- return await Qt(k, w).then(() => 201).catch((O) => (console.error("%cstorage", V, gt, s, O), 400));
3446
+ return await Jt(x, w).then(() => 201).catch((O) => (console.error("%cstorage", V, bt, s, O), 400));
3443
3447
  });
3444
3448
  /**
3445
3449
  * Add component subscriber
@@ -3452,9 +3456,9 @@ class Ti {
3452
3456
  const O = (w = s.topics) == null ? void 0 : w.split("-");
3453
3457
  s.dashboard = O ? O[0] : "", s.widget = O ? O[1] : "";
3454
3458
  }
3455
- return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
3459
+ return s.type === le && (s = kt(this.options, s)), this.subscribers.filter(
3456
3460
  (O) => O.widget === s.widget
3457
- ).length > 0 || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
3461
+ ).length > 0 || (console.info("%cstorage", V, wt, s.slide, s.widget), this.subscribers.push(s)), null;
3458
3462
  });
3459
3463
  /**
3460
3464
  * Get current subscribers
@@ -3464,7 +3468,7 @@ class Ti {
3464
3468
  this.options = s;
3465
3469
  }
3466
3470
  }
3467
- class Bi {
3471
+ class Fi {
3468
3472
  constructor(s) {
3469
3473
  T(this, "subscribers", []);
3470
3474
  T(this, "options");
@@ -3474,12 +3478,12 @@ class Bi {
3474
3478
  * @param data
3475
3479
  * @returns number
3476
3480
  */
3477
- T(this, "setCloud", async (s, k) => {
3481
+ T(this, "setCloud", async (s, x) => {
3478
3482
  const w = se(s);
3479
3483
  try {
3480
- return localStorage.setObject(w, k), 201;
3484
+ return localStorage.setObject(w, x), 201;
3481
3485
  } catch (O) {
3482
- return console.error("%cstorage", V, ze, s, O), 400;
3486
+ return console.error("%cstorage", V, Ue, s, O), 400;
3483
3487
  }
3484
3488
  });
3485
3489
  /**
@@ -3488,12 +3492,12 @@ class Bi {
3488
3492
  * @param data
3489
3493
  * @returns number
3490
3494
  */
3491
- T(this, "setSeries", async (s, k) => {
3495
+ T(this, "setSeries", async (s, x) => {
3492
3496
  const w = se(s);
3493
3497
  try {
3494
- return localStorage.setObject(w, k), 201;
3498
+ return localStorage.setObject(w, x), 201;
3495
3499
  } catch (O) {
3496
- return console.error("%cstorage", V, $e, s, O), 400;
3500
+ return console.error("%cstorage", V, We, s, O), 400;
3497
3501
  }
3498
3502
  });
3499
3503
  /**
@@ -3502,10 +3506,10 @@ class Bi {
3502
3506
  * @param data
3503
3507
  * @returns number
3504
3508
  */
3505
- T(this, "setMessages", async (s, k) => {
3509
+ T(this, "setMessages", async (s, x) => {
3506
3510
  const w = se(s);
3507
3511
  try {
3508
- return localStorage.setObject(w, k), 200;
3512
+ return localStorage.setObject(w, x), 200;
3509
3513
  } catch (O) {
3510
3514
  return console.error("%cstorage", V, le, s, O), 400;
3511
3515
  }
@@ -3514,11 +3518,11 @@ class Bi {
3514
3518
  console.log("cleanMessages not implemented for ", this.options.storage);
3515
3519
  });
3516
3520
  T(this, "setWidget", async (s) => {
3517
- const k = `widget.${s.widget}`;
3521
+ const x = `widget.${s.widget}`;
3518
3522
  try {
3519
- return localStorage.setObject(k, s), 201;
3523
+ return localStorage.setObject(x, s), 201;
3520
3524
  } catch (w) {
3521
- return console.error("%cstorage", V, gt, s, w), 400;
3525
+ return console.error("%cstorage", V, bt, s, w), 400;
3522
3526
  }
3523
3527
  });
3524
3528
  /**
@@ -3532,24 +3536,24 @@ class Bi {
3532
3536
  const O = (w = s.topics) == null ? void 0 : w.split("-");
3533
3537
  s.dashboard = O ? O[0] : "", s.widget = O ? O[1] : "";
3534
3538
  }
3535
- return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
3539
+ return s.type === le && (s = kt(this.options, s)), this.subscribers.filter(
3536
3540
  (O) => O.widget === s.widget
3537
- ).length || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
3541
+ ).length || (console.info("%cstorage", V, wt, s.slide, s.widget), this.subscribers.push(s)), null;
3538
3542
  });
3539
3543
  /**
3540
3544
  * Get current subscribers
3541
3545
  * @returns IQuery[]
3542
3546
  */
3543
3547
  T(this, "getSubscribers", async () => await new Promise((s) => s(this.subscribers)));
3544
- this.options = s, Storage.prototype.setObject = function(k, w) {
3545
- this.setObject(k, JSON.stringify(w));
3546
- }, Storage.prototype.getObject = function(k) {
3547
- const w = this.getObject(k);
3548
+ this.options = s, Storage.prototype.setObject = function(x, w) {
3549
+ this.setObject(x, JSON.stringify(w));
3550
+ }, Storage.prototype.getObject = function(x) {
3551
+ const w = this.getObject(x);
3548
3552
  return w && JSON.parse(w);
3549
3553
  };
3550
3554
  }
3551
3555
  }
3552
- class Ii {
3556
+ class Li {
3553
3557
  constructor(s) {
3554
3558
  T(this, "subscribers", []);
3555
3559
  T(this, "options");
@@ -3559,12 +3563,12 @@ class Ii {
3559
3563
  * @param data
3560
3564
  * @returns number
3561
3565
  */
3562
- T(this, "setCloud", async (s, k) => {
3566
+ T(this, "setCloud", async (s, x) => {
3563
3567
  const w = se(s);
3564
3568
  try {
3565
- return sessionStorage.setObject(w, k), 201;
3569
+ return sessionStorage.setObject(w, x), 201;
3566
3570
  } catch (O) {
3567
- return console.error("%cstorage", V, ze, s, O), 400;
3571
+ return console.error("%cstorage", V, Ue, s, O), 400;
3568
3572
  }
3569
3573
  });
3570
3574
  /**
@@ -3573,12 +3577,12 @@ class Ii {
3573
3577
  * @param data
3574
3578
  * @returns number
3575
3579
  */
3576
- T(this, "setSeries", async (s, k) => {
3580
+ T(this, "setSeries", async (s, x) => {
3577
3581
  const w = se(s);
3578
3582
  try {
3579
- return sessionStorage.setObject(w, k), 201;
3583
+ return sessionStorage.setObject(w, x), 201;
3580
3584
  } catch (O) {
3581
- return console.error("%cstorage", V, $e, s, O), 400;
3585
+ return console.error("%cstorage", V, We, s, O), 400;
3582
3586
  }
3583
3587
  });
3584
3588
  /**
@@ -3587,10 +3591,10 @@ class Ii {
3587
3591
  * @param data
3588
3592
  * @returns number
3589
3593
  */
3590
- T(this, "setMessages", async (s, k) => {
3594
+ T(this, "setMessages", async (s, x) => {
3591
3595
  const w = se(s);
3592
3596
  try {
3593
- return sessionStorage.setObject(w, k), 201;
3597
+ return sessionStorage.setObject(w, x), 201;
3594
3598
  } catch (O) {
3595
3599
  return console.error("%cstorage", V, le, s, O), 400;
3596
3600
  }
@@ -3599,11 +3603,11 @@ class Ii {
3599
3603
  console.log("cleanMessages not implemented for ", this.options.storage);
3600
3604
  });
3601
3605
  T(this, "setWidget", async (s) => {
3602
- const k = `widget.${s.widget}`;
3606
+ const x = `widget.${s.widget}`;
3603
3607
  try {
3604
- return sessionStorage.setObject(k, s), 201;
3608
+ return sessionStorage.setObject(x, s), 201;
3605
3609
  } catch (w) {
3606
- return console.error("%cstorage", V, gt, s, w), 400;
3610
+ return console.error("%cstorage", V, bt, s, w), 400;
3607
3611
  }
3608
3612
  });
3609
3613
  /**
@@ -3617,24 +3621,24 @@ class Ii {
3617
3621
  const O = (w = s.topics) == null ? void 0 : w.split("-");
3618
3622
  s.dashboard = O ? O[0] : "", s.widget = O ? O[1] : "";
3619
3623
  }
3620
- return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
3624
+ return s.type === le && (s = kt(this.options, s)), this.subscribers.filter(
3621
3625
  (O) => O.widget === s.widget
3622
- ).length || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
3626
+ ).length || (console.info("%cstorage", V, wt, s.slide, s.widget), this.subscribers.push(s)), null;
3623
3627
  });
3624
3628
  /**
3625
3629
  * Get current subscribers
3626
3630
  * @returns IQuery[]
3627
3631
  */
3628
3632
  T(this, "getSubscribers", async () => await new Promise((s) => s(this.subscribers)));
3629
- this.options = s, Storage.prototype.setObject = function(k, w) {
3630
- this.setItem(k, JSON.stringify(w));
3631
- }, Storage.prototype.getObject = function(k) {
3632
- const w = this.getItem(k);
3633
+ this.options = s, Storage.prototype.setObject = function(x, w) {
3634
+ this.setItem(x, JSON.stringify(w));
3635
+ }, Storage.prototype.getObject = function(x) {
3636
+ const w = this.getItem(x);
3633
3637
  return w && JSON.parse(w);
3634
3638
  };
3635
3639
  }
3636
3640
  }
3637
- class Ri {
3641
+ class $i {
3638
3642
  constructor(s) {
3639
3643
  T(this, "subscribers", []);
3640
3644
  T(this, "options");
@@ -3644,10 +3648,10 @@ class Ri {
3644
3648
  * @param data
3645
3649
  * @returns number
3646
3650
  */
3647
- T(this, "setCloud", async (s, k) => {
3651
+ T(this, "setCloud", async (s, x) => {
3648
3652
  const w = se(s);
3649
3653
  try {
3650
- return window.BuzzCasting.WidgetData[w] = k, 201;
3654
+ return window.BuzzCasting.WidgetData[w] = x, 201;
3651
3655
  } catch (O) {
3652
3656
  return console.error("%cstorage", V, "set", s, O), 400;
3653
3657
  }
@@ -3658,10 +3662,10 @@ class Ri {
3658
3662
  * @param data
3659
3663
  * @returns number
3660
3664
  */
3661
- T(this, "setSeries", async (s, k) => {
3665
+ T(this, "setSeries", async (s, x) => {
3662
3666
  const w = se(s);
3663
3667
  try {
3664
- return window.BuzzCasting.WidgetData[w] = k, 201;
3668
+ return window.BuzzCasting.WidgetData[w] = x, 201;
3665
3669
  } catch (O) {
3666
3670
  return console.error("%cstorage", V, "set", s, O), 400;
3667
3671
  }
@@ -3672,10 +3676,10 @@ class Ri {
3672
3676
  * @param data
3673
3677
  * @returns number
3674
3678
  */
3675
- T(this, "setMessages", async (s, k) => {
3679
+ T(this, "setMessages", async (s, x) => {
3676
3680
  const w = se(s);
3677
3681
  try {
3678
- return window.BuzzCasting.WidgetData[w] = k, 201;
3682
+ return window.BuzzCasting.WidgetData[w] = x, 201;
3679
3683
  } catch (O) {
3680
3684
  return console.error("%cstorage", V, "set", s, O), 400;
3681
3685
  }
@@ -3684,11 +3688,11 @@ class Ri {
3684
3688
  console.log("cleanMessages not implemented for ", this.options.storage);
3685
3689
  });
3686
3690
  T(this, "setWidget", async (s) => {
3687
- const k = `widget.${s.widget}`;
3691
+ const x = `widget.${s.widget}`;
3688
3692
  try {
3689
- return window.BuzzCasting.WidgetData[k] = s, 201;
3693
+ return window.BuzzCasting.WidgetData[x] = s, 201;
3690
3694
  } catch (w) {
3691
- return console.error("%cstorage", V, gt, s, w), 400;
3695
+ return console.error("%cstorage", V, bt, s, w), 400;
3692
3696
  }
3693
3697
  });
3694
3698
  /**
@@ -3702,9 +3706,9 @@ class Ri {
3702
3706
  const O = (w = s.topics) == null ? void 0 : w.split("-");
3703
3707
  s.dashboard = O ? O[0] : "", s.widget = O ? O[1] : "";
3704
3708
  }
3705
- return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
3709
+ return s.type === le && (s = kt(this.options, s)), this.subscribers.filter(
3706
3710
  (O) => O.widget === s.widget
3707
- ).length || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
3711
+ ).length || (console.info("%cstorage", V, wt, s.slide, s.widget), this.subscribers.push(s)), null;
3708
3712
  });
3709
3713
  /**
3710
3714
  * Get current subscribers
@@ -3714,54 +3718,53 @@ class Ri {
3714
3718
  this.options = s, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
3715
3719
  }
3716
3720
  }
3717
- function Mi(D, s) {
3721
+ function zi(D, s) {
3718
3722
  for (; D.length < s; )
3719
3723
  D = `0${D}`;
3720
3724
  return D;
3721
3725
  }
3722
- function we(D, s) {
3723
- let k, w, O;
3726
+ function ke(D, s) {
3727
+ let x, w, O;
3724
3728
  if (s.length === 0)
3725
3729
  return D;
3726
- for (k = 0, O = s.length; k < O; k++)
3727
- w = s.charCodeAt(k), D = (D << 5) - D + w, D |= 0;
3730
+ for (x = 0, O = s.length; x < O; x++)
3731
+ w = s.charCodeAt(x), D = (D << 5) - D + w, D |= 0;
3728
3732
  return D < 0 ? D * -2 : D;
3729
3733
  }
3730
- function Fi(D, s, k) {
3734
+ function Ui(D, s, x) {
3731
3735
  return Object.keys(s).sort().reduce(w, D);
3732
- function w(O, F) {
3733
- return Tr(O, s[F], F, k);
3736
+ function w(O, N) {
3737
+ return Mr(O, s[N], N, x);
3734
3738
  }
3735
3739
  }
3736
- function Tr(D, s, k, w) {
3737
- const O = we(we(we(D, k), Ni(s)), typeof s);
3740
+ function Mr(D, s, x, w) {
3741
+ const O = ke(ke(ke(D, x), Wi(s)), typeof s);
3738
3742
  if (s === null)
3739
- return we(O, "null");
3743
+ return ke(O, "null");
3740
3744
  if (s === void 0)
3741
- return we(O, "undefined");
3745
+ return ke(O, "undefined");
3742
3746
  if (typeof s == "object" || typeof s == "function") {
3743
3747
  if (w.includes(s))
3744
- return we(O, `[Circular]${k}`);
3748
+ return ke(O, `[Circular]${x}`);
3745
3749
  w.push(s);
3746
- const F = Fi(O, s, w);
3750
+ const N = Ui(O, s, w);
3747
3751
  if (!("valueOf" in s) || typeof s.valueOf != "function")
3748
- return F;
3752
+ return N;
3749
3753
  try {
3750
- return we(F, String(s.valueOf()));
3754
+ return ke(N, String(s.valueOf()));
3751
3755
  } catch (C) {
3752
- return we(F, `[valueOf exception]${C.stack || C.message}`);
3756
+ return ke(N, `[valueOf exception]${C.stack || C.message}`);
3753
3757
  }
3754
3758
  }
3755
- return we(O, s.toString());
3759
+ return ke(O, s.toString());
3756
3760
  }
3757
- function Ni(D) {
3761
+ function Wi(D) {
3758
3762
  return Object.prototype.toString.call(D);
3759
3763
  }
3760
- function zn(D) {
3761
- return Mi(Tr(0, D, "", []).toString(16), 8);
3764
+ function Wn(D) {
3765
+ return zi(Mr(0, D, "", []).toString(16), 8);
3762
3766
  }
3763
- const Li = "2.1.1";
3764
- class $i {
3767
+ class qi {
3765
3768
  constructor(s) {
3766
3769
  T(this, "sm");
3767
3770
  T(this, "api");
@@ -3773,85 +3776,100 @@ class $i {
3773
3776
  const s = await this.sm.getSubscribers();
3774
3777
  if (s.length === 0)
3775
3778
  return;
3776
- const k = [];
3779
+ const x = [];
3777
3780
  s == null || s.forEach((w) => {
3778
- k.push(this.api.get(w));
3779
- }), await Promise.allSettled(k).then(
3781
+ x.push(this.api.get(w));
3782
+ }), await Promise.allSettled(x).then(
3780
3783
  (w) => w.forEach(async (O) => {
3781
- let F = 400;
3784
+ let N = 400;
3782
3785
  if (O.status === "fulfilled") {
3783
3786
  const C = O.value;
3784
3787
  if (this.sm === null)
3785
3788
  return 400;
3786
3789
  if (C.success === !0) {
3787
- const z = this.sm.subscribers.filter(
3788
- (_e) => _e.widget === C.query.widget
3790
+ const $ = this.sm.subscribers.filter(
3791
+ (xe) => xe.widget === C.query.widget
3789
3792
  )[0];
3790
3793
  let Q = "";
3791
3794
  switch (C.query.type) {
3792
3795
  case le:
3793
- if (Q = zn(C.data.messages), z.hash === Q)
3794
- return console.info(
3795
- "%capi",
3796
- vt,
3796
+ if (Q = Wn(C.data.messages), $.hash === Q)
3797
+ return console.debug(
3798
+ "%capi%c %cno updates",
3799
+ fe,
3800
+ he,
3801
+ zn,
3797
3802
  le,
3798
- "no updates",
3799
3803
  C.query.slide,
3800
3804
  C.query.widget
3801
3805
  ), 204;
3802
- z.hash = Q, F = await this.sm.setMessages(C.query, C);
3806
+ $.hash = Q, N = await this.sm.setMessages(C.query, C);
3803
3807
  break;
3804
- case ze:
3805
- Q = zn(C.data), z.hash === Q ? (console.info(
3806
- "%capi",
3807
- vt,
3808
- ze,
3809
- "no updates",
3808
+ case Ue:
3809
+ Q = Wn(C.data), $.hash === Q ? (console.debug(
3810
+ "%capi%c %cno updates",
3811
+ fe,
3812
+ he,
3813
+ zn,
3814
+ Ue,
3810
3815
  C.query.slide,
3811
3816
  C.query.widget
3812
- ), F = 204) : (z.hash = Q, F = await this.sm.setCloud(C.query, C));
3817
+ ), N = 204) : ($.hash = Q, N = await this.sm.setCloud(C.query, C));
3813
3818
  break;
3814
- case $e:
3815
- Q = zn(C.data), z.hash === Q ? (console.info(
3816
- "%capi",
3817
- vt,
3818
- $e,
3819
- "no updates",
3819
+ case We:
3820
+ Q = Wn(C.data), $.hash === Q ? (console.debug(
3821
+ "%capi%c %cno updates",
3822
+ fe,
3823
+ he,
3824
+ zn,
3825
+ We,
3820
3826
  C.query.slide,
3821
3827
  C.query.widget
3822
- ), F = 204) : (z.hash = Q, F = await this.sm.setSeries(C.query, C));
3828
+ ), N = 204) : ($.hash = Q, N = await this.sm.setSeries(C.query, C));
3823
3829
  break;
3824
3830
  default:
3825
3831
  console.warn(
3826
- "%cstorage",
3832
+ "%capi%c %cstorage",
3833
+ fe,
3834
+ he,
3827
3835
  V,
3828
3836
  "error",
3829
3837
  `data type ${C.query.type} unknown`
3830
3838
  );
3831
3839
  }
3832
3840
  } else
3833
- F = 401;
3834
- switch (F) {
3841
+ N = 401;
3842
+ switch (N) {
3835
3843
  case 201:
3836
3844
  console.info(
3837
- "%cbroadcast",
3838
- Nn,
3845
+ "%capp%c %cbroadcast",
3846
+ fe,
3847
+ he,
3848
+ $n,
3839
3849
  C.query.slide,
3840
3850
  C.data.title ?? C.query.widget
3841
3851
  ), this.bc.postMessage({ event: "widget-update", data: C.query });
3842
3852
  break;
3843
3853
  case 400:
3844
3854
  console.warn(
3845
- "%cbroadcast",
3846
- Nn,
3855
+ "%capp%c %cbroadcast",
3856
+ fe,
3857
+ he,
3858
+ $n,
3847
3859
  C.query.slide,
3848
3860
  C.data.title ?? C.query.widget
3849
3861
  );
3850
3862
  break;
3851
3863
  }
3852
- return F;
3864
+ return N;
3853
3865
  } else
3854
- return console.warn("%cstorage", V, "error"), 400;
3866
+ return console.warn(
3867
+ "%capi%c %cstorage",
3868
+ fe,
3869
+ he,
3870
+ V,
3871
+ "error"
3872
+ ), 400;
3855
3873
  })
3856
3874
  );
3857
3875
  });
@@ -3859,19 +3877,26 @@ class $i {
3859
3877
  this.api.hideMessage(s);
3860
3878
  });
3861
3879
  T(this, "actions", async (s) => {
3862
- var k;
3880
+ var x;
3863
3881
  switch (s.data.event) {
3864
3882
  case "subscribe":
3865
- (k = this.sm) == null || k.subscribe(s.data.data);
3883
+ (x = this.sm) == null || x.subscribe(s.data.data);
3866
3884
  break;
3867
3885
  case "update":
3868
- console.debug("%cstorage", V, "update", s.data), await this.update();
3886
+ console.debug(
3887
+ "%capi%c %cstorage",
3888
+ fe,
3889
+ he,
3890
+ V,
3891
+ "update",
3892
+ s.data
3893
+ ), await this.update();
3869
3894
  break;
3870
3895
  }
3871
3896
  });
3872
3897
  T(this, "cleanMessages", async () => {
3873
- var k, w;
3874
- const s = ((k = this.options) == null ? void 0 : k.retention) || 345600;
3898
+ var x, w;
3899
+ const s = ((x = this.options) == null ? void 0 : x.retention) || 345600;
3875
3900
  return await ((w = this.sm) == null ? void 0 : w.cleanMessages(s));
3876
3901
  });
3877
3902
  // TODO: add checksum to avoid broadcasting update
@@ -3881,44 +3906,54 @@ class $i {
3881
3906
  var s;
3882
3907
  return await ((s = this.sm) == null ? void 0 : s.getSubscribers());
3883
3908
  });
3884
- console.info("%cstorage", V, "version", Li), this.options = s, this.sm = null;
3885
- const k = (s == null ? void 0 : s.slide) || s.app;
3886
- switch (this.bc = new BroadcastChannel(k), console.info("%cbroadcast", Nn, "channel", k), this.bc.onmessage = (w) => {
3909
+ console.info("%cstorage", V, "version", Oi), this.options = s, this.sm = null;
3910
+ const x = (s == null ? void 0 : s.slide) || s.app;
3911
+ switch (this.bc = new BroadcastChannel(x), console.info(
3912
+ "%capi%c %cbroadcast",
3913
+ fe,
3914
+ he,
3915
+ $n,
3916
+ "channel",
3917
+ x
3918
+ ), this.bc.onmessage = (w) => {
3887
3919
  this.actions(w);
3888
- }, this.bc.postMessage({ event: "sm-init", data: {} }), this.api = new Pi(s), s.storage) {
3889
- case Si:
3890
- this.sm = new Ki(s);
3891
- break;
3892
- case ki:
3920
+ }, this.bc.postMessage({ event: "sm-init", data: {} }), this.api = new Di(s), s.storage) {
3921
+ case Ki:
3893
3922
  this.sm = new Ii(s);
3894
3923
  break;
3895
- case Oi:
3896
- this.sm = new Bi(s);
3924
+ case ji:
3925
+ this.sm = new Li(s);
3926
+ break;
3927
+ case Ci:
3928
+ this.sm = new Fi(s);
3897
3929
  break;
3898
- case xi:
3899
- this.sm = new Ti(s);
3930
+ case Pi:
3931
+ this.sm = new Ni(s);
3900
3932
  break;
3901
- case Ei:
3902
- this.sm = new Ri(s);
3933
+ case Ai:
3934
+ this.sm = new $i(s);
3903
3935
  break;
3904
3936
  }
3905
3937
  }
3906
3938
  }
3907
3939
  export {
3908
- vt as API_CSS,
3909
- Nn as BROADCAST_CSS,
3910
- ze as CLOUD,
3940
+ fe as API_CSS,
3941
+ $n as BROADCAST_CSS,
3942
+ Ue as CLOUD,
3943
+ Dr as GET_DATA,
3911
3944
  le as MESSAGES,
3912
- $e as SERIES,
3945
+ he as NONE,
3946
+ zn as NO_UPDATES,
3947
+ We as SERIES,
3913
3948
  V as STORAGE_CSS,
3914
- Si as STORAGE_DEXIE,
3915
- xi as STORAGE_KEYVAL,
3916
- ki as STORAGE_LOCAL,
3917
- Oi as STORAGE_SESSION,
3918
- Ei as STORAGE_WINDOW,
3919
- bt as SUBSCRIBE,
3920
- wi as TOPICS,
3921
- gt as WIDGET,
3922
- _i as WIDGETS,
3923
- $i as default
3949
+ Ki as STORAGE_DEXIE,
3950
+ Pi as STORAGE_KEYVAL,
3951
+ ji as STORAGE_LOCAL,
3952
+ Ci as STORAGE_SESSION,
3953
+ Ai as STORAGE_WINDOW,
3954
+ wt as SUBSCRIBE,
3955
+ Si as TOPICS,
3956
+ bt as WIDGET,
3957
+ Ei as WIDGETS,
3958
+ qi as default
3924
3959
  };