@instantdb/react 0.22.75 → 0.22.76-experimental.drewh-entity-caching.19877290000.1

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.
Files changed (44) hide show
  1. package/dist/commonjs/Cursors.js +1 -1
  2. package/dist/commonjs/Cursors.js.map +1 -1
  3. package/dist/commonjs/InstantReactWebDatabase.d.ts +1 -1
  4. package/dist/commonjs/InstantReactWebDatabase.d.ts.map +1 -1
  5. package/dist/commonjs/InstantReactWebDatabase.js.map +1 -1
  6. package/dist/commonjs/__types__/typeUtils.d.ts +20 -0
  7. package/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
  8. package/dist/commonjs/__types__/typeUtils.js +5 -0
  9. package/dist/commonjs/__types__/typeUtils.js.map +1 -0
  10. package/dist/commonjs/__types__/typesTests.d.ts +2 -0
  11. package/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
  12. package/dist/commonjs/__types__/typesTests.js +53 -0
  13. package/dist/commonjs/__types__/typesTests.js.map +1 -0
  14. package/dist/commonjs/init.d.ts +3 -1
  15. package/dist/commonjs/init.d.ts.map +1 -1
  16. package/dist/commonjs/init.js +7 -2
  17. package/dist/commonjs/init.js.map +1 -1
  18. package/dist/esm/Cursors.js +1 -1
  19. package/dist/esm/Cursors.js.map +1 -1
  20. package/dist/esm/InstantReactWebDatabase.d.ts +1 -1
  21. package/dist/esm/InstantReactWebDatabase.d.ts.map +1 -1
  22. package/dist/esm/InstantReactWebDatabase.js.map +1 -1
  23. package/dist/esm/__types__/typeUtils.d.ts +20 -0
  24. package/dist/esm/__types__/typeUtils.d.ts.map +1 -0
  25. package/dist/esm/__types__/typeUtils.js +4 -0
  26. package/dist/esm/__types__/typeUtils.js.map +1 -0
  27. package/dist/esm/__types__/typesTests.d.ts +2 -0
  28. package/dist/esm/__types__/typesTests.d.ts.map +1 -0
  29. package/dist/esm/__types__/typesTests.js +51 -0
  30. package/dist/esm/__types__/typesTests.js.map +1 -0
  31. package/dist/esm/init.d.ts +3 -1
  32. package/dist/esm/init.d.ts.map +1 -1
  33. package/dist/esm/init.js +7 -2
  34. package/dist/esm/init.js.map +1 -1
  35. package/dist/standalone/index.js +251 -228
  36. package/dist/standalone/index.umd.cjs +10 -10
  37. package/package.json +6 -4
  38. package/src/Cursors.tsx +2 -2
  39. package/src/InstantReactWebDatabase.ts +4 -3
  40. package/src/__types__/typeUtils.ts +39 -0
  41. package/src/__types__/typesTests.ts +86 -0
  42. package/src/init.ts +17 -8
  43. package/tsconfig.json +3 -2
  44. package/tsconfig.test.json +5 -0
