@entropic-bond/firebase 1.13.12 → 1.13.14
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.
|
@@ -1986,8 +1986,8 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
1986
1986
|
for (let b = 0; b < u.length; ++b) {
|
|
1987
1987
|
const O = u[b];
|
|
1988
1988
|
if (O && !O.da && O.capture == h) {
|
|
1989
|
-
const z = O.listener,
|
|
1990
|
-
O.fa && Fi(o.i, O), v = z.call(
|
|
1989
|
+
const z = O.listener, pe = O.ha || O.src;
|
|
1990
|
+
O.fa && Fi(o.i, O), v = z.call(pe, p) !== !1 && v;
|
|
1991
1991
|
}
|
|
1992
1992
|
}
|
|
1993
1993
|
return v && !p.defaultPrevented;
|
|
@@ -2095,12 +2095,12 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2095
2095
|
if (o.g) if (b) {
|
|
2096
2096
|
var O = "", z = b.split("&");
|
|
2097
2097
|
for (let J = 0; J < z.length; J++) {
|
|
2098
|
-
var
|
|
2099
|
-
if (
|
|
2100
|
-
const ge =
|
|
2101
|
-
|
|
2098
|
+
var pe = z[J].split("=");
|
|
2099
|
+
if (pe.length > 1) {
|
|
2100
|
+
const ge = pe[0];
|
|
2101
|
+
pe = pe[1];
|
|
2102
2102
|
const et = ge.split("_");
|
|
2103
|
-
O = et.length >= 2 && et[1] == "type" ? O + (ge + "=" +
|
|
2103
|
+
O = et.length >= 2 && et[1] == "type" ? O + (ge + "=" + pe + "&") : O + (ge + "=redacted&");
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
} else O = null;
|
|
@@ -2202,9 +2202,9 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2202
2202
|
}, bt.prototype.Y = function(o) {
|
|
2203
2203
|
try {
|
|
2204
2204
|
if (o == this.g) e: {
|
|
2205
|
-
const z = Ct(this.g),
|
|
2205
|
+
const z = Ct(this.g), pe = this.g.ya(), J = this.g.ca();
|
|
2206
2206
|
if (!(z < 3) && (z != 3 || this.g && (this.h.h || this.g.la() || Qc(this.g)))) {
|
|
2207
|
-
this.K || z != 4 ||
|
|
2207
|
+
this.K || z != 4 || pe == 7 || (pe == 8 || J <= 0 ? ir(3) : ir(2)), Ji(this);
|
|
2208
2208
|
var u = this.g.ca();
|
|
2209
2209
|
this.X = u;
|
|
2210
2210
|
var h = Ap(this);
|
|
@@ -2352,8 +2352,8 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2352
2352
|
var O = o;
|
|
2353
2353
|
if (p.na = iu(p, p.L ? p.ba : null, p.W), O.L) {
|
|
2354
2354
|
Lc(p.h, O);
|
|
2355
|
-
var z = O,
|
|
2356
|
-
|
|
2355
|
+
var z = O, pe = p.O;
|
|
2356
|
+
pe && (z.H = pe), z.D && (Ji(z), us(z)), p.g = O;
|
|
2357
2357
|
} else eu(p);
|
|
2358
2358
|
h.i.length > 0 && ps(h);
|
|
2359
2359
|
} else J[0] != "stop" && J[0] != "close" || nn(h, 7);
|
|
@@ -2917,8 +2917,8 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2917
2917
|
var v = o.i;
|
|
2918
2918
|
let z = -1;
|
|
2919
2919
|
for (; ; ) {
|
|
2920
|
-
const
|
|
2921
|
-
z == -1 ? h > 0 ? (z = v[0].g,
|
|
2920
|
+
const pe = ["count=" + h];
|
|
2921
|
+
z == -1 ? h > 0 ? (z = v[0].g, pe.push("ofs=" + z)) : z = 0 : pe.push("ofs=" + z);
|
|
2922
2922
|
let J = !0;
|
|
2923
2923
|
for (let ge = 0; ge < h; ge++) {
|
|
2924
2924
|
var b = v[ge].g;
|
|
@@ -2930,17 +2930,17 @@ var _h, Ir, yh, Ss, Mo, Eh, Th, wh;
|
|
|
2930
2930
|
var O = et instanceof Map ? et : Object.entries(et);
|
|
2931
2931
|
for (const [rn, kt] of O) {
|
|
2932
2932
|
let Nt = kt;
|
|
2933
|
-
c(kt) && (Nt = Wi(kt)),
|
|
2933
|
+
c(kt) && (Nt = Wi(kt)), pe.push(b + rn + "=" + encodeURIComponent(Nt));
|
|
2934
2934
|
}
|
|
2935
2935
|
} catch (rn) {
|
|
2936
|
-
throw
|
|
2936
|
+
throw pe.push(b + "type=" + encodeURIComponent("_badmap")), rn;
|
|
2937
2937
|
}
|
|
2938
2938
|
} catch {
|
|
2939
2939
|
p && p(et);
|
|
2940
2940
|
}
|
|
2941
2941
|
}
|
|
2942
2942
|
if (J) {
|
|
2943
|
-
O =
|
|
2943
|
+
O = pe.join("&");
|
|
2944
2944
|
break e;
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
@@ -3836,7 +3836,7 @@ function Ke(n, e) {
|
|
|
3836
3836
|
function Og(n, e) {
|
|
3837
3837
|
if (e <= 0) throw new D(P.INVALID_ARGUMENT, `Function ${n}() requires a positive number, but it was: ${e}.`);
|
|
3838
3838
|
}
|
|
3839
|
-
function
|
|
3839
|
+
function de(n, e) {
|
|
3840
3840
|
const t = {
|
|
3841
3841
|
typeString: n
|
|
3842
3842
|
};
|
|
@@ -3978,9 +3978,9 @@ class ne {
|
|
|
3978
3978
|
}
|
|
3979
3979
|
}
|
|
3980
3980
|
ne._jsonSchemaVersion = "firestore/timestamp/1.0", ne._jsonSchema = {
|
|
3981
|
-
type:
|
|
3982
|
-
seconds:
|
|
3983
|
-
nanoseconds:
|
|
3981
|
+
type: de("string", ne._jsonSchemaVersion),
|
|
3982
|
+
seconds: de("number"),
|
|
3983
|
+
nanoseconds: de("number")
|
|
3984
3984
|
};
|
|
3985
3985
|
class q {
|
|
3986
3986
|
static fromTimestamp(e) {
|
|
@@ -5363,7 +5363,7 @@ function Qg(n, e) {
|
|
|
5363
5363
|
}
|
|
5364
5364
|
class Mh {
|
|
5365
5365
|
}
|
|
5366
|
-
class
|
|
5366
|
+
class he extends Mh {
|
|
5367
5367
|
constructor(e, t, r) {
|
|
5368
5368
|
super(), this.field = e, this.op = t, this.value = r;
|
|
5369
5369
|
}
|
|
@@ -5371,7 +5371,7 @@ class le extends Mh {
|
|
|
5371
5371
|
* Creates a filter based on the provided arguments.
|
|
5372
5372
|
*/
|
|
5373
5373
|
static create(e, t, r) {
|
|
5374
|
-
return e.isKeyField() ? t === "in" || t === "not-in" ? this.createKeyFieldInFilter(e, t, r) : new Yg(e, t, r) : t === "array-contains" ? new e_(e, r) : t === "in" ? new t_(e, r) : t === "not-in" ? new n_(e, r) : t === "array-contains-any" ? new r_(e, r) : new
|
|
5374
|
+
return e.isKeyField() ? t === "in" || t === "not-in" ? this.createKeyFieldInFilter(e, t, r) : new Yg(e, t, r) : t === "array-contains" ? new e_(e, r) : t === "in" ? new t_(e, r) : t === "not-in" ? new n_(e, r) : t === "array-contains-any" ? new r_(e, r) : new he(e, t, r);
|
|
5375
5375
|
}
|
|
5376
5376
|
static createKeyFieldInFilter(e, t, r) {
|
|
5377
5377
|
return t === "in" ? new Jg(e, r) : new Zg(e, r);
|
|
@@ -5450,7 +5450,7 @@ function Xg(n) {
|
|
|
5450
5450
|
return !0;
|
|
5451
5451
|
}
|
|
5452
5452
|
function Bo(n) {
|
|
5453
|
-
if (n instanceof
|
|
5453
|
+
if (n instanceof he)
|
|
5454
5454
|
return n.field.canonicalString() + n.op.toString() + qn(n.value);
|
|
5455
5455
|
if (Uh(n))
|
|
5456
5456
|
return n.filters.map((e) => Bo(e)).join(",");
|
|
@@ -5460,20 +5460,20 @@ function Bo(n) {
|
|
|
5460
5460
|
}
|
|
5461
5461
|
}
|
|
5462
5462
|
function Fh(n, e) {
|
|
5463
|
-
return n instanceof
|
|
5464
|
-
return s instanceof
|
|
5463
|
+
return n instanceof he ? function(r, s) {
|
|
5464
|
+
return s instanceof he && r.op === s.op && r.field.isEqual(s.field) && dt(r.value, s.value);
|
|
5465
5465
|
}(n, e) : n instanceof Xe ? function(r, s) {
|
|
5466
5466
|
return s instanceof Xe && r.op === s.op && r.filters.length === s.filters.length ? r.filters.reduce((i, a, c) => i && Fh(a, s.filters[c]), !0) : !1;
|
|
5467
5467
|
}(n, e) : void x(19439);
|
|
5468
5468
|
}
|
|
5469
5469
|
function Bh(n) {
|
|
5470
|
-
return n instanceof
|
|
5470
|
+
return n instanceof he ? function(t) {
|
|
5471
5471
|
return `${t.field.canonicalString()} ${t.op} ${qn(t.value)}`;
|
|
5472
5472
|
}(n) : n instanceof Xe ? function(t) {
|
|
5473
5473
|
return t.op.toString() + " {" + t.getFilters().map(Bh).join(" ,") + "}";
|
|
5474
5474
|
}(n) : "Filter";
|
|
5475
5475
|
}
|
|
5476
|
-
class Yg extends
|
|
5476
|
+
class Yg extends he {
|
|
5477
5477
|
constructor(e, t, r) {
|
|
5478
5478
|
super(e, t, r), this.key = L.fromName(r.referenceValue);
|
|
5479
5479
|
}
|
|
@@ -5482,7 +5482,7 @@ class Yg extends le {
|
|
|
5482
5482
|
return this.matchesComparison(t);
|
|
5483
5483
|
}
|
|
5484
5484
|
}
|
|
5485
|
-
class Jg extends
|
|
5485
|
+
class Jg extends he {
|
|
5486
5486
|
constructor(e, t) {
|
|
5487
5487
|
super(e, "in", t), this.keys = qh("in", t);
|
|
5488
5488
|
}
|
|
@@ -5490,7 +5490,7 @@ class Jg extends le {
|
|
|
5490
5490
|
return this.keys.some((t) => t.isEqual(e.key));
|
|
5491
5491
|
}
|
|
5492
5492
|
}
|
|
5493
|
-
class Zg extends
|
|
5493
|
+
class Zg extends he {
|
|
5494
5494
|
constructor(e, t) {
|
|
5495
5495
|
super(e, "not-in", t), this.keys = qh("not-in", t);
|
|
5496
5496
|
}
|
|
@@ -5501,7 +5501,7 @@ class Zg extends le {
|
|
|
5501
5501
|
function qh(n, e) {
|
|
5502
5502
|
return (e.arrayValue?.values || []).map((t) => L.fromName(t.referenceValue));
|
|
5503
5503
|
}
|
|
5504
|
-
class e_ extends
|
|
5504
|
+
class e_ extends he {
|
|
5505
5505
|
constructor(e, t) {
|
|
5506
5506
|
super(e, "array-contains", t);
|
|
5507
5507
|
}
|
|
@@ -5510,7 +5510,7 @@ class e_ extends le {
|
|
|
5510
5510
|
return la(t) && Mr(t.arrayValue, this.value);
|
|
5511
5511
|
}
|
|
5512
5512
|
}
|
|
5513
|
-
class t_ extends
|
|
5513
|
+
class t_ extends he {
|
|
5514
5514
|
constructor(e, t) {
|
|
5515
5515
|
super(e, "in", t);
|
|
5516
5516
|
}
|
|
@@ -5519,7 +5519,7 @@ class t_ extends le {
|
|
|
5519
5519
|
return t !== null && Mr(this.value.arrayValue, t);
|
|
5520
5520
|
}
|
|
5521
5521
|
}
|
|
5522
|
-
class n_ extends
|
|
5522
|
+
class n_ extends he {
|
|
5523
5523
|
constructor(e, t) {
|
|
5524
5524
|
super(e, "not-in", t);
|
|
5525
5525
|
}
|
|
@@ -5531,7 +5531,7 @@ class n_ extends le {
|
|
|
5531
5531
|
return t !== null && t.nullValue === void 0 && !Mr(this.value.arrayValue, t);
|
|
5532
5532
|
}
|
|
5533
5533
|
}
|
|
5534
|
-
class r_ extends
|
|
5534
|
+
class r_ extends he {
|
|
5535
5535
|
constructor(e, t) {
|
|
5536
5536
|
super(e, "array-contains-any", t);
|
|
5537
5537
|
}
|
|
@@ -7111,22 +7111,22 @@ function ud(n) {
|
|
|
7111
7111
|
switch (t.unaryFilter.op) {
|
|
7112
7112
|
case "IS_NAN":
|
|
7113
7113
|
const r = Cn(t.unaryFilter.field);
|
|
7114
|
-
return
|
|
7114
|
+
return he.create(r, "==", {
|
|
7115
7115
|
doubleValue: NaN
|
|
7116
7116
|
});
|
|
7117
7117
|
case "IS_NULL":
|
|
7118
7118
|
const s = Cn(t.unaryFilter.field);
|
|
7119
|
-
return
|
|
7119
|
+
return he.create(s, "==", {
|
|
7120
7120
|
nullValue: "NULL_VALUE"
|
|
7121
7121
|
});
|
|
7122
7122
|
case "IS_NOT_NAN":
|
|
7123
7123
|
const i = Cn(t.unaryFilter.field);
|
|
7124
|
-
return
|
|
7124
|
+
return he.create(i, "!=", {
|
|
7125
7125
|
doubleValue: NaN
|
|
7126
7126
|
});
|
|
7127
7127
|
case "IS_NOT_NULL":
|
|
7128
7128
|
const a = Cn(t.unaryFilter.field);
|
|
7129
|
-
return
|
|
7129
|
+
return he.create(a, "!=", {
|
|
7130
7130
|
nullValue: "NULL_VALUE"
|
|
7131
7131
|
});
|
|
7132
7132
|
case "OPERATOR_UNSPECIFIED":
|
|
@@ -7135,7 +7135,7 @@ function ud(n) {
|
|
|
7135
7135
|
return x(60726);
|
|
7136
7136
|
}
|
|
7137
7137
|
}(n) : n.fieldFilter !== void 0 ? function(t) {
|
|
7138
|
-
return
|
|
7138
|
+
return he.create(Cn(t.fieldFilter.field), function(s) {
|
|
7139
7139
|
switch (s) {
|
|
7140
7140
|
case "EQUAL":
|
|
7141
7141
|
return "==";
|
|
@@ -7196,7 +7196,7 @@ function Cn(n) {
|
|
|
7196
7196
|
return we.fromServerFormat(n.fieldPath);
|
|
7197
7197
|
}
|
|
7198
7198
|
function ld(n) {
|
|
7199
|
-
return n instanceof
|
|
7199
|
+
return n instanceof he ? function(t) {
|
|
7200
7200
|
if (t.op === "==") {
|
|
7201
7201
|
if (Lu(t.value)) return {
|
|
7202
7202
|
unaryFilter: {
|
|
@@ -11374,7 +11374,7 @@ class pt {
|
|
|
11374
11374
|
return new pt(this.firestore, e, this._query);
|
|
11375
11375
|
}
|
|
11376
11376
|
}
|
|
11377
|
-
class
|
|
11377
|
+
class fe {
|
|
11378
11378
|
/** @hideconstructor */
|
|
11379
11379
|
constructor(e, t, r) {
|
|
11380
11380
|
this.converter = t, this._key = r, /** The type of this Firestore reference. */
|
|
@@ -11403,7 +11403,7 @@ class de {
|
|
|
11403
11403
|
return new qt(this.firestore, this.converter, this._key.path.popLast());
|
|
11404
11404
|
}
|
|
11405
11405
|
withConverter(e) {
|
|
11406
|
-
return new
|
|
11406
|
+
return new fe(this.firestore, e, this._key);
|
|
11407
11407
|
}
|
|
11408
11408
|
/**
|
|
11409
11409
|
* Returns a JSON-serializable representation of this `DocumentReference` instance.
|
|
@@ -11412,17 +11412,17 @@ class de {
|
|
|
11412
11412
|
*/
|
|
11413
11413
|
toJSON() {
|
|
11414
11414
|
return {
|
|
11415
|
-
type:
|
|
11415
|
+
type: fe._jsonSchemaVersion,
|
|
11416
11416
|
referencePath: this._key.toString()
|
|
11417
11417
|
};
|
|
11418
11418
|
}
|
|
11419
11419
|
static fromJSON(e, t, r) {
|
|
11420
|
-
if (Hr(t,
|
|
11420
|
+
if (Hr(t, fe._jsonSchema)) return new fe(e, r || null, new L(Z.fromString(t.referencePath)));
|
|
11421
11421
|
}
|
|
11422
11422
|
}
|
|
11423
|
-
|
|
11424
|
-
type:
|
|
11425
|
-
referencePath:
|
|
11423
|
+
fe._jsonSchemaVersion = "firestore/documentReference/1.0", fe._jsonSchema = {
|
|
11424
|
+
type: de("string", fe._jsonSchemaVersion),
|
|
11425
|
+
referencePath: de("string")
|
|
11426
11426
|
};
|
|
11427
11427
|
class qt extends pt {
|
|
11428
11428
|
/** @hideconstructor */
|
|
@@ -11447,7 +11447,7 @@ class qt extends pt {
|
|
|
11447
11447
|
*/
|
|
11448
11448
|
get parent() {
|
|
11449
11449
|
const e = this._path.popLast();
|
|
11450
|
-
return e.isEmpty() ? null : new
|
|
11450
|
+
return e.isEmpty() ? null : new fe(
|
|
11451
11451
|
this.firestore,
|
|
11452
11452
|
/* converter= */
|
|
11453
11453
|
null,
|
|
@@ -11469,7 +11469,7 @@ function fl(n, e, ...t) {
|
|
|
11469
11469
|
);
|
|
11470
11470
|
}
|
|
11471
11471
|
{
|
|
11472
|
-
if (!(n instanceof
|
|
11472
|
+
if (!(n instanceof fe || n instanceof qt)) throw new D(P.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
|
|
11473
11473
|
const r = n._path.child(Z.fromString(e, ...t));
|
|
11474
11474
|
return bu(r), new qt(
|
|
11475
11475
|
n.firestore,
|
|
@@ -11484,7 +11484,7 @@ function vs(n, e, ...t) {
|
|
|
11484
11484
|
// 'undefined' and 'null'.
|
|
11485
11485
|
arguments.length === 1 && (e = ca.newId()), Ah("doc", "path", e), n instanceof Si) {
|
|
11486
11486
|
const r = Z.fromString(e, ...t);
|
|
11487
|
-
return Ru(r), new
|
|
11487
|
+
return Ru(r), new fe(
|
|
11488
11488
|
n,
|
|
11489
11489
|
/* converter= */
|
|
11490
11490
|
null,
|
|
@@ -11492,9 +11492,9 @@ function vs(n, e, ...t) {
|
|
|
11492
11492
|
);
|
|
11493
11493
|
}
|
|
11494
11494
|
{
|
|
11495
|
-
if (!(n instanceof
|
|
11495
|
+
if (!(n instanceof fe || n instanceof qt)) throw new D(P.INVALID_ARGUMENT, "Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
|
|
11496
11496
|
const r = n._path.child(Z.fromString(e, ...t));
|
|
11497
|
-
return Ru(r), new
|
|
11497
|
+
return Ru(r), new fe(n.firestore, n instanceof qt ? n.converter : null, new L(r));
|
|
11498
11498
|
}
|
|
11499
11499
|
}
|
|
11500
11500
|
const pl = "AsyncQueue";
|
|
@@ -11815,8 +11815,8 @@ class qe {
|
|
|
11815
11815
|
}
|
|
11816
11816
|
}
|
|
11817
11817
|
qe._jsonSchemaVersion = "firestore/bytes/1.0", qe._jsonSchema = {
|
|
11818
|
-
type:
|
|
11819
|
-
bytes:
|
|
11818
|
+
type: de("string", qe._jsonSchemaVersion),
|
|
11819
|
+
bytes: de("string")
|
|
11820
11820
|
};
|
|
11821
11821
|
class Ci {
|
|
11822
11822
|
/**
|
|
@@ -11912,9 +11912,9 @@ class ct {
|
|
|
11912
11912
|
}
|
|
11913
11913
|
}
|
|
11914
11914
|
ct._jsonSchemaVersion = "firestore/geoPoint/1.0", ct._jsonSchema = {
|
|
11915
|
-
type:
|
|
11916
|
-
latitude:
|
|
11917
|
-
longitude:
|
|
11915
|
+
type: de("string", ct._jsonSchemaVersion),
|
|
11916
|
+
latitude: de("number"),
|
|
11917
|
+
longitude: de("number")
|
|
11918
11918
|
};
|
|
11919
11919
|
class ut {
|
|
11920
11920
|
/**
|
|
@@ -11966,8 +11966,8 @@ class ut {
|
|
|
11966
11966
|
}
|
|
11967
11967
|
}
|
|
11968
11968
|
ut._jsonSchemaVersion = "firestore/vectorValue/1.0", ut._jsonSchema = {
|
|
11969
|
-
type:
|
|
11970
|
-
vectorValues:
|
|
11969
|
+
type: de("string", ut._jsonSchemaVersion),
|
|
11970
|
+
vectorValues: de("object")
|
|
11971
11971
|
};
|
|
11972
11972
|
const bE = /^__.*__$/;
|
|
11973
11973
|
class PE {
|
|
@@ -12233,7 +12233,7 @@ function Xr(n, e) {
|
|
|
12233
12233
|
if (r instanceof qe) return {
|
|
12234
12234
|
bytesValue: sd(s.serializer, r._byteString)
|
|
12235
12235
|
};
|
|
12236
|
-
if (r instanceof
|
|
12236
|
+
if (r instanceof fe) {
|
|
12237
12237
|
const i = s.databaseId, a = r.firestore._databaseId;
|
|
12238
12238
|
if (!a.isEqual(i)) throw s.Sc(`Document reference is for database ${a.projectId}/${a.database} but should be for database ${i.projectId}/${i.database}`);
|
|
12239
12239
|
return {
|
|
@@ -12279,7 +12279,7 @@ function Ud(n, e) {
|
|
|
12279
12279
|
};
|
|
12280
12280
|
}
|
|
12281
12281
|
function Fd(n) {
|
|
12282
|
-
return !(typeof n != "object" || n === null || n instanceof Array || n instanceof Date || n instanceof ne || n instanceof ct || n instanceof qe || n instanceof
|
|
12282
|
+
return !(typeof n != "object" || n === null || n instanceof Array || n instanceof Date || n instanceof ne || n instanceof ct || n instanceof qe || n instanceof fe || n instanceof Ma || n instanceof ut);
|
|
12283
12283
|
}
|
|
12284
12284
|
function Fa(n, e, t) {
|
|
12285
12285
|
if (!Fd(t) || !Rh(t)) {
|
|
@@ -12356,7 +12356,7 @@ class qa {
|
|
|
12356
12356
|
* The `DocumentReference` for the document included in the `DocumentSnapshot`.
|
|
12357
12357
|
*/
|
|
12358
12358
|
get ref() {
|
|
12359
|
-
return new
|
|
12359
|
+
return new fe(this._firestore, this._converter, this._key);
|
|
12360
12360
|
}
|
|
12361
12361
|
/**
|
|
12362
12362
|
* Signals whether or not the document at the snapshot's location exists.
|
|
@@ -12475,7 +12475,7 @@ class Yr extends Di {
|
|
|
12475
12475
|
/* allowArrays= */
|
|
12476
12476
|
f === "in" || f === "not-in"
|
|
12477
12477
|
);
|
|
12478
|
-
return
|
|
12478
|
+
return he.create(d, f, y);
|
|
12479
12479
|
}(e._query, "where", t, e.firestore._databaseId, this._field, this._op, this._value);
|
|
12480
12480
|
}
|
|
12481
12481
|
}
|
|
@@ -12640,7 +12640,7 @@ function wl(n, e, t) {
|
|
|
12640
12640
|
if (!L.isDocumentKey(r)) throw new D(P.INVALID_ARGUMENT, `Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);
|
|
12641
12641
|
return $s(n, new L(r));
|
|
12642
12642
|
}
|
|
12643
|
-
if (t instanceof
|
|
12643
|
+
if (t instanceof fe) return $s(n, t._key);
|
|
12644
12644
|
throw new D(P.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${fi(t)}.`);
|
|
12645
12645
|
}
|
|
12646
12646
|
function Il(n, e) {
|
|
@@ -12866,10 +12866,10 @@ class cn extends qa {
|
|
|
12866
12866
|
}
|
|
12867
12867
|
}
|
|
12868
12868
|
cn._jsonSchemaVersion = "firestore/documentSnapshot/1.0", cn._jsonSchema = {
|
|
12869
|
-
type:
|
|
12870
|
-
bundleSource:
|
|
12871
|
-
bundleName:
|
|
12872
|
-
bundle:
|
|
12869
|
+
type: de("string", cn._jsonSchemaVersion),
|
|
12870
|
+
bundleSource: de("string", "DocumentSnapshot"),
|
|
12871
|
+
bundleName: de("string"),
|
|
12872
|
+
bundle: de("string")
|
|
12873
12873
|
};
|
|
12874
12874
|
class Os extends cn {
|
|
12875
12875
|
/**
|
|
@@ -12992,15 +12992,15 @@ function jE(n) {
|
|
|
12992
12992
|
}
|
|
12993
12993
|
}
|
|
12994
12994
|
function $E(n) {
|
|
12995
|
-
n = Ke(n,
|
|
12995
|
+
n = Ke(n, fe);
|
|
12996
12996
|
const e = Ke(n.firestore, Qt);
|
|
12997
12997
|
return EE(Yn(e), n._key).then((t) => Hd(e, n, t));
|
|
12998
12998
|
}
|
|
12999
12999
|
un._jsonSchemaVersion = "firestore/querySnapshot/1.0", un._jsonSchema = {
|
|
13000
|
-
type:
|
|
13001
|
-
bundleSource:
|
|
13002
|
-
bundleName:
|
|
13003
|
-
bundle:
|
|
13000
|
+
type: de("string", un._jsonSchemaVersion),
|
|
13001
|
+
bundleSource: de("string", "QuerySnapshot"),
|
|
13002
|
+
bundleName: de("string"),
|
|
13003
|
+
bundle: de("string")
|
|
13004
13004
|
};
|
|
13005
13005
|
class Oi extends FE {
|
|
13006
13006
|
constructor(e) {
|
|
@@ -13011,7 +13011,7 @@ class Oi extends FE {
|
|
|
13011
13011
|
}
|
|
13012
13012
|
convertReference(e) {
|
|
13013
13013
|
const t = this.convertDocumentKey(e, this.firestore._databaseId);
|
|
13014
|
-
return new
|
|
13014
|
+
return new fe(
|
|
13015
13015
|
this.firestore,
|
|
13016
13016
|
/* converter= */
|
|
13017
13017
|
null,
|
|
@@ -13043,7 +13043,7 @@ function vl(n, ...e) {
|
|
|
13043
13043
|
e[r] = l.next?.bind(l), e[r + 1] = l.error?.bind(l), e[r + 2] = l.complete?.bind(l);
|
|
13044
13044
|
}
|
|
13045
13045
|
let i, a, c;
|
|
13046
|
-
if (n instanceof
|
|
13046
|
+
if (n instanceof fe) a = Ke(n.firestore, Qt), c = yi(n._key.path), i = {
|
|
13047
13047
|
next: (l) => {
|
|
13048
13048
|
e[r] && e[r](Hd(a, n, l));
|
|
13049
13049
|
},
|
|
@@ -13549,7 +13549,7 @@ const Gd = (_e = class {
|
|
|
13549
13549
|
rT([
|
|
13550
13550
|
Zn
|
|
13551
13551
|
], Gd.prototype, "_id");
|
|
13552
|
-
let
|
|
13552
|
+
let le = 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
|
+
le.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 le)) 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 le ? 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 = le.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 le ? t.className : t;
|
|
13635
13635
|
e.operations || (e.operations = []), e.operations.push(
|
|
13636
13636
|
{ property: "__className", operator: "==", value: r }
|
|
13637
13637
|
);
|
|
@@ -13666,16 +13666,21 @@ const Kd = class Qd {
|
|
|
13666
13666
|
}
|
|
13667
13667
|
onCollectionChange(e, t) {
|
|
13668
13668
|
return this._stream.onCollectionChange(
|
|
13669
|
-
e.getQueryObject(),
|
|
13669
|
+
this.preprocessQueryObject(e.getQueryObject()),
|
|
13670
13670
|
this.collectionName,
|
|
13671
|
-
(r) => t(r.map((s) =>
|
|
13671
|
+
(r) => t(r.map((s) => ({
|
|
13672
|
+
after: s.after && le.createInstance(s.after),
|
|
13673
|
+
before: s.before && le.createInstance(s.before),
|
|
13674
|
+
type: s.type,
|
|
13675
|
+
params: s.params
|
|
13676
|
+
})))
|
|
13672
13677
|
);
|
|
13673
13678
|
}
|
|
13674
13679
|
toPersistentChangeObject(e) {
|
|
13675
13680
|
return {
|
|
13676
13681
|
...e,
|
|
13677
|
-
before: e.before &&
|
|
13678
|
-
after: e.after &&
|
|
13682
|
+
before: e.before && le.createInstance(e.before),
|
|
13683
|
+
after: e.after && le.createInstance(e.after)
|
|
13679
13684
|
};
|
|
13680
13685
|
}
|
|
13681
13686
|
// /**
|
|
@@ -13690,7 +13695,7 @@ const Kd = class Qd {
|
|
|
13690
13695
|
mapToInstance(e) {
|
|
13691
13696
|
return new Promise((t, r) => {
|
|
13692
13697
|
e().then((s) => t(
|
|
13693
|
-
s.map((i) =>
|
|
13698
|
+
s.map((i) => le.createInstance(i))
|
|
13694
13699
|
)).catch((s) => r(s));
|
|
13695
13700
|
});
|
|
13696
13701
|
}
|
|
@@ -13706,15 +13711,15 @@ const Kd = class Qd {
|
|
|
13706
13711
|
if (Object.values(e).length === 0) return e;
|
|
13707
13712
|
const t = e.operations?.map((r) => {
|
|
13708
13713
|
const s = r.value[0] ?? r.value;
|
|
13709
|
-
return ln.isArrayOperator(r.operator) && s instanceof
|
|
13710
|
-
property:
|
|
13714
|
+
return ln.isArrayOperator(r.operator) && s instanceof le ? {
|
|
13715
|
+
property: le.searchableArrayNameFor(r.property),
|
|
13711
13716
|
operator: r.operator,
|
|
13712
13717
|
value: Array.isArray(r.value) ? r.value.map((i) => i.id) : s.id,
|
|
13713
13718
|
aggregate: r.aggregate
|
|
13714
13719
|
} : {
|
|
13715
13720
|
property: r.property,
|
|
13716
13721
|
operator: r.operator,
|
|
13717
|
-
value: r.value instanceof
|
|
13722
|
+
value: r.value instanceof le ? { id: r.value.id } : r.value,
|
|
13718
13723
|
aggregate: r.aggregate
|
|
13719
13724
|
};
|
|
13720
13725
|
}) ?? [];
|
|
@@ -13880,7 +13885,7 @@ class oT {
|
|
|
13880
13885
|
* query.instanceOf( Person ).where( 'age', '>', 18 )
|
|
13881
13886
|
*/
|
|
13882
13887
|
instanceOf(e) {
|
|
13883
|
-
const t = e instanceof
|
|
13888
|
+
const t = e instanceof le ? e.className : e;
|
|
13884
13889
|
return this.queryObject.operations?.push({
|
|
13885
13890
|
property: "__className",
|
|
13886
13891
|
operator: "==",
|
|
@@ -14022,10 +14027,10 @@ let aT = Xd;
|
|
|
14022
14027
|
class ln {
|
|
14023
14028
|
installCachedPropsUpdaters(e = {}) {
|
|
14024
14029
|
ln.onUpdate = e.onUpdate;
|
|
14025
|
-
const t =
|
|
14030
|
+
const t = le.getSystemRegisteredReferencesWithCachedProps(), r = {};
|
|
14026
14031
|
Object.entries(t).forEach(([i, a]) => {
|
|
14027
14032
|
a.forEach((c) => {
|
|
14028
|
-
const l =
|
|
14033
|
+
const l = le.collectionPath(le.createInstance(i), c);
|
|
14029
14034
|
r[l] || (r[l] = []), r[l].push({
|
|
14030
14035
|
prop: c,
|
|
14031
14036
|
collectionPropOwner: i
|
|
@@ -14066,9 +14071,9 @@ class ln {
|
|
|
14066
14071
|
*/
|
|
14067
14072
|
static toPropertyPathOperations(e) {
|
|
14068
14073
|
return e ? e.map((t) => {
|
|
14069
|
-
if (ln.isArrayOperator(t.operator) && t.value[0] instanceof
|
|
14074
|
+
if (ln.isArrayOperator(t.operator) && t.value[0] instanceof le)
|
|
14070
14075
|
return {
|
|
14071
|
-
property:
|
|
14076
|
+
property: le.searchableArrayNameFor(t.property),
|
|
14072
14077
|
operator: t.operator,
|
|
14073
14078
|
value: t.value.map((i) => i.id),
|
|
14074
14079
|
aggregate: t.aggregate
|
|
@@ -14203,7 +14208,7 @@ var uT = Object.defineProperty, lT = Object.getOwnPropertyDescriptor, er = (n, e
|
|
|
14203
14208
|
(a = n[i]) && (s = (r ? a(e, t, s) : a(s)) || s);
|
|
14204
14209
|
return r && s && uT(e, t, s), s;
|
|
14205
14210
|
};
|
|
14206
|
-
let mn = class extends
|
|
14211
|
+
let mn = class extends le {
|
|
14207
14212
|
constructor() {
|
|
14208
14213
|
super(...arguments), this._onChange = new Wd();
|
|
14209
14214
|
}
|
|
@@ -20371,7 +20376,12 @@ class yA extends ln {
|
|
|
20371
20376
|
onCollectionChange(e, t, r) {
|
|
20372
20377
|
const s = this.queryObjectToQueryConstraints(e, t);
|
|
20373
20378
|
return vl(s, (i) => {
|
|
20374
|
-
const a = i.docChanges().map((c) =>
|
|
20379
|
+
const a = i.docChanges().map((c) => ({
|
|
20380
|
+
after: c.doc.data(),
|
|
20381
|
+
type: c.type === "added" ? "create" : c.type === "removed" ? "delete" : "update",
|
|
20382
|
+
before: void 0,
|
|
20383
|
+
params: {}
|
|
20384
|
+
}));
|
|
20375
20385
|
r(a);
|
|
20376
20386
|
});
|
|
20377
20387
|
}
|