@instantdb/core 0.22.86-experimental.split-store.20183617880.1 → 0.22.86-experimental.split-store.20243647937.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.
- package/dist/commonjs/store.d.ts.map +1 -1
- package/dist/commonjs/store.js +12 -11
- package/dist/commonjs/store.js.map +1 -1
- package/dist/esm/store.d.ts.map +1 -1
- package/dist/esm/store.js +12 -11
- package/dist/esm/store.js.map +1 -1
- package/dist/standalone/index.js +73 -73
- package/dist/standalone/index.umd.cjs +1 -1
- package/package.json +2 -2
- package/src/store.ts +14 -11
package/dist/standalone/index.js
CHANGED
|
@@ -64,7 +64,7 @@ function st(t) {
|
|
|
64
64
|
function it(t) {
|
|
65
65
|
return Object.getPrototypeOf(t) === Map.prototype;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function U(t) {
|
|
68
68
|
var e;
|
|
69
69
|
return (e = t.copy) !== null && e !== void 0 ? e : t.original;
|
|
70
70
|
}
|
|
@@ -116,7 +116,7 @@ function he(t, e, n) {
|
|
|
116
116
|
}
|
|
117
117
|
function De(t, e) {
|
|
118
118
|
const n = S(t);
|
|
119
|
-
return (n ?
|
|
119
|
+
return (n ? U(n) : t)[e];
|
|
120
120
|
}
|
|
121
121
|
function Q(t, e) {
|
|
122
122
|
return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
|
|
@@ -449,13 +449,13 @@ const Ae = (t, e, n = !1) => {
|
|
|
449
449
|
throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
|
|
450
450
|
}, ze = {
|
|
451
451
|
get size() {
|
|
452
|
-
return
|
|
452
|
+
return U(S(this)).size;
|
|
453
453
|
},
|
|
454
454
|
has(t) {
|
|
455
|
-
return
|
|
455
|
+
return U(S(this)).has(t);
|
|
456
456
|
},
|
|
457
457
|
set(t, e) {
|
|
458
|
-
const n = S(this), r =
|
|
458
|
+
const n = S(this), r = U(n);
|
|
459
459
|
return (!r.has(t) || !Q(r.get(t), e)) && (j(n), V(n), n.assignedMap.set(t, !0), n.copy.set(t, e), ct(n, t, e, fe)), this;
|
|
460
460
|
},
|
|
461
461
|
delete(t) {
|
|
@@ -475,13 +475,13 @@ const Ae = (t, e, n = !1) => {
|
|
|
475
475
|
},
|
|
476
476
|
forEach(t, e) {
|
|
477
477
|
const n = S(this);
|
|
478
|
-
|
|
478
|
+
U(n).forEach((r, s) => {
|
|
479
479
|
t.call(e, this.get(s), s, this);
|
|
480
480
|
});
|
|
481
481
|
},
|
|
482
482
|
get(t) {
|
|
483
483
|
var e, n;
|
|
484
|
-
const r = S(this), s =
|
|
484
|
+
const r = S(this), s = U(r).get(t), i = ((n = (e = r.options).mark) === null || n === void 0 ? void 0 : n.call(e, s, F)) === F.mutable;
|
|
485
485
|
if (r.options.strict && Ae(s, r.options, i), i || r.finalized || !q(s, r.options) || s !== r.original.get(t))
|
|
486
486
|
return s;
|
|
487
487
|
const o = rt.createDraft({
|
|
@@ -494,7 +494,7 @@ const Ae = (t, e, n = !1) => {
|
|
|
494
494
|
return j(r), r.copy.set(t, o), o;
|
|
495
495
|
},
|
|
496
496
|
keys() {
|
|
497
|
-
return
|
|
497
|
+
return U(S(this)).keys();
|
|
498
498
|
},
|
|
499
499
|
values() {
|
|
500
500
|
const t = this.keys();
|
|
@@ -653,7 +653,7 @@ const rr = Reflect.ownKeys(ve), rn = /* @__PURE__ */ new WeakSet(), sn = {
|
|
|
653
653
|
if (o = t.options.mark(u, F), o === F.mutable)
|
|
654
654
|
return t.options.strict && Ae(u, t.options, !0), u;
|
|
655
655
|
}
|
|
656
|
-
const a =
|
|
656
|
+
const a = U(t);
|
|
657
657
|
if (a instanceof Map && nr.includes(e)) {
|
|
658
658
|
if (e === "size")
|
|
659
659
|
return Object.getOwnPropertyDescriptor(ze, "size").get.call(t.proxy);
|
|
@@ -700,20 +700,20 @@ const rr = Reflect.ownKeys(ve), rn = /* @__PURE__ */ new WeakSet(), sn = {
|
|
|
700
700
|
let s;
|
|
701
701
|
if (t.type === 1 && e !== "length" && !(Number.isInteger(s = Number(e)) && s >= 0 && (e === 0 || s === 0 || String(s) === String(e))))
|
|
702
702
|
throw new Error("Only supports setting array indices and the 'length' property.");
|
|
703
|
-
const i = wt(
|
|
703
|
+
const i = wt(U(t), e);
|
|
704
704
|
if (i != null && i.set)
|
|
705
705
|
return i.set.call(t.proxy, n), !0;
|
|
706
|
-
const o = De(
|
|
706
|
+
const o = De(U(t), e), a = S(o);
|
|
707
707
|
return a && Q(a.original, n) ? (t.copy[e] = n, t.assignedMap = (r = t.assignedMap) !== null && r !== void 0 ? r : /* @__PURE__ */ new Map(), t.assignedMap.set(e, !1), !0) : (Q(n, o) && (n !== void 0 || ce(t.original, e)) || (j(t), V(t), ce(t.original, e) && Q(n, t.original[e]) ? t.assignedMap.delete(e) : t.assignedMap.set(e, !0), t.copy[e] = n, ct(t, e, n, fe)), !0);
|
|
708
708
|
},
|
|
709
709
|
has(t, e) {
|
|
710
|
-
return e in
|
|
710
|
+
return e in U(t);
|
|
711
711
|
},
|
|
712
712
|
ownKeys(t) {
|
|
713
|
-
return Reflect.ownKeys(
|
|
713
|
+
return Reflect.ownKeys(U(t));
|
|
714
714
|
},
|
|
715
715
|
getOwnPropertyDescriptor(t, e) {
|
|
716
|
-
const n =
|
|
716
|
+
const n = U(t), r = Reflect.getOwnPropertyDescriptor(n, e);
|
|
717
717
|
return r && {
|
|
718
718
|
writable: !0,
|
|
719
719
|
configurable: t.type !== 1 || e !== "length",
|
|
@@ -877,9 +877,9 @@ const or = (t) => function e(n, r, s) {
|
|
|
877
877
|
for (const M of l.mark) {
|
|
878
878
|
if (typeof M != "function")
|
|
879
879
|
throw new Error(`Invalid mark: ${M}, 'mark' should be a function.`);
|
|
880
|
-
const
|
|
881
|
-
if (
|
|
882
|
-
return
|
|
880
|
+
const x = M(m, O);
|
|
881
|
+
if (x)
|
|
882
|
+
return x;
|
|
883
883
|
}
|
|
884
884
|
} : l.mark, h = (i = l.enablePatches) !== null && i !== void 0 ? i : !1, p = (o = l.strict) !== null && o !== void 0 ? o : !1, b = {
|
|
885
885
|
enableAutoFreeze: (a = l.enableAutoFreeze) !== null && a !== void 0 ? a : !1,
|
|
@@ -906,9 +906,9 @@ const or = (t) => function e(n, r, s) {
|
|
|
906
906
|
if (!J(m)) {
|
|
907
907
|
if (m !== void 0 && !Q(m, _) && (O != null && O.operated))
|
|
908
908
|
throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
911
|
-
const $e =
|
|
909
|
+
const x = m == null ? void 0 : m[Bn];
|
|
910
|
+
if (x) {
|
|
911
|
+
const $e = x[0];
|
|
912
912
|
return b.strict && typeof m == "object" && m !== null && Ve({
|
|
913
913
|
rootDraft: O,
|
|
914
914
|
value: m,
|
|
@@ -1374,7 +1374,7 @@ class H {
|
|
|
1374
1374
|
for (const e of Object.values(this.attrs))
|
|
1375
1375
|
if (dt(e)) {
|
|
1376
1376
|
const [n, r, s] = e["forward-identity"];
|
|
1377
|
-
|
|
1377
|
+
L(this.blobAttrs, [r, s], e);
|
|
1378
1378
|
}
|
|
1379
1379
|
return this._blobAttrs;
|
|
1380
1380
|
}
|
|
@@ -1385,7 +1385,7 @@ class H {
|
|
|
1385
1385
|
for (const e of Object.values(this.attrs))
|
|
1386
1386
|
if (e["primary?"]) {
|
|
1387
1387
|
const [n, r] = e["forward-identity"];
|
|
1388
|
-
|
|
1388
|
+
L(this._primaryKeys, [r], e);
|
|
1389
1389
|
}
|
|
1390
1390
|
return this._primaryKeys;
|
|
1391
1391
|
}
|
|
@@ -1395,7 +1395,7 @@ class H {
|
|
|
1395
1395
|
console.log("fwdIdents"), this._forwardIdents = /* @__PURE__ */ new Map();
|
|
1396
1396
|
for (const e of Object.values(this.attrs)) {
|
|
1397
1397
|
const n = e["forward-identity"], [r, s, i] = n;
|
|
1398
|
-
|
|
1398
|
+
L(this._forwardIdents, [s, i], e);
|
|
1399
1399
|
}
|
|
1400
1400
|
return this._forwardIdents;
|
|
1401
1401
|
}
|
|
@@ -1407,7 +1407,7 @@ class H {
|
|
|
1407
1407
|
const n = e["reverse-identity"];
|
|
1408
1408
|
if (n) {
|
|
1409
1409
|
const [r, s, i] = n;
|
|
1410
|
-
|
|
1410
|
+
L(this._revIdents, [s, i], e);
|
|
1411
1411
|
}
|
|
1412
1412
|
}
|
|
1413
1413
|
return this._revIdents;
|
|
@@ -1437,15 +1437,15 @@ function K(t, e) {
|
|
|
1437
1437
|
const [n, ...r] = e;
|
|
1438
1438
|
t.has(n) && K(t.get(n), r);
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1440
|
+
function L(t, e, n) {
|
|
1441
|
+
let r = t;
|
|
1442
|
+
const s = e.length - 1;
|
|
1443
|
+
for (let i = 0; i < s; i++) {
|
|
1444
|
+
const o = e[i];
|
|
1445
|
+
let a = r.get(o);
|
|
1446
|
+
a === void 0 && (a = /* @__PURE__ */ new Map(), r.set(o, a)), r = a;
|
|
1445
1447
|
}
|
|
1446
|
-
|
|
1447
|
-
let i = t.get(r);
|
|
1448
|
-
i || (i = /* @__PURE__ */ new Map(), t.set(r, i)), D(i, s, n);
|
|
1448
|
+
s > -1 && r.set(e[s], n);
|
|
1449
1449
|
}
|
|
1450
1450
|
function ln(t, e, n) {
|
|
1451
1451
|
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
@@ -1456,13 +1456,13 @@ function ln(t, e, n) {
|
|
|
1456
1456
|
console.warn("no such attr", c, a);
|
|
1457
1457
|
continue;
|
|
1458
1458
|
}
|
|
1459
|
-
l["checked-data-type"] === "date" && n && (u = Ie(u), o[2] = u), ft(l) &&
|
|
1459
|
+
l["checked-data-type"] === "date" && n && (u = Ie(u), o[2] = u), ft(l) && L(i, [u, c, a], o), L(r, [a, c, u], o), L(s, [c, a, u], o);
|
|
1460
1460
|
}
|
|
1461
1461
|
return { eav: r, aev: s, vae: i };
|
|
1462
1462
|
}
|
|
1463
1463
|
function fn(t) {
|
|
1464
1464
|
return {
|
|
1465
|
-
triples:
|
|
1465
|
+
triples: D(t.eav, 3),
|
|
1466
1466
|
cardinalityInference: t.cardinalityInference,
|
|
1467
1467
|
useDateObjects: t.useDateObjects,
|
|
1468
1468
|
version: 1
|
|
@@ -1500,7 +1500,7 @@ function pe(t, e) {
|
|
|
1500
1500
|
const [o, a] = e[0], c = t.aev.get(o);
|
|
1501
1501
|
if (!c)
|
|
1502
1502
|
return null;
|
|
1503
|
-
n = (s =
|
|
1503
|
+
n = (s = D(c, 2).find((l) => l[2] === a)) == null ? void 0 : s[0];
|
|
1504
1504
|
} else
|
|
1505
1505
|
n = e[0];
|
|
1506
1506
|
if (!n)
|
|
@@ -1510,7 +1510,7 @@ function pe(t, e) {
|
|
|
1510
1510
|
const [o, a] = r, c = t.aev.get(o);
|
|
1511
1511
|
if (!c)
|
|
1512
1512
|
return null;
|
|
1513
|
-
const l = (i =
|
|
1513
|
+
const l = (i = D(c, 2).find((y) => y[2] === a)) == null ? void 0 : i[0];
|
|
1514
1514
|
if (!l)
|
|
1515
1515
|
return null;
|
|
1516
1516
|
const [f, d, h, ...p] = e;
|
|
@@ -1544,7 +1544,7 @@ function bn(t, e, n) {
|
|
|
1544
1544
|
return;
|
|
1545
1545
|
a["checked-data-type"] === "date" && t.useDateObjects && (o = Ie(o));
|
|
1546
1546
|
const c = re(t.eav, [s, i, o]), u = (c == null ? void 0 : c[3]) ?? yn(t, a, r), l = [s, i, o, u];
|
|
1547
|
-
kr(a) ? (
|
|
1547
|
+
kr(a) ? (L(t.eav, [s, i], /* @__PURE__ */ new Map([[o, l]])), L(t.aev, [i, s], /* @__PURE__ */ new Map([[o, l]]))) : (L(t.eav, [s, i, o], l), L(t.aev, [i, s, o], l)), ft(a) && L(t.vae, [o, i, s], l);
|
|
1548
1548
|
}
|
|
1549
1549
|
function Cr(t, e, n) {
|
|
1550
1550
|
var h;
|
|
@@ -1565,7 +1565,7 @@ function Cr(t, e, n) {
|
|
|
1565
1565
|
f,
|
|
1566
1566
|
yn(t, a, u)
|
|
1567
1567
|
];
|
|
1568
|
-
|
|
1568
|
+
L(t.eav, [s, i], /* @__PURE__ */ new Map([[f, d]]));
|
|
1569
1569
|
}
|
|
1570
1570
|
function Qe(t, e, n) {
|
|
1571
1571
|
var u, l;
|
|
@@ -1576,7 +1576,7 @@ function Qe(t, e, n) {
|
|
|
1576
1576
|
if (a) {
|
|
1577
1577
|
for (const f of a.keys()) {
|
|
1578
1578
|
const d = e.getAttr(f);
|
|
1579
|
-
d && d["on-delete-reverse"] === "cascade" &&
|
|
1579
|
+
d && d["on-delete-reverse"] === "cascade" && D(a.get(f), 1).forEach(
|
|
1580
1580
|
([h, p, y]) => {
|
|
1581
1581
|
var b;
|
|
1582
1582
|
return Qe(t, e, [y, (b = d["reverse-identity"]) == null ? void 0 : b[1]]);
|
|
@@ -1589,7 +1589,7 @@ function Qe(t, e, n) {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
a.size === 0 && K(t.eav, [o]);
|
|
1591
1591
|
}
|
|
1592
|
-
const c = t.vae.get(o) &&
|
|
1592
|
+
const c = t.vae.get(o) && D(t.vae.get(o), 2);
|
|
1593
1593
|
c && c.forEach((f) => {
|
|
1594
1594
|
var b, _, g;
|
|
1595
1595
|
const [d, h, p] = f, y = e.getAttr(h);
|
|
@@ -1610,7 +1610,7 @@ function Mr(t, [e]) {
|
|
|
1610
1610
|
t.addAttr(e);
|
|
1611
1611
|
}
|
|
1612
1612
|
function gn(t) {
|
|
1613
|
-
return
|
|
1613
|
+
return D(t.eav, 3);
|
|
1614
1614
|
}
|
|
1615
1615
|
function Pr(t, e, [n]) {
|
|
1616
1616
|
if (!e.getAttr(n)) return;
|
|
@@ -1652,7 +1652,7 @@ function $r(t, e, n) {
|
|
|
1652
1652
|
throw new Error(`unhandled transaction action: ${r}`);
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1655
|
+
function D(t, e, n = []) {
|
|
1656
1656
|
if (!t || e === 0)
|
|
1657
1657
|
return n;
|
|
1658
1658
|
if (e === 1) {
|
|
@@ -1661,7 +1661,7 @@ function R(t, e, n = []) {
|
|
|
1661
1661
|
return n;
|
|
1662
1662
|
}
|
|
1663
1663
|
for (const r of t.values())
|
|
1664
|
-
|
|
1664
|
+
D(r, e - 1, n);
|
|
1665
1665
|
return n;
|
|
1666
1666
|
}
|
|
1667
1667
|
function ye(t, e, n) {
|
|
@@ -1689,7 +1689,7 @@ function ye(t, e, n) {
|
|
|
1689
1689
|
return r;
|
|
1690
1690
|
}
|
|
1691
1691
|
if (n != null && n.$comparator)
|
|
1692
|
-
return
|
|
1692
|
+
return D(e, 1).filter(n.$op);
|
|
1693
1693
|
const s = n.in || n.$in || [n];
|
|
1694
1694
|
for (const o of s) {
|
|
1695
1695
|
const a = e.get(o);
|
|
@@ -1706,11 +1706,11 @@ function Rr(t, [e, n, r]) {
|
|
|
1706
1706
|
switch (Dr(e, n, r)) {
|
|
1707
1707
|
case "e": {
|
|
1708
1708
|
const a = t.eav.get(e);
|
|
1709
|
-
return
|
|
1709
|
+
return D(a, 2);
|
|
1710
1710
|
}
|
|
1711
1711
|
case "ea": {
|
|
1712
1712
|
const a = (i = t.eav.get(e)) == null ? void 0 : i.get(n);
|
|
1713
|
-
return
|
|
1713
|
+
return D(a, 1);
|
|
1714
1714
|
}
|
|
1715
1715
|
case "eav": {
|
|
1716
1716
|
const a = (o = t.eav.get(e)) == null ? void 0 : o.get(n);
|
|
@@ -1727,7 +1727,7 @@ function Rr(t, [e, n, r]) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
case "a": {
|
|
1729
1729
|
const a = t.aev.get(n);
|
|
1730
|
-
return
|
|
1730
|
+
return D(a, 2);
|
|
1731
1731
|
}
|
|
1732
1732
|
case "av": {
|
|
1733
1733
|
const a = t.aev.get(n);
|
|
@@ -1746,7 +1746,7 @@ function Rr(t, [e, n, r]) {
|
|
|
1746
1746
|
return a;
|
|
1747
1747
|
}
|
|
1748
1748
|
default:
|
|
1749
|
-
return
|
|
1749
|
+
return D(t.eav, 3);
|
|
1750
1750
|
}
|
|
1751
1751
|
}
|
|
1752
1752
|
function xr(t, e, n) {
|
|
@@ -1755,7 +1755,7 @@ function xr(t, e, n) {
|
|
|
1755
1755
|
if (!e)
|
|
1756
1756
|
return r;
|
|
1757
1757
|
for (const [i, o] of e.entries()) {
|
|
1758
|
-
const a = (s = t.eav.get(n)) == null ? void 0 : s.get(o.id), c =
|
|
1758
|
+
const a = (s = t.eav.get(n)) == null ? void 0 : s.get(o.id), c = D(a, 1);
|
|
1759
1759
|
for (const u of c)
|
|
1760
1760
|
r[i] = u[2];
|
|
1761
1761
|
}
|
|
@@ -2325,8 +2325,8 @@ function Cs(t, e, { etype: n, pageInfo: r, dq: s, form: i }) {
|
|
|
2325
2325
|
if (f && ((y = f == null ? void 0 : f["forward-identity"]) == null ? void 0 : y[2]) !== "id") {
|
|
2326
2326
|
const b = f["checked-data-type"] === "date", _ = f.id;
|
|
2327
2327
|
u = u.map(([g]) => {
|
|
2328
|
-
var A, m, O, M,
|
|
2329
|
-
let T = (
|
|
2328
|
+
var A, m, O, M, x;
|
|
2329
|
+
let T = (x = (M = (O = (m = (A = t.eav.get(g)) == null ? void 0 : A.get(_)) == null ? void 0 : m.values()) == null ? void 0 : O.next()) == null ? void 0 : M.value) == null ? void 0 : x[2];
|
|
2330
2330
|
return b && (T = He(T)), [g, T];
|
|
2331
2331
|
});
|
|
2332
2332
|
}
|
|
@@ -2541,7 +2541,7 @@ function Ks(t, e, n) {
|
|
|
2541
2541
|
function Ze(t) {
|
|
2542
2542
|
return typeof t == "string" && !Ee(t) ? null : typeof t == "string" && Ee(t) ? kn(t) : Fs(t);
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function R(t, e, n) {
|
|
2545
2545
|
const r = Ze(n);
|
|
2546
2546
|
if (r === null)
|
|
2547
2547
|
return n;
|
|
@@ -2552,7 +2552,7 @@ function x(t, e, n) {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
function In(t, e, n, r) {
|
|
2554
2554
|
var o;
|
|
2555
|
-
const s =
|
|
2555
|
+
const s = R(t, e, n);
|
|
2556
2556
|
return Array.isArray(s) ? [[
|
|
2557
2557
|
"add-triple",
|
|
2558
2558
|
s,
|
|
@@ -2565,16 +2565,16 @@ function qs({ attrsStore: t }, [e, n, r]) {
|
|
|
2565
2565
|
const a = Array.isArray(o) ? o : [o], c = E(t, e, i), u = Z(t, e, i);
|
|
2566
2566
|
return a.map((l) => c ? [
|
|
2567
2567
|
"add-triple",
|
|
2568
|
-
|
|
2568
|
+
R(t, e, n),
|
|
2569
2569
|
c.id,
|
|
2570
2570
|
// XXX: Better error here
|
|
2571
|
-
|
|
2571
|
+
R(t, c["reverse-identity"][1], l)
|
|
2572
2572
|
] : [
|
|
2573
2573
|
"add-triple",
|
|
2574
2574
|
// XXX: Better error here
|
|
2575
|
-
|
|
2575
|
+
R(t, u["forward-identity"][1], l),
|
|
2576
2576
|
u == null ? void 0 : u.id,
|
|
2577
|
-
|
|
2577
|
+
R(t, e, n)
|
|
2578
2578
|
]);
|
|
2579
2579
|
});
|
|
2580
2580
|
return In(t, e, n, s);
|
|
@@ -2584,16 +2584,16 @@ function zs({ attrsStore: t }, [e, n, r]) {
|
|
|
2584
2584
|
const a = Array.isArray(o) ? o : [o], c = E(t, e, i), u = Z(t, e, i);
|
|
2585
2585
|
return a.map((l) => c ? [
|
|
2586
2586
|
"retract-triple",
|
|
2587
|
-
|
|
2587
|
+
R(t, e, n),
|
|
2588
2588
|
c.id,
|
|
2589
2589
|
// XXX: Better error here
|
|
2590
|
-
|
|
2590
|
+
R(t, c["reverse-identity"][1], l)
|
|
2591
2591
|
] : [
|
|
2592
2592
|
"retract-triple",
|
|
2593
2593
|
// XXX: Better error here
|
|
2594
|
-
|
|
2594
|
+
R(t, u["forward-identity"][1], l),
|
|
2595
2595
|
u.id,
|
|
2596
|
-
|
|
2596
|
+
R(t, e, n)
|
|
2597
2597
|
]);
|
|
2598
2598
|
});
|
|
2599
2599
|
return In(t, e, n, s);
|
|
@@ -2605,7 +2605,7 @@ function Vs(t, e, n, r) {
|
|
|
2605
2605
|
for (const a of t || []) {
|
|
2606
2606
|
const c = a == null ? void 0 : a.aev.get(i);
|
|
2607
2607
|
if (c) {
|
|
2608
|
-
for (const [u, l, f] of
|
|
2608
|
+
for (const [u, l, f] of D(c, 2))
|
|
2609
2609
|
if (f === o)
|
|
2610
2610
|
return !0;
|
|
2611
2611
|
}
|
|
@@ -2625,14 +2625,14 @@ function Cn({ stores: t, attrsStore: e }, [n, r, s, i]) {
|
|
|
2625
2625
|
return (i == null ? void 0 : i.upsert) === !1 ? { mode: "update" } : (i == null ? void 0 : i.upsert) === !0 ? null : Vs(t, e, n, r) ? { mode: "update" } : null;
|
|
2626
2626
|
}
|
|
2627
2627
|
function Ws(t, e) {
|
|
2628
|
-
const { attrsStore: n } = t, [r, s, i, o] = e, a = lt(i), c =
|
|
2628
|
+
const { attrsStore: n } = t, [r, s, i, o] = e, a = lt(i), c = R(n, r, s);
|
|
2629
2629
|
return [["id", c]].concat(Object.entries(a)).map(([l, f]) => {
|
|
2630
2630
|
const d = E(n, r, l);
|
|
2631
2631
|
return d["checked-data-type"] === "date" && t.useDateObjects && (f = Ie(f)), ["add-triple", c, d.id, f, { mode: "create" }];
|
|
2632
2632
|
});
|
|
2633
2633
|
}
|
|
2634
2634
|
function Qs(t, e) {
|
|
2635
|
-
const { attrsStore: n } = t, [r, s, i, o] = e, a = lt(i), c =
|
|
2635
|
+
const { attrsStore: n } = t, [r, s, i, o] = e, a = lt(i), c = R(n, r, s), u = Cn(t, [r, c, i, o]);
|
|
2636
2636
|
return [["id", c]].concat(Object.entries(a)).map(([f, d]) => {
|
|
2637
2637
|
const h = E(n, r, f);
|
|
2638
2638
|
return h["checked-data-type"] === "date" && t.useDateObjects && (d = Ie(d)), [
|
|
@@ -2645,10 +2645,10 @@ function Qs(t, e) {
|
|
|
2645
2645
|
});
|
|
2646
2646
|
}
|
|
2647
2647
|
function Gs({ attrsStore: t }, [e, n]) {
|
|
2648
|
-
return [["delete-entity",
|
|
2648
|
+
return [["delete-entity", R(t, e, n), e]];
|
|
2649
2649
|
}
|
|
2650
2650
|
function Bs(t, e) {
|
|
2651
|
-
const { attrsStore: n } = t, [r, s, i, o] = e, a = lt(i), c =
|
|
2651
|
+
const { attrsStore: n } = t, [r, s, i, o] = e, a = lt(i), c = R(n, r, s), u = Cn(t, [r, c, i, o]), l = Object.entries(a).map(([d, h]) => {
|
|
2652
2652
|
const p = E(n, r, d);
|
|
2653
2653
|
return [
|
|
2654
2654
|
"deep-merge-triple",
|
|
@@ -2667,7 +2667,7 @@ function Bs(t, e) {
|
|
|
2667
2667
|
]].concat(l);
|
|
2668
2668
|
}
|
|
2669
2669
|
function Hs({ attrsStore: t }, [e, n, r]) {
|
|
2670
|
-
return [["rule-params",
|
|
2670
|
+
return [["rule-params", R(t, e, n), e, r]];
|
|
2671
2671
|
}
|
|
2672
2672
|
function Js(t) {
|
|
2673
2673
|
const [e, n, r, s, i] = t;
|
|
@@ -3637,7 +3637,7 @@ function Kt(t) {
|
|
|
3637
3637
|
}, e;
|
|
3638
3638
|
}, {});
|
|
3639
3639
|
}
|
|
3640
|
-
const Rn = "v0.22.86-experimental.split-store.
|
|
3640
|
+
const Rn = "v0.22.86-experimental.split-store.20243647937.1";
|
|
3641
3641
|
function Mi(t, e) {
|
|
3642
3642
|
return {
|
|
3643
3643
|
info: t ? (...n) => console.info(...n, e()) : () => {
|
|
@@ -5298,13 +5298,13 @@ class oo {
|
|
|
5298
5298
|
});
|
|
5299
5299
|
const b = Jt(y.entries()), _ = d.map((g) => {
|
|
5300
5300
|
var yt, bt, _t, gt;
|
|
5301
|
-
const T = g["instaql-query"], A = g["instaql-result"], m = P(T), O = Nt(A), M = this.ensureAttrs(),
|
|
5301
|
+
const T = g["instaql-query"], A = g["instaql-result"], m = P(T), O = Nt(A), M = this.ensureAttrs(), x = Se(
|
|
5302
5302
|
M,
|
|
5303
5303
|
O,
|
|
5304
5304
|
r,
|
|
5305
5305
|
this.config.useDateObjects
|
|
5306
5306
|
), { store: $e, attrsStore: zn } = this._applyOptimisticUpdates(
|
|
5307
|
-
|
|
5307
|
+
x,
|
|
5308
5308
|
M,
|
|
5309
5309
|
b,
|
|
5310
5310
|
p
|
|
@@ -5320,12 +5320,12 @@ class oo {
|
|
|
5320
5320
|
});
|
|
5321
5321
|
_.forEach(
|
|
5322
5322
|
({ hash: g, q: T, store: A, attrsStore: m, pageInfo: O, aggregate: M }) => {
|
|
5323
|
-
this.querySubs.updateInPlace((
|
|
5324
|
-
if (!
|
|
5323
|
+
this.querySubs.updateInPlace((x) => {
|
|
5324
|
+
if (!x[g]) {
|
|
5325
5325
|
this._log.error("Missing value in querySubs", { hash: g, q: T });
|
|
5326
5326
|
return;
|
|
5327
5327
|
}
|
|
5328
|
-
|
|
5328
|
+
x[g].result = {
|
|
5329
5329
|
store: A,
|
|
5330
5330
|
attrsStore: m,
|
|
5331
5331
|
pageInfo: O,
|