@@ -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 Tr() {
235
+ function wr() {
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 = Tr;
263
+ t.set = t.clear = t.delete = wr;
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 = Tr;
268
+ t.add = t.clear = t.delete = wr;
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), wr = (t, e, { isValuesIterator: n }) => () => {
532
+ }, Ds = Reflect.ownKeys(an), Tr = (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: wr(t, e, { isValuesIterator: !0 })
593
+ next: Tr(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: wr(t, e, {
602
+ next: Tr(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 w = be(_, r), g = j(w);
760
+ const T = be(_, r), g = j(T);
761
761
  if (g) {
762
762
  let m = g.original;
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);
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);
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 [w, g] = Fs(f, _);
893
+ const [T, 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 [w, g];
897
+ return [T, g];
898
898
  }
899
899
  let m;
900
900
  try {
901
- m = d(w);
901
+ m = d(T);
902
902
  } catch (S) {
903
- throw rn(j(w)), S;
903
+ throw rn(j(T)), S;
904
904
  }
905
905
  const E = (S) => {
906
- const I = j(w);
906
+ const I = j(T);
907
907
  if (!je(S)) {
908
- if (S !== void 0 && !ye(S, w) && (I != null && I.operated))
908
+ if (S !== void 0 && !ye(S, T) && (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 === w || S === void 0)
922
+ if (S === T || 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(w)), S;
933
+ throw rn(j(T)), 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 Ti(t, e) {
955
+ function wi(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 Ti(t, e) {
964
964
  continue;
965
965
  }
966
966
  const i = Ze(t[r]) && Ze(e[r]);
967
- n[r] = i ? Ti(t[r], e[r]) : e[r];
967
+ n[r] = i ? wi(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 wi(t, e) {
995
+ function Ti(t, e) {
996
996
  if (!t || e.length === 0)
997
997
  return;
998
998
  const [n, ...r] = e;
@@ -1001,7 +1001,7 @@ function wi(t, e) {
1001
1001
  Array.isArray(t) ? t.splice(n, 1) : delete t[n];
1002
1002
  return;
1003
1003
  }
1004
- wi(t[n], r), qs(t[n]) && delete t[n];
1004
+ Ti(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;
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;
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 = Ti(c, o), l = [
1478
+ const c = d[2], f = wi(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, 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]]);
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]]);
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,15 +1663,17 @@ 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);
1666
1668
  const i = {};
1667
1669
  for (const [s, o] of e.entries()) {
1668
1670
  const a = (r = t.eav.get(n)) === null || r === void 0 ? void 0 : r.get(o.id), u = X(a, 1);
1669
1671
  for (const d of u)
1670
1672
  i[s] = d[2];
1671
1673
  }
1672
- return i;
1674
+ return t.entityCache.set(n, i), i;
1673
1675
  }
1674
- function Te(t, e, n) {
1676
+ function we(t, e, n) {
1675
1677
  var r;
1676
1678
  return (r = t.attrIndexes.forwardIdents.get(e)) === null || r === void 0 ? void 0 : r.get(n);
1677
1679
  }
@@ -1695,7 +1697,7 @@ function go(t, e) {
1695
1697
  if (qe(t.attrs, i))
1696
1698
  return We(t.eav, [r, i]);
1697
1699
  }
1698
- function To(t, e) {
1700
+ function wo(t, e) {
1699
1701
  const n = e.filter(([r, i, s, o, a]) => {
1700
1702
  if (r !== "add-triple" && r !== "deep-merge-triple")
1701
1703
  return !0;
@@ -1716,7 +1718,7 @@ function To(t, e) {
1716
1718
  });
1717
1719
  });
1718
1720
  }
1719
- function wo(t) {
1721
+ function To(t) {
1720
1722
  return typeof t == "string" && t.startsWith("?");
1721
1723
  }
1722
1724
  function mo(t, e, n) {
@@ -1770,7 +1772,7 @@ function fn(t, e, n = [{}]) {
1770
1772
  return e.reduce((r, i) => ko(t, i, r), n);
1771
1773
  }
1772
1774
  function Wn(t, e) {
1773
- return Array.isArray(e) ? e.map((n) => Wn(t, n)) : wo(e) ? t[e] : e;
1775
+ return Array.isArray(e) ? e.map((n) => Wn(t, n)) : To(e) ? t[e] : e;
1774
1776
  }
1775
1777
  function jo(t, { find: e, where: n }) {
1776
1778
  return fn(t, n).map((i) => Wn(i, e));
@@ -1876,7 +1878,7 @@ function zo(t, e, n) {
1876
1878
  return t.map((r) => r === e ? n : r);
1877
1879
  }
1878
1880
  function Ri(t, e, n, r, i) {
1879
- const s = Te(e, n, i), o = Pi(e, n, i), a = s || o;
1881
+ const s = we(e, n, i), o = Pi(e, n, i), a = s || o;
1880
1882
  if (!a)
1881
1883
  throw new Ne(`Could not find attr for ${[n, i]}`);
1882
1884
  if (a["value-type"] !== "ref")
@@ -1965,11 +1967,11 @@ function Vo(t, e) {
1965
1967
  return e;
1966
1968
  }
1967
1969
  function Bo(t, e, n, r, i, s) {
1968
- const o = Te(e, n, i), a = Pi(e, n, i), u = o || a;
1970
+ const o = we(e, n, i), a = Pi(e, n, i), u = o || a;
1969
1971
  if (!u)
1970
1972
  throw new Ne(`No attr for etype = ${n} label = ${i}`);
1971
1973
  if (s != null && s.hasOwnProperty("$isNull")) {
1972
- const d = Te(e, n, "id");
1974
+ const d = we(e, n, "id");
1973
1975
  if (!d)
1974
1976
  throw new Ne(`No attr for etype = ${n} label = id`);
1975
1977
  return [
@@ -2076,17 +2078,17 @@ function na(t, e, { etype: n, level: r, form: i }, s) {
2076
2078
  var p, y, b;
2077
2079
  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));
2078
2080
  try {
2079
- const [w, g, m] = ta(t, e, n, r, l, u), E = Di(e, {
2080
- etype: w,
2081
+ const [T, g, m] = ta(t, e, n, r, l, u), E = Di(e, {
2082
+ etype: T,
2081
2083
  level: g,
2082
2084
  form: i[l],
2083
2085
  join: m
2084
2086
  }), S = _ ? E[0] : E;
2085
2087
  return { [l]: S };
2086
- } catch (w) {
2087
- if (w instanceof Ne)
2088
+ } catch (T) {
2089
+ if (T instanceof Ne)
2088
2090
  return { [l]: _ ? void 0 : [] };
2089
- throw w;
2091
+ throw T;
2090
2092
  }
2091
2093
  }).reduce(function(l, p) {
2092
2094
  return Object.assign(Object.assign({}, l), p);
@@ -2119,7 +2121,7 @@ function sa(t, e) {
2119
2121
  }
2120
2122
  function oa(t, e, n) {
2121
2123
  const r = Object.keys(n)[0];
2122
- return Te(t, e, r);
2124
+ return we(t, e, r);
2123
2125
  }
2124
2126
  function aa(t, e, n, r) {
2125
2127
  if (n)
@@ -2133,11 +2135,11 @@ function ua(t, e, n) {
2133
2135
  return _o(t, e);
2134
2136
  const s = /* @__PURE__ */ new Map();
2135
2137
  for (const o of n.fields) {
2136
- const a = Te(t, e, o), u = (r = a == null ? void 0 : a["forward-identity"]) === null || r === void 0 ? void 0 : r[2];
2138
+ const a = we(t, e, o), u = (r = a == null ? void 0 : a["forward-identity"]) === null || r === void 0 ? void 0 : r[2];
2137
2139
  u && Kn(a) && s.set(u, a);
2138
2140
  }
2139
2141
  if (!s.has("id")) {
2140
- const o = Te(t, e, "id"), a = (i = o == null ? void 0 : o["forward-identity"]) === null || i === void 0 ? void 0 : i[2];
2142
+ const o = we(t, e, "id"), a = (i = o == null ? void 0 : o["forward-identity"]) === null || i === void 0 ? void 0 : i[2];
2141
2143
  a && s.set(a, o);
2142
2144
  }
2143
2145
  return s;
@@ -2149,16 +2151,16 @@ function ca(t, { etype: e, pageInfo: n, dq: r, form: i }) {
2149
2151
  const f = n == null ? void 0 : n["start-cursor"], l = aa(t, e, f, a);
2150
2152
  if (l && ((o = l == null ? void 0 : l["forward-identity"]) === null || o === void 0 ? void 0 : o[2]) !== "id") {
2151
2153
  const b = l["checked-data-type"] === "date", _ = l.id;
2152
- c = c.map(([w]) => {
2154
+ c = c.map(([T]) => {
2153
2155
  var g, m, E, S, I;
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];
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];
2156
2158
  });
2157
2159
  }
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"]);
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"]);
2162
2164
  });
2163
2165
  let p = {};
2164
2166
  const y = ua(t, e, r);
@@ -2166,8 +2168,8 @@ function ca(t, { etype: e, pageInfo: n, dq: r, form: i }) {
2166
2168
  const [_] = b;
2167
2169
  if (p[_] || !u && f && l && ia(f, l, d, b))
2168
2170
  continue;
2169
- const w = bo(t, y, _);
2170
- w && (p[_] = w);
2171
+ const T = bo(t, y, _);
2172
+ T && (p[_] = T);
2171
2173
  }
2172
2174
  return p;
2173
2175
  }
@@ -2334,7 +2336,7 @@ function Ae(t, e, n) {
2334
2336
  return o === e && a === n;
2335
2337
  });
2336
2338
  }
2337
- function Ta(t) {
2339
+ function wa(t) {
2338
2340
  if (Array.isArray(t))
2339
2341
  return t;
2340
2342
  const e = Object.entries(t);
@@ -2353,7 +2355,7 @@ function bn(t) {
2353
2355
  throw new Error(`${t} is not a valid lookup attribute.`);
2354
2356
  return e;
2355
2357
  }
2356
- function wa(t, e, n) {
2358
+ function Ta(t, e, n) {
2357
2359
  if (!yn(t, e, n))
2358
2360
  return V(t, e, n);
2359
2361
  const r = bn(n), i = V(t, e, r) || Ae(t, e, r);
@@ -2362,13 +2364,13 @@ function wa(t, e, n) {
2362
2364
  return i;
2363
2365
  }
2364
2366
  function _n(t) {
2365
- return typeof t == "string" && !Mt(t) ? null : typeof t == "string" && Mt(t) ? Li(t) : Ta(t);
2367
+ return typeof t == "string" && !Mt(t) ? null : typeof t == "string" && Mt(t) ? Li(t) : wa(t);
2366
2368
  }
2367
2369
  function ee(t, e, n) {
2368
2370
  const r = _n(n);
2369
2371
  if (r === null)
2370
2372
  return n;
2371
- const [i, s] = r, o = wa(t, e, i);
2373
+ const [i, s] = r, o = Ta(t, e, i);
2372
2374
  if (!o || !o["unique?"])
2373
2375
  throw new Error(`${i} is not a unique attribute.`);
2374
2376
  return [o.id, s];
@@ -2539,7 +2541,7 @@ function Ma(t, e, n) {
2539
2541
  "checked-data-type": u
2540
2542
  };
2541
2543
  }
2542
- function Tt(t, e, n, r) {
2544
+ function wt(t, e, n, r) {
2543
2545
  const i = t ? Ma(t, e, n) : null, s = K(), a = [K(), e, n];
2544
2546
  return Object.assign(Object.assign({ id: s, "forward-identity": a, "value-type": "blob", cardinality: "one", "unique?": !1, "index?": !1, isUnsynced: !0 }, i || {}), r || {});
2545
2547
  }
@@ -2610,32 +2612,32 @@ function Ka({ attrs: t, schema: e }, n) {
2610
2612
  const b = p[0];
2611
2613
  if (y) {
2612
2614
  c(l, 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;
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;
2616
2618
  if (yn(o, g, b))
2617
2619
  c(g, bn(b));
2618
2620
  else {
2619
2621
  const m = V(o, g, b);
2620
- m || u(Tt(e, g, b, gn)), d(m);
2622
+ m || u(wt(e, g, b, gn)), d(m);
2621
2623
  }
2622
2624
  } else if (yn(o, l, b))
2623
2625
  c(l, bn(b));
2624
2626
  else {
2625
2627
  const _ = V(o, l, b);
2626
- _ || u(Tt(e, l, b, gn)), d(_);
2628
+ _ || u(wt(e, l, b, gn)), d(_);
2627
2629
  }
2628
2630
  }
2629
2631
  for (const f of n) {
2630
2632
  const [l, p, y, b] = f;
2631
2633
  if ($a.has(l)) {
2632
2634
  const _ = V(o, p, "id");
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);
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);
2639
2641
  }
2640
2642
  }
2641
2643
  }
@@ -2681,7 +2683,7 @@ class Wa {
2681
2683
  constructor(e, n) {
2682
2684
  }
2683
2685
  }
2684
- class Tn {
2686
+ class wn {
2685
2687
  constructor(e) {
2686
2688
  var n, r;
2687
2689
  this._subs = [], this._nextSave = null, this._nextGc = null, this._pendingSaveKeys = /* @__PURE__ */ new Set(), this._loadedKeys = /* @__PURE__ */ new Set(), this._version = 0, this._meta = {
@@ -2996,8 +2998,8 @@ function Qa(t, e, n) {
2996
2998
  };
2997
2999
  f[y] = g;
2998
3000
  }
2999
- const w = n.put(_, y);
3000
- i.add(w);
3001
+ const T = n.put(_, y);
3002
+ i.add(T);
3001
3003
  }
3002
3004
  const l = { objects: f }, p = n.put(l, it);
3003
3005
  i.add(p);
@@ -3032,8 +3034,8 @@ function Ha(t, e) {
3032
3034
  y.onsuccess = () => {
3033
3035
  const _ = y.result;
3034
3036
  if (_) {
3035
- const w = _.key, g = _.value;
3036
- b.push([w, g]), _.continue();
3037
+ const T = _.key, g = _.value;
3038
+ b.push([T, g]), _.continue();
3037
3039
  } else
3038
3040
  c(b);
3039
3041
  }, y.onerror = (_) => {
@@ -3550,7 +3552,7 @@ function Nr(t) {
3550
3552
  }, e;
3551
3553
  }, {});
3552
3554
  }
3553
- const Bn = "v0.22.75";
3555
+ const Bn = "v0.22.76-experimental.drewh-entity-caching.19877290000.1";
3554
3556
  function fu(t, e) {
3555
3557
  return {
3556
3558
  info: t ? (...n) => console.info(...n, e()) : () => {
@@ -3879,7 +3881,7 @@ const Hi = (t) => t.length > 0 ? t.join(", ") : "none", bu = (t, e) => new ie(`E
3879
3881
  unlink: Vr,
3880
3882
  delete: () => {
3881
3883
  }
3882
- }, Tu = (t, e) => {
3884
+ }, wu = (t, e) => {
3883
3885
  if (!e)
3884
3886
  return;
3885
3887
  const [n, r, i, s] = t;
@@ -3889,7 +3891,7 @@ const Hi = (t) => t.length > 0 ? t.join(", ") : "none", bu = (t, e) => new ie(`E
3889
3891
  throw new ie(`Entity name must be a string, but received: ${typeof r}`);
3890
3892
  const o = gu[n];
3891
3893
  o && s !== void 0 && o(r, s, e);
3892
- }, wu = (t, e) => {
3894
+ }, Tu = (t, e) => {
3893
3895
  const n = Array.isArray(t) ? t : [t];
3894
3896
  for (const r of n) {
3895
3897
  if (!r || typeof r != "object")
@@ -3899,7 +3901,7 @@ const Hi = (t) => t.length > 0 ? t.join(", ") : "none", bu = (t, e) => new ie(`E
3899
3901
  for (const i of r.__ops) {
3900
3902
  if (!Array.isArray(i))
3901
3903
  throw new ie(`Transaction operation must be an array, but received: ${typeof i}`);
3902
- Tu(i, e);
3904
+ wu(i, e);
3903
3905
  }
3904
3906
  }
3905
3907
  };
@@ -3967,22 +3969,29 @@ class mu {
3967
3969
  this.initParams || this.handleError();
3968
3970
  }, 1e4), this.conn.onmessage = (r) => {
3969
3971
  const i = JSON.parse(r.data);
3970
- if (i.op === "sse-init") {
3971
- this.initParams = {
3972
- machineId: i["machine-id"],
3973
- sessionId: i["session-id"],
3974
- sseToken: i["sse-token"]
3975
- }, this.onopen && this.onopen({ target: this }), clearTimeout(this.sseInitTimeout);
3976
- return;
3977
- }
3978
- this.onmessage && this.onmessage({
3979
- target: this,
3980
- message: i
3981
- });
3972
+ if (Array.isArray(i))
3973
+ for (const s of i)
3974
+ this.handleMessage(s);
3975
+ else
3976
+ this.handleMessage(i);
3982
3977
  }, this.conn.onerror = (r) => {
3983
3978
  this.handleError();
3984
3979
  };
3985
3980
  }
3981
+ handleMessage(e) {
3982
+ if (e.op === "sse-init") {
3983
+ this.initParams = {
3984
+ machineId: e["machine-id"],
3985
+ sessionId: e["session-id"],
3986
+ sseToken: e["sse-token"]
3987
+ }, this.onopen && this.onopen({ target: this }), clearTimeout(this.sseInitTimeout);
3988
+ return;
3989
+ }
3990
+ this.onmessage && this.onmessage({
3991
+ target: this,
3992
+ message: e
3993
+ });
3994
+ }
3986
3995
  // Runs the onerror and closes the connection
3987
3996
  handleError() {
3988
3997
  try {
@@ -4096,7 +4105,7 @@ function Zt(t, e) {
4096
4105
  }
4097
4106
  function Hr(t, e, n) {
4098
4107
  var r;
4099
- const i = (r = Te(e, t.table, "id")) === null || r === void 0 ? void 0 : r.id;
4108
+ const i = (r = we(e, t.table, "id")) === null || r === void 0 ? void 0 : r.id;
4100
4109
  if (!i)
4101
4110
  return -1;
4102
4111
  const s = We(e.eav, [n, i, n]);
@@ -4138,14 +4147,14 @@ function Eu(t, e) {
4138
4147
  }
4139
4148
  return o;
4140
4149
  }
4141
- function wt(t, e) {
4150
+ function Tt(t, e) {
4142
4151
  return { [t.table]: e.map((n) => n.entity) };
4143
4152
  }
4144
4153
  function Au(t, e) {
4145
4154
  var n;
4146
4155
  if (t.orderFieldType)
4147
4156
  return t.orderFieldType;
4148
- const r = t.orderField === "serverCreatedAt" ? "number" : (n = Te(e([]), t.table, t.orderField)) === null || n === void 0 ? void 0 : n["checked-data-type"];
4157
+ const r = t.orderField === "serverCreatedAt" ? "number" : (n = we(e([]), t.table, t.orderField)) === null || n === void 0 ? void 0 : n["checked-data-type"];
4149
4158
  return t.orderFieldType = r, r;
4150
4159
  }
4151
4160
  function ku(t, e, n) {
@@ -4171,7 +4180,7 @@ var ve;
4171
4180
  })(ve || (ve = {}));
4172
4181
  class ju {
4173
4182
  constructor(e, n, r, i, s) {
4174
- this.callbacks = {}, this.idToHash = {}, this.trySend = e, this.config = r, this.log = i, this.createStore = s, this.subs = new Tn({
4183
+ this.callbacks = {}, this.idToHash = {}, this.trySend = e, this.config = r, this.log = i, this.createStore = s, this.subs = new wn({
4175
4184
  persister: n,
4176
4185
  merge: Ou,
4177
4186
  serialize: Su,
@@ -4239,7 +4248,7 @@ class ju {
4239
4248
  if (u && u.state && u.state.txId) {
4240
4249
  this.sendResync(u, u.state, u.state.txId), !((i = u.values) === null || i === void 0) && i.entities && r && r({
4241
4250
  type: ve.LoadFromStorage,
4242
- data: wt(u, (s = u.values) === null || s === void 0 ? void 0 : s.entities)
4251
+ data: Tt(u, (s = u.values) === null || s === void 0 ? void 0 : s.entities)
4243
4252
  });
4244
4253
  return;
4245
4254
  }
@@ -4314,7 +4323,7 @@ class ju {
4314
4323
  c[s] = a, c[s].updatedAt = Date.now();
4315
4324
  }), a.values && this.notifyCbs(s, {
4316
4325
  type: ve.InitialSyncBatch,
4317
- data: wt(a, a.values.entities),
4326
+ data: Tt(a, a.values.entities),
4318
4327
  batch: o
4319
4328
  });
4320
4329
  }
@@ -4339,7 +4348,7 @@ class ju {
4339
4348
  const s = this.subs.currentValue[i];
4340
4349
  s && this.notifyCbs(i, {
4341
4350
  type: ve.InitialSyncComplete,
4342
- data: wt(s, ((n = s.values) === null || n === void 0 ? void 0 : n.entities) || [])
4351
+ data: Tt(s, ((n = s.values) === null || n === void 0 ? void 0 : n.entities) || [])
4343
4352
  });
4344
4353
  }
4345
4354
  onSyncUpdateTriples(e) {
@@ -4410,10 +4419,10 @@ class ju {
4410
4419
  const _ = [];
4411
4420
  for (const g of c.sort().reverse())
4412
4421
  _.push(p[g].entity), p.splice(g, 1);
4413
- const w = Au(a, this.createStore);
4414
- ku(a, w, p), this.notifyCbs(o, {
4422
+ const T = Au(a, this.createStore);
4423
+ ku(a, T, p), this.notifyCbs(o, {
4415
4424
  type: ve.SyncTransaction,
4416
- data: wt(a, (i = a.values) === null || i === void 0 ? void 0 : i.entities),
4425
+ data: Tt(a, (i = a.values) === null || i === void 0 ? void 0 : i.entities),
4417
4426
  added: b,
4418
4427
  removed: _,
4419
4428
  updated: y
@@ -4590,7 +4599,7 @@ class Ku {
4590
4599
  }, this.notifyQueryError = (d, c) => {
4591
4600
  (this.queryCbs[d] || []).forEach((l) => l.cb({ error: c }));
4592
4601
  }, this.pushTx = (d) => {
4593
- this.config.disableValidation || wu(d, this.config.schema);
4602
+ this.config.disableValidation || Tu(d, this.config.schema);
4594
4603
  try {
4595
4604
  const c = qa({
4596
4605
  attrs: this.optimisticAttrs(),
@@ -4647,7 +4656,11 @@ class Ku {
4647
4656
  this._log.info("[socket][message]", c.id, f, "skip; this is no longer the current transport");
4648
4657
  return;
4649
4658
  }
4650
- !this._wsOk && c.type === "ws" && (this._wsOk = !0), this._transportType = "ws", this._handleReceive(c.id, d.message);
4659
+ if (!this._wsOk && c.type === "ws" && (this._wsOk = !0), this._transportType = "ws", Array.isArray(d.message))
4660
+ for (const l of d.message)
4661
+ this._handleReceive(c.id, l);
4662
+ else
4663
+ this._handleReceive(c.id, d.message);
4651
4664
  }, this._transportOnError = (d) => {
4652
4665
  const c = d.target;
4653
4666
  if (this._transport !== c) {
@@ -4715,7 +4728,7 @@ class Ku {
4715
4728
  this.kv.waitForKeyToLoad("pendingMutations").then(() => this.notifyOne(e));
4716
4729
  }
4717
4730
  _initStorage(e) {
4718
- this.querySubs = new Tn({
4731
+ this.querySubs = new wn({
4719
4732
  persister: new e(this.config.appId, "querySubs"),
4720
4733
  merge: Nu,
4721
4734
  serialize: Uu,
@@ -4735,7 +4748,7 @@ class Ku {
4735
4748
  maxSize: 1e6
4736
4749
  // 1 million triples
4737
4750
  }
4738
- }), this.querySubs.onKeyLoaded = (n) => this._onQuerySubLoaded(n), this.kv = new Tn({
4751
+ }), this.querySubs.onKeyLoaded = (n) => this._onQuerySubLoaded(n), this.kv = new wn({
4739
4752
  persister: new e(this.config.appId, "kv"),
4740
4753
  merge: this._onMergeKv,
4741
4754
  serialize: Fu,
@@ -4811,7 +4824,7 @@ class Ku {
4811
4824
  const { q: l, result: p } = n, y = z(l);
4812
4825
  if (!this._hasQueryListeners() && !this.querySubs.currentValue[y])
4813
4826
  break;
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);
4827
+ 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);
4815
4828
  this.querySubs.updateInPlace((m) => {
4816
4829
  if (!m[y]) {
4817
4830
  this._log.info("Missing value in querySubs", { hash: y, q: l });
@@ -4849,12 +4862,12 @@ class Ku {
4849
4862
  b !== this._pendingMutations() && this.kv.updateInPlace((g) => {
4850
4863
  g.pendingMutations = b;
4851
4864
  });
4852
- const _ = Zr(b.entries()), w = l.map((g) => {
4865
+ const _ = Zr(b.entries()), T = l.map((g) => {
4853
4866
  var m, E, S, I;
4854
4867
  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;
4855
4868
  return { q: x, hash: Ve, store: Nt, pageInfo: ht, aggregate: ce };
4856
4869
  });
4857
- w.forEach(({ hash: g, q: m, store: E, pageInfo: S, aggregate: I }) => {
4870
+ T.forEach(({ hash: g, q: m, store: E, pageInfo: S, aggregate: I }) => {
4858
4871
  this.querySubs.updateInPlace((x) => {
4859
4872
  if (!x[g]) {
4860
4873
  this._log.error("Missing value in querySubs", { hash: g, q: m });
@@ -4862,7 +4875,7 @@ class Ku {
4862
4875
  }
4863
4876
  x[g].result = { store: E, pageInfo: S, aggregate: I, processedTxId: y };
4864
4877
  });
4865
- }), this._cleanupPendingMutationsQueries(), w.forEach(({ hash: g }) => {
4878
+ }), this._cleanupPendingMutationsQueries(), T.forEach(({ hash: g }) => {
4866
4879
  this.notifyOne(g);
4867
4880
  });
4868
4881
  break;
@@ -4873,10 +4886,10 @@ class Ku {
4873
4886
  const b = this._rewriteMutations(this.attrs, this._pendingMutations()).get(l);
4874
4887
  if (!b)
4875
4888
  break;
4876
- this._updatePendingMutations((w) => {
4877
- w.set(l, Object.assign(Object.assign({}, w.get(l)), { "tx-id": p, confirmed: Date.now() }));
4889
+ this._updatePendingMutations((T) => {
4890
+ T.set(l, Object.assign(Object.assign({}, T.get(l)), { "tx-id": p, confirmed: Date.now() }));
4878
4891
  });
4879
- const _ = b["tx-steps"].filter(([w, ...g]) => w === "add-attr").map(([w, g]) => g).concat(Object.values(this.attrs));
4892
+ const _ = b["tx-steps"].filter(([T, ...g]) => T === "add-attr").map(([T, g]) => g).concat(Object.values(this.attrs));
4880
4893
  this._setAttrs(_), this._finishTransaction("synced", l), this._cleanupPendingMutationsTimeout();
4881
4894
  break;
4882
4895
  }
@@ -5073,15 +5086,15 @@ class Ku {
5073
5086
  for (const p of c) {
5074
5087
  const [y] = p;
5075
5088
  if (y === "add-attr") {
5076
- const [_, w] = p, g = i(w);
5077
- if (g && w.id !== g.id) {
5078
- o.attrIdMap[w.id] = g.id, a = !0;
5089
+ const [_, T] = p, g = i(T);
5090
+ if (g && T.id !== g.id) {
5091
+ o.attrIdMap[T.id] = g.id, a = !0;
5079
5092
  continue;
5080
5093
  }
5081
- if (w["value-type"] === "ref") {
5082
- const m = s(w);
5094
+ if (T["value-type"] === "ref") {
5095
+ const m = s(T);
5083
5096
  if (m) {
5084
- o.attrIdMap[w.id] = m.id, o.refSwapAttrIds.add(w.id), a = !0;
5097
+ o.attrIdMap[T.id] = m.id, o.refSwapAttrIds.add(T.id), a = !0;
5085
5098
  continue;
5086
5099
  }
5087
5100
  }
@@ -5138,7 +5151,7 @@ class Ku {
5138
5151
  }
5139
5152
  _applyOptimisticUpdates(e, n, r) {
5140
5153
  for (const [i, s] of n)
5141
- (!s["tx-id"] || r && s["tx-id"] > r) && (e = To(e, s["tx-steps"]));
5154
+ (!s["tx-id"] || r && s["tx-id"] > r) && (e = wo(e, s["tx-steps"]));
5142
5155
  return e;
5143
5156
  }
5144
5157
  /** Re-compute all subscriptions */
@@ -5663,7 +5676,7 @@ class Ku {
5663
5676
  Sr(d, c, l);
5664
5677
  break;
5665
5678
  case "-":
5666
- wi(d, c);
5679
+ Ti(d, c);
5667
5680
  break;
5668
5681
  }
5669
5682
  delete d[this._sessionId];
@@ -5943,7 +5956,7 @@ function oc() {
5943
5956
  var t;
5944
5957
  return globalThis.__instantDbStore = (t = globalThis.__instantDbStore) !== null && t !== void 0 ? t : {}, globalThis.__instantDbStore;
5945
5958
  }
5946
- function wn(t) {
5959
+ function Tn(t) {
5947
5960
  const e = t.__adminToken;
5948
5961
  return t.appId + "_" + (t.websocketURI || "default_ws_uri") + "_" + (t.apiURI || "default_api_uri") + "_" + (e || "client_only") + "_" + t.useDateObjects;
5949
5962
  }
@@ -6104,7 +6117,7 @@ class dc {
6104
6117
  };
6105
6118
  }
6106
6119
  shutdown() {
6107
- delete mn[wn(this._reactor.config)], this._reactor.shutdown();
6120
+ delete mn[Tn(this._reactor.config)], this._reactor.shutdown();
6108
6121
  }
6109
6122
  /**
6110
6123
  * Use this for one-off queries.
@@ -6150,11 +6163,12 @@ function fc(t, e) {
6150
6163
  return ei(t._reactor.config.schema) !== ei(e);
6151
6164
  }
6152
6165
  function lc(t, e, n, r, i) {
6153
- const s = mn[wn(t)];
6154
- if (s)
6155
- return fc(s, t.schema) && s._reactor.updateSchema(t.schema), s;
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);
6157
- return mn[wn(t)] = a, hc(t.appId, t.devtool), a;
6166
+ var s;
6167
+ const o = Object.assign(Object.assign({}, t), { useDateObjects: (s = t.useDateObjects) !== null && s !== void 0 ? s : !1 }), a = mn[Tn(o)];
6168
+ if (a)
6169
+ return fc(a, o.schema) && a._reactor.updateSchema(o.schema), a;
6170
+ const u = new Ku(Object.assign(Object.assign(Object.assign({}, ic), o), { cardinalityInference: !!o.schema }), e || Ki, n || qi, Object.assign(Object.assign({}, r || {}), { "@instantdb/core": Bn }), i), d = new dc(u);
6171
+ return mn[Tn(o)] = d, hc(o.appId, o.devtool), d;
6158
6172
  }
6159
6173
  function hc(t, e) {
6160
6174
  if (typeof window > "u" || typeof window.location > "u" || typeof document > "u" || typeof e == "boolean" && !e)
@@ -6202,28 +6216,28 @@ function yc() {
6202
6216
  */
6203
6217
  return t.NODE_ENV !== "production" && function() {
6204
6218
  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";
6205
- function w(h) {
6219
+ function T(h) {
6206
6220
  if (h === null || typeof h != "object")
6207
6221
  return null;
6208
- var T = b && h[b] || h[_];
6209
- return typeof T == "function" ? T : null;
6222
+ var w = b && h[b] || h[_];
6223
+ return typeof w == "function" ? w : null;
6210
6224
  }
6211
6225
  var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
6212
6226
  function m(h) {
6213
6227
  {
6214
- for (var T = arguments.length, v = new Array(T > 1 ? T - 1 : 0), O = 1; O < T; O++)
6228
+ for (var w = arguments.length, v = new Array(w > 1 ? w - 1 : 0), O = 1; O < w; O++)
6215
6229
  v[O - 1] = arguments[O];
6216
6230
  E("error", h, v);
6217
6231
  }
6218
6232
  }
6219
- function E(h, T, v) {
6233
+ function E(h, w, v) {
6220
6234
  {
6221
6235
  var O = g.ReactDebugCurrentFrame, P = O.getStackAddendum();
6222
- P !== "" && (T += "%s", v = v.concat([P]));
6236
+ P !== "" && (w += "%s", v = v.concat([P]));
6223
6237
  var M = v.map(function(C) {
6224
6238
  return String(C);
6225
6239
  });
6226
- M.unshift("Warning: " + T), Function.prototype.apply.call(console[h], console, M);
6240
+ M.unshift("Warning: " + w), Function.prototype.apply.call(console[h], console, M);
6227
6241
  }
6228
6242
  }
6229
6243
  var S = !1, I = !1, x = !1, B = !1, Ve = !1, lt;
@@ -6235,11 +6249,11 @@ function yc() {
6235
6249
  // with.
6236
6250
  h.$$typeof === lt || h.getModuleId !== void 0));
6237
6251
  }
6238
- function Nt(h, T, v) {
6252
+ function Nt(h, w, v) {
6239
6253
  var O = h.displayName;
6240
6254
  if (O)
6241
6255
  return O;
6242
- var P = T.displayName || T.name || "";
6256
+ var P = w.displayName || w.name || "";
6243
6257
  return P !== "" ? v + "(" + P + ")" : v;
6244
6258
  }
6245
6259
  function ht(h) {
@@ -6269,8 +6283,8 @@ function yc() {
6269
6283
  if (typeof h == "object")
6270
6284
  switch (h.$$typeof) {
6271
6285
  case u:
6272
- var T = h;
6273
- return ht(T) + ".Consumer";
6286
+ var w = h;
6287
+ return ht(w) + ".Consumer";
6274
6288
  case a:
6275
6289
  var v = h;
6276
6290
  return ht(v._context) + ".Provider";
@@ -6290,7 +6304,7 @@ function yc() {
6290
6304
  }
6291
6305
  return null;
6292
6306
  }
6293
- var we = Object.assign, Be = 0, Hn, Yn, Jn, Zn, Xn, er, tr;
6307
+ var Te = Object.assign, Be = 0, Hn, Yn, Jn, Zn, Xn, er, tr;
6294
6308
  function nr() {
6295
6309
  }
6296
6310
  nr.__reactDisabledLog = !0;
@@ -6326,25 +6340,25 @@ function yc() {
6326
6340
  writable: !0
6327
6341
  };
6328
6342
  Object.defineProperties(console, {
6329
- log: we({}, h, {
6343
+ log: Te({}, h, {
6330
6344
  value: Hn
6331
6345
  }),
6332
- info: we({}, h, {
6346
+ info: Te({}, h, {
6333
6347
  value: Yn
6334
6348
  }),
6335
- warn: we({}, h, {
6349
+ warn: Te({}, h, {
6336
6350
  value: Jn
6337
6351
  }),
6338
- error: we({}, h, {
6352
+ error: Te({}, h, {
6339
6353
  value: Zn
6340
6354
  }),
6341
- group: we({}, h, {
6355
+ group: Te({}, h, {
6342
6356
  value: Xn
6343
6357
  }),
6344
- groupCollapsed: we({}, h, {
6358
+ groupCollapsed: Te({}, h, {
6345
6359
  value: er
6346
6360
  }),
6347
- groupEnd: we({}, h, {
6361
+ groupEnd: Te({}, h, {
6348
6362
  value: tr
6349
6363
  })
6350
6364
  });
@@ -6353,7 +6367,7 @@ function yc() {
6353
6367
  }
6354
6368
  }
6355
6369
  var Kt = g.ReactCurrentDispatcher, qt;
6356
- function pt(h, T, v) {
6370
+ function pt(h, w, v) {
6357
6371
  {
6358
6372
  if (qt === void 0)
6359
6373
  try {
@@ -6371,7 +6385,7 @@ function yc() {
6371
6385
  var ns = typeof WeakMap == "function" ? WeakMap : Map;
6372
6386
  yt = new ns();
6373
6387
  }
6374
- function rr(h, T) {
6388
+ function rr(h, w) {
6375
6389
  if (!h || Wt)
6376
6390
  return "";
6377
6391
  {
@@ -6386,7 +6400,7 @@ function yc() {
6386
6400
  var M;
6387
6401
  M = Kt.current, Kt.current = null, es();
6388
6402
  try {
6389
- if (T) {
6403
+ if (w) {
6390
6404
  var C = function() {
6391
6405
  throw Error();
6392
6406
  };
@@ -6442,14 +6456,14 @@ function yc() {
6442
6456
  var Ie = h ? h.displayName || h.name : "", me = Ie ? pt(Ie) : "";
6443
6457
  return typeof h == "function" && yt.set(h, me), me;
6444
6458
  }
6445
- function rs(h, T, v) {
6459
+ function rs(h, w, v) {
6446
6460
  return rr(h, !1);
6447
6461
  }
6448
6462
  function is(h) {
6449
- var T = h.prototype;
6450
- return !!(T && T.isReactComponent);
6463
+ var w = h.prototype;
6464
+ return !!(w && w.isReactComponent);
6451
6465
  }
6452
- function bt(h, T, v) {
6466
+ function bt(h, w, v) {
6453
6467
  if (h == null)
6454
6468
  return "";
6455
6469
  if (typeof h == "function")
@@ -6467,11 +6481,11 @@ function yc() {
6467
6481
  case d:
6468
6482
  return rs(h.render);
6469
6483
  case l:
6470
- return bt(h.type, T, v);
6484
+ return bt(h.type, w, v);
6471
6485
  case p: {
6472
6486
  var O = h, P = O._payload, M = O._init;
6473
6487
  try {
6474
- return bt(M(P), T, v);
6488
+ return bt(M(P), w, v);
6475
6489
  } catch {
6476
6490
  }
6477
6491
  }
@@ -6481,12 +6495,12 @@ function yc() {
6481
6495
  var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = g.ReactDebugCurrentFrame;
6482
6496
  function _t(h) {
6483
6497
  if (h) {
6484
- var T = h._owner, v = bt(h.type, h._source, T ? T.type : null);
6498
+ var w = h._owner, v = bt(h.type, h._source, w ? w.type : null);
6485
6499
  sr.setExtraStackFrame(v);
6486
6500
  } else
6487
6501
  sr.setExtraStackFrame(null);
6488
6502
  }
6489
- function ss(h, T, v, O, P) {
6503
+ function ss(h, w, v, O, P) {
6490
6504
  {
6491
6505
  var M = Function.call.bind(Ge);
6492
6506
  for (var C in h)
@@ -6497,7 +6511,7 @@ function yc() {
6497
6511
  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`.");
6498
6512
  throw G.name = "Invariant Violation", G;
6499
6513
  }
6500
- k = h[C](T, C, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
6514
+ k = h[C](w, C, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
6501
6515
  } catch (D) {
6502
6516
  k = D;
6503
6517
  }
@@ -6511,7 +6525,7 @@ function yc() {
6511
6525
  }
6512
6526
  function as(h) {
6513
6527
  {
6514
- var T = typeof Symbol == "function" && Symbol.toStringTag, v = T && h[Symbol.toStringTag] || h.constructor.name || "Object";
6528
+ var w = typeof Symbol == "function" && Symbol.toStringTag, v = w && h[Symbol.toStringTag] || h.constructor.name || "Object";
6515
6529
  return v;
6516
6530
  }
6517
6531
  }
@@ -6537,27 +6551,27 @@ function yc() {
6537
6551
  }, cr, dr;
6538
6552
  function ds(h) {
6539
6553
  if (Ge.call(h, "ref")) {
6540
- var T = Object.getOwnPropertyDescriptor(h, "ref").get;
6541
- if (T && T.isReactWarning)
6554
+ var w = Object.getOwnPropertyDescriptor(h, "ref").get;
6555
+ if (w && w.isReactWarning)
6542
6556
  return !1;
6543
6557
  }
6544
6558
  return h.ref !== void 0;
6545
6559
  }
6546
6560
  function fs(h) {
6547
6561
  if (Ge.call(h, "key")) {
6548
- var T = Object.getOwnPropertyDescriptor(h, "key").get;
6549
- if (T && T.isReactWarning)
6562
+ var w = Object.getOwnPropertyDescriptor(h, "key").get;
6563
+ if (w && w.isReactWarning)
6550
6564
  return !1;
6551
6565
  }
6552
6566
  return h.key !== void 0;
6553
6567
  }
6554
- function ls(h, T) {
6568
+ function ls(h, w) {
6555
6569
  typeof h.ref == "string" && ur.current;
6556
6570
  }
6557
- function hs(h, T) {
6571
+ function hs(h, w) {
6558
6572
  {
6559
6573
  var v = function() {
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));
6574
+ 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));
6561
6575
  };
6562
6576
  v.isReactWarning = !0, Object.defineProperty(h, "key", {
6563
6577
  get: v,
@@ -6565,10 +6579,10 @@ function yc() {
6565
6579
  });
6566
6580
  }
6567
6581
  }
6568
- function ps(h, T) {
6582
+ function ps(h, w) {
6569
6583
  {
6570
6584
  var v = function() {
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));
6585
+ 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));
6572
6586
  };
6573
6587
  v.isReactWarning = !0, Object.defineProperty(h, "ref", {
6574
6588
  get: v,
@@ -6576,13 +6590,13 @@ function yc() {
6576
6590
  });
6577
6591
  }
6578
6592
  }
6579
- var ys = function(h, T, v, O, P, M, C) {
6593
+ var ys = function(h, w, v, O, P, M, C) {
6580
6594
  var k = {
6581
6595
  // This tag allows us to uniquely identify this as a React Element
6582
6596
  $$typeof: n,
6583
6597
  // Built-in properties that belong on the element
6584
6598
  type: h,
6585
- key: T,
6599
+ key: w,
6586
6600
  ref: v,
6587
6601
  props: C,
6588
6602
  // Record the component responsible for creating this element.
@@ -6605,12 +6619,12 @@ function yc() {
6605
6619
  value: P
6606
6620
  }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
6607
6621
  };
6608
- function bs(h, T, v, O, P) {
6622
+ function bs(h, w, v, O, P) {
6609
6623
  {
6610
6624
  var M, C = {}, k = null, G = null;
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]);
6625
+ v !== void 0 && (ar(v), k = "" + v), fs(w) && (ar(w.key), k = "" + w.key), ds(w) && (G = w.ref, ls(w, P));
6626
+ for (M in w)
6627
+ Ge.call(w, M) && !cs.hasOwnProperty(M) && (C[M] = w[M]);
6614
6628
  if (h && h.defaultProps) {
6615
6629
  var D = h.defaultProps;
6616
6630
  for (M in D)
@@ -6626,7 +6640,7 @@ function yc() {
6626
6640
  var Vt = g.ReactCurrentOwner, fr = g.ReactDebugCurrentFrame;
6627
6641
  function Pe(h) {
6628
6642
  if (h) {
6629
- var T = h._owner, v = bt(h.type, h._source, T ? T.type : null);
6643
+ var w = h._owner, v = bt(h.type, h._source, w ? w.type : null);
6630
6644
  fr.setExtraStackFrame(v);
6631
6645
  } else
6632
6646
  fr.setExtraStackFrame(null);
@@ -6654,22 +6668,22 @@ Check the render method of \`` + h + "`.";
6654
6668
  var hr = {};
6655
6669
  function gs(h) {
6656
6670
  {
6657
- var T = lr();
6658
- if (!T) {
6671
+ var w = lr();
6672
+ if (!w) {
6659
6673
  var v = typeof h == "string" ? h : h.displayName || h.name;
6660
- v && (T = `
6674
+ v && (w = `
6661
6675
 
6662
6676
  Check the top-level render call using <` + v + ">.");
6663
6677
  }
6664
- return T;
6678
+ return w;
6665
6679
  }
6666
6680
  }
6667
- function pr(h, T) {
6681
+ function pr(h, w) {
6668
6682
  {
6669
6683
  if (!h._store || h._store.validated || h.key != null)
6670
6684
  return;
6671
6685
  h._store.validated = !0;
6672
- var v = gs(T);
6686
+ var v = gs(w);
6673
6687
  if (hr[v])
6674
6688
  return;
6675
6689
  hr[v] = !0;
@@ -6677,54 +6691,54 @@ Check the top-level render call using <` + v + ">.");
6677
6691
  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);
6678
6692
  }
6679
6693
  }
6680
- function yr(h, T) {
6694
+ function yr(h, w) {
6681
6695
  {
6682
6696
  if (typeof h != "object")
6683
6697
  return;
6684
6698
  if (zt(h))
6685
6699
  for (var v = 0; v < h.length; v++) {
6686
6700
  var O = h[v];
6687
- Gt(O) && pr(O, T);
6701
+ Gt(O) && pr(O, w);
6688
6702
  }
6689
6703
  else if (Gt(h))
6690
6704
  h._store && (h._store.validated = !0);
6691
6705
  else if (h) {
6692
- var P = w(h);
6706
+ var P = T(h);
6693
6707
  if (typeof P == "function" && P !== h.entries)
6694
6708
  for (var M = P.call(h), C; !(C = M.next()).done; )
6695
- Gt(C.value) && pr(C.value, T);
6709
+ Gt(C.value) && pr(C.value, w);
6696
6710
  }
6697
6711
  }
6698
6712
  }
6699
- function Ts(h) {
6713
+ function ws(h) {
6700
6714
  {
6701
- var T = h.type;
6702
- if (T == null || typeof T == "string")
6715
+ var w = h.type;
6716
+ if (w == null || typeof w == "string")
6703
6717
  return;
6704
6718
  var v;
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.
6719
+ if (typeof w == "function")
6720
+ v = w.propTypes;
6721
+ else if (typeof w == "object" && (w.$$typeof === d || // Note: Memo only checks outer props here.
6708
6722
  // Inner props are checked in the reconciler.
6709
- T.$$typeof === l))
6710
- v = T.propTypes;
6723
+ w.$$typeof === l))
6724
+ v = w.propTypes;
6711
6725
  else
6712
6726
  return;
6713
6727
  if (v) {
6714
- var O = ce(T);
6728
+ var O = ce(w);
6715
6729
  ss(v, h.props, "prop", O, h);
6716
- } else if (T.PropTypes !== void 0 && !Bt) {
6730
+ } else if (w.PropTypes !== void 0 && !Bt) {
6717
6731
  Bt = !0;
6718
- var P = ce(T);
6732
+ var P = ce(w);
6719
6733
  m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
6720
6734
  }
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.");
6735
+ typeof w.getDefaultProps == "function" && !w.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
6722
6736
  }
6723
6737
  }
6724
- function ws(h) {
6738
+ function Ts(h) {
6725
6739
  {
6726
- for (var T = Object.keys(h.props), v = 0; v < T.length; v++) {
6727
- var O = T[v];
6740
+ for (var w = Object.keys(h.props), v = 0; v < w.length; v++) {
6741
+ var O = w[v];
6728
6742
  if (O !== "children" && O !== "key") {
6729
6743
  Pe(h), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), Pe(null);
6730
6744
  break;
@@ -6734,7 +6748,7 @@ Check the top-level render call using <` + v + ">.");
6734
6748
  }
6735
6749
  }
6736
6750
  var br = {};
6737
- function _r(h, T, v, O, P, M) {
6751
+ function _r(h, w, v, O, P, M) {
6738
6752
  {
6739
6753
  var C = Ft(h);
6740
6754
  if (!C) {
@@ -6745,11 +6759,11 @@ Check the top-level render call using <` + v + ">.");
6745
6759
  var D;
6746
6760
  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);
6747
6761
  }
6748
- var L = bs(h, T, v, P, M);
6762
+ var L = bs(h, w, v, P, M);
6749
6763
  if (L == null)
6750
6764
  return L;
6751
6765
  if (C) {
6752
- var re = T.children;
6766
+ var re = w.children;
6753
6767
  if (re !== void 0)
6754
6768
  if (O)
6755
6769
  if (zt(re)) {
@@ -6761,8 +6775,8 @@ Check the top-level render call using <` + v + ">.");
6761
6775
  else
6762
6776
  yr(re, h);
6763
6777
  }
6764
- if (Ge.call(T, "key")) {
6765
- var me = ce(h), Y = Object.keys(T).filter(function(As) {
6778
+ if (Ge.call(w, "key")) {
6779
+ var me = ce(h), Y = Object.keys(w).filter(function(As) {
6766
6780
  return As !== "key";
6767
6781
  }), Qt = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
6768
6782
  if (!br[me + Qt]) {
@@ -6775,14 +6789,14 @@ React keys must be passed directly to JSX without using spread:
6775
6789
  <%s key={someKey} {...props} />`, Qt, me, Es, me), br[me + Qt] = !0;
6776
6790
  }
6777
6791
  }
6778
- return h === i ? ws(L) : Ts(L), L;
6792
+ return h === i ? Ts(L) : ws(L), L;
6779
6793
  }
6780
6794
  }
6781
- function ms(h, T, v) {
6782
- return _r(h, T, v, !0);
6795
+ function ms(h, w, v) {
6796
+ return _r(h, w, v, !0);
6783
6797
  }
6784
- function vs(h, T, v) {
6785
- return _r(h, T, v, !1);
6798
+ function vs(h, w, v) {
6799
+ return _r(h, w, v, !1);
6786
6800
  }
6787
6801
  var Ss = vs, Os = ms;
6788
6802
  Ye.Fragment = i, Ye.jsx = Ss, Ye.jsxs = Os;
@@ -6804,7 +6818,15 @@ function gc(t, e, n) {
6804
6818
  e && n && "ruleParams" in n && (e = Object.assign({ $$ruleParams: n.ruleParams }, e));
6805
6819
  const r = e ? cc(e) : null, i = z(r), s = at(ri(t._reactor.getPreviousResult(r))), o = ge(
6806
6820
  (u) => (s.current = ri(t._reactor.getPreviousResult(r)), r ? t.subscribeQuery(r, (c) => {
6807
- s.current = Object.assign({ isLoading: !c, data: void 0, pageInfo: void 0, error: void 0 }, c), u();
6821
+ s.current = Object.assign({
6822
+ isLoading: !c,
6823
+ // @ts-expect-error: ts thinks this will always be overwritten
6824
+ data: void 0,
6825
+ // @ts-expect-error: ts thinks this will always be overwritten
6826
+ pageInfo: void 0,
6827
+ // @ts-expect-error: ts thinks this will always be overwritten
6828
+ error: void 0
6829
+ }, c), u();
6808
6830
  }) : () => {
6809
6831
  }),
6810
6832
  // Build a new subscribe function if the query changes
@@ -6812,20 +6834,20 @@ function gc(t, e, n) {
6812
6834
  );
6813
6835
  return { state: tn(o, () => s.current, () => _c), query: r };
6814
6836
  }
6815
- function Tc() {
6837
+ function wc() {
6816
6838
  const t = at(null);
6817
6839
  ke(() => {
6818
6840
  n();
6819
6841
  }, []);
6820
6842
  function e(r, i) {
6821
- clearTimeout(t.current), t.current = setTimeout(i, r);
6843
+ n(), t.current = setTimeout(i, r);
6822
6844
  }
6823
6845
  function n() {
6824
- clearTimeout(t.current);
6846
+ t.current && clearTimeout(t.current);
6825
6847
  }
6826
6848
  return { set: e, clear: n };
6827
6849
  }
6828
- const wc = 1e3;
6850
+ const Tc = 1e3;
6829
6851
  function mc(t, e, n) {
6830
6852
  const r = at(n);
6831
6853
  r.current = n, ke(() => t.core._reactor.subscribeTopic(t.id, e, (s, o) => {
@@ -6863,7 +6885,7 @@ function Oc(t, e, n) {
6863
6885
  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)]);
6864
6886
  }
6865
6887
  function Ec(t, e, n = {}) {
6866
- const r = Tc(), i = Se.usePresence(t, {
6888
+ const r = wc(), i = Se.usePresence(t, {
6867
6889
  keys: [e]
6868
6890
  }), s = nn(() => {
6869
6891
  var c;
@@ -6873,7 +6895,7 @@ function Ec(t, e, n = {}) {
6873
6895
  var f;
6874
6896
  t.core._reactor.publishPresence(t.type, t.id, {
6875
6897
  [e]: c
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, () => {
6898
+ }), 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, () => {
6877
6899
  t.core._reactor.publishPresence(t.type, t.id, {
6878
6900
  [e]: null
6879
6901
  });
@@ -7027,8 +7049,8 @@ function Pc(t) {
7027
7049
  const { onEvent: e = en, onError: n = en, onRetry: r = en, onComment: i } = t;
7028
7050
  let s = "", o = !0, a, u = "", d = "";
7029
7051
  function c(b) {
7030
- const _ = o ? b.replace(/^\xEF\xBB\xBF/, "") : b, [w, g] = Ic(`${s}${_}`);
7031
- for (const m of w)
7052
+ const _ = o ? b.replace(/^\xEF\xBB\xBF/, "") : b, [T, g] = Ic(`${s}${_}`);
7053
+ for (const m of T)
7032
7054
  f(m);
7033
7055
  s = g, o = !1;
7034
7056
  }
@@ -7043,13 +7065,13 @@ function Pc(t) {
7043
7065
  }
7044
7066
  const _ = b.indexOf(":");
7045
7067
  if (_ !== -1) {
7046
- const w = b.slice(0, _), g = b[_ + 1] === " " ? 2 : 1, m = b.slice(_ + g);
7047
- l(w, m, b);
7068
+ const T = b.slice(0, _), g = b[_ + 1] === " " ? 2 : 1, m = b.slice(_ + g);
7069
+ l(T, m, b);
7048
7070
  return;
7049
7071
  }
7050
7072
  l(b, "", b);
7051
7073
  }
7052
- function l(b, _, w) {
7074
+ function l(b, _, T) {
7053
7075
  switch (b) {
7054
7076
  case "event":
7055
7077
  d = _;
@@ -7066,7 +7088,7 @@ function Pc(t) {
7066
7088
  new ii(`Invalid \`retry\` value: "${_}"`, {
7067
7089
  type: "invalid-retry",
7068
7090
  value: _,
7069
- line: w
7091
+ line: T
7070
7092
  })
7071
7093
  );
7072
7094
  break;
@@ -7074,7 +7096,7 @@ function Pc(t) {
7074
7096
  n(
7075
7097
  new ii(
7076
7098
  `Unknown field "${b.length > 20 ? `${b.slice(0, 20)}…` : b}"`,
7077
- { type: "unknown-field", field: b, value: _, line: w }
7099
+ { type: "unknown-field", field: b, value: _, line: T }
7078
7100
  )
7079
7101
  );
7080
7102
  break;
@@ -7385,12 +7407,13 @@ const Qn = class Qn extends Cc {
7385
7407
  Qn.EventSourceImpl = kt;
7386
7408
  let In = Qn;
7387
7409
  function xc(t) {
7388
- return new In(
7389
- t,
7390
- {
7391
- "@instantdb/react": Bn
7392
- }
7393
- );
7410
+ const e = {
7411
+ ...t,
7412
+ useDateObjects: t.useDateObjects ?? !1
7413
+ };
7414
+ return new In(e, {
7415
+ "@instantdb/react": Bn
7416
+ });
7394
7417
  }
7395
7418
  const qc = xc;
7396
7419
  function Wc({
@@ -7440,7 +7463,7 @@ function Wc({
7440
7463
  p(E, m);
7441
7464
  }
7442
7465
  }
7443
- function w(g) {
7466
+ function T(g) {
7444
7467
  f.publishPresence({
7445
7468
  [c]: void 0
7446
7469
  });
@@ -7451,7 +7474,7 @@ function Wc({
7451
7474
  onMouseMove: y,
7452
7475
  onMouseOut: b,
7453
7476
  onTouchMove: _,
7454
- onTouchEnd: w,
7477
+ onTouchEnd: T,
7455
7478
  className: r,
7456
7479
  style: {
7457
7480
  position: "relative",
@@ -7481,7 +7504,7 @@ function Wc({
7481
7504
  },
7482
7505
  children: a ? a({
7483
7506
  color: E.color,
7484
- presence: l.peers[g]
7507
+ presence: l == null ? void 0 : l.peers[g]
7485
7508
  }) : /* @__PURE__ */ W.jsx($c, { ...E })
7486
7509
  },
7487
7510
  g