@firebase/firestore 4.3.2-canary.bebecdaad → 4.3.2-canary.ebc694a33
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/index.cjs.js +73 -73
- package/dist/index.esm2017.js +73 -73
- package/dist/index.esm5.js +68 -68
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/index.rn.js +75 -75
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +14 -14
- package/package.json +9 -9
package/dist/index.esm5.js
CHANGED
|
@@ -70,7 +70,7 @@ O.MOCK_USER = new O("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
var P = "10.6.0-canary.
|
|
73
|
+
var P = "10.6.0-canary.ebc694a33", R = new l("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -5560,16 +5560,16 @@ var vi = /** @class */ function() {
|
|
|
5560
5560
|
throw new mi("Invalid padding when bitmap length is 0: ".concat(e));
|
|
5561
5561
|
this.Te = 8 * t.length - e,
|
|
5562
5562
|
// Set the bit count in Integer to avoid repetition in mightContain().
|
|
5563
|
-
this.
|
|
5563
|
+
this.Ee = b.fromNumber(this.Te);
|
|
5564
5564
|
}
|
|
5565
5565
|
// Calculate the ith hash value based on the hashed 64bit integers,
|
|
5566
5566
|
// and calculate its corresponding bit index in the bitmap to be checked.
|
|
5567
|
-
return t.prototype.
|
|
5567
|
+
return t.prototype.de = function(t, e, n) {
|
|
5568
5568
|
// Calculate hashed value h(i) = h1 + (i * h2).
|
|
5569
5569
|
var r = t.add(e.multiply(b.fromNumber(n)));
|
|
5570
5570
|
// Wrap if hash value overflow 64bit.
|
|
5571
5571
|
return 1 === r.compare(fi) && (r = new b([ r.getBits(0), r.getBits(1) ], 0)),
|
|
5572
|
-
r.modulo(this.
|
|
5572
|
+
r.modulo(this.Ee).toNumber();
|
|
5573
5573
|
},
|
|
5574
5574
|
// Return whether the bit on the given index in the bitmap is set to 1.
|
|
5575
5575
|
t.prototype.Ae = function(t) {
|
|
@@ -5578,7 +5578,7 @@ var vi = /** @class */ function() {
|
|
|
5578
5578
|
// Empty bitmap should always return false on membership check.
|
|
5579
5579
|
if (0 === this.Te) return !1;
|
|
5580
5580
|
for (var e = pi(di(t)), n = e[0], r = e[1], i = 0; i < this.hashCount; i++) {
|
|
5581
|
-
var o = this.
|
|
5581
|
+
var o = this.de(n, r, i);
|
|
5582
5582
|
if (!this.Ae(o)) return !1;
|
|
5583
5583
|
}
|
|
5584
5584
|
return !0;
|
|
@@ -5590,7 +5590,7 @@ var vi = /** @class */ function() {
|
|
|
5590
5590
|
})), o;
|
|
5591
5591
|
}, t.prototype.insert = function(t) {
|
|
5592
5592
|
if (0 !== this.Te) for (var e = pi(di(t)), n = e[0], r = e[1], i = 0; i < this.hashCount; i++) {
|
|
5593
|
-
var o = this.
|
|
5593
|
+
var o = this.de(n, r, i);
|
|
5594
5594
|
this.Re(o);
|
|
5595
5595
|
}
|
|
5596
5596
|
}, t.prototype.Re = function(t) {
|
|
@@ -7093,25 +7093,25 @@ function go(t, e, n, r) {
|
|
|
7093
7093
|
e.It();
|
|
7094
7094
|
}, t.prototype.Pt = function(t, e) {
|
|
7095
7095
|
if ("nullValue" in t) this.Tt(e, 5); else if ("booleanValue" in t) this.Tt(e, 10),
|
|
7096
|
-
e.
|
|
7096
|
+
e.Et(t.booleanValue ? 1 : 0); else if ("integerValue" in t) this.Tt(e, 15), e.Et(Fe(t.integerValue)); else if ("doubleValue" in t) {
|
|
7097
7097
|
var n = Fe(t.doubleValue);
|
|
7098
7098
|
isNaN(n) ? this.Tt(e, 13) : (this.Tt(e, 15), Gt(n) ?
|
|
7099
7099
|
// -0.0, 0 and 0.0 are all considered the same
|
|
7100
|
-
e.
|
|
7100
|
+
e.Et(0) : e.Et(n));
|
|
7101
7101
|
} else if ("timestampValue" in t) {
|
|
7102
7102
|
var r = t.timestampValue;
|
|
7103
|
-
this.Tt(e, 20), "string" == typeof r ? e.
|
|
7104
|
-
e.
|
|
7103
|
+
this.Tt(e, 20), "string" == typeof r ? e.dt(r) : (e.dt("".concat(r.seconds || "")),
|
|
7104
|
+
e.Et(r.nanos || 0));
|
|
7105
7105
|
} else if ("stringValue" in t) this.At(t.stringValue, e), this.Rt(e); else if ("bytesValue" in t) this.Tt(e, 30),
|
|
7106
7106
|
e.Vt(Me(t.bytesValue)), this.Rt(e); else if ("referenceValue" in t) this.ft(t.referenceValue, e); else if ("geoPointValue" in t) {
|
|
7107
7107
|
var i = t.geoPointValue;
|
|
7108
|
-
this.Tt(e, 45), e.
|
|
7108
|
+
this.Tt(e, 45), e.Et(i.latitude || 0), e.Et(i.longitude || 0);
|
|
7109
7109
|
} else "mapValue" in t ? an(t) ? this.Tt(e, Number.MAX_SAFE_INTEGER) : (this.gt(t.mapValue, e),
|
|
7110
7110
|
this.Rt(e)) : "arrayValue" in t ? (this.yt(t.arrayValue, e), this.Rt(e)) : B();
|
|
7111
7111
|
}, t.prototype.At = function(t, e) {
|
|
7112
7112
|
this.Tt(e, 25), this.wt(t, e);
|
|
7113
7113
|
}, t.prototype.wt = function(t, e) {
|
|
7114
|
-
e.
|
|
7114
|
+
e.dt(t);
|
|
7115
7115
|
}, t.prototype.gt = function(t, e) {
|
|
7116
7116
|
var n = t.fields || {};
|
|
7117
7117
|
this.Tt(e, 55);
|
|
@@ -7132,12 +7132,12 @@ function go(t, e, n, r) {
|
|
|
7132
7132
|
n.Tt(e, 60), n.wt(t, e);
|
|
7133
7133
|
}));
|
|
7134
7134
|
}, t.prototype.Tt = function(t, e) {
|
|
7135
|
-
t.
|
|
7135
|
+
t.Et(e);
|
|
7136
7136
|
}, t.prototype.Rt = function(t) {
|
|
7137
7137
|
// While the SDK does not implement truncation, the truncation marker is
|
|
7138
7138
|
// used to terminate all variable length values (which are strings, bytes,
|
|
7139
7139
|
// references, arrays and maps).
|
|
7140
|
-
t.
|
|
7140
|
+
t.Et(2);
|
|
7141
7141
|
}, t;
|
|
7142
7142
|
}();
|
|
7143
7143
|
|
|
@@ -7312,9 +7312,9 @@ var Do = /** @class */ function() {
|
|
|
7312
7312
|
}
|
|
7313
7313
|
return t.prototype.Vt = function(t) {
|
|
7314
7314
|
this.Wt.bt(t);
|
|
7315
|
-
}, t.prototype.Et = function(t) {
|
|
7316
|
-
this.Wt.xt(t);
|
|
7317
7315
|
}, t.prototype.dt = function(t) {
|
|
7316
|
+
this.Wt.xt(t);
|
|
7317
|
+
}, t.prototype.Et = function(t) {
|
|
7318
7318
|
this.Wt.Nt(t);
|
|
7319
7319
|
}, t.prototype.It = function() {
|
|
7320
7320
|
this.Wt.qt();
|
|
@@ -7325,9 +7325,9 @@ var Do = /** @class */ function() {
|
|
|
7325
7325
|
}
|
|
7326
7326
|
return t.prototype.Vt = function(t) {
|
|
7327
7327
|
this.Wt.vt(t);
|
|
7328
|
-
}, t.prototype.Et = function(t) {
|
|
7329
|
-
this.Wt.Ot(t);
|
|
7330
7328
|
}, t.prototype.dt = function(t) {
|
|
7329
|
+
this.Wt.Ot(t);
|
|
7330
|
+
}, t.prototype.Et = function(t) {
|
|
7331
7331
|
this.Wt.kt(t);
|
|
7332
7332
|
}, t.prototype.It = function() {
|
|
7333
7333
|
this.Wt.Kt();
|
|
@@ -8002,7 +8002,7 @@ var Ko = /** @class */ function() {
|
|
|
8002
8002
|
*/
|
|
8003
8003
|
t.prototype.Pn = function(t, e, n, r, i, o, a) {
|
|
8004
8004
|
for (var u = this, s = (null != e ? e.length : 1) * Math.max(n.length, i.length), c = s / (null != e ? e.length : 1), l = [], h = function(s) {
|
|
8005
|
-
var h = e ? f.In(e[s / c]) : Qo, d = f.Tn(t, h, n[s % c], r), p = f.
|
|
8005
|
+
var h = e ? f.In(e[s / c]) : Qo, d = f.Tn(t, h, n[s % c], r), p = f.En(t, h, i[s % c], o), v = a.map((function(e) {
|
|
8006
8006
|
return u.Tn(t, h, e,
|
|
8007
8007
|
/* inclusive= */ !0);
|
|
8008
8008
|
}));
|
|
@@ -8019,7 +8019,7 @@ var Ko = /** @class */ function() {
|
|
|
8019
8019
|
var i = new ko(t, pt.empty(), e, n);
|
|
8020
8020
|
return r ? i : i.Ht();
|
|
8021
8021
|
},
|
|
8022
|
-
/** Generates the upper bound for `arrayValue` and `directionalValue`. */ t.prototype.
|
|
8022
|
+
/** Generates the upper bound for `arrayValue` and `directionalValue`. */ t.prototype.En = function(t, e, n, r) {
|
|
8023
8023
|
var i = new ko(t, pt.empty(), e, n);
|
|
8024
8024
|
return r ? i.Ht() : i;
|
|
8025
8025
|
}, t.prototype.cn = function(t, e) {
|
|
@@ -8072,7 +8072,7 @@ var Ko = /** @class */ function() {
|
|
|
8072
8072
|
* Returns `null` if the document does not have all fields specified in the
|
|
8073
8073
|
* index.
|
|
8074
8074
|
*/
|
|
8075
|
-
t.prototype.
|
|
8075
|
+
t.prototype.dn = function(t, e) {
|
|
8076
8076
|
for (var n = new Ao, r = 0, i = yt(t); r < i.length; r++) {
|
|
8077
8077
|
var o = i[r], a = e.data.field(o.fieldPath);
|
|
8078
8078
|
if (null == a) return null;
|
|
@@ -8216,7 +8216,7 @@ var Ko = /** @class */ function() {
|
|
|
8216
8216
|
}));
|
|
8217
8217
|
},
|
|
8218
8218
|
/** Creates the index entries for the given document. */ t.prototype.pn = function(t, e) {
|
|
8219
|
-
var n = new xe(Oo), r = this.
|
|
8219
|
+
var n = new xe(Oo), r = this.dn(e, t);
|
|
8220
8220
|
if (null == r) return n;
|
|
8221
8221
|
var i = mt(e);
|
|
8222
8222
|
if (null != i) {
|
|
@@ -10214,7 +10214,7 @@ e) {
|
|
|
10214
10214
|
var n = new Ra(t, e);
|
|
10215
10215
|
this.hr = this.hr.add(n), this.Ir = this.Ir.add(n);
|
|
10216
10216
|
},
|
|
10217
|
-
/** Add references to the given document keys for the given ID. */ t.prototype.
|
|
10217
|
+
/** Add references to the given document keys for the given ID. */ t.prototype.Er = function(t, e) {
|
|
10218
10218
|
var n = this;
|
|
10219
10219
|
t.forEach((function(t) {
|
|
10220
10220
|
return n.addReference(t, e);
|
|
@@ -10225,7 +10225,7 @@ e) {
|
|
|
10225
10225
|
* ID.
|
|
10226
10226
|
*/
|
|
10227
10227
|
t.prototype.removeReference = function(t, e) {
|
|
10228
|
-
this.
|
|
10228
|
+
this.dr(new Ra(t, e));
|
|
10229
10229
|
}, t.prototype.Ar = function(t, e) {
|
|
10230
10230
|
var n = this;
|
|
10231
10231
|
t.forEach((function(t) {
|
|
@@ -10239,14 +10239,14 @@ e) {
|
|
|
10239
10239
|
t.prototype.Rr = function(t) {
|
|
10240
10240
|
var e = this, n = new pt(new ht([])), r = new Ra(n, t), i = new Ra(n, t + 1), o = [];
|
|
10241
10241
|
return this.Ir.forEachInRange([ r, i ], (function(t) {
|
|
10242
|
-
e.
|
|
10242
|
+
e.dr(t), o.push(t.key);
|
|
10243
10243
|
})), o;
|
|
10244
10244
|
}, t.prototype.Vr = function() {
|
|
10245
10245
|
var t = this;
|
|
10246
10246
|
this.hr.forEach((function(e) {
|
|
10247
|
-
return t.
|
|
10247
|
+
return t.dr(e);
|
|
10248
10248
|
}));
|
|
10249
|
-
}, t.prototype.
|
|
10249
|
+
}, t.prototype.dr = function(t) {
|
|
10250
10250
|
this.hr = this.hr.delete(t), this.Ir = this.Ir.delete(t);
|
|
10251
10251
|
}, t.prototype.mr = function(t) {
|
|
10252
10252
|
var e = new pt(new ht([])), n = new Ra(e, t), r = new Ra(e, t + 1), i = br();
|
|
@@ -10548,7 +10548,7 @@ e) {
|
|
|
10548
10548
|
var n = this.Fr.get(e) || null;
|
|
10549
10549
|
return Nt.resolve(n);
|
|
10550
10550
|
}, t.prototype.addMatchingKeys = function(t, e, n) {
|
|
10551
|
-
return this.Or.
|
|
10551
|
+
return this.Or.Er(e, n), Nt.resolve();
|
|
10552
10552
|
}, t.prototype.removeMatchingKeys = function(t, e, n) {
|
|
10553
10553
|
this.Or.Ar(e, n);
|
|
10554
10554
|
var r = this.persistence.referenceDelegate, i = [];
|
|
@@ -11118,7 +11118,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11118
11118
|
}, !t.D()) throw new Q(j.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
|
|
11119
11119
|
this.referenceDelegate = new ga(this, i), this.Ii = n + "main", this.serializer = new ao(s),
|
|
11120
11120
|
this.Ti = new kt(this.Ii, this.ai, new Ga(this.serializer)), this.qr = new ca(this.referenceDelegate, this.serializer),
|
|
11121
|
-
this.remoteDocumentCache = _a(this.serializer), this.Kr = new wo, this.window && this.window.localStorage ? this.
|
|
11121
|
+
this.remoteDocumentCache = _a(this.serializer), this.Kr = new wo, this.window && this.window.localStorage ? this.Ei = this.window.localStorage : (this.Ei = null,
|
|
11122
11122
|
!1 === l && V("IndexedDbPersistence", "LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."));
|
|
11123
11123
|
}
|
|
11124
11124
|
/**
|
|
@@ -11130,7 +11130,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11130
11130
|
// NOTE: This is expected to fail sometimes (in the case of another tab
|
|
11131
11131
|
// already having the persistence lock), so it's the first thing we should
|
|
11132
11132
|
// do.
|
|
11133
|
-
return this.
|
|
11133
|
+
return this.di().then((function() {
|
|
11134
11134
|
if (!t.isPrimary && !t.allowTabSynchronization)
|
|
11135
11135
|
// Fail `start()` if `synchronizeTabs` is disabled and we cannot
|
|
11136
11136
|
// obtain the primary lease.
|
|
@@ -11204,7 +11204,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11204
11204
|
return n(this, (function(t) {
|
|
11205
11205
|
switch (t.label) {
|
|
11206
11206
|
case 0:
|
|
11207
|
-
return this.started ? [ 4 /*yield*/ , this.
|
|
11207
|
+
return this.started ? [ 4 /*yield*/ , this.di() ] : [ 3 /*break*/ , 2 ];
|
|
11208
11208
|
|
|
11209
11209
|
case 1:
|
|
11210
11210
|
t.sent(), t.label = 2;
|
|
@@ -11222,7 +11222,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11222
11222
|
* primary state listener if the client either newly obtained or released its
|
|
11223
11223
|
* primary lease.
|
|
11224
11224
|
*/
|
|
11225
|
-
t.prototype.
|
|
11225
|
+
t.prototype.di = function() {
|
|
11226
11226
|
var t = this;
|
|
11227
11227
|
return this.runTransaction("updateClientMetadataAndTryBecomePrimary", "readwrite", (function(e) {
|
|
11228
11228
|
return Ya(e).put({
|
|
@@ -11301,7 +11301,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11301
11301
|
// Ideally we'd delete the IndexedDb and LocalStorage zombie entries for
|
|
11302
11302
|
// the client atomically, but we can't. So we opt to delete the IndexedDb
|
|
11303
11303
|
// entries first to avoid potentially reviving a zombied client.
|
|
11304
|
-
if (t = n.sent(), this.
|
|
11304
|
+
if (t = n.sent(), this.Ei) for (e = 0, r = t; e < r.length; e++) i = r[e], this.Ei.removeItem(this.vi(i.clientId));
|
|
11305
11305
|
n.label = 2;
|
|
11306
11306
|
|
|
11307
11307
|
case 2:
|
|
@@ -11317,7 +11317,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11317
11317
|
t.prototype.Vi = function() {
|
|
11318
11318
|
var t = this;
|
|
11319
11319
|
this.li = this.si.enqueueAfterDelay("client_metadata_refresh" /* TimerId.ClientMetadataRefresh */ , 4e3, (function() {
|
|
11320
|
-
return t.
|
|
11320
|
+
return t.di().then((function() {
|
|
11321
11321
|
return t.bi();
|
|
11322
11322
|
})).then((function() {
|
|
11323
11323
|
return t.Vi();
|
|
@@ -11523,7 +11523,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11523
11523
|
var t = this;
|
|
11524
11524
|
null !== this.document && "function" == typeof this.document.addEventListener && (this.ci = function() {
|
|
11525
11525
|
t.si.enqueueAndForget((function() {
|
|
11526
|
-
return t.inForeground = "visible" === t.document.visibilityState, t.
|
|
11526
|
+
return t.inForeground = "visible" === t.document.visibilityState, t.di();
|
|
11527
11527
|
}));
|
|
11528
11528
|
}, this.document.addEventListener("visibilitychange", this.ci), this.inForeground = "visible" === this.document.visibilityState);
|
|
11529
11529
|
}, t.prototype.xi = function() {
|
|
@@ -11567,7 +11567,7 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11567
11567
|
t.prototype.Fi = function(t) {
|
|
11568
11568
|
var e;
|
|
11569
11569
|
try {
|
|
11570
|
-
var n = null !== (null === (e = this.
|
|
11570
|
+
var n = null !== (null === (e = this.Ei) || void 0 === e ? void 0 : e.getItem(this.vi(t)));
|
|
11571
11571
|
return L("IndexedDbPersistence", "Client '".concat(t, "' ").concat(n ? "is" : "is not", " zombied in LocalStorage")),
|
|
11572
11572
|
n;
|
|
11573
11573
|
} catch (t) {
|
|
@@ -11580,16 +11580,16 @@ var ja = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11580
11580
|
* clients are ignored during primary tab selection.
|
|
11581
11581
|
*/
|
|
11582
11582
|
t.prototype.Mi = function() {
|
|
11583
|
-
if (this.
|
|
11584
|
-
this.
|
|
11583
|
+
if (this.Ei) try {
|
|
11584
|
+
this.Ei.setItem(this.vi(this.clientId), String(Date.now()));
|
|
11585
11585
|
} catch (t) {
|
|
11586
11586
|
// Gracefully handle if LocalStorage isn't available / working.
|
|
11587
11587
|
V("Failed to set zombie client id.", t);
|
|
11588
11588
|
}
|
|
11589
11589
|
},
|
|
11590
11590
|
/** Removes the zombied client entry if it exists. */ t.prototype.Ni = function() {
|
|
11591
|
-
if (this.
|
|
11592
|
-
this.
|
|
11591
|
+
if (this.Ei) try {
|
|
11592
|
+
this.Ei.removeItem(this.vi(this.clientId));
|
|
11593
11593
|
} catch (t) {
|
|
11594
11594
|
// Ignore
|
|
11595
11595
|
}
|
|
@@ -12476,7 +12476,7 @@ var gu = /** @class */ function() {
|
|
|
12476
12476
|
return a && o.error && ((a = "string" == typeof o.error.message && "string" == typeof o.error.code) && (i = new Q(o.error.code, o.error.message))),
|
|
12477
12477
|
a ? new t(e, n, o.state, i) : (V("SharedClientState", "Failed to parse mutation state for ID '".concat(n, "': ").concat(r)),
|
|
12478
12478
|
null);
|
|
12479
|
-
}, t.prototype.
|
|
12479
|
+
}, t.prototype.Es = function() {
|
|
12480
12480
|
var t = {
|
|
12481
12481
|
state: this.state,
|
|
12482
12482
|
updateTimeMs: Date.now()
|
|
@@ -12499,7 +12499,7 @@ var gu = /** @class */ function() {
|
|
|
12499
12499
|
return o && i.error && ((o = "string" == typeof i.error.message && "string" == typeof i.error.code) && (r = new Q(i.error.code, i.error.message))),
|
|
12500
12500
|
o ? new t(e, i.state, r) : (V("SharedClientState", "Failed to parse target state for ID '".concat(e, "': ").concat(n)),
|
|
12501
12501
|
null);
|
|
12502
|
-
}, t.prototype.
|
|
12502
|
+
}, t.prototype.Es = function() {
|
|
12503
12503
|
var t = {
|
|
12504
12504
|
state: this.state,
|
|
12505
12505
|
updateTimeMs: Date.now()
|
|
@@ -12540,7 +12540,7 @@ var gu = /** @class */ function() {
|
|
|
12540
12540
|
function t() {
|
|
12541
12541
|
this.activeTargetIds = _r();
|
|
12542
12542
|
}
|
|
12543
|
-
return t.prototype.
|
|
12543
|
+
return t.prototype.ds = function(t) {
|
|
12544
12544
|
this.activeTargetIds = this.activeTargetIds.add(t);
|
|
12545
12545
|
}, t.prototype.As = function(t) {
|
|
12546
12546
|
this.activeTargetIds = this.activeTargetIds.delete(t);
|
|
@@ -12549,7 +12549,7 @@ var gu = /** @class */ function() {
|
|
|
12549
12549
|
* Converts this entry into a JSON-encoded format we can use for WebStorage.
|
|
12550
12550
|
* Does not encode `clientId` as it is part of the key in WebStorage.
|
|
12551
12551
|
*/
|
|
12552
|
-
t.prototype.
|
|
12552
|
+
t.prototype.Es = function() {
|
|
12553
12553
|
var t = {
|
|
12554
12554
|
activeTargetIds: this.activeTargetIds.toArray(),
|
|
12555
12555
|
updateTimeMs: Date.now()
|
|
@@ -12642,7 +12642,7 @@ var gu = /** @class */ function() {
|
|
|
12642
12642
|
r && (e = r.state);
|
|
12643
12643
|
}
|
|
12644
12644
|
}
|
|
12645
|
-
return this.Ls.
|
|
12645
|
+
return this.Ls.ds(t), this.Fs(), e;
|
|
12646
12646
|
}, t.prototype.removeLocalQueryTarget = function(t) {
|
|
12647
12647
|
this.Ls.As(t), this.Fs();
|
|
12648
12648
|
}, t.prototype.isLocalQueryTarget = function(t) {
|
|
@@ -12736,10 +12736,10 @@ var gu = /** @class */ function() {
|
|
|
12736
12736
|
enumerable: !1,
|
|
12737
12737
|
configurable: !0
|
|
12738
12738
|
}), t.prototype.Fs = function() {
|
|
12739
|
-
this.setItem(this.ys, this.Ls.
|
|
12739
|
+
this.setItem(this.ys, this.Ls.Es());
|
|
12740
12740
|
}, t.prototype.Ns = function(t, e, n) {
|
|
12741
12741
|
var r = new gu(this.currentUser, t, e, n), i = mu(this.persistenceKey, this.currentUser, t);
|
|
12742
|
-
this.setItem(i, r.
|
|
12742
|
+
this.setItem(i, r.Es());
|
|
12743
12743
|
}, t.prototype.Bs = function(t) {
|
|
12744
12744
|
var e = mu(this.persistenceKey, this.currentUser, t);
|
|
12745
12745
|
this.removeItem(e);
|
|
@@ -12751,7 +12751,7 @@ var gu = /** @class */ function() {
|
|
|
12751
12751
|
this.storage.setItem(this.Cs, JSON.stringify(e));
|
|
12752
12752
|
}, t.prototype.ks = function(t, e, n) {
|
|
12753
12753
|
var r = yu(this.persistenceKey, t), i = new wu(t, e, n);
|
|
12754
|
-
this.setItem(r, i.
|
|
12754
|
+
this.setItem(r, i.Es());
|
|
12755
12755
|
}, t.prototype.Qs = function(t) {
|
|
12756
12756
|
var e = JSON.stringify(Array.from(t));
|
|
12757
12757
|
this.setItem(this.vs, e);
|
|
@@ -12836,7 +12836,7 @@ var gu = /** @class */ function() {
|
|
|
12836
12836
|
}, t.prototype.updateMutationState = function(t, e, n) {
|
|
12837
12837
|
// No op.
|
|
12838
12838
|
}, t.prototype.addLocalQueryTarget = function(t) {
|
|
12839
|
-
return this.eo.
|
|
12839
|
+
return this.eo.ds(t), this.no[t] || "not-current";
|
|
12840
12840
|
}, t.prototype.updateQueryState = function(t, e, n) {
|
|
12841
12841
|
this.no[t] = e;
|
|
12842
12842
|
}, t.prototype.removeLocalQueryTarget = function(t) {
|
|
@@ -13818,7 +13818,7 @@ function Pu() {
|
|
|
13818
13818
|
* required to make the StreamingWrite RPC work. Subsequent
|
|
13819
13819
|
* calls should wait until onHandshakeComplete was called.
|
|
13820
13820
|
*/
|
|
13821
|
-
n.prototype.
|
|
13821
|
+
n.prototype.E_ = function() {
|
|
13822
13822
|
// TODO(dimond): Support stream resumption. We intentionally do not set the
|
|
13823
13823
|
// stream token on the handshake, ignoring any stream token we might have.
|
|
13824
13824
|
var t = {};
|
|
@@ -13837,10 +13837,10 @@ function Pu() {
|
|
|
13837
13837
|
function n(t, n, r, i) {
|
|
13838
13838
|
var o = this;
|
|
13839
13839
|
return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
|
|
13840
|
-
o.connection = r, o.serializer = i, o.
|
|
13840
|
+
o.connection = r, o.serializer = i, o.d_ = !1, o;
|
|
13841
13841
|
}
|
|
13842
13842
|
return t(n, e), n.prototype.A_ = function() {
|
|
13843
|
-
if (this.
|
|
13843
|
+
if (this.d_) throw new Q(j.FAILED_PRECONDITION, "The client has already been terminated.");
|
|
13844
13844
|
},
|
|
13845
13845
|
/** Invokes the provided RPC with auth and AppCheck tokens. */ n.prototype.wo = function(t, e, n) {
|
|
13846
13846
|
var r = this;
|
|
@@ -13862,7 +13862,7 @@ function Pu() {
|
|
|
13862
13862
|
i.appCheckCredentials.invalidateToken()), t) : new Q(j.UNKNOWN, t.toString());
|
|
13863
13863
|
}));
|
|
13864
13864
|
}, n.prototype.terminate = function() {
|
|
13865
|
-
this.
|
|
13865
|
+
this.d_ = !0;
|
|
13866
13866
|
}, n;
|
|
13867
13867
|
}((function() {}));
|
|
13868
13868
|
|
|
@@ -14487,7 +14487,7 @@ function as(t) {
|
|
|
14487
14487
|
function us(t) {
|
|
14488
14488
|
return e(this, void 0, void 0, (function() {
|
|
14489
14489
|
return n(this, (function(e) {
|
|
14490
|
-
return ps(t).
|
|
14490
|
+
return ps(t).E_(), [ 2 /*return*/ ];
|
|
14491
14491
|
}));
|
|
14492
14492
|
}));
|
|
14493
14493
|
}
|
|
@@ -15484,7 +15484,7 @@ function ks(t) {
|
|
|
15484
15484
|
/**
|
|
15485
15485
|
* Returns whether the doc for the given key should be in limbo.
|
|
15486
15486
|
*/
|
|
15487
|
-
t.prototype.
|
|
15487
|
+
t.prototype.Ea = function(t) {
|
|
15488
15488
|
// If the remote end says it's part of this query, it's not in limbo.
|
|
15489
15489
|
return !this.ia.has(t) &&
|
|
15490
15490
|
// The local store doesn't think it's a result, so it shouldn't be in limbo.
|
|
@@ -15509,7 +15509,7 @@ function ks(t) {
|
|
|
15509
15509
|
// updating many documents.
|
|
15510
15510
|
var e = this.oa;
|
|
15511
15511
|
this.oa = br(), this.aa.forEach((function(e) {
|
|
15512
|
-
t.
|
|
15512
|
+
t.Ea(e.key) && (t.oa = t.oa.add(e.key));
|
|
15513
15513
|
}));
|
|
15514
15514
|
// Diff the new limbo docs with the old limbo docs.
|
|
15515
15515
|
var n = [];
|
|
@@ -15539,7 +15539,7 @@ function ks(t) {
|
|
|
15539
15539
|
* @returns The ViewChange that resulted from this synchronization.
|
|
15540
15540
|
*/
|
|
15541
15541
|
// PORTING NOTE: Multi-tab only.
|
|
15542
|
-
t.prototype.
|
|
15542
|
+
t.prototype.da = function(t) {
|
|
15543
15543
|
this.ia = t.ls, this.oa = br();
|
|
15544
15544
|
var e = this.ca(t.documents);
|
|
15545
15545
|
return this.applyChanges(e, /*updateLimboDocuments=*/ !0);
|
|
@@ -16303,7 +16303,7 @@ function rc(t, e) {
|
|
|
16303
16303
|
/* usePreviousResults= */ !0) ];
|
|
16304
16304
|
|
|
16305
16305
|
case 1:
|
|
16306
|
-
return i = n.sent(), o = r.view.
|
|
16306
|
+
return i = n.sent(), o = r.view.da(i), [ 2 /*return*/ , (e.isPrimaryClient && $s(e, r.targetId, o.Ta),
|
|
16307
16307
|
o) ];
|
|
16308
16308
|
}
|
|
16309
16309
|
}));
|
|
@@ -19577,16 +19577,16 @@ function(t) {
|
|
|
19577
19577
|
}),
|
|
19578
19578
|
/** Returns a new context with the specified settings overwritten. */ t.prototype.Tu = function(e) {
|
|
19579
19579
|
return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.serializer, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
|
|
19580
|
-
}, t.prototype.
|
|
19580
|
+
}, t.prototype.Eu = function(t) {
|
|
19581
19581
|
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.Tu({
|
|
19582
19582
|
path: n,
|
|
19583
|
-
|
|
19583
|
+
du: !1
|
|
19584
19584
|
});
|
|
19585
19585
|
return r.Au(t), r;
|
|
19586
19586
|
}, t.prototype.Ru = function(t) {
|
|
19587
19587
|
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.Tu({
|
|
19588
19588
|
path: n,
|
|
19589
|
-
|
|
19589
|
+
du: !1
|
|
19590
19590
|
});
|
|
19591
19591
|
return r.Pu(), r;
|
|
19592
19592
|
}, t.prototype.Vu = function(t) {
|
|
@@ -19594,7 +19594,7 @@ function(t) {
|
|
|
19594
19594
|
// undefined.
|
|
19595
19595
|
return this.Tu({
|
|
19596
19596
|
path: void 0,
|
|
19597
|
-
|
|
19597
|
+
du: !0
|
|
19598
19598
|
});
|
|
19599
19599
|
}, t.prototype.mu = function(t) {
|
|
19600
19600
|
return rh(t, this.settings.methodName, this.settings.fu || !1, this.path, this.settings.gu);
|
|
@@ -19624,7 +19624,7 @@ function(t) {
|
|
|
19624
19624
|
methodName: e,
|
|
19625
19625
|
gu: n,
|
|
19626
19626
|
path: dt.emptyPath(),
|
|
19627
|
-
|
|
19627
|
+
du: !1,
|
|
19628
19628
|
fu: r
|
|
19629
19629
|
}, this.databaseId, this.serializer, this.ignoreUndefinedProperties);
|
|
19630
19630
|
}, t;
|
|
@@ -19690,7 +19690,7 @@ var Bl = /** @class */ function(e) {
|
|
|
19690
19690
|
Iu: 3 /* UserDataSource.Argument */ ,
|
|
19691
19691
|
gu: e.settings.gu,
|
|
19692
19692
|
methodName: t._methodName,
|
|
19693
|
-
|
|
19693
|
+
du: n
|
|
19694
19694
|
}, e.databaseId, e.serializer, e.ignoreUndefinedProperties);
|
|
19695
19695
|
}
|
|
19696
19696
|
|
|
@@ -19846,7 +19846,7 @@ var Gl = /** @class */ function(e) {
|
|
|
19846
19846
|
// the set of values to be included for the IN query) that may directly
|
|
19847
19847
|
// contain additional arrays (each representing an individual field
|
|
19848
19848
|
// value), so we disable this validation.
|
|
19849
|
-
if (e.settings.
|
|
19849
|
+
if (e.settings.du && 4 /* UserDataSource.ArrayArgument */ !== e.Iu) throw e.mu("Nested arrays are not supported");
|
|
19850
19850
|
return function(t, e) {
|
|
19851
19851
|
for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
|
|
19852
19852
|
var a = Jl(o[i], e.Vu(r));
|
|
@@ -19916,7 +19916,7 @@ function Xl(t, e) {
|
|
|
19916
19916
|
// If we encounter an empty object, we explicitly add it to the update
|
|
19917
19917
|
// mask to ensure that the server creates a map entry.
|
|
19918
19918
|
e.path && e.path.length > 0 && e.fieldMask.push(e.path) : Ie(t, (function(t, r) {
|
|
19919
|
-
var i = Jl(r, e.
|
|
19919
|
+
var i = Jl(r, e.Eu(t));
|
|
19920
19920
|
null != i && (n[t] = i);
|
|
19921
19921
|
})), {
|
|
19922
19922
|
mapValue: {
|
|
@@ -22424,9 +22424,9 @@ function Bf(t, r) {
|
|
|
22424
22424
|
return r = Object.assign({
|
|
22425
22425
|
useFetchStreams: Gf
|
|
22426
22426
|
}, r), o._setSettings(r), o;
|
|
22427
|
-
}), "PUBLIC").setMultipleInstances(!0)), a(k, "4.3.2-canary.
|
|
22427
|
+
}), "PUBLIC").setMultipleInstances(!0)), a(k, "4.3.2-canary.ebc694a33", zf),
|
|
22428
22428
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
22429
|
-
a(k, "4.3.2-canary.
|
|
22429
|
+
a(k, "4.3.2-canary.ebc694a33", "esm5");
|
|
22430
22430
|
|
|
22431
22431
|
export { Ph as AbstractUserDataWriter, xl as AggregateField, Dl as AggregateQuerySnapshot, Cl as Bytes, cl as CACHE_SIZE_UNLIMITED, tl as CollectionReference, Zc as DocumentReference, zh as DocumentSnapshot, Nl as FieldPath, kl as FieldValue, ll as Firestore, Q as FirestoreError, Ol as GeoPoint, sl as LoadBundleTask, Mf as PersistentCacheIndexManager, $c as Query, ph as QueryCompositeFilterConstraint, lh as QueryConstraint, Gh as QueryDocumentSnapshot, Sh as QueryEndAtConstraint, fh as QueryFieldFilterConstraint, wh as QueryLimitConstraint, yh as QueryOrderByConstraint, Kh as QuerySnapshot, _h as QueryStartAtConstraint, Bh as SnapshotMetadata, st as Timestamp, xf as Transaction, Ef as WriteBatch, it as _AutoId, Oe as _ByteString, Be as _DatabaseId, pt as _DocumentKey, nt as _EmptyAppCheckTokenProvider, H as _EmptyAuthCredentialsProvider, dt as _FieldPath, jf as _TestingHooks, Wc as _cast, G as _debugAssert, ke as _isBase64Available, q as _logWarn, Gc as _validateIsNotUsedTogether, rf as addDoc, qh as aggregateFieldEqual, Uh as aggregateQuerySnapshotEqual, mh as and, kf as arrayRemove, Af as arrayUnion, Lh as average, gl as clearIndexedDbPersistence, el as collection, nl as collectionGroup, Xc as connectFirestoreEmulator, Vh as count, Uf as deleteAllPersistentCacheIndexes, nf as deleteDoc, Cf as deleteField, Il as disableNetwork, qf as disablePersistentCacheIndexAutoCreation, rl as doc, Al as documentId, vl as enableIndexedDbPersistence, ml as enableMultiTabIndexedDbPersistence, bl as enableNetwork, Vf as enablePersistentCacheIndexAutoCreation, Dh as endAt, xh as endBefore, dl as ensureFirestoreConfigured, uf as executeWrite, lf as getAggregateFromServer, cf as getCountFromServer, Wh as getDoc, Hh as getDocFromCache, Jh as getDocFromServer, Xh as getDocs, $h as getDocsFromCache, Zh as getDocsFromServer, fl as getFirestore, Lf as getPersistentCacheIndexManager, Of as increment, hl as initializeFirestore, bh as limit, Ih as limitToLast, Tl as loadBundle, vf as memoryEagerGarbageCollector, yf as memoryLocalCache, mf as memoryLruGarbageCollector, El as namedQuery, of as onSnapshot, af as onSnapshotsInSync, vh as or, gh as orderBy, gf as persistentLocalCache, _f as persistentMultipleTabManager, If as persistentSingleTabManager, hh as query, ol as queryEqual, il as refEqual, Df as runTransaction, Nf as serverTimestamp, tf as setDoc, Rf as setIndexConfiguration, M as setLogLevel, Qh as snapshotEqual, Eh as startAfter, Th as startAt, Mh as sum, _l as terminate, ef as updateDoc, wl as waitForPendingWrites, dh as where, Pf as writeBatch };
|
|
22432
22432
|
//# sourceMappingURL=index.esm5.js.map
|
package/dist/index.node.cjs.js
CHANGED
|
@@ -34,7 +34,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
|
|
|
34
34
|
var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
|
|
35
35
|
|
|
36
36
|
const name = "@firebase/firestore";
|
|
37
|
-
const version$1 = "4.3.2-canary.
|
|
37
|
+
const version$1 = "4.3.2-canary.ebc694a33";
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
@@ -87,7 +87,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
87
87
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
88
88
|
User.MOCK_USER = new User('mock-user');
|
|
89
89
|
|
|
90
|
-
const version = "10.6.0-canary.
|
|
90
|
+
const version = "10.6.0-canary.ebc694a33";
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* @license
|
package/dist/index.node.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
9
9
|
import * as protoLoader from '@grpc/proto-loader';
|
|
10
10
|
|
|
11
11
|
const name = "@firebase/firestore";
|
|
12
|
-
const version$1 = "4.3.2-canary.
|
|
12
|
+
const version$1 = "4.3.2-canary.ebc694a33";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -62,7 +62,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
62
62
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
63
63
|
User.MOCK_USER = new User('mock-user');
|
|
64
64
|
|
|
65
|
-
const version = "10.6.0-canary.
|
|
65
|
+
const version = "10.6.0-canary.ebc694a33";
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @license
|