@ebbjs/storage 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,81 +1,83 @@
1
- import { l as _e, a as Ee, f as oe, b as V, m as Me, c as se, r as Fe, w as Ne, R as Oe, i as je, d as re, e as ke, g as Se, h as ie, j as Pe, k as xe, n as J, o as H } from "../replica-record-D5gGEoVQ.js";
2
- import { p as Qe } from "../replica-record-D5gGEoVQ.js";
1
+ import { l as Ee, a as Fe, f as oe, b as K, m as Ne, c as se, d as Oe, r as xe, e as ke, w as Se, R as je, i as Ce, g as re, h as Pe, j as Ae, k as De, n as ie, o as Re, p as Le, q as Ke, s as Ve, t as B, u as Ue, v as Ye, x as J } from "../replica-record-BaptWabD.js";
2
+ import { y as st } from "../replica-record-BaptWabD.js";
3
3
  import { isFieldMap as ce } from "@ebbjs/core";
4
- const fe = (c, f) => {
5
- if (c === f) return !0;
6
- const a = ce(c), l = ce(f);
7
- if (a !== l || !a || !l) return !1;
8
- const p = Object.keys(c.map), d = Object.keys(f.map);
9
- if (p.length !== d.length) return !1;
10
- for (const h of p) {
11
- const y = c.map[h], k = f.map[h];
12
- if (y === void 0 || k === void 0 || !fe(y, k)) return !1;
4
+ const ae = (c, a) => {
5
+ if (c === a) return !0;
6
+ const u = ce(c), l = ce(a);
7
+ if (u !== l || !u || !l) return !1;
8
+ const p = Object.keys(c.map), y = Object.keys(a.map);
9
+ if (p.length !== y.length) return !1;
10
+ for (const m of p) {
11
+ const h = c.map[m], I = a.map[m];
12
+ if (h === void 0 || I === void 0 || !ae(h, I)) return !1;
13
13
  }
14
14
  return !0;
15
- }, Ae = (c, f) => {
16
- const a = Object.keys(c);
17
- if (a.length !== Object.keys(f).length) return !1;
18
- for (const l of a) {
19
- const p = c[l], d = f[l];
20
- if (p === void 0 || d === void 0 || !fe(p, d)) return !1;
15
+ }, ze = (c, a) => {
16
+ const u = Object.keys(c);
17
+ if (u.length !== Object.keys(a).length) return !1;
18
+ for (const l of u) {
19
+ const p = c[l], y = a[l];
20
+ if (p === void 0 || y === void 0 || !ae(p, y)) return !1;
21
21
  }
22
22
  return !0;
23
- }, U = (c) => c == null, Re = (c, f) => U(c) || U(f) ? U(c) !== U(f) : c.type !== f.type || c.updated_hlc !== f.updated_hlc || c.deleted_hlc !== f.deleted_hlc ? !0 : !Ae(c.data.fields, f.data.fields), Ce = {
23
+ }, V = (c) => c == null, Be = (c, a) => V(c) || V(a) ? V(c) !== V(a) : c.type !== a.type || c.exists !== a.exists || c.created_hlc !== a.created_hlc || c.updated_hlc !== a.updated_hlc || c.deleted_hlc !== a.deleted_hlc ? !0 : !ze(c.data.fields, a.data.fields), Je = {
24
24
  holds: () => !0
25
- }, De = 1024, Le = 16, Ke = 3e4, le = (c, f) => c === void 0 ? f : !Number.isFinite(c) || c <= 0 ? Number.POSITIVE_INFINITY : Math.max(1, Math.floor(c)), Ve = (c) => c === void 0 ? Ke : !Number.isFinite(c) || c <= 0 ? Number.POSITIVE_INFINITY : c, Ue = (c) => {
25
+ }, He = 1024, We = 16, Ge = 3e4, le = (c, a) => c === void 0 ? a : !Number.isFinite(c) || c <= 0 ? Number.POSITIVE_INFINITY : Math.max(1, Math.floor(c)), Qe = (c) => c === void 0 ? Ge : !Number.isFinite(c) || c <= 0 ? Number.POSITIVE_INFINITY : c, Xe = (c) => {
26
26
  typeof c == "object" && "unref" in c && typeof c.unref == "function" && c.unref();
27
- }, He = (c) => {
28
- const f = c?.materialization ?? Ce, a = (e) => f.holds(e), l = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), k = le(c?.journalCapacity, De), ae = le(c?.pinnedCapacity, Le), W = Ve(c?.pinnedTtlMs), g = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
29
- let G = 0;
27
+ }, tt = (c) => {
28
+ const a = c?.materialization ?? Je, u = (e) => a.holds(e), l = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
29
+ let y = /* @__PURE__ */ new Map();
30
+ const m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), fe = le(c?.journalCapacity, He), ue = le(c?.pinnedCapacity, We), H = Qe(c?.pinnedTtlMs), g = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map();
31
+ let W = 0;
30
32
  const E = /* @__PURE__ */ new Map();
31
- let I = [], w = 0, N = {}, m = {}, u = 0, O = 0, M = 0;
32
- const Y = /* @__PURE__ */ new Set(), F = () => {
33
- for (const e of Y)
33
+ let w = [], b = 0, O = {}, M = {}, d = 0, x = 0, F = 0;
34
+ const U = /* @__PURE__ */ new Set(), N = () => {
35
+ for (const e of U)
34
36
  try {
35
37
  e();
36
38
  } catch (t) {
37
39
  console.error("[Replica] change listener threw:", t);
38
40
  }
39
- }, P = (e, t) => {
41
+ }, C = (e, t) => {
40
42
  const s = p.get(e);
41
43
  s === void 0 ? p.set(e, /* @__PURE__ */ new Set([t])) : s.add(t);
42
- }, x = (e, t) => {
44
+ }, P = (e, t) => {
43
45
  const s = p.get(e);
44
46
  s !== void 0 && (s.delete(t), s.size === 0 && p.delete(e));
45
- }, Q = (e) => a(e.type) || g.has(e.id), A = (e) => {
47
+ }, G = (e) => u(e.type) || g.has(e.id), A = (e) => {
46
48
  const t = g.get(e);
47
49
  t !== void 0 && (t.timer !== null && clearTimeout(t.timer), g.delete(e));
48
- }, z = (e) => {
49
- v.has(e) && (v.delete(e), E.delete(e), S.set(e, ++G));
50
- }, X = (e) => {
50
+ }, Y = (e) => {
51
+ v.has(e) && (v.delete(e), E.delete(e), j.set(e, ++W));
52
+ }, Q = (e) => {
51
53
  A(e), g.set(e, { open: !0, timer: null });
52
54
  const t = [];
53
55
  for (const s of g.keys()) {
54
- if (g.size - t.length <= ae) break;
56
+ if (g.size - t.length <= ue) break;
55
57
  t.push(s);
56
58
  }
57
- t.length > 0 && j(t);
58
- }, ue = (e) => {
59
+ t.length > 0 && k(t);
60
+ }, de = (e) => {
59
61
  const t = g.get(e);
60
62
  if (!(t === void 0 || !t.open)) {
61
- if (t.open = !1, !Number.isFinite(W)) {
62
- j([e]);
63
+ if (t.open = !1, !Number.isFinite(H)) {
64
+ k([e]);
63
65
  return;
64
66
  }
65
- t.timer = setTimeout(() => j([e]), W), Ue(t.timer);
67
+ t.timer = setTimeout(() => k([e]), H), Xe(t.timer);
66
68
  }
67
- }, de = (e) => g.get(e)?.open === !0, R = (e, t, s) => {
68
- u += 1, I.push({ revision: u, id: e, type: t, deleted: s }), pe();
69
- }, Z = () => I.length - w, pe = () => {
70
- const e = Z() - k;
71
- e <= 0 || (w += e, O = I[w - 1].revision, w * 2 >= I.length && (I = I.slice(w), w = 0));
72
- }, C = (e) => h.has(e) ? h.get(e) ?? null : l.get(e) ?? null, D = (e) => h.has(e) ? h.get(e) ?? void 0 : l.get(e), $ = (e) => {
69
+ }, pe = (e) => g.get(e)?.open === !0, X = (e, t, s) => {
70
+ d += 1, w.push({ revision: d, id: e, deleted: t, components: s }), he();
71
+ }, Z = () => w.length - b, he = () => {
72
+ const e = Z() - fe;
73
+ e <= 0 || (b += e, x = w[b - 1].revision, b * 2 >= w.length && (w = w.slice(b), b = 0));
74
+ }, D = (e) => h.has(e) ? h.get(e) ?? null : l.get(e) ?? null, R = (e) => h.has(e) ? h.get(e) ?? void 0 : l.get(e), $ = (e) => {
73
75
  const t = new Set(p.get(e) ?? []);
74
76
  for (const [n, o] of h)
75
77
  o !== null && o.type === e ? t.add(n) : t.delete(n);
76
78
  const s = [];
77
79
  for (const n of t) {
78
- const o = D(n);
80
+ const o = R(n);
79
81
  o !== void 0 && s.push(o);
80
82
  }
81
83
  return s;
@@ -83,124 +85,128 @@ const fe = (c, f) => {
83
85
  const s = t.update.subject_id, n = e.get(s);
84
86
  n === void 0 ? e.set(s, [t]) : n.push(t);
85
87
  }, ee = (e, t, s, n) => {
86
- const o = e.subject_id;
87
- if (!a(e.subject_type) && !g.has(o) && v.has(o)) {
88
+ const o = e.subject_id, r = l.get(o) ?? null, i = Ue(e, r);
89
+ if (!u(i) && !g.has(o) && v.has(o)) {
88
90
  q(E, { update: e, gsn: t, hlc: s, position: n });
89
91
  return;
90
92
  }
91
- const r = l.get(o) ?? null, i = J(r, e, t, s, H);
92
- if (i === null) {
93
- if (!a(e.subject_type) && !g.has(o)) return;
94
- q(y, { update: e, gsn: t, hlc: s, position: n });
93
+ const f = B(r, e, t, s, J);
94
+ if (f === null) {
95
+ if (!u(i) && !g.has(o)) return;
96
+ q(I, { update: e, gsn: t, hlc: s, position: n });
95
97
  return;
96
98
  }
97
- if (!Q(i)) {
98
- r !== null && (l.delete(o), x(r.type, o)), e.method === "put" && y.delete(o);
99
+ if (!G(f)) {
100
+ r !== null && (l.delete(o), P(r.type, o)), r === null && I.delete(o);
99
101
  return;
100
102
  }
101
- if (l.set(o, i), r !== null && r.type !== i.type && x(r.type, o), P(i.type, o), e.method === "put") {
102
- const b = y.get(o);
103
- if (b !== void 0) {
104
- y.delete(o);
105
- const K = b.filter((_) => _.gsn > t).sort((_, Te) => _.gsn - Te.gsn);
106
- let T = i;
107
- for (const _ of K)
108
- T = J(T, _.update, _.gsn, _.hlc, H) ?? T;
109
- T !== i && (l.set(o, T), i.type !== T.type && (x(i.type, o), P(T.type, o)));
103
+ if (l.set(o, f), r !== null && r.type !== f.type && P(r.type, o), C(f.type, o), r === null) {
104
+ const S = I.get(o);
105
+ if (S !== void 0) {
106
+ I.delete(o);
107
+ const _e = S.filter((T) => T.gsn > t).sort((T, Te) => T.gsn - Te.gsn);
108
+ let _ = f;
109
+ for (const T of _e)
110
+ _ = B(_, T.update, T.gsn, T.hlc, J) ?? _;
111
+ _ !== f && (l.set(o, _), f.type !== _.type && (P(f.type, o), C(_.type, o)));
110
112
  }
111
113
  }
112
114
  }, te = (e, t) => {
113
115
  const s = e ?? void 0, n = t ?? void 0;
114
- N = ie(N, Pe(s, n)), m = ie(m, xe(s, n));
116
+ O = ie(O, Re(s, n)), M = ie(M, Le(s, n));
117
+ const o = Ke(s, n);
118
+ o !== null && (y = Ve(y, o));
115
119
  }, L = (e, t) => {
116
- const s = l.get(e) ?? null, n = d.get(e);
120
+ const s = l.get(e) ?? null, n = m.get(e);
117
121
  let o = s;
118
122
  if (n !== void 0)
119
- for (const i of n)
120
- o = J(o, i.update, 0, i.hlc, H);
121
- const r = o !== null && Q(o) ? o : null;
122
- if ((r === null || a(r.type)) && A(e), n === void 0 || n.length === 0 ? h.delete(e) : h.set(e, r), te(t, r), r === null) {
123
- o !== null ? R(e, o.type, o.deleted_hlc !== null) : t !== null && R(e, t.type, !0);
123
+ for (const f of n)
124
+ o = B(o, f.update, 0, f.hlc, J);
125
+ const r = o !== null && G(o) ? o : null;
126
+ (r === null || u(r.type)) && A(e), n === void 0 || n.length === 0 ? h.delete(e) : h.set(e, r), te(t, r);
127
+ const i = (f) => X(e, f, Ye(t, r));
128
+ if (r === null) {
129
+ o !== null ? i(o.deleted_hlc !== null) : t !== null && i(!0);
124
130
  return;
125
131
  }
126
- Re(t, r) && R(e, r.type, r.deleted_hlc !== null);
127
- }, B = (e, t) => {
128
- e.has(t) || e.set(t, C(t));
132
+ Be(t, r) && i(r.deleted_hlc !== null);
133
+ }, z = (e, t) => {
134
+ e.has(t) || e.set(t, D(t));
129
135
  }, ne = (e, t) => {
130
136
  const s = [];
131
- for (const [n, o] of d)
132
- o.some((r) => r.actionId === e) && (B(t, n), s.push(n));
137
+ for (const [n, o] of m)
138
+ o.some((r) => r.actionId === e) && (z(t, n), s.push(n));
133
139
  for (const n of s) {
134
- const r = (d.get(n) ?? []).filter((i) => i.actionId !== e);
135
- r.length === 0 ? d.delete(n) : d.set(n, r);
140
+ const r = (m.get(n) ?? []).filter((i) => i.actionId !== e);
141
+ r.length === 0 ? m.delete(n) : m.set(n, r);
136
142
  }
137
143
  return s;
138
- }, he = (e, t, s) => {
144
+ }, ge = (e, t, s) => {
139
145
  const n = /* @__PURE__ */ new Map();
140
- for (const i of t) B(n, i.subject_id);
146
+ for (const i of t) z(n, i.subject_id);
141
147
  const o = ne(e.id, n);
142
148
  for (const i of t) ee(i, e.gsn, e.hlc, s);
143
- s > M && (M = s);
149
+ s > F && (F = s);
144
150
  const r = new Set(t.map((i) => i.subject_id));
145
151
  for (const i of o) r.add(i);
146
152
  for (const i of r) L(i, n.get(i) ?? null);
147
- return F(), u;
148
- }, ge = (e) => {
153
+ return N(), d;
154
+ }, me = (e) => {
149
155
  const t = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
150
156
  for (const n of e.updates) {
151
157
  const o = n.subject_id;
152
- B(t, o), s.add(o);
153
- const r = { actionId: e.id, update: n, hlc: e.hlc }, i = d.get(o);
154
- i === void 0 ? d.set(o, [r]) : i.push(r);
158
+ z(t, o), s.add(o);
159
+ const r = { actionId: e.id, update: n, hlc: e.hlc }, i = m.get(o);
160
+ i === void 0 ? m.set(o, [r]) : i.push(r);
155
161
  }
156
162
  for (const n of s) L(n, t.get(n) ?? null);
157
- return F(), u;
158
- }, ye = (e) => {
163
+ return N(), d;
164
+ }, Ie = (e) => {
159
165
  const t = /* @__PURE__ */ new Map(), s = ne(e, t);
160
166
  for (const n of s) L(n, t.get(n) ?? null);
161
- return F(), u;
162
- }, j = (e) => {
167
+ return N(), d;
168
+ }, k = (e) => {
163
169
  const t = /* @__PURE__ */ new Set();
164
170
  let s = !1;
165
171
  for (const n of e) {
166
172
  if (t.has(n)) continue;
167
- t.add(n), z(n), A(n), E.delete(n);
168
- const o = C(n), r = l.get(n);
169
- l.delete(n), d.delete(n), h.delete(n), y.delete(n), r !== void 0 && x(r.type, n), te(o, null);
173
+ t.add(n), Y(n), A(n), E.delete(n);
174
+ const o = D(n), r = l.get(n);
175
+ l.delete(n), m.delete(n), h.delete(n), I.delete(n), r !== void 0 && P(r.type, n), te(o, null);
170
176
  const i = o ?? r ?? null;
171
- i !== null && (s = !0, R(n, i.type, !0));
177
+ i !== null && (s = !0, X(n, !0, ke(i)));
172
178
  }
173
- return s && F(), u;
179
+ return s && N(), d;
174
180
  }, ve = (e) => {
175
- if (!je(e)) return u;
176
- l.clear(), p.clear(), y.clear(), d.clear(), h.clear(), E.clear(), v.clear(), S.clear();
181
+ if (!Ce(e)) return d;
182
+ l.clear(), p.clear(), I.clear(), m.clear(), h.clear(), E.clear(), v.clear(), j.clear();
177
183
  for (const o of g.keys()) A(o);
178
- I.length = 0, w = 0;
184
+ w.length = 0, b = 0;
179
185
  const t = {}, s = {}, n = (o, r) => {
180
186
  const i = o[r.key];
181
187
  i === void 0 ? o[r.key] = { [r.rowId]: r.value } : i[r.rowId] = r.value;
182
188
  };
183
189
  for (const o of e.entities) {
184
- if (!a(o.type)) continue;
190
+ if (!u(o.type)) continue;
185
191
  const r = re(o);
186
- l.set(r.id, r), P(r.type, r.id);
187
- const i = ke(r);
192
+ l.set(r.id, r), C(r.type, r.id);
193
+ const i = Pe(r);
188
194
  i !== null && n(t, i);
189
- const b = Se(r);
190
- b !== null && n(s, b);
195
+ const f = Ae(r);
196
+ f !== null && n(s, f);
191
197
  }
192
- return N = t, m = s, u = e.revision > u ? e.revision : u + 1, O = u, M = e.position, F(), u;
193
- }, Ie = () => {
198
+ return y = De(l.values()), O = t, M = s, d = e.revision > d ? e.revision : d + 1, x = d, F = e.position, N(), d;
199
+ }, ye = () => {
194
200
  let e = Number.POSITIVE_INFINITY;
195
- for (const n of y.values())
201
+ for (const n of I.values())
196
202
  for (const o of n) e = Math.min(e, o.position);
197
- const t = e === Number.POSITIVE_INFINITY ? M : Math.min(M, e - 1), s = [];
203
+ const t = e === Number.POSITIVE_INFINITY ? F : Math.min(F, e - 1), s = [];
198
204
  for (const n of l.values())
199
- a(n.type) && s.push(Ne(n));
205
+ u(n.type) && s.push(Se(n));
200
206
  return {
201
- format: Oe,
207
+ format: je,
202
208
  position: t,
203
- revision: u,
209
+ revision: d,
204
210
  entities: s
205
211
  };
206
212
  }, we = () => {
@@ -210,7 +216,7 @@ const fe = (c, f) => {
210
216
  let n = 0, o = 0;
211
217
  for (const r of s) {
212
218
  const i = $(r).length;
213
- i !== 0 && (e[r] = i, n += i, a(r) && (t[r] = i, o += i));
219
+ i !== 0 && (e[r] = i, n += i, u(r) && (t[r] = i, o += i));
214
220
  }
215
221
  return {
216
222
  entities: n,
@@ -218,54 +224,54 @@ const fe = (c, f) => {
218
224
  held: o,
219
225
  heldByType: t,
220
226
  pinned: g.size,
221
- revision: u,
222
- position: M,
227
+ revision: d,
228
+ position: F,
223
229
  changes: Z(),
224
- changeFloor: O
230
+ changeFloor: x
225
231
  };
226
- }, me = (e) => {
227
- if (e < O) return [];
232
+ }, be = (e) => {
233
+ if (e < x) return [];
228
234
  const t = [];
229
- for (let s = w; s < I.length; s += 1) {
230
- const n = I[s];
235
+ for (let s = b; s < w.length; s += 1) {
236
+ const n = w[s];
231
237
  n.revision > e && t.push(n);
232
238
  }
233
239
  return t;
234
- }, be = (e, t, s) => {
235
- const n = C(e);
236
- l.set(e, t), P(t.type, e), X(e);
240
+ }, Me = (e, t, s) => {
241
+ const n = D(e);
242
+ l.set(e, t), C(t.type, e), Q(e);
237
243
  for (const o of s) ee(o.update, o.gsn, o.hlc, o.position);
238
- L(e, n), F();
244
+ L(e, n), N();
239
245
  };
240
246
  return {
241
247
  get revision() {
242
- return u;
248
+ return d;
243
249
  },
244
250
  get changeFloor() {
245
- return O;
251
+ return x;
246
252
  },
247
- get: D,
253
+ get: R,
248
254
  base: (e) => l.get(e),
249
255
  iterate: $,
250
- isHeld: a,
256
+ isHeld: u,
251
257
  open: (e) => {
252
- const t = D(e);
258
+ const t = R(e);
253
259
  if (t !== void 0)
254
- return a(t.type) || X(e), Promise.resolve(t);
260
+ return u(t.type) || Q(e), Promise.resolve(t);
255
261
  const s = v.get(e);
256
262
  if (s !== void 0) return s;
257
263
  const n = c?.readEntity;
258
264
  if (n === void 0) return Promise.resolve(null);
259
- const o = ++G;
260
- S.set(e, o);
265
+ const o = ++W;
266
+ j.set(e, o);
261
267
  const r = n(e).then(
262
268
  (i) => {
263
- if (v.get(e) === r && v.delete(e), S.get(e) !== o) return null;
264
- const b = E.get(e) ?? [];
269
+ if (v.get(e) === r && v.delete(e), j.get(e) !== o) return null;
270
+ const f = E.get(e) ?? [];
265
271
  if (E.delete(e), i === null) return null;
266
- if (a(i.type)) return i;
267
- const K = re(i);
268
- return be(e, K, b), D(e) ?? K;
272
+ if (u(i.type)) return i;
273
+ const S = re(i);
274
+ return Me(e, S, f), R(e) ?? S;
269
275
  },
270
276
  (i) => {
271
277
  throw v.get(e) === r && v.delete(e), i;
@@ -274,37 +280,38 @@ const fe = (c, f) => {
274
280
  return v.set(e, r), r;
275
281
  },
276
282
  close: (e) => {
277
- const t = C(e);
283
+ const t = D(e);
278
284
  if (t === null) {
279
- z(e);
285
+ Y(e);
280
286
  return;
281
287
  }
282
- a(t.type) || (z(e), g.has(e) ? ue(e) : j([e]));
288
+ u(t.type) || (Y(e), g.has(e) ? de(e) : k([e]));
283
289
  },
284
- isOpen: de,
285
- changesSince: me,
290
+ isOpen: pe,
291
+ changesSince: be,
286
292
  stats: we,
287
- relationships: (e) => e.sourceId !== void 0 ? V(m[oe(e.as, e.type, e.sourceId)]) : e.targetId !== void 0 ? V(N[Fe(e.as, e.type, e.targetId)]) : [],
288
- memberships: (e) => e.groupId !== void 0 ? V(N[Me(e.groupId)]) : e.entityId !== void 0 ? V(m[se(e.entityId)]) : [],
289
- relationshipLinks: (e) => Ee(m[oe(e.as, e.type, e.sourceId)]),
290
- membershipLinks: (e) => _e(m[se(e)]),
291
- ingest: he,
292
- optimistic: ge,
293
- discard: ye,
293
+ relationships: (e) => e.sourceId !== void 0 ? K(M[oe(e.as, e.type, e.sourceId)]) : e.targetId !== void 0 ? K(O[xe(e.as, e.type, e.targetId)]) : [],
294
+ components: (e) => Oe(y, e),
295
+ memberships: (e) => e.groupId !== void 0 ? K(O[Ne(e.groupId)]) : e.entityId !== void 0 ? K(M[se(e.entityId)]) : [],
296
+ relationshipLinks: (e) => Fe(M[oe(e.as, e.type, e.sourceId)]),
297
+ membershipLinks: (e) => Ee(M[se(e)]),
298
+ ingest: ge,
299
+ optimistic: me,
300
+ discard: Ie,
294
301
  load: ve,
295
- toRecord: Ie,
296
- evict: j,
297
- subscribe: (e) => (Y.add(e), () => {
298
- Y.delete(e);
302
+ toRecord: ye,
303
+ evict: k,
304
+ subscribe: (e) => (U.add(e), () => {
305
+ U.delete(e);
299
306
  })
300
307
  };
301
308
  };
302
309
  export {
303
- Le as DEFAULT_PINNED_CAPACITY,
304
- Ke as DEFAULT_PINNED_TTL_MS,
305
- J as applyUpdate,
306
- Re as contentChanged,
307
- He as createReplica,
308
- Qe as foldEntityAction,
309
- Ce as holdAll
310
+ We as DEFAULT_PINNED_CAPACITY,
311
+ Ge as DEFAULT_PINNED_TTL_MS,
312
+ B as applyUpdate,
313
+ Be as contentChanged,
314
+ tt as createReplica,
315
+ st as foldEntityAction,
316
+ Je as holdAll
310
317
  };