buzzcasting-storage 3.7.2 → 3.7.4

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
1
  var Aa = Object.defineProperty;
2
2
  var Pa = (d, t, s) => t in d ? Aa(d, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[t] = s;
3
3
  var b = (d, t, s) => Pa(d, typeof t != "symbol" ? t + "" : t, s);
4
- var _ = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(_ || {}), l = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(l || {}), q = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(q || {}), qt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(qt || {}), ye = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(ye || {});
5
- const Da = "3.7.1";
4
+ var _ = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(_ || {}), l = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(l || {}), q = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(q || {}), an = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(an || {}), we = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(we || {});
5
+ const Da = "3.7.3";
6
6
  function Ua(d) {
7
7
  const t = d.toUpperCase().split(/[\s_-]+/);
8
8
  return t.length > 0 ? (t.forEach((s, c) => {
@@ -115,7 +115,7 @@ function ka(d, t) {
115
115
  d = `0${d}`;
116
116
  return d;
117
117
  }
118
- function Pe(d, t) {
118
+ function Re(d, t) {
119
119
  let s, c, v;
120
120
  if (t.length === 0)
121
121
  return d;
@@ -125,36 +125,36 @@ function Pe(d, t) {
125
125
  }
126
126
  function Ta(d, t, s) {
127
127
  return Object.keys(t).sort().reduce(c, d);
128
- function c(v, P) {
129
- return $r(v, t[P], P, s);
128
+ function c(v, A) {
129
+ return Mr(v, t[A], A, s);
130
130
  }
131
131
  }
132
- function $r(d, t, s, c) {
133
- const v = Pe(Pe(Pe(d, s), Na(t)), typeof t);
132
+ function Mr(d, t, s, c) {
133
+ const v = Re(Re(Re(d, s), Na(t)), typeof t);
134
134
  if (t === null)
135
- return Pe(v, "null");
135
+ return Re(v, "null");
136
136
  if (t === void 0)
137
- return Pe(v, "undefined");
137
+ return Re(v, "undefined");
138
138
  if (typeof t == "object" || typeof t == "function") {
139
139
  if (c.includes(t))
140
- return Pe(v, `[Circular]${s}`);
140
+ return Re(v, `[Circular]${s}`);
141
141
  c.push(t);
142
- const P = Ta(v, t, c);
142
+ const A = Ta(v, t, c);
143
143
  if (!("valueOf" in t) || typeof t.valueOf != "function")
144
- return P;
144
+ return A;
145
145
  try {
146
- return Pe(P, String(t.valueOf()));
146
+ return Re(A, String(t.valueOf()));
147
147
  } catch (I) {
148
- return Pe(P, `[valueOf exception]${I.stack || I.message}`);
148
+ return Re(A, `[valueOf exception]${I.stack || I.message}`);
149
149
  }
150
150
  }
151
- return Pe(v, t.toString());
151
+ return Re(v, t.toString());
152
152
  }
153
153
  function Na(d) {
154
154
  return Object.prototype.toString.call(d);
155
155
  }
156
- function Wn(d) {
157
- return ka($r(0, d, "", []).toString(16), 8);
156
+ function Qn(d) {
157
+ return ka(Mr(0, d, "", []).toString(16), 8);
158
158
  }
159
159
  function Va(d, t) {
160
160
  if (d = d.toString().replace(/[^0-9.]/g, ""), d < 1e3)
@@ -300,17 +300,17 @@ function Ca(d) {
300
300
  }
301
301
  return d;
302
302
  }
303
- function Ot(d, t) {
304
- var z;
305
- let s, c, v, P, I;
303
+ function At(d, t) {
304
+ var Y;
305
+ let s, c, v, A, I;
306
306
  switch (d.moderation) {
307
- case qt.BEFORE:
308
- s = /* @__PURE__ */ new Date(), c = (z = d.beforeTime) == null ? void 0 : z.split(":"), v = Number.parseInt(c ? c[0] : "00"), P = Number.parseInt(c ? c[1] : "00"), I = Number.parseInt(c ? c[2] : "00"), t.before = s.setHours(v, P, I, 0) / 1e3, t.period || (t.period = s.getDay() === 1 ? 72 : 24);
307
+ case an.BEFORE:
308
+ s = /* @__PURE__ */ new Date(), c = (Y = d.beforeTime) == null ? void 0 : Y.split(":"), v = Number.parseInt(c ? c[0] : "00"), A = Number.parseInt(c ? c[1] : "00"), I = Number.parseInt(c ? c[2] : "00"), t.before = s.setHours(v, A, I, 0) / 1e3, t.period || (t.period = s.getDay() === 1 ? 72 : 24);
309
309
  break;
310
- case qt.DELAYED:
310
+ case an.DELAYED:
311
311
  d.delay && d.delay > 0 && (t.delay = `${d.delay}`);
312
312
  break;
313
- case qt.APPROVED:
313
+ case an.APPROVED:
314
314
  t.approved = "1";
315
315
  break;
316
316
  default:
@@ -349,7 +349,7 @@ class $a {
349
349
  async get(t) {
350
350
  const { version: s } = this.options, c = this.headers(), v = Object.assign({}, t);
351
351
  delete v.type, delete v.hash, delete v.order, delete v.presentation;
352
- const P = Object.keys(v).length > 0 ? `?${new URLSearchParams(v).toString()}` : "";
352
+ const A = Object.keys(v).length > 0 ? `?${new URLSearchParams(v).toString()}` : "";
353
353
  return L(3, [
354
354
  "%capi%c %cfetch",
355
355
  l.API,
@@ -365,7 +365,7 @@ class $a {
365
365
  t.type,
366
366
  v
367
367
  ]), await fetch(
368
- [this.url, "api", s, t.type].join("/") + P,
368
+ [this.url, "api", s, t.type].join("/") + A,
369
369
  { ...c, method: "get" }
370
370
  ).then(async (I) => {
371
371
  if (!I.ok)
@@ -386,16 +386,16 @@ class $a {
386
386
  ), await fetch(
387
387
  [this.url, "api", s, "messages", t.id].join("/") + v,
388
388
  { ...c, method: "put" }
389
- ).then((P) => {
390
- if (!P.ok)
391
- throw new Error(P.statusText);
392
- return P;
393
- }).then((P) => P.json()).catch((P) => ({ succes: !1, message: P, data: [] }));
389
+ ).then((A) => {
390
+ if (!A.ok)
391
+ throw new Error(A.statusText);
392
+ return A;
393
+ }).then((A) => A.json()).catch((A) => ({ succes: !1, message: A, data: [] }));
394
394
  }
395
395
  async hideLabels(t) {
396
- const { version: s } = this.options, c = this.formHeaders(), v = new URLSearchParams(), P = t.labels || [];
397
- for (const [I, z] of P.entries())
398
- v.append(`custom_filters[${I}]`, z);
396
+ const { version: s } = this.options, c = this.formHeaders(), v = new URLSearchParams(), A = t.labels || [];
397
+ for (const [I, Y] of A.entries())
398
+ v.append(`custom_filters[${I}]`, Y);
399
399
  return console.info(
400
400
  "%capi%c %cput",
401
401
  l.API,
@@ -403,7 +403,7 @@ class $a {
403
403
  l.GET_DATA,
404
404
  q.HIDE_LABELS,
405
405
  t.widget,
406
- P
406
+ A
407
407
  ), await fetch(
408
408
  [this.url, "api", s, t.type, t.widget].join("/"),
409
409
  { ...c, body: v, method: "put" }
@@ -418,11 +418,11 @@ class $a {
418
418
  return delete v.type, delete v.hash, L(3, ["%capi%c %cloadSlide", l.API, l.NONE, l.SLIDE, t.id]), await fetch(
419
419
  [this.url, "api", s, "slides", t.id].join("/"),
420
420
  { ...c, method: "get" }
421
- ).then(async (P) => {
422
- if (!P.ok)
423
- throw new Error(`${P.status}`);
424
- return P;
425
- }).then((P) => P.json()).then((P) => (P.query = t, P)).catch((P) => ({ success: !1, message: `${P}`, data: null }));
421
+ ).then(async (A) => {
422
+ if (!A.ok)
423
+ throw new Error(`${A.status}`);
424
+ return A;
425
+ }).then((A) => A.json()).then((A) => (A.query = t, A)).catch((A) => ({ success: !1, message: `${A}`, data: null }));
426
426
  }
427
427
  /**
428
428
  * Store slide definition
@@ -445,11 +445,11 @@ class $a {
445
445
  ), await fetch(
446
446
  [this.url, "api", s, "slides", t.id].join("/"),
447
447
  { ...c, body: v, method: "put" }
448
- ).then((P) => {
449
- if (!P.ok)
450
- throw new Error(P.statusText);
451
- return P;
452
- }).then((P) => P.json()).catch((P) => ({ succes: !1, message: P, data: [] }));
448
+ ).then((A) => {
449
+ if (!A.ok)
450
+ throw new Error(A.statusText);
451
+ return A;
452
+ }).then((A) => A.json()).catch((A) => ({ succes: !1, message: A, data: [] }));
453
453
  }
454
454
  async loadPresentation(t) {
455
455
  const { version: s } = this.options, c = this.headers();
@@ -482,11 +482,11 @@ class $a {
482
482
  return L(2, ["%capi%c %cput", l.API, l.NONE, l.PRESENTATION, t.name]), await fetch(
483
483
  [this.url, "api", s, _.PRESENTATIONS, t.id].join("/"),
484
484
  { ...c, body: v, method: "put" }
485
- ).then((P) => {
486
- if (!P.ok)
487
- throw new Error(P.statusText);
488
- return P;
489
- }).then((P) => P.json()).catch((P) => ({ succes: !1, message: P, data: [] }));
485
+ ).then((A) => {
486
+ if (!A.ok)
487
+ throw new Error(A.statusText);
488
+ return A;
489
+ }).then((A) => A.json()).catch((A) => ({ succes: !1, message: A, data: [] }));
490
490
  }
491
491
  async loadPreference(t) {
492
492
  const { version: s } = this.options, c = this.headers();
@@ -518,11 +518,11 @@ class $a {
518
518
  ), await fetch(
519
519
  [this.url, "api", s, _.PREFERENCES, t.id].join("/"),
520
520
  { ...c, body: v, method: "put" }
521
- ).then((P) => {
522
- if (!P.ok)
523
- throw new Error(P.statusText);
524
- return P;
525
- }).then((P) => P.json()).catch((P) => ({ succes: !1, message: P, data: [] }));
521
+ ).then((A) => {
522
+ if (!A.ok)
523
+ throw new Error(A.statusText);
524
+ return A;
525
+ }).then((A) => A.json()).catch((A) => ({ succes: !1, message: A, data: [] }));
526
526
  }
527
527
  /*public async loadDashboardWidgets(query: IQuery): Promise<any> {
528
528
  if (query?.dashboard === undefined)
@@ -584,9 +584,9 @@ var ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
584
584
  function Ma(d) {
585
585
  return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
586
586
  }
587
- var en = { exports: {} }, Ba = en.exports, Nr;
587
+ var sn = { exports: {} }, Ba = sn.exports, $r;
588
588
  function Ga() {
589
- return Nr || (Nr = 1, function(d, t) {
589
+ return $r || ($r = 1, function(d, t) {
590
590
  (function(s, c) {
591
591
  d.exports = c();
592
592
  })(Ba, function() {
@@ -606,50 +606,50 @@ function Ga() {
606
606
  for (var a, i = 0, o = n.length; i < o; i++) !a && i in n || ((a = a || Array.prototype.slice.call(n, 0, i))[i] = n[i]);
607
607
  return e.concat(a || Array.prototype.slice.call(n));
608
608
  }
609
- var P = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ja, I = Object.keys, z = Array.isArray;
609
+ var A = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ja, I = Object.keys, Y = Array.isArray;
610
610
  function ne(e, n) {
611
611
  return typeof n != "object" || I(n).forEach(function(r) {
612
612
  e[r] = n[r];
613
613
  }), e;
614
614
  }
615
- typeof Promise > "u" || P.Promise || (P.Promise = Promise);
616
- var ie = Object.getPrototypeOf, U = {}.hasOwnProperty;
615
+ typeof Promise > "u" || A.Promise || (A.Promise = Promise);
616
+ var ue = Object.getPrototypeOf, U = {}.hasOwnProperty;
617
617
  function Q(e, n) {
618
618
  return U.call(e, n);
619
619
  }
620
620
  function re(e, n) {
621
- typeof n == "function" && (n = n(ie(e))), (typeof Reflect > "u" ? I : Reflect.ownKeys)(n).forEach(function(r) {
622
- oe(e, r, n[r]);
621
+ typeof n == "function" && (n = n(ue(e))), (typeof Reflect > "u" ? I : Reflect.ownKeys)(n).forEach(function(r) {
622
+ ae(e, r, n[r]);
623
623
  });
624
624
  }
625
- var je = Object.defineProperty;
626
- function oe(e, n, r, a) {
627
- je(e, n, ne(r && Q(r, "get") && typeof r.get == "function" ? { get: r.get, set: r.set, configurable: !0 } : { value: r, configurable: !0, writable: !0 }, a));
625
+ var Ie = Object.defineProperty;
626
+ function ae(e, n, r, a) {
627
+ Ie(e, n, ne(r && Q(r, "get") && typeof r.get == "function" ? { get: r.get, set: r.set, configurable: !0 } : { value: r, configurable: !0, writable: !0 }, a));
628
628
  }
629
- function Je(e) {
629
+ function _e(e) {
630
630
  return { from: function(n) {
631
- return e.prototype = Object.create(n.prototype), oe(e.prototype, "constructor", e), { extend: re.bind(null, e.prototype) };
631
+ return e.prototype = Object.create(n.prototype), ae(e.prototype, "constructor", e), { extend: re.bind(null, e.prototype) };
632
632
  } };
633
633
  }
634
- var Fr = Object.getOwnPropertyDescriptor, Wr = [].slice;
635
- function _t(e, n, r) {
636
- return Wr.call(e, n, r);
634
+ var Pt = Object.getOwnPropertyDescriptor, Dt = [].slice;
635
+ function Ge(e, n, r) {
636
+ return Dt.call(e, n, r);
637
637
  }
638
- function Yn(e, n) {
638
+ function ut(e, n) {
639
639
  return n(e);
640
640
  }
641
- function ot(e) {
641
+ function ge(e) {
642
642
  if (!e) throw new Error("Assertion Failed");
643
643
  }
644
- function Qn(e) {
645
- P.setImmediate ? setImmediate(e) : setTimeout(e, 0);
644
+ function Rt(e) {
645
+ A.setImmediate ? setImmediate(e) : setTimeout(e, 0);
646
646
  }
647
- function Se(e, n) {
647
+ function ve(e, n) {
648
648
  if (typeof n == "string" && Q(e, n)) return e[n];
649
649
  if (!n) return e;
650
650
  if (typeof n != "string") {
651
651
  for (var r = [], a = 0, i = n.length; a < i; ++a) {
652
- var o = Se(e, n[a]);
652
+ var o = ve(e, n[a]);
653
653
  r.push(o);
654
654
  }
655
655
  return r;
@@ -657,71 +657,71 @@ function Ga() {
657
657
  var u = n.indexOf(".");
658
658
  if (u !== -1) {
659
659
  var f = e[n.substr(0, u)];
660
- return f == null ? void 0 : Se(f, n.substr(u + 1));
660
+ return f == null ? void 0 : ve(f, n.substr(u + 1));
661
661
  }
662
662
  }
663
- function pe(e, n, r) {
663
+ function he(e, n, r) {
664
664
  if (e && n !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof n != "string" && "length" in n) {
665
- ot(typeof r != "string" && "length" in r);
666
- for (var a = 0, i = n.length; a < i; ++a) pe(e, n[a], r[a]);
665
+ ge(typeof r != "string" && "length" in r);
666
+ for (var a = 0, i = n.length; a < i; ++a) he(e, n[a], r[a]);
667
667
  } else {
668
668
  var o, u, f = n.indexOf(".");
669
- f !== -1 ? (o = n.substr(0, f), (u = n.substr(f + 1)) === "" ? r === void 0 ? z(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r : pe(f = !(f = e[o]) || !Q(e, o) ? e[o] = {} : f, u, r)) : r === void 0 ? z(e) && !isNaN(parseInt(n)) ? e.splice(n, 1) : delete e[n] : e[n] = r;
669
+ f !== -1 ? (o = n.substr(0, f), (u = n.substr(f + 1)) === "" ? r === void 0 ? Y(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r : he(f = !(f = e[o]) || !Q(e, o) ? e[o] = {} : f, u, r)) : r === void 0 ? Y(e) && !isNaN(parseInt(n)) ? e.splice(n, 1) : delete e[n] : e[n] = r;
670
670
  }
671
671
  }
672
- function Xn(e) {
672
+ function xt(e) {
673
673
  var n, r = {};
674
674
  for (n in e) Q(e, n) && (r[n] = e[n]);
675
675
  return r;
676
676
  }
677
677
  var Ur = [].concat;
678
- function Jn(e) {
678
+ function Vn(e) {
679
679
  return Ur.apply([], e);
680
680
  }
681
- var Ke = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Jn([8, 16, 32, 64].map(function(e) {
681
+ var We = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Vn([8, 16, 32, 64].map(function(e) {
682
682
  return ["Int", "Uint", "Float"].map(function(n) {
683
683
  return n + e + "Array";
684
684
  });
685
685
  }))).filter(function(e) {
686
- return P[e];
687
- }), Zn = new Set(Ke.map(function(e) {
688
- return P[e];
689
- })), ct = null;
690
- function Me(e) {
691
- return ct = /* @__PURE__ */ new WeakMap(), e = function n(r) {
686
+ return A[e];
687
+ }), qn = new Set(We.map(function(e) {
688
+ return A[e];
689
+ })), lt = null;
690
+ function Ke(e) {
691
+ return lt = /* @__PURE__ */ new WeakMap(), e = function n(r) {
692
692
  if (!r || typeof r != "object") return r;
693
- var a = ct.get(r);
693
+ var a = lt.get(r);
694
694
  if (a) return a;
695
- if (z(r)) {
696
- a = [], ct.set(r, a);
695
+ if (Y(r)) {
696
+ a = [], lt.set(r, a);
697
697
  for (var i = 0, o = r.length; i < o; ++i) a.push(n(r[i]));
698
- } else if (Zn.has(r.constructor)) a = r;
698
+ } else if (qn.has(r.constructor)) a = r;
699
699
  else {
700
- var u, f = ie(r);
701
- for (u in a = f === Object.prototype ? {} : Object.create(f), ct.set(r, a), r) Q(r, u) && (a[u] = n(r[u]));
700
+ var u, f = ue(r);
701
+ for (u in a = f === Object.prototype ? {} : Object.create(f), lt.set(r, a), r) Q(r, u) && (a[u] = n(r[u]));
702
702
  }
703
703
  return a;
704
- }(e), ct = null, e;
704
+ }(e), lt = null, e;
705
705
  }
706
706
  var zr = {}.toString;
707
- function nn(e) {
707
+ function cn(e) {
708
708
  return zr.call(e).slice(8, -1);
709
709
  }
710
- var rn = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Hr = typeof rn == "symbol" ? function(e) {
710
+ var un = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Hr = typeof un == "symbol" ? function(e) {
711
711
  var n;
712
- return e != null && (n = e[rn]) && n.apply(e);
712
+ return e != null && (n = e[un]) && n.apply(e);
713
713
  } : function() {
714
714
  return null;
715
715
  };
716
- function Be(e, n) {
716
+ function Le(e, n) {
717
717
  return n = e.indexOf(n), 0 <= n && e.splice(n, 1), 0 <= n;
718
718
  }
719
- var Ze = {};
720
- function Oe(e) {
719
+ var qe = {};
720
+ function Ae(e) {
721
721
  var n, r, a, i;
722
722
  if (arguments.length === 1) {
723
- if (z(e)) return e.slice();
724
- if (this === Ze && typeof e == "string") return [e];
723
+ if (Y(e)) return e.slice();
724
+ if (this === qe && typeof e == "string") return [e];
725
725
  if (i = Hr(e)) {
726
726
  for (r = []; !(a = i.next()).done; ) r.push(a.value);
727
727
  return r;
@@ -734,15 +734,15 @@ function Ga() {
734
734
  for (n = arguments.length, r = new Array(n); n--; ) r[n] = arguments[n];
735
735
  return r;
736
736
  }
737
- var an = typeof Symbol < "u" ? function(e) {
737
+ var ln = typeof Symbol < "u" ? function(e) {
738
738
  return e[Symbol.toStringTag] === "AsyncFunction";
739
739
  } : function() {
740
740
  return !1;
741
- }, dt = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], be = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(dt), Yr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
742
- function Ve(e, n) {
741
+ }, ht = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], ye = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(ht), Yr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
742
+ function et(e, n) {
743
743
  this.name = e, this.message = n;
744
744
  }
745
- function Vn(e, n) {
745
+ function er(e, n) {
746
746
  return e + ". Errors: " + Object.keys(n).map(function(r) {
747
747
  return n[r].toString();
748
748
  }).filter(function(r, a, i) {
@@ -750,44 +750,44 @@ function Ga() {
750
750
  }).join(`
751
751
  `);
752
752
  }
753
- function At(e, n, r, a) {
754
- this.failures = n, this.failedKeys = a, this.successCount = r, this.message = Vn(e, n);
753
+ function It(e, n, r, a) {
754
+ this.failures = n, this.failedKeys = a, this.successCount = r, this.message = er(e, n);
755
755
  }
756
- function qe(e, n) {
756
+ function tt(e, n) {
757
757
  this.name = "BulkError", this.failures = Object.keys(n).map(function(r) {
758
758
  return n[r];
759
- }), this.failuresByPos = n, this.message = Vn(e, this.failures);
759
+ }), this.failuresByPos = n, this.message = er(e, this.failures);
760
760
  }
761
- Je(Ve).from(Error).extend({ toString: function() {
761
+ _e(et).from(Error).extend({ toString: function() {
762
762
  return this.name + ": " + this.message;
763
- } }), Je(At).from(Ve), Je(qe).from(Ve);
764
- var sn = be.reduce(function(e, n) {
763
+ } }), _e(It).from(et), _e(tt).from(et);
764
+ var dn = ye.reduce(function(e, n) {
765
765
  return e[n] = n + "Error", e;
766
- }, {}), Qr = Ve, K = be.reduce(function(e, n) {
766
+ }, {}), Qr = et, K = ye.reduce(function(e, n) {
767
767
  var r = n + "Error";
768
768
  function a(i, o) {
769
769
  this.name = r, i ? typeof i == "string" ? (this.message = "".concat(i).concat(o ? `
770
770
  ` + o : ""), this.inner = o || null) : typeof i == "object" && (this.message = "".concat(i.name, " ").concat(i.message), this.inner = i) : (this.message = Yr[n] || r, this.inner = null);
771
771
  }
772
- return Je(a).from(Qr), e[n] = a, e;
772
+ return _e(a).from(Qr), e[n] = a, e;
773
773
  }, {});
774
774
  K.Syntax = SyntaxError, K.Type = TypeError, K.Range = RangeError;
775
- var qn = dt.reduce(function(e, n) {
775
+ var tr = ht.reduce(function(e, n) {
776
776
  return e[n + "Error"] = K[n], e;
777
- }, {}), Pt = be.reduce(function(e, n) {
777
+ }, {}), kt = ye.reduce(function(e, n) {
778
778
  return ["Syntax", "Type", "Range"].indexOf(n) === -1 && (e[n + "Error"] = K[n]), e;
779
779
  }, {});
780
780
  function V() {
781
781
  }
782
- function ut(e) {
782
+ function dt(e) {
783
783
  return e;
784
784
  }
785
785
  function Xr(e, n) {
786
- return e == null || e === ut ? n : function(r) {
786
+ return e == null || e === dt ? n : function(r) {
787
787
  return n(e(r));
788
788
  };
789
789
  }
790
- function Ge(e, n) {
790
+ function Fe(e, n) {
791
791
  return function() {
792
792
  e.apply(this, arguments), n.apply(this, arguments);
793
793
  };
@@ -799,14 +799,14 @@ function Ga() {
799
799
  var a = this.onsuccess, i = this.onerror;
800
800
  this.onsuccess = null, this.onerror = null;
801
801
  var o = n.apply(this, arguments);
802
- return a && (this.onsuccess = this.onsuccess ? Ge(a, this.onsuccess) : a), i && (this.onerror = this.onerror ? Ge(i, this.onerror) : i), o !== void 0 ? o : r;
802
+ return a && (this.onsuccess = this.onsuccess ? Fe(a, this.onsuccess) : a), i && (this.onerror = this.onerror ? Fe(i, this.onerror) : i), o !== void 0 ? o : r;
803
803
  };
804
804
  }
805
805
  function Zr(e, n) {
806
806
  return e === V ? n : function() {
807
807
  e.apply(this, arguments);
808
808
  var r = this.onsuccess, a = this.onerror;
809
- this.onsuccess = this.onerror = null, n.apply(this, arguments), r && (this.onsuccess = this.onsuccess ? Ge(r, this.onsuccess) : r), a && (this.onerror = this.onerror ? Ge(a, this.onerror) : a);
809
+ this.onsuccess = this.onerror = null, n.apply(this, arguments), r && (this.onsuccess = this.onsuccess ? Fe(r, this.onsuccess) : r), a && (this.onerror = this.onerror ? Fe(a, this.onerror) : a);
810
810
  };
811
811
  }
812
812
  function Vr(e, n) {
@@ -814,7 +814,7 @@ function Ga() {
814
814
  var a = e.apply(this, arguments);
815
815
  ne(r, a);
816
816
  var i = this.onsuccess, o = this.onerror;
817
- return this.onsuccess = null, this.onerror = null, r = n.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? Ge(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? Ge(o, this.onerror) : o), a === void 0 ? r === void 0 ? void 0 : r : ne(a, r);
817
+ return this.onsuccess = null, this.onerror = null, r = n.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? Fe(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? Fe(o, this.onerror) : o), a === void 0 ? r === void 0 ? void 0 : r : ne(a, r);
818
818
  };
819
819
  }
820
820
  function qr(e, n) {
@@ -822,7 +822,7 @@ function Ga() {
822
822
  return n.apply(this, arguments) !== !1 && e.apply(this, arguments);
823
823
  };
824
824
  }
825
- function on(e, n) {
825
+ function fn(e, n) {
826
826
  return e === V ? n : function() {
827
827
  var r = e.apply(this, arguments);
828
828
  if (r && typeof r.then == "function") {
@@ -834,147 +834,147 @@ function Ga() {
834
834
  return n.apply(this, arguments);
835
835
  };
836
836
  }
837
- Pt.ModifyError = At, Pt.DexieError = Ve, Pt.BulkError = qe;
838
- var ve = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
839
- function er(e) {
840
- ve = e;
837
+ kt.ModifyError = It, kt.DexieError = et, kt.BulkError = tt;
838
+ var Ee = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
839
+ function nr(e) {
840
+ Ee = e;
841
841
  }
842
- var lt = {}, tr = 100, Ke = typeof Promise > "u" ? [] : function() {
842
+ var ft = {}, rr = 100, We = typeof Promise > "u" ? [] : function() {
843
843
  var e = Promise.resolve();
844
- if (typeof crypto > "u" || !crypto.subtle) return [e, ie(e), e];
844
+ if (typeof crypto > "u" || !crypto.subtle) return [e, ue(e), e];
845
845
  var n = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
846
- return [n, ie(n), e];
847
- }(), dt = Ke[0], be = Ke[1], Ke = Ke[2], be = be && be.then, Le = dt && dt.constructor, cn = !!Ke, ft = function(e, n) {
848
- ht.push([e, n]), Dt && (queueMicrotask(ta), Dt = !1);
849
- }, un = !0, Dt = !0, Fe = [], Rt = [], ln = ut, Re = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: V, pgp: !1, env: {}, finalize: V }, G = Re, ht = [], We = 0, xt = [];
846
+ return [n, ue(n), e];
847
+ }(), ht = We[0], ye = We[1], We = We[2], ye = ye && ye.then, Ue = ht && ht.constructor, hn = !!We, pt = function(e, n) {
848
+ gt.push([e, n]), Tt && (queueMicrotask(ta), Tt = !1);
849
+ }, pn = !0, Tt = !0, ze = [], Nt = [], gn = dt, ke = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: V, pgp: !1, env: {}, finalize: V }, G = ke, gt = [], He = 0, Ct = [];
850
850
  function M(e) {
851
851
  if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
852
852
  this._listeners = [], this._lib = !1;
853
853
  var n = this._PSD = G;
854
854
  if (typeof e != "function") {
855
- if (e !== lt) throw new TypeError("Not a function");
856
- return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && fn(this, this._value));
855
+ if (e !== ft) throw new TypeError("Not a function");
856
+ return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && bn(this, this._value));
857
857
  }
858
858
  this._state = null, this._value = null, ++n.ref, function r(a, i) {
859
859
  try {
860
860
  i(function(o) {
861
861
  if (a._state === null) {
862
862
  if (o === a) throw new TypeError("A promise cannot be resolved with itself.");
863
- var u = a._lib && et();
863
+ var u = a._lib && nt();
864
864
  o && typeof o.then == "function" ? r(a, function(f, p) {
865
865
  o instanceof M ? o._then(f, p) : o.then(f, p);
866
- }) : (a._state = !0, a._value = o, rr(a)), u && tt();
866
+ }) : (a._state = !0, a._value = o, sr(a)), u && rt();
867
867
  }
868
- }, fn.bind(null, a));
868
+ }, bn.bind(null, a));
869
869
  } catch (o) {
870
- fn(a, o);
870
+ bn(a, o);
871
871
  }
872
872
  }(this, e);
873
873
  }
874
- var dn = { get: function() {
875
- var e = G, n = Nt;
874
+ var mn = { get: function() {
875
+ var e = G, n = Bt;
876
876
  function r(a, i) {
877
- var o = this, u = !e.global && (e !== G || n !== Nt), f = u && !Ie(), p = new M(function(m, E) {
878
- hn(o, new nr(sr(a, e, u, f), sr(i, e, u, f), m, E, e));
877
+ var o = this, u = !e.global && (e !== G || n !== Bt), f = u && !Ne(), p = new M(function(m, E) {
878
+ yn(o, new ar(or(a, e, u, f), or(i, e, u, f), m, E, e));
879
879
  });
880
880
  return this._consoleTask && (p._consoleTask = this._consoleTask), p;
881
881
  }
882
- return r.prototype = lt, r;
882
+ return r.prototype = ft, r;
883
883
  }, set: function(e) {
884
- oe(this, "then", e && e.prototype === lt ? dn : { get: function() {
884
+ ae(this, "then", e && e.prototype === ft ? mn : { get: function() {
885
885
  return e;
886
- }, set: dn.set });
886
+ }, set: mn.set });
887
887
  } };
888
- function nr(e, n, r, a, i) {
888
+ function ar(e, n, r, a, i) {
889
889
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof n == "function" ? n : null, this.resolve = r, this.reject = a, this.psd = i;
890
890
  }
891
- function fn(e, n) {
891
+ function bn(e, n) {
892
892
  var r, a;
893
- Rt.push(n), e._state === null && (r = e._lib && et(), n = ln(n), e._state = !1, e._value = n, a = e, Fe.some(function(i) {
893
+ Nt.push(n), e._state === null && (r = e._lib && nt(), n = gn(n), e._state = !1, e._value = n, a = e, ze.some(function(i) {
894
894
  return i._value === a._value;
895
- }) || Fe.push(a), rr(e), r && tt());
895
+ }) || ze.push(a), sr(e), r && rt());
896
896
  }
897
- function rr(e) {
897
+ function sr(e) {
898
898
  var n = e._listeners;
899
899
  e._listeners = [];
900
- for (var r = 0, a = n.length; r < a; ++r) hn(e, n[r]);
900
+ for (var r = 0, a = n.length; r < a; ++r) yn(e, n[r]);
901
901
  var i = e._PSD;
902
- --i.ref || i.finalize(), We === 0 && (++We, ft(function() {
903
- --We == 0 && pn();
902
+ --i.ref || i.finalize(), He === 0 && (++He, pt(function() {
903
+ --He == 0 && vn();
904
904
  }, []));
905
905
  }
906
- function hn(e, n) {
906
+ function yn(e, n) {
907
907
  if (e._state !== null) {
908
908
  var r = e._state ? n.onFulfilled : n.onRejected;
909
909
  if (r === null) return (e._state ? n.resolve : n.reject)(e._value);
910
- ++n.psd.ref, ++We, ft(ea, [r, e, n]);
910
+ ++n.psd.ref, ++He, pt(ea, [r, e, n]);
911
911
  } else e._listeners.push(n);
912
912
  }
913
913
  function ea(e, n, r) {
914
914
  try {
915
915
  var a, i = n._value;
916
- !n._state && Rt.length && (Rt = []), a = ve && n._consoleTask ? n._consoleTask.run(function() {
916
+ !n._state && Nt.length && (Nt = []), a = Ee && n._consoleTask ? n._consoleTask.run(function() {
917
917
  return e(i);
918
- }) : e(i), n._state || Rt.indexOf(i) !== -1 || function(o) {
919
- for (var u = Fe.length; u; ) if (Fe[--u]._value === o._value) return Fe.splice(u, 1);
918
+ }) : e(i), n._state || Nt.indexOf(i) !== -1 || function(o) {
919
+ for (var u = ze.length; u; ) if (ze[--u]._value === o._value) return ze.splice(u, 1);
920
920
  }(n), r.resolve(a);
921
921
  } catch (o) {
922
922
  r.reject(o);
923
923
  } finally {
924
- --We == 0 && pn(), --r.psd.ref || r.psd.finalize();
924
+ --He == 0 && vn(), --r.psd.ref || r.psd.finalize();
925
925
  }
926
926
  }
927
927
  function ta() {
928
- Ue(Re, function() {
929
- et() && tt();
928
+ Ye(ke, function() {
929
+ nt() && rt();
930
930
  });
931
931
  }
932
- function et() {
933
- var e = un;
934
- return Dt = un = !1, e;
932
+ function nt() {
933
+ var e = pn;
934
+ return Tt = pn = !1, e;
935
935
  }
936
- function tt() {
936
+ function rt() {
937
937
  var e, n, r;
938
938
  do
939
- for (; 0 < ht.length; ) for (e = ht, ht = [], r = e.length, n = 0; n < r; ++n) {
939
+ for (; 0 < gt.length; ) for (e = gt, gt = [], r = e.length, n = 0; n < r; ++n) {
940
940
  var a = e[n];
941
941
  a[0].apply(null, a[1]);
942
942
  }
943
- while (0 < ht.length);
944
- Dt = un = !0;
943
+ while (0 < gt.length);
944
+ Tt = pn = !0;
945
945
  }
946
- function pn() {
947
- var e = Fe;
948
- Fe = [], e.forEach(function(a) {
946
+ function vn() {
947
+ var e = ze;
948
+ ze = [], e.forEach(function(a) {
949
949
  a._PSD.onunhandled.call(null, a._value, a);
950
950
  });
951
- for (var n = xt.slice(0), r = n.length; r; ) n[--r]();
951
+ for (var n = Ct.slice(0), r = n.length; r; ) n[--r]();
952
952
  }
953
- function It(e) {
954
- return new M(lt, !1, e);
953
+ function $t(e) {
954
+ return new M(ft, !1, e);
955
955
  }
956
956
  function te(e, n) {
957
957
  var r = G;
958
958
  return function() {
959
- var a = et(), i = G;
959
+ var a = nt(), i = G;
960
960
  try {
961
- return ke(r, !0), e.apply(this, arguments);
961
+ return Ce(r, !0), e.apply(this, arguments);
962
962
  } catch (o) {
963
963
  n && n(o);
964
964
  } finally {
965
- ke(i, !1), a && tt();
965
+ Ce(i, !1), a && rt();
966
966
  }
967
967
  };
968
968
  }
969
- re(M.prototype, { then: dn, _then: function(e, n) {
970
- hn(this, new nr(null, null, e, n, G));
969
+ re(M.prototype, { then: mn, _then: function(e, n) {
970
+ yn(this, new ar(null, null, e, n, G));
971
971
  }, catch: function(e) {
972
972
  if (arguments.length === 1) return this.then(null, e);
973
973
  var n = e, r = arguments[1];
974
974
  return typeof n == "function" ? this.then(null, function(a) {
975
- return (a instanceof n ? r : It)(a);
975
+ return (a instanceof n ? r : $t)(a);
976
976
  }) : this.then(null, function(a) {
977
- return (a && a.name === n ? r : It)(a);
977
+ return (a && a.name === n ? r : $t)(a);
978
978
  });
979
979
  }, finally: function(e) {
980
980
  return this.then(function(n) {
@@ -983,7 +983,7 @@ function Ga() {
983
983
  });
984
984
  }, function(n) {
985
985
  return M.resolve(e()).then(function() {
986
- return It(n);
986
+ return $t(n);
987
987
  });
988
988
  });
989
989
  }, timeout: function(e, n) {
@@ -994,8 +994,8 @@ function Ga() {
994
994
  }, e);
995
995
  r.then(a, i).finally(clearTimeout.bind(null, o));
996
996
  }) : this;
997
- } }), typeof Symbol < "u" && Symbol.toStringTag && oe(M.prototype, Symbol.toStringTag, "Dexie.Promise"), Re.env = ar(), re(M, { all: function() {
998
- var e = Oe.apply(null, arguments).map(Ct);
997
+ } }), typeof Symbol < "u" && Symbol.toStringTag && ae(M.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = ir(), re(M, { all: function() {
998
+ var e = Ae.apply(null, arguments).map(Gt);
999
999
  return new M(function(n, r) {
1000
1000
  e.length === 0 && n([]);
1001
1001
  var a = e.length;
@@ -1008,9 +1008,9 @@ function Ga() {
1008
1008
  }, resolve: function(e) {
1009
1009
  return e instanceof M ? e : e && typeof e.then == "function" ? new M(function(n, r) {
1010
1010
  e.then(n, r);
1011
- }) : new M(lt, !0, e);
1012
- }, reject: It, race: function() {
1013
- var e = Oe.apply(null, arguments).map(Ct);
1011
+ }) : new M(ft, !0, e);
1012
+ }, reject: $t, race: function() {
1013
+ var e = Ae.apply(null, arguments).map(Gt);
1014
1014
  return new M(function(n, r) {
1015
1015
  e.map(function(a) {
1016
1016
  return M.resolve(a).then(n, r);
@@ -1021,33 +1021,33 @@ function Ga() {
1021
1021
  }, set: function(e) {
1022
1022
  return G = e;
1023
1023
  } }, totalEchoes: { get: function() {
1024
- return Nt;
1025
- } }, newPSD: xe, usePSD: Ue, scheduler: { get: function() {
1026
- return ft;
1024
+ return Bt;
1025
+ } }, newPSD: Te, usePSD: Ye, scheduler: { get: function() {
1026
+ return pt;
1027
1027
  }, set: function(e) {
1028
- ft = e;
1028
+ pt = e;
1029
1029
  } }, rejectionMapper: { get: function() {
1030
- return ln;
1030
+ return gn;
1031
1031
  }, set: function(e) {
1032
- ln = e;
1032
+ gn = e;
1033
1033
  } }, follow: function(e, n) {
1034
1034
  return new M(function(r, a) {
1035
- return xe(function(i, o) {
1035
+ return Te(function(i, o) {
1036
1036
  var u = G;
1037
- u.unhandleds = [], u.onunhandled = o, u.finalize = Ge(function() {
1037
+ u.unhandleds = [], u.onunhandled = o, u.finalize = Fe(function() {
1038
1038
  var f, p = this;
1039
1039
  f = function() {
1040
1040
  p.unhandleds.length === 0 ? i() : o(p.unhandleds[0]);
1041
- }, xt.push(function m() {
1042
- f(), xt.splice(xt.indexOf(m), 1);
1043
- }), ++We, ft(function() {
1044
- --We == 0 && pn();
1041
+ }, Ct.push(function m() {
1042
+ f(), Ct.splice(Ct.indexOf(m), 1);
1043
+ }), ++He, pt(function() {
1044
+ --He == 0 && vn();
1045
1045
  }, []);
1046
1046
  }, u.finalize), e();
1047
1047
  }, n, r, a);
1048
1048
  });
1049
- } }), Le && (Le.allSettled && oe(M, "allSettled", function() {
1050
- var e = Oe.apply(null, arguments).map(Ct);
1049
+ } }), Ue && (Ue.allSettled && ae(M, "allSettled", function() {
1050
+ var e = Ae.apply(null, arguments).map(Gt);
1051
1051
  return new M(function(n) {
1052
1052
  e.length === 0 && n([]);
1053
1053
  var r = e.length, a = new Array(r);
@@ -1061,8 +1061,8 @@ function Ga() {
1061
1061
  });
1062
1062
  });
1063
1063
  });
1064
- }), Le.any && typeof AggregateError < "u" && oe(M, "any", function() {
1065
- var e = Oe.apply(null, arguments).map(Ct);
1064
+ }), Ue.any && typeof AggregateError < "u" && ae(M, "any", function() {
1065
+ var e = Ae.apply(null, arguments).map(Gt);
1066
1066
  return new M(function(n, r) {
1067
1067
  e.length === 0 && r(new AggregateError([]));
1068
1068
  var a = e.length, i = new Array(a);
@@ -1074,84 +1074,84 @@ function Ga() {
1074
1074
  });
1075
1075
  });
1076
1076
  });
1077
- }), Le.withResolvers && (M.withResolvers = Le.withResolvers));
1078
- var ce = { awaits: 0, echoes: 0, id: 0 }, na = 0, kt = [], Tt = 0, Nt = 0, ra = 0;
1079
- function xe(e, n, r, a) {
1077
+ }), Ue.withResolvers && (M.withResolvers = Ue.withResolvers));
1078
+ var oe = { awaits: 0, echoes: 0, id: 0 }, na = 0, jt = [], Mt = 0, Bt = 0, ra = 0;
1079
+ function Te(e, n, r, a) {
1080
1080
  var i = G, o = Object.create(i);
1081
- return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, Re.env, o.env = cn ? { Promise: M, PromiseProp: { value: M, configurable: !0, writable: !0 }, all: M.all, race: M.race, allSettled: M.allSettled, any: M.any, resolve: M.resolve, reject: M.reject } : {}, n && ne(o, n), ++i.ref, o.finalize = function() {
1081
+ return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, ke.env, o.env = hn ? { Promise: M, PromiseProp: { value: M, configurable: !0, writable: !0 }, all: M.all, race: M.race, allSettled: M.allSettled, any: M.any, resolve: M.resolve, reject: M.reject } : {}, n && ne(o, n), ++i.ref, o.finalize = function() {
1082
1082
  --this.parent.ref || this.parent.finalize();
1083
- }, a = Ue(o, e, r, a), o.ref === 0 && o.finalize(), a;
1083
+ }, a = Ye(o, e, r, a), o.ref === 0 && o.finalize(), a;
1084
1084
  }
1085
- function nt() {
1086
- return ce.id || (ce.id = ++na), ++ce.awaits, ce.echoes += tr, ce.id;
1085
+ function at() {
1086
+ return oe.id || (oe.id = ++na), ++oe.awaits, oe.echoes += rr, oe.id;
1087
1087
  }
1088
- function Ie() {
1089
- return !!ce.awaits && (--ce.awaits == 0 && (ce.id = 0), ce.echoes = ce.awaits * tr, !0);
1088
+ function Ne() {
1089
+ return !!oe.awaits && (--oe.awaits == 0 && (oe.id = 0), oe.echoes = oe.awaits * rr, !0);
1090
1090
  }
1091
- function Ct(e) {
1092
- return ce.echoes && e && e.constructor === Le ? (nt(), e.then(function(n) {
1093
- return Ie(), n;
1091
+ function Gt(e) {
1092
+ return oe.echoes && e && e.constructor === Ue ? (at(), e.then(function(n) {
1093
+ return Ne(), n;
1094
1094
  }, function(n) {
1095
- return Ie(), ae(n);
1095
+ return Ne(), se(n);
1096
1096
  })) : e;
1097
1097
  }
1098
1098
  function aa() {
1099
- var e = kt[kt.length - 1];
1100
- kt.pop(), ke(e, !1);
1099
+ var e = jt[jt.length - 1];
1100
+ jt.pop(), Ce(e, !1);
1101
1101
  }
1102
- function ke(e, n) {
1102
+ function Ce(e, n) {
1103
1103
  var r, a = G;
1104
- (n ? !ce.echoes || Tt++ && e === G : !Tt || --Tt && e === G) || queueMicrotask(n ? (function(i) {
1105
- ++Nt, ce.echoes && --ce.echoes != 0 || (ce.echoes = ce.awaits = ce.id = 0), kt.push(G), ke(i, !0);
1106
- }).bind(null, e) : aa), e !== G && (G = e, a === Re && (Re.env = ar()), cn && (r = Re.env.Promise, n = e.env, (a.global || e.global) && (Object.defineProperty(P, "Promise", n.PromiseProp), r.all = n.all, r.race = n.race, r.resolve = n.resolve, r.reject = n.reject, n.allSettled && (r.allSettled = n.allSettled), n.any && (r.any = n.any))));
1104
+ (n ? !oe.echoes || Mt++ && e === G : !Mt || --Mt && e === G) || queueMicrotask(n ? (function(i) {
1105
+ ++Bt, oe.echoes && --oe.echoes != 0 || (oe.echoes = oe.awaits = oe.id = 0), jt.push(G), Ce(i, !0);
1106
+ }).bind(null, e) : aa), e !== G && (G = e, a === ke && (ke.env = ir()), hn && (r = ke.env.Promise, n = e.env, (a.global || e.global) && (Object.defineProperty(A, "Promise", n.PromiseProp), r.all = n.all, r.race = n.race, r.resolve = n.resolve, r.reject = n.reject, n.allSettled && (r.allSettled = n.allSettled), n.any && (r.any = n.any))));
1107
1107
  }
1108
- function ar() {
1109
- var e = P.Promise;
1110
- return cn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(P, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
1108
+ function ir() {
1109
+ var e = A.Promise;
1110
+ return hn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(A, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
1111
1111
  }
1112
- function Ue(e, n, r, a, i) {
1112
+ function Ye(e, n, r, a, i) {
1113
1113
  var o = G;
1114
1114
  try {
1115
- return ke(e, !0), n(r, a, i);
1115
+ return Ce(e, !0), n(r, a, i);
1116
1116
  } finally {
1117
- ke(o, !1);
1117
+ Ce(o, !1);
1118
1118
  }
1119
1119
  }
1120
- function sr(e, n, r, a) {
1120
+ function or(e, n, r, a) {
1121
1121
  return typeof e != "function" ? e : function() {
1122
1122
  var i = G;
1123
- r && nt(), ke(n, !0);
1123
+ r && at(), Ce(n, !0);
1124
1124
  try {
1125
1125
  return e.apply(this, arguments);
1126
1126
  } finally {
1127
- ke(i, !1), a && queueMicrotask(Ie);
1127
+ Ce(i, !1), a && queueMicrotask(Ne);
1128
1128
  }
1129
1129
  };
1130
1130
  }
1131
- function gn(e) {
1132
- Promise === Le && ce.echoes === 0 ? Tt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1131
+ function wn(e) {
1132
+ Promise === Ue && oe.echoes === 0 ? Mt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1133
1133
  }
1134
- ("" + be).indexOf("[native code]") === -1 && (nt = Ie = V);
1135
- var ae = M.reject, ze = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", rt = [], $t = "__dbnames", mn = "readonly", bn = "readwrite";
1136
- function He(e, n) {
1134
+ ("" + ye).indexOf("[native code]") === -1 && (at = Ne = V);
1135
+ var se = M.reject, Qe = "￿", Pe = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", cr = "String expected.", st = [], Kt = "__dbnames", En = "readonly", Sn = "readwrite";
1136
+ function Xe(e, n) {
1137
1137
  return e ? n ? function() {
1138
1138
  return e.apply(this, arguments) && n.apply(this, arguments);
1139
1139
  } : e : n;
1140
1140
  }
1141
- var or = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1142
- function jt(e) {
1141
+ var ur = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1142
+ function Lt(e) {
1143
1143
  return typeof e != "string" || /\./.test(e) ? function(n) {
1144
1144
  return n;
1145
1145
  } : function(n) {
1146
- return n[e] === void 0 && e in n && delete (n = Me(n))[e], n;
1146
+ return n[e] === void 0 && e in n && delete (n = Ke(n))[e], n;
1147
1147
  };
1148
1148
  }
1149
- function cr() {
1149
+ function lr() {
1150
1150
  throw K.Type();
1151
1151
  }
1152
1152
  function X(e, n) {
1153
1153
  try {
1154
- var r = ur(e), a = ur(n);
1154
+ var r = dr(e), a = dr(n);
1155
1155
  if (r !== a) return r === "Array" ? 1 : a === "Array" ? -1 : r === "binary" ? 1 : a === "binary" ? -1 : r === "string" ? 1 : a === "string" ? -1 : r === "Date" ? 1 : a !== "Date" ? NaN : -1;
1156
1156
  switch (r) {
1157
1157
  case "number":
@@ -1162,7 +1162,7 @@ function Ga() {
1162
1162
  return function(i, o) {
1163
1163
  for (var u = i.length, f = o.length, p = u < f ? u : f, m = 0; m < p; ++m) if (i[m] !== o[m]) return i[m] < o[m] ? -1 : 1;
1164
1164
  return u === f ? 0 : u < f ? -1 : 1;
1165
- }(lr(e), lr(n));
1165
+ }(fr(e), fr(n));
1166
1166
  case "Array":
1167
1167
  return function(i, o) {
1168
1168
  for (var u = i.length, f = o.length, p = u < f ? u : f, m = 0; m < p; ++m) {
@@ -1176,22 +1176,22 @@ function Ga() {
1176
1176
  }
1177
1177
  return NaN;
1178
1178
  }
1179
- function ur(e) {
1179
+ function dr(e) {
1180
1180
  var n = typeof e;
1181
- return n != "object" ? n : ArrayBuffer.isView(e) ? "binary" : (e = nn(e), e === "ArrayBuffer" ? "binary" : e);
1181
+ return n != "object" ? n : ArrayBuffer.isView(e) ? "binary" : (e = cn(e), e === "ArrayBuffer" ? "binary" : e);
1182
1182
  }
1183
- function lr(e) {
1183
+ function fr(e) {
1184
1184
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
1185
1185
  }
1186
- var dr = (ee.prototype._trans = function(e, n, r) {
1187
- var a = this._tx || G.trans, i = this.name, o = ve && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
1186
+ var hr = (ee.prototype._trans = function(e, n, r) {
1187
+ var a = this._tx || G.trans, i = this.name, o = Ee && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
1188
1188
  function u(m, E, h) {
1189
1189
  if (!h.schema[i]) throw new K.NotFound("Table " + i + " not part of transaction");
1190
1190
  return n(h.idbtrans, h);
1191
1191
  }
1192
- var f = et();
1192
+ var f = nt();
1193
1193
  try {
1194
- var p = a && a.db._novip === this.db._novip ? a === G.trans ? a._promise(e, u, r) : xe(function() {
1194
+ var p = a && a.db._novip === this.db._novip ? a === G.trans ? a._promise(e, u, r) : Te(function() {
1195
1195
  return a._promise(e, u, r);
1196
1196
  }, { trans: a, transless: G.transless || G }) : function m(E, h, O, g) {
1197
1197
  if (E.idbdb && (E._state.openComplete || G.letThrough || E._vip)) {
@@ -1199,12 +1199,12 @@ function Ga() {
1199
1199
  try {
1200
1200
  w.create(), E._state.PR1398_maxLoop = 3;
1201
1201
  } catch (S) {
1202
- return S.name === sn.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
1202
+ return S.name === dn.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
1203
1203
  return m(E, h, O, g);
1204
- })) : ae(S);
1204
+ })) : se(S);
1205
1205
  }
1206
1206
  return w._promise(h, function(S, y) {
1207
- return xe(function() {
1207
+ return Te(function() {
1208
1208
  return G.trans = w, g(S, y, w);
1209
1209
  });
1210
1210
  }).then(function(S) {
@@ -1217,9 +1217,9 @@ function Ga() {
1217
1217
  });
1218
1218
  });
1219
1219
  }
1220
- if (E._state.openComplete) return ae(new K.DatabaseClosed(E._state.dbOpenError));
1220
+ if (E._state.openComplete) return se(new K.DatabaseClosed(E._state.dbOpenError));
1221
1221
  if (!E._state.isBeingOpened) {
1222
- if (!E._state.autoOpen) return ae(new K.DatabaseClosed());
1222
+ if (!E._state.autoOpen) return se(new K.DatabaseClosed());
1223
1223
  E.open().catch(V);
1224
1224
  }
1225
1225
  return E._state.dbReadyPromise.then(function() {
@@ -1227,21 +1227,21 @@ function Ga() {
1227
1227
  });
1228
1228
  }(this.db, e, [this.name], u);
1229
1229
  return o && (p._consoleTask = o, p = p.catch(function(m) {
1230
- return console.trace(m), ae(m);
1230
+ return console.trace(m), se(m);
1231
1231
  })), p;
1232
1232
  } finally {
1233
- f && tt();
1233
+ f && rt();
1234
1234
  }
1235
1235
  }, ee.prototype.get = function(e, n) {
1236
1236
  var r = this;
1237
- return e && e.constructor === Object ? this.where(e).first(n) : e == null ? ae(new K.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
1237
+ return e && e.constructor === Object ? this.where(e).first(n) : e == null ? se(new K.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
1238
1238
  return r.core.get({ trans: a, key: e }).then(function(i) {
1239
1239
  return r.hook.reading.fire(i);
1240
1240
  });
1241
1241
  }).then(n);
1242
1242
  }, ee.prototype.where = function(e) {
1243
1243
  if (typeof e == "string") return new this.db.WhereClause(this, e);
1244
- if (z(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1244
+ if (Y(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1245
1245
  var n = I(e);
1246
1246
  if (n.length === 1) return this.where(n[0]).equals(e[n[0]]);
1247
1247
  var r = this.schema.indexes.concat(this.schema.primKey).filter(function(f) {
@@ -1255,25 +1255,25 @@ function Ga() {
1255
1255
  }).sort(function(f, p) {
1256
1256
  return f.keyPath.length - p.keyPath.length;
1257
1257
  })[0];
1258
- if (r && this.db._maxKey !== ze) {
1258
+ if (r && this.db._maxKey !== Qe) {
1259
1259
  var o = r.keyPath.slice(0, n.length);
1260
1260
  return this.where(o).equals(o.map(function(p) {
1261
1261
  return e[p];
1262
1262
  }));
1263
1263
  }
1264
- !r && ve && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(n.join("+"), "]"));
1264
+ !r && Ee && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(n.join("+"), "]"));
1265
1265
  var a = this.schema.idxByName;
1266
1266
  function i(f, p) {
1267
1267
  return X(f, p) === 0;
1268
1268
  }
1269
1269
  var u = n.reduce(function(h, p) {
1270
1270
  var m = h[0], E = h[1], h = a[p], O = e[p];
1271
- return [m || h, m || !h ? He(E, h && h.multi ? function(g) {
1272
- return g = Se(g, p), z(g) && g.some(function(w) {
1271
+ return [m || h, m || !h ? Xe(E, h && h.multi ? function(g) {
1272
+ return g = ve(g, p), Y(g) && g.some(function(w) {
1273
1273
  return i(O, w);
1274
1274
  });
1275
1275
  } : function(g) {
1276
- return i(O, Se(g, p));
1276
+ return i(O, ve(g, p));
1277
1277
  }) : E];
1278
1278
  }, [null, null]), o = u[0], u = u[1];
1279
1279
  return o ? this.where(o.name).equals(e[o.keyPath]).filter(u) : r ? this.filter(u) : this.where(n).equals("");
@@ -1292,7 +1292,7 @@ function Ga() {
1292
1292
  }, ee.prototype.toCollection = function() {
1293
1293
  return new this.db.Collection(new this.db.WhereClause(this));
1294
1294
  }, ee.prototype.orderBy = function(e) {
1295
- return new this.db.Collection(new this.db.WhereClause(this, z(e) ? "[".concat(e.join("+"), "]") : e));
1295
+ return new this.db.Collection(new this.db.WhereClause(this, Y(e) ? "[".concat(e.join("+"), "]") : e));
1296
1296
  }, ee.prototype.reverse = function() {
1297
1297
  return this.toCollection().reverse();
1298
1298
  }, ee.prototype.mapToClass = function(e) {
@@ -1300,7 +1300,7 @@ function Ga() {
1300
1300
  function i() {
1301
1301
  return n !== null && n.apply(this, arguments) || this;
1302
1302
  }
1303
- (this.schema.mappedClass = e).prototype instanceof cr && (function(p, m) {
1303
+ (this.schema.mappedClass = e).prototype instanceof lr && (function(p, m) {
1304
1304
  if (typeof m != "function" && m !== null) throw new TypeError("Class extends value " + String(m) + " is not a constructor or null");
1305
1305
  function E() {
1306
1306
  this.constructor = p;
@@ -1311,7 +1311,7 @@ function Ga() {
1311
1311
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
1312
1312
  return a;
1313
1313
  }, e = i);
1314
- for (var o = /* @__PURE__ */ new Set(), u = e.prototype; u; u = ie(u)) Object.getOwnPropertyNames(u).forEach(function(p) {
1314
+ for (var o = /* @__PURE__ */ new Set(), u = e.prototype; u; u = ue(u)) Object.getOwnPropertyNames(u).forEach(function(p) {
1315
1315
  return o.add(p);
1316
1316
  });
1317
1317
  function f(p) {
@@ -1330,28 +1330,28 @@ function Ga() {
1330
1330
  });
1331
1331
  }, ee.prototype.add = function(e, n) {
1332
1332
  var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, u = e;
1333
- return o && i && (u = jt(o)(e)), this._trans("readwrite", function(f) {
1333
+ return o && i && (u = Lt(o)(e)), this._trans("readwrite", function(f) {
1334
1334
  return r.core.mutate({ trans: f, type: "add", keys: n != null ? [n] : null, values: [u] });
1335
1335
  }).then(function(f) {
1336
1336
  return f.numFailures ? M.reject(f.failures[0]) : f.lastResult;
1337
1337
  }).then(function(f) {
1338
1338
  if (o) try {
1339
- pe(e, o, f);
1339
+ he(e, o, f);
1340
1340
  } catch {
1341
1341
  }
1342
1342
  return f;
1343
1343
  });
1344
1344
  }, ee.prototype.update = function(e, n) {
1345
- return typeof e != "object" || z(e) ? this.where(":id").equals(e).modify(n) : (e = Se(e, this.schema.primKey.keyPath), e === void 0 ? ae(new K.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(n));
1345
+ return typeof e != "object" || Y(e) ? this.where(":id").equals(e).modify(n) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? se(new K.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(n));
1346
1346
  }, ee.prototype.put = function(e, n) {
1347
1347
  var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, u = e;
1348
- return o && i && (u = jt(o)(e)), this._trans("readwrite", function(f) {
1348
+ return o && i && (u = Lt(o)(e)), this._trans("readwrite", function(f) {
1349
1349
  return r.core.mutate({ trans: f, type: "put", values: [u], keys: n != null ? [n] : null });
1350
1350
  }).then(function(f) {
1351
1351
  return f.numFailures ? M.reject(f.failures[0]) : f.lastResult;
1352
1352
  }).then(function(f) {
1353
1353
  if (o) try {
1354
- pe(e, o, f);
1354
+ he(e, o, f);
1355
1355
  } catch {
1356
1356
  }
1357
1357
  return f;
@@ -1366,7 +1366,7 @@ function Ga() {
1366
1366
  }, ee.prototype.clear = function() {
1367
1367
  var e = this;
1368
1368
  return this._trans("readwrite", function(n) {
1369
- return e.core.mutate({ trans: n, type: "deleteRange", range: or });
1369
+ return e.core.mutate({ trans: n, type: "deleteRange", range: ur });
1370
1370
  }).then(function(n) {
1371
1371
  return n.numFailures ? M.reject(n.failures[0]) : void 0;
1372
1372
  });
@@ -1385,11 +1385,11 @@ function Ga() {
1385
1385
  var m = a.schema.primKey, f = m.auto, m = m.keyPath;
1386
1386
  if (m && i) throw new K.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
1387
1387
  if (i && i.length !== e.length) throw new K.InvalidArgument("Arguments objects and keys must have the same length");
1388
- var p = e.length, m = m && f ? e.map(jt(m)) : e;
1388
+ var p = e.length, m = m && f ? e.map(Lt(m)) : e;
1389
1389
  return a.core.mutate({ trans: u, type: "add", keys: i, values: m, wantResults: o }).then(function(w) {
1390
1390
  var h = w.numFailures, O = w.results, g = w.lastResult, w = w.failures;
1391
1391
  if (h === 0) return o ? O : g;
1392
- throw new qe("".concat(a.name, ".bulkAdd(): ").concat(h, " of ").concat(p, " operations failed"), w);
1392
+ throw new tt("".concat(a.name, ".bulkAdd(): ").concat(h, " of ").concat(p, " operations failed"), w);
1393
1393
  });
1394
1394
  });
1395
1395
  }, ee.prototype.bulkPut = function(e, n, r) {
@@ -1398,11 +1398,11 @@ function Ga() {
1398
1398
  var m = a.schema.primKey, f = m.auto, m = m.keyPath;
1399
1399
  if (m && i) throw new K.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
1400
1400
  if (i && i.length !== e.length) throw new K.InvalidArgument("Arguments objects and keys must have the same length");
1401
- var p = e.length, m = m && f ? e.map(jt(m)) : e;
1401
+ var p = e.length, m = m && f ? e.map(Lt(m)) : e;
1402
1402
  return a.core.mutate({ trans: u, type: "put", keys: i, values: m, wantResults: o }).then(function(w) {
1403
1403
  var h = w.numFailures, O = w.results, g = w.lastResult, w = w.failures;
1404
1404
  if (h === 0) return o ? O : g;
1405
- throw new qe("".concat(a.name, ".bulkPut(): ").concat(h, " of ").concat(p, " operations failed"), w);
1405
+ throw new tt("".concat(a.name, ".bulkPut(): ").concat(h, " of ").concat(p, " operations failed"), w);
1406
1406
  });
1407
1407
  });
1408
1408
  }, ee.prototype.bulkUpdate = function(e) {
@@ -1417,11 +1417,11 @@ function Ga() {
1417
1417
  e.forEach(function(h, O) {
1418
1418
  var g = h.key, w = h.changes, S = f[O];
1419
1419
  if (S) {
1420
- for (var y = 0, A = Object.keys(w); y < A.length; y++) {
1421
- var D = A[y], R = w[D];
1420
+ for (var y = 0, P = Object.keys(w); y < P.length; y++) {
1421
+ var D = P[y], R = w[D];
1422
1422
  if (D === n.schema.primKey.keyPath) {
1423
1423
  if (X(R, g) !== 0) throw new K.Constraint("Cannot update primary key in bulkUpdate()");
1424
- } else pe(S, D, R);
1424
+ } else he(S, D, R);
1425
1425
  }
1426
1426
  o.push(O), p.push(g), m.push(S);
1427
1427
  }
@@ -1431,10 +1431,10 @@ function Ga() {
1431
1431
  var O = h.numFailures, g = h.failures;
1432
1432
  if (O === 0) return E;
1433
1433
  for (var w = 0, S = Object.keys(g); w < S.length; w++) {
1434
- var y, A = S[w], D = o[Number(A)];
1435
- D != null && (y = g[A], delete g[A], g[D] = y);
1434
+ var y, P = S[w], D = o[Number(P)];
1435
+ D != null && (y = g[P], delete g[P], g[D] = y);
1436
1436
  }
1437
- throw new qe("".concat(n.name, ".bulkUpdate(): ").concat(O, " of ").concat(E, " operations failed"), g);
1437
+ throw new tt("".concat(n.name, ".bulkUpdate(): ").concat(O, " of ").concat(E, " operations failed"), g);
1438
1438
  });
1439
1439
  });
1440
1440
  });
@@ -1445,12 +1445,12 @@ function Ga() {
1445
1445
  }).then(function(u) {
1446
1446
  var i = u.numFailures, o = u.lastResult, u = u.failures;
1447
1447
  if (i === 0) return o;
1448
- throw new qe("".concat(n.name, ".bulkDelete(): ").concat(i, " of ").concat(r, " operations failed"), u);
1448
+ throw new tt("".concat(n.name, ".bulkDelete(): ").concat(i, " of ").concat(r, " operations failed"), u);
1449
1449
  });
1450
1450
  }, ee);
1451
1451
  function ee() {
1452
1452
  }
1453
- function pt(e) {
1453
+ function mt(e) {
1454
1454
  function n(u, f) {
1455
1455
  if (f) {
1456
1456
  for (var p = arguments.length, m = new Array(p - 1); --p; ) m[p - 1] = arguments[p];
@@ -1477,13 +1477,13 @@ function Ga() {
1477
1477
  }
1478
1478
  I(m = u).forEach(function(h) {
1479
1479
  var O = m[h];
1480
- if (z(O)) o(h, m[h][0], m[h][1]);
1480
+ if (Y(O)) o(h, m[h][0], m[h][1]);
1481
1481
  else {
1482
1482
  if (O !== "asap") throw new K.InvalidArgument("Invalid event config");
1483
- var g = o(h, ut, function() {
1483
+ var g = o(h, dt, function() {
1484
1484
  for (var w = arguments.length, S = new Array(w); w--; ) S[w] = arguments[w];
1485
1485
  g.subscribers.forEach(function(y) {
1486
- Qn(function() {
1486
+ Rt(function() {
1487
1487
  y.apply(null, S);
1488
1488
  });
1489
1489
  });
@@ -1492,33 +1492,33 @@ function Ga() {
1492
1492
  });
1493
1493
  }
1494
1494
  }
1495
- function gt(e, n) {
1496
- return Je(n).from({ prototype: e }), n;
1495
+ function bt(e, n) {
1496
+ return _e(n).from({ prototype: e }), n;
1497
1497
  }
1498
- function at(e, n) {
1498
+ function it(e, n) {
1499
1499
  return !(e.filter || e.algorithm || e.or) && (n ? e.justLimit : !e.replayFilter);
1500
1500
  }
1501
- function yn(e, n) {
1502
- e.filter = He(e.filter, n);
1501
+ function On(e, n) {
1502
+ e.filter = Xe(e.filter, n);
1503
1503
  }
1504
- function vn(e, n, r) {
1504
+ function _n(e, n, r) {
1505
1505
  var a = e.replayFilter;
1506
1506
  e.replayFilter = a ? function() {
1507
- return He(a(), n());
1507
+ return Xe(a(), n());
1508
1508
  } : n, e.justLimit = r && !a;
1509
1509
  }
1510
- function Mt(e, n) {
1510
+ function Ft(e, n) {
1511
1511
  if (e.isPrimKey) return n.primaryKey;
1512
1512
  var r = n.getIndexByKeyPath(e.index);
1513
1513
  if (!r) throw new K.Schema("KeyPath " + e.index + " on object store " + n.name + " is not indexed");
1514
1514
  return r;
1515
1515
  }
1516
- function fr(e, n, r) {
1517
- var a = Mt(e, n.schema);
1516
+ function pr(e, n, r) {
1517
+ var a = Ft(e, n.schema);
1518
1518
  return n.openCursor({ trans: r, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: a, range: e.range } });
1519
1519
  }
1520
- function Bt(e, n, r, a) {
1521
- var i = e.replayFilter ? He(e.filter, e.replayFilter()) : e.filter;
1520
+ function Wt(e, n, r, a) {
1521
+ var i = e.replayFilter ? Xe(e.filter, e.replayFilter()) : e.filter;
1522
1522
  if (e.or) {
1523
1523
  var o = {}, u = function(f, p, m) {
1524
1524
  var E, h;
@@ -1528,11 +1528,11 @@ function Ga() {
1528
1528
  return p.fail(O);
1529
1529
  }) || ((h = "" + (E = p.primaryKey)) == "[object ArrayBuffer]" && (h = "" + new Uint8Array(E)), Q(o, h) || (o[h] = !0, n(f, p, m)));
1530
1530
  };
1531
- return Promise.all([e.or._iterate(u, r), hr(fr(e, a, r), e.algorithm, u, !e.keysOnly && e.valueMapper)]);
1531
+ return Promise.all([e.or._iterate(u, r), gr(pr(e, a, r), e.algorithm, u, !e.keysOnly && e.valueMapper)]);
1532
1532
  }
1533
- return hr(fr(e, a, r), He(e.algorithm, i), n, !e.keysOnly && e.valueMapper);
1533
+ return gr(pr(e, a, r), Xe(e.algorithm, i), n, !e.keysOnly && e.valueMapper);
1534
1534
  }
1535
- function hr(e, n, r, a) {
1535
+ function gr(e, n, r, a) {
1536
1536
  var i = te(a ? function(o, u, f) {
1537
1537
  return r(a(o), u, f);
1538
1538
  } : r);
@@ -1553,11 +1553,11 @@ function Ga() {
1553
1553
  });
1554
1554
  });
1555
1555
  }
1556
- var mt = (pr.prototype.execute = function(e) {
1556
+ var yt = (mr.prototype.execute = function(e) {
1557
1557
  var n = this["@@propmod"];
1558
1558
  if (n.add !== void 0) {
1559
1559
  var r = n.add;
1560
- if (z(r)) return v(v([], z(e) ? e : [], !0), r).sort();
1560
+ if (Y(r)) return v(v([], Y(e) ? e : [], !0), r).sort();
1561
1561
  if (typeof r == "number") return (Number(e) || 0) + r;
1562
1562
  if (typeof r == "bigint") try {
1563
1563
  return BigInt(e) + r;
@@ -1568,7 +1568,7 @@ function Ga() {
1568
1568
  }
1569
1569
  if (n.remove !== void 0) {
1570
1570
  var a = n.remove;
1571
- if (z(a)) return z(e) ? e.filter(function(i) {
1571
+ if (Y(a)) return Y(e) ? e.filter(function(i) {
1572
1572
  return !a.includes(i);
1573
1573
  }).sort() : [];
1574
1574
  if (typeof a == "number") return Number(e) - a;
@@ -1580,21 +1580,21 @@ function Ga() {
1580
1580
  throw new TypeError("Invalid subtrahend ".concat(a));
1581
1581
  }
1582
1582
  return r = (r = n.replacePrefix) === null || r === void 0 ? void 0 : r[0], r && typeof e == "string" && e.startsWith(r) ? n.replacePrefix[1] + e.substring(r.length) : e;
1583
- }, pr);
1584
- function pr(e) {
1583
+ }, mr);
1584
+ function mr(e) {
1585
1585
  this["@@propmod"] = e;
1586
1586
  }
1587
1587
  var sa = (J.prototype._read = function(e, n) {
1588
1588
  var r = this._ctx;
1589
- return r.error ? r.table._trans(null, ae.bind(null, r.error)) : r.table._trans("readonly", e).then(n);
1589
+ return r.error ? r.table._trans(null, se.bind(null, r.error)) : r.table._trans("readonly", e).then(n);
1590
1590
  }, J.prototype._write = function(e) {
1591
1591
  var n = this._ctx;
1592
- return n.error ? n.table._trans(null, ae.bind(null, n.error)) : n.table._trans("readwrite", e, "locked");
1592
+ return n.error ? n.table._trans(null, se.bind(null, n.error)) : n.table._trans("readwrite", e, "locked");
1593
1593
  }, J.prototype._addAlgorithm = function(e) {
1594
1594
  var n = this._ctx;
1595
- n.algorithm = He(n.algorithm, e);
1595
+ n.algorithm = Xe(n.algorithm, e);
1596
1596
  }, J.prototype._iterate = function(e, n) {
1597
- return Bt(this._ctx, e, n, this._ctx.table.core);
1597
+ return Wt(this._ctx, e, n, this._ctx.table.core);
1598
1598
  }, J.prototype.clone = function(e) {
1599
1599
  var n = Object.create(this.constructor.prototype), r = Object.create(this._ctx);
1600
1600
  return e && ne(r, e), n._ctx = r, n;
@@ -1603,17 +1603,17 @@ function Ga() {
1603
1603
  }, J.prototype.each = function(e) {
1604
1604
  var n = this._ctx;
1605
1605
  return this._read(function(r) {
1606
- return Bt(n, e, r, n.table.core);
1606
+ return Wt(n, e, r, n.table.core);
1607
1607
  });
1608
1608
  }, J.prototype.count = function(e) {
1609
1609
  var n = this;
1610
1610
  return this._read(function(r) {
1611
1611
  var a = n._ctx, i = a.table.core;
1612
- if (at(a, !0)) return i.count({ trans: r, query: { index: Mt(a, i.schema), range: a.range } }).then(function(u) {
1612
+ if (it(a, !0)) return i.count({ trans: r, query: { index: Ft(a, i.schema), range: a.range } }).then(function(u) {
1613
1613
  return Math.min(u, a.limit);
1614
1614
  });
1615
1615
  var o = 0;
1616
- return Bt(a, function() {
1616
+ return Wt(a, function() {
1617
1617
  return ++o, !1;
1618
1618
  }, r, i).then(function() {
1619
1619
  return o;
@@ -1635,14 +1635,14 @@ function Ga() {
1635
1635
  var n = this;
1636
1636
  return this._read(function(r) {
1637
1637
  var a = n._ctx;
1638
- if (a.dir === "next" && at(a, !0) && 0 < a.limit) {
1639
- var i = a.valueMapper, o = Mt(a, a.table.core.schema);
1638
+ if (a.dir === "next" && it(a, !0) && 0 < a.limit) {
1639
+ var i = a.valueMapper, o = Ft(a, a.table.core.schema);
1640
1640
  return a.table.core.query({ trans: r, limit: a.limit, values: !0, query: { index: o, range: a.range } }).then(function(f) {
1641
1641
  return f = f.result, i ? f.map(i) : f;
1642
1642
  });
1643
1643
  }
1644
1644
  var u = [];
1645
- return Bt(a, function(f) {
1645
+ return Wt(a, function(f) {
1646
1646
  return u.push(f);
1647
1647
  }, r, a.table.core).then(function() {
1648
1648
  return u;
@@ -1650,28 +1650,28 @@ function Ga() {
1650
1650
  }, e);
1651
1651
  }, J.prototype.offset = function(e) {
1652
1652
  var n = this._ctx;
1653
- return e <= 0 || (n.offset += e, at(n) ? vn(n, function() {
1653
+ return e <= 0 || (n.offset += e, it(n) ? _n(n, function() {
1654
1654
  var r = e;
1655
1655
  return function(a, i) {
1656
1656
  return r === 0 || (r === 1 ? --r : i(function() {
1657
1657
  a.advance(r), r = 0;
1658
1658
  }), !1);
1659
1659
  };
1660
- }) : vn(n, function() {
1660
+ }) : _n(n, function() {
1661
1661
  var r = e;
1662
1662
  return function() {
1663
1663
  return --r < 0;
1664
1664
  };
1665
1665
  })), this;
1666
1666
  }, J.prototype.limit = function(e) {
1667
- return this._ctx.limit = Math.min(this._ctx.limit, e), vn(this._ctx, function() {
1667
+ return this._ctx.limit = Math.min(this._ctx.limit, e), _n(this._ctx, function() {
1668
1668
  var n = e;
1669
1669
  return function(r, a, i) {
1670
1670
  return --n <= 0 && a(i), 0 <= n;
1671
1671
  };
1672
1672
  }, !0), this;
1673
1673
  }, J.prototype.until = function(e, n) {
1674
- return yn(this._ctx, function(r, a, i) {
1674
+ return On(this._ctx, function(r, a, i) {
1675
1675
  return !e(r.value) || (a(i), n);
1676
1676
  }), this;
1677
1677
  }, J.prototype.first = function(e) {
@@ -1682,9 +1682,9 @@ function Ga() {
1682
1682
  return this.reverse().first(e);
1683
1683
  }, J.prototype.filter = function(e) {
1684
1684
  var n;
1685
- return yn(this._ctx, function(r) {
1685
+ return On(this._ctx, function(r) {
1686
1686
  return e(r.value);
1687
- }), (n = this._ctx).isMatch = He(n.isMatch, e), this;
1687
+ }), (n = this._ctx).isMatch = Xe(n.isMatch, e), this;
1688
1688
  }, J.prototype.and = function(e) {
1689
1689
  return this.filter(e);
1690
1690
  }, J.prototype.or = function(e) {
@@ -1716,8 +1716,8 @@ function Ga() {
1716
1716
  }).then(e);
1717
1717
  }, J.prototype.primaryKeys = function(e) {
1718
1718
  var n = this._ctx;
1719
- if (n.dir === "next" && at(n, !0) && 0 < n.limit) return this._read(function(a) {
1720
- var i = Mt(n, n.table.core.schema);
1719
+ if (n.dir === "next" && it(n, !0) && 0 < n.limit) return this._read(function(a) {
1720
+ var i = Ft(n, n.table.core.schema);
1721
1721
  return n.table.core.query({ trans: a, values: !1, limit: n.limit, query: { index: i, range: n.range } });
1722
1722
  }).then(function(a) {
1723
1723
  return a.result;
@@ -1741,7 +1741,7 @@ function Ga() {
1741
1741
  var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
1742
1742
  if (!e || !e.multi) return this;
1743
1743
  var n = {};
1744
- return yn(this._ctx, function(i) {
1744
+ return On(this._ctx, function(i) {
1745
1745
  var a = i.primaryKey.toString(), i = Q(n, a);
1746
1746
  return n[a] = !0, !i;
1747
1747
  }), this;
@@ -1750,11 +1750,11 @@ function Ga() {
1750
1750
  return this._write(function(a) {
1751
1751
  var i, o, u;
1752
1752
  u = typeof e == "function" ? e : (i = I(e), o = i.length, function(y) {
1753
- for (var A = !1, D = 0; D < o; ++D) {
1754
- var R = i[D], x = e[R], k = Se(y, R);
1755
- x instanceof mt ? (pe(y, R, x.execute(k)), A = !0) : k !== x && (pe(y, R, x), A = !0);
1753
+ for (var P = !1, D = 0; D < o; ++D) {
1754
+ var R = i[D], x = e[R], k = ve(y, R);
1755
+ x instanceof yt ? (he(y, R, x.execute(k)), P = !0) : k !== x && (he(y, R, x), P = !0);
1756
1756
  }
1757
- return A;
1757
+ return P;
1758
1758
  });
1759
1759
  var f = r.table.core, h = f.schema.primaryKey, p = h.outbound, m = h.extractKey, E = 200, h = n.db._options.modifyChunkSize;
1760
1760
  h && (E = typeof h == "object" ? h[f.name] || h["*"] || 200 : h);
@@ -1768,54 +1768,54 @@ function Ga() {
1768
1768
  }
1769
1769
  var g = [], w = 0, S = [];
1770
1770
  return n.clone().primaryKeys().then(function(y) {
1771
- function A(R) {
1771
+ function P(R) {
1772
1772
  var x = Math.min(E, y.length - R);
1773
1773
  return f.getMany({ trans: a, keys: y.slice(R, R + x), cache: "immutable" }).then(function(k) {
1774
1774
  for (var $ = [], T = [], N = p ? [] : null, j = [], C = 0; C < x; ++C) {
1775
- var B = k[C], W = { value: Me(B), primKey: y[R + C] };
1775
+ var B = k[C], W = { value: Ke(B), primKey: y[R + C] };
1776
1776
  u.call(W, W.value, W) !== !1 && (W.value == null ? j.push(y[R + C]) : p || X(m(B), m(W.value)) === 0 ? (T.push(W.value), p && N.push(y[R + C])) : (j.push(y[R + C]), $.push(W.value)));
1777
1777
  }
1778
- return Promise.resolve(0 < $.length && f.mutate({ trans: a, type: "add", values: $ }).then(function(H) {
1779
- for (var Y in H.failures) j.splice(parseInt(Y), 1);
1780
- O($.length, H);
1778
+ return Promise.resolve(0 < $.length && f.mutate({ trans: a, type: "add", values: $ }).then(function(z) {
1779
+ for (var H in z.failures) j.splice(parseInt(H), 1);
1780
+ O($.length, z);
1781
1781
  })).then(function() {
1782
- return (0 < T.length || D && typeof e == "object") && f.mutate({ trans: a, type: "put", keys: N, values: T, criteria: D, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < R }).then(function(H) {
1783
- return O(T.length, H);
1782
+ return (0 < T.length || D && typeof e == "object") && f.mutate({ trans: a, type: "put", keys: N, values: T, criteria: D, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < R }).then(function(z) {
1783
+ return O(T.length, z);
1784
1784
  });
1785
1785
  }).then(function() {
1786
- return (0 < j.length || D && e === wn) && f.mutate({ trans: a, type: "delete", keys: j, criteria: D, isAdditionalChunk: 0 < R }).then(function(H) {
1787
- return O(j.length, H);
1786
+ return (0 < j.length || D && e === An) && f.mutate({ trans: a, type: "delete", keys: j, criteria: D, isAdditionalChunk: 0 < R }).then(function(z) {
1787
+ return O(j.length, z);
1788
1788
  });
1789
1789
  }).then(function() {
1790
- return y.length > R + x && A(R + E);
1790
+ return y.length > R + x && P(R + E);
1791
1791
  });
1792
1792
  });
1793
1793
  }
1794
- var D = at(r) && r.limit === 1 / 0 && (typeof e != "function" || e === wn) && { index: r.index, range: r.range };
1795
- return A(0).then(function() {
1796
- if (0 < g.length) throw new At("Error modifying one or more objects", g, w, S);
1794
+ var D = it(r) && r.limit === 1 / 0 && (typeof e != "function" || e === An) && { index: r.index, range: r.range };
1795
+ return P(0).then(function() {
1796
+ if (0 < g.length) throw new It("Error modifying one or more objects", g, w, S);
1797
1797
  return y.length;
1798
1798
  });
1799
1799
  });
1800
1800
  });
1801
1801
  }, J.prototype.delete = function() {
1802
1802
  var e = this._ctx, n = e.range;
1803
- return at(e) && (e.isPrimKey || n.type === 3) ? this._write(function(r) {
1803
+ return it(e) && (e.isPrimKey || n.type === 3) ? this._write(function(r) {
1804
1804
  var a = e.table.core.schema.primaryKey, i = n;
1805
1805
  return e.table.core.count({ trans: r, query: { index: a, range: i } }).then(function(o) {
1806
1806
  return e.table.core.mutate({ trans: r, type: "deleteRange", range: i }).then(function(u) {
1807
1807
  var f = u.failures;
1808
- if (u.lastResult, u.results, u = u.numFailures, u) throw new At("Could not delete some values", Object.keys(f).map(function(p) {
1808
+ if (u.lastResult, u.results, u = u.numFailures, u) throw new It("Could not delete some values", Object.keys(f).map(function(p) {
1809
1809
  return f[p];
1810
1810
  }), o - u);
1811
1811
  return o - u;
1812
1812
  });
1813
1813
  });
1814
- }) : this.modify(wn);
1814
+ }) : this.modify(An);
1815
1815
  }, J);
1816
1816
  function J() {
1817
1817
  }
1818
- var wn = function(e, n) {
1818
+ var An = function(e, n) {
1819
1819
  return n.value = null;
1820
1820
  };
1821
1821
  function ia(e, n) {
@@ -1824,19 +1824,19 @@ function Ga() {
1824
1824
  function oa(e, n) {
1825
1825
  return n < e ? -1 : e === n ? 0 : 1;
1826
1826
  }
1827
- function ge(e, n, r) {
1828
- return e = e instanceof mr ? new e.Collection(e) : e, e._ctx.error = new (r || TypeError)(n), e;
1827
+ function me(e, n, r) {
1828
+ return e = e instanceof yr ? new e.Collection(e) : e, e._ctx.error = new (r || TypeError)(n), e;
1829
1829
  }
1830
- function st(e) {
1830
+ function ot(e) {
1831
1831
  return new e.Collection(e, function() {
1832
- return gr("");
1832
+ return br("");
1833
1833
  }).limit(0);
1834
1834
  }
1835
- function Gt(e, n, r, a) {
1835
+ function Ut(e, n, r, a) {
1836
1836
  var i, o, u, f, p, m, E, h = r.length;
1837
1837
  if (!r.every(function(w) {
1838
1838
  return typeof w == "string";
1839
- })) return ge(e, ir);
1839
+ })) return me(e, cr);
1840
1840
  function O(w) {
1841
1841
  i = w === "next" ? function(y) {
1842
1842
  return y.toUpperCase();
@@ -1849,8 +1849,8 @@ function Ga() {
1849
1849
  }, u = w === "next" ? ia : oa;
1850
1850
  var S = r.map(function(y) {
1851
1851
  return { lower: o(y), upper: i(y) };
1852
- }).sort(function(y, A) {
1853
- return u(y.lower, A.lower);
1852
+ }).sort(function(y, P) {
1853
+ return u(y.lower, P.lower);
1854
1854
  });
1855
1855
  f = S.map(function(y) {
1856
1856
  return y.upper;
@@ -1859,25 +1859,25 @@ function Ga() {
1859
1859
  }), E = (m = w) === "next" ? "" : a;
1860
1860
  }
1861
1861
  O("next"), e = new e.Collection(e, function() {
1862
- return Te(f[0], p[h - 1] + a);
1862
+ return $e(f[0], p[h - 1] + a);
1863
1863
  }), e._ondirectionchange = function(w) {
1864
1864
  O(w);
1865
1865
  };
1866
1866
  var g = 0;
1867
1867
  return e._addAlgorithm(function(w, S, y) {
1868
- var A = w.key;
1869
- if (typeof A != "string") return !1;
1870
- var D = o(A);
1868
+ var P = w.key;
1869
+ if (typeof P != "string") return !1;
1870
+ var D = o(P);
1871
1871
  if (n(D, p, g)) return !0;
1872
1872
  for (var R = null, x = g; x < h; ++x) {
1873
1873
  var k = function($, T, N, j, C, B) {
1874
- for (var W = Math.min($.length, j.length), H = -1, Y = 0; Y < W; ++Y) {
1875
- var me = T[Y];
1876
- if (me !== j[Y]) return C($[Y], N[Y]) < 0 ? $.substr(0, Y) + N[Y] + N.substr(Y + 1) : C($[Y], j[Y]) < 0 ? $.substr(0, Y) + j[Y] + N.substr(Y + 1) : 0 <= H ? $.substr(0, H) + T[H] + N.substr(H + 1) : null;
1877
- C($[Y], me) < 0 && (H = Y);
1874
+ for (var W = Math.min($.length, j.length), z = -1, H = 0; H < W; ++H) {
1875
+ var be = T[H];
1876
+ if (be !== j[H]) return C($[H], N[H]) < 0 ? $.substr(0, H) + N[H] + N.substr(H + 1) : C($[H], j[H]) < 0 ? $.substr(0, H) + j[H] + N.substr(H + 1) : 0 <= z ? $.substr(0, z) + T[z] + N.substr(z + 1) : null;
1877
+ C($[H], be) < 0 && (z = H);
1878
1878
  }
1879
- return W < j.length && B === "next" ? $ + N.substr($.length) : W < $.length && B === "prev" ? $.substr(0, N.length) : H < 0 ? null : $.substr(0, H) + j[H] + N.substr(H + 1);
1880
- }(A, D, f[x], p[x], u, m);
1879
+ return W < j.length && B === "next" ? $ + N.substr($.length) : W < $.length && B === "prev" ? $.substr(0, N.length) : z < 0 ? null : $.substr(0, z) + j[z] + N.substr(z + 1);
1880
+ }(P, D, f[x], p[x], u, m);
1881
1881
  k === null && R === null ? g = x + 1 : (R === null || 0 < u(R, k)) && (R = k);
1882
1882
  }
1883
1883
  return S(R !== null ? function() {
@@ -1885,75 +1885,75 @@ function Ga() {
1885
1885
  } : y), !1;
1886
1886
  }), e;
1887
1887
  }
1888
- function Te(e, n, r, a) {
1888
+ function $e(e, n, r, a) {
1889
1889
  return { type: 2, lower: e, upper: n, lowerOpen: r, upperOpen: a };
1890
1890
  }
1891
- function gr(e) {
1891
+ function br(e) {
1892
1892
  return { type: 1, lower: e, upper: e };
1893
1893
  }
1894
- var mr = (Object.defineProperty(ue.prototype, "Collection", { get: function() {
1894
+ var yr = (Object.defineProperty(ce.prototype, "Collection", { get: function() {
1895
1895
  return this._ctx.table.db.Collection;
1896
- }, enumerable: !1, configurable: !0 }), ue.prototype.between = function(e, n, r, a) {
1896
+ }, enumerable: !1, configurable: !0 }), ce.prototype.between = function(e, n, r, a) {
1897
1897
  r = r !== !1, a = a === !0;
1898
1898
  try {
1899
- return 0 < this._cmp(e, n) || this._cmp(e, n) === 0 && (r || a) && (!r || !a) ? st(this) : new this.Collection(this, function() {
1900
- return Te(e, n, !r, !a);
1899
+ return 0 < this._cmp(e, n) || this._cmp(e, n) === 0 && (r || a) && (!r || !a) ? ot(this) : new this.Collection(this, function() {
1900
+ return $e(e, n, !r, !a);
1901
1901
  });
1902
1902
  } catch {
1903
- return ge(this, _e);
1903
+ return me(this, Pe);
1904
1904
  }
1905
- }, ue.prototype.equals = function(e) {
1906
- return e == null ? ge(this, _e) : new this.Collection(this, function() {
1907
- return gr(e);
1905
+ }, ce.prototype.equals = function(e) {
1906
+ return e == null ? me(this, Pe) : new this.Collection(this, function() {
1907
+ return br(e);
1908
1908
  });
1909
- }, ue.prototype.above = function(e) {
1910
- return e == null ? ge(this, _e) : new this.Collection(this, function() {
1911
- return Te(e, void 0, !0);
1909
+ }, ce.prototype.above = function(e) {
1910
+ return e == null ? me(this, Pe) : new this.Collection(this, function() {
1911
+ return $e(e, void 0, !0);
1912
1912
  });
1913
- }, ue.prototype.aboveOrEqual = function(e) {
1914
- return e == null ? ge(this, _e) : new this.Collection(this, function() {
1915
- return Te(e, void 0, !1);
1913
+ }, ce.prototype.aboveOrEqual = function(e) {
1914
+ return e == null ? me(this, Pe) : new this.Collection(this, function() {
1915
+ return $e(e, void 0, !1);
1916
1916
  });
1917
- }, ue.prototype.below = function(e) {
1918
- return e == null ? ge(this, _e) : new this.Collection(this, function() {
1919
- return Te(void 0, e, !1, !0);
1917
+ }, ce.prototype.below = function(e) {
1918
+ return e == null ? me(this, Pe) : new this.Collection(this, function() {
1919
+ return $e(void 0, e, !1, !0);
1920
1920
  });
1921
- }, ue.prototype.belowOrEqual = function(e) {
1922
- return e == null ? ge(this, _e) : new this.Collection(this, function() {
1923
- return Te(void 0, e);
1921
+ }, ce.prototype.belowOrEqual = function(e) {
1922
+ return e == null ? me(this, Pe) : new this.Collection(this, function() {
1923
+ return $e(void 0, e);
1924
1924
  });
1925
- }, ue.prototype.startsWith = function(e) {
1926
- return typeof e != "string" ? ge(this, ir) : this.between(e, e + ze, !0, !0);
1927
- }, ue.prototype.startsWithIgnoreCase = function(e) {
1928
- return e === "" ? this.startsWith(e) : Gt(this, function(n, r) {
1925
+ }, ce.prototype.startsWith = function(e) {
1926
+ return typeof e != "string" ? me(this, cr) : this.between(e, e + Qe, !0, !0);
1927
+ }, ce.prototype.startsWithIgnoreCase = function(e) {
1928
+ return e === "" ? this.startsWith(e) : Ut(this, function(n, r) {
1929
1929
  return n.indexOf(r[0]) === 0;
1930
- }, [e], ze);
1931
- }, ue.prototype.equalsIgnoreCase = function(e) {
1932
- return Gt(this, function(n, r) {
1930
+ }, [e], Qe);
1931
+ }, ce.prototype.equalsIgnoreCase = function(e) {
1932
+ return Ut(this, function(n, r) {
1933
1933
  return n === r[0];
1934
1934
  }, [e], "");
1935
- }, ue.prototype.anyOfIgnoreCase = function() {
1936
- var e = Oe.apply(Ze, arguments);
1937
- return e.length === 0 ? st(this) : Gt(this, function(n, r) {
1935
+ }, ce.prototype.anyOfIgnoreCase = function() {
1936
+ var e = Ae.apply(qe, arguments);
1937
+ return e.length === 0 ? ot(this) : Ut(this, function(n, r) {
1938
1938
  return r.indexOf(n) !== -1;
1939
1939
  }, e, "");
1940
- }, ue.prototype.startsWithAnyOfIgnoreCase = function() {
1941
- var e = Oe.apply(Ze, arguments);
1942
- return e.length === 0 ? st(this) : Gt(this, function(n, r) {
1940
+ }, ce.prototype.startsWithAnyOfIgnoreCase = function() {
1941
+ var e = Ae.apply(qe, arguments);
1942
+ return e.length === 0 ? ot(this) : Ut(this, function(n, r) {
1943
1943
  return r.some(function(a) {
1944
1944
  return n.indexOf(a) === 0;
1945
1945
  });
1946
- }, e, ze);
1947
- }, ue.prototype.anyOf = function() {
1948
- var e = this, n = Oe.apply(Ze, arguments), r = this._cmp;
1946
+ }, e, Qe);
1947
+ }, ce.prototype.anyOf = function() {
1948
+ var e = this, n = Ae.apply(qe, arguments), r = this._cmp;
1949
1949
  try {
1950
1950
  n.sort(r);
1951
1951
  } catch {
1952
- return ge(this, _e);
1952
+ return me(this, Pe);
1953
1953
  }
1954
- if (n.length === 0) return st(this);
1954
+ if (n.length === 0) return ot(this);
1955
1955
  var a = new this.Collection(this, function() {
1956
- return Te(n[0], n[n.length - 1]);
1956
+ return $e(n[0], n[n.length - 1]);
1957
1957
  });
1958
1958
  a._ondirectionchange = function(o) {
1959
1959
  r = o === "next" ? e._ascending : e._descending, n.sort(r);
@@ -1965,32 +1965,32 @@ function Ga() {
1965
1965
  o.continue(n[i]);
1966
1966
  }), !1);
1967
1967
  }), a;
1968
- }, ue.prototype.notEqual = function(e) {
1968
+ }, ce.prototype.notEqual = function(e) {
1969
1969
  return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
1970
- }, ue.prototype.noneOf = function() {
1971
- var e = Oe.apply(Ze, arguments);
1970
+ }, ce.prototype.noneOf = function() {
1971
+ var e = Ae.apply(qe, arguments);
1972
1972
  if (e.length === 0) return new this.Collection(this);
1973
1973
  try {
1974
1974
  e.sort(this._ascending);
1975
1975
  } catch {
1976
- return ge(this, _e);
1976
+ return me(this, Pe);
1977
1977
  }
1978
1978
  var n = e.reduce(function(r, a) {
1979
1979
  return r ? r.concat([[r[r.length - 1][1], a]]) : [[-1 / 0, a]];
1980
1980
  }, null);
1981
1981
  return n.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(n, { includeLowers: !1, includeUppers: !1 });
1982
- }, ue.prototype.inAnyRange = function(A, n) {
1982
+ }, ce.prototype.inAnyRange = function(P, n) {
1983
1983
  var r = this, a = this._cmp, i = this._ascending, o = this._descending, u = this._min, f = this._max;
1984
- if (A.length === 0) return st(this);
1985
- if (!A.every(function(D) {
1984
+ if (P.length === 0) return ot(this);
1985
+ if (!P.every(function(D) {
1986
1986
  return D[0] !== void 0 && D[1] !== void 0 && i(D[0], D[1]) <= 0;
1987
- })) return ge(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", K.InvalidArgument);
1987
+ })) return me(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", K.InvalidArgument);
1988
1988
  var p = !n || n.includeLowers !== !1, m = n && n.includeUppers === !0, E, h = i;
1989
1989
  function O(D, R) {
1990
1990
  return h(D[0], R[0]);
1991
1991
  }
1992
1992
  try {
1993
- (E = A.reduce(function(D, R) {
1993
+ (E = P.reduce(function(D, R) {
1994
1994
  for (var x = 0, k = D.length; x < k; ++x) {
1995
1995
  var $ = D[x];
1996
1996
  if (a(R[0], $[1]) < 0 && 0 < a(R[1], $[0])) {
@@ -2001,7 +2001,7 @@ function Ga() {
2001
2001
  return x === k && D.push(R), D;
2002
2002
  }, [])).sort(O);
2003
2003
  } catch {
2004
- return ge(this, _e);
2004
+ return me(this, Pe);
2005
2005
  }
2006
2006
  var g = 0, w = m ? function(D) {
2007
2007
  return 0 < i(D, E[g][1]);
@@ -2011,53 +2011,53 @@ function Ga() {
2011
2011
  return 0 < o(D, E[g][0]);
2012
2012
  } : function(D) {
2013
2013
  return 0 <= o(D, E[g][0]);
2014
- }, y = w, A = new this.Collection(this, function() {
2015
- return Te(E[0][0], E[E.length - 1][1], !p, !m);
2014
+ }, y = w, P = new this.Collection(this, function() {
2015
+ return $e(E[0][0], E[E.length - 1][1], !p, !m);
2016
2016
  });
2017
- return A._ondirectionchange = function(D) {
2017
+ return P._ondirectionchange = function(D) {
2018
2018
  h = D === "next" ? (y = w, i) : (y = S, o), E.sort(O);
2019
- }, A._addAlgorithm(function(D, R, x) {
2019
+ }, P._addAlgorithm(function(D, R, x) {
2020
2020
  for (var k, $ = D.key; y($); ) if (++g === E.length) return R(x), !1;
2021
2021
  return !w(k = $) && !S(k) || (r._cmp($, E[g][1]) === 0 || r._cmp($, E[g][0]) === 0 || R(function() {
2022
2022
  h === i ? D.continue(E[g][0]) : D.continue(E[g][1]);
2023
2023
  }), !1);
2024
- }), A;
2025
- }, ue.prototype.startsWithAnyOf = function() {
2026
- var e = Oe.apply(Ze, arguments);
2024
+ }), P;
2025
+ }, ce.prototype.startsWithAnyOf = function() {
2026
+ var e = Ae.apply(qe, arguments);
2027
2027
  return e.every(function(n) {
2028
2028
  return typeof n == "string";
2029
- }) ? e.length === 0 ? st(this) : this.inAnyRange(e.map(function(n) {
2030
- return [n, n + ze];
2031
- })) : ge(this, "startsWithAnyOf() only works with strings");
2032
- }, ue);
2033
- function ue() {
2029
+ }) ? e.length === 0 ? ot(this) : this.inAnyRange(e.map(function(n) {
2030
+ return [n, n + Qe];
2031
+ })) : me(this, "startsWithAnyOf() only works with strings");
2032
+ }, ce);
2033
+ function ce() {
2034
2034
  }
2035
- function we(e) {
2035
+ function Se(e) {
2036
2036
  return te(function(n) {
2037
- return bt(n), e(n.target.error), !1;
2037
+ return vt(n), e(n.target.error), !1;
2038
2038
  });
2039
2039
  }
2040
- function bt(e) {
2040
+ function vt(e) {
2041
2041
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
2042
2042
  }
2043
- var yt = "storagemutated", En = "x-storagemutated-1", Ne = pt(null, yt), ca = (Ee.prototype._lock = function() {
2044
- return ot(!G.global), ++this._reculock, this._reculock !== 1 || G.global || (G.lockOwnerFor = this), this;
2045
- }, Ee.prototype._unlock = function() {
2046
- if (ot(!G.global), --this._reculock == 0) for (G.global || (G.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
2043
+ var wt = "storagemutated", Pn = "x-storagemutated-1", je = mt(null, wt), ca = (Oe.prototype._lock = function() {
2044
+ return ge(!G.global), ++this._reculock, this._reculock !== 1 || G.global || (G.lockOwnerFor = this), this;
2045
+ }, Oe.prototype._unlock = function() {
2046
+ if (ge(!G.global), --this._reculock == 0) for (G.global || (G.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
2047
2047
  var e = this._blockedFuncs.shift();
2048
2048
  try {
2049
- Ue(e[1], e[0]);
2049
+ Ye(e[1], e[0]);
2050
2050
  } catch {
2051
2051
  }
2052
2052
  }
2053
2053
  return this;
2054
- }, Ee.prototype._locked = function() {
2054
+ }, Oe.prototype._locked = function() {
2055
2055
  return this._reculock && G.lockOwnerFor !== this;
2056
- }, Ee.prototype.create = function(e) {
2056
+ }, Oe.prototype.create = function(e) {
2057
2057
  var n = this;
2058
2058
  if (!this.mode) return this;
2059
2059
  var r = this.db.idbdb, a = this.db._state.dbOpenError;
2060
- if (ot(!this.idbtrans), !e && !r) switch (a && a.name) {
2060
+ if (ge(!this.idbtrans), !e && !r) switch (a && a.name) {
2061
2061
  case "DatabaseClosedError":
2062
2062
  throw new K.DatabaseClosed(a);
2063
2063
  case "MissingAPIError":
@@ -2066,23 +2066,23 @@ function Ga() {
2066
2066
  throw new K.OpenFailed(a);
2067
2067
  }
2068
2068
  if (!this.active) throw new K.TransactionInactive();
2069
- return ot(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || r).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = te(function(i) {
2070
- bt(i), n._reject(e.error);
2069
+ return ge(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || r).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = te(function(i) {
2070
+ vt(i), n._reject(e.error);
2071
2071
  }), e.onabort = te(function(i) {
2072
- bt(i), n.active && n._reject(new K.Abort(e.error)), n.active = !1, n.on("abort").fire(i);
2072
+ vt(i), n.active && n._reject(new K.Abort(e.error)), n.active = !1, n.on("abort").fire(i);
2073
2073
  }), e.oncomplete = te(function() {
2074
- n.active = !1, n._resolve(), "mutatedParts" in e && Ne.storagemutated.fire(e.mutatedParts);
2074
+ n.active = !1, n._resolve(), "mutatedParts" in e && je.storagemutated.fire(e.mutatedParts);
2075
2075
  }), this;
2076
- }, Ee.prototype._promise = function(e, n, r) {
2076
+ }, Oe.prototype._promise = function(e, n, r) {
2077
2077
  var a = this;
2078
- if (e === "readwrite" && this.mode !== "readwrite") return ae(new K.ReadOnly("Transaction is readonly"));
2079
- if (!this.active) return ae(new K.TransactionInactive());
2078
+ if (e === "readwrite" && this.mode !== "readwrite") return se(new K.ReadOnly("Transaction is readonly"));
2079
+ if (!this.active) return se(new K.TransactionInactive());
2080
2080
  if (this._locked()) return new M(function(o, u) {
2081
2081
  a._blockedFuncs.push([function() {
2082
2082
  a._promise(e, n, r).then(o, u);
2083
2083
  }, G]);
2084
2084
  });
2085
- if (r) return xe(function() {
2085
+ if (r) return Te(function() {
2086
2086
  var o = new M(function(u, f) {
2087
2087
  a._lock();
2088
2088
  var p = n(u, f, a);
@@ -2097,9 +2097,9 @@ function Ga() {
2097
2097
  f && f.then && f.then(o, u);
2098
2098
  });
2099
2099
  return i._lib = !0, i;
2100
- }, Ee.prototype._root = function() {
2100
+ }, Oe.prototype._root = function() {
2101
2101
  return this.parent ? this.parent._root() : this;
2102
- }, Ee.prototype.waitFor = function(e) {
2102
+ }, Oe.prototype.waitFor = function(e) {
2103
2103
  var n, r = this._root(), a = M.resolve(e);
2104
2104
  r._waitingFor ? r._waitingFor = r._waitingFor.then(function() {
2105
2105
  return a;
@@ -2117,24 +2117,24 @@ function Ga() {
2117
2117
  r._waitingFor === i && (r._waitingFor = null);
2118
2118
  });
2119
2119
  });
2120
- }, Ee.prototype.abort = function() {
2120
+ }, Oe.prototype.abort = function() {
2121
2121
  this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new K.Abort()));
2122
- }, Ee.prototype.table = function(e) {
2122
+ }, Oe.prototype.table = function(e) {
2123
2123
  var n = this._memoizedTables || (this._memoizedTables = {});
2124
2124
  if (Q(n, e)) return n[e];
2125
2125
  var r = this.schema[e];
2126
2126
  if (!r) throw new K.NotFound("Table " + e + " not part of transaction");
2127
2127
  return r = new this.db.Table(e, r, this), r.core = this.db.core.table(e), n[e] = r;
2128
- }, Ee);
2129
- function Ee() {
2128
+ }, Oe);
2129
+ function Oe() {
2130
2130
  }
2131
- function Sn(e, n, r, a, i, o, u) {
2132
- return { name: e, keyPath: n, unique: r, multi: a, auto: i, compound: o, src: (r && !u ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + br(n) };
2131
+ function Dn(e, n, r, a, i, o, u) {
2132
+ return { name: e, keyPath: n, unique: r, multi: a, auto: i, compound: o, src: (r && !u ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + vr(n) };
2133
2133
  }
2134
- function br(e) {
2134
+ function vr(e) {
2135
2135
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
2136
2136
  }
2137
- function On(e, n, r) {
2137
+ function Rn(e, n, r) {
2138
2138
  return { name: e, primKey: n, indexes: r, mappedClass: null, idxByName: (a = function(i) {
2139
2139
  return [i.name, i];
2140
2140
  }, r.reduce(function(i, o, u) {
@@ -2142,33 +2142,33 @@ function Ga() {
2142
2142
  }, {})) };
2143
2143
  var a;
2144
2144
  }
2145
- var vt = function(e) {
2145
+ var Et = function(e) {
2146
2146
  try {
2147
- return e.only([[]]), vt = function() {
2147
+ return e.only([[]]), Et = function() {
2148
2148
  return [[]];
2149
2149
  }, [[]];
2150
2150
  } catch {
2151
- return vt = function() {
2152
- return ze;
2153
- }, ze;
2151
+ return Et = function() {
2152
+ return Qe;
2153
+ }, Qe;
2154
2154
  }
2155
2155
  };
2156
- function _n(e) {
2156
+ function xn(e) {
2157
2157
  return e == null ? function() {
2158
2158
  } : typeof e == "string" ? (n = e).split(".").length === 1 ? function(r) {
2159
2159
  return r[n];
2160
2160
  } : function(r) {
2161
- return Se(r, n);
2161
+ return ve(r, n);
2162
2162
  } : function(r) {
2163
- return Se(r, e);
2163
+ return ve(r, e);
2164
2164
  };
2165
2165
  var n;
2166
2166
  }
2167
- function yr(e) {
2167
+ function wr(e) {
2168
2168
  return [].slice.call(e);
2169
2169
  }
2170
2170
  var ua = 0;
2171
- function wt(e) {
2171
+ function St(e) {
2172
2172
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
2173
2173
  }
2174
2174
  function la(e, n, p) {
@@ -2181,75 +2181,75 @@ function Ga() {
2181
2181
  function i(O) {
2182
2182
  var g, w = O.name;
2183
2183
  return { name: w, schema: O, mutate: function(S) {
2184
- var y = S.trans, A = S.type, D = S.keys, R = S.values, x = S.range;
2184
+ var y = S.trans, P = S.type, D = S.keys, R = S.values, x = S.range;
2185
2185
  return new Promise(function(k, $) {
2186
2186
  k = te(k);
2187
- var T = y.objectStore(w), N = T.keyPath == null, j = A === "put" || A === "add";
2188
- if (!j && A !== "delete" && A !== "deleteRange") throw new Error("Invalid operation type: " + A);
2187
+ var T = y.objectStore(w), N = T.keyPath == null, j = P === "put" || P === "add";
2188
+ if (!j && P !== "delete" && P !== "deleteRange") throw new Error("Invalid operation type: " + P);
2189
2189
  var C, B = (D || R || { length: 1 }).length;
2190
2190
  if (D && R && D.length !== R.length) throw new Error("Given keys array must have same length as given values array.");
2191
2191
  if (B === 0) return k({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
2192
- function W(he) {
2193
- ++me, bt(he);
2192
+ function W(pe) {
2193
+ ++be, vt(pe);
2194
2194
  }
2195
- var H = [], Y = [], me = 0;
2196
- if (A === "deleteRange") {
2197
- if (x.type === 4) return k({ numFailures: me, failures: Y, results: [], lastResult: void 0 });
2198
- x.type === 3 ? H.push(C = T.clear()) : H.push(C = T.delete(a(x)));
2195
+ var z = [], H = [], be = 0;
2196
+ if (P === "deleteRange") {
2197
+ if (x.type === 4) return k({ numFailures: be, failures: H, results: [], lastResult: void 0 });
2198
+ x.type === 3 ? z.push(C = T.clear()) : z.push(C = T.delete(a(x)));
2199
2199
  } else {
2200
2200
  var N = j ? N ? [R, D] : [R, null] : [D, null], F = N[0], de = N[1];
2201
- if (j) for (var fe = 0; fe < B; ++fe) H.push(C = de && de[fe] !== void 0 ? T[A](F[fe], de[fe]) : T[A](F[fe])), C.onerror = W;
2202
- else for (fe = 0; fe < B; ++fe) H.push(C = T[A](F[fe])), C.onerror = W;
2201
+ if (j) for (var fe = 0; fe < B; ++fe) z.push(C = de && de[fe] !== void 0 ? T[P](F[fe], de[fe]) : T[P](F[fe])), C.onerror = W;
2202
+ else for (fe = 0; fe < B; ++fe) z.push(C = T[P](F[fe])), C.onerror = W;
2203
2203
  }
2204
- function Vt(he) {
2205
- he = he.target.result, H.forEach(function(Xe, Fn) {
2206
- return Xe.error != null && (Y[Fn] = Xe.error);
2207
- }), k({ numFailures: me, failures: Y, results: A === "delete" ? D : H.map(function(Xe) {
2208
- return Xe.result;
2209
- }), lastResult: he });
2204
+ function rn(pe) {
2205
+ pe = pe.target.result, z.forEach(function(Ve, Yn) {
2206
+ return Ve.error != null && (H[Yn] = Ve.error);
2207
+ }), k({ numFailures: be, failures: H, results: P === "delete" ? D : z.map(function(Ve) {
2208
+ return Ve.result;
2209
+ }), lastResult: pe });
2210
2210
  }
2211
- C.onerror = function(he) {
2212
- W(he), Vt(he);
2213
- }, C.onsuccess = Vt;
2211
+ C.onerror = function(pe) {
2212
+ W(pe), rn(pe);
2213
+ }, C.onsuccess = rn;
2214
2214
  });
2215
2215
  }, getMany: function(S) {
2216
- var y = S.trans, A = S.keys;
2216
+ var y = S.trans, P = S.keys;
2217
2217
  return new Promise(function(D, R) {
2218
2218
  D = te(D);
2219
- for (var x, k = y.objectStore(w), $ = A.length, T = new Array($), N = 0, j = 0, C = function(H) {
2220
- H = H.target, T[H._pos] = H.result, ++j === N && D(T);
2221
- }, B = we(R), W = 0; W < $; ++W) A[W] != null && ((x = k.get(A[W]))._pos = W, x.onsuccess = C, x.onerror = B, ++N);
2219
+ for (var x, k = y.objectStore(w), $ = P.length, T = new Array($), N = 0, j = 0, C = function(z) {
2220
+ z = z.target, T[z._pos] = z.result, ++j === N && D(T);
2221
+ }, B = Se(R), W = 0; W < $; ++W) P[W] != null && ((x = k.get(P[W]))._pos = W, x.onsuccess = C, x.onerror = B, ++N);
2222
2222
  N === 0 && D(T);
2223
2223
  });
2224
2224
  }, get: function(S) {
2225
- var y = S.trans, A = S.key;
2225
+ var y = S.trans, P = S.key;
2226
2226
  return new Promise(function(D, R) {
2227
2227
  D = te(D);
2228
- var x = y.objectStore(w).get(A);
2228
+ var x = y.objectStore(w).get(P);
2229
2229
  x.onsuccess = function(k) {
2230
2230
  return D(k.target.result);
2231
- }, x.onerror = we(R);
2231
+ }, x.onerror = Se(R);
2232
2232
  });
2233
2233
  }, query: (g = m, function(S) {
2234
- return new Promise(function(y, A) {
2234
+ return new Promise(function(y, P) {
2235
2235
  y = te(y);
2236
2236
  var D, R, x, N = S.trans, k = S.values, $ = S.limit, C = S.query, T = $ === 1 / 0 ? void 0 : $, j = C.index, C = C.range, N = N.objectStore(w), j = j.isPrimaryKey ? N : N.index(j.name), C = a(C);
2237
2237
  if ($ === 0) return y({ result: [] });
2238
2238
  g ? ((T = k ? j.getAll(C, T) : j.getAllKeys(C, T)).onsuccess = function(B) {
2239
2239
  return y({ result: B.target.result });
2240
- }, T.onerror = we(A)) : (D = 0, R = !k && "openKeyCursor" in j ? j.openKeyCursor(C) : j.openCursor(C), x = [], R.onsuccess = function(B) {
2240
+ }, T.onerror = Se(P)) : (D = 0, R = !k && "openKeyCursor" in j ? j.openKeyCursor(C) : j.openCursor(C), x = [], R.onsuccess = function(B) {
2241
2241
  var W = R.result;
2242
2242
  return W ? (x.push(k ? W.value : W.primaryKey), ++D === $ ? y({ result: x }) : void W.continue()) : y({ result: x });
2243
- }, R.onerror = we(A));
2243
+ }, R.onerror = Se(P));
2244
2244
  });
2245
2245
  }), openCursor: function(S) {
2246
- var y = S.trans, A = S.values, D = S.query, R = S.reverse, x = S.unique;
2246
+ var y = S.trans, P = S.values, D = S.query, R = S.reverse, x = S.unique;
2247
2247
  return new Promise(function(k, $) {
2248
2248
  k = te(k);
2249
- var j = D.index, T = D.range, N = y.objectStore(w), N = j.isPrimaryKey ? N : N.index(j.name), j = R ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", C = !A && "openKeyCursor" in N ? N.openKeyCursor(a(T), j) : N.openCursor(a(T), j);
2250
- C.onerror = we($), C.onsuccess = te(function(B) {
2251
- var W, H, Y, me, F = C.result;
2252
- F ? (F.___id = ++ua, F.done = !1, W = F.continue.bind(F), H = (H = F.continuePrimaryKey) && H.bind(F), Y = F.advance.bind(F), me = function() {
2249
+ var j = D.index, T = D.range, N = y.objectStore(w), N = j.isPrimaryKey ? N : N.index(j.name), j = R ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", C = !P && "openKeyCursor" in N ? N.openKeyCursor(a(T), j) : N.openCursor(a(T), j);
2250
+ C.onerror = Se($), C.onsuccess = te(function(B) {
2251
+ var W, z, H, be, F = C.result;
2252
+ F ? (F.___id = ++ua, F.done = !1, W = F.continue.bind(F), z = (z = F.continuePrimaryKey) && z.bind(F), H = F.advance.bind(F), be = function() {
2253
2253
  throw new Error("Cursor not stopped");
2254
2254
  }, F.trans = y, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
2255
2255
  throw new Error("Cursor not started");
@@ -2264,53 +2264,53 @@ function Ga() {
2264
2264
  function fe() {
2265
2265
  if (C.result) try {
2266
2266
  de();
2267
- } catch (he) {
2268
- F.fail(he);
2267
+ } catch (pe) {
2268
+ F.fail(pe);
2269
2269
  }
2270
2270
  else F.done = !0, F.start = function() {
2271
2271
  throw new Error("Cursor behind last entry");
2272
2272
  }, F.stop();
2273
2273
  }
2274
- var Vt = new Promise(function(he, Xe) {
2275
- he = te(he), C.onerror = we(Xe), F.fail = Xe, F.stop = function(Fn) {
2276
- F.stop = F.continue = F.continuePrimaryKey = F.advance = me, he(Fn);
2274
+ var rn = new Promise(function(pe, Ve) {
2275
+ pe = te(pe), C.onerror = Se(Ve), F.fail = Ve, F.stop = function(Yn) {
2276
+ F.stop = F.continue = F.continuePrimaryKey = F.advance = be, pe(Yn);
2277
2277
  };
2278
2278
  });
2279
- return C.onsuccess = te(function(he) {
2279
+ return C.onsuccess = te(function(pe) {
2280
2280
  C.onsuccess = fe, fe();
2281
- }), F.continue = W, F.continuePrimaryKey = H, F.advance = Y, fe(), Vt;
2281
+ }), F.continue = W, F.continuePrimaryKey = z, F.advance = H, fe(), rn;
2282
2282
  }, k(F)) : k(null);
2283
2283
  }, $);
2284
2284
  });
2285
2285
  }, count: function(S) {
2286
- var y = S.query, A = S.trans, D = y.index, R = y.range;
2286
+ var y = S.query, P = S.trans, D = y.index, R = y.range;
2287
2287
  return new Promise(function(x, k) {
2288
- var $ = A.objectStore(w), T = D.isPrimaryKey ? $ : $.index(D.name), $ = a(R), T = $ ? T.count($) : T.count();
2288
+ var $ = P.objectStore(w), T = D.isPrimaryKey ? $ : $.index(D.name), $ = a(R), T = $ ? T.count($) : T.count();
2289
2289
  T.onsuccess = te(function(N) {
2290
2290
  return x(N.target.result);
2291
- }), T.onerror = we(k);
2291
+ }), T.onerror = Se(k);
2292
2292
  });
2293
2293
  } };
2294
2294
  }
2295
- var o, u, f, E = (u = p, f = yr((o = e).objectStoreNames), { schema: { name: o.name, tables: f.map(function(O) {
2295
+ var o, u, f, E = (u = p, f = wr((o = e).objectStoreNames), { schema: { name: o.name, tables: f.map(function(O) {
2296
2296
  return u.objectStore(O);
2297
2297
  }).map(function(O) {
2298
- var g = O.keyPath, y = O.autoIncrement, w = z(g), S = {}, y = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: g == null, compound: w, keyPath: g, autoIncrement: y, unique: !0, extractKey: _n(g) }, indexes: yr(O.indexNames).map(function(A) {
2299
- return O.index(A);
2298
+ var g = O.keyPath, y = O.autoIncrement, w = Y(g), S = {}, y = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: g == null, compound: w, keyPath: g, autoIncrement: y, unique: !0, extractKey: xn(g) }, indexes: wr(O.indexNames).map(function(P) {
2299
+ return O.index(P);
2300
2300
  }).map(function(x) {
2301
- var D = x.name, R = x.unique, k = x.multiEntry, x = x.keyPath, k = { name: D, compound: z(x), keyPath: x, unique: R, multiEntry: k, extractKey: _n(x) };
2302
- return S[wt(x)] = k;
2303
- }), getIndexByKeyPath: function(A) {
2304
- return S[wt(A)];
2301
+ var D = x.name, R = x.unique, k = x.multiEntry, x = x.keyPath, k = { name: D, compound: Y(x), keyPath: x, unique: R, multiEntry: k, extractKey: xn(x) };
2302
+ return S[St(x)] = k;
2303
+ }), getIndexByKeyPath: function(P) {
2304
+ return S[St(P)];
2305
2305
  } };
2306
- return S[":id"] = y.primaryKey, g != null && (S[wt(g)] = y.primaryKey), y;
2306
+ return S[":id"] = y.primaryKey, g != null && (S[St(g)] = y.primaryKey), y;
2307
2307
  }) }, hasGetAll: 0 < f.length && "getAll" in u.objectStore(f[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), p = E.schema, m = E.hasGetAll, E = p.tables.map(i), h = {};
2308
2308
  return E.forEach(function(O) {
2309
2309
  return h[O.name] = O;
2310
2310
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(O) {
2311
2311
  if (!h[O]) throw new Error("Table '".concat(O, "' not found"));
2312
2312
  return h[O];
2313
- }, MIN_KEY: -1 / 0, MAX_KEY: vt(n), schema: p };
2313
+ }, MIN_KEY: -1 / 0, MAX_KEY: Et(n), schema: p };
2314
2314
  }
2315
2315
  function da(e, n, r, a) {
2316
2316
  var i = r.IDBKeyRange;
@@ -2318,7 +2318,7 @@ function Ga() {
2318
2318
  return u = u.create, c(c({}, o), u(o));
2319
2319
  }, a)) };
2320
2320
  }
2321
- function Kt(e, a) {
2321
+ function zt(e, a) {
2322
2322
  var r = a.db, a = da(e._middlewares, r, e._deps, a);
2323
2323
  e.core = a.dbcore, e.tables.forEach(function(i) {
2324
2324
  var o = i.name;
@@ -2327,22 +2327,22 @@ function Ga() {
2327
2327
  }) && (i.core = e.core.table(o), e[o] instanceof e.Table && (e[o].core = i.core));
2328
2328
  });
2329
2329
  }
2330
- function Lt(e, n, r, a) {
2330
+ function Ht(e, n, r, a) {
2331
2331
  r.forEach(function(i) {
2332
2332
  var o = a[i];
2333
2333
  n.forEach(function(u) {
2334
2334
  var f = function p(m, E) {
2335
- return Fr(m, E) || (m = ie(m)) && p(m, E);
2335
+ return Pt(m, E) || (m = ue(m)) && p(m, E);
2336
2336
  }(u, i);
2337
- (!f || "value" in f && f.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? oe(u, i, { get: function() {
2337
+ (!f || "value" in f && f.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? ae(u, i, { get: function() {
2338
2338
  return this.table(i);
2339
2339
  }, set: function(p) {
2340
- je(this, i, { value: p, writable: !0, configurable: !0, enumerable: !0 });
2340
+ Ie(this, i, { value: p, writable: !0, configurable: !0, enumerable: !0 });
2341
2341
  } }) : u[i] = new e.Table(i, o));
2342
2342
  });
2343
2343
  });
2344
2344
  }
2345
- function An(e, n) {
2345
+ function In(e, n) {
2346
2346
  n.forEach(function(r) {
2347
2347
  for (var a in r) r[a] instanceof e.Table && delete r[a];
2348
2348
  });
@@ -2352,89 +2352,89 @@ function Ga() {
2352
2352
  }
2353
2353
  function ha(e, n, r, a) {
2354
2354
  var i = e._dbSchema;
2355
- r.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = On("$meta", wr("")[0], []), e._storeNames.push("$meta"));
2355
+ r.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = Rn("$meta", Sr("")[0], []), e._storeNames.push("$meta"));
2356
2356
  var o = e._createTransaction("readwrite", e._storeNames, i);
2357
2357
  o.create(r), o._completion.catch(a);
2358
2358
  var u = o._reject.bind(o), f = G.transless || G;
2359
- xe(function() {
2360
- return G.trans = o, G.transless = f, n !== 0 ? (Kt(e, r), m = n, ((p = o).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(E) {
2359
+ Te(function() {
2360
+ return G.trans = o, G.transless = f, n !== 0 ? (zt(e, r), m = n, ((p = o).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(E) {
2361
2361
  return E ?? m;
2362
2362
  }) : M.resolve(m)).then(function(E) {
2363
- return O = E, g = o, w = r, S = [], E = (h = e)._versions, y = h._dbSchema = Wt(0, h.idbdb, w), (E = E.filter(function(A) {
2364
- return A._cfg.version >= O;
2365
- })).length !== 0 ? (E.forEach(function(A) {
2363
+ return O = E, g = o, w = r, S = [], E = (h = e)._versions, y = h._dbSchema = Qt(0, h.idbdb, w), (E = E.filter(function(P) {
2364
+ return P._cfg.version >= O;
2365
+ })).length !== 0 ? (E.forEach(function(P) {
2366
2366
  S.push(function() {
2367
- var D = y, R = A._cfg.dbschema;
2368
- Ut(h, D, w), Ut(h, R, w), y = h._dbSchema = R;
2369
- var x = Pn(D, R);
2367
+ var D = y, R = P._cfg.dbschema;
2368
+ Xt(h, D, w), Xt(h, R, w), y = h._dbSchema = R;
2369
+ var x = kn(D, R);
2370
2370
  x.add.forEach(function(j) {
2371
- Dn(w, j[0], j[1].primKey, j[1].indexes);
2371
+ Tn(w, j[0], j[1].primKey, j[1].indexes);
2372
2372
  }), x.change.forEach(function(j) {
2373
2373
  if (j.recreate) throw new K.Upgrade("Not yet support for changing primary key");
2374
2374
  var C = w.objectStore(j.name);
2375
2375
  j.add.forEach(function(B) {
2376
- return Ft(C, B);
2376
+ return Yt(C, B);
2377
2377
  }), j.change.forEach(function(B) {
2378
- C.deleteIndex(B.name), Ft(C, B);
2378
+ C.deleteIndex(B.name), Yt(C, B);
2379
2379
  }), j.del.forEach(function(B) {
2380
2380
  return C.deleteIndex(B);
2381
2381
  });
2382
2382
  });
2383
- var k = A._cfg.contentUpgrade;
2384
- if (k && A._cfg.version > O) {
2385
- Kt(h, w), g._memoizedTables = {};
2386
- var $ = Xn(R);
2383
+ var k = P._cfg.contentUpgrade;
2384
+ if (k && P._cfg.version > O) {
2385
+ zt(h, w), g._memoizedTables = {};
2386
+ var $ = xt(R);
2387
2387
  x.del.forEach(function(j) {
2388
2388
  $[j] = D[j];
2389
- }), An(h, [h.Transaction.prototype]), Lt(h, [h.Transaction.prototype], I($), $), g.schema = $;
2390
- var T, N = an(k);
2391
- return N && nt(), x = M.follow(function() {
2389
+ }), In(h, [h.Transaction.prototype]), Ht(h, [h.Transaction.prototype], I($), $), g.schema = $;
2390
+ var T, N = ln(k);
2391
+ return N && at(), x = M.follow(function() {
2392
2392
  var j;
2393
- (T = k(g)) && N && (j = Ie.bind(null, null), T.then(j, j));
2393
+ (T = k(g)) && N && (j = Ne.bind(null, null), T.then(j, j));
2394
2394
  }), T && typeof T.then == "function" ? M.resolve(T) : x.then(function() {
2395
2395
  return T;
2396
2396
  });
2397
2397
  }
2398
2398
  }), S.push(function(D) {
2399
- var R, x, k = A._cfg.dbschema;
2399
+ var R, x, k = P._cfg.dbschema;
2400
2400
  R = k, x = D, [].slice.call(x.db.objectStoreNames).forEach(function($) {
2401
2401
  return R[$] == null && x.db.deleteObjectStore($);
2402
- }), An(h, [h.Transaction.prototype]), Lt(h, [h.Transaction.prototype], h._storeNames, h._dbSchema), g.schema = h._dbSchema;
2402
+ }), In(h, [h.Transaction.prototype]), Ht(h, [h.Transaction.prototype], h._storeNames, h._dbSchema), g.schema = h._dbSchema;
2403
2403
  }), S.push(function(D) {
2404
- h.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(h.idbdb.version / 10) === A._cfg.version ? (h.idbdb.deleteObjectStore("$meta"), delete h._dbSchema.$meta, h._storeNames = h._storeNames.filter(function(R) {
2404
+ h.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(h.idbdb.version / 10) === P._cfg.version ? (h.idbdb.deleteObjectStore("$meta"), delete h._dbSchema.$meta, h._storeNames = h._storeNames.filter(function(R) {
2405
2405
  return R !== "$meta";
2406
- })) : D.objectStore("$meta").put(A._cfg.version, "version"));
2406
+ })) : D.objectStore("$meta").put(P._cfg.version, "version"));
2407
2407
  });
2408
- }), function A() {
2409
- return S.length ? M.resolve(S.shift()(g.idbtrans)).then(A) : M.resolve();
2408
+ }), function P() {
2409
+ return S.length ? M.resolve(S.shift()(g.idbtrans)).then(P) : M.resolve();
2410
2410
  }().then(function() {
2411
- vr(y, w);
2411
+ Er(y, w);
2412
2412
  })) : M.resolve();
2413
2413
  var h, O, g, w, S, y;
2414
2414
  }).catch(u)) : (I(i).forEach(function(E) {
2415
- Dn(r, E, i[E].primKey, i[E].indexes);
2416
- }), Kt(e, r), void M.follow(function() {
2415
+ Tn(r, E, i[E].primKey, i[E].indexes);
2416
+ }), zt(e, r), void M.follow(function() {
2417
2417
  return e.on.populate.fire(o);
2418
2418
  }).catch(u));
2419
2419
  var p, m;
2420
2420
  });
2421
2421
  }
2422
2422
  function pa(e, n) {
2423
- vr(e._dbSchema, n), n.db.version % 10 != 0 || n.objectStoreNames.contains("$meta") || n.db.createObjectStore("$meta").add(Math.ceil(n.db.version / 10 - 1), "version");
2424
- var r = Wt(0, e.idbdb, n);
2425
- Ut(e, e._dbSchema, n);
2426
- for (var a = 0, i = Pn(r, e._dbSchema).change; a < i.length; a++) {
2423
+ Er(e._dbSchema, n), n.db.version % 10 != 0 || n.objectStoreNames.contains("$meta") || n.db.createObjectStore("$meta").add(Math.ceil(n.db.version / 10 - 1), "version");
2424
+ var r = Qt(0, e.idbdb, n);
2425
+ Xt(e, e._dbSchema, n);
2426
+ for (var a = 0, i = kn(r, e._dbSchema).change; a < i.length; a++) {
2427
2427
  var o = function(u) {
2428
2428
  if (u.change.length || u.recreate) return console.warn("Unable to patch indexes of table ".concat(u.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
2429
2429
  var f = n.objectStore(u.name);
2430
2430
  u.add.forEach(function(p) {
2431
- ve && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(p.src)), Ft(f, p);
2431
+ Ee && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(p.src)), Yt(f, p);
2432
2432
  });
2433
2433
  }(i[a]);
2434
2434
  if (typeof o == "object") return o.value;
2435
2435
  }
2436
2436
  }
2437
- function Pn(e, n) {
2437
+ function kn(e, n) {
2438
2438
  var r, a = { del: [], add: [], change: [] };
2439
2439
  for (r in e) n[r] || a.del.push(r);
2440
2440
  for (r in n) {
@@ -2455,83 +2455,83 @@ function Ga() {
2455
2455
  }
2456
2456
  return a;
2457
2457
  }
2458
- function Dn(e, n, r, a) {
2458
+ function Tn(e, n, r, a) {
2459
2459
  var i = e.db.createObjectStore(n, r.keyPath ? { keyPath: r.keyPath, autoIncrement: r.auto } : { autoIncrement: r.auto });
2460
2460
  return a.forEach(function(o) {
2461
- return Ft(i, o);
2461
+ return Yt(i, o);
2462
2462
  }), i;
2463
2463
  }
2464
- function vr(e, n) {
2464
+ function Er(e, n) {
2465
2465
  I(e).forEach(function(r) {
2466
- n.db.objectStoreNames.contains(r) || (ve && console.debug("Dexie: Creating missing table", r), Dn(n, r, e[r].primKey, e[r].indexes));
2466
+ n.db.objectStoreNames.contains(r) || (Ee && console.debug("Dexie: Creating missing table", r), Tn(n, r, e[r].primKey, e[r].indexes));
2467
2467
  });
2468
2468
  }
2469
- function Ft(e, n) {
2469
+ function Yt(e, n) {
2470
2470
  e.createIndex(n.name, n.keyPath, { unique: n.unique, multiEntry: n.multi });
2471
2471
  }
2472
- function Wt(e, n, r) {
2472
+ function Qt(e, n, r) {
2473
2473
  var a = {};
2474
- return _t(n.objectStoreNames, 0).forEach(function(i) {
2475
- for (var o = r.objectStore(i), u = Sn(br(m = o.keyPath), m || "", !0, !1, !!o.autoIncrement, m && typeof m != "string", !0), f = [], p = 0; p < o.indexNames.length; ++p) {
2476
- var E = o.index(o.indexNames[p]), m = E.keyPath, E = Sn(E.name, m, !!E.unique, !!E.multiEntry, !1, m && typeof m != "string", !1);
2474
+ return Ge(n.objectStoreNames, 0).forEach(function(i) {
2475
+ for (var o = r.objectStore(i), u = Dn(vr(m = o.keyPath), m || "", !0, !1, !!o.autoIncrement, m && typeof m != "string", !0), f = [], p = 0; p < o.indexNames.length; ++p) {
2476
+ var E = o.index(o.indexNames[p]), m = E.keyPath, E = Dn(E.name, m, !!E.unique, !!E.multiEntry, !1, m && typeof m != "string", !1);
2477
2477
  f.push(E);
2478
2478
  }
2479
- a[i] = On(i, u, f);
2479
+ a[i] = Rn(i, u, f);
2480
2480
  }), a;
2481
2481
  }
2482
- function Ut(e, n, r) {
2482
+ function Xt(e, n, r) {
2483
2483
  for (var a = r.db.objectStoreNames, i = 0; i < a.length; ++i) {
2484
2484
  var o = a[i], u = r.objectStore(o);
2485
2485
  e._hasGetAll = "getAll" in u;
2486
2486
  for (var f = 0; f < u.indexNames.length; ++f) {
2487
- var p = u.indexNames[f], m = u.index(p).keyPath, E = typeof m == "string" ? m : "[" + _t(m).join("+") + "]";
2487
+ var p = u.indexNames[f], m = u.index(p).keyPath, E = typeof m == "string" ? m : "[" + Ge(m).join("+") + "]";
2488
2488
  !n[o] || (m = n[o].idxByName[E]) && (m.name = p, delete n[o].idxByName[E], n[o].idxByName[p] = m);
2489
2489
  }
2490
2490
  }
2491
- typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && P.WorkerGlobalScope && P instanceof P.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2491
+ typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && A.WorkerGlobalScope && A instanceof A.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2492
2492
  }
2493
- function wr(e) {
2493
+ function Sr(e) {
2494
2494
  return e.split(",").map(function(n, r) {
2495
2495
  var a = (n = n.trim()).replace(/([&*]|\+\+)/g, ""), i = /^\[/.test(a) ? a.match(/^\[(.*)\]$/)[1].split("+") : a;
2496
- return Sn(a, i || null, /\&/.test(n), /\*/.test(n), /\+\+/.test(n), z(i), r === 0);
2496
+ return Dn(a, i || null, /\&/.test(n), /\*/.test(n), /\+\+/.test(n), Y(i), r === 0);
2497
2497
  });
2498
2498
  }
2499
- var ga = (zt.prototype._parseStoresSpec = function(e, n) {
2499
+ var ga = (Jt.prototype._parseStoresSpec = function(e, n) {
2500
2500
  I(e).forEach(function(r) {
2501
2501
  if (e[r] !== null) {
2502
- var a = wr(e[r]), i = a.shift();
2502
+ var a = Sr(e[r]), i = a.shift();
2503
2503
  if (i.unique = !0, i.multi) throw new K.Schema("Primary key cannot be multi-valued");
2504
2504
  a.forEach(function(o) {
2505
2505
  if (o.auto) throw new K.Schema("Only primary key can be marked as autoIncrement (++)");
2506
2506
  if (!o.keyPath) throw new K.Schema("Index must have a name and cannot be an empty string");
2507
- }), n[r] = On(r, i, a);
2507
+ }), n[r] = Rn(r, i, a);
2508
2508
  }
2509
2509
  });
2510
- }, zt.prototype.stores = function(r) {
2510
+ }, Jt.prototype.stores = function(r) {
2511
2511
  var n = this.db;
2512
2512
  this._cfg.storesSource = this._cfg.storesSource ? ne(this._cfg.storesSource, r) : r;
2513
2513
  var r = n._versions, a = {}, i = {};
2514
2514
  return r.forEach(function(o) {
2515
2515
  ne(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
2516
- }), n._dbSchema = i, An(n, [n._allTables, n, n.Transaction.prototype]), Lt(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables], I(i), i), n._storeNames = I(i), this;
2517
- }, zt.prototype.upgrade = function(e) {
2518
- return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || V, e), this;
2519
- }, zt);
2520
- function zt() {
2516
+ }), n._dbSchema = i, In(n, [n._allTables, n, n.Transaction.prototype]), Ht(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables], I(i), i), n._storeNames = I(i), this;
2517
+ }, Jt.prototype.upgrade = function(e) {
2518
+ return this._cfg.contentUpgrade = fn(this._cfg.contentUpgrade || V, e), this;
2519
+ }, Jt);
2520
+ function Jt() {
2521
2521
  }
2522
- function Rn(e, n) {
2522
+ function Nn(e, n) {
2523
2523
  var r = e._dbNamesDB;
2524
- return r || (r = e._dbNamesDB = new Ae($t, { addons: [], indexedDB: e, IDBKeyRange: n })).version(1).stores({ dbnames: "name" }), r.table("dbnames");
2524
+ return r || (r = e._dbNamesDB = new De(Kt, { addons: [], indexedDB: e, IDBKeyRange: n })).version(1).stores({ dbnames: "name" }), r.table("dbnames");
2525
2525
  }
2526
- function xn(e) {
2526
+ function Cn(e) {
2527
2527
  return e && typeof e.databases == "function";
2528
2528
  }
2529
- function In(e) {
2530
- return xe(function() {
2529
+ function $n(e) {
2530
+ return Te(function() {
2531
2531
  return G.letThrough = !0, e();
2532
2532
  });
2533
2533
  }
2534
- function kn(e) {
2534
+ function jn(e) {
2535
2535
  return !("from" in e);
2536
2536
  }
2537
2537
  var le = function(e, n) {
@@ -2541,34 +2541,34 @@ function Ga() {
2541
2541
  }
2542
2542
  ne(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? n : e } : { d: 0 });
2543
2543
  };
2544
- function Et(e, n, r) {
2544
+ function Ot(e, n, r) {
2545
2545
  var a = X(n, r);
2546
2546
  if (!isNaN(a)) {
2547
2547
  if (0 < a) throw RangeError();
2548
- if (kn(e)) return ne(e, { from: n, to: r, d: 1 });
2548
+ if (jn(e)) return ne(e, { from: n, to: r, d: 1 });
2549
2549
  var i = e.l, a = e.r;
2550
- if (X(r, e.from) < 0) return i ? Et(i, n, r) : e.l = { from: n, to: r, d: 1, l: null, r: null }, Sr(e);
2551
- if (0 < X(n, e.to)) return a ? Et(a, n, r) : e.r = { from: n, to: r, d: 1, l: null, r: null }, Sr(e);
2552
- X(n, e.from) < 0 && (e.from = n, e.l = null, e.d = a ? a.d + 1 : 1), 0 < X(r, e.to) && (e.to = r, e.r = null, e.d = e.l ? e.l.d + 1 : 1), r = !e.r, i && !e.l && St(e, i), a && r && St(e, a);
2550
+ if (X(r, e.from) < 0) return i ? Ot(i, n, r) : e.l = { from: n, to: r, d: 1, l: null, r: null }, _r(e);
2551
+ if (0 < X(n, e.to)) return a ? Ot(a, n, r) : e.r = { from: n, to: r, d: 1, l: null, r: null }, _r(e);
2552
+ X(n, e.from) < 0 && (e.from = n, e.l = null, e.d = a ? a.d + 1 : 1), 0 < X(r, e.to) && (e.to = r, e.r = null, e.d = e.l ? e.l.d + 1 : 1), r = !e.r, i && !e.l && _t(e, i), a && r && _t(e, a);
2553
2553
  }
2554
2554
  }
2555
- function St(e, n) {
2556
- kn(n) || function r(a, p) {
2555
+ function _t(e, n) {
2556
+ jn(n) || function r(a, p) {
2557
2557
  var o = p.from, u = p.to, f = p.l, p = p.r;
2558
- Et(a, o, u), f && r(a, f), p && r(a, p);
2558
+ Ot(a, o, u), f && r(a, f), p && r(a, p);
2559
2559
  }(e, n);
2560
2560
  }
2561
- function Er(e, n) {
2562
- var r = Ht(n), a = r.next();
2561
+ function Or(e, n) {
2562
+ var r = Zt(n), a = r.next();
2563
2563
  if (a.done) return !1;
2564
- for (var i = a.value, o = Ht(e), u = o.next(i.from), f = u.value; !a.done && !u.done; ) {
2564
+ for (var i = a.value, o = Zt(e), u = o.next(i.from), f = u.value; !a.done && !u.done; ) {
2565
2565
  if (X(f.from, i.to) <= 0 && 0 <= X(f.to, i.from)) return !0;
2566
2566
  X(i.from, f.from) < 0 ? i = (a = r.next(f.from)).value : f = (u = o.next(i.from)).value;
2567
2567
  }
2568
2568
  return !1;
2569
2569
  }
2570
- function Ht(e) {
2571
- var n = kn(e) ? null : { s: 0, n: e };
2570
+ function Zt(e) {
2571
+ var n = jn(e) ? null : { s: 0, n: e };
2572
2572
  return { next: function(r) {
2573
2573
  for (var a = 0 < arguments.length; n; ) switch (n.s) {
2574
2574
  case 0:
@@ -2587,66 +2587,66 @@ function Ga() {
2587
2587
  return { done: !0 };
2588
2588
  } };
2589
2589
  }
2590
- function Sr(e) {
2590
+ function _r(e) {
2591
2591
  var n, r, a = (((n = e.r) === null || n === void 0 ? void 0 : n.d) || 0) - (((r = e.l) === null || r === void 0 ? void 0 : r.d) || 0), i = 1 < a ? "r" : a < -1 ? "l" : "";
2592
- i && (n = i == "r" ? "l" : "r", r = c({}, e), a = e[i], e.from = a.from, e.to = a.to, e[i] = a[i], r[i] = a[n], (e[n] = r).d = Or(r)), e.d = Or(e);
2592
+ i && (n = i == "r" ? "l" : "r", r = c({}, e), a = e[i], e.from = a.from, e.to = a.to, e[i] = a[i], r[i] = a[n], (e[n] = r).d = Ar(r)), e.d = Ar(e);
2593
2593
  }
2594
- function Or(r) {
2594
+ function Ar(r) {
2595
2595
  var n = r.r, r = r.l;
2596
2596
  return (n ? r ? Math.max(n.d, r.d) : n.d : r ? r.d : 0) + 1;
2597
2597
  }
2598
- function Yt(e, n) {
2598
+ function Vt(e, n) {
2599
2599
  return I(n).forEach(function(r) {
2600
- e[r] ? St(e[r], n[r]) : e[r] = function a(i) {
2600
+ e[r] ? _t(e[r], n[r]) : e[r] = function a(i) {
2601
2601
  var o, u, f = {};
2602
- for (o in i) Q(i, o) && (u = i[o], f[o] = !u || typeof u != "object" || Zn.has(u.constructor) ? u : a(u));
2602
+ for (o in i) Q(i, o) && (u = i[o], f[o] = !u || typeof u != "object" || qn.has(u.constructor) ? u : a(u));
2603
2603
  return f;
2604
2604
  }(n[r]);
2605
2605
  }), e;
2606
2606
  }
2607
- function Tn(e, n) {
2607
+ function Mn(e, n) {
2608
2608
  return e.all || n.all || Object.keys(e).some(function(r) {
2609
- return n[r] && Er(n[r], e[r]);
2609
+ return n[r] && Or(n[r], e[r]);
2610
2610
  });
2611
2611
  }
2612
- re(le.prototype, ((be = { add: function(e) {
2613
- return St(this, e), this;
2612
+ re(le.prototype, ((ye = { add: function(e) {
2613
+ return _t(this, e), this;
2614
2614
  }, addKey: function(e) {
2615
- return Et(this, e, e), this;
2615
+ return Ot(this, e, e), this;
2616
2616
  }, addKeys: function(e) {
2617
2617
  var n = this;
2618
2618
  return e.forEach(function(r) {
2619
- return Et(n, r, r);
2619
+ return Ot(n, r, r);
2620
2620
  }), this;
2621
2621
  }, hasKey: function(e) {
2622
- var n = Ht(this).next(e).value;
2622
+ var n = Zt(this).next(e).value;
2623
2623
  return n && X(n.from, e) <= 0 && 0 <= X(n.to, e);
2624
- } })[rn] = function() {
2625
- return Ht(this);
2626
- }, be));
2627
- var Ye = {}, Nn = {}, Cn = !1;
2628
- function Qt(e) {
2629
- Yt(Nn, e), Cn || (Cn = !0, setTimeout(function() {
2630
- Cn = !1, $n(Nn, !(Nn = {}));
2624
+ } })[un] = function() {
2625
+ return Zt(this);
2626
+ }, ye));
2627
+ var Je = {}, Bn = {}, Gn = !1;
2628
+ function qt(e) {
2629
+ Vt(Bn, e), Gn || (Gn = !0, setTimeout(function() {
2630
+ Gn = !1, Kn(Bn, !(Bn = {}));
2631
2631
  }, 0));
2632
2632
  }
2633
- function $n(e, n) {
2633
+ function Kn(e, n) {
2634
2634
  n === void 0 && (n = !1);
2635
2635
  var r = /* @__PURE__ */ new Set();
2636
- if (e.all) for (var a = 0, i = Object.values(Ye); a < i.length; a++) _r(u = i[a], e, r, n);
2636
+ if (e.all) for (var a = 0, i = Object.values(Je); a < i.length; a++) Pr(u = i[a], e, r, n);
2637
2637
  else for (var o in e) {
2638
2638
  var u, f = /^idb\:\/\/(.*)\/(.*)\//.exec(o);
2639
- f && (o = f[1], f = f[2], (u = Ye["idb://".concat(o, "/").concat(f)]) && _r(u, e, r, n));
2639
+ f && (o = f[1], f = f[2], (u = Je["idb://".concat(o, "/").concat(f)]) && Pr(u, e, r, n));
2640
2640
  }
2641
2641
  r.forEach(function(p) {
2642
2642
  return p();
2643
2643
  });
2644
2644
  }
2645
- function _r(e, n, r, a) {
2645
+ function Pr(e, n, r, a) {
2646
2646
  for (var i = [], o = 0, u = Object.entries(e.queries.query); o < u.length; o++) {
2647
2647
  for (var f = u[o], p = f[0], m = [], E = 0, h = f[1]; E < h.length; E++) {
2648
2648
  var O = h[E];
2649
- Tn(n, O.obsSet) ? O.subscribers.forEach(function(y) {
2649
+ Mn(n, O.obsSet) ? O.subscribers.forEach(function(y) {
2650
2650
  return r.add(y);
2651
2651
  }) : a && m.push(O);
2652
2652
  }
@@ -2660,7 +2660,7 @@ function Ga() {
2660
2660
  function ma(e) {
2661
2661
  var n = e._state, r = e._deps.indexedDB;
2662
2662
  if (n.isBeingOpened || e.idbdb) return n.dbReadyPromise.then(function() {
2663
- return n.dbOpenError ? ae(n.dbOpenError) : e;
2663
+ return n.dbOpenError ? se(n.dbOpenError) : e;
2664
2664
  });
2665
2665
  n.isBeingOpened = !0, n.dbOpenError = null, n.openComplete = !1;
2666
2666
  var a = n.openCanceller, i = Math.round(10 * e.verno), o = !1;
@@ -2672,28 +2672,28 @@ function Ga() {
2672
2672
  if (u(), !r) throw new K.MissingAPI();
2673
2673
  var w = e.name, S = n.autoSchema || !i ? r.open(w) : r.open(w, i);
2674
2674
  if (!S) throw new K.MissingAPI();
2675
- S.onerror = we(g), S.onblocked = te(e._fireOnBlocked), S.onupgradeneeded = te(function(y) {
2676
- var A;
2677
- E = S.transaction, n.autoSchema && !e._options.allowEmptyDB ? (S.onerror = bt, E.abort(), S.result.close(), (A = r.deleteDatabase(w)).onsuccess = A.onerror = te(function() {
2675
+ S.onerror = Se(g), S.onblocked = te(e._fireOnBlocked), S.onupgradeneeded = te(function(y) {
2676
+ var P;
2677
+ E = S.transaction, n.autoSchema && !e._options.allowEmptyDB ? (S.onerror = vt, E.abort(), S.result.close(), (P = r.deleteDatabase(w)).onsuccess = P.onerror = te(function() {
2678
2678
  g(new K.NoSuchDatabase("Database ".concat(w, " doesnt exist")));
2679
- })) : (E.onerror = we(g), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, h = y < 1, e.idbdb = S.result, o && pa(e, E), ha(e, y / 10, E, g));
2679
+ })) : (E.onerror = Se(g), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, h = y < 1, e.idbdb = S.result, o && pa(e, E), ha(e, y / 10, E, g));
2680
2680
  }, g), S.onsuccess = te(function() {
2681
2681
  E = null;
2682
- var y, A, D, R, x, k = e.idbdb = S.result, $ = _t(k.objectStoreNames);
2682
+ var y, P, D, R, x, k = e.idbdb = S.result, $ = Ge(k.objectStoreNames);
2683
2683
  if (0 < $.length) try {
2684
2684
  var T = k.transaction((R = $).length === 1 ? R[0] : R, "readonly");
2685
- if (n.autoSchema) A = k, D = T, (y = e).verno = A.version / 10, D = y._dbSchema = Wt(0, A, D), y._storeNames = _t(A.objectStoreNames, 0), Lt(y, [y._allTables], I(D), D);
2686
- else if (Ut(e, e._dbSchema, T), ((x = Pn(Wt(0, (x = e).idbdb, T), x._dbSchema)).add.length || x.change.some(function(N) {
2685
+ if (n.autoSchema) P = k, D = T, (y = e).verno = P.version / 10, D = y._dbSchema = Qt(0, P, D), y._storeNames = Ge(P.objectStoreNames, 0), Ht(y, [y._allTables], I(D), D);
2686
+ else if (Xt(e, e._dbSchema, T), ((x = kn(Qt(0, (x = e).idbdb, T), x._dbSchema)).add.length || x.change.some(function(N) {
2687
2687
  return N.add.length || N.change.length;
2688
2688
  })) && !o) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), k.close(), i = k.version + 1, o = !0, O(f());
2689
- Kt(e, T);
2689
+ zt(e, T);
2690
2690
  } catch {
2691
2691
  }
2692
- rt.push(e), k.onversionchange = te(function(N) {
2692
+ st.push(e), k.onversionchange = te(function(N) {
2693
2693
  n.vcFired = !0, e.on("versionchange").fire(N);
2694
2694
  }), k.onclose = te(function(N) {
2695
2695
  e.on("close").fire(N);
2696
- }), h && (x = e._deps, T = w, k = x.indexedDB, x = x.IDBKeyRange, xn(k) || T === $t || Rn(k, x).put({ name: T }).catch(V)), O();
2696
+ }), h && (x = e._deps, T = w, k = x.indexedDB, x = x.IDBKeyRange, Cn(k) || T === Kt || Nn(k, x).put({ name: T }).catch(V)), O();
2697
2697
  }, g);
2698
2698
  }).catch(function(O) {
2699
2699
  switch (O == null ? void 0 : O.name) {
@@ -2715,12 +2715,12 @@ function Ga() {
2715
2715
  }).finally(function() {
2716
2716
  return clearInterval(p);
2717
2717
  }) : Promise.resolve()).then(f)]).then(function() {
2718
- return u(), n.onReadyBeingFired = [], M.resolve(In(function() {
2718
+ return u(), n.onReadyBeingFired = [], M.resolve($n(function() {
2719
2719
  return e.on.ready.fire(e.vip);
2720
2720
  })).then(function O() {
2721
2721
  if (0 < n.onReadyBeingFired.length) {
2722
- var g = n.onReadyBeingFired.reduce(on, V);
2723
- return n.onReadyBeingFired = [], M.resolve(In(function() {
2722
+ var g = n.onReadyBeingFired.reduce(fn, V);
2723
+ return n.onReadyBeingFired = [], M.resolve($n(function() {
2724
2724
  return g(e.vip);
2725
2725
  })).then(O);
2726
2726
  }
@@ -2733,7 +2733,7 @@ function Ga() {
2733
2733
  E && E.abort();
2734
2734
  } catch {
2735
2735
  }
2736
- return a === n.openCanceller && e._close(), ae(O);
2736
+ return a === n.openCanceller && e._close(), se(O);
2737
2737
  }).finally(function() {
2738
2738
  n.openComplete = !0, m();
2739
2739
  }).then(function() {
@@ -2742,10 +2742,10 @@ function Ga() {
2742
2742
  g.schema.indexes.forEach(function(w) {
2743
2743
  w.name && (O["idb://".concat(e.name, "/").concat(g.name, "/").concat(w.name)] = new le(-1 / 0, [[[]]]));
2744
2744
  }), O["idb://".concat(e.name, "/").concat(g.name, "/")] = O["idb://".concat(e.name, "/").concat(g.name, "/:dels")] = new le(-1 / 0, [[[]]]);
2745
- }), Ne(yt).fire(O), $n(O, !0)), e;
2745
+ }), je(wt).fire(O), Kn(O, !0)), e;
2746
2746
  });
2747
2747
  }
2748
- function jn(e) {
2748
+ function Ln(e) {
2749
2749
  function n(o) {
2750
2750
  return e.next(o);
2751
2751
  }
@@ -2755,23 +2755,23 @@ function Ga() {
2755
2755
  function i(o) {
2756
2756
  return function(p) {
2757
2757
  var f = o(p), p = f.value;
2758
- return f.done ? p : p && typeof p.then == "function" ? p.then(r, a) : z(p) ? Promise.all(p).then(r, a) : r(p);
2758
+ return f.done ? p : p && typeof p.then == "function" ? p.then(r, a) : Y(p) ? Promise.all(p).then(r, a) : r(p);
2759
2759
  };
2760
2760
  }
2761
2761
  return i(n)();
2762
2762
  }
2763
- function Xt(e, n, r) {
2764
- for (var a = z(e) ? e.slice() : [e], i = 0; i < r; ++i) a.push(n);
2763
+ function en(e, n, r) {
2764
+ for (var a = Y(e) ? e.slice() : [e], i = 0; i < r; ++i) a.push(n);
2765
2765
  return a;
2766
2766
  }
2767
2767
  var ba = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2768
2768
  return c(c({}, e), { table: function(n) {
2769
2769
  var r = e.table(n), a = r.schema, i = {}, o = [];
2770
2770
  function u(h, O, g) {
2771
- var w = wt(h), S = i[w] = i[w] || [], y = h == null ? 0 : typeof h == "string" ? 1 : h.length, A = 0 < O, A = c(c({}, g), { name: A ? "".concat(w, "(virtual-from:").concat(g.name, ")") : g.name, lowLevelIndex: g, isVirtual: A, keyTail: O, keyLength: y, extractKey: _n(h), unique: !A && g.unique });
2772
- return S.push(A), A.isPrimaryKey || o.push(A), 1 < y && u(y === 2 ? h[0] : h.slice(0, y - 1), O + 1, g), S.sort(function(D, R) {
2771
+ var w = St(h), S = i[w] = i[w] || [], y = h == null ? 0 : typeof h == "string" ? 1 : h.length, P = 0 < O, P = c(c({}, g), { name: P ? "".concat(w, "(virtual-from:").concat(g.name, ")") : g.name, lowLevelIndex: g, isVirtual: P, keyTail: O, keyLength: y, extractKey: xn(h), unique: !P && g.unique });
2772
+ return S.push(P), P.isPrimaryKey || o.push(P), 1 < y && u(y === 2 ? h[0] : h.slice(0, y - 1), O + 1, g), S.sort(function(D, R) {
2773
2773
  return D.keyTail - R.keyTail;
2774
- }), A;
2774
+ }), P;
2775
2775
  }
2776
2776
  n = u(a.primaryKey.keyPath, 0, a.primaryKey), i[":id"] = [n];
2777
2777
  for (var f = 0, p = a.indexes; f < p.length; f++) {
@@ -2780,45 +2780,45 @@ function Ga() {
2780
2780
  }
2781
2781
  function E(h) {
2782
2782
  var O, g = h.query.index;
2783
- return g.isVirtual ? c(c({}, h), { query: { index: g.lowLevelIndex, range: (O = h.query.range, g = g.keyTail, { type: O.type === 1 ? 2 : O.type, lower: Xt(O.lower, O.lowerOpen ? e.MAX_KEY : e.MIN_KEY, g), lowerOpen: !0, upper: Xt(O.upper, O.upperOpen ? e.MIN_KEY : e.MAX_KEY, g), upperOpen: !0 }) } }) : h;
2783
+ return g.isVirtual ? c(c({}, h), { query: { index: g.lowLevelIndex, range: (O = h.query.range, g = g.keyTail, { type: O.type === 1 ? 2 : O.type, lower: en(O.lower, O.lowerOpen ? e.MAX_KEY : e.MIN_KEY, g), lowerOpen: !0, upper: en(O.upper, O.upperOpen ? e.MIN_KEY : e.MAX_KEY, g), upperOpen: !0 }) } }) : h;
2784
2784
  }
2785
2785
  return c(c({}, r), { schema: c(c({}, a), { primaryKey: n, indexes: o, getIndexByKeyPath: function(h) {
2786
- return (h = i[wt(h)]) && h[0];
2786
+ return (h = i[St(h)]) && h[0];
2787
2787
  } }), count: function(h) {
2788
2788
  return r.count(E(h));
2789
2789
  }, query: function(h) {
2790
2790
  return r.query(E(h));
2791
2791
  }, openCursor: function(h) {
2792
2792
  var O = h.query.index, g = O.keyTail, w = O.isVirtual, S = O.keyLength;
2793
- return w ? r.openCursor(E(h)).then(function(A) {
2794
- return A && y(A);
2793
+ return w ? r.openCursor(E(h)).then(function(P) {
2794
+ return P && y(P);
2795
2795
  }) : r.openCursor(h);
2796
- function y(A) {
2797
- return Object.create(A, { continue: { value: function(D) {
2798
- D != null ? A.continue(Xt(D, h.reverse ? e.MAX_KEY : e.MIN_KEY, g)) : h.unique ? A.continue(A.key.slice(0, S).concat(h.reverse ? e.MIN_KEY : e.MAX_KEY, g)) : A.continue();
2796
+ function y(P) {
2797
+ return Object.create(P, { continue: { value: function(D) {
2798
+ D != null ? P.continue(en(D, h.reverse ? e.MAX_KEY : e.MIN_KEY, g)) : h.unique ? P.continue(P.key.slice(0, S).concat(h.reverse ? e.MIN_KEY : e.MAX_KEY, g)) : P.continue();
2799
2799
  } }, continuePrimaryKey: { value: function(D, R) {
2800
- A.continuePrimaryKey(Xt(D, e.MAX_KEY, g), R);
2800
+ P.continuePrimaryKey(en(D, e.MAX_KEY, g), R);
2801
2801
  } }, primaryKey: { get: function() {
2802
- return A.primaryKey;
2802
+ return P.primaryKey;
2803
2803
  } }, key: { get: function() {
2804
- var D = A.key;
2804
+ var D = P.key;
2805
2805
  return S === 1 ? D[0] : D.slice(0, S);
2806
2806
  } }, value: { get: function() {
2807
- return A.value;
2807
+ return P.value;
2808
2808
  } } });
2809
2809
  }
2810
2810
  } });
2811
2811
  } });
2812
2812
  } };
2813
- function Mn(e, n, r, a) {
2813
+ function Fn(e, n, r, a) {
2814
2814
  return r = r || {}, a = a || "", I(e).forEach(function(i) {
2815
2815
  var o, u, f;
2816
- Q(n, i) ? (o = e[i], u = n[i], typeof o == "object" && typeof u == "object" && o && u ? (f = nn(o)) !== nn(u) ? r[a + i] = n[i] : f === "Object" ? Mn(o, u, r, a + i + ".") : o !== u && (r[a + i] = n[i]) : o !== u && (r[a + i] = n[i])) : r[a + i] = void 0;
2816
+ Q(n, i) ? (o = e[i], u = n[i], typeof o == "object" && typeof u == "object" && o && u ? (f = cn(o)) !== cn(u) ? r[a + i] = n[i] : f === "Object" ? Fn(o, u, r, a + i + ".") : o !== u && (r[a + i] = n[i]) : o !== u && (r[a + i] = n[i])) : r[a + i] = void 0;
2817
2817
  }), I(n).forEach(function(i) {
2818
2818
  Q(e, i) || (r[a + i] = n[i]);
2819
2819
  }), r;
2820
2820
  }
2821
- function Bn(e, n) {
2821
+ function Wn(e, n) {
2822
2822
  return n.type === "delete" ? n.keys : n.keys || n.values.map(e.extractKey);
2823
2823
  }
2824
2824
  var ya = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
@@ -2848,8 +2848,8 @@ function Ga() {
2848
2848
  return function h(O, g, w) {
2849
2849
  return r.query({ trans: O, values: !1, query: { index: a, range: g }, limit: w }).then(function(S) {
2850
2850
  var y = S.result;
2851
- return E({ type: "delete", keys: y, trans: O }).then(function(A) {
2852
- return 0 < A.numFailures ? Promise.reject(A.failures[0]) : y.length < w ? { failures: [], numFailures: 0, lastResult: void 0 } : h(O, c(c({}, g), { lower: y[y.length - 1], lowerOpen: !0 }), w);
2851
+ return E({ type: "delete", keys: y, trans: O }).then(function(P) {
2852
+ return 0 < P.numFailures ? Promise.reject(P.failures[0]) : y.length < w ? { failures: [], numFailures: 0, lastResult: void 0 } : h(O, c(c({}, g), { lower: y[y.length - 1], lowerOpen: !0 }), w);
2853
2853
  });
2854
2854
  });
2855
2855
  }(i.trans, i.range, 1e4);
@@ -2857,19 +2857,19 @@ function Ga() {
2857
2857
  }
2858
2858
  return r.mutate(i);
2859
2859
  function E(h) {
2860
- var O, g, w, S = G.trans, y = h.keys || Bn(a, h);
2860
+ var O, g, w, S = G.trans, y = h.keys || Wn(a, h);
2861
2861
  if (!y) throw new Error("Keys missing");
2862
- return (h = h.type === "add" || h.type === "put" ? c(c({}, h), { keys: y }) : c({}, h)).type !== "delete" && (h.values = v([], h.values)), h.keys && (h.keys = v([], h.keys)), O = r, w = y, ((g = h).type === "add" ? Promise.resolve([]) : O.getMany({ trans: g.trans, keys: w, cache: "immutable" })).then(function(A) {
2862
+ return (h = h.type === "add" || h.type === "put" ? c(c({}, h), { keys: y }) : c({}, h)).type !== "delete" && (h.values = v([], h.values)), h.keys && (h.keys = v([], h.keys)), O = r, w = y, ((g = h).type === "add" ? Promise.resolve([]) : O.getMany({ trans: g.trans, keys: w, cache: "immutable" })).then(function(P) {
2863
2863
  var D = y.map(function(R, x) {
2864
- var k, $, T, N = A[x], j = { onerror: null, onsuccess: null };
2865
- return h.type === "delete" ? f.fire.call(j, R, N, S) : h.type === "add" || N === void 0 ? (k = p.fire.call(j, R, h.values[x], S), R == null && k != null && (h.keys[x] = R = k, a.outbound || pe(h.values[x], a.keyPath, R))) : (k = Mn(N, h.values[x]), ($ = m.fire.call(j, k, R, N, S)) && (T = h.values[x], Object.keys($).forEach(function(C) {
2866
- Q(T, C) ? T[C] = $[C] : pe(T, C, $[C]);
2864
+ var k, $, T, N = P[x], j = { onerror: null, onsuccess: null };
2865
+ return h.type === "delete" ? f.fire.call(j, R, N, S) : h.type === "add" || N === void 0 ? (k = p.fire.call(j, R, h.values[x], S), R == null && k != null && (h.keys[x] = R = k, a.outbound || he(h.values[x], a.keyPath, R))) : (k = Fn(N, h.values[x]), ($ = m.fire.call(j, k, R, N, S)) && (T = h.values[x], Object.keys($).forEach(function(C) {
2866
+ Q(T, C) ? T[C] = $[C] : he(T, C, $[C]);
2867
2867
  }))), j;
2868
2868
  });
2869
2869
  return r.mutate(h).then(function(R) {
2870
2870
  for (var x = R.failures, k = R.results, $ = R.numFailures, R = R.lastResult, T = 0; T < y.length; ++T) {
2871
2871
  var N = (k || y)[T], j = D[T];
2872
- N == null ? j.onerror && j.onerror(x[T]) : j.onsuccess && j.onsuccess(h.type === "put" && A[T] ? h.values[T] : N);
2872
+ N == null ? j.onerror && j.onerror(x[T]) : j.onsuccess && j.onsuccess(h.type === "put" && P[T] ? h.values[T] : N);
2873
2873
  }
2874
2874
  return { failures: x, results: k, numFailures: $, lastResult: R };
2875
2875
  }).catch(function(R) {
@@ -2882,10 +2882,10 @@ function Ga() {
2882
2882
  } });
2883
2883
  } });
2884
2884
  } };
2885
- function Ar(e, n, r) {
2885
+ function Dr(e, n, r) {
2886
2886
  try {
2887
2887
  if (!n || n.keys.length < e.length) return null;
2888
- for (var a = [], i = 0, o = 0; i < n.keys.length && o < e.length; ++i) X(n.keys[i], e[o]) === 0 && (a.push(r ? Me(n.values[i]) : n.values[i]), ++o);
2888
+ for (var a = [], i = 0, o = 0; i < n.keys.length && o < e.length; ++i) X(n.keys[i], e[o]) === 0 && (a.push(r ? Ke(n.values[i]) : n.values[i]), ++o);
2889
2889
  return a.length === e.length ? a : null;
2890
2890
  } catch {
2891
2891
  return null;
@@ -2896,19 +2896,19 @@ function Ga() {
2896
2896
  var r = e.table(n);
2897
2897
  return c(c({}, r), { getMany: function(a) {
2898
2898
  if (!a.cache) return r.getMany(a);
2899
- var i = Ar(a.keys, a.trans._cache, a.cache === "clone");
2899
+ var i = Dr(a.keys, a.trans._cache, a.cache === "clone");
2900
2900
  return i ? M.resolve(i) : r.getMany(a).then(function(o) {
2901
- return a.trans._cache = { keys: a.keys, values: a.cache === "clone" ? Me(o) : o }, o;
2901
+ return a.trans._cache = { keys: a.keys, values: a.cache === "clone" ? Ke(o) : o }, o;
2902
2902
  });
2903
2903
  }, mutate: function(a) {
2904
2904
  return a.type !== "add" && (a.trans._cache = null), r.mutate(a);
2905
2905
  } });
2906
2906
  } };
2907
2907
  } };
2908
- function Pr(e, n) {
2908
+ function Rr(e, n) {
2909
2909
  return e.trans.mode === "readonly" && !!e.subscr && !e.trans.explicit && e.trans.db._options.cache !== "disabled" && !n.schema.primaryKey.outbound;
2910
2910
  }
2911
- function Dr(e, n) {
2911
+ function xr(e, n) {
2912
2912
  switch (e) {
2913
2913
  case "query":
2914
2914
  return n.values && !n.unique;
@@ -2931,22 +2931,22 @@ function Ga() {
2931
2931
  function w(C) {
2932
2932
  return C = "idb://".concat(n, "/").concat(a, "/").concat(C), R[C] || (R[C] = new le());
2933
2933
  }
2934
- var S, y, A, D = g.trans, R = g.mutatedParts || (g.mutatedParts = {}), x = w(""), k = w(":dels"), $ = g.type, j = g.type === "deleteRange" ? [g.range] : g.type === "delete" ? [g.keys] : g.values.length < 50 ? [Bn(u, g).filter(function(C) {
2934
+ var S, y, P, D = g.trans, R = g.mutatedParts || (g.mutatedParts = {}), x = w(""), k = w(":dels"), $ = g.type, j = g.type === "deleteRange" ? [g.range] : g.type === "delete" ? [g.keys] : g.values.length < 50 ? [Wn(u, g).filter(function(C) {
2935
2935
  return C;
2936
2936
  }), g.values] : [], T = j[0], N = j[1], j = g.trans._cache;
2937
- return z(T) ? (x.addKeys(T), (j = $ === "delete" || T.length === N.length ? Ar(T, j) : null) || k.addKeys(T), (j || N) && (S = w, y = j, A = N, o.indexes.forEach(function(C) {
2937
+ return Y(T) ? (x.addKeys(T), (j = $ === "delete" || T.length === N.length ? Dr(T, j) : null) || k.addKeys(T), (j || N) && (S = w, y = j, P = N, o.indexes.forEach(function(C) {
2938
2938
  var B = S(C.name || "");
2939
- function W(Y) {
2940
- return Y != null ? C.extractKey(Y) : null;
2939
+ function W(H) {
2940
+ return H != null ? C.extractKey(H) : null;
2941
2941
  }
2942
- function H(Y) {
2943
- return C.multiEntry && z(Y) ? Y.forEach(function(me) {
2944
- return B.addKey(me);
2945
- }) : B.addKey(Y);
2942
+ function z(H) {
2943
+ return C.multiEntry && Y(H) ? H.forEach(function(be) {
2944
+ return B.addKey(be);
2945
+ }) : B.addKey(H);
2946
2946
  }
2947
- (y || A).forEach(function(Y, de) {
2948
- var F = y && W(y[de]), de = A && W(A[de]);
2949
- X(F, de) !== 0 && (F != null && H(F), de != null && H(de));
2947
+ (y || P).forEach(function(H, de) {
2948
+ var F = y && W(y[de]), de = P && W(P[de]);
2949
+ X(F, de) !== 0 && (F != null && z(F), de != null && z(de));
2950
2950
  });
2951
2951
  }))) : T ? (N = { from: (N = T.lower) !== null && N !== void 0 ? N : e.MIN_KEY, to: (N = T.upper) !== null && N !== void 0 ? N : e.MAX_KEY }, k.add(N), x.add(N)) : (x.add(r), k.add(r), o.indexes.forEach(function(C) {
2952
2952
  return w(C.name).add(r);
@@ -2954,11 +2954,11 @@ function Ga() {
2954
2954
  return !T || g.type !== "add" && g.type !== "put" || (x.addKeys(C.results), m && m.forEach(function(B) {
2955
2955
  for (var W = g.values.map(function(F) {
2956
2956
  return B.extractKey(F);
2957
- }), H = B.keyPath.findIndex(function(F) {
2957
+ }), z = B.keyPath.findIndex(function(F) {
2958
2958
  return F === u.keyPath;
2959
- }), Y = 0, me = C.results.length; Y < me; ++Y) W[Y][H] = C.results[Y];
2959
+ }), H = 0, be = C.results.length; H < be; ++H) W[H][z] = C.results[H];
2960
2960
  w(B.name).addKeys(W);
2961
- })), D.mutatedParts = Yt(D.mutatedParts || {}, R), C;
2961
+ })), D.mutatedParts = Vt(D.mutatedParts || {}, R), C;
2962
2962
  });
2963
2963
  } }), h = function(w) {
2964
2964
  var S = w.query, w = S.index, S = S.range;
@@ -2970,10 +2970,10 @@ function Ga() {
2970
2970
  }, count: h, query: h, openCursor: h };
2971
2971
  return I(O).forEach(function(g) {
2972
2972
  E[g] = function(w) {
2973
- var S = G.subscr, y = !!S, A = Pr(G, i) && Dr(g, w) ? w.obsSet = {} : S;
2973
+ var S = G.subscr, y = !!S, P = Rr(G, i) && xr(g, w) ? w.obsSet = {} : S;
2974
2974
  if (y) {
2975
2975
  var D = function(N) {
2976
- return N = "idb://".concat(n, "/").concat(a, "/").concat(N), A[N] || (A[N] = new le());
2976
+ return N = "idb://".concat(n, "/").concat(a, "/").concat(N), P[N] || (P[N] = new le());
2977
2977
  }, R = D(""), x = D(":dels"), S = O[g](w), y = S[0], S = S[1];
2978
2978
  if ((g === "query" && y.isPrimaryKey && !w.values ? x : D(y.name || "")).add(S), !y.isPrimaryKey) {
2979
2979
  if (g !== "count") {
@@ -3007,29 +3007,29 @@ function Ga() {
3007
3007
  }), E;
3008
3008
  } });
3009
3009
  } };
3010
- function Rr(e, n, r) {
3010
+ function Ir(e, n, r) {
3011
3011
  if (r.numFailures === 0) return n;
3012
3012
  if (n.type === "deleteRange") return null;
3013
3013
  var a = n.keys ? n.keys.length : "values" in n && n.values ? n.values.length : 1;
3014
- return r.numFailures === a ? null : (n = c({}, n), z(n.keys) && (n.keys = n.keys.filter(function(i, o) {
3014
+ return r.numFailures === a ? null : (n = c({}, n), Y(n.keys) && (n.keys = n.keys.filter(function(i, o) {
3015
3015
  return !(o in r.failures);
3016
- })), "values" in n && z(n.values) && (n.values = n.values.filter(function(i, o) {
3016
+ })), "values" in n && Y(n.values) && (n.values = n.values.filter(function(i, o) {
3017
3017
  return !(o in r.failures);
3018
3018
  })), n);
3019
3019
  }
3020
- function Gn(e, n) {
3020
+ function Un(e, n) {
3021
3021
  return r = e, ((a = n).lower === void 0 || (a.lowerOpen ? 0 < X(r, a.lower) : 0 <= X(r, a.lower))) && (e = e, (n = n).upper === void 0 || (n.upperOpen ? X(e, n.upper) < 0 : X(e, n.upper) <= 0));
3022
3022
  var r, a;
3023
3023
  }
3024
- function xr(e, n, O, a, i, o) {
3024
+ function kr(e, n, O, a, i, o) {
3025
3025
  if (!O || O.length === 0) return e;
3026
3026
  var u = n.query.index, f = u.multiEntry, p = n.query.range, m = a.schema.primaryKey.extractKey, E = u.extractKey, h = (u.lowLevelIndex || u).extractKey, O = O.reduce(function(g, w) {
3027
3027
  var S = g, y = [];
3028
- if (w.type === "add" || w.type === "put") for (var A = new le(), D = w.values.length - 1; 0 <= D; --D) {
3028
+ if (w.type === "add" || w.type === "put") for (var P = new le(), D = w.values.length - 1; 0 <= D; --D) {
3029
3029
  var R, x = w.values[D], k = m(x);
3030
- A.hasKey(k) || (R = E(x), (f && z(R) ? R.some(function(C) {
3031
- return Gn(C, p);
3032
- }) : Gn(R, p)) && (A.addKey(k), y.push(x)));
3030
+ P.hasKey(k) || (R = E(x), (f && Y(R) ? R.some(function(C) {
3031
+ return Un(C, p);
3032
+ }) : Un(R, p)) && (P.addKey(k), y.push(x)));
3033
3033
  }
3034
3034
  switch (w.type) {
3035
3035
  case "add":
@@ -3062,7 +3062,7 @@ function Ga() {
3062
3062
  case "deleteRange":
3063
3063
  var j = w.range;
3064
3064
  S = g.filter(function(B) {
3065
- return !Gn(m(B), j);
3065
+ return !Un(m(B), j);
3066
3066
  });
3067
3067
  }
3068
3068
  return S;
@@ -3071,7 +3071,7 @@ function Ga() {
3071
3071
  return X(h(g), h(w)) || X(m(g), m(w));
3072
3072
  }), n.limit && n.limit < 1 / 0 && (O.length > n.limit ? O.length = n.limit : e.length === n.limit && O.length < n.limit && (i.dirty = !0)), o ? Object.freeze(O) : O);
3073
3073
  }
3074
- function Ir(e, n) {
3074
+ function Tr(e, n) {
3075
3075
  return X(e.lower, n.lower) === 0 && X(e.upper, n.upper) === 0 && !!e.lowerOpen == !!n.lowerOpen && !!e.upperOpen == !!n.upperOpen;
3076
3076
  }
3077
3077
  function Ea(e, n) {
@@ -3099,7 +3099,7 @@ function Ga() {
3099
3099
  e.subscribers.add(r), a.addEventListener("abort", function() {
3100
3100
  var i, o;
3101
3101
  e.subscribers.delete(r), e.subscribers.size === 0 && (i = e, o = n, setTimeout(function() {
3102
- i.subscribers.size === 0 && Be(o, i);
3102
+ i.subscribers.size === 0 && Le(o, i);
3103
3103
  }, 3e3));
3104
3104
  });
3105
3105
  }
@@ -3111,21 +3111,21 @@ function Ga() {
3111
3111
  return function() {
3112
3112
  if (o.abort(), a === "readwrite") {
3113
3113
  for (var m = /* @__PURE__ */ new Set(), E = 0, h = r; E < h.length; E++) {
3114
- var O = h[E], g = Ye["idb://".concat(n, "/").concat(O)];
3114
+ var O = h[E], g = Je["idb://".concat(n, "/").concat(O)];
3115
3115
  if (g) {
3116
3116
  var w = e.table(O), S = g.optimisticOps.filter(function(B) {
3117
3117
  return B.trans === f;
3118
3118
  });
3119
- if (f._explicit && p && f.mutatedParts) for (var y = 0, A = Object.values(g.queries.query); y < A.length; y++) for (var D = 0, R = ($ = A[y]).slice(); D < R.length; D++) Tn((T = R[D]).obsSet, f.mutatedParts) && (Be($, T), T.subscribers.forEach(function(B) {
3119
+ if (f._explicit && p && f.mutatedParts) for (var y = 0, P = Object.values(g.queries.query); y < P.length; y++) for (var D = 0, R = ($ = P[y]).slice(); D < R.length; D++) Mn((T = R[D]).obsSet, f.mutatedParts) && (Le($, T), T.subscribers.forEach(function(B) {
3120
3120
  return m.add(B);
3121
3121
  }));
3122
3122
  else if (0 < S.length) {
3123
3123
  g.optimisticOps = g.optimisticOps.filter(function(B) {
3124
3124
  return B.trans !== f;
3125
3125
  });
3126
- for (var x = 0, k = Object.values(g.queries.query); x < k.length; x++) for (var $, T, N, j = 0, C = ($ = k[x]).slice(); j < C.length; j++) (T = C[j]).res != null && f.mutatedParts && (p && !T.dirty ? (N = Object.isFrozen(T.res), N = xr(T.res, T.req, S, w, T, N), T.dirty ? (Be($, T), T.subscribers.forEach(function(B) {
3126
+ for (var x = 0, k = Object.values(g.queries.query); x < k.length; x++) for (var $, T, N, j = 0, C = ($ = k[x]).slice(); j < C.length; j++) (T = C[j]).res != null && f.mutatedParts && (p && !T.dirty ? (N = Object.isFrozen(T.res), N = kr(T.res, T.req, S, w, T, N), T.dirty ? (Le($, T), T.subscribers.forEach(function(B) {
3127
3127
  return m.add(B);
3128
- })) : N !== T.res && (T.res = N, T.promise = M.resolve({ result: N }))) : (T.dirty && Be($, T), T.subscribers.forEach(function(B) {
3128
+ })) : N !== T.res && (T.res = N, T.promise = M.resolve({ result: N }))) : (T.dirty && Le($, T), T.subscribers.forEach(function(B) {
3129
3129
  return m.add(B);
3130
3130
  })));
3131
3131
  }
@@ -3142,65 +3142,65 @@ function Ga() {
3142
3142
  return c(c({}, a), { mutate: function(o) {
3143
3143
  var u = G.trans;
3144
3144
  if (i.outbound || u.db._options.cache === "disabled" || u.explicit || u.idbtrans.mode !== "readwrite") return a.mutate(o);
3145
- var f = Ye["idb://".concat(n, "/").concat(r)];
3146
- return f ? (u = a.mutate(o), o.type !== "add" && o.type !== "put" || !(50 <= o.values.length || Bn(i, o).some(function(p) {
3145
+ var f = Je["idb://".concat(n, "/").concat(r)];
3146
+ return f ? (u = a.mutate(o), o.type !== "add" && o.type !== "put" || !(50 <= o.values.length || Wn(i, o).some(function(p) {
3147
3147
  return p == null;
3148
- })) ? (f.optimisticOps.push(o), o.mutatedParts && Qt(o.mutatedParts), u.then(function(p) {
3149
- 0 < p.numFailures && (Be(f.optimisticOps, o), (p = Rr(0, o, p)) && f.optimisticOps.push(p), o.mutatedParts && Qt(o.mutatedParts));
3148
+ })) ? (f.optimisticOps.push(o), o.mutatedParts && qt(o.mutatedParts), u.then(function(p) {
3149
+ 0 < p.numFailures && (Le(f.optimisticOps, o), (p = Ir(0, o, p)) && f.optimisticOps.push(p), o.mutatedParts && qt(o.mutatedParts));
3150
3150
  }), u.catch(function() {
3151
- Be(f.optimisticOps, o), o.mutatedParts && Qt(o.mutatedParts);
3151
+ Le(f.optimisticOps, o), o.mutatedParts && qt(o.mutatedParts);
3152
3152
  })) : u.then(function(p) {
3153
- var m = Rr(0, c(c({}, o), { values: o.values.map(function(E, h) {
3153
+ var m = Ir(0, c(c({}, o), { values: o.values.map(function(E, h) {
3154
3154
  var O;
3155
- return p.failures[h] ? E : (E = (O = i.keyPath) !== null && O !== void 0 && O.includes(".") ? Me(E) : c({}, E), pe(E, i.keyPath, p.results[h]), E);
3155
+ return p.failures[h] ? E : (E = (O = i.keyPath) !== null && O !== void 0 && O.includes(".") ? Ke(E) : c({}, E), he(E, i.keyPath, p.results[h]), E);
3156
3156
  }) }), p);
3157
3157
  f.optimisticOps.push(m), queueMicrotask(function() {
3158
- return o.mutatedParts && Qt(o.mutatedParts);
3158
+ return o.mutatedParts && qt(o.mutatedParts);
3159
3159
  });
3160
3160
  }), u) : a.mutate(o);
3161
3161
  }, query: function(o) {
3162
- if (!Pr(G, a) || !Dr("query", o)) return a.query(o);
3163
- var u = ((m = G.trans) === null || m === void 0 ? void 0 : m.db._options.cache) === "immutable", h = G, f = h.requery, p = h.signal, m = function(w, S, y, A) {
3164
- var D = Ye["idb://".concat(w, "/").concat(S)];
3162
+ if (!Rr(G, a) || !xr("query", o)) return a.query(o);
3163
+ var u = ((m = G.trans) === null || m === void 0 ? void 0 : m.db._options.cache) === "immutable", h = G, f = h.requery, p = h.signal, m = function(w, S, y, P) {
3164
+ var D = Je["idb://".concat(w, "/").concat(S)];
3165
3165
  if (!D) return [];
3166
3166
  if (!(S = D.queries[y])) return [null, !1, D, null];
3167
- var R = S[(A.query ? A.query.index.name : null) || ""];
3167
+ var R = S[(P.query ? P.query.index.name : null) || ""];
3168
3168
  if (!R) return [null, !1, D, null];
3169
3169
  switch (y) {
3170
3170
  case "query":
3171
3171
  var x = R.find(function(k) {
3172
- return k.req.limit === A.limit && k.req.values === A.values && Ir(k.req.query.range, A.query.range);
3172
+ return k.req.limit === P.limit && k.req.values === P.values && Tr(k.req.query.range, P.query.range);
3173
3173
  });
3174
3174
  return x ? [x, !0, D, R] : [R.find(function(k) {
3175
- return ("limit" in k.req ? k.req.limit : 1 / 0) >= A.limit && (!A.values || k.req.values) && Ea(k.req.query.range, A.query.range);
3175
+ return ("limit" in k.req ? k.req.limit : 1 / 0) >= P.limit && (!P.values || k.req.values) && Ea(k.req.query.range, P.query.range);
3176
3176
  }), !1, D, R];
3177
3177
  case "count":
3178
3178
  return x = R.find(function(k) {
3179
- return Ir(k.req.query.range, A.query.range);
3179
+ return Tr(k.req.query.range, P.query.range);
3180
3180
  }), [x, !!x, D, R];
3181
3181
  }
3182
3182
  }(n, r, "query", o), E = m[0], h = m[1], O = m[2], g = m[3];
3183
3183
  return E && h ? E.obsSet = o.obsSet : (h = a.query(o).then(function(w) {
3184
3184
  var S = w.result;
3185
3185
  if (E && (E.res = S), u) {
3186
- for (var y = 0, A = S.length; y < A; ++y) Object.freeze(S[y]);
3186
+ for (var y = 0, P = S.length; y < P; ++y) Object.freeze(S[y]);
3187
3187
  Object.freeze(S);
3188
- } else w.result = Me(S);
3188
+ } else w.result = Ke(S);
3189
3189
  return w;
3190
3190
  }).catch(function(w) {
3191
- return g && E && Be(g, E), Promise.reject(w);
3192
- }), E = { obsSet: o.obsSet, promise: h, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, g ? g.push(E) : (g = [E], (O = O || (Ye["idb://".concat(n, "/").concat(r)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = g)), Sa(E, g, f, p), E.promise.then(function(w) {
3193
- return { result: xr(w.result, o, O == null ? void 0 : O.optimisticOps, a, E, u) };
3191
+ return g && E && Le(g, E), Promise.reject(w);
3192
+ }), E = { obsSet: o.obsSet, promise: h, subscribers: /* @__PURE__ */ new Set(), type: "query", req: o, dirty: !1 }, g ? g.push(E) : (g = [E], (O = O || (Je["idb://".concat(n, "/").concat(r)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[o.query.index.name || ""] = g)), Sa(E, g, f, p), E.promise.then(function(w) {
3193
+ return { result: kr(w.result, o, O == null ? void 0 : O.optimisticOps, a, E, u) };
3194
3194
  });
3195
3195
  } });
3196
3196
  } });
3197
3197
  } };
3198
- function Jt(e, n) {
3198
+ function tn(e, n) {
3199
3199
  return new Proxy(e, { get: function(r, a, i) {
3200
3200
  return a === "db" ? n : Reflect.get(r, a, i);
3201
3201
  } });
3202
3202
  }
3203
- var Ae = (se.prototype.version = function(e) {
3203
+ var De = (ie.prototype.version = function(e) {
3204
3204
  if (isNaN(e) || e < 0.1) throw new K.Type("Given version is not a positive number");
3205
3205
  if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new K.Schema("Cannot add version when database is open");
3206
3206
  this.verno = Math.max(this.verno, e);
@@ -3208,7 +3208,7 @@ function Ga() {
3208
3208
  return a._cfg.version === e;
3209
3209
  })[0];
3210
3210
  return r || (r = new this.Version(e), n.push(r), n.sort(fa), r.stores({}), this._state.autoSchema = !1, r);
3211
- }, se.prototype._whenReady = function(e) {
3211
+ }, ie.prototype._whenReady = function(e) {
3212
3212
  var n = this;
3213
3213
  return this.idbdb && (this._state.openComplete || G.letThrough || this._vip) ? e() : new M(function(r, a) {
3214
3214
  if (n._state.openComplete) return a(new K.DatabaseClosed(n._state.dbOpenError));
@@ -3218,24 +3218,24 @@ function Ga() {
3218
3218
  }
3219
3219
  n._state.dbReadyPromise.then(r, a);
3220
3220
  }).then(e);
3221
- }, se.prototype.use = function(e) {
3221
+ }, ie.prototype.use = function(e) {
3222
3222
  var n = e.stack, r = e.create, a = e.level, i = e.name;
3223
3223
  return i && this.unuse({ stack: n, name: i }), e = this._middlewares[n] || (this._middlewares[n] = []), e.push({ stack: n, create: r, level: a ?? 10, name: i }), e.sort(function(o, u) {
3224
3224
  return o.level - u.level;
3225
3225
  }), this;
3226
- }, se.prototype.unuse = function(e) {
3226
+ }, ie.prototype.unuse = function(e) {
3227
3227
  var n = e.stack, r = e.name, a = e.create;
3228
3228
  return n && this._middlewares[n] && (this._middlewares[n] = this._middlewares[n].filter(function(i) {
3229
3229
  return a ? i.create !== a : !!r && i.name !== r;
3230
3230
  })), this;
3231
- }, se.prototype.open = function() {
3231
+ }, ie.prototype.open = function() {
3232
3232
  var e = this;
3233
- return Ue(Re, function() {
3233
+ return Ye(ke, function() {
3234
3234
  return ma(e);
3235
3235
  });
3236
- }, se.prototype._close = function() {
3237
- var e = this._state, n = rt.indexOf(this);
3238
- if (0 <= n && rt.splice(n, 1), this.idbdb) {
3236
+ }, ie.prototype._close = function() {
3237
+ var e = this._state, n = st.indexOf(this);
3238
+ if (0 <= n && st.splice(n, 1), this.idbdb) {
3239
3239
  try {
3240
3240
  this.idbdb.close();
3241
3241
  } catch {
@@ -3247,10 +3247,10 @@ function Ga() {
3247
3247
  }), e.openCanceller = new M(function(r, a) {
3248
3248
  e.cancelOpen = a;
3249
3249
  }));
3250
- }, se.prototype.close = function(r) {
3250
+ }, ie.prototype.close = function(r) {
3251
3251
  var n = (r === void 0 ? { disableAutoOpen: !0 } : r).disableAutoOpen, r = this._state;
3252
3252
  n ? (r.isBeingOpened && r.cancelOpen(new K.DatabaseClosed()), this._close(), r.autoOpen = !1, r.dbOpenError = new K.DatabaseClosed()) : (this._close(), r.autoOpen = this._options.autoOpen || r.isBeingOpened, r.openComplete = !1, r.dbOpenError = null);
3253
- }, se.prototype.delete = function(e) {
3253
+ }, ie.prototype.delete = function(e) {
3254
3254
  var n = this;
3255
3255
  e === void 0 && (e = { disableAutoOpen: !0 });
3256
3256
  var r = 0 < arguments.length && typeof arguments[0] != "object", a = this._state;
@@ -3260,37 +3260,37 @@ function Ga() {
3260
3260
  var f = n._deps.indexedDB.deleteDatabase(n.name);
3261
3261
  f.onsuccess = te(function() {
3262
3262
  var p, m, E;
3263
- p = n._deps, m = n.name, E = p.indexedDB, p = p.IDBKeyRange, xn(E) || m === $t || Rn(E, p).delete(m).catch(V), i();
3264
- }), f.onerror = we(o), f.onblocked = n._fireOnBlocked;
3263
+ p = n._deps, m = n.name, E = p.indexedDB, p = p.IDBKeyRange, Cn(E) || m === Kt || Nn(E, p).delete(m).catch(V), i();
3264
+ }), f.onerror = Se(o), f.onblocked = n._fireOnBlocked;
3265
3265
  }
3266
3266
  if (r) throw new K.InvalidArgument("Invalid closeOptions argument to db.delete()");
3267
3267
  a.isBeingOpened ? a.dbReadyPromise.then(u) : u();
3268
3268
  });
3269
- }, se.prototype.backendDB = function() {
3269
+ }, ie.prototype.backendDB = function() {
3270
3270
  return this.idbdb;
3271
- }, se.prototype.isOpen = function() {
3271
+ }, ie.prototype.isOpen = function() {
3272
3272
  return this.idbdb !== null;
3273
- }, se.prototype.hasBeenClosed = function() {
3273
+ }, ie.prototype.hasBeenClosed = function() {
3274
3274
  var e = this._state.dbOpenError;
3275
3275
  return e && e.name === "DatabaseClosed";
3276
- }, se.prototype.hasFailed = function() {
3276
+ }, ie.prototype.hasFailed = function() {
3277
3277
  return this._state.dbOpenError !== null;
3278
- }, se.prototype.dynamicallyOpened = function() {
3278
+ }, ie.prototype.dynamicallyOpened = function() {
3279
3279
  return this._state.autoSchema;
3280
- }, Object.defineProperty(se.prototype, "tables", { get: function() {
3280
+ }, Object.defineProperty(ie.prototype, "tables", { get: function() {
3281
3281
  var e = this;
3282
3282
  return I(this._allTables).map(function(n) {
3283
3283
  return e._allTables[n];
3284
3284
  });
3285
- }, enumerable: !1, configurable: !0 }), se.prototype.transaction = function() {
3285
+ }, enumerable: !1, configurable: !0 }), ie.prototype.transaction = function() {
3286
3286
  var e = (function(n, r, a) {
3287
3287
  var i = arguments.length;
3288
3288
  if (i < 2) throw new K.InvalidArgument("Too few arguments");
3289
3289
  for (var o = new Array(i - 1); --i; ) o[i - 1] = arguments[i];
3290
- return a = o.pop(), [n, Jn(o), a];
3290
+ return a = o.pop(), [n, Vn(o), a];
3291
3291
  }).apply(this, arguments);
3292
3292
  return this._transaction.apply(this, e);
3293
- }, se.prototype._transaction = function(e, n, r) {
3293
+ }, ie.prototype._transaction = function(e, n, r) {
3294
3294
  var a = this, i = G.trans;
3295
3295
  i && i.db === this && e.indexOf("!") === -1 || (i = null);
3296
3296
  var o, u, f = e.indexOf("?") !== -1;
@@ -3299,13 +3299,13 @@ function Ga() {
3299
3299
  if (u = n.map(function(m) {
3300
3300
  if (m = m instanceof a.Table ? m.name : m, typeof m != "string") throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
3301
3301
  return m;
3302
- }), e == "r" || e === mn) o = mn;
3302
+ }), e == "r" || e === En) o = En;
3303
3303
  else {
3304
- if (e != "rw" && e != bn) throw new K.InvalidArgument("Invalid transaction mode: " + e);
3305
- o = bn;
3304
+ if (e != "rw" && e != Sn) throw new K.InvalidArgument("Invalid transaction mode: " + e);
3305
+ o = Sn;
3306
3306
  }
3307
3307
  if (i) {
3308
- if (i.mode === mn && o === bn) {
3308
+ if (i.mode === En && o === Sn) {
3309
3309
  if (!f) throw new K.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
3310
3310
  i = null;
3311
3311
  }
@@ -3319,7 +3319,7 @@ function Ga() {
3319
3319
  } catch (m) {
3320
3320
  return i ? i._promise(null, function(E, h) {
3321
3321
  h(m);
3322
- }) : ae(m);
3322
+ }) : se(m);
3323
3323
  }
3324
3324
  var p = (function m(E, h, O, g, w) {
3325
3325
  return M.resolve().then(function() {
@@ -3328,78 +3328,78 @@ function Ga() {
3328
3328
  else try {
3329
3329
  y.create(), y.idbtrans._explicit = !0, E._state.PR1398_maxLoop = 3;
3330
3330
  } catch (R) {
3331
- return R.name === sn.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
3331
+ return R.name === dn.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
3332
3332
  return m(E, h, O, null, w);
3333
- })) : ae(R);
3333
+ })) : se(R);
3334
3334
  }
3335
- var A, D = an(w);
3336
- return D && nt(), S = M.follow(function() {
3335
+ var P, D = ln(w);
3336
+ return D && at(), S = M.follow(function() {
3337
3337
  var R;
3338
- (A = w.call(y, y)) && (D ? (R = Ie.bind(null, null), A.then(R, R)) : typeof A.next == "function" && typeof A.throw == "function" && (A = jn(A)));
3339
- }, S), (A && typeof A.then == "function" ? M.resolve(A).then(function(R) {
3340
- return y.active ? R : ae(new K.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
3338
+ (P = w.call(y, y)) && (D ? (R = Ne.bind(null, null), P.then(R, R)) : typeof P.next == "function" && typeof P.throw == "function" && (P = Ln(P)));
3339
+ }, S), (P && typeof P.then == "function" ? M.resolve(P).then(function(R) {
3340
+ return y.active ? R : se(new K.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
3341
3341
  }) : S.then(function() {
3342
- return A;
3342
+ return P;
3343
3343
  })).then(function(R) {
3344
3344
  return g && y._resolve(), y._completion.then(function() {
3345
3345
  return R;
3346
3346
  });
3347
3347
  }).catch(function(R) {
3348
- return y._reject(R), ae(R);
3348
+ return y._reject(R), se(R);
3349
3349
  });
3350
3350
  });
3351
3351
  }).bind(null, this, o, u, i, r);
3352
- return i ? i._promise(o, p, "lock") : G.trans ? Ue(G.transless, function() {
3352
+ return i ? i._promise(o, p, "lock") : G.trans ? Ye(G.transless, function() {
3353
3353
  return a._whenReady(p);
3354
3354
  }) : this._whenReady(p);
3355
- }, se.prototype.table = function(e) {
3355
+ }, ie.prototype.table = function(e) {
3356
3356
  if (!Q(this._allTables, e)) throw new K.InvalidTable("Table ".concat(e, " does not exist"));
3357
3357
  return this._allTables[e];
3358
- }, se);
3359
- function se(e, n) {
3358
+ }, ie);
3359
+ function ie(e, n) {
3360
3360
  var r = this;
3361
3361
  this._middlewares = {}, this.verno = 0;
3362
- var a = se.dependencies;
3363
- this._options = n = c({ addons: se.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, n), this._deps = { indexedDB: n.indexedDB, IDBKeyRange: n.IDBKeyRange }, a = n.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
3362
+ var a = ie.dependencies;
3363
+ this._options = n = c({ addons: ie.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, n), this._deps = { indexedDB: n.indexedDB, IDBKeyRange: n.IDBKeyRange }, a = n.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
3364
3364
  var i, o, u, f, p, m = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: V, dbReadyPromise: null, cancelOpen: V, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: n.autoOpen };
3365
3365
  m.dbReadyPromise = new M(function(h) {
3366
3366
  m.dbReadyResolve = h;
3367
3367
  }), m.openCanceller = new M(function(h, O) {
3368
3368
  m.cancelOpen = O;
3369
- }), this._state = m, this.name = e, this.on = pt(this, "populate", "blocked", "versionchange", "close", { ready: [on, V] }), this.on.ready.subscribe = Yn(this.on.ready.subscribe, function(h) {
3369
+ }), this._state = m, this.name = e, this.on = mt(this, "populate", "blocked", "versionchange", "close", { ready: [fn, V] }), this.on.ready.subscribe = ut(this.on.ready.subscribe, function(h) {
3370
3370
  return function(O, g) {
3371
- se.vip(function() {
3371
+ ie.vip(function() {
3372
3372
  var w, S = r._state;
3373
3373
  S.openComplete ? (S.dbOpenError || M.resolve().then(O), g && h(O)) : S.onReadyBeingFired ? (S.onReadyBeingFired.push(O), g && h(O)) : (h(O), w = r, g || h(function y() {
3374
3374
  w.on.ready.unsubscribe(O), w.on.ready.unsubscribe(y);
3375
3375
  }));
3376
3376
  });
3377
3377
  };
3378
- }), this.Collection = (i = this, gt(sa.prototype, function(A, y) {
3378
+ }), this.Collection = (i = this, bt(sa.prototype, function(P, y) {
3379
3379
  this.db = i;
3380
- var g = or, w = null;
3380
+ var g = ur, w = null;
3381
3381
  if (y) try {
3382
3382
  g = y();
3383
3383
  } catch (D) {
3384
3384
  w = D;
3385
3385
  }
3386
- var S = A._ctx, y = S.table, A = y.hook.reading.fire;
3387
- this._ctx = { table: y, index: S.index, isPrimKey: !S.index || y.schema.primKey.keyPath && S.index === y.schema.primKey.name, range: g, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: w, or: S.or, valueMapper: A !== ut ? A : null };
3388
- })), this.Table = (o = this, gt(dr.prototype, function(h, O, g) {
3389
- this.db = o, this._tx = g, this.name = h, this.schema = O, this.hook = o._allTables[h] ? o._allTables[h].hook : pt(null, { creating: [Jr, V], reading: [Xr, ut], updating: [Vr, V], deleting: [Zr, V] });
3390
- })), this.Transaction = (u = this, gt(ca.prototype, function(h, O, g, w, S) {
3386
+ var S = P._ctx, y = S.table, P = y.hook.reading.fire;
3387
+ this._ctx = { table: y, index: S.index, isPrimKey: !S.index || y.schema.primKey.keyPath && S.index === y.schema.primKey.name, range: g, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: w, or: S.or, valueMapper: P !== dt ? P : null };
3388
+ })), this.Table = (o = this, bt(hr.prototype, function(h, O, g) {
3389
+ this.db = o, this._tx = g, this.name = h, this.schema = O, this.hook = o._allTables[h] ? o._allTables[h].hook : mt(null, { creating: [Jr, V], reading: [Xr, dt], updating: [Vr, V], deleting: [Zr, V] });
3390
+ })), this.Transaction = (u = this, bt(ca.prototype, function(h, O, g, w, S) {
3391
3391
  var y = this;
3392
- this.db = u, this.mode = h, this.storeNames = O, this.schema = g, this.chromeTransactionDurability = w, this.idbtrans = null, this.on = pt(this, "complete", "error", "abort"), this.parent = S || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new M(function(A, D) {
3393
- y._resolve = A, y._reject = D;
3392
+ this.db = u, this.mode = h, this.storeNames = O, this.schema = g, this.chromeTransactionDurability = w, this.idbtrans = null, this.on = mt(this, "complete", "error", "abort"), this.parent = S || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new M(function(P, D) {
3393
+ y._resolve = P, y._reject = D;
3394
3394
  }), this._completion.then(function() {
3395
3395
  y.active = !1, y.on.complete.fire();
3396
- }, function(A) {
3396
+ }, function(P) {
3397
3397
  var D = y.active;
3398
- return y.active = !1, y.on.error.fire(A), y.parent ? y.parent._reject(A) : D && y.idbtrans && y.idbtrans.abort(), ae(A);
3398
+ return y.active = !1, y.on.error.fire(P), y.parent ? y.parent._reject(P) : D && y.idbtrans && y.idbtrans.abort(), se(P);
3399
3399
  });
3400
- })), this.Version = (f = this, gt(ga.prototype, function(h) {
3400
+ })), this.Version = (f = this, bt(ga.prototype, function(h) {
3401
3401
  this.db = f, this._cfg = { version: h, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3402
- })), this.WhereClause = (p = this, gt(mr.prototype, function(h, O, g) {
3402
+ })), this.WhereClause = (p = this, bt(yr.prototype, function(h, O, g) {
3403
3403
  if (this.db = p, this._ctx = { table: h, index: O === ":id" ? null : O, or: g }, this._cmp = this._ascending = X, this._descending = function(w, S) {
3404
3404
  return X(S, w);
3405
3405
  }, this._max = function(w, S) {
@@ -3411,10 +3411,10 @@ function Ga() {
3411
3411
  0 < h.newVersion ? console.warn("Another connection wants to upgrade database '".concat(r.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(r.name, "'. Closing db now to resume the delete request.")), r.close({ disableAutoOpen: !1 });
3412
3412
  }), this.on("blocked", function(h) {
3413
3413
  !h.newVersion || h.newVersion < h.oldVersion ? console.warn("Dexie.delete('".concat(r.name, "') was blocked")) : console.warn("Upgrade '".concat(r.name, "' blocked by other connection holding version ").concat(h.oldVersion / 10));
3414
- }), this._maxKey = vt(n.IDBKeyRange), this._createTransaction = function(h, O, g, w) {
3414
+ }), this._maxKey = Et(n.IDBKeyRange), this._createTransaction = function(h, O, g, w) {
3415
3415
  return new r.Transaction(h, O, g, r._options.chromeTransactionDurability, w);
3416
3416
  }, this._fireOnBlocked = function(h) {
3417
- r.on("blocked").fire(h), rt.filter(function(O) {
3417
+ r.on("blocked").fire(h), st.filter(function(O) {
3418
3418
  return O.name === r.name && O !== r && !O._state.vcFired;
3419
3419
  }).map(function(O) {
3420
3420
  return O.on("versionchange").fire(h);
@@ -3423,64 +3423,64 @@ function Ga() {
3423
3423
  var E = new Proxy(this, { get: function(h, O, g) {
3424
3424
  if (O === "_vip") return !0;
3425
3425
  if (O === "table") return function(S) {
3426
- return Jt(r.table(S), E);
3426
+ return tn(r.table(S), E);
3427
3427
  };
3428
3428
  var w = Reflect.get(h, O, g);
3429
- return w instanceof dr ? Jt(w, E) : O === "tables" ? w.map(function(S) {
3430
- return Jt(S, E);
3429
+ return w instanceof hr ? tn(w, E) : O === "tables" ? w.map(function(S) {
3430
+ return tn(S, E);
3431
3431
  }) : O === "_createTransaction" ? function() {
3432
- return Jt(w.apply(this, arguments), E);
3432
+ return tn(w.apply(this, arguments), E);
3433
3433
  } : w;
3434
3434
  } });
3435
3435
  this.vip = E, a.forEach(function(h) {
3436
3436
  return h(r);
3437
3437
  });
3438
3438
  }
3439
- var Zt, be = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", _a = (Kn.prototype.subscribe = function(e, n, r) {
3439
+ var nn, ye = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", _a = (zn.prototype.subscribe = function(e, n, r) {
3440
3440
  return this._subscribe(e && typeof e != "function" ? e : { next: e, error: n, complete: r });
3441
- }, Kn.prototype[be] = function() {
3441
+ }, zn.prototype[ye] = function() {
3442
3442
  return this;
3443
- }, Kn);
3444
- function Kn(e) {
3443
+ }, zn);
3444
+ function zn(e) {
3445
3445
  this._subscribe = e;
3446
3446
  }
3447
3447
  try {
3448
- Zt = { indexedDB: P.indexedDB || P.mozIndexedDB || P.webkitIndexedDB || P.msIndexedDB, IDBKeyRange: P.IDBKeyRange || P.webkitIDBKeyRange };
3448
+ nn = { indexedDB: A.indexedDB || A.mozIndexedDB || A.webkitIndexedDB || A.msIndexedDB, IDBKeyRange: A.IDBKeyRange || A.webkitIDBKeyRange };
3449
3449
  } catch {
3450
- Zt = { indexedDB: null, IDBKeyRange: null };
3450
+ nn = { indexedDB: null, IDBKeyRange: null };
3451
3451
  }
3452
- function kr(e) {
3452
+ function Nr(e) {
3453
3453
  var n, r = !1, a = new _a(function(i) {
3454
- var o = an(e), u, f = !1, p = {}, m = {}, E = { get closed() {
3454
+ var o = ln(e), u, f = !1, p = {}, m = {}, E = { get closed() {
3455
3455
  return f;
3456
3456
  }, unsubscribe: function() {
3457
- f || (f = !0, u && u.abort(), h && Ne.storagemutated.unsubscribe(g));
3457
+ f || (f = !0, u && u.abort(), h && je.storagemutated.unsubscribe(g));
3458
3458
  } };
3459
3459
  i.start && i.start(E);
3460
3460
  var h = !1, O = function() {
3461
- return gn(w);
3461
+ return wn(w);
3462
3462
  }, g = function(S) {
3463
- Yt(p, S), Tn(m, p) && O();
3463
+ Vt(p, S), Mn(m, p) && O();
3464
3464
  }, w = function() {
3465
- var S, y, A;
3466
- !f && Zt.indexedDB && (p = {}, S = {}, u && u.abort(), u = new AbortController(), A = function(D) {
3467
- var R = et();
3465
+ var S, y, P;
3466
+ !f && nn.indexedDB && (p = {}, S = {}, u && u.abort(), u = new AbortController(), P = function(D) {
3467
+ var R = nt();
3468
3468
  try {
3469
- o && nt();
3470
- var x = xe(e, D);
3471
- return x = o ? x.finally(Ie) : x;
3469
+ o && at();
3470
+ var x = Te(e, D);
3471
+ return x = o ? x.finally(Ne) : x;
3472
3472
  } finally {
3473
- R && tt();
3473
+ R && rt();
3474
3474
  }
3475
- }(y = { subscr: S, signal: u.signal, requery: O, querier: e, trans: null }), Promise.resolve(A).then(function(D) {
3475
+ }(y = { subscr: S, signal: u.signal, requery: O, querier: e, trans: null }), Promise.resolve(P).then(function(D) {
3476
3476
  r = !0, n = D, f || y.signal.aborted || (p = {}, function(R) {
3477
3477
  for (var x in R) if (Q(R, x)) return;
3478
3478
  return 1;
3479
- }(m = S) || h || (Ne(yt, g), h = !0), gn(function() {
3479
+ }(m = S) || h || (je(wt, g), h = !0), wn(function() {
3480
3480
  return !f && i.next && i.next(D);
3481
3481
  }));
3482
3482
  }, function(D) {
3483
- r = !1, ["DatabaseClosedError", "AbortError"].includes(D == null ? void 0 : D.name) || f || gn(function() {
3483
+ r = !1, ["DatabaseClosedError", "AbortError"].includes(D == null ? void 0 : D.name) || f || wn(function() {
3484
3484
  f || i.error && i.error(D);
3485
3485
  });
3486
3486
  }));
@@ -3493,34 +3493,34 @@ function Ga() {
3493
3493
  return n;
3494
3494
  }, a;
3495
3495
  }
3496
- var Qe = Ae;
3497
- function Ln(e) {
3498
- var n = Ce;
3496
+ var Ze = De;
3497
+ function Hn(e) {
3498
+ var n = Me;
3499
3499
  try {
3500
- Ce = !0, Ne.storagemutated.fire(e), $n(e, !0);
3500
+ Me = !0, je.storagemutated.fire(e), Kn(e, !0);
3501
3501
  } finally {
3502
- Ce = n;
3502
+ Me = n;
3503
3503
  }
3504
3504
  }
3505
- re(Qe, c(c({}, Pt), { delete: function(e) {
3506
- return new Qe(e, { addons: [] }).delete();
3505
+ re(Ze, c(c({}, kt), { delete: function(e) {
3506
+ return new Ze(e, { addons: [] }).delete();
3507
3507
  }, exists: function(e) {
3508
- return new Qe(e, { addons: [] }).open().then(function(n) {
3508
+ return new Ze(e, { addons: [] }).open().then(function(n) {
3509
3509
  return n.close(), !0;
3510
3510
  }).catch("NoSuchDatabaseError", function() {
3511
3511
  return !1;
3512
3512
  });
3513
3513
  }, getDatabaseNames: function(e) {
3514
3514
  try {
3515
- return n = Qe.dependencies, r = n.indexedDB, n = n.IDBKeyRange, (xn(r) ? Promise.resolve(r.databases()).then(function(a) {
3515
+ return n = Ze.dependencies, r = n.indexedDB, n = n.IDBKeyRange, (Cn(r) ? Promise.resolve(r.databases()).then(function(a) {
3516
3516
  return a.map(function(i) {
3517
3517
  return i.name;
3518
3518
  }).filter(function(i) {
3519
- return i !== $t;
3519
+ return i !== Kt;
3520
3520
  });
3521
- }) : Rn(r, n).toCollection().primaryKeys()).then(e);
3521
+ }) : Nn(r, n).toCollection().primaryKeys()).then(e);
3522
3522
  } catch {
3523
- return ae(new K.MissingAPI());
3523
+ return se(new K.MissingAPI());
3524
3524
  }
3525
3525
  var n, r;
3526
3526
  }, defineClass: function() {
@@ -3528,78 +3528,78 @@ function Ga() {
3528
3528
  ne(this, e);
3529
3529
  };
3530
3530
  }, ignoreTransaction: function(e) {
3531
- return G.trans ? Ue(G.transless, e) : e();
3532
- }, vip: In, async: function(e) {
3531
+ return G.trans ? Ye(G.transless, e) : e();
3532
+ }, vip: $n, async: function(e) {
3533
3533
  return function() {
3534
3534
  try {
3535
- var n = jn(e.apply(this, arguments));
3535
+ var n = Ln(e.apply(this, arguments));
3536
3536
  return n && typeof n.then == "function" ? n : M.resolve(n);
3537
3537
  } catch (r) {
3538
- return ae(r);
3538
+ return se(r);
3539
3539
  }
3540
3540
  };
3541
3541
  }, spawn: function(e, n, r) {
3542
3542
  try {
3543
- var a = jn(e.apply(r, n || []));
3543
+ var a = Ln(e.apply(r, n || []));
3544
3544
  return a && typeof a.then == "function" ? a : M.resolve(a);
3545
3545
  } catch (i) {
3546
- return ae(i);
3546
+ return se(i);
3547
3547
  }
3548
3548
  }, currentTransaction: { get: function() {
3549
3549
  return G.trans || null;
3550
3550
  } }, waitFor: function(e, n) {
3551
- return n = M.resolve(typeof e == "function" ? Qe.ignoreTransaction(e) : e).timeout(n || 6e4), G.trans ? G.trans.waitFor(n) : n;
3551
+ return n = M.resolve(typeof e == "function" ? Ze.ignoreTransaction(e) : e).timeout(n || 6e4), G.trans ? G.trans.waitFor(n) : n;
3552
3552
  }, Promise: M, debug: { get: function() {
3553
- return ve;
3553
+ return Ee;
3554
3554
  }, set: function(e) {
3555
- er(e);
3556
- } }, derive: Je, extend: ne, props: re, override: Yn, Events: pt, on: Ne, liveQuery: kr, extendObservabilitySet: Yt, getByKeyPath: Se, setByKeyPath: pe, delByKeyPath: function(e, n) {
3557
- typeof n == "string" ? pe(e, n, void 0) : "length" in n && [].map.call(n, function(r) {
3558
- pe(e, r, void 0);
3555
+ nr(e);
3556
+ } }, derive: _e, extend: ne, props: re, override: ut, Events: mt, on: je, liveQuery: Nr, extendObservabilitySet: Vt, getByKeyPath: ve, setByKeyPath: he, delByKeyPath: function(e, n) {
3557
+ typeof n == "string" ? he(e, n, void 0) : "length" in n && [].map.call(n, function(r) {
3558
+ he(e, r, void 0);
3559
3559
  });
3560
- }, shallowClone: Xn, deepClone: Me, getObjectDiff: Mn, cmp: X, asap: Qn, minKey: -1 / 0, addons: [], connections: rt, errnames: sn, dependencies: Zt, cache: Ye, semVer: "4.0.11", version: "4.0.11".split(".").map(function(e) {
3560
+ }, shallowClone: xt, deepClone: Ke, getObjectDiff: Fn, cmp: X, asap: Rt, minKey: -1 / 0, addons: [], connections: st, errnames: dn, dependencies: nn, cache: Je, semVer: "4.0.11", version: "4.0.11".split(".").map(function(e) {
3561
3561
  return parseInt(e);
3562
3562
  }).reduce(function(e, n, r) {
3563
3563
  return e + n / Math.pow(10, 2 * r);
3564
- }) })), Qe.maxKey = vt(Qe.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Ne(yt, function(e) {
3565
- Ce || (e = new CustomEvent(En, { detail: e }), Ce = !0, dispatchEvent(e), Ce = !1);
3566
- }), addEventListener(En, function(e) {
3567
- e = e.detail, Ce || Ln(e);
3564
+ }) })), Ze.maxKey = Et(Ze.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (je(wt, function(e) {
3565
+ Me || (e = new CustomEvent(Pn, { detail: e }), Me = !0, dispatchEvent(e), Me = !1);
3566
+ }), addEventListener(Pn, function(e) {
3567
+ e = e.detail, Me || Hn(e);
3568
3568
  }));
3569
- var it, Ce = !1, Tr = function() {
3569
+ var ct, Me = !1, Cr = function() {
3570
3570
  };
3571
- return typeof BroadcastChannel < "u" && ((Tr = function() {
3572
- (it = new BroadcastChannel(En)).onmessage = function(e) {
3573
- return e.data && Ln(e.data);
3571
+ return typeof BroadcastChannel < "u" && ((Cr = function() {
3572
+ (ct = new BroadcastChannel(Pn)).onmessage = function(e) {
3573
+ return e.data && Hn(e.data);
3574
3574
  };
3575
- })(), typeof it.unref == "function" && it.unref(), Ne(yt, function(e) {
3576
- Ce || it.postMessage(e);
3575
+ })(), typeof ct.unref == "function" && ct.unref(), je(wt, function(e) {
3576
+ Me || ct.postMessage(e);
3577
3577
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
3578
- if (!Ae.disableBfCache && e.persisted) {
3579
- ve && console.debug("Dexie: handling persisted pagehide"), it != null && it.close();
3580
- for (var n = 0, r = rt; n < r.length; n++) r[n].close({ disableAutoOpen: !1 });
3578
+ if (!De.disableBfCache && e.persisted) {
3579
+ Ee && console.debug("Dexie: handling persisted pagehide"), ct != null && ct.close();
3580
+ for (var n = 0, r = st; n < r.length; n++) r[n].close({ disableAutoOpen: !1 });
3581
3581
  }
3582
3582
  }), addEventListener("pageshow", function(e) {
3583
- !Ae.disableBfCache && e.persisted && (ve && console.debug("Dexie: handling persisted pageshow"), Tr(), Ln({ all: new le(-1 / 0, [[]]) }));
3583
+ !De.disableBfCache && e.persisted && (Ee && console.debug("Dexie: handling persisted pageshow"), Cr(), Hn({ all: new le(-1 / 0, [[]]) }));
3584
3584
  })), M.rejectionMapper = function(e, n) {
3585
- return !e || e instanceof Ve || e instanceof TypeError || e instanceof SyntaxError || !e.name || !qn[e.name] ? e : (n = new qn[e.name](n || e.message, e), "stack" in e && oe(n, "stack", { get: function() {
3585
+ return !e || e instanceof et || e instanceof TypeError || e instanceof SyntaxError || !e.name || !tr[e.name] ? e : (n = new tr[e.name](n || e.message, e), "stack" in e && ae(n, "stack", { get: function() {
3586
3586
  return this.inner.stack;
3587
3587
  } }), n);
3588
- }, er(ve), c(Ae, Object.freeze({ __proto__: null, Dexie: Ae, liveQuery: kr, Entity: cr, cmp: X, PropModification: mt, replacePrefix: function(e, n) {
3589
- return new mt({ replacePrefix: [e, n] });
3588
+ }, nr(Ee), c(De, Object.freeze({ __proto__: null, Dexie: De, liveQuery: Nr, Entity: lr, cmp: X, PropModification: yt, replacePrefix: function(e, n) {
3589
+ return new yt({ replacePrefix: [e, n] });
3590
3590
  }, add: function(e) {
3591
- return new mt({ add: e });
3591
+ return new yt({ add: e });
3592
3592
  }, remove: function(e) {
3593
- return new mt({ remove: e });
3594
- }, default: Ae, RangeSet: le, mergeRanges: St, rangesOverlap: Er }), { default: Ae }), Ae;
3593
+ return new yt({ remove: e });
3594
+ }, default: De, RangeSet: le, mergeRanges: _t, rangesOverlap: Or }), { default: De }), De;
3595
3595
  });
3596
- }(en)), en.exports;
3596
+ }(sn)), sn.exports;
3597
3597
  }
3598
3598
  var Ka = Ga();
3599
- const zn = /* @__PURE__ */ Ma(Ka), Cr = Symbol.for("Dexie"), tn = globalThis[Cr] || (globalThis[Cr] = zn);
3600
- if (zn.semVer !== tn.semVer)
3601
- throw new Error(`Two different versions of Dexie loaded in the same app: ${zn.semVer} and ${tn.semVer}`);
3602
- class jr {
3599
+ const Jn = /* @__PURE__ */ Ma(Ka), jr = Symbol.for("Dexie"), on = globalThis[jr] || (globalThis[jr] = Jn);
3600
+ if (Jn.semVer !== on.semVer)
3601
+ throw new Error(`Two different versions of Dexie loaded in the same app: ${Jn.semVer} and ${on.semVer}`);
3602
+ class Br {
3603
3603
  constructor(t) {
3604
3604
  b(this, "db");
3605
3605
  b(this, "subscribers", []);
@@ -3653,8 +3653,8 @@ class jr {
3653
3653
  } : (s.message = `Dashboard ${t.id} retrieved from storage`, s.success = !0, s);
3654
3654
  });
3655
3655
  b(this, "getDashboards", async (t) => {
3656
- const s = (P) => (t == null ? void 0 : t.id) === P.id, c = (P) => t != null && t.name ? P.name.includes(t == null ? void 0 : t.name) : !1;
3657
- let v = await this.db.table(_.DASHBOARD).toArray().then((P) => t != null && t.id ? P.filter(s) : P).then((P) => t != null && t.name ? P.filter(c) : P).catch(() => {
3656
+ const s = (A) => (t == null ? void 0 : t.id) === A.id, c = (A) => t != null && t.name ? A.name.includes(t == null ? void 0 : t.name) : !1;
3657
+ let v = await this.db.table(_.DASHBOARD).toArray().then((A) => t != null && t.id ? A.filter(s) : A).then((A) => t != null && t.name ? A.filter(c) : A).catch(() => {
3658
3658
  L(2, ["%cstorage", l.STORAGE, q.DASHBOARD_LOAD, t]);
3659
3659
  });
3660
3660
  return v !== void 0 && L(3, [
@@ -3702,19 +3702,19 @@ class jr {
3702
3702
  * Wipe Message data after expires timestamp
3703
3703
  */
3704
3704
  b(this, "cleanMessages", async () => {
3705
- const t = Date.now() / 1e3, s = (P) => P.expires < t, c = (P) => P.expires < t;
3706
- return await this.db.table(_.TOPICS).orderBy("expires").filter(s).delete().catch((P) => (console.error(
3705
+ const t = Date.now() / 1e3, s = (A) => A.expires < t, c = (A) => A.expires < t;
3706
+ return await this.db.table(_.TOPICS).orderBy("expires").filter(s).delete().catch((A) => (console.error(
3707
3707
  "%cstorage%c %cclean",
3708
3708
  l.STORAGE,
3709
3709
  l.NONE,
3710
3710
  l.MESSAGES,
3711
- P.message
3712
- ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(c).delete().catch((P) => (console.error(
3711
+ A.message
3712
+ ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(c).delete().catch((A) => (console.error(
3713
3713
  "%cstorage%c %clean",
3714
3714
  l.STORAGE,
3715
3715
  l.NONE,
3716
3716
  l.MESSAGES,
3717
- P.message
3717
+ A.message
3718
3718
  ), 0));
3719
3719
  });
3720
3720
  /**
@@ -3725,21 +3725,21 @@ class jr {
3725
3725
  b(this, "getMessages", async (t) => {
3726
3726
  const s = (t == null ? void 0 : t.order) ?? "utc";
3727
3727
  s !== "utc" && (t.since = Math.floor(Date.now() / 1e3) - 60 * 60 * 24 * 7), this.options.delay != 0 ? t.before = Math.floor(Date.now() / 1e3) - (this.options.delay || 0) : t.before = Math.floor(Date.now() / 1e3);
3728
- const c = (I) => I.utc > ((t == null ? void 0 : t.since) || 0), v = (I) => I.utc < ((t == null ? void 0 : t.before) || Date.now() / 1e3), P = (I) => (I == null ? void 0 : I.visible) !== 0;
3728
+ const c = (I) => I.utc > ((t == null ? void 0 : t.since) || 0), v = (I) => I.utc < ((t == null ? void 0 : t.before) || Date.now() / 1e3), A = (I) => (I == null ? void 0 : I.visible) !== 0;
3729
3729
  try {
3730
- const z = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(P).filter(c).filter(v).reverse().limit((t == null ? void 0 : t.limit) ?? 25).sortBy(s);
3731
- if (z.length === 0)
3730
+ const Y = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(A).filter(c).filter(v).reverse().limit((t == null ? void 0 : t.limit) ?? 25).sortBy(s);
3731
+ if (Y.length === 0)
3732
3732
  return {
3733
3733
  data: null,
3734
3734
  message: "No Messages error",
3735
3735
  success: !1,
3736
3736
  query: t
3737
3737
  };
3738
- let ne = z.map((ie) => this.db.table(_.MESSAGES).get({ id: ie.message_id }));
3739
- return tn.Promise.all(ne).then(async (ie) => {
3738
+ let ne = Y.map((ue) => this.db.table(_.MESSAGES).get({ id: ue.message_id }));
3739
+ return on.Promise.all(ne).then(async (ue) => {
3740
3740
  const Q = {
3741
3741
  data: {
3742
- messages: ie.map((re) => re.data)
3742
+ messages: ue.map((re) => re.data)
3743
3743
  },
3744
3744
  query: t,
3745
3745
  message: "Messages retrieved successfully",
@@ -3785,60 +3785,62 @@ class jr {
3785
3785
  return 400;
3786
3786
  const c = s.data.title;
3787
3787
  let v = 0;
3788
- return await s.data.messages.forEach(async (P) => {
3789
- P.id !== null && await this.db.table(_.MESSAGES).put({
3790
- id: P.id,
3791
- utc: P.utc,
3792
- data: P,
3793
- expires: P.expires
3794
- }).catch((I) => {
3788
+ return await s.data.messages.forEach(async (A) => {
3789
+ var I, Y, ne, ue, U, Q, re, Ie, ae, _e, Pt, Dt, Ge, ut;
3790
+ A.id !== null && (A.topics[0] = {
3791
+ message_id: A.id,
3792
+ engagement: ((I = A.topics[0]) == null ? void 0 : I.engagement) || ((Y = A.dynamics) == null ? void 0 : Y.engagement) || 0,
3793
+ impressions: ((ne = A.topics[0]) == null ? void 0 : ne.impressions) || ((ue = A.dynamics) == null ? void 0 : ue.semrush_visits) || 0,
3794
+ reach: ((U = A.topics[0]) == null ? void 0 : U.reach) || ((Q = A.dynamics) == null ? void 0 : Q.potential_reach) || 0,
3795
+ sentiment: ((re = A.topics[0]) == null ? void 0 : re.sentiment) || 0
3796
+ }, await this.db.table(_.MESSAGES).put({
3797
+ id: A.id,
3798
+ utc: A.utc,
3799
+ data: A,
3800
+ expires: A.expires
3801
+ }).catch((ge) => {
3795
3802
  v++, console.error(
3796
3803
  "%cstorage",
3797
3804
  l.STORAGE,
3798
3805
  "set message",
3799
3806
  `title: ${c}`,
3800
- P,
3801
- I.message
3807
+ A,
3808
+ ge.message
3809
+ );
3810
+ }), await this.db.table(_.TOPICS).put({
3811
+ title: c,
3812
+ widget_id: t.widget,
3813
+ message_id: A.id,
3814
+ dashboard_id: t.dashboard,
3815
+ engagement: ((Ie = A.topics[0]) == null ? void 0 : Ie.engagement) || ((ae = A.dynamics) == null ? void 0 : ae.engagement) || 0,
3816
+ impressions: ((_e = A.topics[0]) == null ? void 0 : _e.impressions) || ((Pt = A.dynamics) == null ? void 0 : Pt.semrush_visits) || 0,
3817
+ reach: ((Dt = A.topics[0]) == null ? void 0 : Dt.reach) || ((Ge = A.dynamics) == null ? void 0 : Ge.potential_reach) || 0,
3818
+ sentiment: ((ut = A.topics[0]) == null ? void 0 : ut.sentiment) || 0,
3819
+ utc: A.utc,
3820
+ expires: A.expires
3821
+ }).catch((ge) => {
3822
+ v++, console.error(
3823
+ "%cstorage",
3824
+ l.STORAGE,
3825
+ "set topic",
3826
+ `title: ${c}`,
3827
+ A,
3828
+ ge.message
3802
3829
  );
3803
- }).then(async () => {
3804
- var I, z, ne, ie, U, Q, re;
3805
- await this.db.table(_.TOPICS).put({
3806
- title: c,
3807
- widget_id: t.widget,
3808
- message_id: P.id,
3809
- dashboard_id: t.dashboard,
3810
- engagement: ((I = P.topics[0]) == null ? void 0 : I.engagement) || ((z = P.dynamics) == null ? void 0 : z.engagement) || 0,
3811
- impressions: ((ne = P.topics[0]) == null ? void 0 : ne.impressions) || ((ie = P.dynamics) == null ? void 0 : ie.semrush_visits) || 0,
3812
- reach: ((U = P.topics[0]) == null ? void 0 : U.reach) || ((Q = P.dynamics) == null ? void 0 : Q.potential_reach) || 0,
3813
- sentiment: ((re = P.topics[0]) == null ? void 0 : re.sentiment) || 0,
3814
- utc: P.utc,
3815
- expires: P.expires
3816
- }).catch((je) => {
3830
+ }), await s.data.topics.forEach(async (ge) => {
3831
+ const Rt = ge.message_id, ve = ge.visible ? 1 : 0, he = ge.title;
3832
+ await this.db.table(_.TOPICS).where("message_id").equals(Rt).modify({ visible: ve }).catch((xt) => {
3817
3833
  v++, console.error(
3818
3834
  "%cstorage",
3819
3835
  l.STORAGE,
3820
- "set topic",
3821
- `title: ${c}`,
3822
- P,
3823
- je.message
3836
+ "update message visibility",
3837
+ `title: ${he}`,
3838
+ `widget: ${ge.widget_id}`,
3839
+ xt.message
3824
3840
  );
3825
3841
  });
3826
- }).then(async () => {
3827
- await s.data.topics.forEach(async (I) => {
3828
- const z = I.message_id, ne = I.visible ? 1 : 0, ie = I.title;
3829
- await this.db.table(_.TOPICS).where("message_id").equals(z).modify({ visible: ne }).catch((U) => {
3830
- v++, console.error(
3831
- "%cstorage",
3832
- l.STORAGE,
3833
- "update message visibility",
3834
- `title: ${ie}`,
3835
- `widget: ${I.widget_id}`,
3836
- U.message
3837
- );
3838
- });
3839
- });
3840
- }).then(() => v === 0 ? 201 : 400);
3841
- });
3842
+ }));
3843
+ }), v === 0 ? 201 : 400;
3842
3844
  });
3843
3845
  /**
3844
3846
  * Retrieve Series Data
@@ -3896,10 +3898,10 @@ class jr {
3896
3898
  */
3897
3899
  b(this, "getWidgets", async (t) => {
3898
3900
  const s = (I) => (t == null ? void 0 : t.dashboard) === I.dashboard_id, c = (I) => (t == null ? void 0 : t.type) === I.type, v = (I) => t != null && t.name ? I.name.includes(t == null ? void 0 : t.name) : !1;
3899
- let P = await this.db.table(_.WIDGET).toArray().then((I) => t != null && t.dashboard ? I.filter(s) : I).then((I) => t != null && t.type ? I.filter(c) : I).then((I) => t != null && t.name ? I.filter(v) : I).catch(() => {
3901
+ let A = await this.db.table(_.WIDGET).toArray().then((I) => t != null && t.dashboard ? I.filter(s) : I).then((I) => t != null && t.type ? I.filter(c) : I).then((I) => t != null && t.name ? I.filter(v) : I).catch(() => {
3900
3902
  L(2, ["%cstorage", l.STORAGE, q.WIDGET_LOAD, t]);
3901
3903
  });
3902
- return P !== void 0 && L(3, [
3904
+ return A !== void 0 && L(3, [
3903
3905
  "%cstorage%c %cwidgets",
3904
3906
  l.STORAGE,
3905
3907
  l.NONE,
@@ -3907,9 +3909,9 @@ class jr {
3907
3909
  t
3908
3910
  ]), {
3909
3911
  // @ts-ignore
3910
- data: P !== void 0 ? { data: P, query: t } : null,
3911
- message: P !== void 0 ? "Widgets loaded from storage" : "Widgets load error",
3912
- success: P !== void 0
3912
+ data: A !== void 0 ? { data: A, query: t } : null,
3913
+ message: A !== void 0 ? "Widgets loaded from storage" : "Widgets load error",
3914
+ success: A !== void 0
3913
3915
  };
3914
3916
  });
3915
3917
  /**
@@ -3945,7 +3947,7 @@ class jr {
3945
3947
  */
3946
3948
  b(this, "subscribe", (t) => (t = Ca(t), this.subscribers.filter(
3947
3949
  (c) => c.widget === t.widget
3948
- ).length > 0 || (t.type === _.MESSAGES && (t = Ot(this.options, t)), console.info(
3950
+ ).length > 0 || (t.type === _.MESSAGES && (t = At(this.options, t)), console.info(
3949
3951
  "%cstorage%c %csubscribe",
3950
3952
  l.STORAGE,
3951
3953
  l.NONE,
@@ -3986,12 +3988,12 @@ class jr {
3986
3988
  * @returns IResponse
3987
3989
  */
3988
3990
  b(this, "getSlides", async (t) => {
3989
- const s = (I) => t != null && t.id ? t.id = I.id : !1, c = (I) => t != null && t.name ? I.name.includes(t == null ? void 0 : t.name) : !1, P = await this.db.table(_.SLIDE).toArray().then((I) => t != null && t.id ? I.filter(s) : I).then((I) => t != null && t.name ? I.filter(c) : I);
3990
- return P !== void 0 && L(3, ["%cstorage%c %cslides", l.STORAGE, l.NONE, l.SLIDE, t]), {
3991
+ const s = (I) => t != null && t.id ? t.id = I.id : !1, c = (I) => t != null && t.name ? I.name.includes(t == null ? void 0 : t.name) : !1, A = await this.db.table(_.SLIDE).toArray().then((I) => t != null && t.id ? I.filter(s) : I).then((I) => t != null && t.name ? I.filter(c) : I);
3992
+ return A !== void 0 && L(3, ["%cstorage%c %cslides", l.STORAGE, l.NONE, l.SLIDE, t]), {
3991
3993
  // @ts-ignore
3992
- data: P !== void 0 ? { slides: P, query: t } : null,
3993
- message: P !== void 0 ? "Slides loaded from storage" : "Slides load error",
3994
- success: P !== void 0
3994
+ data: A !== void 0 ? { slides: A, query: t } : null,
3995
+ message: A !== void 0 ? "Slides loaded from storage" : "Slides load error",
3996
+ success: A !== void 0
3995
3997
  };
3996
3998
  });
3997
3999
  /**
@@ -4048,7 +4050,7 @@ class jr {
4048
4050
  * @returns IResponse
4049
4051
  */
4050
4052
  b(this, "getPresentations", async (t) => {
4051
- const s = (P) => t != null && t.name ? P.name.includes(t == null ? void 0 : t.name) : !1, v = await this.db.table(_.PRESENTATION).toArray().then((P) => t != null && t.name ? P.filter(s) : P);
4053
+ const s = (A) => t != null && t.name ? A.name.includes(t == null ? void 0 : t.name) : !1, v = await this.db.table(_.PRESENTATION).toArray().then((A) => t != null && t.name ? A.filter(s) : A);
4052
4054
  return v !== void 0 && L(3, [
4053
4055
  "%cstorage%c %cpresentations",
4054
4056
  l.STORAGE,
@@ -4114,7 +4116,7 @@ class jr {
4114
4116
  * @returns IResponse
4115
4117
  */
4116
4118
  b(this, "getPreferences", async (t) => {
4117
- const s = (P) => t != null && t.id ? t.id = P.id : !1, v = await this.db.table(_.SLIDE).toArray().then((P) => t != null && t.id ? P.filter(s) : P);
4119
+ const s = (A) => t != null && t.id ? t.id = A.id : !1, v = await this.db.table(_.SLIDE).toArray().then((A) => t != null && t.id ? A.filter(s) : A);
4118
4120
  return v !== void 0 && L(3, [
4119
4121
  "%cstorage%c %cpreferences",
4120
4122
  l.STORAGE,
@@ -4151,7 +4153,7 @@ class jr {
4151
4153
  message: `Preference ${t.id} save error: ${s.message}`,
4152
4154
  success: !1
4153
4155
  })));
4154
- this.options = t, this.db = new tn(t.app), this.db.version(11).stores({
4156
+ this.options = t, this.db = new on(t.app), this.db.version(11).stores({
4155
4157
  channel: "id,slide_index",
4156
4158
  cloud: "id,dashboard_id",
4157
4159
  dashboard: "id,name,update",
@@ -4168,7 +4170,7 @@ class jr {
4168
4170
  }), this.db.open();
4169
4171
  }
4170
4172
  }
4171
- function Hn(d) {
4173
+ function Zn(d) {
4172
4174
  return new Promise((t, s) => {
4173
4175
  d.oncomplete = d.onsuccess = () => t(d.result), d.onabort = d.onerror = () => s(d.error);
4174
4176
  });
@@ -4176,34 +4178,34 @@ function Hn(d) {
4176
4178
  function La(d, t) {
4177
4179
  const s = indexedDB.open(d);
4178
4180
  s.onupgradeneeded = () => s.result.createObjectStore(t);
4179
- const c = Hn(s);
4180
- return (v, P) => c.then((I) => P(I.transaction(t, v).objectStore(t)));
4181
+ const c = Zn(s);
4182
+ return (v, A) => c.then((I) => A(I.transaction(t, v).objectStore(t)));
4181
4183
  }
4182
- let Un;
4183
- function Mr() {
4184
- return Un || (Un = La("keyval-store", "keyval")), Un;
4184
+ let Xn;
4185
+ function Gr() {
4186
+ return Xn || (Xn = La("keyval-store", "keyval")), Xn;
4185
4187
  }
4186
- function De(d, t = Mr()) {
4187
- return t("readonly", (s) => Hn(s.get(d)));
4188
+ function xe(d, t = Gr()) {
4189
+ return t("readonly", (s) => Zn(s.get(d)));
4188
4190
  }
4189
- function $e(d, t, s = Mr()) {
4190
- return s("readwrite", (c) => (c.put(t, d), Hn(c.transaction)));
4191
+ function Be(d, t, s = Gr()) {
4192
+ return s("readwrite", (c) => (c.put(t, d), Zn(c.transaction)));
4191
4193
  }
4192
- class Br {
4194
+ class Kr {
4193
4195
  constructor(t) {
4194
4196
  b(this, "subscribers", []);
4195
4197
  b(this, "options");
4196
4198
  b(this, "getCloud", async (t) => {
4197
4199
  const s = Z(t);
4198
- return await De(s).then((c) => c).catch(() => (console.warn("%capi", l.API, _.CLOUD, t.slide, t.widget), { data: null, message: "Cloud Data error", success: !1 }));
4200
+ return await xe(s).then((c) => c).catch(() => (console.warn("%capi", l.API, _.CLOUD, t.slide, t.widget), { data: null, message: "Cloud Data error", success: !1 }));
4199
4201
  });
4200
4202
  b(this, "getSeries", async (t) => {
4201
4203
  const s = Z(t);
4202
- return await De(s).then((c) => c).catch(() => (console.warn("%capi", l.API, _.SERIES, t.slide, t.widget), { data: null, message: "Series Data error", success: !1 }));
4204
+ return await xe(s).then((c) => c).catch(() => (console.warn("%capi", l.API, _.SERIES, t.slide, t.widget), { data: null, message: "Series Data error", success: !1 }));
4203
4205
  });
4204
4206
  b(this, "getMessages", async (t) => {
4205
4207
  const s = Z(t);
4206
- return await De(s).then((c) => c).catch(() => (console.warn("%capi", l.API, _.MESSAGES, t.slide, t.widget), { data: null, message: "Messages Data error", success: !1 }));
4208
+ return await xe(s).then((c) => c).catch(() => (console.warn("%capi", l.API, _.MESSAGES, t.slide, t.widget), { data: null, message: "Messages Data error", success: !1 }));
4207
4209
  });
4208
4210
  /**
4209
4211
  * Update Cloud
@@ -4215,7 +4217,7 @@ class Br {
4215
4217
  if (!s.success)
4216
4218
  return 400;
4217
4219
  const c = Z(t);
4218
- return delete s.success, delete s.message, await $e(c, s).then(() => 201).catch((v) => (console.error(
4220
+ return delete s.success, delete s.message, await Be(c, s).then(() => 201).catch((v) => (console.error(
4219
4221
  "%cstorage",
4220
4222
  l.STORAGE,
4221
4223
  _.CLOUD,
@@ -4233,7 +4235,7 @@ class Br {
4233
4235
  if (!s.success)
4234
4236
  return 400;
4235
4237
  const c = Z(t);
4236
- return delete s.success, delete s.message, await $e(c, s).then(() => 201).catch((v) => (console.error(
4238
+ return delete s.success, delete s.message, await Be(c, s).then(() => 201).catch((v) => (console.error(
4237
4239
  "%cstorage",
4238
4240
  l.STORAGE,
4239
4241
  _.SERIES,
@@ -4251,7 +4253,7 @@ class Br {
4251
4253
  if (!s.success)
4252
4254
  return 400;
4253
4255
  const c = Z(t);
4254
- return delete s.success, delete s.message, await $e(c, s).then(() => 201).catch((v) => (console.error(
4256
+ return delete s.success, delete s.message, await Be(c, s).then(() => 201).catch((v) => (console.error(
4255
4257
  "%cstorage",
4256
4258
  l.STORAGE,
4257
4259
  _.MESSAGES,
@@ -4267,7 +4269,7 @@ class Br {
4267
4269
  });
4268
4270
  b(this, "getDashboard", async (t) => {
4269
4271
  const s = Z(t);
4270
- return await De(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.SLIDE, t.id), {
4272
+ return await xe(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.SLIDE, t.id), {
4271
4273
  data: null,
4272
4274
  message: `Widget ${t.data.id} load error: ${c.message}`,
4273
4275
  success: !1
@@ -4288,7 +4290,7 @@ class Br {
4288
4290
  id: t.dashboard,
4289
4291
  name: t.name
4290
4292
  };
4291
- return await $e(s, c).then(() => ({
4293
+ return await Be(s, c).then(() => ({
4292
4294
  data: null,
4293
4295
  message: `Dashboard ${t.data.id} saved to storage`,
4294
4296
  success: !0
@@ -4306,7 +4308,7 @@ class Br {
4306
4308
  });
4307
4309
  b(this, "getWidget", async (t) => {
4308
4310
  const s = Z(t);
4309
- return await De(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.SLIDE, t.id), {
4311
+ return await xe(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.SLIDE, t.id), {
4310
4312
  data: null,
4311
4313
  message: `Widget ${t.data.id} load error: ${c.message}`,
4312
4314
  success: !1
@@ -4329,7 +4331,7 @@ class Br {
4329
4331
  dashboard_id: t.dashboard,
4330
4332
  type: t.type
4331
4333
  };
4332
- return await $e(s, c).then(() => ({
4334
+ return await Be(s, c).then(() => ({
4333
4335
  data: null,
4334
4336
  message: `Widget ${t.data.id} saved to storage`,
4335
4337
  success: !0
@@ -4350,7 +4352,7 @@ class Br {
4350
4352
  * @param query IQuery
4351
4353
  * @returns null
4352
4354
  */
4353
- b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = Ot(this.options, t)), this.subscribers.filter(
4355
+ b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = At(this.options, t)), this.subscribers.filter(
4354
4356
  (c) => c.widget === t.widget
4355
4357
  ).length > 0 || (console.debug(
4356
4358
  "%cstorage%c %csubscribe",
@@ -4367,7 +4369,7 @@ class Br {
4367
4369
  b(this, "getSubscribers", async () => await new Promise((t) => t(this.subscribers)));
4368
4370
  b(this, "getSlide", async (t) => {
4369
4371
  const s = Z(t);
4370
- return await De(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.SLIDE, t.id), {
4372
+ return await xe(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.SLIDE, t.id), {
4371
4373
  data: null,
4372
4374
  message: `Slide ${t.data.id} load error: ${c.message}`,
4373
4375
  success: !1
@@ -4390,7 +4392,7 @@ class Br {
4390
4392
  json: t.data.json || {},
4391
4393
  html: t.data.html || ""
4392
4394
  };
4393
- return await $e(s, c).then(() => ({
4395
+ return await Be(s, c).then(() => ({
4394
4396
  data: null,
4395
4397
  message: `Slide ${t.data.id} saved to storage`,
4396
4398
  success: !0
@@ -4408,7 +4410,7 @@ class Br {
4408
4410
  });
4409
4411
  b(this, "getPresentation", async (t) => {
4410
4412
  const s = Z(t);
4411
- return await De(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.PRESENTATION, t.id), {
4413
+ return await xe(s).then((c) => c).catch((c) => (console.warn("%capi", l.API, _.PRESENTATION, t.id), {
4412
4414
  data: null,
4413
4415
  message: `Slide ${t.data.id} load error: ${c.message}`,
4414
4416
  success: !1
@@ -4426,7 +4428,7 @@ class Br {
4426
4428
  */
4427
4429
  b(this, "setPresentation", async (t) => {
4428
4430
  const s = Z(t), c = t.data;
4429
- return await $e(s, c).then(() => ({
4431
+ return await Be(s, c).then(() => ({
4430
4432
  data: null,
4431
4433
  message: `Presentation ${t.data.id} saved to storage`,
4432
4434
  success: !0
@@ -4442,12 +4444,12 @@ class Br {
4442
4444
  success: !1
4443
4445
  }));
4444
4446
  });
4445
- b(this, "getPreference", async (t) => await De(`${_.PREFERENCE}.${t.id}`).then((s) => s).catch((s) => (console.warn("%capi", l.API, _.PREFERENCE, t.id), {
4447
+ b(this, "getPreference", async (t) => await xe(`${_.PREFERENCE}.${t.id}`).then((s) => s).catch((s) => (console.warn("%capi", l.API, _.PREFERENCE, t.id), {
4446
4448
  data: null,
4447
4449
  message: `Preference ${t.id} get error: ${s.message}`,
4448
4450
  success: !1
4449
4451
  })));
4450
- b(this, "getPreferences", async () => await De(`${_.PREFERENCE}`).then((t) => t).catch((t) => (console.warn("%capi", l.API, _.PREFERENCE), {
4452
+ b(this, "getPreferences", async () => await xe(`${_.PREFERENCE}`).then((t) => t).catch((t) => (console.warn("%capi", l.API, _.PREFERENCE), {
4451
4453
  data: null,
4452
4454
  message: `Preferences get error: ${t.message}`,
4453
4455
  success: !1
@@ -4457,7 +4459,7 @@ class Br {
4457
4459
  * @param preference IPreference
4458
4460
  * @returns number
4459
4461
  */
4460
- b(this, "setPreference", async (t) => await $e(`${_.PREFERENCE}.${t.id}`, t.value).then(() => ({
4462
+ b(this, "setPreference", async (t) => await Be(`${_.PREFERENCE}.${t.id}`, t.value).then(() => ({
4461
4463
  data: null,
4462
4464
  message: `Preference ${t.id} save error`,
4463
4465
  success: !0
@@ -4475,7 +4477,7 @@ class Br {
4475
4477
  this.options = t;
4476
4478
  }
4477
4479
  }
4478
- class Gr {
4480
+ class Lr {
4479
4481
  constructor(t) {
4480
4482
  b(this, "subscribers", []);
4481
4483
  b(this, "options");
@@ -4641,7 +4643,7 @@ class Gr {
4641
4643
  * @param query IQuery
4642
4644
  * @returns null
4643
4645
  */
4644
- b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = Ot(this.options, t)), this.subscribers.filter(
4646
+ b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = At(this.options, t)), this.subscribers.filter(
4645
4647
  (c) => c.widget === t.widget
4646
4648
  ).length || (console.debug(
4647
4649
  "%cstorage%c %csubscribe",
@@ -4789,7 +4791,7 @@ class Gr {
4789
4791
  };
4790
4792
  }
4791
4793
  }
4792
- class Kr {
4794
+ class Fr {
4793
4795
  constructor(t) {
4794
4796
  b(this, "subscribers", []);
4795
4797
  b(this, "options");
@@ -4955,7 +4957,7 @@ class Kr {
4955
4957
  * @param query IQuery
4956
4958
  * @returns null
4957
4959
  */
4958
- b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = Ot(this.options, t)), this.subscribers.filter(
4960
+ b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = At(this.options, t)), this.subscribers.filter(
4959
4961
  (c) => c.widget === t.widget
4960
4962
  ).length || (console.debug(
4961
4963
  "%cstorage%c %csubscribe",
@@ -5108,7 +5110,7 @@ class Kr {
5108
5110
  };
5109
5111
  }
5110
5112
  }
5111
- class Lr {
5113
+ class Wr {
5112
5114
  constructor(t) {
5113
5115
  b(this, "subscribers", []);
5114
5116
  b(this, "options");
@@ -5274,7 +5276,7 @@ class Lr {
5274
5276
  * @param query IQuery
5275
5277
  * @returns null
5276
5278
  */
5277
- b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = Ot(this.options, t)), this.subscribers.filter(
5279
+ b(this, "subscribe", (t) => (t.type === _.MESSAGES && (t = At(this.options, t)), this.subscribers.filter(
5278
5280
  (c) => c.widget === t.widget
5279
5281
  ).length || (console.debug(
5280
5282
  "%cstorage%c %csubscribe",
@@ -5431,8 +5433,8 @@ class os {
5431
5433
  s.push(this.api.get(c));
5432
5434
  }), await Promise.allSettled(s).then(
5433
5435
  (c) => c.forEach(async (v) => {
5434
- var z, ne, ie;
5435
- let P, I = 400;
5436
+ var Y, ne, ue;
5437
+ let A, I = 400;
5436
5438
  if (v.status === "fulfilled") {
5437
5439
  let U = v.value;
5438
5440
  if (U.success === !0) {
@@ -5440,10 +5442,10 @@ class os {
5440
5442
  let re = "";
5441
5443
  switch (U.query.type) {
5442
5444
  case _.MESSAGES:
5443
- let je;
5444
- je = U.data.messages.filter(
5445
- (oe) => oe.id !== null
5446
- ), U.data.messages = je, re = Wn(U.data.messages), Q != null && Q.hash && Q.hash === re ? (L(3, [
5445
+ let Ie;
5446
+ Ie = U.data.messages.filter(
5447
+ (ae) => ae.id !== null
5448
+ ), U.data.messages = Ie, re = Qn(U.data.messages), Q != null && Q.hash && Q.hash === re ? (L(3, [
5447
5449
  "%capi%c %cno updates",
5448
5450
  l.API,
5449
5451
  l.NONE,
@@ -5457,12 +5459,12 @@ class os {
5457
5459
  l.NO_UPDATES,
5458
5460
  _.MESSAGES,
5459
5461
  U
5460
- ]), I = 204) : (P = U, Q.hash = re, I = await ((z = this.sm) == null ? void 0 : z.setMessages(U.query, U).then((oe) => {
5461
- setTimeout(() => (oe = 201, this.broadcastUpdate(oe, U), oe), 500);
5462
+ ]), I = 204) : (A = U, Q.hash = re, I = await ((Y = this.sm) == null ? void 0 : Y.setMessages(U.query, U).then((ae) => {
5463
+ setTimeout(() => (ae = 201, this.broadcastUpdate(ae, U), ae), 500);
5462
5464
  })));
5463
5465
  break;
5464
5466
  case _.CLOUD:
5465
- re = Wn(U.data.cloud), Q != null && Q.hash && Q.hash === re ? (L(3, [
5467
+ re = Qn(U.data.cloud), Q != null && Q.hash && Q.hash === re ? (L(3, [
5466
5468
  "%capi%c %cno updates",
5467
5469
  l.API,
5468
5470
  l.NONE,
@@ -5476,17 +5478,17 @@ class os {
5476
5478
  l.NO_UPDATES,
5477
5479
  _.CLOUD,
5478
5480
  U
5479
- ]), I = 204) : (Q.hash = re, P = {
5481
+ ]), I = 204) : (Q.hash = re, A = {
5480
5482
  data: {
5481
5483
  cloud: U.data
5482
5484
  },
5483
5485
  message: U.message,
5484
5486
  success: U.success,
5485
5487
  query: U.query
5486
- }, I = await ((ne = this.sm) == null ? void 0 : ne.setCloud(U.query, P.data).then((oe) => this.broadcastUpdate(oe, U))));
5488
+ }, I = await ((ne = this.sm) == null ? void 0 : ne.setCloud(U.query, A.data).then((ae) => this.broadcastUpdate(ae, U))));
5487
5489
  break;
5488
5490
  case _.SERIES:
5489
- re = Wn(U.data.series), Q != null && Q.hash && Q.hash === re ? (L(3, [
5491
+ re = Qn(U.data.series), Q != null && Q.hash && Q.hash === re ? (L(3, [
5490
5492
  "%capi%c %cno updates",
5491
5493
  l.API,
5492
5494
  l.NONE,
@@ -5500,12 +5502,12 @@ class os {
5500
5502
  l.NO_UPDATES,
5501
5503
  _.SERIES,
5502
5504
  U
5503
- ]), I = 204) : (Q.hash = re, P = {
5505
+ ]), I = 204) : (Q.hash = re, A = {
5504
5506
  data: U.data,
5505
5507
  message: U.message,
5506
5508
  success: U.success,
5507
5509
  query: U.query
5508
- }, I = await ((ie = this.sm) == null ? void 0 : ie.setSeries(U.query, U.data).then((oe) => this.broadcastUpdate(oe, U))));
5510
+ }, I = await ((ue = this.sm) == null ? void 0 : ue.setSeries(U.query, U.data).then((ae) => this.broadcastUpdate(ae, U))));
5509
5511
  break;
5510
5512
  default:
5511
5513
  L(4, [
@@ -5585,7 +5587,7 @@ class os {
5585
5587
  }
5586
5588
  });
5587
5589
  b(this, "cleanMessages", async () => {
5588
- var c, v, P;
5590
+ var c, v, A;
5589
5591
  if ((c = this.options) != null && c.suspended) {
5590
5592
  L(2, [
5591
5593
  "%cstorage%c %cstorage",
@@ -5596,7 +5598,7 @@ class os {
5596
5598
  ]);
5597
5599
  return;
5598
5600
  }
5599
- const t = ((v = this.options) == null ? void 0 : v.retention) || 86400 * 4, s = await ((P = this.sm) == null ? void 0 : P.cleanMessages(
5601
+ const t = ((v = this.options) == null ? void 0 : v.retention) || 86400 * 4, s = await ((A = this.sm) == null ? void 0 : A.cleanMessages(
5600
5602
  t
5601
5603
  ));
5602
5604
  L(2, [
@@ -5710,20 +5712,20 @@ class os {
5710
5712
  ]), this.bc.onmessage = (c) => {
5711
5713
  this.actions(c);
5712
5714
  }, this.bc.postMessage({ event: q.STORAGE_INIT, data: {} }), this.api = new $a(t), t.storage) {
5713
- case ye.DEXIE:
5714
- this.sm = new jr(t);
5715
+ case we.DEXIE:
5716
+ this.sm = new Br(t);
5715
5717
  break;
5716
- case ye.LOCAL:
5717
- this.sm = new Kr(t);
5718
+ case we.LOCAL:
5719
+ this.sm = new Fr(t);
5718
5720
  break;
5719
- case ye.SESSION:
5720
- this.sm = new Gr(t);
5721
+ case we.SESSION:
5722
+ this.sm = new Lr(t);
5721
5723
  break;
5722
- case ye.KEYVAL:
5723
- this.sm = new Br(t);
5724
+ case we.KEYVAL:
5725
+ this.sm = new Kr(t);
5724
5726
  break;
5725
- case ye.WINDOW:
5726
- this.sm = new Lr(t);
5727
+ case we.WINDOW:
5728
+ this.sm = new Wr(t);
5727
5729
  break;
5728
5730
  }
5729
5731
  }
@@ -5798,20 +5800,20 @@ class Fa {
5798
5800
  }) : await ((s = this.sm) == null ? void 0 : s.getSeries(t));
5799
5801
  });
5800
5802
  switch (this.sm = null, t.storage) {
5801
- case ye.DEXIE:
5802
- this.sm = new jr(t);
5803
+ case we.DEXIE:
5804
+ this.sm = new Br(t);
5803
5805
  break;
5804
- case ye.LOCAL:
5805
- this.sm = new Kr(t);
5806
+ case we.LOCAL:
5807
+ this.sm = new Fr(t);
5806
5808
  break;
5807
- case ye.SESSION:
5808
- this.sm = new Gr(t);
5809
+ case we.SESSION:
5810
+ this.sm = new Lr(t);
5809
5811
  break;
5810
- case ye.KEYVAL:
5811
- this.sm = new Br(t);
5812
+ case we.KEYVAL:
5813
+ this.sm = new Kr(t);
5812
5814
  break;
5813
- case ye.WINDOW:
5814
- this.sm = new Lr(t);
5815
+ case we.WINDOW:
5816
+ this.sm = new Wr(t);
5815
5817
  break;
5816
5818
  }
5817
5819
  }
@@ -5822,7 +5824,7 @@ class cs {
5822
5824
  *
5823
5825
  * @param element widget web component
5824
5826
  * @param callbacks functions in the widget that will receive the update
5825
- * @param selector container for the element - by default buzzcasting-presentation (optional)
5827
+ * @param selector container for the element - by default buzzcasting-app (optional)
5826
5828
  */
5827
5829
  constructor(t, s, c) {
5828
5830
  b(this, "storageReader");
@@ -5952,11 +5954,11 @@ class cs {
5952
5954
  window.dispatchEvent(s);
5953
5955
  });
5954
5956
  var I;
5955
- this.element = t, this.callbacks = s, c = typeof c < "u" ? c : "buzzcasting-presentation";
5957
+ this.element = t, this.callbacks = s, c = typeof c < "u" ? c : "buzzcasting-app";
5956
5958
  let v;
5957
- v = { ...t.dataset }, delete v.hmr, v.presentation = ((I = t.closest(c.toUpperCase())) == null ? void 0 : I.id) ?? `${c} not found`, this.query = v, xa(t);
5958
- const P = window.BuzzCasting.getOptions();
5959
- this.storageReader = new Fa(P), this.broadcastChannel = new BroadcastChannel(v.presentation), this.broadcastListener();
5959
+ v = { ...t.dataset }, delete v.hmr, v.presentation = ((I = t.closest(c.toUpperCase())) == null ? void 0 : I.presentation) ?? `${c} not found`, this.query = v, xa(t);
5960
+ const A = window.BuzzCasting.getOptions();
5961
+ this.storageReader = new Fa(A), this.broadcastChannel = new BroadcastChannel(v.presentation), this.broadcastListener();
5960
5962
  }
5961
5963
  addCallbackListener(t) {
5962
5964
  this.callbacks.push(t);
@@ -5981,8 +5983,8 @@ class cs {
5981
5983
  ]);
5982
5984
  try {
5983
5985
  c.widget === t.widget && this.callbacks.forEach(async (v) => {
5984
- const P = await this.getData();
5985
- v(P);
5986
+ const A = await this.getData();
5987
+ v(A);
5986
5988
  });
5987
5989
  } catch {
5988
5990
  L(4, [q.WIDGET_UPDATE, c]);
@@ -6027,8 +6029,8 @@ export {
6027
6029
  Fa as BuzzcastingStorageReader,
6028
6030
  l as CSS,
6029
6031
  q as EVENTS,
6030
- qt as MODERATION,
6031
- ye as STORAGE,
6032
+ an as MODERATION,
6033
+ we as STORAGE,
6032
6034
  cs as Widget,
6033
6035
  Ua as anonymize,
6034
6036
  za as attachedMedia,
@@ -6041,7 +6043,7 @@ export {
6041
6043
  Ia as deepMerge,
6042
6044
  Ha as filterAttributes,
6043
6045
  Za as formatContent,
6044
- Wn as hashSum,
6046
+ Qn as hashSum,
6045
6047
  Va as intToString,
6046
6048
  qa as numberFormatter,
6047
6049
  ss as randomValue,