@firebase/firestore 4.7.7-canary.117279e27 → 4.7.7-canary.2d74e5bfb
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 +2 -2
- package/dist/index.esm2017.js +2 -2
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/index.rn.js +89 -89
- package/dist/lite/index.browser.esm2017.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/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@ var util = require('@firebase/util');
|
|
|
9
9
|
var bloomBlob = require('@firebase/webchannel-wrapper/bloom-blob');
|
|
10
10
|
var webchannelBlob = require('@firebase/webchannel-wrapper/webchannel-blob');
|
|
11
11
|
|
|
12
|
-
const b = "@firebase/firestore", S = "4.7.7-canary.
|
|
12
|
+
const b = "@firebase/firestore", S = "4.7.7-canary.2d74e5bfb";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -71,7 +71,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
71
71
|
* See the License for the specific language governing permissions and
|
|
72
72
|
* limitations under the License.
|
|
73
73
|
*/
|
|
74
|
-
let D = "11.3.0-canary.
|
|
74
|
+
let D = "11.3.0-canary.2d74e5bfb";
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
package/dist/index.esm2017.js
CHANGED
|
@@ -5,7 +5,7 @@ import { FirebaseError, deepEqual, createMockUserToken, getModularInstance, getD
|
|
|
5
5
|
import { Integer, Md5 } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
import { XhrIo, EventType, ErrorCode, createWebChannelTransport, getStatEventTarget, WebChannel, Event, Stat } from '@firebase/webchannel-wrapper/webchannel-blob';
|
|
7
7
|
|
|
8
|
-
const b = "@firebase/firestore", S = "4.7.7-canary.
|
|
8
|
+
const b = "@firebase/firestore", S = "4.7.7-canary.2d74e5bfb";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -67,7 +67,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
let D = "11.3.0-canary.
|
|
70
|
+
let D = "11.3.0-canary.2d74e5bfb";
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
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.7.7-canary.
|
|
37
|
+
const version$1 = "4.7.7-canary.2d74e5bfb";
|
|
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 = "11.3.0-canary.
|
|
90
|
+
const version = "11.3.0-canary.2d74e5bfb";
|
|
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.7.7-canary.
|
|
12
|
+
const version$1 = "4.7.7-canary.2d74e5bfb";
|
|
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 = "11.3.0-canary.
|
|
65
|
+
const version = "11.3.0-canary.2d74e5bfb";
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @license
|
package/dist/index.rn.js
CHANGED
|
@@ -8,9 +8,9 @@ import { FirebaseError as u, isIndexedDBAvailable as c, getUA as l, base64 as h,
|
|
|
8
8
|
|
|
9
9
|
import { Integer as R, Md5 as V } from "@firebase/webchannel-wrapper/bloom-blob";
|
|
10
10
|
|
|
11
|
-
import { XhrIo as m, EventType as f, ErrorCode as g, createWebChannelTransport as p, getStatEventTarget as y, WebChannel as w, Event as
|
|
11
|
+
import { XhrIo as m, EventType as f, ErrorCode as g, createWebChannelTransport as p, getStatEventTarget as y, WebChannel as w, Event as b, Stat as S } from "@firebase/webchannel-wrapper/webchannel-blob";
|
|
12
12
|
|
|
13
|
-
const D = "@firebase/firestore", v = "4.7.7-canary.
|
|
13
|
+
const D = "@firebase/firestore", v = "4.7.7-canary.2d74e5bfb";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -72,7 +72,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
72
72
|
* See the License for the specific language governing permissions and
|
|
73
73
|
* limitations under the License.
|
|
74
74
|
*/
|
|
75
|
-
let C = "11.3.0-canary.
|
|
75
|
+
let C = "11.3.0-canary.2d74e5bfb";
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @license
|
|
@@ -2360,7 +2360,7 @@ function __PRIVATE_newDbDocumentMutationPrefixForPath(e, t) {
|
|
|
2360
2360
|
* there is no useful information to store as the value. The raw (unencoded)
|
|
2361
2361
|
* path cannot be stored because IndexedDb doesn't store prototype
|
|
2362
2362
|
* information.
|
|
2363
|
-
*/ const ee = {}, te = "documentMutations", ne = "remoteDocumentsV14", re = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], ie = "documentKeyIndex", se = [ "prefixPath", "collectionGroup", "documentId" ], oe = "collectionGroupIndex", _e = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], ae = "remoteDocumentGlobal", ue = "remoteDocumentGlobalKey", ce = "targets", le = "queryTargetsIndex", he = [ "canonicalId", "targetId" ], Pe = "targetDocuments", Te = [ "targetId", "path" ], Ie = "documentTargetsIndex", Ee = [ "path", "targetId" ], de = "targetGlobalKey", Ae = "targetGlobal", Re = "collectionParents", Ve = [ "collectionId", "parent" ], me = "clientMetadata", fe = "clientId", ge = "bundles", pe = "bundleId", ye = "namedQueries", we = "name",
|
|
2363
|
+
*/ const ee = {}, te = "documentMutations", ne = "remoteDocumentsV14", re = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], ie = "documentKeyIndex", se = [ "prefixPath", "collectionGroup", "documentId" ], oe = "collectionGroupIndex", _e = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], ae = "remoteDocumentGlobal", ue = "remoteDocumentGlobalKey", ce = "targets", le = "queryTargetsIndex", he = [ "canonicalId", "targetId" ], Pe = "targetDocuments", Te = [ "targetId", "path" ], Ie = "documentTargetsIndex", Ee = [ "path", "targetId" ], de = "targetGlobalKey", Ae = "targetGlobal", Re = "collectionParents", Ve = [ "collectionId", "parent" ], me = "clientMetadata", fe = "clientId", ge = "bundles", pe = "bundleId", ye = "namedQueries", we = "name", be = "indexConfiguration", Se = "indexId", De = "collectionGroupIndex", ve = "collectionGroup", Ce = "indexState", Fe = [ "indexId", "uid" ], Me = "sequenceNumberIndex", xe = [ "uid", "sequenceNumber" ], Oe = "indexEntries", Ne = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], Be = "documentKeyIndex", Le = [ "indexId", "uid", "orderedDocumentKey" ], ke = "documentOverlays", qe = [ "userId", "collectionPath", "documentId" ], Qe = "collectionPathOverlayIndex", $e = [ "userId", "collectionPath", "largestBatchId" ], Ke = "collectionGroupOverlayIndex", Ue = [ "userId", "collectionGroup", "largestBatchId" ], We = "globals", Ge = "name", ze = [ ...[ ...[ ...[ ...[ j, J, te, W, ce, G, Ae, Pe ], me ], ae ], Re ], ge, ye ], je = [ ...ze, ke ], He = [ j, J, te, ne, ce, G, Ae, Pe, me, ae, Re, ge, ye, ke ], Je = He, Ye = [ ...Je, be, Ce, Oe ], Ze = Ye, Xe = [ ...Ye, We ];
|
|
2364
2364
|
|
|
2365
2365
|
/**
|
|
2366
2366
|
* @license
|
|
@@ -6196,13 +6196,13 @@ class __PRIVATE_WatchTargetChange {
|
|
|
6196
6196
|
*/
|
|
6197
6197
|
this.ye = __PRIVATE_snapshotChangesMap(),
|
|
6198
6198
|
/** See public getters for explanations of these fields. */
|
|
6199
|
-
this.we = ByteString.EMPTY_BYTE_STRING, this.
|
|
6199
|
+
this.we = ByteString.EMPTY_BYTE_STRING, this.be = !1,
|
|
6200
6200
|
/**
|
|
6201
6201
|
* Whether this target state should be included in the next snapshot. We
|
|
6202
6202
|
* initialize to true so that newly-added targets are included in the next
|
|
6203
6203
|
* RemoteEvent.
|
|
6204
6204
|
*/
|
|
6205
|
-
this.
|
|
6205
|
+
this.Se = !0;
|
|
6206
6206
|
}
|
|
6207
6207
|
/**
|
|
6208
6208
|
* Whether this target has been marked 'current'.
|
|
@@ -6212,7 +6212,7 @@ class __PRIVATE_WatchTargetChange {
|
|
|
6212
6212
|
* was added and that the target is consistent with the rest of the watch
|
|
6213
6213
|
* stream.
|
|
6214
6214
|
*/ get current() {
|
|
6215
|
-
return this.
|
|
6215
|
+
return this.be;
|
|
6216
6216
|
}
|
|
6217
6217
|
/** The last resume token sent to us for this target. */ get resumeToken() {
|
|
6218
6218
|
return this.we;
|
|
@@ -6221,13 +6221,13 @@ class __PRIVATE_WatchTargetChange {
|
|
|
6221
6221
|
return 0 !== this.pe;
|
|
6222
6222
|
}
|
|
6223
6223
|
/** Whether we have modified any state that should trigger a snapshot. */ get ve() {
|
|
6224
|
-
return this.
|
|
6224
|
+
return this.Se;
|
|
6225
6225
|
}
|
|
6226
6226
|
/**
|
|
6227
6227
|
* Applies the resume token to the TargetChange, but only when it has a new
|
|
6228
6228
|
* value. Empty resumeTokens are discarded.
|
|
6229
6229
|
*/ Ce(e) {
|
|
6230
|
-
e.approximateByteSize() > 0 && (this.
|
|
6230
|
+
e.approximateByteSize() > 0 && (this.Se = !0, this.we = e);
|
|
6231
6231
|
}
|
|
6232
6232
|
/**
|
|
6233
6233
|
* Creates a target change from the current set of changes.
|
|
@@ -6253,18 +6253,18 @@ class __PRIVATE_WatchTargetChange {
|
|
|
6253
6253
|
default:
|
|
6254
6254
|
fail();
|
|
6255
6255
|
}
|
|
6256
|
-
})), new TargetChange(this.we, this.
|
|
6256
|
+
})), new TargetChange(this.we, this.be, e, t, n);
|
|
6257
6257
|
}
|
|
6258
6258
|
/**
|
|
6259
6259
|
* Resets the document changes and sets `hasPendingChanges` to false.
|
|
6260
6260
|
*/ Me() {
|
|
6261
|
-
this.
|
|
6261
|
+
this.Se = !1, this.ye = __PRIVATE_snapshotChangesMap();
|
|
6262
6262
|
}
|
|
6263
6263
|
xe(e, t) {
|
|
6264
|
-
this.
|
|
6264
|
+
this.Se = !0, this.ye = this.ye.insert(e, t);
|
|
6265
6265
|
}
|
|
6266
6266
|
Oe(e) {
|
|
6267
|
-
this.
|
|
6267
|
+
this.Se = !0, this.ye = this.ye.remove(e);
|
|
6268
6268
|
}
|
|
6269
6269
|
Ne() {
|
|
6270
6270
|
this.pe += 1;
|
|
@@ -6273,7 +6273,7 @@ class __PRIVATE_WatchTargetChange {
|
|
|
6273
6273
|
this.pe -= 1, __PRIVATE_hardAssert(this.pe >= 0);
|
|
6274
6274
|
}
|
|
6275
6275
|
Le() {
|
|
6276
|
-
this.
|
|
6276
|
+
this.Se = !0, this.be = !0;
|
|
6277
6277
|
}
|
|
6278
6278
|
}
|
|
6279
6279
|
|
|
@@ -7803,12 +7803,12 @@ class __PRIVATE_FirestoreIndexValueWriter {
|
|
|
7803
7803
|
let n = e.timestampValue;
|
|
7804
7804
|
this.ft(t, 20), "string" == typeof n && (n = __PRIVATE_normalizeTimestamp(n)), t.yt(`${n.seconds || ""}`),
|
|
7805
7805
|
t.gt(n.nanos || 0);
|
|
7806
|
-
} else if ("stringValue" in e) this.wt(e.stringValue, t), this.
|
|
7807
|
-
t.
|
|
7806
|
+
} else if ("stringValue" in e) this.wt(e.stringValue, t), this.bt(t); else if ("bytesValue" in e) this.ft(t, 30),
|
|
7807
|
+
t.St(__PRIVATE_normalizeByteString(e.bytesValue)), this.bt(t); else if ("referenceValue" in e) this.Dt(e.referenceValue, t); else if ("geoPointValue" in e) {
|
|
7808
7808
|
const n = e.geoPointValue;
|
|
7809
7809
|
this.ft(t, 45), t.gt(n.latitude || 0), t.gt(n.longitude || 0);
|
|
7810
7810
|
} else "mapValue" in e ? __PRIVATE_isMaxValue(e) ? this.ft(t, Number.MAX_SAFE_INTEGER) : __PRIVATE_isVectorValue(e) ? this.vt(e.mapValue, t) : (this.Ct(e.mapValue, t),
|
|
7811
|
-
this.
|
|
7811
|
+
this.bt(t)) : "arrayValue" in e ? (this.Ft(e.arrayValue, t), this.bt(t)) : fail();
|
|
7812
7812
|
}
|
|
7813
7813
|
wt(e, t) {
|
|
7814
7814
|
this.ft(t, 25), this.Mt(e, t);
|
|
@@ -7845,7 +7845,7 @@ class __PRIVATE_FirestoreIndexValueWriter {
|
|
|
7845
7845
|
ft(e, t) {
|
|
7846
7846
|
e.gt(t);
|
|
7847
7847
|
}
|
|
7848
|
-
|
|
7848
|
+
bt(e) {
|
|
7849
7849
|
// While the SDK does not implement truncation, the truncation marker is
|
|
7850
7850
|
// used to terminate all variable length values (which are strings, bytes,
|
|
7851
7851
|
// references, arrays and maps).
|
|
@@ -8052,7 +8052,7 @@ class __PRIVATE_AscendingIndexByteEncoder {
|
|
|
8052
8052
|
constructor(e) {
|
|
8053
8053
|
this.Zt = e;
|
|
8054
8054
|
}
|
|
8055
|
-
|
|
8055
|
+
St(e) {
|
|
8056
8056
|
this.Zt.Ot(e);
|
|
8057
8057
|
}
|
|
8058
8058
|
yt(e) {
|
|
@@ -8070,7 +8070,7 @@ class __PRIVATE_DescendingIndexByteEncoder {
|
|
|
8070
8070
|
constructor(e) {
|
|
8071
8071
|
this.Zt = e;
|
|
8072
8072
|
}
|
|
8073
|
-
|
|
8073
|
+
St(e) {
|
|
8074
8074
|
this.Zt.Lt(e);
|
|
8075
8075
|
}
|
|
8076
8076
|
yt(e) {
|
|
@@ -8593,7 +8593,7 @@ function __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) {
|
|
|
8593
8593
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8594
8594
|
* See the License for the specific language governing permissions and
|
|
8595
8595
|
* limitations under the License.
|
|
8596
|
-
*/ const
|
|
8596
|
+
*/ const bt = "IndexedDbIndexManager", St = new Uint8Array(0);
|
|
8597
8597
|
|
|
8598
8598
|
/**
|
|
8599
8599
|
* A persisted implementation of IndexManager.
|
|
@@ -8709,7 +8709,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8709
8709
|
let e = __PRIVATE_documentKeySet();
|
|
8710
8710
|
const r = [];
|
|
8711
8711
|
return PersistencePromise.forEach(i, ((i, s) => {
|
|
8712
|
-
__PRIVATE_logDebug(
|
|
8712
|
+
__PRIVATE_logDebug(bt, `Using index ${function __PRIVATE_fieldIndexToString(e) {
|
|
8713
8713
|
return `id=${e.indexId}|cg=${e.collectionGroup}|f=${e.fields.map((e => `${e.fieldPath}:${e.kind}`)).join(",")}`;
|
|
8714
8714
|
}(i)} to execute ${__PRIVATE_canonifyTarget(t)}`);
|
|
8715
8715
|
const o = function __PRIVATE_targetGetArrayValues(e, t) {
|
|
@@ -8807,7 +8807,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8807
8807
|
// combined with the values from the query bounds.
|
|
8808
8808
|
const _ = (null != t ? t.length : 1) * Math.max(n.length, i.length), a = _ / (null != t ? t.length : 1), u = [];
|
|
8809
8809
|
for (let c = 0; c < _; ++c) {
|
|
8810
|
-
const _ = t ? this.fn(t[c / a]) :
|
|
8810
|
+
const _ = t ? this.fn(t[c / a]) : St, l = this.gn(e, _, n[c % a], r), h = this.pn(e, _, i[c % a], s), P = o.map((t => this.gn(e, _, t,
|
|
8811
8811
|
/* inclusive= */ !0)));
|
|
8812
8812
|
u.push(...this.createRange(l, h, P));
|
|
8813
8813
|
}
|
|
@@ -8900,7 +8900,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8900
8900
|
let i = 0;
|
|
8901
8901
|
for (const s of __PRIVATE_fieldIndexGetDirectionalSegments(e)) {
|
|
8902
8902
|
const e = n[i++];
|
|
8903
|
-
for (const n of r) if (this.
|
|
8903
|
+
for (const n of r) if (this.bn(t, s.fieldPath) && isArray(e)) r = this.Sn(r, s, e); else {
|
|
8904
8904
|
const t = n.tn(s.kind);
|
|
8905
8905
|
__PRIVATE_FirestoreIndexValueWriter.xt.At(e, t);
|
|
8906
8906
|
}
|
|
@@ -8924,7 +8924,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8924
8924
|
* The method appends each value to all existing encoders (e.g. filter("a",
|
|
8925
8925
|
* "==", "a1").filter("b", "in", ["b1", "b2"]) becomes ["a1,b1", "a1,b2"]). A
|
|
8926
8926
|
* list of new encoders is returned.
|
|
8927
|
-
*/
|
|
8927
|
+
*/ Sn(e, t, n) {
|
|
8928
8928
|
const r = [ ...e ], i = [];
|
|
8929
8929
|
for (const e of n.arrayValue.values || []) for (const n of r) {
|
|
8930
8930
|
const r = new __PRIVATE_IndexByteEncoder;
|
|
@@ -8932,7 +8932,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8932
8932
|
}
|
|
8933
8933
|
return i;
|
|
8934
8934
|
}
|
|
8935
|
-
|
|
8935
|
+
bn(e, t) {
|
|
8936
8936
|
return !!e.filters.find((e => e instanceof FieldFilter && e.field.isEqual(t) && ("in" /* Operator.IN */ === e.op || "not-in" /* Operator.NOT_IN */ === e.op)));
|
|
8937
8937
|
}
|
|
8938
8938
|
getFieldIndexes(e, t) {
|
|
@@ -9004,7 +9004,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
9004
9004
|
if (null != i) {
|
|
9005
9005
|
const s = e.data.field(i.fieldPath);
|
|
9006
9006
|
if (isArray(s)) for (const i of s.arrayValue.values || []) n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, this.fn(i), r));
|
|
9007
|
-
} else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key,
|
|
9007
|
+
} else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, St, r));
|
|
9008
9008
|
return n;
|
|
9009
9009
|
}
|
|
9010
9010
|
/**
|
|
@@ -9012,7 +9012,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
9012
9012
|
* that are no longer referenced in `newEntries` and adding all newly added
|
|
9013
9013
|
* entries.
|
|
9014
9014
|
*/ Mn(e, t, n, r, i) {
|
|
9015
|
-
__PRIVATE_logDebug(
|
|
9015
|
+
__PRIVATE_logDebug(bt, "Updating index entries for document '%s'", t.key);
|
|
9016
9016
|
const s = [];
|
|
9017
9017
|
return function __PRIVATE_diffSortedSets(e, t, n, r, i) {
|
|
9018
9018
|
const s = e.getIterator(), o = t.getIterator();
|
|
@@ -9079,7 +9079,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
9079
9079
|
// If we encounter two bounds that will create an unmatchable key range,
|
|
9080
9080
|
// then we return an empty set of key ranges.
|
|
9081
9081
|
if (this.Nn(r[e], r[e + 1])) return [];
|
|
9082
|
-
const t = [ r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue,
|
|
9082
|
+
const t = [ r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue, St, [] ], n = [ r[e + 1].indexId, this.uid, r[e + 1].arrayValue, r[e + 1].directionalValue, St, [] ];
|
|
9083
9083
|
i.push(IDBKeyRange.bound(t, n));
|
|
9084
9084
|
}
|
|
9085
9085
|
return i;
|
|
@@ -9113,7 +9113,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
9113
9113
|
/**
|
|
9114
9114
|
* Helper to get a typed SimpleDbStore for the index configuration object store.
|
|
9115
9115
|
*/ function __PRIVATE_indexConfigurationStore(e) {
|
|
9116
|
-
return __PRIVATE_getStore(e,
|
|
9116
|
+
return __PRIVATE_getStore(e, be);
|
|
9117
9117
|
}
|
|
9118
9118
|
|
|
9119
9119
|
/**
|
|
@@ -10970,13 +10970,13 @@ class OverlayedDocument {
|
|
|
10970
10970
|
*/ removeReference(e, t) {
|
|
10971
10971
|
this.wr(new __PRIVATE_DocReference(e, t));
|
|
10972
10972
|
}
|
|
10973
|
-
|
|
10973
|
+
br(e, t) {
|
|
10974
10974
|
e.forEach((e => this.removeReference(e, t)));
|
|
10975
10975
|
}
|
|
10976
10976
|
/**
|
|
10977
10977
|
* Clears all references with a given ID. Calls removeRef() for each key
|
|
10978
10978
|
* removed.
|
|
10979
|
-
*/
|
|
10979
|
+
*/ Sr(e) {
|
|
10980
10980
|
const t = new DocumentKey(new ResourcePath([])), n = new __PRIVATE_DocReference(t, e), r = new __PRIVATE_DocReference(t, e + 1), i = [];
|
|
10981
10981
|
return this.gr.forEachInRange([ n, r ], (e => {
|
|
10982
10982
|
this.wr(e), i.push(e.key);
|
|
@@ -11374,7 +11374,7 @@ class __PRIVATE_MemoryRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuf
|
|
|
11374
11374
|
return this.zn(t), PersistencePromise.resolve();
|
|
11375
11375
|
}
|
|
11376
11376
|
removeTargetData(e, t) {
|
|
11377
|
-
return this.Qr.delete(t.target), this.Kr.
|
|
11377
|
+
return this.Qr.delete(t.target), this.Kr.Sr(t.targetId), this.targetCount -= 1,
|
|
11378
11378
|
PersistencePromise.resolve();
|
|
11379
11379
|
}
|
|
11380
11380
|
removeTargets(e, t, n) {
|
|
@@ -11396,14 +11396,14 @@ class __PRIVATE_MemoryRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuf
|
|
|
11396
11396
|
return this.Kr.yr(t, n), PersistencePromise.resolve();
|
|
11397
11397
|
}
|
|
11398
11398
|
removeMatchingKeys(e, t, n) {
|
|
11399
|
-
this.Kr.
|
|
11399
|
+
this.Kr.br(t, n);
|
|
11400
11400
|
const r = this.persistence.referenceDelegate, i = [];
|
|
11401
11401
|
return r && t.forEach((t => {
|
|
11402
11402
|
i.push(r.markPotentiallyOrphaned(e, t));
|
|
11403
11403
|
})), PersistencePromise.waitFor(i);
|
|
11404
11404
|
}
|
|
11405
11405
|
removeMatchingKeysForTargetId(e, t) {
|
|
11406
|
-
return this.Kr.
|
|
11406
|
+
return this.Kr.Sr(t), PersistencePromise.resolve();
|
|
11407
11407
|
}
|
|
11408
11408
|
getMatchingKeysForTargetId(e, t) {
|
|
11409
11409
|
const n = this.Kr.vr(t);
|
|
@@ -11538,7 +11538,7 @@ class __PRIVATE_MemoryEagerDelegate {
|
|
|
11538
11538
|
return this.ii.add(t.toString()), PersistencePromise.resolve();
|
|
11539
11539
|
}
|
|
11540
11540
|
removeTarget(e, t) {
|
|
11541
|
-
this.ti.
|
|
11541
|
+
this.ti.Sr(t.targetId).forEach((e => this.ii.add(e.toString())));
|
|
11542
11542
|
const n = this.persistence.getTargetCache();
|
|
11543
11543
|
return n.getMatchingKeysForTargetId(e, t.targetId).next((e => {
|
|
11544
11544
|
e.forEach((e => this.ii.add(e.toString())));
|
|
@@ -11778,8 +11778,8 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
11778
11778
|
t.createIndex(ie, se), t.createIndex(oe, _e);
|
|
11779
11779
|
}(e))).next((() => this.hi(e, i))).next((() => e.deleteObjectStore(W)))), n < 14 && r >= 14 && (s = s.next((() => this.Pi(e, i)))),
|
|
11780
11780
|
n < 15 && r >= 15 && (s = s.next((() => function __PRIVATE_createFieldIndex(e) {
|
|
11781
|
-
const t = e.createObjectStore(
|
|
11782
|
-
keyPath:
|
|
11781
|
+
const t = e.createObjectStore(be, {
|
|
11782
|
+
keyPath: Se,
|
|
11783
11783
|
autoIncrement: !0
|
|
11784
11784
|
});
|
|
11785
11785
|
t.createIndex(De, ve, {
|
|
@@ -12049,7 +12049,7 @@ class __PRIVATE_IndexedDbPersistence {
|
|
|
12049
12049
|
// Fail `start()` if `synchronizeTabs` is disabled and we cannot
|
|
12050
12050
|
// obtain the primary lease.
|
|
12051
12051
|
throw new FirestoreError(M.FAILED_PRECONDITION, Nt);
|
|
12052
|
-
return this.
|
|
12052
|
+
return this.bi(), this.Si(), this.Di(), this.runTransaction("getHighestListenSequenceNumber", "readonly", (e => this.Hr.getHighestSequenceNumber(e)));
|
|
12053
12053
|
})).then((e => {
|
|
12054
12054
|
this.Gr = new __PRIVATE_ListenSequence(e, this.Ii);
|
|
12055
12055
|
})).then((() => {
|
|
@@ -12310,7 +12310,7 @@ class __PRIVATE_IndexedDbPersistence {
|
|
|
12310
12310
|
return !(e < n - t) && (!(e > n) || (__PRIVATE_logError(`Detected an update time that is in the future: ${e} > ${n}`),
|
|
12311
12311
|
!1));
|
|
12312
12312
|
}
|
|
12313
|
-
|
|
12313
|
+
bi() {
|
|
12314
12314
|
null !== this.document && "function" == typeof this.document.addEventListener && (this.Ri = () => {
|
|
12315
12315
|
this.Ti.enqueueAndForget((() => (this.inForeground = "visible" === this.document.visibilityState,
|
|
12316
12316
|
this.wi())));
|
|
@@ -12328,7 +12328,7 @@ class __PRIVATE_IndexedDbPersistence {
|
|
|
12328
12328
|
* primary lease). LocalStorage is used for this rather than IndexedDb because
|
|
12329
12329
|
* it is a synchronous API and so can be used reliably from an unload
|
|
12330
12330
|
* handler.
|
|
12331
|
-
*/
|
|
12331
|
+
*/ Si() {
|
|
12332
12332
|
var e;
|
|
12333
12333
|
"function" == typeof (null === (e = this.window) || void 0 === e ? void 0 : e.addEventListener) && (this.Ai = () => {
|
|
12334
12334
|
// Note: In theory, this should be scheduled on the AsyncQueue since it
|
|
@@ -13243,14 +13243,14 @@ class __PRIVATE_MutationMetadata {
|
|
|
13243
13243
|
/**
|
|
13244
13244
|
* Parses a MutationMetadata from its JSON representation in WebStorage.
|
|
13245
13245
|
* Logs a warning and returns null if the format of the data is not valid.
|
|
13246
|
-
*/ static
|
|
13246
|
+
*/ static bs(e, t, n) {
|
|
13247
13247
|
const r = JSON.parse(n);
|
|
13248
13248
|
let i, s = "object" == typeof r && -1 !== [ "pending", "acknowledged", "rejected" ].indexOf(r.state) && (void 0 === r.error || "object" == typeof r.error);
|
|
13249
13249
|
return s && r.error && (s = "string" == typeof r.error.message && "string" == typeof r.error.code,
|
|
13250
13250
|
s && (i = new FirestoreError(r.error.code, r.error.message))), s ? new __PRIVATE_MutationMetadata(e, t, r.state, i) : (__PRIVATE_logError(Kt, `Failed to parse mutation state for ID '${t}': ${n}`),
|
|
13251
13251
|
null);
|
|
13252
13252
|
}
|
|
13253
|
-
|
|
13253
|
+
Ss() {
|
|
13254
13254
|
const e = {
|
|
13255
13255
|
state: this.state,
|
|
13256
13256
|
updateTimeMs: Date.now()
|
|
@@ -13274,14 +13274,14 @@ class __PRIVATE_QueryTargetMetadata {
|
|
|
13274
13274
|
/**
|
|
13275
13275
|
* Parses a QueryTargetMetadata from its JSON representation in WebStorage.
|
|
13276
13276
|
* Logs a warning and returns null if the format of the data is not valid.
|
|
13277
|
-
*/ static
|
|
13277
|
+
*/ static bs(e, t) {
|
|
13278
13278
|
const n = JSON.parse(t);
|
|
13279
13279
|
let r, i = "object" == typeof n && -1 !== [ "not-current", "current", "rejected" ].indexOf(n.state) && (void 0 === n.error || "object" == typeof n.error);
|
|
13280
13280
|
return i && n.error && (i = "string" == typeof n.error.message && "string" == typeof n.error.code,
|
|
13281
13281
|
i && (r = new FirestoreError(n.error.code, n.error.message))), i ? new __PRIVATE_QueryTargetMetadata(e, n.state, r) : (__PRIVATE_logError(Kt, `Failed to parse target state for ID '${e}': ${t}`),
|
|
13282
13282
|
null);
|
|
13283
13283
|
}
|
|
13284
|
-
|
|
13284
|
+
Ss() {
|
|
13285
13285
|
const e = {
|
|
13286
13286
|
state: this.state,
|
|
13287
13287
|
updateTimeMs: Date.now()
|
|
@@ -13303,7 +13303,7 @@ class __PRIVATE_QueryTargetMetadata {
|
|
|
13303
13303
|
/**
|
|
13304
13304
|
* Parses a RemoteClientState from the JSON representation in WebStorage.
|
|
13305
13305
|
* Logs a warning and returns null if the format of the data is not valid.
|
|
13306
|
-
*/ static
|
|
13306
|
+
*/ static bs(e, t) {
|
|
13307
13307
|
const n = JSON.parse(t);
|
|
13308
13308
|
let r = "object" == typeof n && n.activeTargetIds instanceof Array, i = __PRIVATE_targetIdSet();
|
|
13309
13309
|
for (let e = 0; r && e < n.activeTargetIds.length; ++e) r = isSafeInteger(n.activeTargetIds[e]),
|
|
@@ -13324,7 +13324,7 @@ class __PRIVATE_QueryTargetMetadata {
|
|
|
13324
13324
|
/**
|
|
13325
13325
|
* Parses a SharedOnlineState from its JSON representation in WebStorage.
|
|
13326
13326
|
* Logs a warning and returns null if the format of the data is not valid.
|
|
13327
|
-
*/ static
|
|
13327
|
+
*/ static bs(e) {
|
|
13328
13328
|
const t = JSON.parse(e);
|
|
13329
13329
|
return "object" == typeof t && -1 !== [ "Unknown", "Online", "Offline" ].indexOf(t.onlineState) && "string" == typeof t.clientId ? new __PRIVATE_SharedOnlineState(t.clientId, t.onlineState) : (__PRIVATE_logError(Kt, `Failed to parse online state: ${e}`),
|
|
13330
13330
|
null);
|
|
@@ -13355,7 +13355,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13355
13355
|
/**
|
|
13356
13356
|
* Converts this entry into a JSON-encoded format we can use for WebStorage.
|
|
13357
13357
|
* Does not encode `clientId` as it is part of the key in WebStorage.
|
|
13358
|
-
*/
|
|
13358
|
+
*/ Ss() {
|
|
13359
13359
|
const e = {
|
|
13360
13360
|
activeTargetIds: this.activeTargetIds.toArray(),
|
|
13361
13361
|
updateTimeMs: Date.now()
|
|
@@ -13423,7 +13423,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13423
13423
|
if (t === this.Cs) continue;
|
|
13424
13424
|
const e = this.getItem(createWebStorageClientStateKey(this.persistenceKey, t));
|
|
13425
13425
|
if (e) {
|
|
13426
|
-
const n = __PRIVATE_RemoteClientState.
|
|
13426
|
+
const n = __PRIVATE_RemoteClientState.bs(t, e);
|
|
13427
13427
|
n && (this.xs = this.xs.insert(n.clientId, n));
|
|
13428
13428
|
}
|
|
13429
13429
|
}
|
|
@@ -13470,7 +13470,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13470
13470
|
if (this.isActiveQueryTarget(e)) {
|
|
13471
13471
|
const t = this.storage.getItem(createWebStorageQueryTargetMetadataKey(this.persistenceKey, e));
|
|
13472
13472
|
if (t) {
|
|
13473
|
-
const r = __PRIVATE_QueryTargetMetadata.
|
|
13473
|
+
const r = __PRIVATE_QueryTargetMetadata.bs(e, t);
|
|
13474
13474
|
r && (n = r.state);
|
|
13475
13475
|
}
|
|
13476
13476
|
}
|
|
@@ -13578,11 +13578,11 @@ class __PRIVATE_LocalClientState {
|
|
|
13578
13578
|
return this.xs.get(this.Cs);
|
|
13579
13579
|
}
|
|
13580
13580
|
Ks() {
|
|
13581
|
-
this.setItem(this.Ns, this.Hs.
|
|
13581
|
+
this.setItem(this.Ns, this.Hs.Ss());
|
|
13582
13582
|
}
|
|
13583
13583
|
zs(e, t, n) {
|
|
13584
13584
|
const r = new __PRIVATE_MutationMetadata(this.currentUser, e, t, n), i = createWebStorageMutationBatchKey(this.persistenceKey, this.currentUser, e);
|
|
13585
|
-
this.setItem(i, r.
|
|
13585
|
+
this.setItem(i, r.Ss());
|
|
13586
13586
|
}
|
|
13587
13587
|
js(e) {
|
|
13588
13588
|
const t = createWebStorageMutationBatchKey(this.persistenceKey, this.currentUser, e);
|
|
@@ -13597,7 +13597,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13597
13597
|
}
|
|
13598
13598
|
Js(e, t, n) {
|
|
13599
13599
|
const r = createWebStorageQueryTargetMetadataKey(this.persistenceKey, e), i = new __PRIVATE_QueryTargetMetadata(e, t, n);
|
|
13600
|
-
this.setItem(r, i.
|
|
13600
|
+
this.setItem(r, i.Ss());
|
|
13601
13601
|
}
|
|
13602
13602
|
Zs(e) {
|
|
13603
13603
|
const t = JSON.stringify(Array.from(e));
|
|
@@ -13615,27 +13615,27 @@ class __PRIVATE_LocalClientState {
|
|
|
13615
13615
|
* be parsed.
|
|
13616
13616
|
*/ no(e, t) {
|
|
13617
13617
|
const n = this.Xs(e);
|
|
13618
|
-
return __PRIVATE_RemoteClientState.
|
|
13618
|
+
return __PRIVATE_RemoteClientState.bs(n, t);
|
|
13619
13619
|
}
|
|
13620
13620
|
/**
|
|
13621
13621
|
* Parses a mutation batch state in WebStorage. Returns 'null' if the value
|
|
13622
13622
|
* could not be parsed.
|
|
13623
13623
|
*/ ro(e, t) {
|
|
13624
13624
|
const n = this.ks.exec(e), r = Number(n[1]), i = void 0 !== n[2] ? n[2] : null;
|
|
13625
|
-
return __PRIVATE_MutationMetadata.
|
|
13625
|
+
return __PRIVATE_MutationMetadata.bs(new User(i), r, t);
|
|
13626
13626
|
}
|
|
13627
13627
|
/**
|
|
13628
13628
|
* Parses a query target state from WebStorage. Returns 'null' if the value
|
|
13629
13629
|
* could not be parsed.
|
|
13630
13630
|
*/ so(e, t) {
|
|
13631
13631
|
const n = this.qs.exec(e), r = Number(n[1]);
|
|
13632
|
-
return __PRIVATE_QueryTargetMetadata.
|
|
13632
|
+
return __PRIVATE_QueryTargetMetadata.bs(r, t);
|
|
13633
13633
|
}
|
|
13634
13634
|
/**
|
|
13635
13635
|
* Parses an online state from WebStorage. Returns 'null' if the value
|
|
13636
13636
|
* could not be parsed.
|
|
13637
13637
|
*/ Us(e) {
|
|
13638
|
-
return __PRIVATE_SharedOnlineState.
|
|
13638
|
+
return __PRIVATE_SharedOnlineState.bs(e);
|
|
13639
13639
|
}
|
|
13640
13640
|
_o(e) {
|
|
13641
13641
|
return JSON.parse(e);
|
|
@@ -13886,8 +13886,8 @@ class __PRIVATE_RestConnection {
|
|
|
13886
13886
|
const t = e.ssl ? "https" : "http", n = encodeURIComponent(this.databaseId.projectId), r = encodeURIComponent(this.databaseId.database);
|
|
13887
13887
|
this.po = t + "://" + e.host, this.yo = `projects/${n}/databases/${r}`, this.wo = this.databaseId.database === ot ? `project_id=${n}` : `project_id=${n}&database_id=${r}`;
|
|
13888
13888
|
}
|
|
13889
|
-
|
|
13890
|
-
const s = __PRIVATE_generateUniqueDebugId(), o = this.
|
|
13889
|
+
bo(e, t, n, r, i) {
|
|
13890
|
+
const s = __PRIVATE_generateUniqueDebugId(), o = this.So(e, t.toUriEncodedString());
|
|
13891
13891
|
__PRIVATE_logDebug(Gt, `Sending RPC '${e}' ${s}:`, o, n);
|
|
13892
13892
|
const _ = {
|
|
13893
13893
|
"google-cloud-resource-prefix": this.yo,
|
|
@@ -13902,7 +13902,7 @@ class __PRIVATE_RestConnection {
|
|
|
13902
13902
|
Co(e, t, n, r, i, s) {
|
|
13903
13903
|
// The REST API automatically aggregates all of the streamed results, so we
|
|
13904
13904
|
// can just use the normal invoke() method.
|
|
13905
|
-
return this.
|
|
13905
|
+
return this.bo(e, t, n, r, i);
|
|
13906
13906
|
}
|
|
13907
13907
|
/**
|
|
13908
13908
|
* Modifies the headers for a request, adding any authorization token if
|
|
@@ -13921,7 +13921,7 @@ class __PRIVATE_RestConnection {
|
|
|
13921
13921
|
e["Content-Type"] = "text/plain", this.databaseInfo.appId && (e["X-Firebase-GMPID"] = this.databaseInfo.appId),
|
|
13922
13922
|
t && t.headers.forEach(((t, n) => e[n] = t)), n && n.headers.forEach(((t, n) => e[n] = t));
|
|
13923
13923
|
}
|
|
13924
|
-
|
|
13924
|
+
So(e, t) {
|
|
13925
13925
|
const n = zt[e];
|
|
13926
13926
|
return `${this.po}/v1/${t}:${n}`;
|
|
13927
13927
|
}
|
|
@@ -14174,8 +14174,8 @@ class __PRIVATE_WebChannelConnection extends __PRIVATE_RestConnection {
|
|
|
14174
14174
|
h = !0, P.Ko(new FirestoreError(n, i)), c.close();
|
|
14175
14175
|
} else __PRIVATE_logDebug(jt, `RPC '${e}' stream ${r} received:`, i), P.Uo(i);
|
|
14176
14176
|
}
|
|
14177
|
-
})), __PRIVATE_unguardedEventListen(o,
|
|
14178
|
-
t.stat ===
|
|
14177
|
+
})), __PRIVATE_unguardedEventListen(o, b.STAT_EVENT, (t => {
|
|
14178
|
+
t.stat === S.PROXY ? __PRIVATE_logDebug(jt, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === S.NOPROXY && __PRIVATE_logDebug(jt, `RPC '${e}' stream ${r} detected no buffering proxy`);
|
|
14179
14179
|
})), setTimeout((() => {
|
|
14180
14180
|
// Technically we could/should wait for the WebChannel opened event,
|
|
14181
14181
|
// but because we want to send the first message with the WebChannel
|
|
@@ -14683,7 +14683,7 @@ class __PRIVATE_PersistentStream {
|
|
|
14683
14683
|
/**
|
|
14684
14684
|
* Tracks whether or not a handshake has been successfully exchanged and
|
|
14685
14685
|
* the stream is ready to accept mutations.
|
|
14686
|
-
*/ get
|
|
14686
|
+
*/ get b_() {
|
|
14687
14687
|
return this.__ > 0;
|
|
14688
14688
|
}
|
|
14689
14689
|
// Override of PersistentStream.start
|
|
@@ -14691,7 +14691,7 @@ class __PRIVATE_PersistentStream {
|
|
|
14691
14691
|
this.lastStreamToken = void 0, super.start();
|
|
14692
14692
|
}
|
|
14693
14693
|
A_() {
|
|
14694
|
-
this.
|
|
14694
|
+
this.b_ && this.S_([]);
|
|
14695
14695
|
}
|
|
14696
14696
|
f_(e, t) {
|
|
14697
14697
|
return this.connection.Wo("Write", e, t);
|
|
@@ -14722,7 +14722,7 @@ class __PRIVATE_PersistentStream {
|
|
|
14722
14722
|
const e = {};
|
|
14723
14723
|
e.database = __PRIVATE_getEncodedDatabaseId(this.serializer), this.I_(e);
|
|
14724
14724
|
}
|
|
14725
|
-
/** Sends a group of mutations to the Firestore backend to apply. */
|
|
14725
|
+
/** Sends a group of mutations to the Firestore backend to apply. */ S_(e) {
|
|
14726
14726
|
const t = {
|
|
14727
14727
|
streamToken: this.lastStreamToken,
|
|
14728
14728
|
writes: e.map((e => toMutation(this.serializer, e)))
|
|
@@ -14764,8 +14764,8 @@ class __PRIVATE_PersistentStream {
|
|
|
14764
14764
|
M_() {
|
|
14765
14765
|
if (this.F_) throw new FirestoreError(M.FAILED_PRECONDITION, "The client has already been terminated.");
|
|
14766
14766
|
}
|
|
14767
|
-
/** Invokes the provided RPC with auth and AppCheck tokens. */
|
|
14768
|
-
return this.M_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, s]) => this.connection.
|
|
14767
|
+
/** Invokes the provided RPC with auth and AppCheck tokens. */ bo(e, t, n, r) {
|
|
14768
|
+
return this.M_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, s]) => this.connection.bo(e, __PRIVATE_toResourcePath(t, n), r, i, s))).catch((e => {
|
|
14769
14769
|
throw "FirebaseError" === e.name ? (e.code === M.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
|
|
14770
14770
|
this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(M.UNKNOWN, e.toString());
|
|
14771
14771
|
}));
|
|
@@ -15180,7 +15180,7 @@ async function __PRIVATE_fillWritePipeline(e) {
|
|
|
15180
15180
|
*/ function __PRIVATE_addToWritePipeline(e, t) {
|
|
15181
15181
|
e.K_.push(t);
|
|
15182
15182
|
const n = __PRIVATE_ensureWriteStream(e);
|
|
15183
|
-
n.c_() && n.
|
|
15183
|
+
n.c_() && n.b_ && n.S_(t.mutations);
|
|
15184
15184
|
}
|
|
15185
15185
|
|
|
15186
15186
|
function __PRIVATE_shouldStartWriteStream(e) {
|
|
@@ -15198,7 +15198,7 @@ async function __PRIVATE_onWriteStreamOpen(e) {
|
|
|
15198
15198
|
async function __PRIVATE_onWriteHandshakeComplete(e) {
|
|
15199
15199
|
const t = __PRIVATE_ensureWriteStream(e);
|
|
15200
15200
|
// Send the write pipeline now that the stream is established.
|
|
15201
|
-
for (const n of e.K_) t.
|
|
15201
|
+
for (const n of e.K_) t.S_(n.mutations);
|
|
15202
15202
|
}
|
|
15203
15203
|
|
|
15204
15204
|
async function __PRIVATE_onMutationResult(e, t, n) {
|
|
@@ -15212,7 +15212,7 @@ async function __PRIVATE_onMutationResult(e, t, n) {
|
|
|
15212
15212
|
async function __PRIVATE_onWriteStreamClose(e, t) {
|
|
15213
15213
|
// If the write stream closed after the write handshake completes, a write
|
|
15214
15214
|
// operation failed and we fail the pending operation.
|
|
15215
|
-
t && __PRIVATE_ensureWriteStream(e).
|
|
15215
|
+
t && __PRIVATE_ensureWriteStream(e).b_ &&
|
|
15216
15216
|
// This error affects the actual write.
|
|
15217
15217
|
await async function __PRIVATE_handleWriteError(e, t) {
|
|
15218
15218
|
// Only handle permanent errors here. If it's transient, just let the retry
|
|
@@ -16019,7 +16019,7 @@ class __PRIVATE_RemovedLimboDocument {
|
|
|
16019
16019
|
/**
|
|
16020
16020
|
* The set of remote documents that the server has told us belongs to the target associated with
|
|
16021
16021
|
* this view.
|
|
16022
|
-
*/ get
|
|
16022
|
+
*/ get ba() {
|
|
16023
16023
|
return this.fa;
|
|
16024
16024
|
}
|
|
16025
16025
|
/**
|
|
@@ -16031,7 +16031,7 @@ class __PRIVATE_RemovedLimboDocument {
|
|
|
16031
16031
|
* @param previousChanges - If this is being called with a refill, then start
|
|
16032
16032
|
* with this set of docs and changes instead of the current view.
|
|
16033
16033
|
* @returns a new set of docs, changes, and refill flag.
|
|
16034
|
-
*/
|
|
16034
|
+
*/ Sa(e, t) {
|
|
16035
16035
|
const n = t ? t.Da : new __PRIVATE_DocumentChangeSet, r = t ? t.wa : this.wa;
|
|
16036
16036
|
let i = t ? t.mutatedKeys : this.mutatedKeys, s = r, o = !1;
|
|
16037
16037
|
// Track the last doc in a (full) limit. This is necessary, because some
|
|
@@ -16244,7 +16244,7 @@ class __PRIVATE_RemovedLimboDocument {
|
|
|
16244
16244
|
// PORTING NOTE: Multi-tab only.
|
|
16245
16245
|
Oa(e) {
|
|
16246
16246
|
this.fa = e.gs, this.pa = __PRIVATE_documentKeySet();
|
|
16247
|
-
const t = this.
|
|
16247
|
+
const t = this.Sa(e.documents);
|
|
16248
16248
|
return this.applyChanges(t, /* limboResolutionEnabled= */ !0);
|
|
16249
16249
|
}
|
|
16250
16250
|
/**
|
|
@@ -16393,19 +16393,19 @@ async function __PRIVATE_allocateTargetAndMaybeListen(e, t, n, r) {
|
|
|
16393
16393
|
// targets based on view changes. This allows us to only depend on Limbo
|
|
16394
16394
|
// changes when user code includes queries.
|
|
16395
16395
|
e.Ha = (t, n, r) => async function __PRIVATE_applyDocChanges(e, t, n, r) {
|
|
16396
|
-
let i = t.view.
|
|
16396
|
+
let i = t.view.Sa(n);
|
|
16397
16397
|
i.ls && (
|
|
16398
16398
|
// The query has a limit and some docs were removed, so we need
|
|
16399
16399
|
// to re-run the query against the local store to make sure we
|
|
16400
16400
|
// didn't lose any good docs that had been past the limit.
|
|
16401
16401
|
i = await __PRIVATE_localStoreExecuteQuery(e.localStore, t.query,
|
|
16402
|
-
/* usePreviousResults= */ !1).then((({documents: e}) => t.view.
|
|
16402
|
+
/* usePreviousResults= */ !1).then((({documents: e}) => t.view.Sa(e, i))));
|
|
16403
16403
|
const s = r && r.targetChanges.get(t.targetId), o = r && null != r.targetMismatches.get(t.targetId), _ = t.view.applyChanges(i,
|
|
16404
16404
|
/* limboResolutionEnabled= */ e.isPrimaryClient, s, o);
|
|
16405
16405
|
return __PRIVATE_updateTrackedLimbos(e, t.targetId, _.Ma), _.snapshot;
|
|
16406
16406
|
}(e, t, n, r);
|
|
16407
16407
|
const s = await __PRIVATE_localStoreExecuteQuery(e.localStore, t,
|
|
16408
|
-
/* usePreviousResults= */ !0), o = new __PRIVATE_View(t, s.gs), _ = o.
|
|
16408
|
+
/* usePreviousResults= */ !0), o = new __PRIVATE_View(t, s.gs), _ = o.Sa(s.documents), a = TargetChange.createSynthesizedTargetChangeForCurrentChange(n, r && "Offline" /* OnlineState.Offline */ !== e.onlineState, i), u = o.applyChanges(_,
|
|
16409
16409
|
/* limboResolutionEnabled= */ e.isPrimaryClient, a);
|
|
16410
16410
|
__PRIVATE_updateTrackedLimbos(e, n, u.Ma);
|
|
16411
16411
|
const c = new __PRIVATE_QueryView(t, n, o);
|
|
@@ -16690,7 +16690,7 @@ function __PRIVATE_removeAndCleanupTarget(e, t, n = null) {
|
|
|
16690
16690
|
e.sharedClientState.removeLocalQueryTarget(t);
|
|
16691
16691
|
for (const r of e.qa.get(t)) e.ka.delete(r), n && e.La.Ja(r, n);
|
|
16692
16692
|
if (e.qa.delete(t), e.isPrimaryClient) {
|
|
16693
|
-
e.Ua.
|
|
16693
|
+
e.Ua.Sr(t).forEach((t => {
|
|
16694
16694
|
e.Ua.containsKey(t) ||
|
|
16695
16695
|
// We removed the last reference for this key
|
|
16696
16696
|
__PRIVATE_removeLimboTarget(e, t);
|
|
@@ -16811,7 +16811,7 @@ function __PRIVATE_syncEngineGetRemoteKeysForTarget(e, t) {
|
|
|
16811
16811
|
if (!r) return e;
|
|
16812
16812
|
for (const t of r) {
|
|
16813
16813
|
const r = n.ka.get(t);
|
|
16814
|
-
e = e.unionWith(r.view.
|
|
16814
|
+
e = e.unionWith(r.view.ba);
|
|
16815
16815
|
}
|
|
16816
16816
|
return e;
|
|
16817
16817
|
}
|
|
@@ -17597,7 +17597,7 @@ class Transaction$2 {
|
|
|
17597
17597
|
const n = __PRIVATE_debugCast(e), r = {
|
|
17598
17598
|
writes: t.map((e => toMutation(n.serializer, e)))
|
|
17599
17599
|
};
|
|
17600
|
-
await n.
|
|
17600
|
+
await n.bo("Commit", n.serializer.databaseId, ResourcePath.emptyPath(), r);
|
|
17601
17601
|
}(this.datastore, this.mutations), this.committed = !0;
|
|
17602
17602
|
}
|
|
17603
17603
|
recordVersion(e) {
|
|
@@ -17959,7 +17959,7 @@ function __PRIVATE_firestoreClientGetDocumentsFromLocalCache(e, t) {
|
|
|
17959
17959
|
return e.asyncQueue.enqueueAndForget((async () => async function __PRIVATE_executeQueryFromCache(e, t, n) {
|
|
17960
17960
|
try {
|
|
17961
17961
|
const r = await __PRIVATE_localStoreExecuteQuery(e, t,
|
|
17962
|
-
/* usePreviousResults= */ !0), i = new __PRIVATE_View(t, r.gs), s = i.
|
|
17962
|
+
/* usePreviousResults= */ !0), i = new __PRIVATE_View(t, r.gs), s = i.Sa(r.documents), o = i.applyChanges(s,
|
|
17963
17963
|
/* limboResolutionEnabled= */ !1);
|
|
17964
17964
|
n.resolve(o.snapshot);
|
|
17965
17965
|
} catch (e) {
|
|
@@ -18734,13 +18734,13 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
18734
18734
|
// Visibility handler that triggers an immediate retry of all retryable
|
|
18735
18735
|
// operations. Meant to speed up recovery when we regain file system access
|
|
18736
18736
|
// after page comes into foreground.
|
|
18737
|
-
this.
|
|
18737
|
+
this.bu = () => {
|
|
18738
18738
|
const e = getDocument();
|
|
18739
18739
|
e && __PRIVATE_logDebug(sn, "Visibility state changed to " + e.visibilityState),
|
|
18740
18740
|
this.a_.t_();
|
|
18741
|
-
}, this.
|
|
18741
|
+
}, this.Su = e;
|
|
18742
18742
|
const t = getDocument();
|
|
18743
|
-
t && "function" == typeof t.addEventListener && t.addEventListener("visibilitychange", this.
|
|
18743
|
+
t && "function" == typeof t.addEventListener && t.addEventListener("visibilitychange", this.bu);
|
|
18744
18744
|
}
|
|
18745
18745
|
get isShuttingDown() {
|
|
18746
18746
|
return this.mu;
|
|
@@ -18761,7 +18761,7 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
18761
18761
|
if (!this.mu) {
|
|
18762
18762
|
this.mu = !0, this.yu = e || !1;
|
|
18763
18763
|
const t = getDocument();
|
|
18764
|
-
t && "function" == typeof t.removeEventListener && t.removeEventListener("visibilitychange", this.
|
|
18764
|
+
t && "function" == typeof t.removeEventListener && t.removeEventListener("visibilitychange", this.bu);
|
|
18765
18765
|
}
|
|
18766
18766
|
}
|
|
18767
18767
|
enqueue(e) {
|
|
@@ -18805,7 +18805,7 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
18805
18805
|
}
|
|
18806
18806
|
}
|
|
18807
18807
|
vu(e) {
|
|
18808
|
-
const t = this.
|
|
18808
|
+
const t = this.Su.then((() => (this.pu = !0, e().catch((e => {
|
|
18809
18809
|
this.gu = e, this.pu = !1;
|
|
18810
18810
|
const t =
|
|
18811
18811
|
/**
|
|
@@ -18839,7 +18839,7 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
18839
18839
|
// and return the rejected Promise.
|
|
18840
18840
|
throw __PRIVATE_logError("INTERNAL UNHANDLED ERROR: ", t), e;
|
|
18841
18841
|
})).then((e => (this.pu = !1, e))))));
|
|
18842
|
-
return this.
|
|
18842
|
+
return this.Su = t, t;
|
|
18843
18843
|
}
|
|
18844
18844
|
enqueueAfterDelay(e, t, n) {
|
|
18845
18845
|
this.Du(),
|
|
@@ -18862,8 +18862,8 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
18862
18862
|
// operations were executed.
|
|
18863
18863
|
let e;
|
|
18864
18864
|
do {
|
|
18865
|
-
e = this.
|
|
18866
|
-
} while (e !== this.
|
|
18865
|
+
e = this.Su, await e;
|
|
18866
|
+
} while (e !== this.Su);
|
|
18867
18867
|
}
|
|
18868
18868
|
/**
|
|
18869
18869
|
* For Tests: Determine if a delayed operation with a particular TimerId
|
|
@@ -4,7 +4,7 @@ import { Logger, LogLevel } from '@firebase/logger';
|
|
|
4
4
|
import { FirebaseError, getDefaultEmulatorHostnameAndPort, deepEqual, createMockUserToken, getModularInstance } from '@firebase/util';
|
|
5
5
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
|
|
7
|
-
const E = "4.7.7-canary.
|
|
7
|
+
const E = "4.7.7-canary.2d74e5bfb";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -65,7 +65,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
65
65
|
* See the License for the specific language governing permissions and
|
|
66
66
|
* limitations under the License.
|
|
67
67
|
*/
|
|
68
|
-
let m = "11.3.0-canary.
|
|
68
|
+
let m = "11.3.0-canary.2d74e5bfb";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
package/dist/lite/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Logger, LogLevel } from '@firebase/logger';
|
|
|
4
4
|
import { FirebaseError, getDefaultEmulatorHostnameAndPort, deepEqual, createMockUserToken, getModularInstance } from '@firebase/util';
|
|
5
5
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
|
|
7
|
-
const E = "4.7.7-canary.
|
|
7
|
+
const E = "4.7.7-canary.2d74e5bfb";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -65,7 +65,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
65
65
|
* See the License for the specific language governing permissions and
|
|
66
66
|
* limitations under the License.
|
|
67
67
|
*/
|
|
68
|
-
let m = "11.3.0-canary.
|
|
68
|
+
let m = "11.3.0-canary.2d74e5bfb";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
@@ -10,7 +10,7 @@ var util = require('@firebase/util');
|
|
|
10
10
|
var bloomBlob = require('@firebase/webchannel-wrapper/bloom-blob');
|
|
11
11
|
var crypto = require('crypto');
|
|
12
12
|
|
|
13
|
-
const version$1 = "4.7.7-canary.
|
|
13
|
+
const version$1 = "4.7.7-canary.2d74e5bfb";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -63,7 +63,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
63
63
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
64
64
|
User.MOCK_USER = new User('mock-user');
|
|
65
65
|
|
|
66
|
-
const version = "11.3.0-canary.
|
|
66
|
+
const version = "11.3.0-canary.2d74e5bfb";
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
package/dist/lite/index.node.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { FirebaseError, getDefaultEmulatorHostnameAndPort, deepEqual, createMock
|
|
|
6
6
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
7
7
|
import { randomBytes as randomBytes$1 } from 'crypto';
|
|
8
8
|
|
|
9
|
-
const version$1 = "4.7.7-canary.
|
|
9
|
+
const version$1 = "4.7.7-canary.2d74e5bfb";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -59,7 +59,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
59
59
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
60
60
|
User.MOCK_USER = new User('mock-user');
|
|
61
61
|
|
|
62
|
-
const version = "11.3.0-canary.
|
|
62
|
+
const version = "11.3.0-canary.2d74e5bfb";
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
@@ -8,7 +8,7 @@ import { FirebaseError as _, base64 as c, DecodeBase64StringError as l, getDefau
|
|
|
8
8
|
|
|
9
9
|
import { Integer as m } from "@firebase/webchannel-wrapper/bloom-blob";
|
|
10
10
|
|
|
11
|
-
const A = "4.7.7-canary.
|
|
11
|
+
const A = "4.7.7-canary.2d74e5bfb";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -69,7 +69,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
69
69
|
* See the License for the specific language governing permissions and
|
|
70
70
|
* limitations under the License.
|
|
71
71
|
*/
|
|
72
|
-
let T = "11.3.0-canary.
|
|
72
|
+
let T = "11.3.0-canary.2d74e5bfb";
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @license
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "4.7.7-canary.
|
|
3
|
+
"version": "4.7.7-canary.2d74e5bfb",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0"
|
|
6
6
|
},
|
|
@@ -94,21 +94,21 @@
|
|
|
94
94
|
"lite/package.json"
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@firebase/component": "0.6.12-canary.
|
|
98
|
-
"@firebase/logger": "0.4.4-canary.
|
|
99
|
-
"@firebase/util": "1.10.3-canary.
|
|
100
|
-
"@firebase/webchannel-wrapper": "1.0.3-canary.
|
|
97
|
+
"@firebase/component": "0.6.12-canary.2d74e5bfb",
|
|
98
|
+
"@firebase/logger": "0.4.4-canary.2d74e5bfb",
|
|
99
|
+
"@firebase/util": "1.10.3-canary.2d74e5bfb",
|
|
100
|
+
"@firebase/webchannel-wrapper": "1.0.3-canary.2d74e5bfb",
|
|
101
101
|
"@grpc/grpc-js": "~1.9.0",
|
|
102
102
|
"@grpc/proto-loader": "^0.7.8",
|
|
103
103
|
"tslib": "^2.1.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@firebase/app": "0.11.0-canary.
|
|
106
|
+
"@firebase/app": "0.11.0-canary.2d74e5bfb"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@firebase/app": "0.11.0-canary.
|
|
110
|
-
"@firebase/app-compat": "0.2.49-canary.
|
|
111
|
-
"@firebase/auth": "1.9.0-canary.
|
|
109
|
+
"@firebase/app": "0.11.0-canary.2d74e5bfb",
|
|
110
|
+
"@firebase/app-compat": "0.2.49-canary.2d74e5bfb",
|
|
111
|
+
"@firebase/auth": "1.9.0-canary.2d74e5bfb",
|
|
112
112
|
"@rollup/plugin-alias": "5.1.1",
|
|
113
113
|
"@rollup/plugin-json": "6.1.0",
|
|
114
114
|
"@types/eslint": "7.29.0",
|