buzzcasting-storage 3.17.5 → 3.18.3

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,4 +1,4 @@
1
- var _ = /* @__PURE__ */ ((f) => (f.CARDS = "cards", f.CLOUD = "cloud", f.DASHBOARD = "dashboard", f.DASHBOARDS = "dashboards", f.IMAGES = "images", f.MESSAGES = "messages", f.PREFERENCE = "preference", f.PREFERENCES = "preferences", f.PRESENTATION = "presentation", f.PRESENTATIONS = "presentations", f.SERIES = "series", f.SLIDE = "slide", f.SLIDES = "slides", f.TOPICS = "topics", f.WIDGET = "widget", f.WIDGETS = "widgets", f))(_ || {}), o = /* @__PURE__ */ ((f) => (f.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", f.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", f.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", f.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", f.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", f.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", f.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", f.NONE = "color:transparent;background-color:transparent;", f.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", f.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", f.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", f.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", f.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", f.WIDGET = "color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", f.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", f))(o || {}), J = /* @__PURE__ */ ((f) => (f.ADD_SLIDE = "addSlide", f.APP_READY = "appReady", f.API_UPDATE = "apiUpdate", f.BACKGROUND_UPDATE = "backgroundUpdate", f.BUILDER_PREVIEW = "builderPreview", f.COMPONENT_UPDATE = "componentUpdate", f.APPROVE_MESSAGE = "approveMessage", f.CHANNEL = "channel", f.CLEAN_MESSAGES = "cleanMessages", f.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", f.CLOSE_BUILDER_MODAL = "closeBuilderModal", f.CLOSE_MODAL = "closeModal", f.COLOR_UPDATE = "colorUpdate", f.COMPONENT_INDEX = "componentIndex", f.CSS_SET = "setCss", f.CSS_STORE = "storeCss", f.DASHBOARD_LOAD = "loadDashboard", f.DASHBOARD_STORE = "storeDashboard", f.DASHBOARD_UPDATED = "dashboardUpdated", f.ERROR = "error", f.HIDE_MESSAGE = "hideMessage", f.HIDE_LABELS = "hideLabels", f.IMAGE_GET = "getImage", f.IMAGE_SET = "setImage", f.IMAGE_STORED = "imageStored", f.LAUPPUT_UPDATE = "layoutUpdate", f.PREV_SLIDE = "prevSlide", f.RELOAD_PRESENTATION = "reloadPresentation", f.STAR_MESSAGE = "starMessage", f.GOTO_SLIDE = "gotoSlide", f.NEXT_SLIDE = "nextSlide", f.PREFERENCE_LOAD = "loadPreference", f.PREFERENCE_STORE = "storePreference", f.PREFERENCE_UPDATED = "preferenceUpdated", f.PAUSE_PRESENTATION = "pausePresentation", f.PRESENTATION_READY = "presentationReady", f.PRESENTATION_LOAD = "loadPresentation", f.PRESENTATION_STORE = "storePresentation", f.PRESENTATION_UPDATED = "presentationUpdated", f.ROW_COL_UPDATE = "rowcolupdate", f.SCREENSHOT_TAKE = "takeScreenshot", f.SCREENSHOT_STORE = "storeScreenshot", f.SECTION_UPDATE = "sectionUpdate", f.SHOW_BUILDER_DIALOG = "showBuilderDialog", f.SHOW_BUILDER_MODAL = "showBuilderModal", f.SHOW_MODAL = "showModal", f.SLIDE_DID_LOAD = "slideDidLoad", f.SLIDE_GET = "getSlide", f.SLIDE_GOTO = "slideGoto", f.SLIDE_LOAD = "loadSlide", f.SLIDE_READY = "slideReady", f.SLIDE_SAVED = "slideSaved", f.SLIDE_SET = "setSlide", f.SLIDE_STORE = "storeSlide", f.SLIDE_STORED = "slideStored", f.SLIDE_TRANSITIONER = "slideTransitioner", f.SLIDE_UPDATED = "slideUpdated", f.START_TRANSITIONER = "startTransitioner", f.STORAGE_INIT = "storageInit", f.STREAM = "stream", f.SUBSCRIBE = "subscribe", f.SUSPEND_ACCOUNT = "suspendAccount", f.SWITCH_PRESENTATION = "switchPresentation", f.REMOVE_CLOUD = "removeCloud", f.UPDATE = "update", f.UPLOAD_COMPLETED = "uploadCompleted", f.VERSION = "version", f.WIDGETS_CLEAR = "widgetsClear", f.WIDGET_DID_LOAD = "widgetDidLoad", f.WIDGET_DID_UPDATE = "widgetDidUpdate", f.WIDGET_LOAD = "widgetLoad", f.WIDGET_STORE = "widgetStore", f.WIDGET_UPDATE = "widgetUpdate", f.WS_API_REQUEST = "wsApiRequest", f.WS_API_RESPONSE = "wsApiResponse", f.WS_API_UPDATE = "wsApiRUpdate", f))(J || {}), tr = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(tr || {}), pe = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(pe || {});
1
+ var _ = /* @__PURE__ */ ((f) => (f.CARDS = "cards", f.CLOUD = "cloud", f.DASHBOARD = "dashboard", f.DASHBOARDS = "dashboards", f.IMAGES = "images", f.MESSAGES = "messages", f.PREFERENCE = "preference", f.PREFERENCES = "preferences", f.PRESENTATION = "presentation", f.PRESENTATIONS = "presentations", f.SERIES = "series", f.SLIDE = "slide", f.SLIDES = "slides", f.TOPICS = "topics", f.WIDGET = "widget", f.WIDGETS = "widgets", f))(_ || {}), o = /* @__PURE__ */ ((f) => (f.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", f.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", f.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", f.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", f.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", f.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", f.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", f.NONE = "color:transparent;background-color:transparent;", f.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", f.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", f.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", f.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", f.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", f.WIDGET = "color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", f.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", f))(o || {}), J = /* @__PURE__ */ ((f) => (f.ADD_SLIDE = "addSlide", f.APP_READY = "appReady", f.API_UPDATE = "apiUpdate", f.BACKGROUND_UPDATE = "backgroundUpdate", f.BUILDER_PREVIEW = "builderPreview", f.COMPONENT_UPDATE = "componentUpdate", f.APPROVE_MESSAGE = "approveMessage", f.CHANNEL = "channel", f.CLEAN_MESSAGES = "cleanMessages", f.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", f.CLOSE_BUILDER_MODAL = "closeBuilderModal", f.CLOSE_MODAL = "closeModal", f.COLOR_UPDATE = "colorUpdate", f.COMPONENT_INDEX = "componentIndex", f.CSS_SET = "setCss", f.CSS_STORE = "storeCss", f.DASHBOARD_LOAD = "loadDashboard", f.DASHBOARD_STORE = "storeDashboard", f.DASHBOARD_UPDATED = "dashboardUpdated", f.ERROR = "error", f.HIDE_MESSAGE = "hideMessage", f.HIDE_LABELS = "hideLabels", f.IMAGE_GET = "getImage", f.IMAGE_SET = "setImage", f.IMAGE_STORED = "imageStored", f.LAUPPUT_UPDATE = "layoutUpdate", f.PREV_SLIDE = "prevSlide", f.RELOAD_PRESENTATION = "reloadPresentation", f.STAR_MESSAGE = "starMessage", f.GOTO_SLIDE = "gotoSlide", f.NEXT_SLIDE = "nextSlide", f.PREFERENCE_LOAD = "loadPreference", f.PREFERENCE_STORE = "storePreference", f.PREFERENCE_UPDATED = "preferenceUpdated", f.PAUSE_PRESENTATION = "pausePresentation", f.PRESENTATION_READY = "presentationReady", f.PRESENTATION_LOAD = "loadPresentation", f.PRESENTATION_STORE = "storePresentation", f.PRESENTATION_UPDATED = "presentationUpdated", f.ROW_COL_UPDATE = "rowcolupdate", f.SCREENSHOT_TAKE = "takeScreenshot", f.SCREENSHOT_STORE = "storeScreenshot", f.SECTION_UPDATE = "sectionUpdate", f.SHOW_BUILDER_DIALOG = "showBuilderDialog", f.SHOW_BUILDER_MODAL = "showBuilderModal", f.SHOW_MODAL = "showModal", f.SLIDE_DID_LOAD = "slideDidLoad", f.SLIDE_GET = "getSlide", f.SLIDE_GOTO = "slideGoto", f.SLIDE_LOAD = "loadSlide", f.SLIDE_READY = "slideReady", f.SLIDE_SAVED = "slideSaved", f.SLIDE_SET = "setSlide", f.SLIDE_STORE = "storeSlide", f.SLIDE_STORED = "slideStored", f.SLIDE_TRANSITIONER = "slideTransitioner", f.SLIDE_UPDATED = "slideUpdated", f.START_TRANSITIONER = "startTransitioner", f.STORAGE_INIT = "storageInit", f.STREAM = "stream", f.SUBSCRIBE = "subscribe", f.SUSPEND_ACCOUNT = "suspendAccount", f.SWITCH_PRESENTATION = "switchPresentation", f.REMOVE_CLOUD = "removeCloud", f.UPDATE = "update", f.UPLOAD_COMPLETED = "uploadCompleted", f.VERSION = "version", f.WIDGETS_CLEAR = "widgetsClear", f.WIDGET_DID_LOAD = "widgetDidLoad", f.WIDGET_DID_UPDATE = "widgetDidUpdate", f.WIDGET_LOAD = "widgetLoad", f.WIDGET_STORE = "widgetStore", f.WIDGET_UPDATE = "widgetUpdate", f.WS_API_REQUEST = "wsApiRequest", f.WS_API_RESPONSE = "wsApiResponse", f.WS_API_UPDATE = "wsApiRUpdate", f))(J || {}), rr = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(rr || {}), pe = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(pe || {});
2
2
  function Da(f) {
3
3
  const t = {};
4
4
  for (let i = 0; i < f.length; i++) {
@@ -16,7 +16,7 @@ function Ta(f, t) {
16
16
  f = `0${f}`;
17
17
  return f;
18
18
  }
19
- function Oe(f, t) {
19
+ function _e(f, t) {
20
20
  let i, l, g;
21
21
  if (t.length === 0)
22
22
  return f;
@@ -31,54 +31,54 @@ function Ra(f, t, i) {
31
31
  }
32
32
  }
33
33
  function Mn(f, t, i, l) {
34
- const g = Oe(Oe(Oe(f, i), xa(t)), typeof t);
34
+ const g = _e(_e(_e(f, i), xa(t)), typeof t);
35
35
  if (t === null)
36
- return Oe(g, "null");
36
+ return _e(g, "null");
37
37
  if (t === void 0)
38
- return Oe(g, "undefined");
38
+ return _e(g, "undefined");
39
39
  if (typeof t == "object" || typeof t == "function") {
40
40
  if (l.includes(t))
41
- return Oe(g, `[Circular]${i}`);
41
+ return _e(g, `[Circular]${i}`);
42
42
  l.push(t);
43
43
  const b = Ra(g, t, l);
44
44
  if (!("valueOf" in t) || typeof t.valueOf != "function")
45
45
  return b;
46
46
  try {
47
- return Oe(b, String(t.valueOf()));
48
- } catch (D) {
49
- return Oe(b, `[valueOf exception]${D.stack || D.message}`);
47
+ return _e(b, String(t.valueOf()));
48
+ } catch (I) {
49
+ return _e(b, `[valueOf exception]${I.stack || I.message}`);
50
50
  }
51
51
  }
52
- return Oe(g, t.toString());
52
+ return _e(g, t.toString());
53
53
  }
54
54
  function xa(f) {
55
55
  return Object.prototype.toString.call(f);
56
56
  }
57
- function Ur(f) {
57
+ function Wr(f) {
58
58
  return Ta(Mn(0, f, "", []).toString(16), 8);
59
59
  }
60
- const st = (f) => {
60
+ const ot = (f) => {
61
61
  let t = {}, i = f.split(",");
62
62
  for (let l = 0; l < i.length; l++) t[i[l]] = !0;
63
63
  return t;
64
64
  };
65
- st(
65
+ ot(
66
66
  "area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
67
67
  );
68
- st(
68
+ ot(
69
69
  "a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"
70
70
  );
71
- st(
71
+ ot(
72
72
  "abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"
73
73
  );
74
- st("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
75
- st(
74
+ ot("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
75
+ ot(
76
76
  "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
77
77
  );
78
- st("script,style");
78
+ ot("script,style");
79
79
  const ka = new BroadcastChannel("logging"), G = async (f = 0, t) => {
80
80
  ka.postMessage({ action: "log", level: f, message: t });
81
- }, St = (f) => {
81
+ }, _t = (f) => {
82
82
  switch (f?.type) {
83
83
  case _.MESSAGES:
84
84
  return o.MESSAGES;
@@ -101,16 +101,16 @@ function Ca(f) {
101
101
  }
102
102
  return f;
103
103
  }
104
- function _t(f, t) {
105
- let i, l, g, b, D;
104
+ function Pt(f, t) {
105
+ let i, l, g, b, I;
106
106
  switch (f.moderation) {
107
- case tr.BEFORE:
108
- i = /* @__PURE__ */ new Date(), l = f.beforeTime?.split(":"), g = Number.parseInt(l ? l[0] : "00"), b = Number.parseInt(l ? l[1] : "00"), D = Number.parseInt(l ? l[2] : "00"), t.before = i.setHours(g, b, D, 0) / 1e3, t.period || (t.period = i.getDay() === 1 ? 72 : 24);
107
+ case rr.BEFORE:
108
+ i = /* @__PURE__ */ new Date(), l = f.beforeTime?.split(":"), g = Number.parseInt(l ? l[0] : "00"), b = Number.parseInt(l ? l[1] : "00"), I = Number.parseInt(l ? l[2] : "00"), t.before = i.setHours(g, b, I, 0) / 1e3, t.period || (t.period = i.getDay() === 1 ? 72 : 24);
109
109
  break;
110
- case tr.DELAYED:
110
+ case rr.DELAYED:
111
111
  f.delay && f.delay > 0 && (t.delay = `${f.delay}`);
112
112
  break;
113
- case tr.APPROVED:
113
+ case rr.APPROVED:
114
114
  t.approved = "1";
115
115
  break;
116
116
  default:
@@ -118,7 +118,7 @@ function _t(f, t) {
118
118
  }
119
119
  return t;
120
120
  }
121
- const $a = "3.17.4";
121
+ const $a = "3.18.2";
122
122
  async function* ja(f) {
123
123
  const t = f.pipeThrough(new TextDecoderStream("utf-8")).getReader();
124
124
  let i = "";
@@ -173,16 +173,16 @@ class Ga {
173
173
  const { version: i } = this.options, l = this.headers(), g = Object.assign({}, t);
174
174
  delete g.type, delete g.hash, delete g.order, g.topics = `${g.dashboard}-${g.widget}`, delete g.presentation;
175
175
  const b = Object.keys(g).length > 0 ? `?${new URLSearchParams(g).toString()}` : "";
176
- let D = "";
176
+ let I = "";
177
177
  switch (t.type) {
178
178
  case _.MESSAGES:
179
- D = o.MESSAGES;
179
+ I = o.MESSAGES;
180
180
  break;
181
181
  case _.SERIES:
182
- D = o.SERIES;
182
+ I = o.SERIES;
183
183
  break;
184
184
  case _.CLOUD:
185
- D = o.CLOUD;
185
+ I = o.CLOUD;
186
186
  break;
187
187
  }
188
188
  return G(3, [
@@ -191,17 +191,17 @@ class Ga {
191
191
  o.NONE,
192
192
  o.API,
193
193
  o.NONE,
194
- D,
194
+ I,
195
195
  t.widget,
196
196
  g
197
197
  ]), await fetch(
198
198
  [this.url, "api", i, t.type].join("/") + b,
199
199
  { ...l, method: "get" }
200
- ).then(async (x) => {
201
- if (!x.ok)
202
- throw new Error(`${x.status}`);
203
- return x;
204
- }).then((x) => x.json()).then((x) => (x.query = t, x)).catch((x) => ({ success: !1, message: `${x}`, data: null, query: t }));
200
+ ).then(async (T) => {
201
+ if (!T.ok)
202
+ throw new Error(`${T.status}`);
203
+ return T;
204
+ }).then((T) => T.json()).then((T) => (T.query = t, T)).catch((T) => ({ success: !1, message: `${T}`, data: null, query: t }));
205
205
  }
206
206
  async ndjson(t) {
207
207
  const { version: i } = this.options, l = this.headers(), g = await fetch(
@@ -236,8 +236,8 @@ class Ga {
236
236
  }
237
237
  async hideLabels(t) {
238
238
  const { version: i } = this.options, l = this.formHeaders(), g = new URLSearchParams(), b = t.labels || [];
239
- for (const [D, x] of b.entries())
240
- g.append(`custom_filters[${D}]`, x);
239
+ for (const [I, T] of b.entries())
240
+ g.append(`custom_filters[${I}]`, T);
241
241
  return console.info(
242
242
  "%capi%c %cput",
243
243
  o.API,
@@ -249,11 +249,11 @@ class Ga {
249
249
  ), await fetch(
250
250
  [this.url, "api", i, t.type, t.widget].join("/"),
251
251
  { ...l, body: g, method: "put" }
252
- ).then((D) => {
253
- if (!D.ok)
254
- throw new Error(D.statusText);
255
- return D;
256
- }).then((D) => D.json()).catch((D) => ({ succes: !1, message: D, data: [] }));
252
+ ).then((I) => {
253
+ if (!I.ok)
254
+ throw new Error(I.statusText);
255
+ return I;
256
+ }).then((I) => I.json()).catch((I) => ({ succes: !1, message: I, data: [] }));
257
257
  }
258
258
  async loadSlide(t) {
259
259
  const { version: i } = this.options, l = this.headers(), g = Object.assign({}, t);
@@ -273,10 +273,10 @@ class Ga {
273
273
  throw new Error(`${b.status}`);
274
274
  return b;
275
275
  }).then((b) => b.json()).then((b) => {
276
- let D;
277
- return t.type = "slides", b.query = t, b?.data && (Array.isArray(b.data) ? (D = structuredClone(b.data), D.forEach((x) => {
278
- typeof x.json == "string" && (x.json = JSON.parse(x.json));
279
- })) : (D = structuredClone(b.data), D.json = JSON.parse(D.json)), b.data = D), b;
276
+ let I;
277
+ return t.type = "slides", b.query = t, b?.data && (Array.isArray(b.data) ? (I = structuredClone(b.data), I.forEach((T) => {
278
+ typeof T.json == "string" && (T.json = JSON.parse(T.json));
279
+ })) : (I = structuredClone(b.data), I.json = JSON.parse(I.json)), b.data = I), b;
280
280
  }).catch((b) => ({ success: !1, message: `${b}`, data: null }));
281
281
  }
282
282
  /**
@@ -480,7 +480,7 @@ var Ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
480
480
  function Ka(f) {
481
481
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
482
482
  }
483
- var rr = { exports: {} }, La = rr.exports, jn;
483
+ var nr = { exports: {} }, La = nr.exports, jn;
484
484
  function Ba() {
485
485
  return jn || (jn = 1, (function(f, t) {
486
486
  (function(i, l) {
@@ -502,50 +502,50 @@ function Ba() {
502
502
  for (var a, s = 0, c = r.length; s < c; s++) !a && s in r || ((a = a || Array.prototype.slice.call(r, 0, s))[s] = r[s]);
503
503
  return e.concat(a || Array.prototype.slice.call(r));
504
504
  }
505
- var b = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ma, D = Object.keys, x = Array.isArray;
505
+ var b = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ma, I = Object.keys, T = Array.isArray;
506
506
  function te(e, r) {
507
- return typeof r != "object" || D(r).forEach(function(n) {
507
+ return typeof r != "object" || I(r).forEach(function(n) {
508
508
  e[n] = r[n];
509
509
  }), e;
510
510
  }
511
511
  typeof Promise > "u" || b.Promise || (b.Promise = Promise);
512
- var se = Object.getPrototypeOf, At = {}.hasOwnProperty;
513
- function re(e, r) {
514
- return At.call(e, r);
512
+ var me = Object.getPrototypeOf, fe = {}.hasOwnProperty;
513
+ function ae(e, r) {
514
+ return fe.call(e, r);
515
515
  }
516
516
  function ge(e, r) {
517
- typeof r == "function" && (r = r(se(e))), (typeof Reflect > "u" ? D : Reflect.ownKeys)(r).forEach(function(n) {
518
- Ae(e, n, r[n]);
517
+ typeof r == "function" && (r = r(me(e))), (typeof Reflect > "u" ? I : Reflect.ownKeys)(r).forEach(function(n) {
518
+ Pe(e, n, r[n]);
519
519
  });
520
520
  }
521
- var Vr = Object.defineProperty;
522
- function Ae(e, r, n, a) {
523
- Vr(e, r, te(n && re(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
521
+ var it = Object.defineProperty;
522
+ function Pe(e, r, n, a) {
523
+ it(e, r, te(n && ae(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
524
524
  }
525
- function ze(e) {
525
+ function Ye(e) {
526
526
  return { from: function(r) {
527
- return e.prototype = Object.create(r.prototype), Ae(e.prototype, "constructor", e), { extend: ge.bind(null, e.prototype) };
527
+ return e.prototype = Object.create(r.prototype), Pe(e.prototype, "constructor", e), { extend: ge.bind(null, e.prototype) };
528
528
  } };
529
529
  }
530
530
  var Hn = Object.getOwnPropertyDescriptor, Vn = [].slice;
531
- function Pt(e, r, n) {
531
+ function Nt(e, r, n) {
532
532
  return Vn.call(e, r, n);
533
533
  }
534
534
  function zr(e, r) {
535
535
  return r(e);
536
536
  }
537
- function ot(e) {
537
+ function ct(e) {
538
538
  if (!e) throw new Error("Assertion Failed");
539
539
  }
540
540
  function Yr(e) {
541
541
  b.setImmediate ? setImmediate(e) : setTimeout(e, 0);
542
542
  }
543
- function ve(e, r) {
544
- if (typeof r == "string" && re(e, r)) return e[r];
543
+ function Ee(e, r) {
544
+ if (typeof r == "string" && ae(e, r)) return e[r];
545
545
  if (!r) return e;
546
546
  if (typeof r != "string") {
547
547
  for (var n = [], a = 0, s = r.length; a < s; ++a) {
548
- var c = ve(e, r[a]);
548
+ var c = Ee(e, r[a]);
549
549
  n.push(c);
550
550
  }
551
551
  return n;
@@ -553,71 +553,71 @@ function Ba() {
553
553
  var u = r.indexOf(".");
554
554
  if (u !== -1) {
555
555
  var d = e[r.substr(0, u)];
556
- return d == null ? void 0 : ve(d, r.substr(u + 1));
556
+ return d == null ? void 0 : Ee(d, r.substr(u + 1));
557
557
  }
558
558
  }
559
- function le(e, r, n) {
559
+ function ue(e, r, n) {
560
560
  if (e && r !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof r != "string" && "length" in r) {
561
- ot(typeof n != "string" && "length" in n);
562
- for (var a = 0, s = r.length; a < s; ++a) le(e, r[a], n[a]);
561
+ ct(typeof n != "string" && "length" in n);
562
+ for (var a = 0, s = r.length; a < s; ++a) ue(e, r[a], n[a]);
563
563
  } else {
564
564
  var c, u, d = r.indexOf(".");
565
- d !== -1 ? (c = r.substr(0, d), (u = r.substr(d + 1)) === "" ? n === void 0 ? x(e) && !isNaN(parseInt(c)) ? e.splice(c, 1) : delete e[c] : e[c] = n : le(d = !(d = e[c]) || !re(e, c) ? e[c] = {} : d, u, n)) : n === void 0 ? x(e) && !isNaN(parseInt(r)) ? e.splice(r, 1) : delete e[r] : e[r] = n;
565
+ d !== -1 ? (c = r.substr(0, d), (u = r.substr(d + 1)) === "" ? n === void 0 ? T(e) && !isNaN(parseInt(c)) ? e.splice(c, 1) : delete e[c] : e[c] = n : ue(d = !(d = e[c]) || !ae(e, c) ? e[c] = {} : d, u, n)) : n === void 0 ? T(e) && !isNaN(parseInt(r)) ? e.splice(r, 1) : delete e[r] : e[r] = n;
566
566
  }
567
567
  }
568
568
  function Xr(e) {
569
569
  var r, n = {};
570
- for (r in e) re(e, r) && (n[r] = e[r]);
570
+ for (r in e) ae(e, r) && (n[r] = e[r]);
571
571
  return n;
572
572
  }
573
573
  var zn = [].concat;
574
574
  function Qr(e) {
575
575
  return zn.apply([], e);
576
576
  }
577
- var Ge = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Qr([8, 16, 32, 64].map(function(e) {
577
+ var Me = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Qr([8, 16, 32, 64].map(function(e) {
578
578
  return ["Int", "Uint", "Float"].map(function(r) {
579
579
  return r + e + "Array";
580
580
  });
581
581
  }))).filter(function(e) {
582
582
  return b[e];
583
- }), Jr = new Set(Ge.map(function(e) {
583
+ }), Jr = new Set(Me.map(function(e) {
584
584
  return b[e];
585
- })), it = null;
586
- function Ce(e) {
587
- return it = /* @__PURE__ */ new WeakMap(), e = (function r(n) {
585
+ })), ut = null;
586
+ function $e(e) {
587
+ return ut = /* @__PURE__ */ new WeakMap(), e = (function r(n) {
588
588
  if (!n || typeof n != "object") return n;
589
- var a = it.get(n);
589
+ var a = ut.get(n);
590
590
  if (a) return a;
591
- if (x(n)) {
592
- a = [], it.set(n, a);
591
+ if (T(n)) {
592
+ a = [], ut.set(n, a);
593
593
  for (var s = 0, c = n.length; s < c; ++s) a.push(r(n[s]));
594
594
  } else if (Jr.has(n.constructor)) a = n;
595
595
  else {
596
- var u, d = se(n);
597
- for (u in a = d === Object.prototype ? {} : Object.create(d), it.set(n, a), n) re(n, u) && (a[u] = r(n[u]));
596
+ var u, d = me(n);
597
+ for (u in a = d === Object.prototype ? {} : Object.create(d), ut.set(n, a), n) ae(n, u) && (a[u] = r(n[u]));
598
598
  }
599
599
  return a;
600
- })(e), it = null, e;
600
+ })(e), ut = null, e;
601
601
  }
602
602
  var Yn = {}.toString;
603
- function nr(e) {
603
+ function ar(e) {
604
604
  return Yn.call(e).slice(8, -1);
605
605
  }
606
- var ar = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Xn = typeof ar == "symbol" ? function(e) {
606
+ var sr = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Xn = typeof sr == "symbol" ? function(e) {
607
607
  var r;
608
- return e != null && (r = e[ar]) && r.apply(e);
608
+ return e != null && (r = e[sr]) && r.apply(e);
609
609
  } : function() {
610
610
  return null;
611
611
  };
612
- function $e(e, r) {
612
+ function je(e, r) {
613
613
  return r = e.indexOf(r), 0 <= r && e.splice(r, 1), 0 <= r;
614
614
  }
615
- var Ye = {};
616
- function Ee(e) {
615
+ var Xe = {};
616
+ function we(e) {
617
617
  var r, n, a, s;
618
618
  if (arguments.length === 1) {
619
- if (x(e)) return e.slice();
620
- if (this === Ye && typeof e == "string") return [e];
619
+ if (T(e)) return e.slice();
620
+ if (this === Xe && typeof e == "string") return [e];
621
621
  if (s = Xn(e)) {
622
622
  for (n = []; !(a = s.next()).done; ) n.push(a.value);
623
623
  return n;
@@ -630,12 +630,12 @@ function Ba() {
630
630
  for (r = arguments.length, n = new Array(r); r--; ) n[r] = arguments[r];
631
631
  return n;
632
632
  }
633
- var sr = typeof Symbol < "u" ? function(e) {
633
+ var or = typeof Symbol < "u" ? function(e) {
634
634
  return e[Symbol.toStringTag] === "AsyncFunction";
635
635
  } : function() {
636
636
  return !1;
637
- }, lt = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], fe = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(lt), Qn = { 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" };
638
- function Xe(e, r) {
637
+ }, ht = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], he = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(ht), Qn = { 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" };
638
+ function Qe(e, r) {
639
639
  this.name = e, this.message = r;
640
640
  }
641
641
  function Zr(e, r) {
@@ -646,44 +646,44 @@ function Ba() {
646
646
  }).join(`
647
647
  `);
648
648
  }
649
- function Nt(e, r, n, a) {
649
+ function Dt(e, r, n, a) {
650
650
  this.failures = r, this.failedKeys = a, this.successCount = n, this.message = Zr(e, r);
651
651
  }
652
- function Qe(e, r) {
652
+ function Je(e, r) {
653
653
  this.name = "BulkError", this.failures = Object.keys(r).map(function(n) {
654
654
  return r[n];
655
655
  }), this.failuresByPos = r, this.message = Zr(e, this.failures);
656
656
  }
657
- ze(Xe).from(Error).extend({ toString: function() {
657
+ Ye(Qe).from(Error).extend({ toString: function() {
658
658
  return this.name + ": " + this.message;
659
- } }), ze(Nt).from(Xe), ze(Qe).from(Xe);
660
- var or = fe.reduce(function(e, r) {
659
+ } }), Ye(Dt).from(Qe), Ye(Je).from(Qe);
660
+ var ir = he.reduce(function(e, r) {
661
661
  return e[r] = r + "Error", e;
662
- }, {}), Jn = Xe, B = fe.reduce(function(e, r) {
662
+ }, {}), Jn = Qe, B = he.reduce(function(e, r) {
663
663
  var n = r + "Error";
664
664
  function a(s, c) {
665
665
  this.name = n, s ? typeof s == "string" ? (this.message = "".concat(s).concat(c ? `
666
666
  ` + c : ""), this.inner = c || null) : typeof s == "object" && (this.message = "".concat(s.name, " ").concat(s.message), this.inner = s) : (this.message = Qn[r] || n, this.inner = null);
667
667
  }
668
- return ze(a).from(Jn), e[r] = a, e;
668
+ return Ye(a).from(Jn), e[r] = a, e;
669
669
  }, {});
670
670
  B.Syntax = SyntaxError, B.Type = TypeError, B.Range = RangeError;
671
- var qr = lt.reduce(function(e, r) {
671
+ var qr = ht.reduce(function(e, r) {
672
672
  return e[r + "Error"] = B[r], e;
673
- }, {}), Dt = fe.reduce(function(e, r) {
673
+ }, {}), It = he.reduce(function(e, r) {
674
674
  return ["Syntax", "Type", "Range"].indexOf(r) === -1 && (e[r + "Error"] = B[r]), e;
675
675
  }, {});
676
676
  function X() {
677
677
  }
678
- function ct(e) {
678
+ function lt(e) {
679
679
  return e;
680
680
  }
681
681
  function Zn(e, r) {
682
- return e == null || e === ct ? r : function(n) {
682
+ return e == null || e === lt ? r : function(n) {
683
683
  return r(e(n));
684
684
  };
685
685
  }
686
- function je(e, r) {
686
+ function Ge(e, r) {
687
687
  return function() {
688
688
  e.apply(this, arguments), r.apply(this, arguments);
689
689
  };
@@ -695,14 +695,14 @@ function Ba() {
695
695
  var a = this.onsuccess, s = this.onerror;
696
696
  this.onsuccess = null, this.onerror = null;
697
697
  var c = r.apply(this, arguments);
698
- return a && (this.onsuccess = this.onsuccess ? je(a, this.onsuccess) : a), s && (this.onerror = this.onerror ? je(s, this.onerror) : s), c !== void 0 ? c : n;
698
+ return a && (this.onsuccess = this.onsuccess ? Ge(a, this.onsuccess) : a), s && (this.onerror = this.onerror ? Ge(s, this.onerror) : s), c !== void 0 ? c : n;
699
699
  };
700
700
  }
701
701
  function ea(e, r) {
702
702
  return e === X ? r : function() {
703
703
  e.apply(this, arguments);
704
704
  var n = this.onsuccess, a = this.onerror;
705
- this.onsuccess = this.onerror = null, r.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? je(n, this.onsuccess) : n), a && (this.onerror = this.onerror ? je(a, this.onerror) : a);
705
+ this.onsuccess = this.onerror = null, r.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? Ge(n, this.onsuccess) : n), a && (this.onerror = this.onerror ? Ge(a, this.onerror) : a);
706
706
  };
707
707
  }
708
708
  function ta(e, r) {
@@ -710,7 +710,7 @@ function Ba() {
710
710
  var a = e.apply(this, arguments);
711
711
  te(n, a);
712
712
  var s = this.onsuccess, c = this.onerror;
713
- return this.onsuccess = null, this.onerror = null, n = r.apply(this, arguments), s && (this.onsuccess = this.onsuccess ? je(s, this.onsuccess) : s), c && (this.onerror = this.onerror ? je(c, this.onerror) : c), a === void 0 ? n === void 0 ? void 0 : n : te(a, n);
713
+ return this.onsuccess = null, this.onerror = null, n = r.apply(this, arguments), s && (this.onsuccess = this.onsuccess ? Ge(s, this.onsuccess) : s), c && (this.onerror = this.onerror ? Ge(c, this.onerror) : c), a === void 0 ? n === void 0 ? void 0 : n : te(a, n);
714
714
  };
715
715
  }
716
716
  function ra(e, r) {
@@ -718,7 +718,7 @@ function Ba() {
718
718
  return r.apply(this, arguments) !== !1 && e.apply(this, arguments);
719
719
  };
720
720
  }
721
- function ir(e, r) {
721
+ function cr(e, r) {
722
722
  return e === X ? r : function() {
723
723
  var n = e.apply(this, arguments);
724
724
  if (n && typeof n.then == "function") {
@@ -730,147 +730,147 @@ function Ba() {
730
730
  return r.apply(this, arguments);
731
731
  };
732
732
  }
733
- Dt.ModifyError = Nt, Dt.DexieError = Xe, Dt.BulkError = Qe;
734
- var me = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
733
+ It.ModifyError = Dt, It.DexieError = Qe, It.BulkError = Je;
734
+ var ye = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
735
735
  function en(e) {
736
- me = e;
736
+ ye = e;
737
737
  }
738
- var ut = {}, tn = 100, Ge = typeof Promise > "u" ? [] : (function() {
738
+ var dt = {}, tn = 100, Me = typeof Promise > "u" ? [] : (function() {
739
739
  var e = Promise.resolve();
740
- if (typeof crypto > "u" || !crypto.subtle) return [e, se(e), e];
740
+ if (typeof crypto > "u" || !crypto.subtle) return [e, me(e), e];
741
741
  var r = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
742
- return [r, se(r), e];
743
- })(), lt = Ge[0], fe = Ge[1], Ge = Ge[2], fe = fe && fe.then, Me = lt && lt.constructor, cr = !!Ge, dt = function(e, r) {
744
- ht.push([e, r]), It && (queueMicrotask(aa), It = !1);
745
- }, ur = !0, It = !0, Ke = [], Tt = [], lr = ct, Pe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: X, pgp: !1, env: {}, finalize: X }, L = Pe, ht = [], Le = 0, Rt = [];
742
+ return [r, me(r), e];
743
+ })(), ht = Me[0], he = Me[1], Me = Me[2], he = he && he.then, Ke = ht && ht.constructor, ur = !!Me, ft = function(e, r) {
744
+ gt.push([e, r]), Tt && (queueMicrotask(aa), Tt = !1);
745
+ }, lr = !0, Tt = !0, Le = [], Rt = [], dr = lt, Ne = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: X, pgp: !1, env: {}, finalize: X }, L = Ne, gt = [], Be = 0, xt = [];
746
746
  function M(e) {
747
747
  if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
748
748
  this._listeners = [], this._lib = !1;
749
749
  var r = this._PSD = L;
750
750
  if (typeof e != "function") {
751
- if (e !== ut) throw new TypeError("Not a function");
752
- return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && hr(this, this._value));
751
+ if (e !== dt) throw new TypeError("Not a function");
752
+ return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && fr(this, this._value));
753
753
  }
754
754
  this._state = null, this._value = null, ++r.ref, (function n(a, s) {
755
755
  try {
756
756
  s(function(c) {
757
757
  if (a._state === null) {
758
758
  if (c === a) throw new TypeError("A promise cannot be resolved with itself.");
759
- var u = a._lib && Je();
759
+ var u = a._lib && Ze();
760
760
  c && typeof c.then == "function" ? n(a, function(d, p) {
761
761
  c instanceof M ? c._then(d, p) : c.then(d, p);
762
- }) : (a._state = !0, a._value = c, nn(a)), u && Ze();
762
+ }) : (a._state = !0, a._value = c, nn(a)), u && qe();
763
763
  }
764
- }, hr.bind(null, a));
764
+ }, fr.bind(null, a));
765
765
  } catch (c) {
766
- hr(a, c);
766
+ fr(a, c);
767
767
  }
768
768
  })(this, e);
769
769
  }
770
- var dr = { get: function() {
771
- var e = L, r = $t;
770
+ var hr = { get: function() {
771
+ var e = L, r = jt;
772
772
  function n(a, s) {
773
- var c = this, u = !e.global && (e !== L || r !== $t), d = u && !De(), p = new M(function(m, w) {
774
- fr(c, new rn(sn(a, e, u, d), sn(s, e, u, d), m, w, e));
773
+ var c = this, u = !e.global && (e !== L || r !== jt), d = u && !Ie(), p = new M(function(m, w) {
774
+ gr(c, new rn(sn(a, e, u, d), sn(s, e, u, d), m, w, e));
775
775
  });
776
776
  return this._consoleTask && (p._consoleTask = this._consoleTask), p;
777
777
  }
778
- return n.prototype = ut, n;
778
+ return n.prototype = dt, n;
779
779
  }, set: function(e) {
780
- Ae(this, "then", e && e.prototype === ut ? dr : { get: function() {
780
+ Pe(this, "then", e && e.prototype === dt ? hr : { get: function() {
781
781
  return e;
782
- }, set: dr.set });
782
+ }, set: hr.set });
783
783
  } };
784
784
  function rn(e, r, n, a, s) {
785
785
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof r == "function" ? r : null, this.resolve = n, this.reject = a, this.psd = s;
786
786
  }
787
- function hr(e, r) {
787
+ function fr(e, r) {
788
788
  var n, a;
789
- Tt.push(r), e._state === null && (n = e._lib && Je(), r = lr(r), e._state = !1, e._value = r, a = e, Ke.some(function(s) {
789
+ Rt.push(r), e._state === null && (n = e._lib && Ze(), r = dr(r), e._state = !1, e._value = r, a = e, Le.some(function(s) {
790
790
  return s._value === a._value;
791
- }) || Ke.push(a), nn(e), n && Ze());
791
+ }) || Le.push(a), nn(e), n && qe());
792
792
  }
793
793
  function nn(e) {
794
794
  var r = e._listeners;
795
795
  e._listeners = [];
796
- for (var n = 0, a = r.length; n < a; ++n) fr(e, r[n]);
796
+ for (var n = 0, a = r.length; n < a; ++n) gr(e, r[n]);
797
797
  var s = e._PSD;
798
- --s.ref || s.finalize(), Le === 0 && (++Le, dt(function() {
799
- --Le == 0 && gr();
798
+ --s.ref || s.finalize(), Be === 0 && (++Be, ft(function() {
799
+ --Be == 0 && pr();
800
800
  }, []));
801
801
  }
802
- function fr(e, r) {
802
+ function gr(e, r) {
803
803
  if (e._state !== null) {
804
804
  var n = e._state ? r.onFulfilled : r.onRejected;
805
805
  if (n === null) return (e._state ? r.resolve : r.reject)(e._value);
806
- ++r.psd.ref, ++Le, dt(na, [n, e, r]);
806
+ ++r.psd.ref, ++Be, ft(na, [n, e, r]);
807
807
  } else e._listeners.push(r);
808
808
  }
809
809
  function na(e, r, n) {
810
810
  try {
811
811
  var a, s = r._value;
812
- !r._state && Tt.length && (Tt = []), a = me && r._consoleTask ? r._consoleTask.run(function() {
812
+ !r._state && Rt.length && (Rt = []), a = ye && r._consoleTask ? r._consoleTask.run(function() {
813
813
  return e(s);
814
- }) : e(s), r._state || Tt.indexOf(s) !== -1 || (function(c) {
815
- for (var u = Ke.length; u; ) if (Ke[--u]._value === c._value) return Ke.splice(u, 1);
814
+ }) : e(s), r._state || Rt.indexOf(s) !== -1 || (function(c) {
815
+ for (var u = Le.length; u; ) if (Le[--u]._value === c._value) return Le.splice(u, 1);
816
816
  })(r), n.resolve(a);
817
817
  } catch (c) {
818
818
  n.reject(c);
819
819
  } finally {
820
- --Le == 0 && gr(), --n.psd.ref || n.psd.finalize();
820
+ --Be == 0 && pr(), --n.psd.ref || n.psd.finalize();
821
821
  }
822
822
  }
823
823
  function aa() {
824
- Be(Pe, function() {
825
- Je() && Ze();
824
+ Ue(Ne, function() {
825
+ Ze() && qe();
826
826
  });
827
827
  }
828
- function Je() {
829
- var e = ur;
830
- return It = ur = !1, e;
831
- }
832
828
  function Ze() {
829
+ var e = lr;
830
+ return Tt = lr = !1, e;
831
+ }
832
+ function qe() {
833
833
  var e, r, n;
834
834
  do
835
- for (; 0 < ht.length; ) for (e = ht, ht = [], n = e.length, r = 0; r < n; ++r) {
835
+ for (; 0 < gt.length; ) for (e = gt, gt = [], n = e.length, r = 0; r < n; ++r) {
836
836
  var a = e[r];
837
837
  a[0].apply(null, a[1]);
838
838
  }
839
- while (0 < ht.length);
840
- It = ur = !0;
839
+ while (0 < gt.length);
840
+ Tt = lr = !0;
841
841
  }
842
- function gr() {
843
- var e = Ke;
844
- Ke = [], e.forEach(function(a) {
842
+ function pr() {
843
+ var e = Le;
844
+ Le = [], e.forEach(function(a) {
845
845
  a._PSD.onunhandled.call(null, a._value, a);
846
846
  });
847
- for (var r = Rt.slice(0), n = r.length; n; ) r[--n]();
847
+ for (var r = xt.slice(0), n = r.length; n; ) r[--n]();
848
848
  }
849
- function xt(e) {
850
- return new M(ut, !1, e);
849
+ function kt(e) {
850
+ return new M(dt, !1, e);
851
851
  }
852
852
  function Z(e, r) {
853
853
  var n = L;
854
854
  return function() {
855
- var a = Je(), s = L;
855
+ var a = Ze(), s = L;
856
856
  try {
857
- return Ie(n, !0), e.apply(this, arguments);
857
+ return Te(n, !0), e.apply(this, arguments);
858
858
  } catch (c) {
859
859
  r && r(c);
860
860
  } finally {
861
- Ie(s, !1), a && Ze();
861
+ Te(s, !1), a && qe();
862
862
  }
863
863
  };
864
864
  }
865
- ge(M.prototype, { then: dr, _then: function(e, r) {
866
- fr(this, new rn(null, null, e, r, L));
865
+ ge(M.prototype, { then: hr, _then: function(e, r) {
866
+ gr(this, new rn(null, null, e, r, L));
867
867
  }, catch: function(e) {
868
868
  if (arguments.length === 1) return this.then(null, e);
869
869
  var r = e, n = arguments[1];
870
870
  return typeof r == "function" ? this.then(null, function(a) {
871
- return (a instanceof r ? n : xt)(a);
871
+ return (a instanceof r ? n : kt)(a);
872
872
  }) : this.then(null, function(a) {
873
- return (a && a.name === r ? n : xt)(a);
873
+ return (a && a.name === r ? n : kt)(a);
874
874
  });
875
875
  }, finally: function(e) {
876
876
  return this.then(function(r) {
@@ -879,7 +879,7 @@ function Ba() {
879
879
  });
880
880
  }, function(r) {
881
881
  return M.resolve(e()).then(function() {
882
- return xt(r);
882
+ return kt(r);
883
883
  });
884
884
  });
885
885
  }, timeout: function(e, r) {
@@ -890,8 +890,8 @@ function Ba() {
890
890
  }, e);
891
891
  n.then(a, s).finally(clearTimeout.bind(null, c));
892
892
  }) : this;
893
- } }), typeof Symbol < "u" && Symbol.toStringTag && Ae(M.prototype, Symbol.toStringTag, "Dexie.Promise"), Pe.env = an(), ge(M, { all: function() {
894
- var e = Ee.apply(null, arguments).map(jt);
893
+ } }), typeof Symbol < "u" && Symbol.toStringTag && Pe(M.prototype, Symbol.toStringTag, "Dexie.Promise"), Ne.env = an(), ge(M, { all: function() {
894
+ var e = we.apply(null, arguments).map(Gt);
895
895
  return new M(function(r, n) {
896
896
  e.length === 0 && r([]);
897
897
  var a = e.length;
@@ -904,9 +904,9 @@ function Ba() {
904
904
  }, resolve: function(e) {
905
905
  return e instanceof M ? e : e && typeof e.then == "function" ? new M(function(r, n) {
906
906
  e.then(r, n);
907
- }) : new M(ut, !0, e);
908
- }, reject: xt, race: function() {
909
- var e = Ee.apply(null, arguments).map(jt);
907
+ }) : new M(dt, !0, e);
908
+ }, reject: kt, race: function() {
909
+ var e = we.apply(null, arguments).map(Gt);
910
910
  return new M(function(r, n) {
911
911
  e.map(function(a) {
912
912
  return M.resolve(a).then(r, n);
@@ -917,33 +917,33 @@ function Ba() {
917
917
  }, set: function(e) {
918
918
  return L = e;
919
919
  } }, totalEchoes: { get: function() {
920
- return $t;
921
- } }, newPSD: Ne, usePSD: Be, scheduler: { get: function() {
922
- return dt;
920
+ return jt;
921
+ } }, newPSD: De, usePSD: Ue, scheduler: { get: function() {
922
+ return ft;
923
923
  }, set: function(e) {
924
- dt = e;
924
+ ft = e;
925
925
  } }, rejectionMapper: { get: function() {
926
- return lr;
926
+ return dr;
927
927
  }, set: function(e) {
928
- lr = e;
928
+ dr = e;
929
929
  } }, follow: function(e, r) {
930
930
  return new M(function(n, a) {
931
- return Ne(function(s, c) {
931
+ return De(function(s, c) {
932
932
  var u = L;
933
- u.unhandleds = [], u.onunhandled = c, u.finalize = je(function() {
933
+ u.unhandleds = [], u.onunhandled = c, u.finalize = Ge(function() {
934
934
  var d, p = this;
935
935
  d = function() {
936
936
  p.unhandleds.length === 0 ? s() : c(p.unhandleds[0]);
937
- }, Rt.push(function m() {
938
- d(), Rt.splice(Rt.indexOf(m), 1);
939
- }), ++Le, dt(function() {
940
- --Le == 0 && gr();
937
+ }, xt.push(function m() {
938
+ d(), xt.splice(xt.indexOf(m), 1);
939
+ }), ++Be, ft(function() {
940
+ --Be == 0 && pr();
941
941
  }, []);
942
942
  }, u.finalize), e();
943
943
  }, r, n, a);
944
944
  });
945
- } }), Me && (Me.allSettled && Ae(M, "allSettled", function() {
946
- var e = Ee.apply(null, arguments).map(jt);
945
+ } }), Ke && (Ke.allSettled && Pe(M, "allSettled", function() {
946
+ var e = we.apply(null, arguments).map(Gt);
947
947
  return new M(function(r) {
948
948
  e.length === 0 && r([]);
949
949
  var n = e.length, a = new Array(n);
@@ -957,8 +957,8 @@ function Ba() {
957
957
  });
958
958
  });
959
959
  });
960
- }), Me.any && typeof AggregateError < "u" && Ae(M, "any", function() {
961
- var e = Ee.apply(null, arguments).map(jt);
960
+ }), Ke.any && typeof AggregateError < "u" && Pe(M, "any", function() {
961
+ var e = we.apply(null, arguments).map(Gt);
962
962
  return new M(function(r, n) {
963
963
  e.length === 0 && n(new AggregateError([]));
964
964
  var a = e.length, s = new Array(a);
@@ -970,76 +970,76 @@ function Ba() {
970
970
  });
971
971
  });
972
972
  });
973
- }), Me.withResolvers && (M.withResolvers = Me.withResolvers));
974
- var ne = { awaits: 0, echoes: 0, id: 0 }, sa = 0, kt = [], Ct = 0, $t = 0, oa = 0;
975
- function Ne(e, r, n, a) {
973
+ }), Ke.withResolvers && (M.withResolvers = Ke.withResolvers));
974
+ var re = { awaits: 0, echoes: 0, id: 0 }, sa = 0, Ct = [], $t = 0, jt = 0, oa = 0;
975
+ function De(e, r, n, a) {
976
976
  var s = L, c = Object.create(s);
977
- return c.parent = s, c.ref = 0, c.global = !1, c.id = ++oa, Pe.env, c.env = cr ? { 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 } : {}, r && te(c, r), ++s.ref, c.finalize = function() {
977
+ return c.parent = s, c.ref = 0, c.global = !1, c.id = ++oa, Ne.env, c.env = ur ? { 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 } : {}, r && te(c, r), ++s.ref, c.finalize = function() {
978
978
  --this.parent.ref || this.parent.finalize();
979
- }, a = Be(c, e, n, a), c.ref === 0 && c.finalize(), a;
979
+ }, a = Ue(c, e, n, a), c.ref === 0 && c.finalize(), a;
980
980
  }
981
- function qe() {
982
- return ne.id || (ne.id = ++sa), ++ne.awaits, ne.echoes += tn, ne.id;
981
+ function et() {
982
+ return re.id || (re.id = ++sa), ++re.awaits, re.echoes += tn, re.id;
983
983
  }
984
- function De() {
985
- return !!ne.awaits && (--ne.awaits == 0 && (ne.id = 0), ne.echoes = ne.awaits * tn, !0);
984
+ function Ie() {
985
+ return !!re.awaits && (--re.awaits == 0 && (re.id = 0), re.echoes = re.awaits * tn, !0);
986
986
  }
987
- function jt(e) {
988
- return ne.echoes && e && e.constructor === Me ? (qe(), e.then(function(r) {
989
- return De(), r;
987
+ function Gt(e) {
988
+ return re.echoes && e && e.constructor === Ke ? (et(), e.then(function(r) {
989
+ return Ie(), r;
990
990
  }, function(r) {
991
- return De(), q(r);
991
+ return Ie(), q(r);
992
992
  })) : e;
993
993
  }
994
994
  function ia() {
995
- var e = kt[kt.length - 1];
996
- kt.pop(), Ie(e, !1);
995
+ var e = Ct[Ct.length - 1];
996
+ Ct.pop(), Te(e, !1);
997
997
  }
998
- function Ie(e, r) {
998
+ function Te(e, r) {
999
999
  var n, a = L;
1000
- (r ? !ne.echoes || Ct++ && e === L : !Ct || --Ct && e === L) || queueMicrotask(r ? function(s) {
1001
- ++$t, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), kt.push(L), Ie(s, !0);
1002
- }.bind(null, e) : ia), e !== L && (L = e, a === Pe && (Pe.env = an()), cr && (n = Pe.env.Promise, r = e.env, (a.global || e.global) && (Object.defineProperty(b, "Promise", r.PromiseProp), n.all = r.all, n.race = r.race, n.resolve = r.resolve, n.reject = r.reject, r.allSettled && (n.allSettled = r.allSettled), r.any && (n.any = r.any))));
1000
+ (r ? !re.echoes || $t++ && e === L : !$t || --$t && e === L) || queueMicrotask(r ? function(s) {
1001
+ ++jt, re.echoes && --re.echoes != 0 || (re.echoes = re.awaits = re.id = 0), Ct.push(L), Te(s, !0);
1002
+ }.bind(null, e) : ia), e !== L && (L = e, a === Ne && (Ne.env = an()), ur && (n = Ne.env.Promise, r = e.env, (a.global || e.global) && (Object.defineProperty(b, "Promise", r.PromiseProp), n.all = r.all, n.race = r.race, n.resolve = r.resolve, n.reject = r.reject, r.allSettled && (n.allSettled = r.allSettled), r.any && (n.any = r.any))));
1003
1003
  }
1004
1004
  function an() {
1005
1005
  var e = b.Promise;
1006
- return cr ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(b, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
1006
+ return ur ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(b, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
1007
1007
  }
1008
- function Be(e, r, n, a, s) {
1008
+ function Ue(e, r, n, a, s) {
1009
1009
  var c = L;
1010
1010
  try {
1011
- return Ie(e, !0), r(n, a, s);
1011
+ return Te(e, !0), r(n, a, s);
1012
1012
  } finally {
1013
- Ie(c, !1);
1013
+ Te(c, !1);
1014
1014
  }
1015
1015
  }
1016
1016
  function sn(e, r, n, a) {
1017
1017
  return typeof e != "function" ? e : function() {
1018
1018
  var s = L;
1019
- n && qe(), Ie(r, !0);
1019
+ n && et(), Te(r, !0);
1020
1020
  try {
1021
1021
  return e.apply(this, arguments);
1022
1022
  } finally {
1023
- Ie(s, !1), a && queueMicrotask(De);
1023
+ Te(s, !1), a && queueMicrotask(Ie);
1024
1024
  }
1025
1025
  };
1026
1026
  }
1027
- function pr(e) {
1028
- Promise === Me && ne.echoes === 0 ? Ct === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1027
+ function mr(e) {
1028
+ Promise === Ke && re.echoes === 0 ? $t === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1029
1029
  }
1030
- ("" + fe).indexOf("[native code]") === -1 && (qe = De = X);
1031
- var q = M.reject, Ue = "￿", we = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", on = "String expected.", et = [], Gt = "__dbnames", mr = "readonly", yr = "readwrite";
1032
- function We(e, r) {
1030
+ ("" + he).indexOf("[native code]") === -1 && (et = Ie = X);
1031
+ var q = M.reject, We = "￿", Se = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", on = "String expected.", tt = [], Mt = "__dbnames", yr = "readonly", br = "readwrite";
1032
+ function Fe(e, r) {
1033
1033
  return e ? r ? function() {
1034
1034
  return e.apply(this, arguments) && r.apply(this, arguments);
1035
1035
  } : e : r;
1036
1036
  }
1037
1037
  var cn = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1038
- function Mt(e) {
1038
+ function Kt(e) {
1039
1039
  return typeof e != "string" || /\./.test(e) ? function(r) {
1040
1040
  return r;
1041
1041
  } : function(r) {
1042
- return r[e] === void 0 && e in r && delete (r = Ce(r))[e], r;
1042
+ return r[e] === void 0 && e in r && delete (r = $e(r))[e], r;
1043
1043
  };
1044
1044
  }
1045
1045
  function un() {
@@ -1074,12 +1074,12 @@ function Ba() {
1074
1074
  }
1075
1075
  function ln(e) {
1076
1076
  var r = typeof e;
1077
- return r != "object" ? r : ArrayBuffer.isView(e) ? "binary" : (e = nr(e), e === "ArrayBuffer" ? "binary" : e);
1077
+ return r != "object" ? r : ArrayBuffer.isView(e) ? "binary" : (e = ar(e), e === "ArrayBuffer" ? "binary" : e);
1078
1078
  }
1079
1079
  function dn(e) {
1080
1080
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
1081
1081
  }
1082
- function Kt(e, r, n) {
1082
+ function Lt(e, r, n) {
1083
1083
  var a = e.schema.yProps;
1084
1084
  return a ? (r && 0 < n.numFailures && (r = r.filter(function(s, c) {
1085
1085
  return !n.failures[c];
@@ -1089,11 +1089,11 @@ function Ba() {
1089
1089
  return n;
1090
1090
  })) : n;
1091
1091
  }
1092
- var ft = (hn.prototype.execute = function(e) {
1092
+ var pt = (hn.prototype.execute = function(e) {
1093
1093
  var r = this["@@propmod"];
1094
1094
  if (r.add !== void 0) {
1095
1095
  var n = r.add;
1096
- if (x(n)) return g(g([], x(e) ? e : [], !0), n).sort();
1096
+ if (T(n)) return g(g([], T(e) ? e : [], !0), n).sort();
1097
1097
  if (typeof n == "number") return (Number(e) || 0) + n;
1098
1098
  if (typeof n == "bigint") try {
1099
1099
  return BigInt(e) + n;
@@ -1104,7 +1104,7 @@ function Ba() {
1104
1104
  }
1105
1105
  if (r.remove !== void 0) {
1106
1106
  var a = r.remove;
1107
- if (x(a)) return x(e) ? e.filter(function(s) {
1107
+ if (T(a)) return T(e) ? e.filter(function(s) {
1108
1108
  return !a.includes(s);
1109
1109
  }).sort() : [];
1110
1110
  if (typeof a == "number") return Number(e) - a;
@@ -1121,21 +1121,21 @@ function Ba() {
1121
1121
  this["@@propmod"] = e;
1122
1122
  }
1123
1123
  function fn(e, r) {
1124
- for (var n = D(r), a = n.length, s = !1, c = 0; c < a; ++c) {
1125
- var u = n[c], d = r[u], p = ve(e, u);
1126
- d instanceof ft ? (le(e, u, d.execute(p)), s = !0) : p !== d && (le(e, u, d), s = !0);
1124
+ for (var n = I(r), a = n.length, s = !1, c = 0; c < a; ++c) {
1125
+ var u = n[c], d = r[u], p = Ee(e, u);
1126
+ d instanceof pt ? (ue(e, u, d.execute(p)), s = !0) : p !== d && (ue(e, u, d), s = !0);
1127
1127
  }
1128
1128
  return s;
1129
1129
  }
1130
1130
  var gn = (Q.prototype._trans = function(e, r, n) {
1131
- var a = this._tx || L.trans, s = this.name, c = me && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
1131
+ var a = this._tx || L.trans, s = this.name, c = ye && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
1132
1132
  function u(m, w, h) {
1133
1133
  if (!h.schema[s]) throw new B.NotFound("Table " + s + " not part of transaction");
1134
1134
  return r(h.idbtrans, h);
1135
1135
  }
1136
- var d = Je();
1136
+ var d = Ze();
1137
1137
  try {
1138
- var p = a && a.db._novip === this.db._novip ? a === L.trans ? a._promise(e, u, n) : Ne(function() {
1138
+ var p = a && a.db._novip === this.db._novip ? a === L.trans ? a._promise(e, u, n) : De(function() {
1139
1139
  return a._promise(e, u, n);
1140
1140
  }, { trans: a, transless: L.transless || L }) : (function m(w, h, O, y) {
1141
1141
  if (w.idbdb && (w._state.openComplete || L.letThrough || w._vip)) {
@@ -1143,12 +1143,12 @@ function Ba() {
1143
1143
  try {
1144
1144
  v.create(), w._state.PR1398_maxLoop = 3;
1145
1145
  } catch (E) {
1146
- return E.name === or.InvalidState && w.isOpen() && 0 < --w._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), w.close({ disableAutoOpen: !1 }), w.open().then(function() {
1146
+ return E.name === ir.InvalidState && w.isOpen() && 0 < --w._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), w.close({ disableAutoOpen: !1 }), w.open().then(function() {
1147
1147
  return m(w, h, O, y);
1148
1148
  })) : q(E);
1149
1149
  }
1150
1150
  return v._promise(h, function(E, S) {
1151
- return Ne(function() {
1151
+ return De(function() {
1152
1152
  return L.trans = v, y(E, S, v);
1153
1153
  });
1154
1154
  }).then(function(E) {
@@ -1174,7 +1174,7 @@ function Ba() {
1174
1174
  return console.trace(m), q(m);
1175
1175
  })), p;
1176
1176
  } finally {
1177
- d && Ze();
1177
+ d && qe();
1178
1178
  }
1179
1179
  }, Q.prototype.get = function(e, r) {
1180
1180
  var n = this;
@@ -1185,8 +1185,8 @@ function Ba() {
1185
1185
  }).then(r);
1186
1186
  }, Q.prototype.where = function(e) {
1187
1187
  if (typeof e == "string") return new this.db.WhereClause(this, e);
1188
- if (x(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1189
- var r = D(e);
1188
+ if (T(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1189
+ var r = I(e);
1190
1190
  if (r.length === 1) return this.where(r[0]).equals(e[r[0]]);
1191
1191
  var n = this.schema.indexes.concat(this.schema.primKey).filter(function(d) {
1192
1192
  if (d.compound && r.every(function(m) {
@@ -1199,25 +1199,25 @@ function Ba() {
1199
1199
  }).sort(function(d, p) {
1200
1200
  return d.keyPath.length - p.keyPath.length;
1201
1201
  })[0];
1202
- if (n && this.db._maxKey !== Ue) {
1202
+ if (n && this.db._maxKey !== We) {
1203
1203
  var c = n.keyPath.slice(0, r.length);
1204
1204
  return this.where(c).equals(c.map(function(p) {
1205
1205
  return e[p];
1206
1206
  }));
1207
1207
  }
1208
- !n && me && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(r.join("+"), "]"));
1208
+ !n && ye && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(r.join("+"), "]"));
1209
1209
  var a = this.schema.idxByName;
1210
1210
  function s(d, p) {
1211
1211
  return V(d, p) === 0;
1212
1212
  }
1213
1213
  var u = r.reduce(function(h, p) {
1214
1214
  var m = h[0], w = h[1], h = a[p], O = e[p];
1215
- return [m || h, m || !h ? We(w, h && h.multi ? function(y) {
1216
- return y = ve(y, p), x(y) && y.some(function(v) {
1215
+ return [m || h, m || !h ? Fe(w, h && h.multi ? function(y) {
1216
+ return y = Ee(y, p), T(y) && y.some(function(v) {
1217
1217
  return s(O, v);
1218
1218
  });
1219
1219
  } : function(y) {
1220
- return s(O, ve(y, p));
1220
+ return s(O, Ee(y, p));
1221
1221
  }) : w];
1222
1222
  }, [null, null]), c = u[0], u = u[1];
1223
1223
  return c ? this.where(c.name).equals(e[c.keyPath]).filter(u) : n ? this.filter(u) : this.where(r).equals("");
@@ -1236,7 +1236,7 @@ function Ba() {
1236
1236
  }, Q.prototype.toCollection = function() {
1237
1237
  return new this.db.Collection(new this.db.WhereClause(this));
1238
1238
  }, Q.prototype.orderBy = function(e) {
1239
- return new this.db.Collection(new this.db.WhereClause(this, x(e) ? "[".concat(e.join("+"), "]") : e));
1239
+ return new this.db.Collection(new this.db.WhereClause(this, T(e) ? "[".concat(e.join("+"), "]") : e));
1240
1240
  }, Q.prototype.reverse = function() {
1241
1241
  return this.toCollection().reverse();
1242
1242
  }, Q.prototype.mapToClass = function(e) {
@@ -1255,7 +1255,7 @@ function Ba() {
1255
1255
  }, enumerable: !1, configurable: !0 }), s.prototype.table = function() {
1256
1256
  return a;
1257
1257
  }, e = s);
1258
- for (var c = /* @__PURE__ */ new Set(), u = e.prototype; u; u = se(u)) Object.getOwnPropertyNames(u).forEach(function(p) {
1258
+ for (var c = /* @__PURE__ */ new Set(), u = e.prototype; u; u = me(u)) Object.getOwnPropertyNames(u).forEach(function(p) {
1259
1259
  return c.add(p);
1260
1260
  });
1261
1261
  function d(p) {
@@ -1274,13 +1274,13 @@ function Ba() {
1274
1274
  });
1275
1275
  }, Q.prototype.add = function(e, r) {
1276
1276
  var n = this, a = this.schema.primKey, s = a.auto, c = a.keyPath, u = e;
1277
- return c && s && (u = Mt(c)(e)), this._trans("readwrite", function(d) {
1277
+ return c && s && (u = Kt(c)(e)), this._trans("readwrite", function(d) {
1278
1278
  return n.core.mutate({ trans: d, type: "add", keys: r != null ? [r] : null, values: [u] });
1279
1279
  }).then(function(d) {
1280
1280
  return d.numFailures ? M.reject(d.failures[0]) : d.lastResult;
1281
1281
  }).then(function(d) {
1282
1282
  if (c) try {
1283
- le(e, c, d);
1283
+ ue(e, c, d);
1284
1284
  } catch {
1285
1285
  }
1286
1286
  return d;
@@ -1290,22 +1290,22 @@ function Ba() {
1290
1290
  return this._trans("readwrite", function(s) {
1291
1291
  return n.core.get({ trans: s, key: e }).then(function(c) {
1292
1292
  var u = c ?? {};
1293
- return fn(u, r), a && le(u, a, e), n.core.mutate({ trans: s, type: "put", values: [u], keys: [e], upsert: !0, updates: { keys: [e], changeSpecs: [r] } }).then(function(d) {
1293
+ return fn(u, r), a && ue(u, a, e), n.core.mutate({ trans: s, type: "put", values: [u], keys: [e], upsert: !0, updates: { keys: [e], changeSpecs: [r] } }).then(function(d) {
1294
1294
  return d.numFailures ? M.reject(d.failures[0]) : !!c;
1295
1295
  });
1296
1296
  });
1297
1297
  });
1298
1298
  }, Q.prototype.update = function(e, r) {
1299
- return typeof e != "object" || x(e) ? this.where(":id").equals(e).modify(r) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new B.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(r));
1299
+ return typeof e != "object" || T(e) ? this.where(":id").equals(e).modify(r) : (e = Ee(e, this.schema.primKey.keyPath), e === void 0 ? q(new B.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(r));
1300
1300
  }, Q.prototype.put = function(e, r) {
1301
1301
  var n = this, a = this.schema.primKey, s = a.auto, c = a.keyPath, u = e;
1302
- return c && s && (u = Mt(c)(e)), this._trans("readwrite", function(d) {
1302
+ return c && s && (u = Kt(c)(e)), this._trans("readwrite", function(d) {
1303
1303
  return n.core.mutate({ trans: d, type: "put", values: [u], keys: r != null ? [r] : null });
1304
1304
  }).then(function(d) {
1305
1305
  return d.numFailures ? M.reject(d.failures[0]) : d.lastResult;
1306
1306
  }).then(function(d) {
1307
1307
  if (c) try {
1308
- le(e, c, d);
1308
+ ue(e, c, d);
1309
1309
  } catch {
1310
1310
  }
1311
1311
  return d;
@@ -1314,7 +1314,7 @@ function Ba() {
1314
1314
  var r = this;
1315
1315
  return this._trans("readwrite", function(n) {
1316
1316
  return r.core.mutate({ trans: n, type: "delete", keys: [e] }).then(function(a) {
1317
- return Kt(r, [e], a);
1317
+ return Lt(r, [e], a);
1318
1318
  }).then(function(a) {
1319
1319
  return a.numFailures ? M.reject(a.failures[0]) : void 0;
1320
1320
  });
@@ -1323,7 +1323,7 @@ function Ba() {
1323
1323
  var e = this;
1324
1324
  return this._trans("readwrite", function(r) {
1325
1325
  return e.core.mutate({ trans: r, type: "deleteRange", range: cn }).then(function(n) {
1326
- return Kt(e, null, n);
1326
+ return Lt(e, null, n);
1327
1327
  });
1328
1328
  }).then(function(r) {
1329
1329
  return r.numFailures ? M.reject(r.failures[0]) : void 0;
@@ -1343,11 +1343,11 @@ function Ba() {
1343
1343
  var m = a.schema.primKey, d = m.auto, m = m.keyPath;
1344
1344
  if (m && s) throw new B.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
1345
1345
  if (s && s.length !== e.length) throw new B.InvalidArgument("Arguments objects and keys must have the same length");
1346
- var p = e.length, m = m && d ? e.map(Mt(m)) : e;
1346
+ var p = e.length, m = m && d ? e.map(Kt(m)) : e;
1347
1347
  return a.core.mutate({ trans: u, type: "add", keys: s, values: m, wantResults: c }).then(function(v) {
1348
1348
  var h = v.numFailures, O = v.results, y = v.lastResult, v = v.failures;
1349
1349
  if (h === 0) return c ? O : y;
1350
- throw new Qe("".concat(a.name, ".bulkAdd(): ").concat(h, " of ").concat(p, " operations failed"), v);
1350
+ throw new Je("".concat(a.name, ".bulkAdd(): ").concat(h, " of ").concat(p, " operations failed"), v);
1351
1351
  });
1352
1352
  });
1353
1353
  }, Q.prototype.bulkPut = function(e, r, n) {
@@ -1356,11 +1356,11 @@ function Ba() {
1356
1356
  var m = a.schema.primKey, d = m.auto, m = m.keyPath;
1357
1357
  if (m && s) throw new B.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
1358
1358
  if (s && s.length !== e.length) throw new B.InvalidArgument("Arguments objects and keys must have the same length");
1359
- var p = e.length, m = m && d ? e.map(Mt(m)) : e;
1359
+ var p = e.length, m = m && d ? e.map(Kt(m)) : e;
1360
1360
  return a.core.mutate({ trans: u, type: "put", keys: s, values: m, wantResults: c }).then(function(v) {
1361
1361
  var h = v.numFailures, O = v.results, y = v.lastResult, v = v.failures;
1362
1362
  if (h === 0) return c ? O : y;
1363
- throw new Qe("".concat(a.name, ".bulkPut(): ").concat(h, " of ").concat(p, " operations failed"), v);
1363
+ throw new Je("".concat(a.name, ".bulkPut(): ").concat(h, " of ").concat(p, " operations failed"), v);
1364
1364
  });
1365
1365
  });
1366
1366
  }, Q.prototype.bulkUpdate = function(e) {
@@ -1379,7 +1379,7 @@ function Ba() {
1379
1379
  var P = A[S], N = v[P];
1380
1380
  if (P === r.schema.primKey.keyPath) {
1381
1381
  if (V(N, y) !== 0) throw new B.Constraint("Cannot update primary key in bulkUpdate()");
1382
- } else le(E, P, N);
1382
+ } else ue(E, P, N);
1383
1383
  }
1384
1384
  c.push(O), p.push(y), m.push(E);
1385
1385
  }
@@ -1392,7 +1392,7 @@ function Ba() {
1392
1392
  var S, A = E[v], P = c[Number(A)];
1393
1393
  P != null && (S = y[A], delete y[A], y[P] = S);
1394
1394
  }
1395
- throw new Qe("".concat(r.name, ".bulkUpdate(): ").concat(O, " of ").concat(w, " operations failed"), y);
1395
+ throw new Je("".concat(r.name, ".bulkUpdate(): ").concat(O, " of ").concat(w, " operations failed"), y);
1396
1396
  });
1397
1397
  });
1398
1398
  });
@@ -1400,17 +1400,17 @@ function Ba() {
1400
1400
  var r = this, n = e.length;
1401
1401
  return this._trans("readwrite", function(a) {
1402
1402
  return r.core.mutate({ trans: a, type: "delete", keys: e }).then(function(s) {
1403
- return Kt(r, e, s);
1403
+ return Lt(r, e, s);
1404
1404
  });
1405
1405
  }).then(function(u) {
1406
1406
  var s = u.numFailures, c = u.lastResult, u = u.failures;
1407
1407
  if (s === 0) return c;
1408
- throw new Qe("".concat(r.name, ".bulkDelete(): ").concat(s, " of ").concat(n, " operations failed"), u);
1408
+ throw new Je("".concat(r.name, ".bulkDelete(): ").concat(s, " of ").concat(n, " operations failed"), u);
1409
1409
  });
1410
1410
  }, Q);
1411
1411
  function Q() {
1412
1412
  }
1413
- function gt(e) {
1413
+ function mt(e) {
1414
1414
  function r(u, d) {
1415
1415
  if (d) {
1416
1416
  for (var p = arguments.length, m = new Array(p - 1); --p; ) m[p - 1] = arguments[p];
@@ -1435,12 +1435,12 @@ function Ba() {
1435
1435
  } };
1436
1436
  return n[u] = r[u] = w;
1437
1437
  }
1438
- D(m = u).forEach(function(h) {
1438
+ I(m = u).forEach(function(h) {
1439
1439
  var O = m[h];
1440
- if (x(O)) c(h, m[h][0], m[h][1]);
1440
+ if (T(O)) c(h, m[h][0], m[h][1]);
1441
1441
  else {
1442
1442
  if (O !== "asap") throw new B.InvalidArgument("Invalid event config");
1443
- var y = c(h, ct, function() {
1443
+ var y = c(h, lt, function() {
1444
1444
  for (var v = arguments.length, E = new Array(v); v--; ) E[v] = arguments[v];
1445
1445
  y.subscribers.forEach(function(S) {
1446
1446
  Yr(function() {
@@ -1452,33 +1452,33 @@ function Ba() {
1452
1452
  });
1453
1453
  }
1454
1454
  }
1455
- function pt(e, r) {
1456
- return ze(r).from({ prototype: e }), r;
1455
+ function yt(e, r) {
1456
+ return Ye(r).from({ prototype: e }), r;
1457
1457
  }
1458
- function tt(e, r) {
1458
+ function rt(e, r) {
1459
1459
  return !(e.filter || e.algorithm || e.or) && (r ? e.justLimit : !e.replayFilter);
1460
1460
  }
1461
- function br(e, r) {
1462
- e.filter = We(e.filter, r);
1461
+ function vr(e, r) {
1462
+ e.filter = Fe(e.filter, r);
1463
1463
  }
1464
- function vr(e, r, n) {
1464
+ function Er(e, r, n) {
1465
1465
  var a = e.replayFilter;
1466
1466
  e.replayFilter = a ? function() {
1467
- return We(a(), r());
1467
+ return Fe(a(), r());
1468
1468
  } : r, e.justLimit = n && !a;
1469
1469
  }
1470
- function Lt(e, r) {
1470
+ function Bt(e, r) {
1471
1471
  if (e.isPrimKey) return r.primaryKey;
1472
1472
  var n = r.getIndexByKeyPath(e.index);
1473
1473
  if (!n) throw new B.Schema("KeyPath " + e.index + " on object store " + r.name + " is not indexed");
1474
1474
  return n;
1475
1475
  }
1476
1476
  function pn(e, r, n) {
1477
- var a = Lt(e, r.schema);
1477
+ var a = Bt(e, r.schema);
1478
1478
  return r.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: a, range: e.range } });
1479
1479
  }
1480
- function Bt(e, r, n, a) {
1481
- var s = e.replayFilter ? We(e.filter, e.replayFilter()) : e.filter;
1480
+ function Ut(e, r, n, a) {
1481
+ var s = e.replayFilter ? Fe(e.filter, e.replayFilter()) : e.filter;
1482
1482
  if (e.or) {
1483
1483
  var c = {}, u = function(d, p, m) {
1484
1484
  var w, h;
@@ -1486,11 +1486,11 @@ function Ba() {
1486
1486
  return p.stop(O);
1487
1487
  }, function(O) {
1488
1488
  return p.fail(O);
1489
- }) || ((h = "" + (w = p.primaryKey)) == "[object ArrayBuffer]" && (h = "" + new Uint8Array(w)), re(c, h) || (c[h] = !0, r(d, p, m)));
1489
+ }) || ((h = "" + (w = p.primaryKey)) == "[object ArrayBuffer]" && (h = "" + new Uint8Array(w)), ae(c, h) || (c[h] = !0, r(d, p, m)));
1490
1490
  };
1491
1491
  return Promise.all([e.or._iterate(u, n), mn(pn(e, a, n), e.algorithm, u, !e.keysOnly && e.valueMapper)]);
1492
1492
  }
1493
- return mn(pn(e, a, n), We(e.algorithm, s), r, !e.keysOnly && e.valueMapper);
1493
+ return mn(pn(e, a, n), Fe(e.algorithm, s), r, !e.keysOnly && e.valueMapper);
1494
1494
  }
1495
1495
  function mn(e, r, n, a) {
1496
1496
  var s = Z(a ? function(c, u, d) {
@@ -1521,9 +1521,9 @@ function Ba() {
1521
1521
  return r.error ? r.table._trans(null, q.bind(null, r.error)) : r.table._trans("readwrite", e, "locked");
1522
1522
  }, z.prototype._addAlgorithm = function(e) {
1523
1523
  var r = this._ctx;
1524
- r.algorithm = We(r.algorithm, e);
1524
+ r.algorithm = Fe(r.algorithm, e);
1525
1525
  }, z.prototype._iterate = function(e, r) {
1526
- return Bt(this._ctx, e, r, this._ctx.table.core);
1526
+ return Ut(this._ctx, e, r, this._ctx.table.core);
1527
1527
  }, z.prototype.clone = function(e) {
1528
1528
  var r = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1529
1529
  return e && te(n, e), r._ctx = n, r;
@@ -1532,17 +1532,17 @@ function Ba() {
1532
1532
  }, z.prototype.each = function(e) {
1533
1533
  var r = this._ctx;
1534
1534
  return this._read(function(n) {
1535
- return Bt(r, e, n, r.table.core);
1535
+ return Ut(r, e, n, r.table.core);
1536
1536
  });
1537
1537
  }, z.prototype.count = function(e) {
1538
1538
  var r = this;
1539
1539
  return this._read(function(n) {
1540
1540
  var a = r._ctx, s = a.table.core;
1541
- if (tt(a, !0)) return s.count({ trans: n, query: { index: Lt(a, s.schema), range: a.range } }).then(function(u) {
1541
+ if (rt(a, !0)) return s.count({ trans: n, query: { index: Bt(a, s.schema), range: a.range } }).then(function(u) {
1542
1542
  return Math.min(u, a.limit);
1543
1543
  });
1544
1544
  var c = 0;
1545
- return Bt(a, function() {
1545
+ return Ut(a, function() {
1546
1546
  return ++c, !1;
1547
1547
  }, n, s).then(function() {
1548
1548
  return c;
@@ -1564,14 +1564,14 @@ function Ba() {
1564
1564
  var r = this;
1565
1565
  return this._read(function(n) {
1566
1566
  var a = r._ctx;
1567
- if (a.dir === "next" && tt(a, !0) && 0 < a.limit) {
1568
- var s = a.valueMapper, c = Lt(a, a.table.core.schema);
1567
+ if (a.dir === "next" && rt(a, !0) && 0 < a.limit) {
1568
+ var s = a.valueMapper, c = Bt(a, a.table.core.schema);
1569
1569
  return a.table.core.query({ trans: n, limit: a.limit, values: !0, query: { index: c, range: a.range } }).then(function(d) {
1570
1570
  return d = d.result, s ? d.map(s) : d;
1571
1571
  });
1572
1572
  }
1573
1573
  var u = [];
1574
- return Bt(a, function(d) {
1574
+ return Ut(a, function(d) {
1575
1575
  return u.push(d);
1576
1576
  }, n, a.table.core).then(function() {
1577
1577
  return u;
@@ -1579,28 +1579,28 @@ function Ba() {
1579
1579
  }, e);
1580
1580
  }, z.prototype.offset = function(e) {
1581
1581
  var r = this._ctx;
1582
- return e <= 0 || (r.offset += e, tt(r) ? vr(r, function() {
1582
+ return e <= 0 || (r.offset += e, rt(r) ? Er(r, function() {
1583
1583
  var n = e;
1584
1584
  return function(a, s) {
1585
1585
  return n === 0 || (n === 1 ? --n : s(function() {
1586
1586
  a.advance(n), n = 0;
1587
1587
  }), !1);
1588
1588
  };
1589
- }) : vr(r, function() {
1589
+ }) : Er(r, function() {
1590
1590
  var n = e;
1591
1591
  return function() {
1592
1592
  return --n < 0;
1593
1593
  };
1594
1594
  })), this;
1595
1595
  }, z.prototype.limit = function(e) {
1596
- return this._ctx.limit = Math.min(this._ctx.limit, e), vr(this._ctx, function() {
1596
+ return this._ctx.limit = Math.min(this._ctx.limit, e), Er(this._ctx, function() {
1597
1597
  var r = e;
1598
1598
  return function(n, a, s) {
1599
1599
  return --r <= 0 && a(s), 0 <= r;
1600
1600
  };
1601
1601
  }, !0), this;
1602
1602
  }, z.prototype.until = function(e, r) {
1603
- return br(this._ctx, function(n, a, s) {
1603
+ return vr(this._ctx, function(n, a, s) {
1604
1604
  return !e(n.value) || (a(s), r);
1605
1605
  }), this;
1606
1606
  }, z.prototype.first = function(e) {
@@ -1611,9 +1611,9 @@ function Ba() {
1611
1611
  return this.reverse().first(e);
1612
1612
  }, z.prototype.filter = function(e) {
1613
1613
  var r;
1614
- return br(this._ctx, function(n) {
1614
+ return vr(this._ctx, function(n) {
1615
1615
  return e(n.value);
1616
- }), (r = this._ctx).isMatch = We(r.isMatch, e), this;
1616
+ }), (r = this._ctx).isMatch = Fe(r.isMatch, e), this;
1617
1617
  }, z.prototype.and = function(e) {
1618
1618
  return this.filter(e);
1619
1619
  }, z.prototype.or = function(e) {
@@ -1645,8 +1645,8 @@ function Ba() {
1645
1645
  }).then(e);
1646
1646
  }, z.prototype.primaryKeys = function(e) {
1647
1647
  var r = this._ctx;
1648
- if (r.dir === "next" && tt(r, !0) && 0 < r.limit) return this._read(function(a) {
1649
- var s = Lt(r, r.table.core.schema);
1648
+ if (r.dir === "next" && rt(r, !0) && 0 < r.limit) return this._read(function(a) {
1649
+ var s = Bt(r, r.table.core.schema);
1650
1650
  return r.table.core.query({ trans: a, values: !1, limit: r.limit, query: { index: s, range: r.range } });
1651
1651
  }).then(function(a) {
1652
1652
  return a.result;
@@ -1670,8 +1670,8 @@ function Ba() {
1670
1670
  var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
1671
1671
  if (!e || !e.multi) return this;
1672
1672
  var r = {};
1673
- return br(this._ctx, function(s) {
1674
- var a = s.primaryKey.toString(), s = re(r, a);
1673
+ return vr(this._ctx, function(s) {
1674
+ var a = s.primaryKey.toString(), s = ae(r, a);
1675
1675
  return r[a] = !0, !s;
1676
1676
  }), this;
1677
1677
  }, z.prototype.modify = function(e) {
@@ -1684,31 +1684,31 @@ function Ba() {
1684
1684
  function w(E, P) {
1685
1685
  var A = P.failures, P = P.numFailures;
1686
1686
  O += E - P;
1687
- for (var N = 0, I = D(A); N < I.length; N++) {
1688
- var R = I[N];
1689
- h.push(A[R]);
1687
+ for (var N = 0, D = I(A); N < D.length; N++) {
1688
+ var x = D[N];
1689
+ h.push(A[x]);
1690
1690
  }
1691
1691
  }
1692
1692
  var h = [], O = 0, y = [], v = e === yn;
1693
1693
  return r.clone().primaryKeys().then(function(E) {
1694
1694
  function S(P) {
1695
- var N = Math.min(p, E.length - P), I = E.slice(P, P + N);
1696
- return (v ? Promise.resolve([]) : c.getMany({ trans: a, keys: I, cache: "immutable" })).then(function(R) {
1697
- var $ = [], T = [], k = u ? [] : null, j = v ? I : [];
1695
+ var N = Math.min(p, E.length - P), D = E.slice(P, P + N);
1696
+ return (v ? Promise.resolve([]) : c.getMany({ trans: a, keys: D, cache: "immutable" })).then(function(x) {
1697
+ var $ = [], R = [], k = u ? [] : null, j = v ? D : [];
1698
1698
  if (!v) for (var C = 0; C < N; ++C) {
1699
- var K = R[C], W = { value: Ce(K), primKey: E[P + C] };
1700
- s.call(W, W.value, W) !== !1 && (W.value == null ? j.push(E[P + C]) : u || V(d(K), d(W.value)) === 0 ? (T.push(W.value), u && k.push(E[P + C])) : (j.push(E[P + C]), $.push(W.value)));
1699
+ var K = x[C], W = { value: $e(K), primKey: E[P + C] };
1700
+ s.call(W, W.value, W) !== !1 && (W.value == null ? j.push(E[P + C]) : u || V(d(K), d(W.value)) === 0 ? (R.push(W.value), u && k.push(E[P + C])) : (j.push(E[P + C]), $.push(W.value)));
1701
1701
  }
1702
1702
  return Promise.resolve(0 < $.length && c.mutate({ trans: a, type: "add", values: $ }).then(function(F) {
1703
1703
  for (var H in F.failures) j.splice(parseInt(H), 1);
1704
1704
  w($.length, F);
1705
1705
  })).then(function() {
1706
- return (0 < T.length || A && typeof e == "object") && c.mutate({ trans: a, type: "put", keys: k, values: T, criteria: A, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < P }).then(function(F) {
1707
- return w(T.length, F);
1706
+ return (0 < R.length || A && typeof e == "object") && c.mutate({ trans: a, type: "put", keys: k, values: R, criteria: A, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < P }).then(function(F) {
1707
+ return w(R.length, F);
1708
1708
  });
1709
1709
  }).then(function() {
1710
1710
  return (0 < j.length || A && v) && c.mutate({ trans: a, type: "delete", keys: j, criteria: A, isAdditionalChunk: 0 < P }).then(function(F) {
1711
- return Kt(n.table, j, F);
1711
+ return Lt(n.table, j, F);
1712
1712
  }).then(function(F) {
1713
1713
  return w(j.length, F);
1714
1714
  });
@@ -1717,21 +1717,21 @@ function Ba() {
1717
1717
  });
1718
1718
  });
1719
1719
  }
1720
- var A = tt(n) && n.limit === 1 / 0 && (typeof e != "function" || v) && { index: n.index, range: n.range };
1720
+ var A = rt(n) && n.limit === 1 / 0 && (typeof e != "function" || v) && { index: n.index, range: n.range };
1721
1721
  return S(0).then(function() {
1722
- if (0 < h.length) throw new Nt("Error modifying one or more objects", h, O, y);
1722
+ if (0 < h.length) throw new Dt("Error modifying one or more objects", h, O, y);
1723
1723
  return E.length;
1724
1724
  });
1725
1725
  });
1726
1726
  });
1727
1727
  }, z.prototype.delete = function() {
1728
1728
  var e = this._ctx, r = e.range;
1729
- return !tt(e) || e.table.schema.yProps || !e.isPrimKey && r.type !== 3 ? this.modify(yn) : this._write(function(n) {
1729
+ return !rt(e) || e.table.schema.yProps || !e.isPrimKey && r.type !== 3 ? this.modify(yn) : this._write(function(n) {
1730
1730
  var a = e.table.core.schema.primaryKey, s = r;
1731
1731
  return e.table.core.count({ trans: n, query: { index: a, range: s } }).then(function(c) {
1732
1732
  return e.table.core.mutate({ trans: n, type: "deleteRange", range: s }).then(function(p) {
1733
1733
  var d = p.failures, p = p.numFailures;
1734
- if (p) throw new Nt("Could not delete some values", Object.keys(d).map(function(m) {
1734
+ if (p) throw new Dt("Could not delete some values", Object.keys(d).map(function(m) {
1735
1735
  return d[m];
1736
1736
  }), c - p);
1737
1737
  return c - p;
@@ -1750,19 +1750,19 @@ function Ba() {
1750
1750
  function la(e, r) {
1751
1751
  return r < e ? -1 : e === r ? 0 : 1;
1752
1752
  }
1753
- function de(e, r, n) {
1753
+ function le(e, r, n) {
1754
1754
  return e = e instanceof vn ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(r), e;
1755
1755
  }
1756
- function rt(e) {
1756
+ function nt(e) {
1757
1757
  return new e.Collection(e, function() {
1758
1758
  return bn("");
1759
1759
  }).limit(0);
1760
1760
  }
1761
- function Ut(e, r, n, a) {
1761
+ function Wt(e, r, n, a) {
1762
1762
  var s, c, u, d, p, m, w, h = n.length;
1763
1763
  if (!n.every(function(v) {
1764
1764
  return typeof v == "string";
1765
- })) return de(e, on);
1765
+ })) return le(e, on);
1766
1766
  function O(v) {
1767
1767
  s = v === "next" ? function(S) {
1768
1768
  return S.toUpperCase();
@@ -1785,7 +1785,7 @@ function Ba() {
1785
1785
  }), w = (m = v) === "next" ? "" : a;
1786
1786
  }
1787
1787
  O("next"), e = new e.Collection(e, function() {
1788
- return Te(d[0], p[h - 1] + a);
1788
+ return Re(d[0], p[h - 1] + a);
1789
1789
  }), e._ondirectionchange = function(v) {
1790
1790
  O(v);
1791
1791
  };
@@ -1795,91 +1795,91 @@ function Ba() {
1795
1795
  if (typeof A != "string") return !1;
1796
1796
  var P = c(A);
1797
1797
  if (r(P, p, y)) return !0;
1798
- for (var N = null, I = y; I < h; ++I) {
1799
- var R = (function($, T, k, j, C, K) {
1798
+ for (var N = null, D = y; D < h; ++D) {
1799
+ var x = (function($, R, k, j, C, K) {
1800
1800
  for (var W = Math.min($.length, j.length), F = -1, H = 0; H < W; ++H) {
1801
- var he = T[H];
1802
- if (he !== j[H]) return C($[H], k[H]) < 0 ? $.substr(0, H) + k[H] + k.substr(H + 1) : C($[H], j[H]) < 0 ? $.substr(0, H) + j[H] + k.substr(H + 1) : 0 <= F ? $.substr(0, F) + T[F] + k.substr(F + 1) : null;
1803
- C($[H], he) < 0 && (F = H);
1801
+ var de = R[H];
1802
+ if (de !== j[H]) return C($[H], k[H]) < 0 ? $.substr(0, H) + k[H] + k.substr(H + 1) : C($[H], j[H]) < 0 ? $.substr(0, H) + j[H] + k.substr(H + 1) : 0 <= F ? $.substr(0, F) + R[F] + k.substr(F + 1) : null;
1803
+ C($[H], de) < 0 && (F = H);
1804
1804
  }
1805
1805
  return W < j.length && K === "next" ? $ + k.substr($.length) : W < $.length && K === "prev" ? $.substr(0, k.length) : F < 0 ? null : $.substr(0, F) + j[F] + k.substr(F + 1);
1806
- })(A, P, d[I], p[I], u, m);
1807
- R === null && N === null ? y = I + 1 : (N === null || 0 < u(N, R)) && (N = R);
1806
+ })(A, P, d[D], p[D], u, m);
1807
+ x === null && N === null ? y = D + 1 : (N === null || 0 < u(N, x)) && (N = x);
1808
1808
  }
1809
1809
  return E(N !== null ? function() {
1810
1810
  v.continue(N + w);
1811
1811
  } : S), !1;
1812
1812
  }), e;
1813
1813
  }
1814
- function Te(e, r, n, a) {
1814
+ function Re(e, r, n, a) {
1815
1815
  return { type: 2, lower: e, upper: r, lowerOpen: n, upperOpen: a };
1816
1816
  }
1817
1817
  function bn(e) {
1818
1818
  return { type: 1, lower: e, upper: e };
1819
1819
  }
1820
- var vn = (Object.defineProperty(ae.prototype, "Collection", { get: function() {
1820
+ var vn = (Object.defineProperty(ne.prototype, "Collection", { get: function() {
1821
1821
  return this._ctx.table.db.Collection;
1822
- }, enumerable: !1, configurable: !0 }), ae.prototype.between = function(e, r, n, a) {
1822
+ }, enumerable: !1, configurable: !0 }), ne.prototype.between = function(e, r, n, a) {
1823
1823
  n = n !== !1, a = a === !0;
1824
1824
  try {
1825
- return 0 < this._cmp(e, r) || this._cmp(e, r) === 0 && (n || a) && (!n || !a) ? rt(this) : new this.Collection(this, function() {
1826
- return Te(e, r, !n, !a);
1825
+ return 0 < this._cmp(e, r) || this._cmp(e, r) === 0 && (n || a) && (!n || !a) ? nt(this) : new this.Collection(this, function() {
1826
+ return Re(e, r, !n, !a);
1827
1827
  });
1828
1828
  } catch {
1829
- return de(this, we);
1829
+ return le(this, Se);
1830
1830
  }
1831
- }, ae.prototype.equals = function(e) {
1832
- return e == null ? de(this, we) : new this.Collection(this, function() {
1831
+ }, ne.prototype.equals = function(e) {
1832
+ return e == null ? le(this, Se) : new this.Collection(this, function() {
1833
1833
  return bn(e);
1834
1834
  });
1835
- }, ae.prototype.above = function(e) {
1836
- return e == null ? de(this, we) : new this.Collection(this, function() {
1837
- return Te(e, void 0, !0);
1835
+ }, ne.prototype.above = function(e) {
1836
+ return e == null ? le(this, Se) : new this.Collection(this, function() {
1837
+ return Re(e, void 0, !0);
1838
1838
  });
1839
- }, ae.prototype.aboveOrEqual = function(e) {
1840
- return e == null ? de(this, we) : new this.Collection(this, function() {
1841
- return Te(e, void 0, !1);
1839
+ }, ne.prototype.aboveOrEqual = function(e) {
1840
+ return e == null ? le(this, Se) : new this.Collection(this, function() {
1841
+ return Re(e, void 0, !1);
1842
1842
  });
1843
- }, ae.prototype.below = function(e) {
1844
- return e == null ? de(this, we) : new this.Collection(this, function() {
1845
- return Te(void 0, e, !1, !0);
1843
+ }, ne.prototype.below = function(e) {
1844
+ return e == null ? le(this, Se) : new this.Collection(this, function() {
1845
+ return Re(void 0, e, !1, !0);
1846
1846
  });
1847
- }, ae.prototype.belowOrEqual = function(e) {
1848
- return e == null ? de(this, we) : new this.Collection(this, function() {
1849
- return Te(void 0, e);
1847
+ }, ne.prototype.belowOrEqual = function(e) {
1848
+ return e == null ? le(this, Se) : new this.Collection(this, function() {
1849
+ return Re(void 0, e);
1850
1850
  });
1851
- }, ae.prototype.startsWith = function(e) {
1852
- return typeof e != "string" ? de(this, on) : this.between(e, e + Ue, !0, !0);
1853
- }, ae.prototype.startsWithIgnoreCase = function(e) {
1854
- return e === "" ? this.startsWith(e) : Ut(this, function(r, n) {
1851
+ }, ne.prototype.startsWith = function(e) {
1852
+ return typeof e != "string" ? le(this, on) : this.between(e, e + We, !0, !0);
1853
+ }, ne.prototype.startsWithIgnoreCase = function(e) {
1854
+ return e === "" ? this.startsWith(e) : Wt(this, function(r, n) {
1855
1855
  return r.indexOf(n[0]) === 0;
1856
- }, [e], Ue);
1857
- }, ae.prototype.equalsIgnoreCase = function(e) {
1858
- return Ut(this, function(r, n) {
1856
+ }, [e], We);
1857
+ }, ne.prototype.equalsIgnoreCase = function(e) {
1858
+ return Wt(this, function(r, n) {
1859
1859
  return r === n[0];
1860
1860
  }, [e], "");
1861
- }, ae.prototype.anyOfIgnoreCase = function() {
1862
- var e = Ee.apply(Ye, arguments);
1863
- return e.length === 0 ? rt(this) : Ut(this, function(r, n) {
1861
+ }, ne.prototype.anyOfIgnoreCase = function() {
1862
+ var e = we.apply(Xe, arguments);
1863
+ return e.length === 0 ? nt(this) : Wt(this, function(r, n) {
1864
1864
  return n.indexOf(r) !== -1;
1865
1865
  }, e, "");
1866
- }, ae.prototype.startsWithAnyOfIgnoreCase = function() {
1867
- var e = Ee.apply(Ye, arguments);
1868
- return e.length === 0 ? rt(this) : Ut(this, function(r, n) {
1866
+ }, ne.prototype.startsWithAnyOfIgnoreCase = function() {
1867
+ var e = we.apply(Xe, arguments);
1868
+ return e.length === 0 ? nt(this) : Wt(this, function(r, n) {
1869
1869
  return n.some(function(a) {
1870
1870
  return r.indexOf(a) === 0;
1871
1871
  });
1872
- }, e, Ue);
1873
- }, ae.prototype.anyOf = function() {
1874
- var e = this, r = Ee.apply(Ye, arguments), n = this._cmp;
1872
+ }, e, We);
1873
+ }, ne.prototype.anyOf = function() {
1874
+ var e = this, r = we.apply(Xe, arguments), n = this._cmp;
1875
1875
  try {
1876
1876
  r.sort(n);
1877
1877
  } catch {
1878
- return de(this, we);
1878
+ return le(this, Se);
1879
1879
  }
1880
- if (r.length === 0) return rt(this);
1880
+ if (r.length === 0) return nt(this);
1881
1881
  var a = new this.Collection(this, function() {
1882
- return Te(r[0], r[r.length - 1]);
1882
+ return Re(r[0], r[r.length - 1]);
1883
1883
  });
1884
1884
  a._ondirectionchange = function(c) {
1885
1885
  n = c === "next" ? e._ascending : e._descending, r.sort(n);
@@ -1891,43 +1891,43 @@ function Ba() {
1891
1891
  c.continue(r[s]);
1892
1892
  }), !1);
1893
1893
  }), a;
1894
- }, ae.prototype.notEqual = function(e) {
1894
+ }, ne.prototype.notEqual = function(e) {
1895
1895
  return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
1896
- }, ae.prototype.noneOf = function() {
1897
- var e = Ee.apply(Ye, arguments);
1896
+ }, ne.prototype.noneOf = function() {
1897
+ var e = we.apply(Xe, arguments);
1898
1898
  if (e.length === 0) return new this.Collection(this);
1899
1899
  try {
1900
1900
  e.sort(this._ascending);
1901
1901
  } catch {
1902
- return de(this, we);
1902
+ return le(this, Se);
1903
1903
  }
1904
1904
  var r = e.reduce(function(n, a) {
1905
1905
  return n ? n.concat([[n[n.length - 1][1], a]]) : [[-1 / 0, a]];
1906
1906
  }, null);
1907
1907
  return r.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(r, { includeLowers: !1, includeUppers: !1 });
1908
- }, ae.prototype.inAnyRange = function(A, r) {
1908
+ }, ne.prototype.inAnyRange = function(A, r) {
1909
1909
  var n = this, a = this._cmp, s = this._ascending, c = this._descending, u = this._min, d = this._max;
1910
- if (A.length === 0) return rt(this);
1910
+ if (A.length === 0) return nt(this);
1911
1911
  if (!A.every(function(P) {
1912
1912
  return P[0] !== void 0 && P[1] !== void 0 && s(P[0], P[1]) <= 0;
1913
- })) return de(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", B.InvalidArgument);
1913
+ })) return le(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", B.InvalidArgument);
1914
1914
  var p = !r || r.includeLowers !== !1, m = r && r.includeUppers === !0, w, h = s;
1915
1915
  function O(P, N) {
1916
1916
  return h(P[0], N[0]);
1917
1917
  }
1918
1918
  try {
1919
1919
  (w = A.reduce(function(P, N) {
1920
- for (var I = 0, R = P.length; I < R; ++I) {
1921
- var $ = P[I];
1920
+ for (var D = 0, x = P.length; D < x; ++D) {
1921
+ var $ = P[D];
1922
1922
  if (a(N[0], $[1]) < 0 && 0 < a(N[1], $[0])) {
1923
1923
  $[0] = u($[0], N[0]), $[1] = d($[1], N[1]);
1924
1924
  break;
1925
1925
  }
1926
1926
  }
1927
- return I === R && P.push(N), P;
1927
+ return D === x && P.push(N), P;
1928
1928
  }, [])).sort(O);
1929
1929
  } catch {
1930
- return de(this, we);
1930
+ return le(this, Se);
1931
1931
  }
1932
1932
  var y = 0, v = m ? function(P) {
1933
1933
  return 0 < s(P, w[y][1]);
@@ -1938,52 +1938,52 @@ function Ba() {
1938
1938
  } : function(P) {
1939
1939
  return 0 <= c(P, w[y][0]);
1940
1940
  }, S = v, A = new this.Collection(this, function() {
1941
- return Te(w[0][0], w[w.length - 1][1], !p, !m);
1941
+ return Re(w[0][0], w[w.length - 1][1], !p, !m);
1942
1942
  });
1943
1943
  return A._ondirectionchange = function(P) {
1944
1944
  h = P === "next" ? (S = v, s) : (S = E, c), w.sort(O);
1945
- }, A._addAlgorithm(function(P, N, I) {
1946
- for (var R, $ = P.key; S($); ) if (++y === w.length) return N(I), !1;
1947
- return !v(R = $) && !E(R) || (n._cmp($, w[y][1]) === 0 || n._cmp($, w[y][0]) === 0 || N(function() {
1945
+ }, A._addAlgorithm(function(P, N, D) {
1946
+ for (var x, $ = P.key; S($); ) if (++y === w.length) return N(D), !1;
1947
+ return !v(x = $) && !E(x) || (n._cmp($, w[y][1]) === 0 || n._cmp($, w[y][0]) === 0 || N(function() {
1948
1948
  h === s ? P.continue(w[y][0]) : P.continue(w[y][1]);
1949
1949
  }), !1);
1950
1950
  }), A;
1951
- }, ae.prototype.startsWithAnyOf = function() {
1952
- var e = Ee.apply(Ye, arguments);
1951
+ }, ne.prototype.startsWithAnyOf = function() {
1952
+ var e = we.apply(Xe, arguments);
1953
1953
  return e.every(function(r) {
1954
1954
  return typeof r == "string";
1955
- }) ? e.length === 0 ? rt(this) : this.inAnyRange(e.map(function(r) {
1956
- return [r, r + Ue];
1957
- })) : de(this, "startsWithAnyOf() only works with strings");
1958
- }, ae);
1959
- function ae() {
1955
+ }) ? e.length === 0 ? nt(this) : this.inAnyRange(e.map(function(r) {
1956
+ return [r, r + We];
1957
+ })) : le(this, "startsWithAnyOf() only works with strings");
1958
+ }, ne);
1959
+ function ne() {
1960
1960
  }
1961
- function ye(e) {
1961
+ function be(e) {
1962
1962
  return Z(function(r) {
1963
- return mt(r), e(r.target.error), !1;
1963
+ return bt(r), e(r.target.error), !1;
1964
1964
  });
1965
1965
  }
1966
- function mt(e) {
1966
+ function bt(e) {
1967
1967
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
1968
1968
  }
1969
- var yt = "storagemutated", Er = "x-storagemutated-1", Re = gt(null, yt), da = (be.prototype._lock = function() {
1970
- return ot(!L.global), ++this._reculock, this._reculock !== 1 || L.global || (L.lockOwnerFor = this), this;
1971
- }, be.prototype._unlock = function() {
1972
- if (ot(!L.global), --this._reculock == 0) for (L.global || (L.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
1969
+ var vt = "storagemutated", wr = "x-storagemutated-1", xe = mt(null, vt), da = (ve.prototype._lock = function() {
1970
+ return ct(!L.global), ++this._reculock, this._reculock !== 1 || L.global || (L.lockOwnerFor = this), this;
1971
+ }, ve.prototype._unlock = function() {
1972
+ if (ct(!L.global), --this._reculock == 0) for (L.global || (L.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
1973
1973
  var e = this._blockedFuncs.shift();
1974
1974
  try {
1975
- Be(e[1], e[0]);
1975
+ Ue(e[1], e[0]);
1976
1976
  } catch {
1977
1977
  }
1978
1978
  }
1979
1979
  return this;
1980
- }, be.prototype._locked = function() {
1980
+ }, ve.prototype._locked = function() {
1981
1981
  return this._reculock && L.lockOwnerFor !== this;
1982
- }, be.prototype.create = function(e) {
1982
+ }, ve.prototype.create = function(e) {
1983
1983
  var r = this;
1984
1984
  if (!this.mode) return this;
1985
1985
  var n = this.db.idbdb, a = this.db._state.dbOpenError;
1986
- if (ot(!this.idbtrans), !e && !n) switch (a && a.name) {
1986
+ if (ct(!this.idbtrans), !e && !n) switch (a && a.name) {
1987
1987
  case "DatabaseClosedError":
1988
1988
  throw new B.DatabaseClosed(a);
1989
1989
  case "MissingAPIError":
@@ -1992,14 +1992,14 @@ function Ba() {
1992
1992
  throw new B.OpenFailed(a);
1993
1993
  }
1994
1994
  if (!this.active) throw new B.TransactionInactive();
1995
- return ot(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = Z(function(s) {
1996
- mt(s), r._reject(e.error);
1995
+ return ct(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = Z(function(s) {
1996
+ bt(s), r._reject(e.error);
1997
1997
  }), e.onabort = Z(function(s) {
1998
- mt(s), r.active && r._reject(new B.Abort(e.error)), r.active = !1, r.on("abort").fire(s);
1998
+ bt(s), r.active && r._reject(new B.Abort(e.error)), r.active = !1, r.on("abort").fire(s);
1999
1999
  }), e.oncomplete = Z(function() {
2000
- r.active = !1, r._resolve(), "mutatedParts" in e && Re.storagemutated.fire(e.mutatedParts);
2000
+ r.active = !1, r._resolve(), "mutatedParts" in e && xe.storagemutated.fire(e.mutatedParts);
2001
2001
  }), this;
2002
- }, be.prototype._promise = function(e, r, n) {
2002
+ }, ve.prototype._promise = function(e, r, n) {
2003
2003
  var a = this;
2004
2004
  if (e === "readwrite" && this.mode !== "readwrite") return q(new B.ReadOnly("Transaction is readonly"));
2005
2005
  if (!this.active) return q(new B.TransactionInactive());
@@ -2008,7 +2008,7 @@ function Ba() {
2008
2008
  a._promise(e, r, n).then(c, u);
2009
2009
  }, L]);
2010
2010
  });
2011
- if (n) return Ne(function() {
2011
+ if (n) return De(function() {
2012
2012
  var c = new M(function(u, d) {
2013
2013
  a._lock();
2014
2014
  var p = r(u, d, a);
@@ -2023,9 +2023,9 @@ function Ba() {
2023
2023
  d && d.then && d.then(c, u);
2024
2024
  });
2025
2025
  return s._lib = !0, s;
2026
- }, be.prototype._root = function() {
2026
+ }, ve.prototype._root = function() {
2027
2027
  return this.parent ? this.parent._root() : this;
2028
- }, be.prototype.waitFor = function(e) {
2028
+ }, ve.prototype.waitFor = function(e) {
2029
2029
  var r, n = this._root(), a = M.resolve(e);
2030
2030
  n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
2031
2031
  return a;
@@ -2043,24 +2043,24 @@ function Ba() {
2043
2043
  n._waitingFor === s && (n._waitingFor = null);
2044
2044
  });
2045
2045
  });
2046
- }, be.prototype.abort = function() {
2046
+ }, ve.prototype.abort = function() {
2047
2047
  this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new B.Abort()));
2048
- }, be.prototype.table = function(e) {
2048
+ }, ve.prototype.table = function(e) {
2049
2049
  var r = this._memoizedTables || (this._memoizedTables = {});
2050
- if (re(r, e)) return r[e];
2050
+ if (ae(r, e)) return r[e];
2051
2051
  var n = this.schema[e];
2052
2052
  if (!n) throw new B.NotFound("Table " + e + " not part of transaction");
2053
2053
  return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), r[e] = n;
2054
- }, be);
2055
- function be() {
2054
+ }, ve);
2055
+ function ve() {
2056
2056
  }
2057
- function wr(e, r, n, a, s, c, u, d) {
2057
+ function Sr(e, r, n, a, s, c, u, d) {
2058
2058
  return { name: e, keyPath: r, unique: n, multi: a, auto: s, compound: c, src: (n && !u ? "&" : "") + (a ? "*" : "") + (s ? "++" : "") + En(r), type: d };
2059
2059
  }
2060
2060
  function En(e) {
2061
2061
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
2062
2062
  }
2063
- function Sr(e, r, n) {
2063
+ function Or(e, r, n) {
2064
2064
  return { name: e, primKey: r, indexes: n, mappedClass: null, idxByName: (a = function(s) {
2065
2065
  return [s.name, s];
2066
2066
  }, n.reduce(function(s, c, u) {
@@ -2068,25 +2068,25 @@ function Ba() {
2068
2068
  }, {})) };
2069
2069
  var a;
2070
2070
  }
2071
- var bt = function(e) {
2071
+ var Et = function(e) {
2072
2072
  try {
2073
- return e.only([[]]), bt = function() {
2073
+ return e.only([[]]), Et = function() {
2074
2074
  return [[]];
2075
2075
  }, [[]];
2076
2076
  } catch {
2077
- return bt = function() {
2078
- return Ue;
2079
- }, Ue;
2077
+ return Et = function() {
2078
+ return We;
2079
+ }, We;
2080
2080
  }
2081
2081
  };
2082
- function Or(e) {
2082
+ function _r(e) {
2083
2083
  return e == null ? function() {
2084
2084
  } : typeof e == "string" ? (r = e).split(".").length === 1 ? function(n) {
2085
2085
  return n[r];
2086
2086
  } : function(n) {
2087
- return ve(n, r);
2087
+ return Ee(n, r);
2088
2088
  } : function(n) {
2089
- return ve(n, e);
2089
+ return Ee(n, e);
2090
2090
  };
2091
2091
  var r;
2092
2092
  }
@@ -2094,7 +2094,7 @@ function Ba() {
2094
2094
  return [].slice.call(e);
2095
2095
  }
2096
2096
  var ha = 0;
2097
- function vt(e) {
2097
+ function wt(e) {
2098
2098
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
2099
2099
  }
2100
2100
  function fa(e, r, p) {
@@ -2107,136 +2107,136 @@ function Ba() {
2107
2107
  function s(O) {
2108
2108
  var y, v = O.name;
2109
2109
  return { name: v, schema: O, mutate: function(E) {
2110
- var S = E.trans, A = E.type, P = E.keys, N = E.values, I = E.range;
2111
- return new Promise(function(R, $) {
2112
- R = Z(R);
2113
- var T = S.objectStore(v), k = T.keyPath == null, j = A === "put" || A === "add";
2110
+ var S = E.trans, A = E.type, P = E.keys, N = E.values, D = E.range;
2111
+ return new Promise(function(x, $) {
2112
+ x = Z(x);
2113
+ var R = S.objectStore(v), k = R.keyPath == null, j = A === "put" || A === "add";
2114
2114
  if (!j && A !== "delete" && A !== "deleteRange") throw new Error("Invalid operation type: " + A);
2115
2115
  var C, K = (P || N || { length: 1 }).length;
2116
2116
  if (P && N && P.length !== N.length) throw new Error("Given keys array must have same length as given values array.");
2117
- if (K === 0) return R({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
2118
- function W(ue) {
2119
- ++he, mt(ue);
2117
+ if (K === 0) return x({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
2118
+ function W(ce) {
2119
+ ++de, bt(ce);
2120
2120
  }
2121
- var F = [], H = [], he = 0;
2121
+ var F = [], H = [], de = 0;
2122
2122
  if (A === "deleteRange") {
2123
- if (I.type === 4) return R({ numFailures: he, failures: H, results: [], lastResult: void 0 });
2124
- I.type === 3 ? F.push(C = T.clear()) : F.push(C = T.delete(a(I)));
2123
+ if (D.type === 4) return x({ numFailures: de, failures: H, results: [], lastResult: void 0 });
2124
+ D.type === 3 ? F.push(C = R.clear()) : F.push(C = R.delete(a(D)));
2125
2125
  } else {
2126
- var k = j ? k ? [N, P] : [N, null] : [P, null], U = k[0], ie = k[1];
2127
- if (j) for (var ce = 0; ce < K; ++ce) F.push(C = ie && ie[ce] !== void 0 ? T[A](U[ce], ie[ce]) : T[A](U[ce])), C.onerror = W;
2128
- else for (ce = 0; ce < K; ++ce) F.push(C = T[A](U[ce])), C.onerror = W;
2126
+ var k = j ? k ? [N, P] : [N, null] : [P, null], U = k[0], oe = k[1];
2127
+ if (j) for (var ie = 0; ie < K; ++ie) F.push(C = oe && oe[ie] !== void 0 ? R[A](U[ie], oe[ie]) : R[A](U[ie])), C.onerror = W;
2128
+ else for (ie = 0; ie < K; ++ie) F.push(C = R[A](U[ie])), C.onerror = W;
2129
2129
  }
2130
- function er(ue) {
2131
- ue = ue.target.result, F.forEach(function(Ve, Br) {
2132
- return Ve.error != null && (H[Br] = Ve.error);
2133
- }), R({ numFailures: he, failures: H, results: A === "delete" ? P : F.map(function(Ve) {
2134
- return Ve.result;
2135
- }), lastResult: ue });
2130
+ function tr(ce) {
2131
+ ce = ce.target.result, F.forEach(function(ze, Ur) {
2132
+ return ze.error != null && (H[Ur] = ze.error);
2133
+ }), x({ numFailures: de, failures: H, results: A === "delete" ? P : F.map(function(ze) {
2134
+ return ze.result;
2135
+ }), lastResult: ce });
2136
2136
  }
2137
- C.onerror = function(ue) {
2138
- W(ue), er(ue);
2139
- }, C.onsuccess = er;
2137
+ C.onerror = function(ce) {
2138
+ W(ce), tr(ce);
2139
+ }, C.onsuccess = tr;
2140
2140
  });
2141
2141
  }, getMany: function(E) {
2142
2142
  var S = E.trans, A = E.keys;
2143
2143
  return new Promise(function(P, N) {
2144
2144
  P = Z(P);
2145
- for (var I, R = S.objectStore(v), $ = A.length, T = new Array($), k = 0, j = 0, C = function(F) {
2146
- F = F.target, T[F._pos] = F.result, ++j === k && P(T);
2147
- }, K = ye(N), W = 0; W < $; ++W) A[W] != null && ((I = R.get(A[W]))._pos = W, I.onsuccess = C, I.onerror = K, ++k);
2148
- k === 0 && P(T);
2145
+ for (var D, x = S.objectStore(v), $ = A.length, R = new Array($), k = 0, j = 0, C = function(F) {
2146
+ F = F.target, R[F._pos] = F.result, ++j === k && P(R);
2147
+ }, K = be(N), W = 0; W < $; ++W) A[W] != null && ((D = x.get(A[W]))._pos = W, D.onsuccess = C, D.onerror = K, ++k);
2148
+ k === 0 && P(R);
2149
2149
  });
2150
2150
  }, get: function(E) {
2151
2151
  var S = E.trans, A = E.key;
2152
2152
  return new Promise(function(P, N) {
2153
2153
  P = Z(P);
2154
- var I = S.objectStore(v).get(A);
2155
- I.onsuccess = function(R) {
2156
- return P(R.target.result);
2157
- }, I.onerror = ye(N);
2154
+ var D = S.objectStore(v).get(A);
2155
+ D.onsuccess = function(x) {
2156
+ return P(x.target.result);
2157
+ }, D.onerror = be(N);
2158
2158
  });
2159
2159
  }, query: (y = m, function(E) {
2160
2160
  return new Promise(function(S, A) {
2161
2161
  S = Z(S);
2162
- var P, N, I, k = E.trans, R = E.values, $ = E.limit, C = E.query, T = $ === 1 / 0 ? void 0 : $, j = C.index, C = C.range, k = k.objectStore(v), j = j.isPrimaryKey ? k : k.index(j.name), C = a(C);
2162
+ var P, N, D, k = E.trans, x = E.values, $ = E.limit, C = E.query, R = $ === 1 / 0 ? void 0 : $, j = C.index, C = C.range, k = k.objectStore(v), j = j.isPrimaryKey ? k : k.index(j.name), C = a(C);
2163
2163
  if ($ === 0) return S({ result: [] });
2164
- y ? ((T = R ? j.getAll(C, T) : j.getAllKeys(C, T)).onsuccess = function(K) {
2164
+ y ? ((R = x ? j.getAll(C, R) : j.getAllKeys(C, R)).onsuccess = function(K) {
2165
2165
  return S({ result: K.target.result });
2166
- }, T.onerror = ye(A)) : (P = 0, N = !R && "openKeyCursor" in j ? j.openKeyCursor(C) : j.openCursor(C), I = [], N.onsuccess = function(K) {
2166
+ }, R.onerror = be(A)) : (P = 0, N = !x && "openKeyCursor" in j ? j.openKeyCursor(C) : j.openCursor(C), D = [], N.onsuccess = function(K) {
2167
2167
  var W = N.result;
2168
- return W ? (I.push(R ? W.value : W.primaryKey), ++P === $ ? S({ result: I }) : void W.continue()) : S({ result: I });
2169
- }, N.onerror = ye(A));
2168
+ return W ? (D.push(x ? W.value : W.primaryKey), ++P === $ ? S({ result: D }) : void W.continue()) : S({ result: D });
2169
+ }, N.onerror = be(A));
2170
2170
  });
2171
2171
  }), openCursor: function(E) {
2172
- var S = E.trans, A = E.values, P = E.query, N = E.reverse, I = E.unique;
2173
- return new Promise(function(R, $) {
2174
- R = Z(R);
2175
- var j = P.index, T = P.range, k = S.objectStore(v), k = j.isPrimaryKey ? k : k.index(j.name), j = N ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", C = !A && "openKeyCursor" in k ? k.openKeyCursor(a(T), j) : k.openCursor(a(T), j);
2176
- C.onerror = ye($), C.onsuccess = Z(function(K) {
2177
- var W, F, H, he, U = C.result;
2178
- U ? (U.___id = ++ha, U.done = !1, W = U.continue.bind(U), F = (F = U.continuePrimaryKey) && F.bind(U), H = U.advance.bind(U), he = function() {
2172
+ var S = E.trans, A = E.values, P = E.query, N = E.reverse, D = E.unique;
2173
+ return new Promise(function(x, $) {
2174
+ x = Z(x);
2175
+ var j = P.index, R = P.range, k = S.objectStore(v), k = j.isPrimaryKey ? k : k.index(j.name), j = N ? D ? "prevunique" : "prev" : D ? "nextunique" : "next", C = !A && "openKeyCursor" in k ? k.openKeyCursor(a(R), j) : k.openCursor(a(R), j);
2176
+ C.onerror = be($), C.onsuccess = Z(function(K) {
2177
+ var W, F, H, de, U = C.result;
2178
+ U ? (U.___id = ++ha, U.done = !1, W = U.continue.bind(U), F = (F = U.continuePrimaryKey) && F.bind(U), H = U.advance.bind(U), de = function() {
2179
2179
  throw new Error("Cursor not stopped");
2180
2180
  }, U.trans = S, U.stop = U.continue = U.continuePrimaryKey = U.advance = function() {
2181
2181
  throw new Error("Cursor not started");
2182
2182
  }, U.fail = Z($), U.next = function() {
2183
- var ie = this, ce = 1;
2183
+ var oe = this, ie = 1;
2184
2184
  return this.start(function() {
2185
- return ce-- ? ie.continue() : ie.stop();
2185
+ return ie-- ? oe.continue() : oe.stop();
2186
2186
  }).then(function() {
2187
- return ie;
2187
+ return oe;
2188
2188
  });
2189
- }, U.start = function(ie) {
2190
- function ce() {
2189
+ }, U.start = function(oe) {
2190
+ function ie() {
2191
2191
  if (C.result) try {
2192
- ie();
2193
- } catch (ue) {
2194
- U.fail(ue);
2192
+ oe();
2193
+ } catch (ce) {
2194
+ U.fail(ce);
2195
2195
  }
2196
2196
  else U.done = !0, U.start = function() {
2197
2197
  throw new Error("Cursor behind last entry");
2198
2198
  }, U.stop();
2199
2199
  }
2200
- var er = new Promise(function(ue, Ve) {
2201
- ue = Z(ue), C.onerror = ye(Ve), U.fail = Ve, U.stop = function(Br) {
2202
- U.stop = U.continue = U.continuePrimaryKey = U.advance = he, ue(Br);
2200
+ var tr = new Promise(function(ce, ze) {
2201
+ ce = Z(ce), C.onerror = be(ze), U.fail = ze, U.stop = function(Ur) {
2202
+ U.stop = U.continue = U.continuePrimaryKey = U.advance = de, ce(Ur);
2203
2203
  };
2204
2204
  });
2205
- return C.onsuccess = Z(function(ue) {
2206
- C.onsuccess = ce, ce();
2207
- }), U.continue = W, U.continuePrimaryKey = F, U.advance = H, ce(), er;
2208
- }, R(U)) : R(null);
2205
+ return C.onsuccess = Z(function(ce) {
2206
+ C.onsuccess = ie, ie();
2207
+ }), U.continue = W, U.continuePrimaryKey = F, U.advance = H, ie(), tr;
2208
+ }, x(U)) : x(null);
2209
2209
  }, $);
2210
2210
  });
2211
2211
  }, count: function(E) {
2212
2212
  var S = E.query, A = E.trans, P = S.index, N = S.range;
2213
- return new Promise(function(I, R) {
2214
- var $ = A.objectStore(v), T = P.isPrimaryKey ? $ : $.index(P.name), $ = a(N), T = $ ? T.count($) : T.count();
2215
- T.onsuccess = Z(function(k) {
2216
- return I(k.target.result);
2217
- }), T.onerror = ye(R);
2213
+ return new Promise(function(D, x) {
2214
+ var $ = A.objectStore(v), R = P.isPrimaryKey ? $ : $.index(P.name), $ = a(N), R = $ ? R.count($) : R.count();
2215
+ R.onsuccess = Z(function(k) {
2216
+ return D(k.target.result);
2217
+ }), R.onerror = be(x);
2218
2218
  });
2219
2219
  } };
2220
2220
  }
2221
2221
  var c, u, d, w = (u = p, d = wn((c = e).objectStoreNames), { schema: { name: c.name, tables: d.map(function(O) {
2222
2222
  return u.objectStore(O);
2223
2223
  }).map(function(O) {
2224
- var y = O.keyPath, S = O.autoIncrement, v = x(y), E = {}, S = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: y == null, compound: v, keyPath: y, autoIncrement: S, unique: !0, extractKey: Or(y) }, indexes: wn(O.indexNames).map(function(A) {
2224
+ var y = O.keyPath, S = O.autoIncrement, v = T(y), E = {}, S = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: y == null, compound: v, keyPath: y, autoIncrement: S, unique: !0, extractKey: _r(y) }, indexes: wn(O.indexNames).map(function(A) {
2225
2225
  return O.index(A);
2226
- }).map(function(I) {
2227
- var P = I.name, N = I.unique, R = I.multiEntry, I = I.keyPath, R = { name: P, compound: x(I), keyPath: I, unique: N, multiEntry: R, extractKey: Or(I) };
2228
- return E[vt(I)] = R;
2226
+ }).map(function(D) {
2227
+ var P = D.name, N = D.unique, x = D.multiEntry, D = D.keyPath, x = { name: P, compound: T(D), keyPath: D, unique: N, multiEntry: x, extractKey: _r(D) };
2228
+ return E[wt(D)] = x;
2229
2229
  }), getIndexByKeyPath: function(A) {
2230
- return E[vt(A)];
2230
+ return E[wt(A)];
2231
2231
  } };
2232
- return E[":id"] = S.primaryKey, y != null && (E[vt(y)] = S.primaryKey), S;
2232
+ return E[":id"] = S.primaryKey, y != null && (E[wt(y)] = S.primaryKey), S;
2233
2233
  }) }, hasGetAll: 0 < d.length && "getAll" in u.objectStore(d[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), p = w.schema, m = w.hasGetAll, w = p.tables.map(s), h = {};
2234
2234
  return w.forEach(function(O) {
2235
2235
  return h[O.name] = O;
2236
2236
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(O) {
2237
2237
  if (!h[O]) throw new Error("Table '".concat(O, "' not found"));
2238
2238
  return h[O];
2239
- }, MIN_KEY: -1 / 0, MAX_KEY: bt(r), schema: p };
2239
+ }, MIN_KEY: -1 / 0, MAX_KEY: Et(r), schema: p };
2240
2240
  }
2241
2241
  function ga(e, r, n, a) {
2242
2242
  var s = n.IDBKeyRange;
@@ -2244,7 +2244,7 @@ function Ba() {
2244
2244
  return u = u.create, l(l({}, c), u(c));
2245
2245
  }, a)) };
2246
2246
  }
2247
- function Wt(e, a) {
2247
+ function Ft(e, a) {
2248
2248
  var n = a.db, a = ga(e._middlewares, n, e._deps, a);
2249
2249
  e.core = a.dbcore, e.tables.forEach(function(s) {
2250
2250
  var c = s.name;
@@ -2253,22 +2253,22 @@ function Ba() {
2253
2253
  }) && (s.core = e.core.table(c), e[c] instanceof e.Table && (e[c].core = s.core));
2254
2254
  });
2255
2255
  }
2256
- function Ft(e, r, n, a) {
2256
+ function Ht(e, r, n, a) {
2257
2257
  n.forEach(function(s) {
2258
2258
  var c = a[s];
2259
2259
  r.forEach(function(u) {
2260
2260
  var d = (function p(m, w) {
2261
- return Hn(m, w) || (m = se(m)) && p(m, w);
2261
+ return Hn(m, w) || (m = me(m)) && p(m, w);
2262
2262
  })(u, s);
2263
- (!d || "value" in d && d.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? Ae(u, s, { get: function() {
2263
+ (!d || "value" in d && d.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? Pe(u, s, { get: function() {
2264
2264
  return this.table(s);
2265
2265
  }, set: function(p) {
2266
- Vr(this, s, { value: p, writable: !0, configurable: !0, enumerable: !0 });
2266
+ it(this, s, { value: p, writable: !0, configurable: !0, enumerable: !0 });
2267
2267
  } }) : u[s] = new e.Table(s, c));
2268
2268
  });
2269
2269
  });
2270
2270
  }
2271
- function _r(e, r) {
2271
+ function Ar(e, r) {
2272
2272
  r.forEach(function(n) {
2273
2273
  for (var a in n) n[a] instanceof e.Table && delete n[a];
2274
2274
  });
@@ -2278,54 +2278,54 @@ function Ba() {
2278
2278
  }
2279
2279
  function ma(e, r, n, a) {
2280
2280
  var s = e._dbSchema;
2281
- n.objectStoreNames.contains("$meta") && !s.$meta && (s.$meta = Sr("$meta", On("")[0], []), e._storeNames.push("$meta"));
2281
+ n.objectStoreNames.contains("$meta") && !s.$meta && (s.$meta = Or("$meta", On("")[0], []), e._storeNames.push("$meta"));
2282
2282
  var c = e._createTransaction("readwrite", e._storeNames, s);
2283
2283
  c.create(n), c._completion.catch(a);
2284
2284
  var u = c._reject.bind(c), d = L.transless || L;
2285
- Ne(function() {
2286
- return L.trans = c, L.transless = d, r !== 0 ? (Wt(e, n), m = r, ((p = c).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(w) {
2285
+ De(function() {
2286
+ return L.trans = c, L.transless = d, r !== 0 ? (Ft(e, n), m = r, ((p = c).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(w) {
2287
2287
  return w ?? m;
2288
2288
  }) : M.resolve(m)).then(function(w) {
2289
- return O = w, y = c, v = n, E = [], w = (h = e)._versions, S = h._dbSchema = Vt(0, h.idbdb, v), (w = w.filter(function(A) {
2289
+ return O = w, y = c, v = n, E = [], w = (h = e)._versions, S = h._dbSchema = zt(0, h.idbdb, v), (w = w.filter(function(A) {
2290
2290
  return A._cfg.version >= O;
2291
2291
  })).length !== 0 ? (w.forEach(function(A) {
2292
2292
  E.push(function() {
2293
2293
  var P = S, N = A._cfg.dbschema;
2294
- zt(h, P, v), zt(h, N, v), S = h._dbSchema = N;
2295
- var I = Ar(P, N);
2296
- I.add.forEach(function(j) {
2297
- Pr(v, j[0], j[1].primKey, j[1].indexes);
2298
- }), I.change.forEach(function(j) {
2294
+ Yt(h, P, v), Yt(h, N, v), S = h._dbSchema = N;
2295
+ var D = Pr(P, N);
2296
+ D.add.forEach(function(j) {
2297
+ Nr(v, j[0], j[1].primKey, j[1].indexes);
2298
+ }), D.change.forEach(function(j) {
2299
2299
  if (j.recreate) throw new B.Upgrade("Not yet support for changing primary key");
2300
2300
  var C = v.objectStore(j.name);
2301
2301
  j.add.forEach(function(K) {
2302
- return Ht(C, K);
2302
+ return Vt(C, K);
2303
2303
  }), j.change.forEach(function(K) {
2304
- C.deleteIndex(K.name), Ht(C, K);
2304
+ C.deleteIndex(K.name), Vt(C, K);
2305
2305
  }), j.del.forEach(function(K) {
2306
2306
  return C.deleteIndex(K);
2307
2307
  });
2308
2308
  });
2309
- var R = A._cfg.contentUpgrade;
2310
- if (R && A._cfg.version > O) {
2311
- Wt(h, v), y._memoizedTables = {};
2309
+ var x = A._cfg.contentUpgrade;
2310
+ if (x && A._cfg.version > O) {
2311
+ Ft(h, v), y._memoizedTables = {};
2312
2312
  var $ = Xr(N);
2313
- I.del.forEach(function(j) {
2313
+ D.del.forEach(function(j) {
2314
2314
  $[j] = P[j];
2315
- }), _r(h, [h.Transaction.prototype]), Ft(h, [h.Transaction.prototype], D($), $), y.schema = $;
2316
- var T, k = sr(R);
2317
- return k && qe(), I = M.follow(function() {
2315
+ }), Ar(h, [h.Transaction.prototype]), Ht(h, [h.Transaction.prototype], I($), $), y.schema = $;
2316
+ var R, k = or(x);
2317
+ return k && et(), D = M.follow(function() {
2318
2318
  var j;
2319
- (T = R(y)) && k && (j = De.bind(null, null), T.then(j, j));
2320
- }), T && typeof T.then == "function" ? M.resolve(T) : I.then(function() {
2321
- return T;
2319
+ (R = x(y)) && k && (j = Ie.bind(null, null), R.then(j, j));
2320
+ }), R && typeof R.then == "function" ? M.resolve(R) : D.then(function() {
2321
+ return R;
2322
2322
  });
2323
2323
  }
2324
2324
  }), E.push(function(P) {
2325
- var N, I, R = A._cfg.dbschema;
2326
- N = R, I = P, [].slice.call(I.db.objectStoreNames).forEach(function($) {
2327
- return N[$] == null && I.db.deleteObjectStore($);
2328
- }), _r(h, [h.Transaction.prototype]), Ft(h, [h.Transaction.prototype], h._storeNames, h._dbSchema), y.schema = h._dbSchema;
2325
+ var N, D, x = A._cfg.dbschema;
2326
+ N = x, D = P, [].slice.call(D.db.objectStoreNames).forEach(function($) {
2327
+ return N[$] == null && D.db.deleteObjectStore($);
2328
+ }), Ar(h, [h.Transaction.prototype]), Ht(h, [h.Transaction.prototype], h._storeNames, h._dbSchema), y.schema = h._dbSchema;
2329
2329
  }), E.push(function(P) {
2330
2330
  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(N) {
2331
2331
  return N !== "$meta";
@@ -2337,9 +2337,9 @@ function Ba() {
2337
2337
  Sn(S, v);
2338
2338
  })) : M.resolve();
2339
2339
  var h, O, y, v, E, S;
2340
- }).catch(u)) : (D(s).forEach(function(w) {
2341
- Pr(n, w, s[w].primKey, s[w].indexes);
2342
- }), Wt(e, n), void M.follow(function() {
2340
+ }).catch(u)) : (I(s).forEach(function(w) {
2341
+ Nr(n, w, s[w].primKey, s[w].indexes);
2342
+ }), Ft(e, n), void M.follow(function() {
2343
2343
  return e.on.populate.fire(c);
2344
2344
  }).catch(u));
2345
2345
  var p, m;
@@ -2347,20 +2347,20 @@ function Ba() {
2347
2347
  }
2348
2348
  function ya(e, r) {
2349
2349
  Sn(e._dbSchema, r), r.db.version % 10 != 0 || r.objectStoreNames.contains("$meta") || r.db.createObjectStore("$meta").add(Math.ceil(r.db.version / 10 - 1), "version");
2350
- var n = Vt(0, e.idbdb, r);
2351
- zt(e, e._dbSchema, r);
2352
- for (var a = 0, s = Ar(n, e._dbSchema).change; a < s.length; a++) {
2350
+ var n = zt(0, e.idbdb, r);
2351
+ Yt(e, e._dbSchema, r);
2352
+ for (var a = 0, s = Pr(n, e._dbSchema).change; a < s.length; a++) {
2353
2353
  var c = (function(u) {
2354
2354
  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 };
2355
2355
  var d = r.objectStore(u.name);
2356
2356
  u.add.forEach(function(p) {
2357
- me && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(p.src)), Ht(d, p);
2357
+ ye && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(p.src)), Vt(d, p);
2358
2358
  });
2359
2359
  })(s[a]);
2360
2360
  if (typeof c == "object") return c.value;
2361
2361
  }
2362
2362
  }
2363
- function Ar(e, r) {
2363
+ function Pr(e, r) {
2364
2364
  var n, a = { del: [], add: [], change: [] };
2365
2365
  for (n in e) r[n] || a.del.push(n);
2366
2366
  for (n in r) {
@@ -2381,36 +2381,36 @@ function Ba() {
2381
2381
  }
2382
2382
  return a;
2383
2383
  }
2384
- function Pr(e, r, n, a) {
2384
+ function Nr(e, r, n, a) {
2385
2385
  var s = e.db.createObjectStore(r, n.keyPath ? { keyPath: n.keyPath, autoIncrement: n.auto } : { autoIncrement: n.auto });
2386
2386
  return a.forEach(function(c) {
2387
- return Ht(s, c);
2387
+ return Vt(s, c);
2388
2388
  }), s;
2389
2389
  }
2390
2390
  function Sn(e, r) {
2391
- D(e).forEach(function(n) {
2392
- r.db.objectStoreNames.contains(n) || (me && console.debug("Dexie: Creating missing table", n), Pr(r, n, e[n].primKey, e[n].indexes));
2391
+ I(e).forEach(function(n) {
2392
+ r.db.objectStoreNames.contains(n) || (ye && console.debug("Dexie: Creating missing table", n), Nr(r, n, e[n].primKey, e[n].indexes));
2393
2393
  });
2394
2394
  }
2395
- function Ht(e, r) {
2395
+ function Vt(e, r) {
2396
2396
  e.createIndex(r.name, r.keyPath, { unique: r.unique, multiEntry: r.multi });
2397
2397
  }
2398
- function Vt(e, r, n) {
2398
+ function zt(e, r, n) {
2399
2399
  var a = {};
2400
- return Pt(r.objectStoreNames, 0).forEach(function(s) {
2401
- for (var c = n.objectStore(s), u = wr(En(m = c.keyPath), m || "", !0, !1, !!c.autoIncrement, m && typeof m != "string", !0), d = [], p = 0; p < c.indexNames.length; ++p) {
2402
- var w = c.index(c.indexNames[p]), m = w.keyPath, w = wr(w.name, m, !!w.unique, !!w.multiEntry, !1, m && typeof m != "string", !1);
2400
+ return Nt(r.objectStoreNames, 0).forEach(function(s) {
2401
+ for (var c = n.objectStore(s), u = Sr(En(m = c.keyPath), m || "", !0, !1, !!c.autoIncrement, m && typeof m != "string", !0), d = [], p = 0; p < c.indexNames.length; ++p) {
2402
+ var w = c.index(c.indexNames[p]), m = w.keyPath, w = Sr(w.name, m, !!w.unique, !!w.multiEntry, !1, m && typeof m != "string", !1);
2403
2403
  d.push(w);
2404
2404
  }
2405
- a[s] = Sr(s, u, d);
2405
+ a[s] = Or(s, u, d);
2406
2406
  }), a;
2407
2407
  }
2408
- function zt(e, r, n) {
2408
+ function Yt(e, r, n) {
2409
2409
  for (var a = n.db.objectStoreNames, s = 0; s < a.length; ++s) {
2410
2410
  var c = a[s], u = n.objectStore(c);
2411
2411
  e._hasGetAll = "getAll" in u;
2412
2412
  for (var d = 0; d < u.indexNames.length; ++d) {
2413
- var p = u.indexNames[d], m = u.index(p).keyPath, w = typeof m == "string" ? m : "[" + Pt(m).join("+") + "]";
2413
+ var p = u.indexNames[d], m = u.index(p).keyPath, w = typeof m == "string" ? m : "[" + Nt(m).join("+") + "]";
2414
2414
  !r[c] || (m = r[c].idxByName[w]) && (m.name = p, delete r[c].idxByName[w], r[c].idxByName[p] = m);
2415
2415
  }
2416
2416
  }
@@ -2419,12 +2419,12 @@ function Ba() {
2419
2419
  function On(e) {
2420
2420
  return e.split(",").map(function(r, n) {
2421
2421
  var c = r.split(":"), a = (s = c[1]) === null || s === void 0 ? void 0 : s.trim(), s = (r = c[0].trim()).replace(/([&*]|\+\+)/g, ""), c = /^\[/.test(s) ? s.match(/^\[(.*)\]$/)[1].split("+") : s;
2422
- return wr(s, c || null, /\&/.test(r), /\*/.test(r), /\+\+/.test(r), x(c), n === 0, a);
2422
+ return Sr(s, c || null, /\&/.test(r), /\*/.test(r), /\+\+/.test(r), T(c), n === 0, a);
2423
2423
  });
2424
2424
  }
2425
- var ba = (nt.prototype._createTableSchema = Sr, nt.prototype._parseIndexSyntax = On, nt.prototype._parseStoresSpec = function(e, r) {
2425
+ var ba = (at.prototype._createTableSchema = Or, at.prototype._parseIndexSyntax = On, at.prototype._parseStoresSpec = function(e, r) {
2426
2426
  var n = this;
2427
- D(e).forEach(function(a) {
2427
+ I(e).forEach(function(a) {
2428
2428
  if (e[a] !== null) {
2429
2429
  var s = n._parseIndexSyntax(e[a]), c = s.shift();
2430
2430
  if (!c) throw new B.Schema("Invalid schema for table " + a + ": " + e[a]);
@@ -2435,68 +2435,68 @@ function Ba() {
2435
2435
  }), s = n._createTableSchema(a, c, s), r[a] = s;
2436
2436
  }
2437
2437
  });
2438
- }, nt.prototype.stores = function(n) {
2438
+ }, at.prototype.stores = function(n) {
2439
2439
  var r = this.db;
2440
2440
  this._cfg.storesSource = this._cfg.storesSource ? te(this._cfg.storesSource, n) : n;
2441
2441
  var n = r._versions, a = {}, s = {};
2442
2442
  return n.forEach(function(c) {
2443
2443
  te(a, c._cfg.storesSource), s = c._cfg.dbschema = {}, c._parseStoresSpec(a, s);
2444
- }), r._dbSchema = s, _r(r, [r._allTables, r, r.Transaction.prototype]), Ft(r, [r._allTables, r, r.Transaction.prototype, this._cfg.tables], D(s), s), r._storeNames = D(s), this;
2445
- }, nt.prototype.upgrade = function(e) {
2446
- return this._cfg.contentUpgrade = ir(this._cfg.contentUpgrade || X, e), this;
2447
- }, nt);
2448
- function nt() {
2444
+ }), r._dbSchema = s, Ar(r, [r._allTables, r, r.Transaction.prototype]), Ht(r, [r._allTables, r, r.Transaction.prototype, this._cfg.tables], I(s), s), r._storeNames = I(s), this;
2445
+ }, at.prototype.upgrade = function(e) {
2446
+ return this._cfg.contentUpgrade = cr(this._cfg.contentUpgrade || X, e), this;
2447
+ }, at);
2448
+ function at() {
2449
2449
  }
2450
- function Nr(e, r) {
2450
+ function Dr(e, r) {
2451
2451
  var n = e._dbNamesDB;
2452
- return n || (n = e._dbNamesDB = new Se(Gt, { addons: [], indexedDB: e, IDBKeyRange: r })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
2452
+ return n || (n = e._dbNamesDB = new Oe(Mt, { addons: [], indexedDB: e, IDBKeyRange: r })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
2453
2453
  }
2454
- function Dr(e) {
2454
+ function Ir(e) {
2455
2455
  return e && typeof e.databases == "function";
2456
2456
  }
2457
- function Ir(e) {
2458
- return Ne(function() {
2457
+ function Tr(e) {
2458
+ return De(function() {
2459
2459
  return L.letThrough = !0, e();
2460
2460
  });
2461
2461
  }
2462
- function Tr(e) {
2462
+ function Rr(e) {
2463
2463
  return !("from" in e);
2464
2464
  }
2465
- var oe = function(e, r) {
2465
+ var se = function(e, r) {
2466
2466
  if (!this) {
2467
- var n = new oe();
2467
+ var n = new se();
2468
2468
  return e && "d" in e && te(n, e), n;
2469
2469
  }
2470
2470
  te(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? r : e } : { d: 0 });
2471
2471
  };
2472
- function Et(e, r, n) {
2472
+ function St(e, r, n) {
2473
2473
  var a = V(r, n);
2474
2474
  if (!isNaN(a)) {
2475
2475
  if (0 < a) throw RangeError();
2476
- if (Tr(e)) return te(e, { from: r, to: n, d: 1 });
2476
+ if (Rr(e)) return te(e, { from: r, to: n, d: 1 });
2477
2477
  var s = e.l, a = e.r;
2478
- if (V(n, e.from) < 0) return s ? Et(s, r, n) : e.l = { from: r, to: n, d: 1, l: null, r: null }, An(e);
2479
- if (0 < V(r, e.to)) return a ? Et(a, r, n) : e.r = { from: r, to: n, d: 1, l: null, r: null }, An(e);
2480
- V(r, e.from) < 0 && (e.from = r, e.l = null, e.d = a ? a.d + 1 : 1), 0 < V(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, s && !e.l && wt(e, s), a && n && wt(e, a);
2478
+ if (V(n, e.from) < 0) return s ? St(s, r, n) : e.l = { from: r, to: n, d: 1, l: null, r: null }, An(e);
2479
+ if (0 < V(r, e.to)) return a ? St(a, r, n) : e.r = { from: r, to: n, d: 1, l: null, r: null }, An(e);
2480
+ V(r, e.from) < 0 && (e.from = r, e.l = null, e.d = a ? a.d + 1 : 1), 0 < V(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, s && !e.l && Ot(e, s), a && n && Ot(e, a);
2481
2481
  }
2482
2482
  }
2483
- function wt(e, r) {
2484
- Tr(r) || (function n(a, p) {
2483
+ function Ot(e, r) {
2484
+ Rr(r) || (function n(a, p) {
2485
2485
  var c = p.from, u = p.to, d = p.l, p = p.r;
2486
- Et(a, c, u), d && n(a, d), p && n(a, p);
2486
+ St(a, c, u), d && n(a, d), p && n(a, p);
2487
2487
  })(e, r);
2488
2488
  }
2489
2489
  function _n(e, r) {
2490
- var n = Yt(r), a = n.next();
2490
+ var n = Xt(r), a = n.next();
2491
2491
  if (a.done) return !1;
2492
- for (var s = a.value, c = Yt(e), u = c.next(s.from), d = u.value; !a.done && !u.done; ) {
2492
+ for (var s = a.value, c = Xt(e), u = c.next(s.from), d = u.value; !a.done && !u.done; ) {
2493
2493
  if (V(d.from, s.to) <= 0 && 0 <= V(d.to, s.from)) return !0;
2494
2494
  V(s.from, d.from) < 0 ? s = (a = n.next(d.from)).value : d = (u = c.next(s.from)).value;
2495
2495
  }
2496
2496
  return !1;
2497
2497
  }
2498
- function Yt(e) {
2499
- var r = Tr(e) ? null : { s: 0, n: e };
2498
+ function Xt(e) {
2499
+ var r = Rr(e) ? null : { s: 0, n: e };
2500
2500
  return { next: function(n) {
2501
2501
  for (var a = 0 < arguments.length; r; ) switch (r.s) {
2502
2502
  case 0:
@@ -2523,48 +2523,48 @@ function Ba() {
2523
2523
  var r = n.r, n = n.l;
2524
2524
  return (r ? n ? Math.max(r.d, n.d) : r.d : n ? n.d : 0) + 1;
2525
2525
  }
2526
- function Xt(e, r) {
2527
- return D(r).forEach(function(n) {
2528
- e[n] ? wt(e[n], r[n]) : e[n] = (function a(s) {
2526
+ function Qt(e, r) {
2527
+ return I(r).forEach(function(n) {
2528
+ e[n] ? Ot(e[n], r[n]) : e[n] = (function a(s) {
2529
2529
  var c, u, d = {};
2530
- for (c in s) re(s, c) && (u = s[c], d[c] = !u || typeof u != "object" || Jr.has(u.constructor) ? u : a(u));
2530
+ for (c in s) ae(s, c) && (u = s[c], d[c] = !u || typeof u != "object" || Jr.has(u.constructor) ? u : a(u));
2531
2531
  return d;
2532
2532
  })(r[n]);
2533
2533
  }), e;
2534
2534
  }
2535
- function Rr(e, r) {
2535
+ function xr(e, r) {
2536
2536
  return e.all || r.all || Object.keys(e).some(function(n) {
2537
2537
  return r[n] && _n(r[n], e[n]);
2538
2538
  });
2539
2539
  }
2540
- ge(oe.prototype, ((fe = { add: function(e) {
2541
- return wt(this, e), this;
2540
+ ge(se.prototype, ((he = { add: function(e) {
2541
+ return Ot(this, e), this;
2542
2542
  }, addKey: function(e) {
2543
- return Et(this, e, e), this;
2543
+ return St(this, e, e), this;
2544
2544
  }, addKeys: function(e) {
2545
2545
  var r = this;
2546
2546
  return e.forEach(function(n) {
2547
- return Et(r, n, n);
2547
+ return St(r, n, n);
2548
2548
  }), this;
2549
2549
  }, hasKey: function(e) {
2550
- var r = Yt(this).next(e).value;
2550
+ var r = Xt(this).next(e).value;
2551
2551
  return r && V(r.from, e) <= 0 && 0 <= V(r.to, e);
2552
- } })[ar] = function() {
2553
- return Yt(this);
2554
- }, fe));
2555
- var Fe = {}, xr = {}, kr = !1;
2556
- function Qt(e) {
2557
- Xt(xr, e), kr || (kr = !0, setTimeout(function() {
2558
- kr = !1, Cr(xr, !(xr = {}));
2552
+ } })[sr] = function() {
2553
+ return Xt(this);
2554
+ }, he));
2555
+ var He = {}, kr = {}, Cr = !1;
2556
+ function Jt(e) {
2557
+ Qt(kr, e), Cr || (Cr = !0, setTimeout(function() {
2558
+ Cr = !1, $r(kr, !(kr = {}));
2559
2559
  }, 0));
2560
2560
  }
2561
- function Cr(e, r) {
2561
+ function $r(e, r) {
2562
2562
  r === void 0 && (r = !1);
2563
2563
  var n = /* @__PURE__ */ new Set();
2564
- if (e.all) for (var a = 0, s = Object.values(Fe); a < s.length; a++) Nn(u = s[a], e, n, r);
2564
+ if (e.all) for (var a = 0, s = Object.values(He); a < s.length; a++) Nn(u = s[a], e, n, r);
2565
2565
  else for (var c in e) {
2566
2566
  var u, d = /^idb\:\/\/(.*)\/(.*)\//.exec(c);
2567
- d && (c = d[1], d = d[2], (u = Fe["idb://".concat(c, "/").concat(d)]) && Nn(u, e, n, r));
2567
+ d && (c = d[1], d = d[2], (u = He["idb://".concat(c, "/").concat(d)]) && Nn(u, e, n, r));
2568
2568
  }
2569
2569
  n.forEach(function(p) {
2570
2570
  return p();
@@ -2574,7 +2574,7 @@ function Ba() {
2574
2574
  for (var s = [], c = 0, u = Object.entries(e.queries.query); c < u.length; c++) {
2575
2575
  for (var d = u[c], p = d[0], m = [], w = 0, h = d[1]; w < h.length; w++) {
2576
2576
  var O = h[w];
2577
- Rr(r, O.obsSet) ? O.subscribers.forEach(function(S) {
2577
+ xr(r, O.obsSet) ? O.subscribers.forEach(function(S) {
2578
2578
  return n.add(S);
2579
2579
  }) : a && m.push(O);
2580
2580
  }
@@ -2600,28 +2600,28 @@ function Ba() {
2600
2600
  if (u(), !n) throw new B.MissingAPI();
2601
2601
  var v = e.name, E = r.autoSchema || !s ? n.open(v) : n.open(v, s);
2602
2602
  if (!E) throw new B.MissingAPI();
2603
- E.onerror = ye(y), E.onblocked = Z(e._fireOnBlocked), E.onupgradeneeded = Z(function(S) {
2603
+ E.onerror = be(y), E.onblocked = Z(e._fireOnBlocked), E.onupgradeneeded = Z(function(S) {
2604
2604
  var A;
2605
- w = E.transaction, r.autoSchema && !e._options.allowEmptyDB ? (E.onerror = mt, w.abort(), E.result.close(), (A = n.deleteDatabase(v)).onsuccess = A.onerror = Z(function() {
2605
+ w = E.transaction, r.autoSchema && !e._options.allowEmptyDB ? (E.onerror = bt, w.abort(), E.result.close(), (A = n.deleteDatabase(v)).onsuccess = A.onerror = Z(function() {
2606
2606
  y(new B.NoSuchDatabase("Database ".concat(v, " doesnt exist")));
2607
- })) : (w.onerror = ye(y), S = S.oldVersion > Math.pow(2, 62) ? 0 : S.oldVersion, h = S < 1, e.idbdb = E.result, c && ya(e, w), ma(e, S / 10, w, y));
2607
+ })) : (w.onerror = be(y), S = S.oldVersion > Math.pow(2, 62) ? 0 : S.oldVersion, h = S < 1, e.idbdb = E.result, c && ya(e, w), ma(e, S / 10, w, y));
2608
2608
  }, y), E.onsuccess = Z(function() {
2609
2609
  w = null;
2610
- var S, A, P, N, I, R = e.idbdb = E.result, $ = Pt(R.objectStoreNames);
2610
+ var S, A, P, N, D, x = e.idbdb = E.result, $ = Nt(x.objectStoreNames);
2611
2611
  if (0 < $.length) try {
2612
- var T = R.transaction((N = $).length === 1 ? N[0] : N, "readonly");
2613
- if (r.autoSchema) A = R, P = T, (S = e).verno = A.version / 10, P = S._dbSchema = Vt(0, A, P), S._storeNames = Pt(A.objectStoreNames, 0), Ft(S, [S._allTables], D(P), P);
2614
- else if (zt(e, e._dbSchema, T), ((I = Ar(Vt(0, (I = e).idbdb, T), I._dbSchema)).add.length || I.change.some(function(k) {
2612
+ var R = x.transaction((N = $).length === 1 ? N[0] : N, "readonly");
2613
+ if (r.autoSchema) A = x, P = R, (S = e).verno = A.version / 10, P = S._dbSchema = zt(0, A, P), S._storeNames = Nt(A.objectStoreNames, 0), Ht(S, [S._allTables], I(P), P);
2614
+ else if (Yt(e, e._dbSchema, R), ((D = Pr(zt(0, (D = e).idbdb, R), D._dbSchema)).add.length || D.change.some(function(k) {
2615
2615
  return k.add.length || k.change.length;
2616
- })) && !c) 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."), R.close(), s = R.version + 1, c = !0, O(d());
2617
- Wt(e, T);
2616
+ })) && !c) 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."), x.close(), s = x.version + 1, c = !0, O(d());
2617
+ Ft(e, R);
2618
2618
  } catch {
2619
2619
  }
2620
- et.push(e), R.onversionchange = Z(function(k) {
2620
+ tt.push(e), x.onversionchange = Z(function(k) {
2621
2621
  r.vcFired = !0, e.on("versionchange").fire(k);
2622
- }), R.onclose = Z(function() {
2622
+ }), x.onclose = Z(function() {
2623
2623
  e.close({ disableAutoOpen: !1 });
2624
- }), h && (I = e._deps, T = v, R = I.indexedDB, I = I.IDBKeyRange, Dr(R) || T === Gt || Nr(R, I).put({ name: T }).catch(X)), O();
2624
+ }), h && (D = e._deps, R = v, x = D.indexedDB, D = D.IDBKeyRange, Ir(x) || R === Mt || Dr(x, D).put({ name: R }).catch(X)), O();
2625
2625
  }, y);
2626
2626
  }).catch(function(O) {
2627
2627
  switch (O?.name) {
@@ -2643,12 +2643,12 @@ function Ba() {
2643
2643
  }).finally(function() {
2644
2644
  return clearInterval(p);
2645
2645
  }) : Promise.resolve()).then(d)]).then(function() {
2646
- return u(), r.onReadyBeingFired = [], M.resolve(Ir(function() {
2646
+ return u(), r.onReadyBeingFired = [], M.resolve(Tr(function() {
2647
2647
  return e.on.ready.fire(e.vip);
2648
2648
  })).then(function O() {
2649
2649
  if (0 < r.onReadyBeingFired.length) {
2650
- var y = r.onReadyBeingFired.reduce(ir, X);
2651
- return r.onReadyBeingFired = [], M.resolve(Ir(function() {
2650
+ var y = r.onReadyBeingFired.reduce(cr, X);
2651
+ return r.onReadyBeingFired = [], M.resolve(Tr(function() {
2652
2652
  return y(e.vip);
2653
2653
  })).then(O);
2654
2654
  }
@@ -2668,12 +2668,12 @@ function Ba() {
2668
2668
  var O;
2669
2669
  return h && (O = {}, e.tables.forEach(function(y) {
2670
2670
  y.schema.indexes.forEach(function(v) {
2671
- v.name && (O["idb://".concat(e.name, "/").concat(y.name, "/").concat(v.name)] = new oe(-1 / 0, [[[]]]));
2672
- }), O["idb://".concat(e.name, "/").concat(y.name, "/")] = O["idb://".concat(e.name, "/").concat(y.name, "/:dels")] = new oe(-1 / 0, [[[]]]);
2673
- }), Re(yt).fire(O), Cr(O, !0)), e;
2671
+ v.name && (O["idb://".concat(e.name, "/").concat(y.name, "/").concat(v.name)] = new se(-1 / 0, [[[]]]));
2672
+ }), O["idb://".concat(e.name, "/").concat(y.name, "/")] = O["idb://".concat(e.name, "/").concat(y.name, "/:dels")] = new se(-1 / 0, [[[]]]);
2673
+ }), xe(vt).fire(O), $r(O, !0)), e;
2674
2674
  });
2675
2675
  }
2676
- function $r(e) {
2676
+ function jr(e) {
2677
2677
  function r(c) {
2678
2678
  return e.next(c);
2679
2679
  }
@@ -2683,20 +2683,20 @@ function Ba() {
2683
2683
  function s(c) {
2684
2684
  return function(p) {
2685
2685
  var d = c(p), p = d.value;
2686
- return d.done ? p : p && typeof p.then == "function" ? p.then(n, a) : x(p) ? Promise.all(p).then(n, a) : n(p);
2686
+ return d.done ? p : p && typeof p.then == "function" ? p.then(n, a) : T(p) ? Promise.all(p).then(n, a) : n(p);
2687
2687
  };
2688
2688
  }
2689
2689
  return s(r)();
2690
2690
  }
2691
- function Jt(e, r, n) {
2692
- for (var a = x(e) ? e.slice() : [e], s = 0; s < n; ++s) a.push(r);
2691
+ function Zt(e, r, n) {
2692
+ for (var a = T(e) ? e.slice() : [e], s = 0; s < n; ++s) a.push(r);
2693
2693
  return a;
2694
2694
  }
2695
2695
  var Ea = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2696
2696
  return l(l({}, e), { table: function(r) {
2697
2697
  var n = e.table(r), a = n.schema, s = {}, c = [];
2698
2698
  function u(h, O, y) {
2699
- var v = vt(h), E = s[v] = s[v] || [], S = h == null ? 0 : typeof h == "string" ? 1 : h.length, A = 0 < O, A = l(l({}, y), { name: A ? "".concat(v, "(virtual-from:").concat(y.name, ")") : y.name, lowLevelIndex: y, isVirtual: A, keyTail: O, keyLength: S, extractKey: Or(h), unique: !A && y.unique });
2699
+ var v = wt(h), E = s[v] = s[v] || [], S = h == null ? 0 : typeof h == "string" ? 1 : h.length, A = 0 < O, A = l(l({}, y), { name: A ? "".concat(v, "(virtual-from:").concat(y.name, ")") : y.name, lowLevelIndex: y, isVirtual: A, keyTail: O, keyLength: S, extractKey: _r(h), unique: !A && y.unique });
2700
2700
  return E.push(A), A.isPrimaryKey || c.push(A), 1 < S && u(S === 2 ? h[0] : h.slice(0, S - 1), O + 1, y), E.sort(function(P, N) {
2701
2701
  return P.keyTail - N.keyTail;
2702
2702
  }), A;
@@ -2708,10 +2708,10 @@ function Ba() {
2708
2708
  }
2709
2709
  function w(h) {
2710
2710
  var O, y = h.query.index;
2711
- return y.isVirtual ? l(l({}, h), { query: { index: y.lowLevelIndex, range: (O = h.query.range, y = y.keyTail, { type: O.type === 1 ? 2 : O.type, lower: Jt(O.lower, O.lowerOpen ? e.MAX_KEY : e.MIN_KEY, y), lowerOpen: !0, upper: Jt(O.upper, O.upperOpen ? e.MIN_KEY : e.MAX_KEY, y), upperOpen: !0 }) } }) : h;
2711
+ return y.isVirtual ? l(l({}, h), { query: { index: y.lowLevelIndex, range: (O = h.query.range, y = y.keyTail, { type: O.type === 1 ? 2 : O.type, lower: Zt(O.lower, O.lowerOpen ? e.MAX_KEY : e.MIN_KEY, y), lowerOpen: !0, upper: Zt(O.upper, O.upperOpen ? e.MIN_KEY : e.MAX_KEY, y), upperOpen: !0 }) } }) : h;
2712
2712
  }
2713
2713
  return l(l({}, n), { schema: l(l({}, a), { primaryKey: r, indexes: c, getIndexByKeyPath: function(h) {
2714
- return (h = s[vt(h)]) && h[0];
2714
+ return (h = s[wt(h)]) && h[0];
2715
2715
  } }), count: function(h) {
2716
2716
  return n.count(w(h));
2717
2717
  }, query: function(h) {
@@ -2723,9 +2723,9 @@ function Ba() {
2723
2723
  }) : n.openCursor(h);
2724
2724
  function S(A) {
2725
2725
  return Object.create(A, { continue: { value: function(P) {
2726
- P != null ? A.continue(Jt(P, h.reverse ? e.MAX_KEY : e.MIN_KEY, y)) : h.unique ? A.continue(A.key.slice(0, E).concat(h.reverse ? e.MIN_KEY : e.MAX_KEY, y)) : A.continue();
2726
+ P != null ? A.continue(Zt(P, h.reverse ? e.MAX_KEY : e.MIN_KEY, y)) : h.unique ? A.continue(A.key.slice(0, E).concat(h.reverse ? e.MIN_KEY : e.MAX_KEY, y)) : A.continue();
2727
2727
  } }, continuePrimaryKey: { value: function(P, N) {
2728
- A.continuePrimaryKey(Jt(P, e.MAX_KEY, y), N);
2728
+ A.continuePrimaryKey(Zt(P, e.MAX_KEY, y), N);
2729
2729
  } }, primaryKey: { get: function() {
2730
2730
  return A.primaryKey;
2731
2731
  } }, key: { get: function() {
@@ -2738,15 +2738,15 @@ function Ba() {
2738
2738
  } });
2739
2739
  } });
2740
2740
  } };
2741
- function jr(e, r, n, a) {
2742
- return n = n || {}, a = a || "", D(e).forEach(function(s) {
2741
+ function Gr(e, r, n, a) {
2742
+ return n = n || {}, a = a || "", I(e).forEach(function(s) {
2743
2743
  var c, u, d;
2744
- re(r, s) ? (c = e[s], u = r[s], typeof c == "object" && typeof u == "object" && c && u ? (d = nr(c)) !== nr(u) ? n[a + s] = r[s] : d === "Object" ? jr(c, u, n, a + s + ".") : c !== u && (n[a + s] = r[s]) : c !== u && (n[a + s] = r[s])) : n[a + s] = void 0;
2745
- }), D(r).forEach(function(s) {
2746
- re(e, s) || (n[a + s] = r[s]);
2744
+ ae(r, s) ? (c = e[s], u = r[s], typeof c == "object" && typeof u == "object" && c && u ? (d = ar(c)) !== ar(u) ? n[a + s] = r[s] : d === "Object" ? Gr(c, u, n, a + s + ".") : c !== u && (n[a + s] = r[s]) : c !== u && (n[a + s] = r[s])) : n[a + s] = void 0;
2745
+ }), I(r).forEach(function(s) {
2746
+ ae(e, s) || (n[a + s] = r[s]);
2747
2747
  }), n;
2748
2748
  }
2749
- function Gr(e, r) {
2749
+ function Mr(e, r) {
2750
2750
  return r.type === "delete" ? r.keys : r.keys || r.values.map(e.extractKey);
2751
2751
  }
2752
2752
  var wa = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
@@ -2785,24 +2785,24 @@ function Ba() {
2785
2785
  }
2786
2786
  return n.mutate(s);
2787
2787
  function w(h) {
2788
- var O, y, v, E = L.trans, S = h.keys || Gr(a, h);
2788
+ var O, y, v, E = L.trans, S = h.keys || Mr(a, h);
2789
2789
  if (!S) throw new Error("Keys missing");
2790
2790
  return (h = h.type === "add" || h.type === "put" ? l(l({}, h), { keys: S }) : l({}, h)).type !== "delete" && (h.values = g([], h.values)), h.keys && (h.keys = g([], h.keys)), O = n, v = S, ((y = h).type === "add" ? Promise.resolve([]) : O.getMany({ trans: y.trans, keys: v, cache: "immutable" })).then(function(A) {
2791
- var P = S.map(function(N, I) {
2792
- var R, $, T, k = A[I], j = { onerror: null, onsuccess: null };
2793
- return h.type === "delete" ? d.fire.call(j, N, k, E) : h.type === "add" || k === void 0 ? (R = p.fire.call(j, N, h.values[I], E), N == null && R != null && (h.keys[I] = N = R, a.outbound || le(h.values[I], a.keyPath, N))) : (R = jr(k, h.values[I]), ($ = m.fire.call(j, R, N, k, E)) && (T = h.values[I], Object.keys($).forEach(function(C) {
2794
- re(T, C) ? T[C] = $[C] : le(T, C, $[C]);
2791
+ var P = S.map(function(N, D) {
2792
+ var x, $, R, k = A[D], j = { onerror: null, onsuccess: null };
2793
+ return h.type === "delete" ? d.fire.call(j, N, k, E) : h.type === "add" || k === void 0 ? (x = p.fire.call(j, N, h.values[D], E), N == null && x != null && (h.keys[D] = N = x, a.outbound || ue(h.values[D], a.keyPath, N))) : (x = Gr(k, h.values[D]), ($ = m.fire.call(j, x, N, k, E)) && (R = h.values[D], Object.keys($).forEach(function(C) {
2794
+ ae(R, C) ? R[C] = $[C] : ue(R, C, $[C]);
2795
2795
  }))), j;
2796
2796
  });
2797
2797
  return n.mutate(h).then(function(N) {
2798
- for (var I = N.failures, R = N.results, $ = N.numFailures, N = N.lastResult, T = 0; T < S.length; ++T) {
2799
- var k = (R || S)[T], j = P[T];
2800
- k == null ? j.onerror && j.onerror(I[T]) : j.onsuccess && j.onsuccess(h.type === "put" && A[T] ? h.values[T] : k);
2798
+ for (var D = N.failures, x = N.results, $ = N.numFailures, N = N.lastResult, R = 0; R < S.length; ++R) {
2799
+ var k = (x || S)[R], j = P[R];
2800
+ k == null ? j.onerror && j.onerror(D[R]) : j.onsuccess && j.onsuccess(h.type === "put" && A[R] ? h.values[R] : k);
2801
2801
  }
2802
- return { failures: I, results: R, numFailures: $, lastResult: N };
2802
+ return { failures: D, results: x, numFailures: $, lastResult: N };
2803
2803
  }).catch(function(N) {
2804
- return P.forEach(function(I) {
2805
- return I.onerror && I.onerror(N);
2804
+ return P.forEach(function(D) {
2805
+ return D.onerror && D.onerror(N);
2806
2806
  }), Promise.reject(N);
2807
2807
  });
2808
2808
  });
@@ -2813,7 +2813,7 @@ function Ba() {
2813
2813
  function Dn(e, r, n) {
2814
2814
  try {
2815
2815
  if (!r || r.keys.length < e.length) return null;
2816
- for (var a = [], s = 0, c = 0; s < r.keys.length && c < e.length; ++s) V(r.keys[s], e[c]) === 0 && (a.push(n ? Ce(r.values[s]) : r.values[s]), ++c);
2816
+ for (var a = [], s = 0, c = 0; s < r.keys.length && c < e.length; ++s) V(r.keys[s], e[c]) === 0 && (a.push(n ? $e(r.values[s]) : r.values[s]), ++c);
2817
2817
  return a.length === e.length ? a : null;
2818
2818
  } catch {
2819
2819
  return null;
@@ -2826,7 +2826,7 @@ function Ba() {
2826
2826
  if (!a.cache) return n.getMany(a);
2827
2827
  var s = Dn(a.keys, a.trans._cache, a.cache === "clone");
2828
2828
  return s ? M.resolve(s) : n.getMany(a).then(function(c) {
2829
- return a.trans._cache = { keys: a.keys, values: a.cache === "clone" ? Ce(c) : c }, c;
2829
+ return a.trans._cache = { keys: a.keys, values: a.cache === "clone" ? $e(c) : c }, c;
2830
2830
  });
2831
2831
  }, mutate: function(a) {
2832
2832
  return a.type !== "add" && (a.trans._cache = null), n.mutate(a);
@@ -2848,7 +2848,7 @@ function Ba() {
2848
2848
  }
2849
2849
  }
2850
2850
  var Oa = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
2851
- var r = e.schema.name, n = new oe(e.MIN_KEY, e.MAX_KEY);
2851
+ var r = e.schema.name, n = new se(e.MIN_KEY, e.MAX_KEY);
2852
2852
  return l(l({}, e), { transaction: function(a, s, c) {
2853
2853
  if (L.subscr && s !== "readonly") throw new B.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(L.querier));
2854
2854
  return e.transaction(a, s, c);
@@ -2857,69 +2857,69 @@ function Ba() {
2857
2857
  return y.compound && y.keyPath.includes(u.keyPath);
2858
2858
  }), w = l(l({}, s), { mutate: function(y) {
2859
2859
  function v(C) {
2860
- return C = "idb://".concat(r, "/").concat(a, "/").concat(C), N[C] || (N[C] = new oe());
2860
+ return C = "idb://".concat(r, "/").concat(a, "/").concat(C), N[C] || (N[C] = new se());
2861
2861
  }
2862
- var E, S, A, P = y.trans, N = y.mutatedParts || (y.mutatedParts = {}), I = v(""), R = v(":dels"), $ = y.type, j = y.type === "deleteRange" ? [y.range] : y.type === "delete" ? [y.keys] : y.values.length < 50 ? [Gr(u, y).filter(function(C) {
2862
+ var E, S, A, P = y.trans, N = y.mutatedParts || (y.mutatedParts = {}), D = v(""), x = v(":dels"), $ = y.type, j = y.type === "deleteRange" ? [y.range] : y.type === "delete" ? [y.keys] : y.values.length < 50 ? [Mr(u, y).filter(function(C) {
2863
2863
  return C;
2864
- }), y.values] : [], T = j[0], k = j[1], j = y.trans._cache;
2865
- return x(T) ? (I.addKeys(T), (j = $ === "delete" || T.length === k.length ? Dn(T, j) : null) || R.addKeys(T), (j || k) && (E = v, S = j, A = k, c.indexes.forEach(function(C) {
2864
+ }), y.values] : [], R = j[0], k = j[1], j = y.trans._cache;
2865
+ return T(R) ? (D.addKeys(R), (j = $ === "delete" || R.length === k.length ? Dn(R, j) : null) || x.addKeys(R), (j || k) && (E = v, S = j, A = k, c.indexes.forEach(function(C) {
2866
2866
  var K = E(C.name || "");
2867
2867
  function W(H) {
2868
2868
  return H != null ? C.extractKey(H) : null;
2869
2869
  }
2870
2870
  function F(H) {
2871
- return C.multiEntry && x(H) ? H.forEach(function(he) {
2872
- return K.addKey(he);
2871
+ return C.multiEntry && T(H) ? H.forEach(function(de) {
2872
+ return K.addKey(de);
2873
2873
  }) : K.addKey(H);
2874
2874
  }
2875
- (S || A).forEach(function(H, ie) {
2876
- var U = S && W(S[ie]), ie = A && W(A[ie]);
2877
- V(U, ie) !== 0 && (U != null && F(U), ie != null && F(ie));
2875
+ (S || A).forEach(function(H, oe) {
2876
+ var U = S && W(S[oe]), oe = A && W(A[oe]);
2877
+ V(U, oe) !== 0 && (U != null && F(U), oe != null && F(oe));
2878
2878
  });
2879
- }))) : T ? (k = { from: (k = T.lower) !== null && k !== void 0 ? k : e.MIN_KEY, to: (k = T.upper) !== null && k !== void 0 ? k : e.MAX_KEY }, R.add(k), I.add(k)) : (I.add(n), R.add(n), c.indexes.forEach(function(C) {
2879
+ }))) : R ? (k = { from: (k = R.lower) !== null && k !== void 0 ? k : e.MIN_KEY, to: (k = R.upper) !== null && k !== void 0 ? k : e.MAX_KEY }, x.add(k), D.add(k)) : (D.add(n), x.add(n), c.indexes.forEach(function(C) {
2880
2880
  return v(C.name).add(n);
2881
2881
  })), s.mutate(y).then(function(C) {
2882
- return !T || y.type !== "add" && y.type !== "put" || (I.addKeys(C.results), m && m.forEach(function(K) {
2882
+ return !R || y.type !== "add" && y.type !== "put" || (D.addKeys(C.results), m && m.forEach(function(K) {
2883
2883
  for (var W = y.values.map(function(U) {
2884
2884
  return K.extractKey(U);
2885
2885
  }), F = K.keyPath.findIndex(function(U) {
2886
2886
  return U === u.keyPath;
2887
- }), H = 0, he = C.results.length; H < he; ++H) W[H][F] = C.results[H];
2887
+ }), H = 0, de = C.results.length; H < de; ++H) W[H][F] = C.results[H];
2888
2888
  v(K.name).addKeys(W);
2889
- })), P.mutatedParts = Xt(P.mutatedParts || {}, N), C;
2889
+ })), P.mutatedParts = Qt(P.mutatedParts || {}, N), C;
2890
2890
  });
2891
2891
  } }), h = function(v) {
2892
2892
  var E = v.query, v = E.index, E = E.range;
2893
- return [v, new oe((v = E.lower) !== null && v !== void 0 ? v : e.MIN_KEY, (E = E.upper) !== null && E !== void 0 ? E : e.MAX_KEY)];
2893
+ return [v, new se((v = E.lower) !== null && v !== void 0 ? v : e.MIN_KEY, (E = E.upper) !== null && E !== void 0 ? E : e.MAX_KEY)];
2894
2894
  }, O = { get: function(y) {
2895
- return [u, new oe(y.key)];
2895
+ return [u, new se(y.key)];
2896
2896
  }, getMany: function(y) {
2897
- return [u, new oe().addKeys(y.keys)];
2897
+ return [u, new se().addKeys(y.keys)];
2898
2898
  }, count: h, query: h, openCursor: h };
2899
- return D(O).forEach(function(y) {
2899
+ return I(O).forEach(function(y) {
2900
2900
  w[y] = function(v) {
2901
2901
  var E = L.subscr, S = !!E, A = In(L, s) && Tn(y, v) ? v.obsSet = {} : E;
2902
2902
  if (S) {
2903
2903
  var P = function(k) {
2904
- return k = "idb://".concat(r, "/").concat(a, "/").concat(k), A[k] || (A[k] = new oe());
2905
- }, N = P(""), I = P(":dels"), E = O[y](v), S = E[0], E = E[1];
2906
- if ((y === "query" && S.isPrimaryKey && !v.values ? I : P(S.name || "")).add(E), !S.isPrimaryKey) {
2904
+ return k = "idb://".concat(r, "/").concat(a, "/").concat(k), A[k] || (A[k] = new se());
2905
+ }, N = P(""), D = P(":dels"), E = O[y](v), S = E[0], E = E[1];
2906
+ if ((y === "query" && S.isPrimaryKey && !v.values ? D : P(S.name || "")).add(E), !S.isPrimaryKey) {
2907
2907
  if (y !== "count") {
2908
- var R = y === "query" && p && v.values && s.query(l(l({}, v), { values: !1 }));
2908
+ var x = y === "query" && p && v.values && s.query(l(l({}, v), { values: !1 }));
2909
2909
  return s[y].apply(this, arguments).then(function(k) {
2910
2910
  if (y === "query") {
2911
- if (p && v.values) return R.then(function(W) {
2911
+ if (p && v.values) return x.then(function(W) {
2912
2912
  return W = W.result, N.addKeys(W), k;
2913
2913
  });
2914
2914
  var j = v.values ? k.result.map(d) : k.result;
2915
- (v.values ? N : I).addKeys(j);
2915
+ (v.values ? N : D).addKeys(j);
2916
2916
  } else if (y === "openCursor") {
2917
2917
  var C = k, K = v.values;
2918
2918
  return C && Object.create(C, { key: { get: function() {
2919
- return I.addKey(C.primaryKey), C.key;
2919
+ return D.addKey(C.primaryKey), C.key;
2920
2920
  } }, primaryKey: { get: function() {
2921
2921
  var W = C.primaryKey;
2922
- return I.addKey(W), W;
2922
+ return D.addKey(W), W;
2923
2923
  } }, value: { get: function() {
2924
2924
  return K && N.addKey(C.primaryKey), C.value;
2925
2925
  } } });
@@ -2927,7 +2927,7 @@ function Ba() {
2927
2927
  return k;
2928
2928
  });
2929
2929
  }
2930
- I.add(n);
2930
+ D.add(n);
2931
2931
  }
2932
2932
  }
2933
2933
  return s[y].apply(this, arguments);
@@ -2939,13 +2939,13 @@ function Ba() {
2939
2939
  if (n.numFailures === 0) return r;
2940
2940
  if (r.type === "deleteRange") return null;
2941
2941
  var a = r.keys ? r.keys.length : "values" in r && r.values ? r.values.length : 1;
2942
- return n.numFailures === a ? null : (r = l({}, r), x(r.keys) && (r.keys = r.keys.filter(function(s, c) {
2942
+ return n.numFailures === a ? null : (r = l({}, r), T(r.keys) && (r.keys = r.keys.filter(function(s, c) {
2943
2943
  return !(c in n.failures);
2944
- })), "values" in r && x(r.values) && (r.values = r.values.filter(function(s, c) {
2944
+ })), "values" in r && T(r.values) && (r.values = r.values.filter(function(s, c) {
2945
2945
  return !(c in n.failures);
2946
2946
  })), r);
2947
2947
  }
2948
- function Mr(e, r) {
2948
+ function Kr(e, r) {
2949
2949
  return n = e, ((a = r).lower === void 0 || (a.lowerOpen ? 0 < V(n, a.lower) : 0 <= V(n, a.lower))) && (e = e, (r = r).upper === void 0 || (r.upperOpen ? V(e, r.upper) < 0 : V(e, r.upper) <= 0));
2950
2950
  var n, a;
2951
2951
  }
@@ -2953,15 +2953,15 @@ function Ba() {
2953
2953
  if (!O || O.length === 0) return e;
2954
2954
  var u = r.query.index, d = u.multiEntry, p = r.query.range, m = a.schema.primaryKey.extractKey, w = u.extractKey, h = (u.lowLevelIndex || u).extractKey, O = O.reduce(function(y, v) {
2955
2955
  var E = y, S = [];
2956
- if (v.type === "add" || v.type === "put") for (var A = new oe(), P = v.values.length - 1; 0 <= P; --P) {
2957
- var N, I = v.values[P], R = m(I);
2958
- A.hasKey(R) || (N = w(I), (d && x(N) ? N.some(function(C) {
2959
- return Mr(C, p);
2960
- }) : Mr(N, p)) && (A.addKey(R), S.push(I)));
2956
+ if (v.type === "add" || v.type === "put") for (var A = new se(), P = v.values.length - 1; 0 <= P; --P) {
2957
+ var N, D = v.values[P], x = m(D);
2958
+ A.hasKey(x) || (N = w(D), (d && T(N) ? N.some(function(C) {
2959
+ return Kr(C, p);
2960
+ }) : Kr(N, p)) && (A.addKey(x), S.push(D)));
2961
2961
  }
2962
2962
  switch (v.type) {
2963
2963
  case "add":
2964
- var $ = new oe().addKeys(r.values ? y.map(function(K) {
2964
+ var $ = new se().addKeys(r.values ? y.map(function(K) {
2965
2965
  return m(K);
2966
2966
  }) : y), E = y.concat(r.values ? S.filter(function(K) {
2967
2967
  return K = m(K), !$.hasKey(K) && ($.addKey(K), !0);
@@ -2972,17 +2972,17 @@ function Ba() {
2972
2972
  }));
2973
2973
  break;
2974
2974
  case "put":
2975
- var T = new oe().addKeys(v.values.map(function(K) {
2975
+ var R = new se().addKeys(v.values.map(function(K) {
2976
2976
  return m(K);
2977
2977
  }));
2978
2978
  E = y.filter(function(K) {
2979
- return !T.hasKey(r.values ? m(K) : K);
2979
+ return !R.hasKey(r.values ? m(K) : K);
2980
2980
  }).concat(r.values ? S : S.map(function(K) {
2981
2981
  return m(K);
2982
2982
  }));
2983
2983
  break;
2984
2984
  case "delete":
2985
- var k = new oe().addKeys(v.keys);
2985
+ var k = new se().addKeys(v.keys);
2986
2986
  E = y.filter(function(K) {
2987
2987
  return !k.hasKey(r.values ? m(K) : K);
2988
2988
  });
@@ -2990,7 +2990,7 @@ function Ba() {
2990
2990
  case "deleteRange":
2991
2991
  var j = v.range;
2992
2992
  E = y.filter(function(K) {
2993
- return !Mr(m(K), j);
2993
+ return !Kr(m(K), j);
2994
2994
  });
2995
2995
  }
2996
2996
  return E;
@@ -3027,7 +3027,7 @@ function Ba() {
3027
3027
  e.subscribers.add(n), a.addEventListener("abort", function() {
3028
3028
  var s, c;
3029
3029
  e.subscribers.delete(n), e.subscribers.size === 0 && (s = e, c = r, setTimeout(function() {
3030
- s.subscribers.size === 0 && $e(c, s);
3030
+ s.subscribers.size === 0 && je(c, s);
3031
3031
  }, 3e3));
3032
3032
  });
3033
3033
  }
@@ -3039,21 +3039,21 @@ function Ba() {
3039
3039
  return function() {
3040
3040
  if (c.abort(), a === "readwrite") {
3041
3041
  for (var m = /* @__PURE__ */ new Set(), w = 0, h = n; w < h.length; w++) {
3042
- var O = h[w], y = Fe["idb://".concat(r, "/").concat(O)];
3042
+ var O = h[w], y = He["idb://".concat(r, "/").concat(O)];
3043
3043
  if (y) {
3044
3044
  var v = e.table(O), E = y.optimisticOps.filter(function(K) {
3045
3045
  return K.trans === d;
3046
3046
  });
3047
- if (d._explicit && p && d.mutatedParts) for (var S = 0, A = Object.values(y.queries.query); S < A.length; S++) for (var P = 0, N = ($ = A[S]).slice(); P < N.length; P++) Rr((T = N[P]).obsSet, d.mutatedParts) && ($e($, T), T.subscribers.forEach(function(K) {
3047
+ if (d._explicit && p && d.mutatedParts) for (var S = 0, A = Object.values(y.queries.query); S < A.length; S++) for (var P = 0, N = ($ = A[S]).slice(); P < N.length; P++) xr((R = N[P]).obsSet, d.mutatedParts) && (je($, R), R.subscribers.forEach(function(K) {
3048
3048
  return m.add(K);
3049
3049
  }));
3050
3050
  else if (0 < E.length) {
3051
3051
  y.optimisticOps = y.optimisticOps.filter(function(K) {
3052
3052
  return K.trans !== d;
3053
3053
  });
3054
- for (var I = 0, R = Object.values(y.queries.query); I < R.length; I++) for (var $, T, k, j = 0, C = ($ = R[I]).slice(); j < C.length; j++) (T = C[j]).res != null && d.mutatedParts && (p && !T.dirty ? (k = Object.isFrozen(T.res), k = xn(T.res, T.req, E, v, T, k), T.dirty ? ($e($, T), T.subscribers.forEach(function(K) {
3054
+ for (var D = 0, x = Object.values(y.queries.query); D < x.length; D++) for (var $, R, k, j = 0, C = ($ = x[D]).slice(); j < C.length; j++) (R = C[j]).res != null && d.mutatedParts && (p && !R.dirty ? (k = Object.isFrozen(R.res), k = xn(R.res, R.req, E, v, R, k), R.dirty ? (je($, R), R.subscribers.forEach(function(K) {
3055
3055
  return m.add(K);
3056
- })) : k !== T.res && (T.res = k, T.promise = M.resolve({ result: k }))) : (T.dirty && $e($, T), T.subscribers.forEach(function(K) {
3056
+ })) : k !== R.res && (R.res = k, R.promise = M.resolve({ result: k }))) : (R.dirty && je($, R), R.subscribers.forEach(function(K) {
3057
3057
  return m.add(K);
3058
3058
  })));
3059
3059
  }
@@ -3070,42 +3070,42 @@ function Ba() {
3070
3070
  return l(l({}, a), { mutate: function(c) {
3071
3071
  var u = L.trans;
3072
3072
  if (s.outbound || u.db._options.cache === "disabled" || u.explicit || u.idbtrans.mode !== "readwrite") return a.mutate(c);
3073
- var d = Fe["idb://".concat(r, "/").concat(n)];
3074
- return d ? (u = a.mutate(c), c.type !== "add" && c.type !== "put" || !(50 <= c.values.length || Gr(s, c).some(function(p) {
3073
+ var d = He["idb://".concat(r, "/").concat(n)];
3074
+ return d ? (u = a.mutate(c), c.type !== "add" && c.type !== "put" || !(50 <= c.values.length || Mr(s, c).some(function(p) {
3075
3075
  return p == null;
3076
- })) ? (d.optimisticOps.push(c), c.mutatedParts && Qt(c.mutatedParts), u.then(function(p) {
3077
- 0 < p.numFailures && ($e(d.optimisticOps, c), (p = Rn(0, c, p)) && d.optimisticOps.push(p), c.mutatedParts && Qt(c.mutatedParts));
3076
+ })) ? (d.optimisticOps.push(c), c.mutatedParts && Jt(c.mutatedParts), u.then(function(p) {
3077
+ 0 < p.numFailures && (je(d.optimisticOps, c), (p = Rn(0, c, p)) && d.optimisticOps.push(p), c.mutatedParts && Jt(c.mutatedParts));
3078
3078
  }), u.catch(function() {
3079
- $e(d.optimisticOps, c), c.mutatedParts && Qt(c.mutatedParts);
3079
+ je(d.optimisticOps, c), c.mutatedParts && Jt(c.mutatedParts);
3080
3080
  })) : u.then(function(p) {
3081
3081
  var m = Rn(0, l(l({}, c), { values: c.values.map(function(w, h) {
3082
3082
  var O;
3083
- return p.failures[h] ? w : (w = (O = s.keyPath) !== null && O !== void 0 && O.includes(".") ? Ce(w) : l({}, w), le(w, s.keyPath, p.results[h]), w);
3083
+ return p.failures[h] ? w : (w = (O = s.keyPath) !== null && O !== void 0 && O.includes(".") ? $e(w) : l({}, w), ue(w, s.keyPath, p.results[h]), w);
3084
3084
  }) }), p);
3085
3085
  d.optimisticOps.push(m), queueMicrotask(function() {
3086
- return c.mutatedParts && Qt(c.mutatedParts);
3086
+ return c.mutatedParts && Jt(c.mutatedParts);
3087
3087
  });
3088
3088
  }), u) : a.mutate(c);
3089
3089
  }, query: function(c) {
3090
3090
  if (!In(L, a) || !Tn("query", c)) return a.query(c);
3091
3091
  var u = ((m = L.trans) === null || m === void 0 ? void 0 : m.db._options.cache) === "immutable", h = L, d = h.requery, p = h.signal, m = (function(v, E, S, A) {
3092
- var P = Fe["idb://".concat(v, "/").concat(E)];
3092
+ var P = He["idb://".concat(v, "/").concat(E)];
3093
3093
  if (!P) return [];
3094
3094
  if (!(E = P.queries[S])) return [null, !1, P, null];
3095
3095
  var N = E[(A.query ? A.query.index.name : null) || ""];
3096
3096
  if (!N) return [null, !1, P, null];
3097
3097
  switch (S) {
3098
3098
  case "query":
3099
- var I = N.find(function(R) {
3100
- return R.req.limit === A.limit && R.req.values === A.values && kn(R.req.query.range, A.query.range);
3099
+ var D = N.find(function(x) {
3100
+ return x.req.limit === A.limit && x.req.values === A.values && kn(x.req.query.range, A.query.range);
3101
3101
  });
3102
- return I ? [I, !0, P, N] : [N.find(function(R) {
3103
- return ("limit" in R.req ? R.req.limit : 1 / 0) >= A.limit && (!A.values || R.req.values) && _a(R.req.query.range, A.query.range);
3102
+ return D ? [D, !0, P, N] : [N.find(function(x) {
3103
+ return ("limit" in x.req ? x.req.limit : 1 / 0) >= A.limit && (!A.values || x.req.values) && _a(x.req.query.range, A.query.range);
3104
3104
  }), !1, P, N];
3105
3105
  case "count":
3106
- return I = N.find(function(R) {
3107
- return kn(R.req.query.range, A.query.range);
3108
- }), [I, !!I, P, N];
3106
+ return D = N.find(function(x) {
3107
+ return kn(x.req.query.range, A.query.range);
3108
+ }), [D, !!D, P, N];
3109
3109
  }
3110
3110
  })(r, n, "query", c), w = m[0], h = m[1], O = m[2], y = m[3];
3111
3111
  return w && h ? w.obsSet = c.obsSet : (h = a.query(c).then(function(v) {
@@ -3113,22 +3113,22 @@ function Ba() {
3113
3113
  if (w && (w.res = E), u) {
3114
3114
  for (var S = 0, A = E.length; S < A; ++S) Object.freeze(E[S]);
3115
3115
  Object.freeze(E);
3116
- } else v.result = Ce(E);
3116
+ } else v.result = $e(E);
3117
3117
  return v;
3118
3118
  }).catch(function(v) {
3119
- return y && w && $e(y, w), Promise.reject(v);
3120
- }), w = { obsSet: c.obsSet, promise: h, subscribers: /* @__PURE__ */ new Set(), type: "query", req: c, dirty: !1 }, y ? y.push(w) : (y = [w], (O = O || (Fe["idb://".concat(r, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[c.query.index.name || ""] = y)), Aa(w, y, d, p), w.promise.then(function(v) {
3119
+ return y && w && je(y, w), Promise.reject(v);
3120
+ }), w = { obsSet: c.obsSet, promise: h, subscribers: /* @__PURE__ */ new Set(), type: "query", req: c, dirty: !1 }, y ? y.push(w) : (y = [w], (O = O || (He["idb://".concat(r, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[c.query.index.name || ""] = y)), Aa(w, y, d, p), w.promise.then(function(v) {
3121
3121
  return { result: xn(v.result, c, O?.optimisticOps, a, w, u) };
3122
3122
  });
3123
3123
  } });
3124
3124
  } });
3125
3125
  } };
3126
- function Zt(e, r) {
3126
+ function qt(e, r) {
3127
3127
  return new Proxy(e, { get: function(n, a, s) {
3128
3128
  return a === "db" ? r : Reflect.get(n, a, s);
3129
3129
  } });
3130
3130
  }
3131
- var Se = (ee.prototype.version = function(e) {
3131
+ var Oe = (ee.prototype.version = function(e) {
3132
3132
  if (isNaN(e) || e < 0.1) throw new B.Type("Given version is not a positive number");
3133
3133
  if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new B.Schema("Cannot add version when database is open");
3134
3134
  this.verno = Math.max(this.verno, e);
@@ -3158,13 +3158,13 @@ function Ba() {
3158
3158
  })), this;
3159
3159
  }, ee.prototype.open = function() {
3160
3160
  var e = this;
3161
- return Be(Pe, function() {
3161
+ return Ue(Ne, function() {
3162
3162
  return va(e);
3163
3163
  });
3164
3164
  }, ee.prototype._close = function() {
3165
3165
  this.on.close.fire(new CustomEvent("close"));
3166
- var e = this._state, r = et.indexOf(this);
3167
- if (0 <= r && et.splice(r, 1), this.idbdb) {
3166
+ var e = this._state, r = tt.indexOf(this);
3167
+ if (0 <= r && tt.splice(r, 1), this.idbdb) {
3168
3168
  try {
3169
3169
  this.idbdb.close();
3170
3170
  } catch {
@@ -3189,8 +3189,8 @@ function Ba() {
3189
3189
  var d = r._deps.indexedDB.deleteDatabase(r.name);
3190
3190
  d.onsuccess = Z(function() {
3191
3191
  var p, m, w;
3192
- p = r._deps, m = r.name, w = p.indexedDB, p = p.IDBKeyRange, Dr(w) || m === Gt || Nr(w, p).delete(m).catch(X), s();
3193
- }), d.onerror = ye(c), d.onblocked = r._fireOnBlocked;
3192
+ p = r._deps, m = r.name, w = p.indexedDB, p = p.IDBKeyRange, Ir(w) || m === Mt || Dr(w, p).delete(m).catch(X), s();
3193
+ }), d.onerror = be(c), d.onblocked = r._fireOnBlocked;
3194
3194
  }
3195
3195
  if (n) throw new B.InvalidArgument("Invalid closeOptions argument to db.delete()");
3196
3196
  a.isBeingOpened ? a.dbReadyPromise.then(u) : u();
@@ -3208,7 +3208,7 @@ function Ba() {
3208
3208
  return this._state.autoSchema;
3209
3209
  }, Object.defineProperty(ee.prototype, "tables", { get: function() {
3210
3210
  var e = this;
3211
- return D(this._allTables).map(function(r) {
3211
+ return I(this._allTables).map(function(r) {
3212
3212
  return e._allTables[r];
3213
3213
  });
3214
3214
  }, enumerable: !1, configurable: !0 }), ee.prototype.transaction = function() {
@@ -3228,13 +3228,13 @@ function Ba() {
3228
3228
  if (u = r.map(function(m) {
3229
3229
  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");
3230
3230
  return m;
3231
- }), e == "r" || e === mr) c = mr;
3231
+ }), e == "r" || e === yr) c = yr;
3232
3232
  else {
3233
- if (e != "rw" && e != yr) throw new B.InvalidArgument("Invalid transaction mode: " + e);
3234
- c = yr;
3233
+ if (e != "rw" && e != br) throw new B.InvalidArgument("Invalid transaction mode: " + e);
3234
+ c = br;
3235
3235
  }
3236
3236
  if (s) {
3237
- if (s.mode === mr && c === yr) {
3237
+ if (s.mode === yr && c === br) {
3238
3238
  if (!d) throw new B.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
3239
3239
  s = null;
3240
3240
  }
@@ -3257,14 +3257,14 @@ function Ba() {
3257
3257
  else try {
3258
3258
  S.create(), S.idbtrans._explicit = !0, w._state.PR1398_maxLoop = 3;
3259
3259
  } catch (N) {
3260
- return N.name === or.InvalidState && w.isOpen() && 0 < --w._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), w.close({ disableAutoOpen: !1 }), w.open().then(function() {
3260
+ return N.name === ir.InvalidState && w.isOpen() && 0 < --w._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), w.close({ disableAutoOpen: !1 }), w.open().then(function() {
3261
3261
  return m(w, h, O, null, v);
3262
3262
  })) : q(N);
3263
3263
  }
3264
- var A, P = sr(v);
3265
- return P && qe(), E = M.follow(function() {
3264
+ var A, P = or(v);
3265
+ return P && et(), E = M.follow(function() {
3266
3266
  var N;
3267
- (A = v.call(S, S)) && (P ? (N = De.bind(null, null), A.then(N, N)) : typeof A.next == "function" && typeof A.throw == "function" && (A = $r(A)));
3267
+ (A = v.call(S, S)) && (P ? (N = Ie.bind(null, null), A.then(N, N)) : typeof A.next == "function" && typeof A.throw == "function" && (A = jr(A)));
3268
3268
  }, E), (A && typeof A.then == "function" ? M.resolve(A).then(function(N) {
3269
3269
  return S.active ? N : q(new B.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
3270
3270
  }) : E.then(function() {
@@ -3278,11 +3278,11 @@ function Ba() {
3278
3278
  });
3279
3279
  });
3280
3280
  }.bind(null, this, c, u, s, n);
3281
- return s ? s._promise(c, p, "lock") : L.trans ? Be(L.transless, function() {
3281
+ return s ? s._promise(c, p, "lock") : L.trans ? Ue(L.transless, function() {
3282
3282
  return a._whenReady(p);
3283
3283
  }) : this._whenReady(p);
3284
3284
  }, ee.prototype.table = function(e) {
3285
- if (!re(this._allTables, e)) throw new B.InvalidTable("Table ".concat(e, " does not exist"));
3285
+ if (!ae(this._allTables, e)) throw new B.InvalidTable("Table ".concat(e, " does not exist"));
3286
3286
  return this._allTables[e];
3287
3287
  }, ee);
3288
3288
  function ee(e, r) {
@@ -3295,7 +3295,7 @@ function Ba() {
3295
3295
  m.dbReadyResolve = h;
3296
3296
  }), m.openCanceller = new M(function(h, O) {
3297
3297
  m.cancelOpen = O;
3298
- }), this._state = m, this.name = e, this.on = gt(this, "populate", "blocked", "versionchange", "close", { ready: [ir, X] }), this.once = function(h, O) {
3298
+ }), this._state = m, this.name = e, this.on = mt(this, "populate", "blocked", "versionchange", "close", { ready: [cr, X] }), this.once = function(h, O) {
3299
3299
  var y = function() {
3300
3300
  for (var v = [], E = 0; E < arguments.length; E++) v[E] = arguments[E];
3301
3301
  n.on(h).unsubscribe(y), O.apply(n, v);
@@ -3310,7 +3310,7 @@ function Ba() {
3310
3310
  }));
3311
3311
  });
3312
3312
  };
3313
- }), this.Collection = (s = this, pt(ca.prototype, function(A, S) {
3313
+ }), this.Collection = (s = this, yt(ca.prototype, function(A, S) {
3314
3314
  this.db = s;
3315
3315
  var y = cn, v = null;
3316
3316
  if (S) try {
@@ -3319,16 +3319,16 @@ function Ba() {
3319
3319
  v = P;
3320
3320
  }
3321
3321
  var E = A._ctx, S = E.table, A = S.hook.reading.fire;
3322
- this._ctx = { table: S, index: E.index, isPrimKey: !E.index || S.schema.primKey.keyPath && E.index === S.schema.primKey.name, range: y, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: v, or: E.or, valueMapper: A !== ct ? A : null };
3323
- })), this.Table = (c = this, pt(gn.prototype, function(h, O, y) {
3324
- this.db = c, this._tx = y, this.name = h, this.schema = O, this.hook = c._allTables[h] ? c._allTables[h].hook : gt(null, { creating: [qn, X], reading: [Zn, ct], updating: [ta, X], deleting: [ea, X] });
3325
- })), this.Transaction = (u = this, pt(da.prototype, function(h, O, y, v, E) {
3322
+ this._ctx = { table: S, index: E.index, isPrimKey: !E.index || S.schema.primKey.keyPath && E.index === S.schema.primKey.name, range: y, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: v, or: E.or, valueMapper: A !== lt ? A : null };
3323
+ })), this.Table = (c = this, yt(gn.prototype, function(h, O, y) {
3324
+ this.db = c, this._tx = y, this.name = h, this.schema = O, this.hook = c._allTables[h] ? c._allTables[h].hook : mt(null, { creating: [qn, X], reading: [Zn, lt], updating: [ta, X], deleting: [ea, X] });
3325
+ })), this.Transaction = (u = this, yt(da.prototype, function(h, O, y, v, E) {
3326
3326
  var S = this;
3327
3327
  h !== "readonly" && O.forEach(function(A) {
3328
3328
  A = (A = y[A]) === null || A === void 0 ? void 0 : A.yProps, A && (O = O.concat(A.map(function(P) {
3329
3329
  return P.updatesTable;
3330
3330
  })));
3331
- }), this.db = u, this.mode = h, this.storeNames = O, this.schema = y, this.chromeTransactionDurability = v, this.idbtrans = null, this.on = gt(this, "complete", "error", "abort"), this.parent = E || 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, P) {
3331
+ }), this.db = u, this.mode = h, this.storeNames = O, this.schema = y, this.chromeTransactionDurability = v, this.idbtrans = null, this.on = mt(this, "complete", "error", "abort"), this.parent = E || 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, P) {
3332
3332
  S._resolve = A, S._reject = P;
3333
3333
  }), this._completion.then(function() {
3334
3334
  S.active = !1, S.on.complete.fire();
@@ -3336,9 +3336,9 @@ function Ba() {
3336
3336
  var P = S.active;
3337
3337
  return S.active = !1, S.on.error.fire(A), S.parent ? S.parent._reject(A) : P && S.idbtrans && S.idbtrans.abort(), q(A);
3338
3338
  });
3339
- })), this.Version = (d = this, pt(ba.prototype, function(h) {
3339
+ })), this.Version = (d = this, yt(ba.prototype, function(h) {
3340
3340
  this.db = d, this._cfg = { version: h, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3341
- })), this.WhereClause = (p = this, pt(vn.prototype, function(h, O, y) {
3341
+ })), this.WhereClause = (p = this, yt(vn.prototype, function(h, O, y) {
3342
3342
  if (this.db = p, this._ctx = { table: h, index: O === ":id" ? null : O, or: y }, this._cmp = this._ascending = V, this._descending = function(v, E) {
3343
3343
  return V(E, v);
3344
3344
  }, this._max = function(v, E) {
@@ -3350,10 +3350,10 @@ function Ba() {
3350
3350
  0 < h.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
3351
3351
  }), this.on("blocked", function(h) {
3352
3352
  !h.newVersion || h.newVersion < h.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(h.oldVersion / 10));
3353
- }), this._maxKey = bt(r.IDBKeyRange), this._createTransaction = function(h, O, y, v) {
3353
+ }), this._maxKey = Et(r.IDBKeyRange), this._createTransaction = function(h, O, y, v) {
3354
3354
  return new n.Transaction(h, O, y, n._options.chromeTransactionDurability, v);
3355
3355
  }, this._fireOnBlocked = function(h) {
3356
- n.on("blocked").fire(h), et.filter(function(O) {
3356
+ n.on("blocked").fire(h), tt.filter(function(O) {
3357
3357
  return O.name === n.name && O !== n && !O._state.vcFired;
3358
3358
  }).map(function(O) {
3359
3359
  return O.on("versionchange").fire(h);
@@ -3362,64 +3362,64 @@ function Ba() {
3362
3362
  var w = new Proxy(this, { get: function(h, O, y) {
3363
3363
  if (O === "_vip") return !0;
3364
3364
  if (O === "table") return function(E) {
3365
- return Zt(n.table(E), w);
3365
+ return qt(n.table(E), w);
3366
3366
  };
3367
3367
  var v = Reflect.get(h, O, y);
3368
- return v instanceof gn ? Zt(v, w) : O === "tables" ? v.map(function(E) {
3369
- return Zt(E, w);
3368
+ return v instanceof gn ? qt(v, w) : O === "tables" ? v.map(function(E) {
3369
+ return qt(E, w);
3370
3370
  }) : O === "_createTransaction" ? function() {
3371
- return Zt(v.apply(this, arguments), w);
3371
+ return qt(v.apply(this, arguments), w);
3372
3372
  } : v;
3373
3373
  } });
3374
3374
  this.vip = w, a.forEach(function(h) {
3375
3375
  return h(n);
3376
3376
  });
3377
3377
  }
3378
- var qt, fe = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Na = (Kr.prototype.subscribe = function(e, r, n) {
3378
+ var er, he = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Na = (Lr.prototype.subscribe = function(e, r, n) {
3379
3379
  return this._subscribe(e && typeof e != "function" ? e : { next: e, error: r, complete: n });
3380
- }, Kr.prototype[fe] = function() {
3380
+ }, Lr.prototype[he] = function() {
3381
3381
  return this;
3382
- }, Kr);
3383
- function Kr(e) {
3382
+ }, Lr);
3383
+ function Lr(e) {
3384
3384
  this._subscribe = e;
3385
3385
  }
3386
3386
  try {
3387
- qt = { indexedDB: b.indexedDB || b.mozIndexedDB || b.webkitIndexedDB || b.msIndexedDB, IDBKeyRange: b.IDBKeyRange || b.webkitIDBKeyRange };
3387
+ er = { indexedDB: b.indexedDB || b.mozIndexedDB || b.webkitIndexedDB || b.msIndexedDB, IDBKeyRange: b.IDBKeyRange || b.webkitIDBKeyRange };
3388
3388
  } catch {
3389
- qt = { indexedDB: null, IDBKeyRange: null };
3389
+ er = { indexedDB: null, IDBKeyRange: null };
3390
3390
  }
3391
3391
  function Cn(e) {
3392
3392
  var r, n = !1, a = new Na(function(s) {
3393
- var c = sr(e), u, d = !1, p = {}, m = {}, w = { get closed() {
3393
+ var c = or(e), u, d = !1, p = {}, m = {}, w = { get closed() {
3394
3394
  return d;
3395
3395
  }, unsubscribe: function() {
3396
- d || (d = !0, u && u.abort(), h && Re.storagemutated.unsubscribe(y));
3396
+ d || (d = !0, u && u.abort(), h && xe.storagemutated.unsubscribe(y));
3397
3397
  } };
3398
3398
  s.start && s.start(w);
3399
3399
  var h = !1, O = function() {
3400
- return pr(v);
3400
+ return mr(v);
3401
3401
  }, y = function(E) {
3402
- Xt(p, E), Rr(m, p) && O();
3402
+ Qt(p, E), xr(m, p) && O();
3403
3403
  }, v = function() {
3404
3404
  var E, S, A;
3405
- !d && qt.indexedDB && (p = {}, E = {}, u && u.abort(), u = new AbortController(), A = (function(P) {
3406
- var N = Je();
3405
+ !d && er.indexedDB && (p = {}, E = {}, u && u.abort(), u = new AbortController(), A = (function(P) {
3406
+ var N = Ze();
3407
3407
  try {
3408
- c && qe();
3409
- var I = Ne(e, P);
3410
- return I = c ? I.finally(De) : I;
3408
+ c && et();
3409
+ var D = De(e, P);
3410
+ return D = c ? D.finally(Ie) : D;
3411
3411
  } finally {
3412
- N && Ze();
3412
+ N && qe();
3413
3413
  }
3414
3414
  })(S = { subscr: E, signal: u.signal, requery: O, querier: e, trans: null }), Promise.resolve(A).then(function(P) {
3415
3415
  n = !0, r = P, d || S.signal.aborted || (p = {}, (function(N) {
3416
- for (var I in N) if (re(N, I)) return;
3416
+ for (var D in N) if (ae(N, D)) return;
3417
3417
  return 1;
3418
- })(m = E) || h || (Re(yt, y), h = !0), pr(function() {
3418
+ })(m = E) || h || (xe(vt, y), h = !0), mr(function() {
3419
3419
  return !d && s.next && s.next(P);
3420
3420
  }));
3421
3421
  }, function(P) {
3422
- n = !1, ["DatabaseClosedError", "AbortError"].includes(P?.name) || d || pr(function() {
3422
+ n = !1, ["DatabaseClosedError", "AbortError"].includes(P?.name) || d || mr(function() {
3423
3423
  d || s.error && s.error(P);
3424
3424
  });
3425
3425
  }));
@@ -3432,32 +3432,32 @@ function Ba() {
3432
3432
  return r;
3433
3433
  }, a;
3434
3434
  }
3435
- var He = Se;
3436
- function Lr(e) {
3437
- var r = xe;
3435
+ var Ve = Oe;
3436
+ function Br(e) {
3437
+ var r = ke;
3438
3438
  try {
3439
- xe = !0, Re.storagemutated.fire(e), Cr(e, !0);
3439
+ ke = !0, xe.storagemutated.fire(e), $r(e, !0);
3440
3440
  } finally {
3441
- xe = r;
3441
+ ke = r;
3442
3442
  }
3443
3443
  }
3444
- ge(He, l(l({}, Dt), { delete: function(e) {
3445
- return new He(e, { addons: [] }).delete();
3444
+ ge(Ve, l(l({}, It), { delete: function(e) {
3445
+ return new Ve(e, { addons: [] }).delete();
3446
3446
  }, exists: function(e) {
3447
- return new He(e, { addons: [] }).open().then(function(r) {
3447
+ return new Ve(e, { addons: [] }).open().then(function(r) {
3448
3448
  return r.close(), !0;
3449
3449
  }).catch("NoSuchDatabaseError", function() {
3450
3450
  return !1;
3451
3451
  });
3452
3452
  }, getDatabaseNames: function(e) {
3453
3453
  try {
3454
- return r = He.dependencies, n = r.indexedDB, r = r.IDBKeyRange, (Dr(n) ? Promise.resolve(n.databases()).then(function(a) {
3454
+ return r = Ve.dependencies, n = r.indexedDB, r = r.IDBKeyRange, (Ir(n) ? Promise.resolve(n.databases()).then(function(a) {
3455
3455
  return a.map(function(s) {
3456
3456
  return s.name;
3457
3457
  }).filter(function(s) {
3458
- return s !== Gt;
3458
+ return s !== Mt;
3459
3459
  });
3460
- }) : Nr(n, r).toCollection().primaryKeys()).then(e);
3460
+ }) : Dr(n, r).toCollection().primaryKeys()).then(e);
3461
3461
  } catch {
3462
3462
  return q(new B.MissingAPI());
3463
3463
  }
@@ -3467,11 +3467,11 @@ function Ba() {
3467
3467
  te(this, e);
3468
3468
  };
3469
3469
  }, ignoreTransaction: function(e) {
3470
- return L.trans ? Be(L.transless, e) : e();
3471
- }, vip: Ir, async: function(e) {
3470
+ return L.trans ? Ue(L.transless, e) : e();
3471
+ }, vip: Tr, async: function(e) {
3472
3472
  return function() {
3473
3473
  try {
3474
- var r = $r(e.apply(this, arguments));
3474
+ var r = jr(e.apply(this, arguments));
3475
3475
  return r && typeof r.then == "function" ? r : M.resolve(r);
3476
3476
  } catch (n) {
3477
3477
  return q(n);
@@ -3479,7 +3479,7 @@ function Ba() {
3479
3479
  };
3480
3480
  }, spawn: function(e, r, n) {
3481
3481
  try {
3482
- var a = $r(e.apply(n, r || []));
3482
+ var a = jr(e.apply(n, r || []));
3483
3483
  return a && typeof a.then == "function" ? a : M.resolve(a);
3484
3484
  } catch (s) {
3485
3485
  return q(s);
@@ -3487,57 +3487,57 @@ function Ba() {
3487
3487
  }, currentTransaction: { get: function() {
3488
3488
  return L.trans || null;
3489
3489
  } }, waitFor: function(e, r) {
3490
- return r = M.resolve(typeof e == "function" ? He.ignoreTransaction(e) : e).timeout(r || 6e4), L.trans ? L.trans.waitFor(r) : r;
3490
+ return r = M.resolve(typeof e == "function" ? Ve.ignoreTransaction(e) : e).timeout(r || 6e4), L.trans ? L.trans.waitFor(r) : r;
3491
3491
  }, Promise: M, debug: { get: function() {
3492
- return me;
3492
+ return ye;
3493
3493
  }, set: function(e) {
3494
3494
  en(e);
3495
- } }, derive: ze, extend: te, props: ge, override: zr, Events: gt, on: Re, liveQuery: Cn, extendObservabilitySet: Xt, getByKeyPath: ve, setByKeyPath: le, delByKeyPath: function(e, r) {
3496
- typeof r == "string" ? le(e, r, void 0) : "length" in r && [].map.call(r, function(n) {
3497
- le(e, n, void 0);
3495
+ } }, derive: Ye, extend: te, props: ge, override: zr, Events: mt, on: xe, liveQuery: Cn, extendObservabilitySet: Qt, getByKeyPath: Ee, setByKeyPath: ue, delByKeyPath: function(e, r) {
3496
+ typeof r == "string" ? ue(e, r, void 0) : "length" in r && [].map.call(r, function(n) {
3497
+ ue(e, n, void 0);
3498
3498
  });
3499
- }, shallowClone: Xr, deepClone: Ce, getObjectDiff: jr, cmp: V, asap: Yr, minKey: -1 / 0, addons: [], connections: et, errnames: or, dependencies: qt, cache: Fe, semVer: "4.2.1", version: "4.2.1".split(".").map(function(e) {
3499
+ }, shallowClone: Xr, deepClone: $e, getObjectDiff: Gr, cmp: V, asap: Yr, minKey: -1 / 0, addons: [], connections: tt, errnames: ir, dependencies: er, cache: He, semVer: "4.2.1", version: "4.2.1".split(".").map(function(e) {
3500
3500
  return parseInt(e);
3501
3501
  }).reduce(function(e, r, n) {
3502
3502
  return e + r / Math.pow(10, 2 * n);
3503
- }) })), He.maxKey = bt(He.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Re(yt, function(e) {
3504
- xe || (e = new CustomEvent(Er, { detail: e }), xe = !0, dispatchEvent(e), xe = !1);
3505
- }), addEventListener(Er, function(e) {
3506
- e = e.detail, xe || Lr(e);
3503
+ }) })), Ve.maxKey = Et(Ve.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (xe(vt, function(e) {
3504
+ ke || (e = new CustomEvent(wr, { detail: e }), ke = !0, dispatchEvent(e), ke = !1);
3505
+ }), addEventListener(wr, function(e) {
3506
+ e = e.detail, ke || Br(e);
3507
3507
  }));
3508
- var at, xe = !1, $n = function() {
3508
+ var st, ke = !1, $n = function() {
3509
3509
  };
3510
3510
  return typeof BroadcastChannel < "u" && (($n = function() {
3511
- (at = new BroadcastChannel(Er)).onmessage = function(e) {
3512
- return e.data && Lr(e.data);
3511
+ (st = new BroadcastChannel(wr)).onmessage = function(e) {
3512
+ return e.data && Br(e.data);
3513
3513
  };
3514
- })(), typeof at.unref == "function" && at.unref(), Re(yt, function(e) {
3515
- xe || at.postMessage(e);
3514
+ })(), typeof st.unref == "function" && st.unref(), xe(vt, function(e) {
3515
+ ke || st.postMessage(e);
3516
3516
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
3517
- if (!Se.disableBfCache && e.persisted) {
3518
- me && console.debug("Dexie: handling persisted pagehide"), at?.close();
3519
- for (var r = 0, n = et; r < n.length; r++) n[r].close({ disableAutoOpen: !1 });
3517
+ if (!Oe.disableBfCache && e.persisted) {
3518
+ ye && console.debug("Dexie: handling persisted pagehide"), st?.close();
3519
+ for (var r = 0, n = tt; r < n.length; r++) n[r].close({ disableAutoOpen: !1 });
3520
3520
  }
3521
3521
  }), addEventListener("pageshow", function(e) {
3522
- !Se.disableBfCache && e.persisted && (me && console.debug("Dexie: handling persisted pageshow"), $n(), Lr({ all: new oe(-1 / 0, [[]]) }));
3522
+ !Oe.disableBfCache && e.persisted && (ye && console.debug("Dexie: handling persisted pageshow"), $n(), Br({ all: new se(-1 / 0, [[]]) }));
3523
3523
  })), M.rejectionMapper = function(e, r) {
3524
- return !e || e instanceof Xe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !qr[e.name] ? e : (r = new qr[e.name](r || e.message, e), "stack" in e && Ae(r, "stack", { get: function() {
3524
+ return !e || e instanceof Qe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !qr[e.name] ? e : (r = new qr[e.name](r || e.message, e), "stack" in e && Pe(r, "stack", { get: function() {
3525
3525
  return this.inner.stack;
3526
3526
  } }), r);
3527
- }, en(me), l(Se, Object.freeze({ __proto__: null, Dexie: Se, liveQuery: Cn, Entity: un, cmp: V, PropModification: ft, replacePrefix: function(e, r) {
3528
- return new ft({ replacePrefix: [e, r] });
3527
+ }, en(ye), l(Oe, Object.freeze({ __proto__: null, Dexie: Oe, liveQuery: Cn, Entity: un, cmp: V, PropModification: pt, replacePrefix: function(e, r) {
3528
+ return new pt({ replacePrefix: [e, r] });
3529
3529
  }, add: function(e) {
3530
- return new ft({ add: e });
3530
+ return new pt({ add: e });
3531
3531
  }, remove: function(e) {
3532
- return new ft({ remove: e });
3533
- }, default: Se, RangeSet: oe, mergeRanges: wt, rangesOverlap: _n }), { default: Se }), Se;
3532
+ return new pt({ remove: e });
3533
+ }, default: Oe, RangeSet: se, mergeRanges: Ot, rangesOverlap: _n }), { default: Oe }), Oe;
3534
3534
  });
3535
- })(rr)), rr.exports;
3535
+ })(nr)), nr.exports;
3536
3536
  }
3537
3537
  var Ua = Ba();
3538
- const Fr = /* @__PURE__ */ Ka(Ua), Gn = /* @__PURE__ */ Symbol.for("Dexie"), Ot = globalThis[Gn] || (globalThis[Gn] = Fr);
3539
- if (Fr.semVer !== Ot.semVer)
3540
- throw new Error(`Two different versions of Dexie loaded in the same app: ${Fr.semVer} and ${Ot.semVer}`);
3538
+ const Hr = /* @__PURE__ */ Ka(Ua), Gn = /* @__PURE__ */ Symbol.for("Dexie"), At = globalThis[Gn] || (globalThis[Gn] = Hr);
3539
+ if (Hr.semVer !== At.semVer)
3540
+ throw new Error(`Two different versions of Dexie loaded in the same app: ${Hr.semVer} and ${At.semVer}`);
3541
3541
  const {
3542
3542
  liveQuery: Ha,
3543
3543
  mergeRanges: Va,
@@ -3550,18 +3550,18 @@ const {
3550
3550
  add: qa,
3551
3551
  remove: es,
3552
3552
  DexieYProvider: ts
3553
- } = Ot;
3553
+ } = At;
3554
3554
  class Kn {
3555
3555
  db;
3556
3556
  subscribers = [];
3557
3557
  options;
3558
3558
  constructor(t) {
3559
- this.options = t, this.db = new Ot(t.app), this.db.version(17).stores({
3559
+ this.options = t, this.db = new At(t.app), this.db.version(18).stores({
3560
3560
  channel: "id,slide_index",
3561
3561
  cloud: "id,dashboard_id",
3562
3562
  dashboard: "id,name,update",
3563
3563
  display: "id,monitor_id,presentation_id,colstart,colend,rowstart,rowend",
3564
- hashes: "[id+presentation_id], id, presentation_id, hash",
3564
+ hashes: "id, hash",
3565
3565
  images: "id,basename,extension,size,type,url",
3566
3566
  messages: "id,utc,expires",
3567
3567
  monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
@@ -3575,7 +3575,7 @@ class Kn {
3575
3575
  }), this.db.open();
3576
3576
  }
3577
3577
  getHash = async (t) => {
3578
- const i = await this.db.table("hashes").where({ id: t.widget, presentation_id: t.presentation }).last().catch(() => {
3578
+ const i = await this.db.table("hashes").where({ id: t.widget }).last().catch(() => {
3579
3579
  G(2, ["%chash%c %capi%C %chash", o.API, o.NONE, o.APP]);
3580
3580
  });
3581
3581
  return G(3, [
@@ -3589,8 +3589,7 @@ class Kn {
3589
3589
  ]), i?.hash ?? "none";
3590
3590
  };
3591
3591
  setHash = async (t) => await this.db.table("hashes").where({
3592
- id: t.widget,
3593
- presentation_id: t.presentation
3592
+ id: t.widget
3594
3593
  }).modify({ hash: t.hash }).then(() => (G(3, [
3595
3594
  "%cset%c %chash%c %chash}",
3596
3595
  o.OK,
@@ -3618,7 +3617,7 @@ class Kn {
3618
3617
  o.WIDGET,
3619
3618
  "clear hashes"
3620
3619
  ]), 400));
3621
- deleteHash = async (t) => await this.db.table("hashes").where({ presentation_id: t.presentation }).delete().then(() => 201).catch((i) => (G(2, [
3620
+ deleteHash = async (t) => await this.db.table("hashes").where({ id: t.widget }).delete().then(() => 201).catch((i) => (G(2, [
3622
3621
  "%cdelete%c %cstorage%c %chash",
3623
3622
  o.KO,
3624
3623
  o.NONE,
@@ -3630,7 +3629,6 @@ class Kn {
3630
3629
  ]), 400));
3631
3630
  createHash = async (t) => await this.db.table("hashes").put({
3632
3631
  id: t.widget,
3633
- presentation_id: t.presentation,
3634
3632
  hash: t.hash
3635
3633
  }).then(() => 201).catch((i) => (G(2, [
3636
3634
  "%cset%c %cstorage%c %chash",
@@ -3804,26 +3802,26 @@ class Kn {
3804
3802
  success: !1,
3805
3803
  query: t
3806
3804
  };
3807
- const i = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3);
3808
- i !== "utc" && (t.since = l - 3600 * 24 * 30), this.options.delay !== 0 ? t.before = l - (this.options.delay || 0) : t.before = l;
3809
- const g = (D) => D.utc > (t?.since || 0), b = (D) => D.utc < (t?.before || l);
3805
+ const i = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3), g = t?.period ?? 0;
3806
+ t.since = g === 0 ? l - 3600 * 24 * 30 : l - g, this.options.delay !== 0 ? t.before = l - (this.options.delay || 0) : t.before = l;
3807
+ const b = (T) => T.utc > (t?.since || 0), I = (T) => T.utc < (t?.before || l);
3810
3808
  try {
3811
- const D = this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(g).filter(b);
3812
- t?.approved === "true" ? D.and((se) => se.approved === 1) : D.and((se) => se.visible === 1), D.reverse();
3813
- const x = await D.limit(t?.limit ?? 25).sortBy(i);
3814
- if (x.length === 0)
3809
+ const T = this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(b).filter(I);
3810
+ t?.approved === "true" ? T.and((fe) => fe.approved === 1) : T.and((fe) => fe.visible === 1), T.reverse();
3811
+ const te = await T.limit(t?.limit ?? 25).sortBy(i);
3812
+ if (te.length === 0)
3815
3813
  return {
3816
3814
  data: null,
3817
3815
  message: "No Messages error",
3818
3816
  success: !1,
3819
3817
  query: t
3820
3818
  };
3821
- const te = x.map((se) => this.db.table(_.MESSAGES).get({ id: se.message_id }));
3822
- return Ot.Promise.all(te).then(async (se) => {
3823
- const re = {
3819
+ const me = te.map((fe) => this.db.table(_.MESSAGES).get({ id: fe.message_id }));
3820
+ return At.Promise.all(me).then(async (fe) => {
3821
+ const ge = {
3824
3822
  data: {
3825
- messages: se.map((ge) => {
3826
- if (ge !== void 0) return ge.data;
3823
+ messages: fe.map((it) => {
3824
+ if (it !== void 0) return it.data;
3827
3825
  })
3828
3826
  },
3829
3827
  query: t,
@@ -3837,10 +3835,10 @@ class Kn {
3837
3835
  o.STORAGE,
3838
3836
  o.NONE,
3839
3837
  o.MESSAGES,
3840
- re
3841
- ]), re;
3838
+ ge
3839
+ ]), ge;
3842
3840
  });
3843
- } catch (D) {
3841
+ } catch (T) {
3844
3842
  return G(2, [
3845
3843
  "%cget%c %cstorage%c %cmessages",
3846
3844
  o.OK,
@@ -3849,7 +3847,7 @@ class Kn {
3849
3847
  o.NONE,
3850
3848
  o.NO_UPDATES,
3851
3849
  t,
3852
- D.message
3850
+ T.message
3853
3851
  ]), { data: null, message: "Messages Data error", success: !1 };
3854
3852
  }
3855
3853
  };
@@ -3898,7 +3896,7 @@ class Kn {
3898
3896
  utc: b.utc,
3899
3897
  data: b,
3900
3898
  expires: b.expires
3901
- }).catch((x) => {
3899
+ }).catch((T) => {
3902
3900
  g++, G(4, [
3903
3901
  "%cset%c %cstorage",
3904
3902
  o.KO,
@@ -3907,10 +3905,10 @@ class Kn {
3907
3905
  "set message",
3908
3906
  `title: ${l}`,
3909
3907
  b,
3910
- x.message
3908
+ T.message
3911
3909
  ]);
3912
3910
  });
3913
- const D = {
3911
+ const I = {
3914
3912
  title: l,
3915
3913
  widget_id: t.widget,
3916
3914
  visible: b.topics[0]?.visible || 1,
@@ -3925,7 +3923,7 @@ class Kn {
3925
3923
  utc: b.utc,
3926
3924
  expires: b.expires
3927
3925
  };
3928
- await this.db.table(_.TOPICS).put(D).catch((x) => {
3926
+ await this.db.table(_.TOPICS).put(I).catch((T) => {
3929
3927
  g++, G(4, [
3930
3928
  "%cset%c %cstorage",
3931
3929
  o.KO,
@@ -3934,19 +3932,19 @@ class Kn {
3934
3932
  "set topic",
3935
3933
  `title: ${l}`,
3936
3934
  b,
3937
- x.message
3935
+ T.message
3938
3936
  ]);
3939
- }), await i.data.topics.forEach(async (x) => {
3940
- const te = x.message_id, se = x.visible ? 1 : 0, At = x.approve ? 1 : 0, re = x.title;
3941
- await this.db.table(_.TOPICS).where("message_id").equals(te).modify({ visible: se, approve: At }).catch((ge) => {
3937
+ }), await i.data.topics.forEach(async (T) => {
3938
+ const te = T.message_id, me = T.visible ? 1 : 0, fe = T.approve ? 1 : 0, ae = T.title;
3939
+ await this.db.table(_.TOPICS).where("message_id").equals(te).modify({ visible: me, approve: fe }).catch((ge) => {
3942
3940
  g++, G(4, [
3943
3941
  "%cset%c %cstorage",
3944
3942
  o.KO,
3945
3943
  o.NONE,
3946
3944
  o.STORAGE,
3947
3945
  "update message visibility",
3948
- `title: ${re}`,
3949
- `widget: ${x.widget_id}`,
3946
+ `title: ${ae}`,
3947
+ `widget: ${T.widget_id}`,
3950
3948
  ge.message
3951
3949
  ]);
3952
3950
  });
@@ -4067,7 +4065,7 @@ class Kn {
4067
4065
  * @returns IResponse
4068
4066
  */
4069
4067
  getWidgets = async (t) => {
4070
- const i = (D) => t?.dashboard === D.dashboard_id, l = (D) => t?.type === D.type, g = (D) => t?.name ? D.name.includes(t?.name) : !1, b = await this.db.table(_.WIDGET).toArray().then((D) => t?.dashboard ? D.filter(i) : D).then((D) => t?.type ? D.filter(l) : D).then((D) => t?.name ? D.filter(g) : D).catch(() => {
4068
+ const i = (I) => t?.dashboard === I.dashboard_id, l = (I) => t?.type === I.type, g = (I) => t?.name ? I.name.includes(t?.name) : !1, b = await this.db.table(_.WIDGET).toArray().then((I) => t?.dashboard ? I.filter(i) : I).then((I) => t?.type ? I.filter(l) : I).then((I) => t?.name ? I.filter(g) : I).catch(() => {
4071
4069
  G(2, ["%cstorage", o.STORAGE, J.WIDGET_LOAD, t]);
4072
4070
  });
4073
4071
  return b !== void 0 && G(3, [
@@ -4116,7 +4114,7 @@ class Kn {
4116
4114
  */
4117
4115
  subscribe = (t) => (t = Ca(t), this.subscribers.filter(
4118
4116
  (l) => l.widget === t.widget
4119
- ).length > 0 || (t.type === _.MESSAGES && (t = _t(this.options, t)), console.info(
4117
+ ).length > 0 || (t.type === _.MESSAGES && (t = Pt(this.options, t)), console.info(
4120
4118
  "%cstorage%c %csubscribe",
4121
4119
  o.STORAGE,
4122
4120
  o.NONE,
@@ -4157,14 +4155,14 @@ class Kn {
4157
4155
  * @returns IResponse
4158
4156
  */
4159
4157
  getSlides = async (t) => {
4160
- const i = (x) => t?.id ? x.id === t.id : !1, l = (x) => t?.name ? x.name.includes(t?.name) : !1, g = (x) => t?.presentation_id ? x.presentation_id === t.presentation_id : !1, D = await this.db.table(_.SLIDE).toArray().then((x) => t?.presentation_id ? x.filter(g) : x).then((x) => t?.id ? x.filter(i) : x).then((x) => t?.name ? x.filter(l) : x);
4161
- return D && D.sort((x, te) => x.order_index - te.order_index), D !== void 0 && G(3, ["%cstorage%c %cslides", o.STORAGE, o.NONE, o.SLIDE, t]), {
4158
+ const i = (T) => t?.id ? T.id === t.id : !1, l = (T) => t?.name ? T.name.includes(t?.name) : !1, g = (T) => t?.presentation_id ? T.presentation_id === t.presentation_id : !1, I = await this.db.table(_.SLIDE).toArray().then((T) => t?.presentation_id ? T.filter(g) : T).then((T) => t?.id ? T.filter(i) : T).then((T) => t?.name ? T.filter(l) : T);
4159
+ return I && I.sort((T, te) => T.order_index - te.order_index), I !== void 0 && G(3, ["%cstorage%c %cslides", o.STORAGE, o.NONE, o.SLIDE, t]), {
4162
4160
  // @ts-ignore
4163
- data: D,
4161
+ data: I,
4164
4162
  query: t,
4165
4163
  // : data !== undefined ? { data, query } : null,
4166
- message: D !== void 0 ? "Slides loaded from storage" : "Slides load error",
4167
- success: D !== void 0
4164
+ message: I !== void 0 ? "Slides loaded from storage" : "Slides load error",
4165
+ success: I !== void 0
4168
4166
  };
4169
4167
  };
4170
4168
  /**
@@ -4377,7 +4375,7 @@ class Kn {
4377
4375
  success: !1
4378
4376
  }));
4379
4377
  }
4380
- function Hr(f) {
4378
+ function Vr(f) {
4381
4379
  return new Promise((t, i) => {
4382
4380
  f.oncomplete = f.onsuccess = () => t(f.result), f.onabort = f.onerror = () => i(f.error);
4383
4381
  });
@@ -4388,22 +4386,22 @@ function Wa(f, t) {
4388
4386
  if (i)
4389
4387
  return i;
4390
4388
  const g = indexedDB.open(f);
4391
- return g.onupgradeneeded = () => g.result.createObjectStore(t), i = Hr(g), i.then((b) => {
4389
+ return g.onupgradeneeded = () => g.result.createObjectStore(t), i = Vr(g), i.then((b) => {
4392
4390
  b.onclose = () => i = void 0;
4393
4391
  }, () => {
4394
4392
  }), i;
4395
4393
  };
4396
- return (g, b) => l().then((D) => b(D.transaction(t, g).objectStore(t)));
4394
+ return (g, b) => l().then((I) => b(I.transaction(t, g).objectStore(t)));
4397
4395
  }
4398
- let Wr;
4396
+ let Fr;
4399
4397
  function Ln() {
4400
- return Wr || (Wr = Wa("keyval-store", "keyval")), Wr;
4398
+ return Fr || (Fr = Wa("keyval-store", "keyval")), Fr;
4401
4399
  }
4402
- function _e(f, t = Ln()) {
4403
- return t("readonly", (i) => Hr(i.get(f)));
4400
+ function Ae(f, t = Ln()) {
4401
+ return t("readonly", (i) => Vr(i.get(f)));
4404
4402
  }
4405
- function ke(f, t, i = Ln()) {
4406
- return i("readwrite", (l) => (l.put(t, f), Hr(l.transaction)));
4403
+ function Ce(f, t, i = Ln()) {
4404
+ return i("readwrite", (l) => (l.put(t, f), Vr(l.transaction)));
4407
4405
  }
4408
4406
  class Bn {
4409
4407
  subscribers = [];
@@ -4418,15 +4416,15 @@ class Bn {
4418
4416
  deleteHash = async (t) => 404;
4419
4417
  getCloud = async (t) => {
4420
4418
  const i = Y(t);
4421
- return await _e(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.CLOUD, t.slide, t.widget), { data: null, message: "Cloud Data error", success: !1 }));
4419
+ return await Ae(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.CLOUD, t.slide, t.widget), { data: null, message: "Cloud Data error", success: !1 }));
4422
4420
  };
4423
4421
  getSeries = async (t) => {
4424
4422
  const i = Y(t);
4425
- return await _e(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.SERIES, t.slide, t.widget), { data: null, message: "Series Data error", success: !1 }));
4423
+ return await Ae(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.SERIES, t.slide, t.widget), { data: null, message: "Series Data error", success: !1 }));
4426
4424
  };
4427
4425
  getMessages = async (t) => {
4428
4426
  const i = Y(t);
4429
- return await _e(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.MESSAGES, t.slide, t.widget), { data: null, message: "Messages Data error", success: !1 }));
4427
+ return await Ae(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.MESSAGES, t.slide, t.widget), { data: null, message: "Messages Data error", success: !1 }));
4430
4428
  };
4431
4429
  /**
4432
4430
  * Update Cloud
@@ -4438,7 +4436,7 @@ class Bn {
4438
4436
  if (!i.success)
4439
4437
  return 400;
4440
4438
  const l = Y(t);
4441
- return delete i.success, delete i.message, await ke(l, i).then(() => 201).catch((g) => (console.error(
4439
+ return delete i.success, delete i.message, await Ce(l, i).then(() => 201).catch((g) => (console.error(
4442
4440
  "%cstorage",
4443
4441
  o.STORAGE,
4444
4442
  _.CLOUD,
@@ -4456,7 +4454,7 @@ class Bn {
4456
4454
  if (!i.success)
4457
4455
  return 400;
4458
4456
  const l = Y(t);
4459
- return delete i.success, delete i.message, await ke(l, i).then(() => 201).catch((g) => (console.error(
4457
+ return delete i.success, delete i.message, await Ce(l, i).then(() => 201).catch((g) => (console.error(
4460
4458
  "%cstorage",
4461
4459
  o.STORAGE,
4462
4460
  _.SERIES,
@@ -4474,7 +4472,7 @@ class Bn {
4474
4472
  if (!i.success)
4475
4473
  return 400;
4476
4474
  const l = Y(t);
4477
- return delete i.success, delete i.message, await ke(l, i).then(() => 201).catch((g) => (console.error(
4475
+ return delete i.success, delete i.message, await Ce(l, i).then(() => 201).catch((g) => (console.error(
4478
4476
  "%cstorage",
4479
4477
  o.STORAGE,
4480
4478
  _.MESSAGES,
@@ -4490,7 +4488,7 @@ class Bn {
4490
4488
  };
4491
4489
  getDashboard = async (t) => {
4492
4490
  const i = Y(t);
4493
- return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4491
+ return await Ae(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4494
4492
  data: null,
4495
4493
  message: `Widget ${t.data.id} load error: ${l.message}`,
4496
4494
  success: !1
@@ -4511,7 +4509,7 @@ class Bn {
4511
4509
  id: t.dashboard,
4512
4510
  name: t.name
4513
4511
  };
4514
- return await ke(i, l).then(() => ({
4512
+ return await Ce(i, l).then(() => ({
4515
4513
  data: null,
4516
4514
  message: `Dashboard ${t.data.id} saved to storage`,
4517
4515
  success: !0
@@ -4529,7 +4527,7 @@ class Bn {
4529
4527
  };
4530
4528
  getWidget = async (t) => {
4531
4529
  const i = Y(t);
4532
- return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4530
+ return await Ae(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4533
4531
  data: null,
4534
4532
  message: `Widget ${t.data.id} load error: ${l.message}`,
4535
4533
  success: !1
@@ -4552,7 +4550,7 @@ class Bn {
4552
4550
  dashboard_id: t.dashboard,
4553
4551
  type: t.type
4554
4552
  };
4555
- return await ke(i, l).then(() => ({
4553
+ return await Ce(i, l).then(() => ({
4556
4554
  data: null,
4557
4555
  message: `Widget ${t.data.id} saved to storage`,
4558
4556
  success: !0
@@ -4573,7 +4571,7 @@ class Bn {
4573
4571
  * @param query IQuery
4574
4572
  * @returns null
4575
4573
  */
4576
- subscribe = (t) => (t.type === _.MESSAGES && (t = _t(this.options, t)), this.subscribers.filter(
4574
+ subscribe = (t) => (t.type === _.MESSAGES && (t = Pt(this.options, t)), this.subscribers.filter(
4577
4575
  (l) => l.widget === t.widget
4578
4576
  ).length > 0 || (console.debug(
4579
4577
  "%cstorage%c %csubscribe",
@@ -4590,7 +4588,7 @@ class Bn {
4590
4588
  getSubscribers = async () => await new Promise((t) => t(this.subscribers));
4591
4589
  getSlide = async (t) => {
4592
4590
  const i = Y(t);
4593
- return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4591
+ return await Ae(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4594
4592
  data: null,
4595
4593
  message: `Slide ${t.data.id} load error: ${l.message}`,
4596
4594
  success: !1
@@ -4613,7 +4611,7 @@ class Bn {
4613
4611
  json: t.data.json || {},
4614
4612
  html: t.data.html || ""
4615
4613
  };
4616
- return await ke(i, l).then(() => ({
4614
+ return await Ce(i, l).then(() => ({
4617
4615
  data: null,
4618
4616
  message: `Slide ${t.data.id} saved to storage`,
4619
4617
  success: !0
@@ -4631,7 +4629,7 @@ class Bn {
4631
4629
  };
4632
4630
  getPresentation = async (t) => {
4633
4631
  const i = Y(t);
4634
- return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.PRESENTATION, t.id), {
4632
+ return await Ae(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.PRESENTATION, t.id), {
4635
4633
  data: null,
4636
4634
  message: `Slide ${t.data.id} load error: ${l.message}`,
4637
4635
  success: !1
@@ -4649,7 +4647,7 @@ class Bn {
4649
4647
  */
4650
4648
  setPresentation = async (t) => {
4651
4649
  const i = Y(t), l = t.data;
4652
- return await ke(i, l).then(() => ({
4650
+ return await Ce(i, l).then(() => ({
4653
4651
  data: null,
4654
4652
  message: `Presentation ${t.data.id} saved to storage`,
4655
4653
  success: !0
@@ -4665,12 +4663,12 @@ class Bn {
4665
4663
  success: !1
4666
4664
  }));
4667
4665
  };
4668
- getPreference = async (t) => await _e(`${_.PREFERENCE}.${t.id}`).then((i) => i).catch((i) => (console.warn("%capi", o.API, _.PREFERENCE, t.id), {
4666
+ getPreference = async (t) => await Ae(`${_.PREFERENCE}.${t.id}`).then((i) => i).catch((i) => (console.warn("%capi", o.API, _.PREFERENCE, t.id), {
4669
4667
  data: null,
4670
4668
  message: `Preference ${t.id} get error: ${i.message}`,
4671
4669
  success: !1
4672
4670
  }));
4673
- getPreferences = async () => await _e(`${_.PREFERENCE}`).then((t) => t).catch((t) => (console.warn("%capi", o.API, _.PREFERENCE), {
4671
+ getPreferences = async () => await Ae(`${_.PREFERENCE}`).then((t) => t).catch((t) => (console.warn("%capi", o.API, _.PREFERENCE), {
4674
4672
  data: null,
4675
4673
  message: `Preferences get error: ${t.message}`,
4676
4674
  success: !1
@@ -4680,7 +4678,7 @@ class Bn {
4680
4678
  * @param preference IPreference
4681
4679
  * @returns number
4682
4680
  */
4683
- setPreference = async (t) => await ke(`${_.PREFERENCE}.${t.id}`, t.value).then(() => ({
4681
+ setPreference = async (t) => await Ce(`${_.PREFERENCE}.${t.id}`, t.value).then(() => ({
4684
4682
  data: null,
4685
4683
  message: `Preference ${t.id} save error`,
4686
4684
  success: !0
@@ -4884,7 +4882,7 @@ class Un {
4884
4882
  * @param query IQuery
4885
4883
  * @returns null
4886
4884
  */
4887
- subscribe = (t) => (t.type === _.MESSAGES && (t = _t(this.options, t)), this.subscribers.filter(
4885
+ subscribe = (t) => (t.type === _.MESSAGES && (t = Pt(this.options, t)), this.subscribers.filter(
4888
4886
  (l) => l.widget === t.widget
4889
4887
  ).length || (console.debug(
4890
4888
  "%cstorage%c %csubscribe",
@@ -5224,7 +5222,7 @@ class Wn {
5224
5222
  * @param query IQuery
5225
5223
  * @returns null
5226
5224
  */
5227
- subscribe = (t) => (t.type === _.MESSAGES && (t = _t(this.options, t)), this.subscribers.filter(
5225
+ subscribe = (t) => (t.type === _.MESSAGES && (t = Pt(this.options, t)), this.subscribers.filter(
5228
5226
  (l) => l.widget === t.widget
5229
5227
  ).length || (console.debug(
5230
5228
  "%cstorage%c %csubscribe",
@@ -5564,7 +5562,7 @@ class Fn {
5564
5562
  * @param query IQuery
5565
5563
  * @returns null
5566
5564
  */
5567
- subscribe = (t) => (t.type === _.MESSAGES && (t = _t(this.options, t)), this.subscribers.filter(
5565
+ subscribe = (t) => (t.type === _.MESSAGES && (t = Pt(this.options, t)), this.subscribers.filter(
5568
5566
  (l) => l.widget === t.widget
5569
5567
  ).length || (console.debug(
5570
5568
  "%cstorage%c %csubscribe",
@@ -5787,12 +5785,12 @@ class rs {
5787
5785
  processResponse = async (t) => {
5788
5786
  let i, l = { code: 400, hash: "" }, g = "", b;
5789
5787
  if (t.success === !0) {
5790
- const D = t.query;
5791
- switch (D.type) {
5788
+ const I = t.query;
5789
+ switch (I.type) {
5792
5790
  case _.MESSAGES:
5793
- b = await this.sm?.getHash(D), b === "none" && (D.hash = "temp", await this.sm?.createHash(D)), t.data.messages = t.data.messages.filter(
5794
- (x) => x.id !== null
5795
- ), g = t.data.messages.length > 0 ? Ur(t.data.messages[0].utc) : "none", b === g ? (G(3, [
5791
+ b = await this.sm?.getHash(I), b === "none" && (I.hash = "temp", await this.sm?.createHash(I)), t.data.messages = t.data.messages.filter(
5792
+ (T) => T.id !== null
5793
+ ), g = t.data.messages.length > 0 ? Wr(t.data.messages[0].utc) : "none", b === g ? (G(3, [
5796
5794
  "%cset%c %cstorage%c %cmessages",
5797
5795
  o.NO_UPDATES,
5798
5796
  o.NONE,
@@ -5801,17 +5799,17 @@ class rs {
5801
5799
  o.MESSAGES,
5802
5800
  t.data?.title ?? t.query.widget,
5803
5801
  `same hash:${g}`
5804
- ]), l.code = 204) : this.sm !== null ? (D.hash = g, await this.sm?.setHash(D), l.code = await this.sm.setMessages(t.query, t).then(async (x) => (this.broadcastUpdate(x, t), x)).catch((x) => 500)) : l.code = 500;
5802
+ ]), l.code = 204) : this.sm !== null ? (I.hash = g, await this.sm?.setHash(I), l.code = await this.sm.setMessages(t.query, t).then(async (T) => (this.broadcastUpdate(T, t), T)).catch((T) => 500)) : l.code = 500;
5805
5803
  break;
5806
5804
  case _.CLOUD:
5807
- b = await this.sm?.getHash(D), b === "none" && (D.hash = "temp", await this.sm?.createHash(D)), g = Ur(t.data.cloud), b === g ? (G(3, [
5805
+ b = await this.sm?.getHash(I), b === "none" && (I.hash = "temp", await this.sm?.createHash(I)), g = Wr(t.data.cloud), b === g ? (G(3, [
5808
5806
  "%cset%c %cstorage%c %ccloud",
5809
5807
  o.NO_UPDATES,
5810
5808
  o.NONE,
5811
5809
  o.STORAGE,
5812
5810
  o.NONE,
5813
5811
  o.CLOUD,
5814
- t.data?.title ?? D.widget,
5812
+ t.data?.title ?? I.widget,
5815
5813
  `same hash:${g}`
5816
5814
  ]), G(4, [
5817
5815
  "%cdebug%c %ccloud",
@@ -5819,17 +5817,17 @@ class rs {
5819
5817
  o.NONE,
5820
5818
  o.CLOUD,
5821
5819
  t.query
5822
- ]), l = { code: 204, hash: g }) : (D.hash = g, await this.sm?.setHash(D), i = {
5820
+ ]), l = { code: 204, hash: g }) : (I.hash = g, await this.sm?.setHash(I), i = {
5823
5821
  data: {
5824
5822
  cloud: t.data
5825
5823
  },
5826
5824
  message: t.message,
5827
5825
  success: t.success,
5828
5826
  query: t.query
5829
- }, this.sm !== null ? l.code = await this.sm.setCloud(t.query, i.data).then((x) => (this.broadcastUpdate(x, t), x)).catch((x) => 500) : l.code = 500);
5827
+ }, this.sm !== null ? l.code = await this.sm.setCloud(t.query, i.data).then((T) => (this.broadcastUpdate(T, t), T)).catch((T) => 500) : l.code = 500);
5830
5828
  break;
5831
5829
  case _.SERIES:
5832
- b = await this.sm?.getHash(D), b === "none" && (D.hash = "temp", await this.sm?.createHash(D)), g = Ur(t.data.series), b === g ? (G(3, [
5830
+ b = await this.sm?.getHash(I), b === "none" && (I.hash = "temp", await this.sm?.createHash(I)), g = Wr(t.data.series), b === g ? (G(3, [
5833
5831
  "%cset%c %cstorage%c %cseries",
5834
5832
  o.NO_UPDATES,
5835
5833
  o.NONE,
@@ -5843,23 +5841,23 @@ class rs {
5843
5841
  o.NO_UPDATES,
5844
5842
  o.NONE,
5845
5843
  o.SERIES,
5846
- D
5847
- ]), l = { code: 204, hash: g }) : (D.hash = g, await this.sm?.setHash(D), i = {
5844
+ I
5845
+ ]), l = { code: 204, hash: g }) : (I.hash = g, await this.sm?.setHash(I), i = {
5848
5846
  data: t.data,
5849
5847
  message: t.message,
5850
5848
  success: t.success,
5851
5849
  query: t.query
5852
- }, this.sm !== null ? l.code = await this.sm?.setSeries(D, t.data).then((x) => (this.broadcastUpdate(x, t), x)).catch((x) => 500) : l.code = 500);
5850
+ }, this.sm !== null ? l.code = await this.sm?.setSeries(I, t.data).then((T) => (this.broadcastUpdate(T, t), T)).catch((T) => 500) : l.code = 500);
5853
5851
  break;
5854
5852
  default:
5855
5853
  G(3, [
5856
- `%cfetch%c %capi% %c${D.type} `,
5854
+ `%cfetch%c %capi% %c${I.type} `,
5857
5855
  o.KO,
5858
5856
  o.NONE,
5859
5857
  o.API,
5860
5858
  o.NONE,
5861
5859
  o.NO_UPDATES,
5862
- `Bad request: type ${D.type} unknown`
5860
+ `Bad request: type ${I.type} unknown`
5863
5861
  ]), l = { code: 404, hash: g };
5864
5862
  }
5865
5863
  } else
@@ -5873,11 +5871,11 @@ class rs {
5873
5871
  t.query
5874
5872
  ]), t.query.type) {
5875
5873
  case _.MESSAGES:
5876
- return this.sm !== null ? await this.sm?.getMessages(t.query).then((D) => (this.broadcastUpdate(201, D), { code: 201, hash: g })) : { code: 500, hash: g };
5874
+ return this.sm !== null ? await this.sm?.getMessages(t.query).then((I) => (this.broadcastUpdate(201, I), { code: 201, hash: g })) : { code: 500, hash: g };
5877
5875
  case _.CLOUD:
5878
- return this.sm !== null ? await this.sm?.getCloud(t.query).then((D) => (this.broadcastUpdate(201, D), { code: 201, hash: g })) : { code: 500, hash: g };
5876
+ return this.sm !== null ? await this.sm?.getCloud(t.query).then((I) => (this.broadcastUpdate(201, I), { code: 201, hash: g })) : { code: 500, hash: g };
5879
5877
  case _.SERIES:
5880
- return this.sm !== null ? await this.sm?.getSeries(t.query).then((D) => (this.broadcastUpdate(201, D), { code: 201, hash: g })) : { code: 500, hash: g };
5878
+ return this.sm !== null ? await this.sm?.getSeries(t.query).then((I) => (this.broadcastUpdate(201, I), { code: 201, hash: g })) : { code: 500, hash: g };
5881
5879
  }
5882
5880
  return t = null, l;
5883
5881
  };
@@ -5899,7 +5897,7 @@ class rs {
5899
5897
  o.NONE,
5900
5898
  o.WIDGET,
5901
5899
  o.NONE,
5902
- St(i.query),
5900
+ _t(i.query),
5903
5901
  // @ts-expect-error query.widget is obligatory but not always
5904
5902
  `${i?.data?.title ?? ""} ${i.query.widget}`
5905
5903
  ]), G(4, [
@@ -5922,7 +5920,7 @@ class rs {
5922
5920
  o.NONE,
5923
5921
  o.WIDGET,
5924
5922
  o.NONE,
5925
- St(i.query),
5923
+ _t(i.query),
5926
5924
  "Fetch error",
5927
5925
  i.query
5928
5926
  ]);
@@ -5942,7 +5940,7 @@ class rs {
5942
5940
  o.NONE,
5943
5941
  o.WIDGET,
5944
5942
  o.NONE,
5945
- St(i),
5943
+ _t(i),
5946
5944
  i
5947
5945
  ]), this.addSubscriber(i));
5948
5946
  break;
@@ -6172,7 +6170,7 @@ class ns {
6172
6170
  o.WIDGET,
6173
6171
  o.NONE,
6174
6172
  //@ts-ignore
6175
- St(this.query),
6173
+ _t(this.query),
6176
6174
  this.query
6177
6175
  ]), this.callbacks.forEach(async (b) => {
6178
6176
  b(g);
@@ -6202,7 +6200,7 @@ class ns {
6202
6200
  o.NONE,
6203
6201
  o.WIDGET,
6204
6202
  o.NONE,
6205
- St(this.query),
6203
+ _t(this.query),
6206
6204
  this.query.widget
6207
6205
  ]), G(4, [
6208
6206
  "%cdebug%c %cwidget",