@instantdb/react 0.22.74-experimental.drewh-entity-caching.19831690946.1 → 0.22.74

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.
@@ -232,7 +232,7 @@ function fe(t) {
232
232
  var e;
233
233
  t.assignedMap = (e = t.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), t.operated || (t.operated = !0, t.parent && fe(t.parent));
234
234
  }
235
- function wr() {
235
+ function Tr() {
236
236
  throw new Error("Cannot modify frozen object");
237
237
  }
238
238
  function Me(t, e, n, r, i) {
@@ -260,12 +260,12 @@ function Me(t, e, n, r, i) {
260
260
  case 2:
261
261
  for (const [a, u] of t)
262
262
  Me(a, a, n, r, i), Me(u, a, n, r, i);
263
- t.set = t.clear = t.delete = wr;
263
+ t.set = t.clear = t.delete = Tr;
264
264
  break;
265
265
  case 3:
266
266
  for (const a of t)
267
267
  Me(a, a, n, r, i);
268
- t.add = t.clear = t.delete = wr;
268
+ t.add = t.clear = t.delete = Tr;
269
269
  break;
270
270
  case 1:
271
271
  Object.freeze(t);
@@ -529,7 +529,7 @@ const jt = (t, e, n = !1) => {
529
529
  [vt]() {
530
530
  return this.entries();
531
531
  }
532
- }, Ds = Reflect.ownKeys(an), Tr = (t, e, { isValuesIterator: n }) => () => {
532
+ }, Ds = Reflect.ownKeys(an), wr = (t, e, { isValuesIterator: n }) => () => {
533
533
  var r, i;
534
534
  const s = e.next();
535
535
  if (s.done)
@@ -590,7 +590,7 @@ const jt = (t, e, n = !1) => {
590
590
  const e = t.setMap.keys();
591
591
  return {
592
592
  [Symbol.iterator]: () => this.values(),
593
- next: Tr(t, e, { isValuesIterator: !0 })
593
+ next: wr(t, e, { isValuesIterator: !0 })
594
594
  };
595
595
  },
596
596
  entries() {
@@ -599,7 +599,7 @@ const jt = (t, e, n = !1) => {
599
599
  const e = t.setMap.keys();
600
600
  return {
601
601
  [Symbol.iterator]: () => this.entries(),
602
- next: Tr(t, e, {
602
+ next: wr(t, e, {
603
603
  isValuesIterator: !1
604
604
  })
605
605
  };
@@ -757,10 +757,10 @@ function Ln(t) {
757
757
  var p, y;
758
758
  const b = j(u);
759
759
  let _ = c.type === 3 ? c.setMap : c.copy;
760
- const T = be(_, r), g = j(T);
760
+ const w = be(_, r), g = j(w);
761
761
  if (g) {
762
762
  let m = g.original;
763
- g.operated && (m = $n(T)), sn(g), on(g, ut, f, l), c.options.enableAutoFreeze && (c.options.updatedValues = (p = c.options.updatedValues) !== null && p !== void 0 ? p : /* @__PURE__ */ new WeakMap(), c.options.updatedValues.set(m, g.original)), ct(_, r, m);
763
+ g.operated && (m = $n(w)), sn(g), on(g, ut, f, l), c.options.enableAutoFreeze && (c.options.updatedValues = (p = c.options.updatedValues) !== null && p !== void 0 ? p : /* @__PURE__ */ new WeakMap(), c.options.updatedValues.set(m, g.original)), ct(_, r, m);
764
764
  }
765
765
  (y = b.callbacks) === null || y === void 0 || y.forEach((m) => {
766
766
  m(f, l);
@@ -890,22 +890,22 @@ const Ns = (t) => function e(n, r, i) {
890
890
  };
891
891
  if (!ae(f, _) && typeof f == "object" && f !== null)
892
892
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
893
- const [T, g] = Fs(f, _);
893
+ const [w, g] = Fs(f, _);
894
894
  if (typeof r != "function") {
895
895
  if (!ae(f, _))
896
896
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
897
- return [T, g];
897
+ return [w, g];
898
898
  }
899
899
  let m;
900
900
  try {
901
- m = d(T);
901
+ m = d(w);
902
902
  } catch (S) {
903
- throw rn(j(T)), S;
903
+ throw rn(j(w)), S;
904
904
  }
905
905
  const E = (S) => {
906
- const I = j(T);
906
+ const I = j(w);
907
907
  if (!je(S)) {
908
- if (S !== void 0 && !ye(S, T) && (I != null && I.operated))
908
+ if (S !== void 0 && !ye(S, w) && (I != null && I.operated))
909
909
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
910
910
  const B = S == null ? void 0 : S[js];
911
911
  if (B) {
@@ -919,7 +919,7 @@ const Ns = (t) => function e(n, r, i) {
919
919
  if (S !== void 0)
920
920
  return typeof S == "object" && S !== null && un({ rootDraft: I, value: S }), g([S]);
921
921
  }
922
- if (S === T || S === void 0)
922
+ if (S === w || S === void 0)
923
923
  return g([]);
924
924
  const x = j(S);
925
925
  if (_ === x.options) {
@@ -930,7 +930,7 @@ const Ns = (t) => function e(n, r, i) {
930
930
  return g([S]);
931
931
  };
932
932
  return m instanceof Promise ? m.then(E, (S) => {
933
- throw rn(j(T)), S;
933
+ throw rn(j(w)), S;
934
934
  }) : E(m);
935
935
  }, Pt = Ns();
936
936
  Object.prototype.constructor.toString();
@@ -952,7 +952,7 @@ function Fn(t) {
952
952
  r !== void 0 && (e[n] = r);
953
953
  return e;
954
954
  }
955
- function wi(t, e) {
955
+ function Ti(t, e) {
956
956
  if (!Ze(t) || !Ze(e))
957
957
  return e;
958
958
  const n = Object.assign({}, t);
@@ -964,7 +964,7 @@ function wi(t, e) {
964
964
  continue;
965
965
  }
966
966
  const i = Ze(t[r]) && Ze(e[r]);
967
- n[r] = i ? wi(t[r], e[r]) : e[r];
967
+ n[r] = i ? Ti(t[r], e[r]) : e[r];
968
968
  }
969
969
  return n;
970
970
  }
@@ -992,7 +992,7 @@ function Sr(t, e, n) {
992
992
  }
993
993
  r[e[e.length - 1]] = n;
994
994
  }
995
- function Ti(t, e) {
995
+ function wi(t, e) {
996
996
  if (!t || e.length === 0)
997
997
  return;
998
998
  const [n, ...r] = e;
@@ -1001,7 +1001,7 @@ function Ti(t, e) {
1001
1001
  Array.isArray(t) ? t.splice(n, 1) : delete t[n];
1002
1002
  return;
1003
1003
  }
1004
- Ti(t[n], r), qs(t[n]) && delete t[n];
1004
+ wi(t[n], r), qs(t[n]) && delete t[n];
1005
1005
  }
1006
1006
  }
1007
1007
  function qs(t) {
@@ -1403,7 +1403,7 @@ function qn(t) {
1403
1403
  }
1404
1404
  function Et(t, e, n, r, i) {
1405
1405
  const s = mi(t, e, i);
1406
- return s.useDateObjects = i, s.attrs = t, s.attrIndexes = vi(t), s.cardinalityInference = n, s.linkIndex = r, s.__type = "store", s.entityCache = /* @__PURE__ */ new Map(), s;
1406
+ return s.useDateObjects = i, s.attrs = t, s.attrIndexes = vi(t), s.cardinalityInference = n, s.linkIndex = r, s.__type = "store", s;
1407
1407
  }
1408
1408
  function dt(t, e) {
1409
1409
  var n, r;
@@ -1475,7 +1475,7 @@ function uo(t, e) {
1475
1475
  const d = (n = u.values().next()) === null || n === void 0 ? void 0 : n.value;
1476
1476
  if (!d)
1477
1477
  return;
1478
- const c = d[2], f = wi(c, o), l = [
1478
+ const c = d[2], f = Ti(c, o), l = [
1479
1479
  i,
1480
1480
  s,
1481
1481
  f,
@@ -1506,8 +1506,8 @@ function dn(t, e) {
1506
1506
  const d = t.vae.get(a) && X(t.vae.get(a), 2);
1507
1507
  d && d.forEach((c) => {
1508
1508
  var f, l, p;
1509
- const [y, b, _] = c, T = t.attrs[b];
1510
- (!s || !T || ((f = T["reverse-identity"]) === null || f === void 0 ? void 0 : f[1]) === s) && (oe(t.eav, [y, b, _]), oe(t.aev, [b, y, _]), oe(t.vae, [_, b, y])), T && T["on-delete"] === "cascade" && ((l = T["reverse-identity"]) === null || l === void 0 ? void 0 : l[1]) === s && dn(t, [y, (p = T["forward-identity"]) === null || p === void 0 ? void 0 : p[1]]);
1509
+ const [y, b, _] = c, w = t.attrs[b];
1510
+ (!s || !w || ((f = w["reverse-identity"]) === null || f === void 0 ? void 0 : f[1]) === s) && (oe(t.eav, [y, b, _]), oe(t.aev, [b, y, _]), oe(t.vae, [_, b, y])), w && w["on-delete"] === "cascade" && ((l = w["reverse-identity"]) === null || l === void 0 ? void 0 : l[1]) === s && dn(t, [y, (p = w["forward-identity"]) === null || p === void 0 ? void 0 : p[1]]);
1511
1511
  }), ((r = t.vae.get(a)) === null || r === void 0 ? void 0 : r.size) === 0 && oe(t.vae, [a]);
1512
1512
  }
1513
1513
  function ji(t, e) {
@@ -1663,17 +1663,15 @@ function yo(t, [e, n, r]) {
1663
1663
  }
1664
1664
  function bo(t, e, n) {
1665
1665
  var r;
1666
- if (t.entityCache.has(n))
1667
- return t.entityCache.get(n);
1668
1666
  const i = {};
1669
1667
  for (const [s, o] of e.entries()) {
1670
1668
  const a = (r = t.eav.get(n)) === null || r === void 0 ? void 0 : r.get(o.id), u = X(a, 1);
1671
1669
  for (const d of u)
1672
1670
  i[s] = d[2];
1673
1671
  }
1674
- return t.entityCache.set(n, i), i;
1672
+ return i;
1675
1673
  }
1676
- function we(t, e, n) {
1674
+ function Te(t, e, n) {
1677
1675
  var r;
1678
1676
  return (r = t.attrIndexes.forwardIdents.get(e)) === null || r === void 0 ? void 0 : r.get(n);
1679
1677
  }
@@ -1697,7 +1695,7 @@ function go(t, e) {
1697
1695
  if (qe(t.attrs, i))
1698
1696
  return We(t.eav, [r, i]);
1699
1697
  }
1700
- function wo(t, e) {
1698
+ function To(t, e) {
1701
1699
  const n = e.filter(([r, i, s, o, a]) => {
1702
1700
  if (r !== "add-triple" && r !== "deep-merge-triple")
1703
1701
  return !0;
@@ -1718,7 +1716,7 @@ function wo(t, e) {
1718
1716
  });
1719
1717
  });
1720
1718
  }
1721
- function To(t) {
1719
+ function wo(t) {
1722
1720
  return typeof t == "string" && t.startsWith("?");
1723
1721
  }
1724
1722
  function mo(t, e, n) {
@@ -1772,7 +1770,7 @@ function fn(t, e, n = [{}]) {
1772
1770
  return e.reduce((r, i) => ko(t, i, r), n);
1773
1771
  }
1774
1772
  function Wn(t, e) {
1775
- return Array.isArray(e) ? e.map((n) => Wn(t, n)) : To(e) ? t[e] : e;
1773
+ return Array.isArray(e) ? e.map((n) => Wn(t, n)) : wo(e) ? t[e] : e;
1776
1774
  }
1777
1775
  function jo(t, { find: e, where: n }) {
1778
1776
  return fn(t, n).map((i) => Wn(i, e));
@@ -1878,7 +1876,7 @@ function zo(t, e, n) {
1878
1876
  return t.map((r) => r === e ? n : r);
1879
1877
  }
1880
1878
  function Ri(t, e, n, r, i) {
1881
- const s = we(e, n, i), o = Pi(e, n, i), a = s || o;
1879
+ const s = Te(e, n, i), o = Pi(e, n, i), a = s || o;
1882
1880
  if (!a)
1883
1881
  throw new Ne(`Could not find attr for ${[n, i]}`);
1884
1882
  if (a["value-type"] !== "ref")
@@ -1967,11 +1965,11 @@ function Vo(t, e) {
1967
1965
  return e;
1968
1966
  }
1969
1967
  function Bo(t, e, n, r, i, s) {
1970
- const o = we(e, n, i), a = Pi(e, n, i), u = o || a;
1968
+ const o = Te(e, n, i), a = Pi(e, n, i), u = o || a;
1971
1969
  if (!u)
1972
1970
  throw new Ne(`No attr for etype = ${n} label = ${i}`);
1973
1971
  if (s != null && s.hasOwnProperty("$isNull")) {
1974
- const d = we(e, n, "id");
1972
+ const d = Te(e, n, "id");
1975
1973
  if (!d)
1976
1974
  throw new Ne(`No attr for etype = ${n} label = id`);
1977
1975
  return [
@@ -2078,17 +2076,17 @@ function na(t, e, { etype: n, level: r, form: i }, s) {
2078
2076
  var p, y, b;
2079
2077
  const _ = !!(e.cardinalityInference && (!((b = (y = (p = e.linkIndex) === null || p === void 0 ? void 0 : p[n]) === null || y === void 0 ? void 0 : y[l]) === null || b === void 0) && b.isSingular));
2080
2078
  try {
2081
- const [T, g, m] = ta(t, e, n, r, l, u), E = Di(e, {
2082
- etype: T,
2079
+ const [w, g, m] = ta(t, e, n, r, l, u), E = Di(e, {
2080
+ etype: w,
2083
2081
  level: g,
2084
2082
  form: i[l],
2085
2083
  join: m
2086
2084
  }), S = _ ? E[0] : E;
2087
2085
  return { [l]: S };
2088
- } catch (T) {
2089
- if (T instanceof Ne)
2086
+ } catch (w) {
2087
+ if (w instanceof Ne)
2090
2088
  return { [l]: _ ? void 0 : [] };
2091
- throw T;
2089
+ throw w;
2092
2090
  }
2093
2091
  }).reduce(function(l, p) {
2094
2092
  return Object.assign(Object.assign({}, l), p);
@@ -2121,7 +2119,7 @@ function sa(t, e) {
2121
2119
  }
2122
2120
  function oa(t, e, n) {
2123
2121
  const r = Object.keys(n)[0];
2124
- return we(t, e, r);
2122
+ return Te(t, e, r);
2125
2123
  }
2126
2124
  function aa(t, e, n, r) {
2127
2125
  if (n)
@@ -2135,11 +2133,11 @@ function ua(t, e, n) {
2135
2133
  return _o(t, e);
2136
2134
  const s = /* @__PURE__ */ new Map();
2137
2135
  for (const o of n.fields) {
2138
- const a = we(t, e, o), u = (r = a == null ? void 0 : a["forward-identity"]) === null || r === void 0 ? void 0 : r[2];
2136
+ const a = Te(t, e, o), u = (r = a == null ? void 0 : a["forward-identity"]) === null || r === void 0 ? void 0 : r[2];
2139
2137
  u && Kn(a) && s.set(u, a);
2140
2138
  }
2141
2139
  if (!s.has("id")) {
2142
- const o = we(t, e, "id"), a = (i = o == null ? void 0 : o["forward-identity"]) === null || i === void 0 ? void 0 : i[2];
2140
+ const o = Te(t, e, "id"), a = (i = o == null ? void 0 : o["forward-identity"]) === null || i === void 0 ? void 0 : i[2];
2143
2141
  a && s.set(a, o);
2144
2142
  }
2145
2143
  return s;
@@ -2151,16 +2149,16 @@ function ca(t, { etype: e, pageInfo: n, dq: r, form: i }) {
2151
2149
  const f = n == null ? void 0 : n["start-cursor"], l = aa(t, e, f, a);
2152
2150
  if (l && ((o = l == null ? void 0 : l["forward-identity"]) === null || o === void 0 ? void 0 : o[2]) !== "id") {
2153
2151
  const b = l["checked-data-type"] === "date", _ = l.id;
2154
- c = c.map(([T]) => {
2152
+ c = c.map(([w]) => {
2155
2153
  var g, m, E, S, I;
2156
- let x = (I = (S = (E = (m = (g = t.eav.get(T)) === null || g === void 0 ? void 0 : g.get(_)) === null || m === void 0 ? void 0 : m.values()) === null || E === void 0 ? void 0 : E.next()) === null || S === void 0 ? void 0 : S.value) === null || I === void 0 ? void 0 : I[2];
2157
- return b && (x = hn(x)), [T, x];
2154
+ let x = (I = (S = (E = (m = (g = t.eav.get(w)) === null || g === void 0 ? void 0 : g.get(_)) === null || m === void 0 ? void 0 : m.values()) === null || E === void 0 ? void 0 : E.next()) === null || S === void 0 ? void 0 : S.value) === null || I === void 0 ? void 0 : I[2];
2155
+ return b && (x = hn(x)), [w, x];
2158
2156
  });
2159
2157
  }
2160
- c.sort(d === "asc" ? function(_, T) {
2161
- return It(_, T, l == null ? void 0 : l["checked-data-type"]);
2162
- } : function(_, T) {
2163
- return It(T, _, l == null ? void 0 : l["checked-data-type"]);
2158
+ c.sort(d === "asc" ? function(_, w) {
2159
+ return It(_, w, l == null ? void 0 : l["checked-data-type"]);
2160
+ } : function(_, w) {
2161
+ return It(w, _, l == null ? void 0 : l["checked-data-type"]);
2164
2162
  });
2165
2163
  let p = {};
2166
2164
  const y = ua(t, e, r);
@@ -2168,8 +2166,8 @@ function ca(t, { etype: e, pageInfo: n, dq: r, form: i }) {
2168
2166
  const [_] = b;
2169
2167
  if (p[_] || !u && f && l && ia(f, l, d, b))
2170
2168
  continue;
2171
- const T = bo(t, y, _);
2172
- T && (p[_] = T);
2169
+ const w = bo(t, y, _);
2170
+ w && (p[_] = w);
2173
2171
  }
2174
2172
  return p;
2175
2173
  }
@@ -2336,7 +2334,7 @@ function Ae(t, e, n) {
2336
2334
  return o === e && a === n;
2337
2335
  });
2338
2336
  }
2339
- function wa(t) {
2337
+ function Ta(t) {
2340
2338
  if (Array.isArray(t))
2341
2339
  return t;
2342
2340
  const e = Object.entries(t);
@@ -2355,7 +2353,7 @@ function bn(t) {
2355
2353
  throw new Error(`${t} is not a valid lookup attribute.`);
2356
2354
  return e;
2357
2355
  }
2358
- function Ta(t, e, n) {
2356
+ function wa(t, e, n) {
2359
2357
  if (!yn(t, e, n))
2360
2358
  return V(t, e, n);
2361
2359
  const r = bn(n), i = V(t, e, r) || Ae(t, e, r);
@@ -2364,13 +2362,13 @@ function Ta(t, e, n) {
2364
2362
  return i;
2365
2363
  }
2366
2364
  function _n(t) {
2367
- return typeof t == "string" && !Mt(t) ? null : typeof t == "string" && Mt(t) ? Li(t) : wa(t);
2365
+ return typeof t == "string" && !Mt(t) ? null : typeof t == "string" && Mt(t) ? Li(t) : Ta(t);
2368
2366
  }
2369
2367
  function ee(t, e, n) {
2370
2368
  const r = _n(n);
2371
2369
  if (r === null)
2372
2370
  return n;
2373
- const [i, s] = r, o = Ta(t, e, i);
2371
+ const [i, s] = r, o = wa(t, e, i);
2374
2372
  if (!o || !o["unique?"])
2375
2373
  throw new Error(`${i} is not a unique attribute.`);
2376
2374
  return [o.id, s];
@@ -2541,7 +2539,7 @@ function Ma(t, e, n) {
2541
2539
  "checked-data-type": u
2542
2540
  };
2543
2541
  }
2544
- function wt(t, e, n, r) {
2542
+ function Tt(t, e, n, r) {
2545
2543
  const i = t ? Ma(t, e, n) : null, s = K(), a = [K(), e, n];
2546
2544
  return Object.assign(Object.assign({ id: s, "forward-identity": a, "value-type": "blob", cardinality: "one", "unique?": !1, "index?": !1, isUnsynced: !0 }, i || {}), r || {});
2547
2545
  }
@@ -2612,32 +2610,32 @@ function Ka({ attrs: t, schema: e }, n) {
2612
2610
  const b = p[0];
2613
2611
  if (y) {
2614
2612
  c(l, y);
2615
- const _ = V(o, l, y), T = Ae(o, l, y);
2616
- d(_), d(T);
2617
- const g = ((r = _ == null ? void 0 : _["reverse-identity"]) === null || r === void 0 ? void 0 : r[1]) || ((i = T == null ? void 0 : T["forward-identity"]) === null || i === void 0 ? void 0 : i[1]) || y;
2613
+ const _ = V(o, l, y), w = Ae(o, l, y);
2614
+ d(_), d(w);
2615
+ const g = ((r = _ == null ? void 0 : _["reverse-identity"]) === null || r === void 0 ? void 0 : r[1]) || ((i = w == null ? void 0 : w["forward-identity"]) === null || i === void 0 ? void 0 : i[1]) || y;
2618
2616
  if (yn(o, g, b))
2619
2617
  c(g, bn(b));
2620
2618
  else {
2621
2619
  const m = V(o, g, b);
2622
- m || u(wt(e, g, b, gn)), d(m);
2620
+ m || u(Tt(e, g, b, gn)), d(m);
2623
2621
  }
2624
2622
  } else if (yn(o, l, b))
2625
2623
  c(l, bn(b));
2626
2624
  else {
2627
2625
  const _ = V(o, l, b);
2628
- _ || u(wt(e, l, b, gn)), d(_);
2626
+ _ || u(Tt(e, l, b, gn)), d(_);
2629
2627
  }
2630
2628
  }
2631
2629
  for (const f of n) {
2632
2630
  const [l, p, y, b] = f;
2633
2631
  if ($a.has(l)) {
2634
2632
  const _ = V(o, p, "id");
2635
- d(_), _ || u(wt(e, p, "id", { "unique?": !0 }));
2636
- for (const T of Object.keys(b)) {
2637
- const g = V(o, p, T);
2638
- if (d(g), Ua.has(l) && (g || u(wt(e, p, T, T === "id" ? { "unique?": !0 } : null))), Da.has(l)) {
2639
- const m = Ae(o, p, T);
2640
- !g && !m && u(Mr(e, p, T)), d(m);
2633
+ d(_), _ || u(Tt(e, p, "id", { "unique?": !0 }));
2634
+ for (const w of Object.keys(b)) {
2635
+ const g = V(o, p, w);
2636
+ if (d(g), Ua.has(l) && (g || u(Tt(e, p, w, w === "id" ? { "unique?": !0 } : null))), Da.has(l)) {
2637
+ const m = Ae(o, p, w);
2638
+ !g && !m && u(Mr(e, p, w)), d(m);
2641
2639
  }
2642
2640
  }
2643
2641
  }
@@ -2683,7 +2681,7 @@ class Wa {
2683
2681
  constructor(e, n) {
2684
2682
  }
2685
2683
  }
2686
- class wn {
2684
+ class Tn {
2687
2685
  constructor(e) {
2688
2686
  var n, r;
2689
2687
  this._subs = [], this._nextSave = null, this._nextGc = null, this._pendingSaveKeys = /* @__PURE__ */ new Set(), this._loadedKeys = /* @__PURE__ */ new Set(), this._version = 0, this._meta = {
@@ -2998,8 +2996,8 @@ function Qa(t, e, n) {
2998
2996
  };
2999
2997
  f[y] = g;
3000
2998
  }
3001
- const T = n.put(_, y);
3002
- i.add(T);
2999
+ const w = n.put(_, y);
3000
+ i.add(w);
3003
3001
  }
3004
3002
  const l = { objects: f }, p = n.put(l, it);
3005
3003
  i.add(p);
@@ -3034,8 +3032,8 @@ function Ha(t, e) {
3034
3032
  y.onsuccess = () => {
3035
3033
  const _ = y.result;
3036
3034
  if (_) {
3037
- const T = _.key, g = _.value;
3038
- b.push([T, g]), _.continue();
3035
+ const w = _.key, g = _.value;
3036
+ b.push([w, g]), _.continue();
3039
3037
  } else
3040
3038
  c(b);
3041
3039
  }, y.onerror = (_) => {
@@ -3552,7 +3550,7 @@ function Nr(t) {
3552
3550
  }, e;
3553
3551
  }, {});
3554
3552
  }
3555
- const Bn = "v0.22.74-experimental.drewh-entity-caching.19831690946.1";
3553
+ const Bn = "v0.22.74";
3556
3554
  function fu(t, e) {
3557
3555
  return {
3558
3556
  info: t ? (...n) => console.info(...n, e()) : () => {
@@ -3881,7 +3879,7 @@ const Hi = (t) => t.length > 0 ? t.join(", ") : "none", bu = (t, e) => new ie(`E
3881
3879
  unlink: Vr,
3882
3880
  delete: () => {
3883
3881
  }
3884
- }, wu = (t, e) => {
3882
+ }, Tu = (t, e) => {
3885
3883
  if (!e)
3886
3884
  return;
3887
3885
  const [n, r, i, s] = t;
@@ -3891,7 +3889,7 @@ const Hi = (t) => t.length > 0 ? t.join(", ") : "none", bu = (t, e) => new ie(`E
3891
3889
  throw new ie(`Entity name must be a string, but received: ${typeof r}`);
3892
3890
  const o = gu[n];
3893
3891
  o && s !== void 0 && o(r, s, e);
3894
- }, Tu = (t, e) => {
3892
+ }, wu = (t, e) => {
3895
3893
  const n = Array.isArray(t) ? t : [t];
3896
3894
  for (const r of n) {
3897
3895
  if (!r || typeof r != "object")
@@ -3901,7 +3899,7 @@ const Hi = (t) => t.length > 0 ? t.join(", ") : "none", bu = (t, e) => new ie(`E
3901
3899
  for (const i of r.__ops) {
3902
3900
  if (!Array.isArray(i))
3903
3901
  throw new ie(`Transaction operation must be an array, but received: ${typeof i}`);
3904
- wu(i, e);
3902
+ Tu(i, e);
3905
3903
  }
3906
3904
  }
3907
3905
  };
@@ -4098,7 +4096,7 @@ function Zt(t, e) {
4098
4096
  }
4099
4097
  function Hr(t, e, n) {
4100
4098
  var r;
4101
- const i = (r = we(e, t.table, "id")) === null || r === void 0 ? void 0 : r.id;
4099
+ const i = (r = Te(e, t.table, "id")) === null || r === void 0 ? void 0 : r.id;
4102
4100
  if (!i)
4103
4101
  return -1;
4104
4102
  const s = We(e.eav, [n, i, n]);
@@ -4140,14 +4138,14 @@ function Eu(t, e) {
4140
4138
  }
4141
4139
  return o;
4142
4140
  }
4143
- function Tt(t, e) {
4141
+ function wt(t, e) {
4144
4142
  return { [t.table]: e.map((n) => n.entity) };
4145
4143
  }
4146
4144
  function Au(t, e) {
4147
4145
  var n;
4148
4146
  if (t.orderFieldType)
4149
4147
  return t.orderFieldType;
4150
- const r = t.orderField === "serverCreatedAt" ? "number" : (n = we(e([]), t.table, t.orderField)) === null || n === void 0 ? void 0 : n["checked-data-type"];
4148
+ const r = t.orderField === "serverCreatedAt" ? "number" : (n = Te(e([]), t.table, t.orderField)) === null || n === void 0 ? void 0 : n["checked-data-type"];
4151
4149
  return t.orderFieldType = r, r;
4152
4150
  }
4153
4151
  function ku(t, e, n) {
@@ -4173,7 +4171,7 @@ var ve;
4173
4171
  })(ve || (ve = {}));
4174
4172
  class ju {
4175
4173
  constructor(e, n, r, i, s) {
4176
- this.callbacks = {}, this.idToHash = {}, this.trySend = e, this.config = r, this.log = i, this.createStore = s, this.subs = new wn({
4174
+ this.callbacks = {}, this.idToHash = {}, this.trySend = e, this.config = r, this.log = i, this.createStore = s, this.subs = new Tn({
4177
4175
  persister: n,
4178
4176
  merge: Ou,
4179
4177
  serialize: Su,
@@ -4241,7 +4239,7 @@ class ju {
4241
4239
  if (u && u.state && u.state.txId) {
4242
4240
  this.sendResync(u, u.state, u.state.txId), !((i = u.values) === null || i === void 0) && i.entities && r && r({
4243
4241
  type: ve.LoadFromStorage,
4244
- data: Tt(u, (s = u.values) === null || s === void 0 ? void 0 : s.entities)
4242
+ data: wt(u, (s = u.values) === null || s === void 0 ? void 0 : s.entities)
4245
4243
  });
4246
4244
  return;
4247
4245
  }
@@ -4316,7 +4314,7 @@ class ju {
4316
4314
  c[s] = a, c[s].updatedAt = Date.now();
4317
4315
  }), a.values && this.notifyCbs(s, {
4318
4316
  type: ve.InitialSyncBatch,
4319
- data: Tt(a, a.values.entities),
4317
+ data: wt(a, a.values.entities),
4320
4318
  batch: o
4321
4319
  });
4322
4320
  }
@@ -4341,7 +4339,7 @@ class ju {
4341
4339
  const s = this.subs.currentValue[i];
4342
4340
  s && this.notifyCbs(i, {
4343
4341
  type: ve.InitialSyncComplete,
4344
- data: Tt(s, ((n = s.values) === null || n === void 0 ? void 0 : n.entities) || [])
4342
+ data: wt(s, ((n = s.values) === null || n === void 0 ? void 0 : n.entities) || [])
4345
4343
  });
4346
4344
  }
4347
4345
  onSyncUpdateTriples(e) {
@@ -4412,10 +4410,10 @@ class ju {
4412
4410
  const _ = [];
4413
4411
  for (const g of c.sort().reverse())
4414
4412
  _.push(p[g].entity), p.splice(g, 1);
4415
- const T = Au(a, this.createStore);
4416
- ku(a, T, p), this.notifyCbs(o, {
4413
+ const w = Au(a, this.createStore);
4414
+ ku(a, w, p), this.notifyCbs(o, {
4417
4415
  type: ve.SyncTransaction,
4418
- data: Tt(a, (i = a.values) === null || i === void 0 ? void 0 : i.entities),
4416
+ data: wt(a, (i = a.values) === null || i === void 0 ? void 0 : i.entities),
4419
4417
  added: b,
4420
4418
  removed: _,
4421
4419
  updated: y
@@ -4592,7 +4590,7 @@ class Ku {
4592
4590
  }, this.notifyQueryError = (d, c) => {
4593
4591
  (this.queryCbs[d] || []).forEach((l) => l.cb({ error: c }));
4594
4592
  }, this.pushTx = (d) => {
4595
- this.config.disableValidation || Tu(d, this.config.schema);
4593
+ this.config.disableValidation || wu(d, this.config.schema);
4596
4594
  try {
4597
4595
  const c = qa({
4598
4596
  attrs: this.optimisticAttrs(),
@@ -4717,7 +4715,7 @@ class Ku {
4717
4715
  this.kv.waitForKeyToLoad("pendingMutations").then(() => this.notifyOne(e));
4718
4716
  }
4719
4717
  _initStorage(e) {
4720
- this.querySubs = new wn({
4718
+ this.querySubs = new Tn({
4721
4719
  persister: new e(this.config.appId, "querySubs"),
4722
4720
  merge: Nu,
4723
4721
  serialize: Uu,
@@ -4737,7 +4735,7 @@ class Ku {
4737
4735
  maxSize: 1e6
4738
4736
  // 1 million triples
4739
4737
  }
4740
- }), this.querySubs.onKeyLoaded = (n) => this._onQuerySubLoaded(n), this.kv = new wn({
4738
+ }), this.querySubs.onKeyLoaded = (n) => this._onQuerySubLoaded(n), this.kv = new Tn({
4741
4739
  persister: new e(this.config.appId, "kv"),
4742
4740
  merge: this._onMergeKv,
4743
4741
  serialize: Fu,
@@ -4813,7 +4811,7 @@ class Ku {
4813
4811
  const { q: l, result: p } = n, y = z(l);
4814
4812
  if (!this._hasQueryListeners() && !this.querySubs.currentValue[y])
4815
4813
  break;
4816
- const b = (o = (s = p == null ? void 0 : p[0]) === null || s === void 0 ? void 0 : s.data) === null || o === void 0 ? void 0 : o["page-info"], _ = (u = (a = p == null ? void 0 : p[0]) === null || a === void 0 ? void 0 : a.data) === null || u === void 0 ? void 0 : u.aggregate, T = Fr(p), g = Et(this.attrs, T, d, this._linkIndex, this.config.useDateObjects);
4814
+ const b = (o = (s = p == null ? void 0 : p[0]) === null || s === void 0 ? void 0 : s.data) === null || o === void 0 ? void 0 : o["page-info"], _ = (u = (a = p == null ? void 0 : p[0]) === null || a === void 0 ? void 0 : a.data) === null || u === void 0 ? void 0 : u.aggregate, w = Fr(p), g = Et(this.attrs, w, d, this._linkIndex, this.config.useDateObjects);
4817
4815
  this.querySubs.updateInPlace((m) => {
4818
4816
  if (!m[y]) {
4819
4817
  this._log.info("Missing value in querySubs", { hash: y, q: l });
@@ -4851,12 +4849,12 @@ class Ku {
4851
4849
  b !== this._pendingMutations() && this.kv.updateInPlace((g) => {
4852
4850
  g.pendingMutations = b;
4853
4851
  });
4854
- const _ = Zr(b.entries()), T = l.map((g) => {
4852
+ const _ = Zr(b.entries()), w = l.map((g) => {
4855
4853
  var m, E, S, I;
4856
4854
  const x = g["instaql-query"], B = g["instaql-result"], Ve = z(x), lt = Fr(B), Ft = Et(this.attrs, lt, d, this._linkIndex, this.config.useDateObjects), Nt = this._applyOptimisticUpdates(Ft, _, y), ht = (E = (m = B == null ? void 0 : B[0]) === null || m === void 0 ? void 0 : m.data) === null || E === void 0 ? void 0 : E["page-info"], ce = (I = (S = B == null ? void 0 : B[0]) === null || S === void 0 ? void 0 : S.data) === null || I === void 0 ? void 0 : I.aggregate;
4857
4855
  return { q: x, hash: Ve, store: Nt, pageInfo: ht, aggregate: ce };
4858
4856
  });
4859
- T.forEach(({ hash: g, q: m, store: E, pageInfo: S, aggregate: I }) => {
4857
+ w.forEach(({ hash: g, q: m, store: E, pageInfo: S, aggregate: I }) => {
4860
4858
  this.querySubs.updateInPlace((x) => {
4861
4859
  if (!x[g]) {
4862
4860
  this._log.error("Missing value in querySubs", { hash: g, q: m });
@@ -4864,7 +4862,7 @@ class Ku {
4864
4862
  }
4865
4863
  x[g].result = { store: E, pageInfo: S, aggregate: I, processedTxId: y };
4866
4864
  });
4867
- }), this._cleanupPendingMutationsQueries(), T.forEach(({ hash: g }) => {
4865
+ }), this._cleanupPendingMutationsQueries(), w.forEach(({ hash: g }) => {
4868
4866
  this.notifyOne(g);
4869
4867
  });
4870
4868
  break;
@@ -4875,10 +4873,10 @@ class Ku {
4875
4873
  const b = this._rewriteMutations(this.attrs, this._pendingMutations()).get(l);
4876
4874
  if (!b)
4877
4875
  break;
4878
- this._updatePendingMutations((T) => {
4879
- T.set(l, Object.assign(Object.assign({}, T.get(l)), { "tx-id": p, confirmed: Date.now() }));
4876
+ this._updatePendingMutations((w) => {
4877
+ w.set(l, Object.assign(Object.assign({}, w.get(l)), { "tx-id": p, confirmed: Date.now() }));
4880
4878
  });
4881
- const _ = b["tx-steps"].filter(([T, ...g]) => T === "add-attr").map(([T, g]) => g).concat(Object.values(this.attrs));
4879
+ const _ = b["tx-steps"].filter(([w, ...g]) => w === "add-attr").map(([w, g]) => g).concat(Object.values(this.attrs));
4882
4880
  this._setAttrs(_), this._finishTransaction("synced", l), this._cleanupPendingMutationsTimeout();
4883
4881
  break;
4884
4882
  }
@@ -5075,15 +5073,15 @@ class Ku {
5075
5073
  for (const p of c) {
5076
5074
  const [y] = p;
5077
5075
  if (y === "add-attr") {
5078
- const [_, T] = p, g = i(T);
5079
- if (g && T.id !== g.id) {
5080
- o.attrIdMap[T.id] = g.id, a = !0;
5076
+ const [_, w] = p, g = i(w);
5077
+ if (g && w.id !== g.id) {
5078
+ o.attrIdMap[w.id] = g.id, a = !0;
5081
5079
  continue;
5082
5080
  }
5083
- if (T["value-type"] === "ref") {
5084
- const m = s(T);
5081
+ if (w["value-type"] === "ref") {
5082
+ const m = s(w);
5085
5083
  if (m) {
5086
- o.attrIdMap[T.id] = m.id, o.refSwapAttrIds.add(T.id), a = !0;
5084
+ o.attrIdMap[w.id] = m.id, o.refSwapAttrIds.add(w.id), a = !0;
5087
5085
  continue;
5088
5086
  }
5089
5087
  }
@@ -5140,7 +5138,7 @@ class Ku {
5140
5138
  }
5141
5139
  _applyOptimisticUpdates(e, n, r) {
5142
5140
  for (const [i, s] of n)
5143
- (!s["tx-id"] || r && s["tx-id"] > r) && (e = wo(e, s["tx-steps"]));
5141
+ (!s["tx-id"] || r && s["tx-id"] > r) && (e = To(e, s["tx-steps"]));
5144
5142
  return e;
5145
5143
  }
5146
5144
  /** Re-compute all subscriptions */
@@ -5665,7 +5663,7 @@ class Ku {
5665
5663
  Sr(d, c, l);
5666
5664
  break;
5667
5665
  case "-":
5668
- Ti(d, c);
5666
+ wi(d, c);
5669
5667
  break;
5670
5668
  }
5671
5669
  delete d[this._sessionId];
@@ -5945,7 +5943,7 @@ function oc() {
5945
5943
  var t;
5946
5944
  return globalThis.__instantDbStore = (t = globalThis.__instantDbStore) !== null && t !== void 0 ? t : {}, globalThis.__instantDbStore;
5947
5945
  }
5948
- function Tn(t) {
5946
+ function wn(t) {
5949
5947
  const e = t.__adminToken;
5950
5948
  return t.appId + "_" + (t.websocketURI || "default_ws_uri") + "_" + (t.apiURI || "default_api_uri") + "_" + (e || "client_only") + "_" + t.useDateObjects;
5951
5949
  }
@@ -6106,7 +6104,7 @@ class dc {
6106
6104
  };
6107
6105
  }
6108
6106
  shutdown() {
6109
- delete mn[Tn(this._reactor.config)], this._reactor.shutdown();
6107
+ delete mn[wn(this._reactor.config)], this._reactor.shutdown();
6110
6108
  }
6111
6109
  /**
6112
6110
  * Use this for one-off queries.
@@ -6152,11 +6150,11 @@ function fc(t, e) {
6152
6150
  return ei(t._reactor.config.schema) !== ei(e);
6153
6151
  }
6154
6152
  function lc(t, e, n, r, i) {
6155
- const s = mn[Tn(t)];
6153
+ const s = mn[wn(t)];
6156
6154
  if (s)
6157
6155
  return fc(s, t.schema) && s._reactor.updateSchema(t.schema), s;
6158
6156
  const o = new Ku(Object.assign(Object.assign(Object.assign({}, ic), t), { cardinalityInference: !!t.schema }), e || Ki, n || qi, Object.assign(Object.assign({}, r || {}), { "@instantdb/core": Bn }), i), a = new dc(o);
6159
- return mn[Tn(t)] = a, hc(t.appId, t.devtool), a;
6157
+ return mn[wn(t)] = a, hc(t.appId, t.devtool), a;
6160
6158
  }
6161
6159
  function hc(t, e) {
6162
6160
  if (typeof window > "u" || typeof window.location > "u" || typeof document > "u" || typeof e == "boolean" && !e)
@@ -6204,28 +6202,28 @@ function yc() {
6204
6202
  */
6205
6203
  return t.NODE_ENV !== "production" && function() {
6206
6204
  var e = ci, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), b = Symbol.iterator, _ = "@@iterator";
6207
- function T(h) {
6205
+ function w(h) {
6208
6206
  if (h === null || typeof h != "object")
6209
6207
  return null;
6210
- var w = b && h[b] || h[_];
6211
- return typeof w == "function" ? w : null;
6208
+ var T = b && h[b] || h[_];
6209
+ return typeof T == "function" ? T : null;
6212
6210
  }
6213
6211
  var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
6214
6212
  function m(h) {
6215
6213
  {
6216
- for (var w = arguments.length, v = new Array(w > 1 ? w - 1 : 0), O = 1; O < w; O++)
6214
+ for (var T = arguments.length, v = new Array(T > 1 ? T - 1 : 0), O = 1; O < T; O++)
6217
6215
  v[O - 1] = arguments[O];
6218
6216
  E("error", h, v);
6219
6217
  }
6220
6218
  }
6221
- function E(h, w, v) {
6219
+ function E(h, T, v) {
6222
6220
  {
6223
6221
  var O = g.ReactDebugCurrentFrame, P = O.getStackAddendum();
6224
- P !== "" && (w += "%s", v = v.concat([P]));
6222
+ P !== "" && (T += "%s", v = v.concat([P]));
6225
6223
  var M = v.map(function(C) {
6226
6224
  return String(C);
6227
6225
  });
6228
- M.unshift("Warning: " + w), Function.prototype.apply.call(console[h], console, M);
6226
+ M.unshift("Warning: " + T), Function.prototype.apply.call(console[h], console, M);
6229
6227
  }
6230
6228
  }
6231
6229
  var S = !1, I = !1, x = !1, B = !1, Ve = !1, lt;
@@ -6237,11 +6235,11 @@ function yc() {
6237
6235
  // with.
6238
6236
  h.$$typeof === lt || h.getModuleId !== void 0));
6239
6237
  }
6240
- function Nt(h, w, v) {
6238
+ function Nt(h, T, v) {
6241
6239
  var O = h.displayName;
6242
6240
  if (O)
6243
6241
  return O;
6244
- var P = w.displayName || w.name || "";
6242
+ var P = T.displayName || T.name || "";
6245
6243
  return P !== "" ? v + "(" + P + ")" : v;
6246
6244
  }
6247
6245
  function ht(h) {
@@ -6271,8 +6269,8 @@ function yc() {
6271
6269
  if (typeof h == "object")
6272
6270
  switch (h.$$typeof) {
6273
6271
  case u:
6274
- var w = h;
6275
- return ht(w) + ".Consumer";
6272
+ var T = h;
6273
+ return ht(T) + ".Consumer";
6276
6274
  case a:
6277
6275
  var v = h;
6278
6276
  return ht(v._context) + ".Provider";
@@ -6292,7 +6290,7 @@ function yc() {
6292
6290
  }
6293
6291
  return null;
6294
6292
  }
6295
- var Te = Object.assign, Be = 0, Hn, Yn, Jn, Zn, Xn, er, tr;
6293
+ var we = Object.assign, Be = 0, Hn, Yn, Jn, Zn, Xn, er, tr;
6296
6294
  function nr() {
6297
6295
  }
6298
6296
  nr.__reactDisabledLog = !0;
@@ -6328,25 +6326,25 @@ function yc() {
6328
6326
  writable: !0
6329
6327
  };
6330
6328
  Object.defineProperties(console, {
6331
- log: Te({}, h, {
6329
+ log: we({}, h, {
6332
6330
  value: Hn
6333
6331
  }),
6334
- info: Te({}, h, {
6332
+ info: we({}, h, {
6335
6333
  value: Yn
6336
6334
  }),
6337
- warn: Te({}, h, {
6335
+ warn: we({}, h, {
6338
6336
  value: Jn
6339
6337
  }),
6340
- error: Te({}, h, {
6338
+ error: we({}, h, {
6341
6339
  value: Zn
6342
6340
  }),
6343
- group: Te({}, h, {
6341
+ group: we({}, h, {
6344
6342
  value: Xn
6345
6343
  }),
6346
- groupCollapsed: Te({}, h, {
6344
+ groupCollapsed: we({}, h, {
6347
6345
  value: er
6348
6346
  }),
6349
- groupEnd: Te({}, h, {
6347
+ groupEnd: we({}, h, {
6350
6348
  value: tr
6351
6349
  })
6352
6350
  });
@@ -6355,7 +6353,7 @@ function yc() {
6355
6353
  }
6356
6354
  }
6357
6355
  var Kt = g.ReactCurrentDispatcher, qt;
6358
- function pt(h, w, v) {
6356
+ function pt(h, T, v) {
6359
6357
  {
6360
6358
  if (qt === void 0)
6361
6359
  try {
@@ -6373,7 +6371,7 @@ function yc() {
6373
6371
  var ns = typeof WeakMap == "function" ? WeakMap : Map;
6374
6372
  yt = new ns();
6375
6373
  }
6376
- function rr(h, w) {
6374
+ function rr(h, T) {
6377
6375
  if (!h || Wt)
6378
6376
  return "";
6379
6377
  {
@@ -6388,7 +6386,7 @@ function yc() {
6388
6386
  var M;
6389
6387
  M = Kt.current, Kt.current = null, es();
6390
6388
  try {
6391
- if (w) {
6389
+ if (T) {
6392
6390
  var C = function() {
6393
6391
  throw Error();
6394
6392
  };
@@ -6444,14 +6442,14 @@ function yc() {
6444
6442
  var Ie = h ? h.displayName || h.name : "", me = Ie ? pt(Ie) : "";
6445
6443
  return typeof h == "function" && yt.set(h, me), me;
6446
6444
  }
6447
- function rs(h, w, v) {
6445
+ function rs(h, T, v) {
6448
6446
  return rr(h, !1);
6449
6447
  }
6450
6448
  function is(h) {
6451
- var w = h.prototype;
6452
- return !!(w && w.isReactComponent);
6449
+ var T = h.prototype;
6450
+ return !!(T && T.isReactComponent);
6453
6451
  }
6454
- function bt(h, w, v) {
6452
+ function bt(h, T, v) {
6455
6453
  if (h == null)
6456
6454
  return "";
6457
6455
  if (typeof h == "function")
@@ -6469,11 +6467,11 @@ function yc() {
6469
6467
  case d:
6470
6468
  return rs(h.render);
6471
6469
  case l:
6472
- return bt(h.type, w, v);
6470
+ return bt(h.type, T, v);
6473
6471
  case p: {
6474
6472
  var O = h, P = O._payload, M = O._init;
6475
6473
  try {
6476
- return bt(M(P), w, v);
6474
+ return bt(M(P), T, v);
6477
6475
  } catch {
6478
6476
  }
6479
6477
  }
@@ -6483,12 +6481,12 @@ function yc() {
6483
6481
  var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = g.ReactDebugCurrentFrame;
6484
6482
  function _t(h) {
6485
6483
  if (h) {
6486
- var w = h._owner, v = bt(h.type, h._source, w ? w.type : null);
6484
+ var T = h._owner, v = bt(h.type, h._source, T ? T.type : null);
6487
6485
  sr.setExtraStackFrame(v);
6488
6486
  } else
6489
6487
  sr.setExtraStackFrame(null);
6490
6488
  }
6491
- function ss(h, w, v, O, P) {
6489
+ function ss(h, T, v, O, P) {
6492
6490
  {
6493
6491
  var M = Function.call.bind(Ge);
6494
6492
  for (var C in h)
@@ -6499,7 +6497,7 @@ function yc() {
6499
6497
  var G = Error((O || "React class") + ": " + v + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
6500
6498
  throw G.name = "Invariant Violation", G;
6501
6499
  }
6502
- k = h[C](w, C, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
6500
+ k = h[C](T, C, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
6503
6501
  } catch (D) {
6504
6502
  k = D;
6505
6503
  }
@@ -6513,7 +6511,7 @@ function yc() {
6513
6511
  }
6514
6512
  function as(h) {
6515
6513
  {
6516
- var w = typeof Symbol == "function" && Symbol.toStringTag, v = w && h[Symbol.toStringTag] || h.constructor.name || "Object";
6514
+ var T = typeof Symbol == "function" && Symbol.toStringTag, v = T && h[Symbol.toStringTag] || h.constructor.name || "Object";
6517
6515
  return v;
6518
6516
  }
6519
6517
  }
@@ -6539,27 +6537,27 @@ function yc() {
6539
6537
  }, cr, dr;
6540
6538
  function ds(h) {
6541
6539
  if (Ge.call(h, "ref")) {
6542
- var w = Object.getOwnPropertyDescriptor(h, "ref").get;
6543
- if (w && w.isReactWarning)
6540
+ var T = Object.getOwnPropertyDescriptor(h, "ref").get;
6541
+ if (T && T.isReactWarning)
6544
6542
  return !1;
6545
6543
  }
6546
6544
  return h.ref !== void 0;
6547
6545
  }
6548
6546
  function fs(h) {
6549
6547
  if (Ge.call(h, "key")) {
6550
- var w = Object.getOwnPropertyDescriptor(h, "key").get;
6551
- if (w && w.isReactWarning)
6548
+ var T = Object.getOwnPropertyDescriptor(h, "key").get;
6549
+ if (T && T.isReactWarning)
6552
6550
  return !1;
6553
6551
  }
6554
6552
  return h.key !== void 0;
6555
6553
  }
6556
- function ls(h, w) {
6554
+ function ls(h, T) {
6557
6555
  typeof h.ref == "string" && ur.current;
6558
6556
  }
6559
- function hs(h, w) {
6557
+ function hs(h, T) {
6560
6558
  {
6561
6559
  var v = function() {
6562
- cr || (cr = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", w));
6560
+ cr || (cr = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
6563
6561
  };
6564
6562
  v.isReactWarning = !0, Object.defineProperty(h, "key", {
6565
6563
  get: v,
@@ -6567,10 +6565,10 @@ function yc() {
6567
6565
  });
6568
6566
  }
6569
6567
  }
6570
- function ps(h, w) {
6568
+ function ps(h, T) {
6571
6569
  {
6572
6570
  var v = function() {
6573
- dr || (dr = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", w));
6571
+ dr || (dr = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
6574
6572
  };
6575
6573
  v.isReactWarning = !0, Object.defineProperty(h, "ref", {
6576
6574
  get: v,
@@ -6578,13 +6576,13 @@ function yc() {
6578
6576
  });
6579
6577
  }
6580
6578
  }
6581
- var ys = function(h, w, v, O, P, M, C) {
6579
+ var ys = function(h, T, v, O, P, M, C) {
6582
6580
  var k = {
6583
6581
  // This tag allows us to uniquely identify this as a React Element
6584
6582
  $$typeof: n,
6585
6583
  // Built-in properties that belong on the element
6586
6584
  type: h,
6587
- key: w,
6585
+ key: T,
6588
6586
  ref: v,
6589
6587
  props: C,
6590
6588
  // Record the component responsible for creating this element.
@@ -6607,12 +6605,12 @@ function yc() {
6607
6605
  value: P
6608
6606
  }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
6609
6607
  };
6610
- function bs(h, w, v, O, P) {
6608
+ function bs(h, T, v, O, P) {
6611
6609
  {
6612
6610
  var M, C = {}, k = null, G = null;
6613
- v !== void 0 && (ar(v), k = "" + v), fs(w) && (ar(w.key), k = "" + w.key), ds(w) && (G = w.ref, ls(w, P));
6614
- for (M in w)
6615
- Ge.call(w, M) && !cs.hasOwnProperty(M) && (C[M] = w[M]);
6611
+ v !== void 0 && (ar(v), k = "" + v), fs(T) && (ar(T.key), k = "" + T.key), ds(T) && (G = T.ref, ls(T, P));
6612
+ for (M in T)
6613
+ Ge.call(T, M) && !cs.hasOwnProperty(M) && (C[M] = T[M]);
6616
6614
  if (h && h.defaultProps) {
6617
6615
  var D = h.defaultProps;
6618
6616
  for (M in D)
@@ -6628,7 +6626,7 @@ function yc() {
6628
6626
  var Vt = g.ReactCurrentOwner, fr = g.ReactDebugCurrentFrame;
6629
6627
  function Pe(h) {
6630
6628
  if (h) {
6631
- var w = h._owner, v = bt(h.type, h._source, w ? w.type : null);
6629
+ var T = h._owner, v = bt(h.type, h._source, T ? T.type : null);
6632
6630
  fr.setExtraStackFrame(v);
6633
6631
  } else
6634
6632
  fr.setExtraStackFrame(null);
@@ -6656,22 +6654,22 @@ Check the render method of \`` + h + "`.";
6656
6654
  var hr = {};
6657
6655
  function gs(h) {
6658
6656
  {
6659
- var w = lr();
6660
- if (!w) {
6657
+ var T = lr();
6658
+ if (!T) {
6661
6659
  var v = typeof h == "string" ? h : h.displayName || h.name;
6662
- v && (w = `
6660
+ v && (T = `
6663
6661
 
6664
6662
  Check the top-level render call using <` + v + ">.");
6665
6663
  }
6666
- return w;
6664
+ return T;
6667
6665
  }
6668
6666
  }
6669
- function pr(h, w) {
6667
+ function pr(h, T) {
6670
6668
  {
6671
6669
  if (!h._store || h._store.validated || h.key != null)
6672
6670
  return;
6673
6671
  h._store.validated = !0;
6674
- var v = gs(w);
6672
+ var v = gs(T);
6675
6673
  if (hr[v])
6676
6674
  return;
6677
6675
  hr[v] = !0;
@@ -6679,54 +6677,54 @@ Check the top-level render call using <` + v + ">.");
6679
6677
  h && h._owner && h._owner !== Vt.current && (O = " It was passed a child from " + ce(h._owner.type) + "."), Pe(h), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, O), Pe(null);
6680
6678
  }
6681
6679
  }
6682
- function yr(h, w) {
6680
+ function yr(h, T) {
6683
6681
  {
6684
6682
  if (typeof h != "object")
6685
6683
  return;
6686
6684
  if (zt(h))
6687
6685
  for (var v = 0; v < h.length; v++) {
6688
6686
  var O = h[v];
6689
- Gt(O) && pr(O, w);
6687
+ Gt(O) && pr(O, T);
6690
6688
  }
6691
6689
  else if (Gt(h))
6692
6690
  h._store && (h._store.validated = !0);
6693
6691
  else if (h) {
6694
- var P = T(h);
6692
+ var P = w(h);
6695
6693
  if (typeof P == "function" && P !== h.entries)
6696
6694
  for (var M = P.call(h), C; !(C = M.next()).done; )
6697
- Gt(C.value) && pr(C.value, w);
6695
+ Gt(C.value) && pr(C.value, T);
6698
6696
  }
6699
6697
  }
6700
6698
  }
6701
- function ws(h) {
6699
+ function Ts(h) {
6702
6700
  {
6703
- var w = h.type;
6704
- if (w == null || typeof w == "string")
6701
+ var T = h.type;
6702
+ if (T == null || typeof T == "string")
6705
6703
  return;
6706
6704
  var v;
6707
- if (typeof w == "function")
6708
- v = w.propTypes;
6709
- else if (typeof w == "object" && (w.$$typeof === d || // Note: Memo only checks outer props here.
6705
+ if (typeof T == "function")
6706
+ v = T.propTypes;
6707
+ else if (typeof T == "object" && (T.$$typeof === d || // Note: Memo only checks outer props here.
6710
6708
  // Inner props are checked in the reconciler.
6711
- w.$$typeof === l))
6712
- v = w.propTypes;
6709
+ T.$$typeof === l))
6710
+ v = T.propTypes;
6713
6711
  else
6714
6712
  return;
6715
6713
  if (v) {
6716
- var O = ce(w);
6714
+ var O = ce(T);
6717
6715
  ss(v, h.props, "prop", O, h);
6718
- } else if (w.PropTypes !== void 0 && !Bt) {
6716
+ } else if (T.PropTypes !== void 0 && !Bt) {
6719
6717
  Bt = !0;
6720
- var P = ce(w);
6718
+ var P = ce(T);
6721
6719
  m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
6722
6720
  }
6723
- typeof w.getDefaultProps == "function" && !w.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
6721
+ typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
6724
6722
  }
6725
6723
  }
6726
- function Ts(h) {
6724
+ function ws(h) {
6727
6725
  {
6728
- for (var w = Object.keys(h.props), v = 0; v < w.length; v++) {
6729
- var O = w[v];
6726
+ for (var T = Object.keys(h.props), v = 0; v < T.length; v++) {
6727
+ var O = T[v];
6730
6728
  if (O !== "children" && O !== "key") {
6731
6729
  Pe(h), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), Pe(null);
6732
6730
  break;
@@ -6736,7 +6734,7 @@ Check the top-level render call using <` + v + ">.");
6736
6734
  }
6737
6735
  }
6738
6736
  var br = {};
6739
- function _r(h, w, v, O, P, M) {
6737
+ function _r(h, T, v, O, P, M) {
6740
6738
  {
6741
6739
  var C = Ft(h);
6742
6740
  if (!C) {
@@ -6747,11 +6745,11 @@ Check the top-level render call using <` + v + ">.");
6747
6745
  var D;
6748
6746
  h === null ? D = "null" : zt(h) ? D = "array" : h !== void 0 && h.$$typeof === n ? (D = "<" + (ce(h.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : D = typeof h, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, k);
6749
6747
  }
6750
- var L = bs(h, w, v, P, M);
6748
+ var L = bs(h, T, v, P, M);
6751
6749
  if (L == null)
6752
6750
  return L;
6753
6751
  if (C) {
6754
- var re = w.children;
6752
+ var re = T.children;
6755
6753
  if (re !== void 0)
6756
6754
  if (O)
6757
6755
  if (zt(re)) {
@@ -6763,8 +6761,8 @@ Check the top-level render call using <` + v + ">.");
6763
6761
  else
6764
6762
  yr(re, h);
6765
6763
  }
6766
- if (Ge.call(w, "key")) {
6767
- var me = ce(h), Y = Object.keys(w).filter(function(As) {
6764
+ if (Ge.call(T, "key")) {
6765
+ var me = ce(h), Y = Object.keys(T).filter(function(As) {
6768
6766
  return As !== "key";
6769
6767
  }), Qt = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
6770
6768
  if (!br[me + Qt]) {
@@ -6777,14 +6775,14 @@ React keys must be passed directly to JSX without using spread:
6777
6775
  <%s key={someKey} {...props} />`, Qt, me, Es, me), br[me + Qt] = !0;
6778
6776
  }
6779
6777
  }
6780
- return h === i ? Ts(L) : ws(L), L;
6778
+ return h === i ? ws(L) : Ts(L), L;
6781
6779
  }
6782
6780
  }
6783
- function ms(h, w, v) {
6784
- return _r(h, w, v, !0);
6781
+ function ms(h, T, v) {
6782
+ return _r(h, T, v, !0);
6785
6783
  }
6786
- function vs(h, w, v) {
6787
- return _r(h, w, v, !1);
6784
+ function vs(h, T, v) {
6785
+ return _r(h, T, v, !1);
6788
6786
  }
6789
6787
  var Ss = vs, Os = ms;
6790
6788
  Ye.Fragment = i, Ye.jsx = Ss, Ye.jsxs = Os;
@@ -6814,7 +6812,7 @@ function gc(t, e, n) {
6814
6812
  );
6815
6813
  return { state: tn(o, () => s.current, () => _c), query: r };
6816
6814
  }
6817
- function wc() {
6815
+ function Tc() {
6818
6816
  const t = at(null);
6819
6817
  ke(() => {
6820
6818
  n();
@@ -6827,7 +6825,7 @@ function wc() {
6827
6825
  }
6828
6826
  return { set: e, clear: n };
6829
6827
  }
6830
- const Tc = 1e3;
6828
+ const wc = 1e3;
6831
6829
  function mc(t, e, n) {
6832
6830
  const r = at(n);
6833
6831
  r.current = n, ke(() => t.core._reactor.subscribeTopic(t.id, e, (s, o) => {
@@ -6865,7 +6863,7 @@ function Oc(t, e, n) {
6865
6863
  ke(() => t.core._reactor.joinRoom(t.id, e), [t.id]), ke(() => t.core._reactor.publishPresence(t.type, t.id, e), [t.type, t.id, n ?? JSON.stringify(e)]);
6866
6864
  }
6867
6865
  function Ec(t, e, n = {}) {
6868
- const r = wc(), i = Se.usePresence(t, {
6866
+ const r = Tc(), i = Se.usePresence(t, {
6869
6867
  keys: [e]
6870
6868
  }), s = nn(() => {
6871
6869
  var c;
@@ -6875,7 +6873,7 @@ function Ec(t, e, n = {}) {
6875
6873
  var f;
6876
6874
  t.core._reactor.publishPresence(t.type, t.id, {
6877
6875
  [e]: c
6878
- }), c && ((n == null ? void 0 : n.timeout) === null || (n == null ? void 0 : n.timeout) === 0 || r.set((f = n == null ? void 0 : n.timeout) !== null && f !== void 0 ? f : Tc, () => {
6876
+ }), c && ((n == null ? void 0 : n.timeout) === null || (n == null ? void 0 : n.timeout) === 0 || r.set((f = n == null ? void 0 : n.timeout) !== null && f !== void 0 ? f : wc, () => {
6879
6877
  t.core._reactor.publishPresence(t.type, t.id, {
6880
6878
  [e]: null
6881
6879
  });
@@ -7029,8 +7027,8 @@ function Pc(t) {
7029
7027
  const { onEvent: e = en, onError: n = en, onRetry: r = en, onComment: i } = t;
7030
7028
  let s = "", o = !0, a, u = "", d = "";
7031
7029
  function c(b) {
7032
- const _ = o ? b.replace(/^\xEF\xBB\xBF/, "") : b, [T, g] = Ic(`${s}${_}`);
7033
- for (const m of T)
7030
+ const _ = o ? b.replace(/^\xEF\xBB\xBF/, "") : b, [w, g] = Ic(`${s}${_}`);
7031
+ for (const m of w)
7034
7032
  f(m);
7035
7033
  s = g, o = !1;
7036
7034
  }
@@ -7045,13 +7043,13 @@ function Pc(t) {
7045
7043
  }
7046
7044
  const _ = b.indexOf(":");
7047
7045
  if (_ !== -1) {
7048
- const T = b.slice(0, _), g = b[_ + 1] === " " ? 2 : 1, m = b.slice(_ + g);
7049
- l(T, m, b);
7046
+ const w = b.slice(0, _), g = b[_ + 1] === " " ? 2 : 1, m = b.slice(_ + g);
7047
+ l(w, m, b);
7050
7048
  return;
7051
7049
  }
7052
7050
  l(b, "", b);
7053
7051
  }
7054
- function l(b, _, T) {
7052
+ function l(b, _, w) {
7055
7053
  switch (b) {
7056
7054
  case "event":
7057
7055
  d = _;
@@ -7068,7 +7066,7 @@ function Pc(t) {
7068
7066
  new ii(`Invalid \`retry\` value: "${_}"`, {
7069
7067
  type: "invalid-retry",
7070
7068
  value: _,
7071
- line: T
7069
+ line: w
7072
7070
  })
7073
7071
  );
7074
7072
  break;
@@ -7076,7 +7074,7 @@ function Pc(t) {
7076
7074
  n(
7077
7075
  new ii(
7078
7076
  `Unknown field "${b.length > 20 ? `${b.slice(0, 20)}…` : b}"`,
7079
- { type: "unknown-field", field: b, value: _, line: T }
7077
+ { type: "unknown-field", field: b, value: _, line: w }
7080
7078
  )
7081
7079
  );
7082
7080
  break;
@@ -7442,7 +7440,7 @@ function Wc({
7442
7440
  p(E, m);
7443
7441
  }
7444
7442
  }
7445
- function T(g) {
7443
+ function w(g) {
7446
7444
  f.publishPresence({
7447
7445
  [c]: void 0
7448
7446
  });
@@ -7453,7 +7451,7 @@ function Wc({
7453
7451
  onMouseMove: y,
7454
7452
  onMouseOut: b,
7455
7453
  onTouchMove: _,
7456
- onTouchEnd: T,
7454
+ onTouchEnd: w,
7457
7455
  className: r,
7458
7456
  style: {
7459
7457
  position: "relative",