@entropic-bond/firebase 1.13.10 → 1.13.11
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.
|
@@ -2097,10 +2097,10 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2097
2097
|
for (let J = 0; J < z.length; J++) {
|
|
2098
2098
|
var fe = z[J].split("=");
|
|
2099
2099
|
if (fe.length > 1) {
|
|
2100
|
-
const
|
|
2100
|
+
const ge = fe[0];
|
|
2101
2101
|
fe = fe[1];
|
|
2102
|
-
const et =
|
|
2103
|
-
O = et.length >= 2 && et[1] == "type" ? O + (
|
|
2102
|
+
const et = ge.split("_");
|
|
2103
|
+
O = et.length >= 2 && et[1] == "type" ? O + (ge + "=" + fe + "&") : O + (ge + "=redacted&");
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
} else O = null;
|
|
@@ -2228,14 +2228,14 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2228
2228
|
}
|
|
2229
2229
|
if (this.R) {
|
|
2230
2230
|
o = !0;
|
|
2231
|
-
let
|
|
2232
|
-
for (; !this.K && this.C < h.length; ) if (
|
|
2231
|
+
let ge;
|
|
2232
|
+
for (; !this.K && this.C < h.length; ) if (ge = Rp(this, h), ge == Xi) {
|
|
2233
2233
|
z == 4 && (this.m = 4, ke(14), o = !1), vn(this.i, this.l, null, "[Incomplete Response]");
|
|
2234
2234
|
break;
|
|
2235
|
-
} else if (
|
|
2235
|
+
} else if (ge == Sc) {
|
|
2236
2236
|
this.m = 4, ke(15), vn(this.i, this.l, h, "[Invalid Chunk]"), o = !1;
|
|
2237
2237
|
break;
|
|
2238
|
-
} else vn(this.i, this.l,
|
|
2238
|
+
} else vn(this.i, this.l, ge, null), Zi(this, ge);
|
|
2239
2239
|
if (kc(this) && this.C != 0 && (this.h.g = this.h.g.slice(this.C), this.C = 0), z != 4 || h.length != 0 || this.h.h || (this.m = 1, ke(16), o = !1), this.o = this.o && o, !o) vn(
|
|
2240
2240
|
this.i,
|
|
2241
2241
|
this.l,
|
|
@@ -2327,8 +2327,8 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2327
2327
|
} else nn(h, 11);
|
|
2328
2328
|
} else if ((o.L || h.g == o) && ms(h), !_(u)) for (v = h.Ba.g.parse(u), u = 0; u < v.length; u++) {
|
|
2329
2329
|
let J = v[u];
|
|
2330
|
-
const
|
|
2331
|
-
if (!(
|
|
2330
|
+
const ge = J[0];
|
|
2331
|
+
if (!(ge <= h.K)) if (h.K = ge, J = J[1], h.I == 2) if (J[0] == "c") {
|
|
2332
2332
|
h.M = J[1], h.ba = J[2];
|
|
2333
2333
|
const et = J[3];
|
|
2334
2334
|
et != null && (h.ka = et, h.j.info("VER=" + h.ka));
|
|
@@ -2920,10 +2920,10 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2920
2920
|
const fe = ["count=" + h];
|
|
2921
2921
|
z == -1 ? h > 0 ? (z = v[0].g, fe.push("ofs=" + z)) : z = 0 : fe.push("ofs=" + z);
|
|
2922
2922
|
let J = !0;
|
|
2923
|
-
for (let
|
|
2924
|
-
var b = v[
|
|
2925
|
-
const et = v[
|
|
2926
|
-
if (b -= z, b < 0) z = Math.max(0, v[
|
|
2923
|
+
for (let ge = 0; ge < h; ge++) {
|
|
2924
|
+
var b = v[ge].g;
|
|
2925
|
+
const et = v[ge].map;
|
|
2926
|
+
if (b -= z, b < 0) z = Math.max(0, v[ge].g - 100), J = !1;
|
|
2927
2927
|
else try {
|
|
2928
2928
|
b = "req" + b + "_" || "";
|
|
2929
2929
|
try {
|
|
@@ -4533,7 +4533,7 @@ class {
|
|
|
4533
4533
|
return 0;
|
|
4534
4534
|
}
|
|
4535
4535
|
}();
|
|
4536
|
-
class
|
|
4536
|
+
class me {
|
|
4537
4537
|
constructor(e) {
|
|
4538
4538
|
this.comparator = e, this.data = new se(this.comparator);
|
|
4539
4539
|
}
|
|
@@ -4602,7 +4602,7 @@ class pe {
|
|
|
4602
4602
|
}), t;
|
|
4603
4603
|
}
|
|
4604
4604
|
isEqual(e) {
|
|
4605
|
-
if (!(e instanceof
|
|
4605
|
+
if (!(e instanceof me) || this.size !== e.size) return !1;
|
|
4606
4606
|
const t = this.data.getIterator(), r = e.data.getIterator();
|
|
4607
4607
|
for (; t.hasNext(); ) {
|
|
4608
4608
|
const s = t.getNext().key, i = r.getNext().key;
|
|
@@ -4621,7 +4621,7 @@ class pe {
|
|
|
4621
4621
|
return this.forEach((t) => e.push(t)), "SortedSet(" + e.toString() + ")";
|
|
4622
4622
|
}
|
|
4623
4623
|
copy(e) {
|
|
4624
|
-
const t = new
|
|
4624
|
+
const t = new me(this.comparator);
|
|
4625
4625
|
return t.data = e, t;
|
|
4626
4626
|
}
|
|
4627
4627
|
}
|
|
@@ -4650,7 +4650,7 @@ class Fe {
|
|
|
4650
4650
|
* fields paths to this field mask.
|
|
4651
4651
|
*/
|
|
4652
4652
|
unionWith(e) {
|
|
4653
|
-
let t = new
|
|
4653
|
+
let t = new me(we.comparator);
|
|
4654
4654
|
for (const r of this.fields) t = t.add(r);
|
|
4655
4655
|
for (const r of e) t = t.add(r);
|
|
4656
4656
|
return new Fe(t.toArray());
|
|
@@ -5603,7 +5603,7 @@ function Dn(n) {
|
|
|
5603
5603
|
for (const i of e.explicitOrderBy) e.Ie.push(i), t.add(i.field.canonicalString());
|
|
5604
5604
|
const r = e.explicitOrderBy.length > 0 ? e.explicitOrderBy[e.explicitOrderBy.length - 1].dir : "asc";
|
|
5605
5605
|
(function(a) {
|
|
5606
|
-
let c = new
|
|
5606
|
+
let c = new me(we.comparator);
|
|
5607
5607
|
return a.filters.forEach((l) => {
|
|
5608
5608
|
l.getFlattenedFilters().forEach((d) => {
|
|
5609
5609
|
d.isInequality() && (c = c.add(d.field));
|
|
@@ -5785,13 +5785,13 @@ function Gh() {
|
|
|
5785
5785
|
function Sr() {
|
|
5786
5786
|
return new Tn((n) => n.toString(), (n, e) => n.isEqual(e));
|
|
5787
5787
|
}
|
|
5788
|
-
const l_ = new se(L.comparator), h_ = new
|
|
5788
|
+
const l_ = new se(L.comparator), h_ = new me(L.comparator);
|
|
5789
5789
|
function G(...n) {
|
|
5790
5790
|
let e = h_;
|
|
5791
5791
|
for (const t of n) e = e.add(t);
|
|
5792
5792
|
return e;
|
|
5793
5793
|
}
|
|
5794
|
-
const d_ = new
|
|
5794
|
+
const d_ = new me(W);
|
|
5795
5795
|
function f_() {
|
|
5796
5796
|
return d_;
|
|
5797
5797
|
}
|
|
@@ -5947,7 +5947,7 @@ function Zh(n, e) {
|
|
|
5947
5947
|
if (e === null) return n.isNoDocument() ? new vi(n.key, $e.none()) : new Wr(n.key, n.data, $e.none());
|
|
5948
5948
|
{
|
|
5949
5949
|
const t = n.data, r = Me.empty();
|
|
5950
|
-
let s = new
|
|
5950
|
+
let s = new me(we.comparator);
|
|
5951
5951
|
for (let i of e.fields) if (!s.has(i)) {
|
|
5952
5952
|
let a = t.field(i);
|
|
5953
5953
|
a === null && i.length > 1 && (i = i.popLast(), a = t.field(i)), a === null ? r.delete(i) : r.set(i, a), s = s.add(i);
|
|
@@ -6689,11 +6689,11 @@ class C_ {
|
|
|
6689
6689
|
}
|
|
6690
6690
|
dt(e) {
|
|
6691
6691
|
let t = this.He.get(e);
|
|
6692
|
-
return t || (t = new
|
|
6692
|
+
return t || (t = new me(W), this.He = this.He.insert(e, t)), t;
|
|
6693
6693
|
}
|
|
6694
6694
|
It(e) {
|
|
6695
6695
|
let t = this.Je.get(e);
|
|
6696
|
-
return t || (t = new
|
|
6696
|
+
return t || (t = new me(W), this.Je = this.Je.insert(e, t)), t;
|
|
6697
6697
|
}
|
|
6698
6698
|
/**
|
|
6699
6699
|
* Verifies that the user is still interested in this target (by calling
|
|
@@ -7364,7 +7364,7 @@ class X_ {
|
|
|
7364
7364
|
}
|
|
7365
7365
|
// Returns false if the entry already existed.
|
|
7366
7366
|
add(e) {
|
|
7367
|
-
const t = e.lastSegment(), r = e.popLast(), s = this.index[t] || new
|
|
7367
|
+
const t = e.lastSegment(), r = e.popLast(), s = this.index[t] || new me(Z.comparator), i = !s.has(r);
|
|
7368
7368
|
return this.index[t] = s.add(r), i;
|
|
7369
7369
|
}
|
|
7370
7370
|
has(e) {
|
|
@@ -7372,7 +7372,7 @@ class X_ {
|
|
|
7372
7372
|
return s && s.has(r);
|
|
7373
7373
|
}
|
|
7374
7374
|
getEntries(e) {
|
|
7375
|
-
return (this.index[e] || new
|
|
7375
|
+
return (this.index[e] || new me(Z.comparator)).toArray();
|
|
7376
7376
|
}
|
|
7377
7377
|
}
|
|
7378
7378
|
const Qu = {
|
|
@@ -7411,7 +7411,7 @@ function Yu([n, e], [t, r]) {
|
|
|
7411
7411
|
}
|
|
7412
7412
|
class J_ {
|
|
7413
7413
|
constructor(e) {
|
|
7414
|
-
this.Ir = e, this.buffer = new
|
|
7414
|
+
this.Ir = e, this.buffer = new me(Yu), this.Er = 0;
|
|
7415
7415
|
}
|
|
7416
7416
|
dr() {
|
|
7417
7417
|
return ++this.Er;
|
|
@@ -7880,8 +7880,8 @@ class ay {
|
|
|
7880
7880
|
}
|
|
7881
7881
|
class ya {
|
|
7882
7882
|
constructor() {
|
|
7883
|
-
this.Qr = new
|
|
7884
|
-
this.Ur = new
|
|
7883
|
+
this.Qr = new me(ye.$r), // A set of outstanding references to a document sorted by target id.
|
|
7884
|
+
this.Ur = new me(ye.Kr);
|
|
7885
7885
|
}
|
|
7886
7886
|
/** Returns true if the reference set contains no references. */
|
|
7887
7887
|
isEmpty() {
|
|
@@ -7955,7 +7955,7 @@ class cy {
|
|
|
7955
7955
|
*/
|
|
7956
7956
|
this.mutationQueue = [], /** Next value to use when assigning sequential IDs to each mutation batch. */
|
|
7957
7957
|
this.tr = 1, /** An ordered mapping between documents and the mutations batch IDs. */
|
|
7958
|
-
this.Zr = new
|
|
7958
|
+
this.Zr = new me(ye.$r);
|
|
7959
7959
|
}
|
|
7960
7960
|
checkEmpty(e) {
|
|
7961
7961
|
return S.resolve(this.mutationQueue.length === 0);
|
|
@@ -7989,7 +7989,7 @@ class cy {
|
|
|
7989
7989
|
}), S.resolve(i);
|
|
7990
7990
|
}
|
|
7991
7991
|
getAllMutationBatchesAffectingDocumentKeys(e, t) {
|
|
7992
|
-
let r = new
|
|
7992
|
+
let r = new me(W);
|
|
7993
7993
|
return t.forEach((s) => {
|
|
7994
7994
|
const i = new ye(s, 0), a = new ye(s, Number.POSITIVE_INFINITY);
|
|
7995
7995
|
this.Zr.forEachInRange([i, a], (c) => {
|
|
@@ -8002,7 +8002,7 @@ class cy {
|
|
|
8002
8002
|
let i = r;
|
|
8003
8003
|
L.isDocumentKey(i) || (i = i.child(""));
|
|
8004
8004
|
const a = new ye(new L(i), 0);
|
|
8005
|
-
let c = new
|
|
8005
|
+
let c = new me(W);
|
|
8006
8006
|
return this.Zr.forEachWhile((l) => {
|
|
8007
8007
|
const d = l.key.path;
|
|
8008
8008
|
return !!r.isPrefixOf(d) && // Rows with document keys more than one segment longer than the query
|
|
@@ -8538,7 +8538,7 @@ class py {
|
|
|
8538
8538
|
}
|
|
8539
8539
|
/** Applies the query filter and sorting to the provided documents. */
|
|
8540
8540
|
Ds(e, t) {
|
|
8541
|
-
let r = new
|
|
8541
|
+
let r = new me(zh(e));
|
|
8542
8542
|
return t.forEach((s, i) => {
|
|
8543
8543
|
Ti(e, i) && (r = r.add(i));
|
|
8544
8544
|
}), r;
|
|
@@ -13244,8 +13244,8 @@ var nT = Object.defineProperty, rT = (n, e, t, r) => {
|
|
|
13244
13244
|
for (var s = void 0, i = n.length - 1, a; i >= 0; i--)
|
|
13245
13245
|
(a = n[i]) && (s = a(e, t, s) || s);
|
|
13246
13246
|
return s && nT(e, t, s), s;
|
|
13247
|
-
},
|
|
13248
|
-
const Gd = (
|
|
13247
|
+
}, _e;
|
|
13248
|
+
const Gd = (_e = class {
|
|
13249
13249
|
/**
|
|
13250
13250
|
* Registers a class to be used by the persistence engine.
|
|
13251
13251
|
* @param className the name of the class to be registered
|
|
@@ -13306,7 +13306,7 @@ const Gd = (ge = class {
|
|
|
13306
13306
|
* @see registerFactory
|
|
13307
13307
|
*/
|
|
13308
13308
|
static annotations(n) {
|
|
13309
|
-
if (n instanceof
|
|
13309
|
+
if (n instanceof _e ? n = n.className : typeof n == "string" || (n = new n().className), !this._factoryMap[n]) throw new Error(`You should register class ${n} prior to use.`);
|
|
13310
13310
|
return this._factoryMap[n].annotation;
|
|
13311
13311
|
}
|
|
13312
13312
|
/**
|
|
@@ -13442,7 +13442,7 @@ const Gd = (ge = class {
|
|
|
13442
13442
|
if (!this.className) throw new Error(`You should register \`${this.constructor.name || this.toString() || "this"}\` class prior to streaming it.`);
|
|
13443
13443
|
return this._persistentProperties.forEach((t) => {
|
|
13444
13444
|
const r = this[t.name], s = this.removeUnderscore(t);
|
|
13445
|
-
r != null && (t.isReference ? e[s] = this.toReferenceObj(t, n) : e[s] = this.toDeepObj(r, n), t.searchableArray && (e[
|
|
13445
|
+
r != null && (t.isReference ? e[s] = this.toReferenceObj(t, n) : e[s] = this.toDeepObj(r, n), t.searchableArray && (e[_e.searchableArrayNameFor(s)] = r.map((i) => i.id)));
|
|
13446
13446
|
}), e.__className = this.className, e;
|
|
13447
13447
|
}
|
|
13448
13448
|
static searchableArrayNameFor(n) {
|
|
@@ -13453,11 +13453,11 @@ const Gd = (ge = class {
|
|
|
13453
13453
|
if (Array.isArray(n))
|
|
13454
13454
|
return n.map((e) => this.fromDeepObject(e));
|
|
13455
13455
|
if (n.__documentReference) {
|
|
13456
|
-
const e = n, t =
|
|
13456
|
+
const e = n, t = _e.createInstance(e);
|
|
13457
13457
|
return t.__documentReference = n.__documentReference, t;
|
|
13458
13458
|
}
|
|
13459
13459
|
if (n.__className)
|
|
13460
|
-
return
|
|
13460
|
+
return _e.createInstance(n);
|
|
13461
13461
|
if (typeof n == "object") {
|
|
13462
13462
|
const e = {};
|
|
13463
13463
|
return Object.entries(n).forEach(
|
|
@@ -13471,7 +13471,7 @@ const Gd = (ge = class {
|
|
|
13471
13471
|
if (Array.isArray(n))
|
|
13472
13472
|
return n.map((t) => this.toDeepObj(t, e));
|
|
13473
13473
|
if (n.__documentReference) return n;
|
|
13474
|
-
if (n instanceof
|
|
13474
|
+
if (n instanceof _e)
|
|
13475
13475
|
return n.toObj(e);
|
|
13476
13476
|
if (typeof n == "object") {
|
|
13477
13477
|
const t = {};
|
|
@@ -13488,7 +13488,7 @@ const Gd = (ge = class {
|
|
|
13488
13488
|
}
|
|
13489
13489
|
toReferenceObj(n, e) {
|
|
13490
13490
|
const t = this[n.name];
|
|
13491
|
-
return Array.isArray(t) ? t.map((r) => (n.isPureReference || this.pushDocument(e,
|
|
13491
|
+
return Array.isArray(t) ? t.map((r) => (n.isPureReference || this.pushDocument(e, _e.collectionPath(r, n), r), this.buildRefObject(r, _e.collectionPath(r, n), n.cachedPropsConfig?.cachedProps))) : (n.isPureReference || this.pushDocument(e, _e.collectionPath(t, n), t), this.buildRefObject(t, _e.collectionPath(t, n), n.cachedPropsConfig?.cachedProps));
|
|
13492
13492
|
}
|
|
13493
13493
|
buildRefObject(n, e, t) {
|
|
13494
13494
|
const r = t?.reduce((s, i) => (n[i] !== void 0 && (s[i] = n[i]), s), {});
|
|
@@ -13511,14 +13511,14 @@ const Gd = (ge = class {
|
|
|
13511
13511
|
return n.name.slice(1);
|
|
13512
13512
|
}
|
|
13513
13513
|
static createReference(n) {
|
|
13514
|
-
const e =
|
|
13514
|
+
const e = _e.createInstance(n);
|
|
13515
13515
|
return e.__documentReference = n.__documentReference || { storedInCollection: e.className }, e;
|
|
13516
13516
|
}
|
|
13517
13517
|
static createInstance(n) {
|
|
13518
13518
|
if (typeof n == "string")
|
|
13519
|
-
return new (
|
|
13519
|
+
return new (_e.classFactory(n))();
|
|
13520
13520
|
try {
|
|
13521
|
-
return new (
|
|
13521
|
+
return new (_e.classFactory(n.__className))().fromObject(n);
|
|
13522
13522
|
} catch (e) {
|
|
13523
13523
|
const t = Object.entries(n).filter(([r, s]) => s != null && typeof s != "function").map(([r, s]) => `${r}: ${s}`).join(`,
|
|
13524
13524
|
`);
|
|
@@ -13531,25 +13531,25 @@ const Gd = (ge = class {
|
|
|
13531
13531
|
}
|
|
13532
13532
|
}
|
|
13533
13533
|
static propInfo(n, e) {
|
|
13534
|
-
return
|
|
13534
|
+
return _e.createInstance(n).getPropInfo(e);
|
|
13535
13535
|
}
|
|
13536
13536
|
/**
|
|
13537
13537
|
* Retrieves a collection of references with the properties that are stored in the reference object
|
|
13538
13538
|
* @returns the references collection
|
|
13539
13539
|
*/
|
|
13540
13540
|
static getSystemRegisteredReferencesWithCachedProps() {
|
|
13541
|
-
return
|
|
13542
|
-
const t =
|
|
13541
|
+
return _e.registeredClassesAndLegacyNames().reduce((n, e) => {
|
|
13542
|
+
const t = _e.createInstance(e).getPersistentProperties().filter(
|
|
13543
13543
|
(r) => r.cachedPropsConfig?.cachedProps
|
|
13544
13544
|
);
|
|
13545
13545
|
return t.length > 0 && (n[e] = t), n;
|
|
13546
13546
|
}, {});
|
|
13547
13547
|
}
|
|
13548
|
-
},
|
|
13548
|
+
}, _e._factoryMap = {}, _e);
|
|
13549
13549
|
rT([
|
|
13550
13550
|
Zn
|
|
13551
13551
|
], Gd.prototype, "_id");
|
|
13552
|
-
let
|
|
13552
|
+
let pe = Gd;
|
|
13553
13553
|
function Zn(n, e) {
|
|
13554
13554
|
return sT()(n, e);
|
|
13555
13555
|
}
|
|
@@ -13565,16 +13565,16 @@ function sT(n) {
|
|
|
13565
13565
|
}
|
|
13566
13566
|
function iT(n, e) {
|
|
13567
13567
|
return (t) => {
|
|
13568
|
-
|
|
13568
|
+
pe.registerFactory(n, t, e), t.prototype.__className = n;
|
|
13569
13569
|
};
|
|
13570
13570
|
}
|
|
13571
13571
|
const Kd = class Qd {
|
|
13572
13572
|
constructor(e, t, r) {
|
|
13573
13573
|
if (r) {
|
|
13574
|
-
if (!(t instanceof
|
|
13574
|
+
if (!(t instanceof pe)) throw new Error(Qd.error.persistentNeedForSubCollection);
|
|
13575
13575
|
this.collectionName = `${t.className}/${t.id}/${r}`;
|
|
13576
13576
|
} else
|
|
13577
|
-
this.collectionName = t instanceof
|
|
13577
|
+
this.collectionName = t instanceof pe ? t.className : t;
|
|
13578
13578
|
this._stream = e;
|
|
13579
13579
|
}
|
|
13580
13580
|
/**
|
|
@@ -13589,7 +13589,7 @@ const Kd = class Qd {
|
|
|
13589
13589
|
findById(e, t) {
|
|
13590
13590
|
return new Promise((r, s) => {
|
|
13591
13591
|
this._stream.findById(e, this.collectionName).then((i) => {
|
|
13592
|
-
i ? (t ? t.fromObject(i) : t =
|
|
13592
|
+
i ? (t ? t.fromObject(i) : t = pe.createInstance(i), r(t)) : r(void 0);
|
|
13593
13593
|
}).catch((i) => s(i));
|
|
13594
13594
|
});
|
|
13595
13595
|
}
|
|
@@ -13631,7 +13631,7 @@ const Kd = class Qd {
|
|
|
13631
13631
|
*/
|
|
13632
13632
|
query(e = {}, t) {
|
|
13633
13633
|
if (t) {
|
|
13634
|
-
const r = t instanceof
|
|
13634
|
+
const r = t instanceof pe ? t.className : t;
|
|
13635
13635
|
e.operations || (e.operations = []), e.operations.push(
|
|
13636
13636
|
{ property: "__className", operator: "==", value: r }
|
|
13637
13637
|
);
|
|
@@ -13668,14 +13668,14 @@ const Kd = class Qd {
|
|
|
13668
13668
|
return this._stream.onCollectionChange(
|
|
13669
13669
|
e.getQueryObject(),
|
|
13670
13670
|
this.collectionName,
|
|
13671
|
-
(r) => t(
|
|
13671
|
+
(r) => t(r.map((s) => pe.createInstance(s)))
|
|
13672
13672
|
);
|
|
13673
13673
|
}
|
|
13674
13674
|
toPersistentChangeObject(e) {
|
|
13675
13675
|
return {
|
|
13676
13676
|
...e,
|
|
13677
|
-
before: e.before &&
|
|
13678
|
-
after: e.after &&
|
|
13677
|
+
before: e.before && pe.createInstance(e.before),
|
|
13678
|
+
after: e.after && pe.createInstance(e.after)
|
|
13679
13679
|
};
|
|
13680
13680
|
}
|
|
13681
13681
|
// /**
|
|
@@ -13690,7 +13690,7 @@ const Kd = class Qd {
|
|
|
13690
13690
|
mapToInstance(e) {
|
|
13691
13691
|
return new Promise((t, r) => {
|
|
13692
13692
|
e().then((s) => t(
|
|
13693
|
-
s.map((i) =>
|
|
13693
|
+
s.map((i) => pe.createInstance(i))
|
|
13694
13694
|
)).catch((s) => r(s));
|
|
13695
13695
|
});
|
|
13696
13696
|
}
|
|
@@ -13706,15 +13706,15 @@ const Kd = class Qd {
|
|
|
13706
13706
|
if (Object.values(e).length === 0) return e;
|
|
13707
13707
|
const t = e.operations?.map((r) => {
|
|
13708
13708
|
const s = r.value[0] ?? r.value;
|
|
13709
|
-
return ln.isArrayOperator(r.operator) && s instanceof
|
|
13710
|
-
property:
|
|
13709
|
+
return ln.isArrayOperator(r.operator) && s instanceof pe ? {
|
|
13710
|
+
property: pe.searchableArrayNameFor(r.property),
|
|
13711
13711
|
operator: r.operator,
|
|
13712
13712
|
value: Array.isArray(r.value) ? r.value.map((i) => i.id) : s.id,
|
|
13713
13713
|
aggregate: r.aggregate
|
|
13714
13714
|
} : {
|
|
13715
13715
|
property: r.property,
|
|
13716
13716
|
operator: r.operator,
|
|
13717
|
-
value: r.value instanceof
|
|
13717
|
+
value: r.value instanceof pe ? { id: r.value.id } : r.value,
|
|
13718
13718
|
aggregate: r.aggregate
|
|
13719
13719
|
};
|
|
13720
13720
|
}) ?? [];
|
|
@@ -13880,7 +13880,7 @@ class oT {
|
|
|
13880
13880
|
* query.instanceOf( Person ).where( 'age', '>', 18 )
|
|
13881
13881
|
*/
|
|
13882
13882
|
instanceOf(e) {
|
|
13883
|
-
const t = e instanceof
|
|
13883
|
+
const t = e instanceof pe ? e.className : e;
|
|
13884
13884
|
return this.queryObject.operations?.push({
|
|
13885
13885
|
property: "__className",
|
|
13886
13886
|
operator: "==",
|
|
@@ -14022,10 +14022,10 @@ let aT = Xd;
|
|
|
14022
14022
|
class ln {
|
|
14023
14023
|
installCachedPropsUpdaters(e = {}) {
|
|
14024
14024
|
ln.onUpdate = e.onUpdate;
|
|
14025
|
-
const t =
|
|
14025
|
+
const t = pe.getSystemRegisteredReferencesWithCachedProps(), r = {};
|
|
14026
14026
|
Object.entries(t).forEach(([i, a]) => {
|
|
14027
14027
|
a.forEach((c) => {
|
|
14028
|
-
const l =
|
|
14028
|
+
const l = pe.collectionPath(pe.createInstance(i), c);
|
|
14029
14029
|
r[l] || (r[l] = []), r[l].push({
|
|
14030
14030
|
prop: c,
|
|
14031
14031
|
collectionPropOwner: i
|
|
@@ -14034,10 +14034,10 @@ class ln {
|
|
|
14034
14034
|
});
|
|
14035
14035
|
const s = [];
|
|
14036
14036
|
return Object.entries(r).forEach(([i, a]) => {
|
|
14037
|
-
const c = this.
|
|
14037
|
+
const c = this.subscribeToDocumentChangeListener(i, (l) => ln.processDocumentChange(l, a));
|
|
14038
14038
|
if (c)
|
|
14039
14039
|
s.push(c);
|
|
14040
|
-
else if (e.noThrowOnNonImplementedListener) throw new Error("The method
|
|
14040
|
+
else if (e.noThrowOnNonImplementedListener) throw new Error("The method documentChangeListener has not been implemented in the concrete data source");
|
|
14041
14041
|
}), s;
|
|
14042
14042
|
}
|
|
14043
14043
|
/**
|
|
@@ -14048,9 +14048,9 @@ class ln {
|
|
|
14048
14048
|
* @param props the properties to be watched in the collection
|
|
14049
14049
|
* @param listener the listener to be called when a document is changed
|
|
14050
14050
|
* @returns a function that uninstalls the listener. If the returned value is undefined
|
|
14051
|
-
* the method
|
|
14051
|
+
* the method documentChangeListener has not been implemented in the concrete data source
|
|
14052
14052
|
*/
|
|
14053
|
-
|
|
14053
|
+
subscribeToDocumentChangeListener(e, t) {
|
|
14054
14054
|
}
|
|
14055
14055
|
/**
|
|
14056
14056
|
* Utility method to convert a query object to a property path query object
|
|
@@ -14066,9 +14066,9 @@ class ln {
|
|
|
14066
14066
|
*/
|
|
14067
14067
|
static toPropertyPathOperations(e) {
|
|
14068
14068
|
return e ? e.map((t) => {
|
|
14069
|
-
if (ln.isArrayOperator(t.operator) && t.value[0] instanceof
|
|
14069
|
+
if (ln.isArrayOperator(t.operator) && t.value[0] instanceof pe)
|
|
14070
14070
|
return {
|
|
14071
|
-
property:
|
|
14071
|
+
property: pe.searchableArrayNameFor(t.property),
|
|
14072
14072
|
operator: t.operator,
|
|
14073
14073
|
value: t.value.map((i) => i.id),
|
|
14074
14074
|
aggregate: t.aggregate
|
|
@@ -14203,7 +14203,7 @@ var uT = Object.defineProperty, lT = Object.getOwnPropertyDescriptor, er = (n, e
|
|
|
14203
14203
|
(a = n[i]) && (s = (r ? a(e, t, s) : a(s)) || s);
|
|
14204
14204
|
return r && s && uT(e, t, s), s;
|
|
14205
14205
|
};
|
|
14206
|
-
let mn = class extends
|
|
14206
|
+
let mn = class extends pe {
|
|
14207
14207
|
constructor() {
|
|
14208
14208
|
super(...arguments), this._onChange = new Wd();
|
|
14209
14209
|
}
|
|
@@ -20371,14 +20371,8 @@ class yA extends ln {
|
|
|
20371
20371
|
onCollectionChange(e, t, r) {
|
|
20372
20372
|
const s = this.queryObjectToQueryConstraints(e, t);
|
|
20373
20373
|
return vl(s, (i) => {
|
|
20374
|
-
i.docChanges().
|
|
20375
|
-
|
|
20376
|
-
type: a.type === "added" ? "create" : a.type === "modified" ? "update" : "delete",
|
|
20377
|
-
after: a.doc.data(),
|
|
20378
|
-
before: void 0,
|
|
20379
|
-
params: {}
|
|
20380
|
-
});
|
|
20381
|
-
});
|
|
20374
|
+
const a = i.docChanges().map((c) => c.doc.data());
|
|
20375
|
+
r(a);
|
|
20382
20376
|
});
|
|
20383
20377
|
}
|
|
20384
20378
|
onDocumentChange(e, t, r) {
|