@firebase/firestore 3.8.3-canary.c8a6e08b0 → 3.8.3-canary.d5d78cbcf
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/firestore/src/core/query.d.ts +0 -1
- package/dist/index.cjs.js +12 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +12 -20
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +117 -125
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +46 -65
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +46 -65
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +12 -20
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/firestore/src/core/query.d.ts +0 -1
- package/dist/lite/index.browser.esm2017.js +1301 -1309
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +16 -24
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.cjs.js +1301 -1309
- package/dist/lite/index.cjs.js.map +1 -1
- package/dist/lite/index.node.cjs.js +9 -28
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +9 -28
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1309 -1317
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +130 -130
- package/dist/lite/packages/firestore/src/core/query.d.ts +0 -1
- package/dist/packages/firestore/src/core/query.d.ts +0 -1
- package/package.json +9 -9
package/dist/index.esm5.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Component as c } from "@firebase/component";
|
|
|
6
6
|
|
|
7
7
|
import { Logger as l, LogLevel as h } from "@firebase/logger";
|
|
8
8
|
|
|
9
|
-
import { FirebaseError as f, getUA as d, isSafari as p, getModularInstance as v, isIndexedDBAvailable as
|
|
9
|
+
import { FirebaseError as f, getUA as d, isSafari as p, getModularInstance as v, isIndexedDBAvailable as m, createMockUserToken as y, deepEqual as g, getDefaultEmulatorHostnameAndPort as w } from "@firebase/util";
|
|
10
10
|
|
|
11
11
|
import { XhrIo as b, EventType as I, ErrorCode as T, createWebChannelTransport as E, getStatEventTarget as S, FetchXmlHttpFactory as _, WebChannel as D, Event as x, Stat as A } from "@firebase/webchannel-wrapper";
|
|
12
12
|
|
|
@@ -70,7 +70,7 @@ C.MOCK_USER = new C("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
var k = "9.17.1-canary.
|
|
73
|
+
var k = "9.17.1-canary.d5d78cbcf", O = new l("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -1090,7 +1090,7 @@ function pt(t) {
|
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Compares indexes by collection group and segments. Ignores update time and
|
|
1092
1092
|
* index ID.
|
|
1093
|
-
*/ function
|
|
1093
|
+
*/ function mt(t, e) {
|
|
1094
1094
|
var n = rt(t.collectionGroup, e.collectionGroup);
|
|
1095
1095
|
if (0 !== n) return n;
|
|
1096
1096
|
for (var r = 0; r < Math.min(t.fields.length, e.fields.length); ++r) if (0 !== (n = gt(t.fields[r], e.fields[r]))) return n;
|
|
@@ -1100,7 +1100,7 @@ function pt(t) {
|
|
|
1100
1100
|
/** Returns a debug representation of the field index */ dt.UNKNOWN_ID = -1;
|
|
1101
1101
|
|
|
1102
1102
|
/** An index component consisting of field path and index type. */
|
|
1103
|
-
var
|
|
1103
|
+
var yt = function(
|
|
1104
1104
|
/** The field path of the component. */
|
|
1105
1105
|
t,
|
|
1106
1106
|
/** The fields sorting order. */
|
|
@@ -1482,7 +1482,7 @@ function Dt(t) {
|
|
|
1482
1482
|
return M("SimpleDb", "Removing database:", t), Rt(window.indexedDB.deleteDatabase(t)).toPromise();
|
|
1483
1483
|
},
|
|
1484
1484
|
/** Returns true if IndexedDB is available in the current environment. */ t.C = function() {
|
|
1485
|
-
if (!
|
|
1485
|
+
if (!m()) return !1;
|
|
1486
1486
|
if (t.N()) return !0;
|
|
1487
1487
|
// We extensively use indexed array values and compound keys,
|
|
1488
1488
|
// which IE and Edge do not support. However, they still have indexedDB
|
|
@@ -2654,13 +2654,13 @@ function ve(t) {
|
|
|
2654
2654
|
var e, n;
|
|
2655
2655
|
}
|
|
2656
2656
|
|
|
2657
|
-
function
|
|
2657
|
+
function me(t, e) {
|
|
2658
2658
|
return {
|
|
2659
2659
|
referenceValue: "projects/".concat(t.projectId, "/databases/").concat(t.database, "/documents/").concat(e.path.canonicalString())
|
|
2660
2660
|
};
|
|
2661
2661
|
}
|
|
2662
2662
|
|
|
2663
|
-
/** Returns true if `value` is an IntegerValue . */ function
|
|
2663
|
+
/** Returns true if `value` is an IntegerValue . */ function ye(t) {
|
|
2664
2664
|
return !!t && "integerValue" in t;
|
|
2665
2665
|
}
|
|
2666
2666
|
|
|
@@ -2726,7 +2726,7 @@ function ye(t, e) {
|
|
|
2726
2726
|
stringValue: ""
|
|
2727
2727
|
} : "bytesValue" in t ? {
|
|
2728
2728
|
bytesValue: ""
|
|
2729
|
-
} : "referenceValue" in t ?
|
|
2729
|
+
} : "referenceValue" in t ? me(jt.empty(), ft.empty()) : "geoPointValue" in t ? {
|
|
2730
2730
|
geoPointValue: {
|
|
2731
2731
|
latitude: -90,
|
|
2732
2732
|
longitude: -180
|
|
@@ -2751,7 +2751,7 @@ function ye(t, e) {
|
|
|
2751
2751
|
stringValue: ""
|
|
2752
2752
|
} : "stringValue" in t ? {
|
|
2753
2753
|
bytesValue: ""
|
|
2754
|
-
} : "bytesValue" in t ?
|
|
2754
|
+
} : "bytesValue" in t ? me(jt.empty(), ft.empty()) : "referenceValue" in t ? {
|
|
2755
2755
|
geoPointValue: {
|
|
2756
2756
|
latitude: -90,
|
|
2757
2757
|
longitude: -180
|
|
@@ -4029,7 +4029,7 @@ function dn(t) {
|
|
|
4029
4029
|
/**
|
|
4030
4030
|
* Returns the value to use as the upper bound for ascending index segment at
|
|
4031
4031
|
* the provided `fieldPath` (or the lower bound for a descending segment).
|
|
4032
|
-
*/ function
|
|
4032
|
+
*/ function mn(t, e, n) {
|
|
4033
4033
|
// Process all filters to find a value for the current field segment
|
|
4034
4034
|
for (var r = ae, i = !0, o = 0, u = pn(t, e); o < u.length; o++) {
|
|
4035
4035
|
var a = u[o], s = ae, c = !0;
|
|
@@ -4104,7 +4104,7 @@ function dn(t) {
|
|
|
4104
4104
|
* query the RemoteStore results.
|
|
4105
4105
|
*
|
|
4106
4106
|
* Visible for testing.
|
|
4107
|
-
*/ var
|
|
4107
|
+
*/ var yn =
|
|
4108
4108
|
/**
|
|
4109
4109
|
* Initializes a Query with a path and optional additional query constraints.
|
|
4110
4110
|
* Path must currently be empty if this is a collection group query.
|
|
@@ -4120,11 +4120,11 @@ function(t, e, n, r, i, o /* LimitType.First */ , u, a) {
|
|
|
4120
4120
|
};
|
|
4121
4121
|
|
|
4122
4122
|
/** Creates a new Query instance with the options provided. */ function gn(t, e, n, r, i, o, u, a) {
|
|
4123
|
-
return new
|
|
4123
|
+
return new yn(t, e, n, r, i, o, u, a);
|
|
4124
4124
|
}
|
|
4125
4125
|
|
|
4126
4126
|
/** Creates a new Query for a query that matches all documents at `path` */ function wn(t) {
|
|
4127
|
-
return new
|
|
4127
|
+
return new yn(t);
|
|
4128
4128
|
}
|
|
4129
4129
|
|
|
4130
4130
|
/**
|
|
@@ -4214,11 +4214,11 @@ function Tn(t) {
|
|
|
4214
4214
|
function Dn(t, e) {
|
|
4215
4215
|
e.getFirstInequalityField(), Tn(t);
|
|
4216
4216
|
var n = t.filters.concat([ e ]);
|
|
4217
|
-
return new
|
|
4217
|
+
return new yn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
|
|
4218
4218
|
}
|
|
4219
4219
|
|
|
4220
4220
|
function xn(t, e, n) {
|
|
4221
|
-
return new
|
|
4221
|
+
return new yn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
|
|
4222
4222
|
}
|
|
4223
4223
|
|
|
4224
4224
|
function An(t, e) {
|
|
@@ -4425,7 +4425,7 @@ function Rn(t, e, n) {
|
|
|
4425
4425
|
// precision and resolves overflows by reducing precision, we do not
|
|
4426
4426
|
// manually cap overflows at 2^63.
|
|
4427
4427
|
var n = Bn(t, e), r = Hn(n) + Hn(t.It);
|
|
4428
|
-
return
|
|
4428
|
+
return ye(n) && ye(t.It) ? Vn(r) : Mn(t.Tt, r);
|
|
4429
4429
|
}(t, e);
|
|
4430
4430
|
}
|
|
4431
4431
|
|
|
@@ -4454,7 +4454,7 @@ function Rn(t, e, n) {
|
|
|
4454
4454
|
* @returns a base value to store along with the mutation, or null for
|
|
4455
4455
|
* idempotent transforms.
|
|
4456
4456
|
*/ function Bn(t, e) {
|
|
4457
|
-
return t instanceof Wn ?
|
|
4457
|
+
return t instanceof Wn ? ye(n = e) || function(t) {
|
|
4458
4458
|
return !!t && "doubleValue" in t;
|
|
4459
4459
|
}(n) ? e : {
|
|
4460
4460
|
integerValue: 0
|
|
@@ -4888,7 +4888,7 @@ function(t) {
|
|
|
4888
4888
|
*
|
|
4889
4889
|
* See isPermanentWriteError for classifying write errors.
|
|
4890
4890
|
*/
|
|
4891
|
-
function
|
|
4891
|
+
function mr(t) {
|
|
4892
4892
|
switch (t) {
|
|
4893
4893
|
default:
|
|
4894
4894
|
return q();
|
|
@@ -4938,7 +4938,7 @@ function yr(t) {
|
|
|
4938
4938
|
*
|
|
4939
4939
|
* @returns The Code equivalent to the given GRPC status code. Fails if there
|
|
4940
4940
|
* is no match.
|
|
4941
|
-
*/ function
|
|
4941
|
+
*/ function yr(t) {
|
|
4942
4942
|
if (void 0 === t)
|
|
4943
4943
|
// This shouldn't normally happen, but in certain error cases (like trying
|
|
4944
4944
|
// to send invalid proto messages) we may get an error with no GRPC code.
|
|
@@ -5799,7 +5799,7 @@ function oi(t, e) {
|
|
|
5799
5799
|
delete: Jr(t, e.key)
|
|
5800
5800
|
}; else if (e instanceof ar) n = {
|
|
5801
5801
|
update: ri(t, e.key, e.data),
|
|
5802
|
-
updateMask:
|
|
5802
|
+
updateMask: yi(e.fieldMask)
|
|
5803
5803
|
}; else {
|
|
5804
5804
|
if (!(e instanceof pr)) return q();
|
|
5805
5805
|
n = {
|
|
@@ -5904,7 +5904,7 @@ function si(t, e) {
|
|
|
5904
5904
|
collectionId: r.lastSegment()
|
|
5905
5905
|
} ]);
|
|
5906
5906
|
var i = function(t) {
|
|
5907
|
-
if (0 !== t.length) return
|
|
5907
|
+
if (0 !== t.length) return mi(Fe.create(t, "and" /* CompositeOperator.AND */));
|
|
5908
5908
|
}(e.filters);
|
|
5909
5909
|
i && (n.structuredQuery.where = i);
|
|
5910
5910
|
var o = function(t) {
|
|
@@ -6090,7 +6090,7 @@ function vi(t) {
|
|
|
6090
6090
|
return ht.fromServerFormat(t.fieldPath);
|
|
6091
6091
|
}
|
|
6092
6092
|
|
|
6093
|
-
function
|
|
6093
|
+
function mi(t) {
|
|
6094
6094
|
return t instanceof Oe ? function(t) {
|
|
6095
6095
|
if ("==" /* Operator.EQUAL */ === t.op) {
|
|
6096
6096
|
if (be(t.value)) return {
|
|
@@ -6128,7 +6128,7 @@ function yi(t) {
|
|
|
6128
6128
|
};
|
|
6129
6129
|
}(t) : t instanceof Fe ? function(t) {
|
|
6130
6130
|
var e = t.getFilters().map((function(t) {
|
|
6131
|
-
return
|
|
6131
|
+
return mi(t);
|
|
6132
6132
|
}));
|
|
6133
6133
|
return 1 === e.length ? e[0] : {
|
|
6134
6134
|
compositeFilter: {
|
|
@@ -6139,7 +6139,7 @@ function yi(t) {
|
|
|
6139
6139
|
}(t) : q();
|
|
6140
6140
|
}
|
|
6141
6141
|
|
|
6142
|
-
function
|
|
6142
|
+
function yi(t) {
|
|
6143
6143
|
var e = [];
|
|
6144
6144
|
return t.fields.forEach((function(t) {
|
|
6145
6145
|
return e.push(t.canonicalString());
|
|
@@ -6840,7 +6840,7 @@ function co(t, e, n, r) {
|
|
|
6840
6840
|
*/
|
|
6841
6841
|
// Note: This code is copied from the backend. Code that is not used by
|
|
6842
6842
|
// Firestore was removed.
|
|
6843
|
-
/** Firestore index value writer. */ var
|
|
6843
|
+
/** Firestore index value writer. */ var mo = /** @class */ function() {
|
|
6844
6844
|
function t() {}
|
|
6845
6845
|
// The write methods below short-circuit writing terminators for values
|
|
6846
6846
|
// containing a (terminating) truncated value.
|
|
@@ -6908,7 +6908,7 @@ function co(t, e, n, r) {
|
|
|
6908
6908
|
*
|
|
6909
6909
|
* Visible for testing.
|
|
6910
6910
|
*/
|
|
6911
|
-
function
|
|
6911
|
+
function yo(t) {
|
|
6912
6912
|
if (0 === t) return 8;
|
|
6913
6913
|
var e = 0;
|
|
6914
6914
|
return t >> 4 == 0 && (
|
|
@@ -6929,7 +6929,7 @@ function go(t) {
|
|
|
6929
6929
|
// This is just the number of bytes for the unsigned representation of the number.
|
|
6930
6930
|
var e = 64 - function(t) {
|
|
6931
6931
|
for (var e = 0, n = 0; n < 8; ++n) {
|
|
6932
|
-
var r =
|
|
6932
|
+
var r = yo(255 & t[n]);
|
|
6933
6933
|
if (e += r, 8 !== r) break;
|
|
6934
6934
|
}
|
|
6935
6935
|
return e;
|
|
@@ -6942,7 +6942,7 @@ function go(t) {
|
|
|
6942
6942
|
* behavior defined by the backend.
|
|
6943
6943
|
*
|
|
6944
6944
|
* The code is ported from its Java counterpart.
|
|
6945
|
-
*/
|
|
6945
|
+
*/ mo.Ee = new mo;
|
|
6946
6946
|
|
|
6947
6947
|
var wo = /** @class */ function() {
|
|
6948
6948
|
function t() {
|
|
@@ -7649,7 +7649,7 @@ var Vo = /** @class */ function() {
|
|
|
7649
7649
|
// For each segment, retrieve a lower bound if there is a suitable filter or
|
|
7650
7650
|
// startAt.
|
|
7651
7651
|
for (var n = [], r = !0, i = 0, o = vt(e); i < o.length; i++) {
|
|
7652
|
-
var u = o[i], a = 0 /* IndexKind.ASCENDING */ === u.kind ? vn(t, u.fieldPath, t.startAt) :
|
|
7652
|
+
var u = o[i], a = 0 /* IndexKind.ASCENDING */ === u.kind ? vn(t, u.fieldPath, t.startAt) : mn(t, u.fieldPath, t.startAt);
|
|
7653
7653
|
n.push(a.value), r && (r = a.inclusive);
|
|
7654
7654
|
}
|
|
7655
7655
|
return new Ae(n, r);
|
|
@@ -7657,7 +7657,7 @@ var Vo = /** @class */ function() {
|
|
|
7657
7657
|
// For each segment, retrieve an upper bound if there is a suitable filter or
|
|
7658
7658
|
// endAt.
|
|
7659
7659
|
for (var n = [], r = !0, i = 0, o = vt(e); i < o.length; i++) {
|
|
7660
|
-
var u = o[i], a = 0 /* IndexKind.ASCENDING */ === u.kind ?
|
|
7660
|
+
var u = o[i], a = 0 /* IndexKind.ASCENDING */ === u.kind ? mn(t, u.fieldPath, t.endAt) : vn(t, u.fieldPath, t.endAt);
|
|
7661
7661
|
n.push(a.value), r && (r = a.inclusive);
|
|
7662
7662
|
}
|
|
7663
7663
|
return new Ae(n, r);
|
|
@@ -7763,13 +7763,13 @@ var Vo = /** @class */ function() {
|
|
|
7763
7763
|
var o = i[r], u = e.data.field(o.fieldPath);
|
|
7764
7764
|
if (null == u) return null;
|
|
7765
7765
|
var a = n.Ke(o.kind);
|
|
7766
|
-
|
|
7766
|
+
mo.Ee.ae(u, a);
|
|
7767
7767
|
}
|
|
7768
7768
|
return n.Be();
|
|
7769
7769
|
},
|
|
7770
7770
|
/** Encodes a single value to the ascending index format. */ t.prototype.un = function(t) {
|
|
7771
7771
|
var e = new To;
|
|
7772
|
-
return
|
|
7772
|
+
return mo.Ee.ae(t, e.Ke(0 /* IndexKind.ASCENDING */)), e.Be();
|
|
7773
7773
|
},
|
|
7774
7774
|
/**
|
|
7775
7775
|
* Returns an encoded form of the document key that sorts based on the key
|
|
@@ -7777,7 +7777,7 @@ var Vo = /** @class */ function() {
|
|
|
7777
7777
|
*/
|
|
7778
7778
|
t.prototype.ln = function(t, e) {
|
|
7779
7779
|
var n = new To;
|
|
7780
|
-
return
|
|
7780
|
+
return mo.Ee.ae(me(this.databaseId, e), n.Ke(function(t) {
|
|
7781
7781
|
var e = vt(t);
|
|
7782
7782
|
return 0 === e.length ? 0 /* IndexKind.ASCENDING */ : e[e.length - 1].kind;
|
|
7783
7783
|
}(t))), n.Be();
|
|
@@ -7794,7 +7794,7 @@ var Vo = /** @class */ function() {
|
|
|
7794
7794
|
var h = l[c];
|
|
7795
7795
|
if (this.fn(e, a.fieldPath) && ge(s)) r = this.dn(r, a, s); else {
|
|
7796
7796
|
var f = h.Ke(a.kind);
|
|
7797
|
-
|
|
7797
|
+
mo.Ee.ae(s, f);
|
|
7798
7798
|
}
|
|
7799
7799
|
}
|
|
7800
7800
|
return this._n(r);
|
|
@@ -7820,7 +7820,7 @@ var Vo = /** @class */ function() {
|
|
|
7820
7820
|
t.prototype.dn = function(t, e, n) {
|
|
7821
7821
|
for (var i = r([], t, !0), o = [], u = 0, a = n.arrayValue.values || []; u < a.length; u++) for (var s = a[u], c = 0, l = i; c < l.length; c++) {
|
|
7822
7822
|
var h = l[c], f = new To;
|
|
7823
|
-
f.seed(h.Be()),
|
|
7823
|
+
f.seed(h.Be()), mo.Ee.ae(s, f.Ke(e.kind)), o.push(f);
|
|
7824
7824
|
}
|
|
7825
7825
|
return o;
|
|
7826
7826
|
}, t.prototype.fn = function(t, e) {
|
|
@@ -7836,7 +7836,7 @@ var Vo = /** @class */ function() {
|
|
|
7836
7836
|
e.push(function(t, e) {
|
|
7837
7837
|
var n = e ? new wt(e.sequenceNumber, new Tt(no(e.readTime), new ft(Ti(e.documentKey)), e.largestBatchId)) : wt.empty(), r = t.fields.map((function(t) {
|
|
7838
7838
|
var e = t[0], n = t[1];
|
|
7839
|
-
return new
|
|
7839
|
+
return new yt(ht.fromServerFormat(e), n);
|
|
7840
7840
|
}));
|
|
7841
7841
|
return new dt(t.indexId, t.collectionGroup, r, n);
|
|
7842
7842
|
}(t, n));
|
|
@@ -9118,7 +9118,7 @@ function nu(t) {
|
|
|
9118
9118
|
* returned by `newChangeBuffer()` to ensure proper accounting of metadata.
|
|
9119
9119
|
*/
|
|
9120
9120
|
t.prototype.addEntry = function(t, e, n) {
|
|
9121
|
-
return
|
|
9121
|
+
return mu(t).put(n);
|
|
9122
9122
|
},
|
|
9123
9123
|
/**
|
|
9124
9124
|
* Removes a document from the cache.
|
|
@@ -9127,7 +9127,7 @@ function nu(t) {
|
|
|
9127
9127
|
* returned by `newChangeBuffer()` to ensure proper accounting of metadata.
|
|
9128
9128
|
*/
|
|
9129
9129
|
t.prototype.removeEntry = function(t, e, n) {
|
|
9130
|
-
return
|
|
9130
|
+
return mu(t).delete(
|
|
9131
9131
|
/**
|
|
9132
9132
|
* Returns a key that can be used for document lookups via the primary key of
|
|
9133
9133
|
* the DbRemoteDocument object store.
|
|
@@ -9153,9 +9153,9 @@ function nu(t) {
|
|
|
9153
9153
|
}));
|
|
9154
9154
|
}, t.prototype.getEntry = function(t, e) {
|
|
9155
9155
|
var n = this, r = sn.newInvalidDocument(e);
|
|
9156
|
-
return
|
|
9156
|
+
return mu(t).X({
|
|
9157
9157
|
index: "documentKeyIndex",
|
|
9158
|
-
range: IDBKeyRange.only(
|
|
9158
|
+
range: IDBKeyRange.only(yu(e))
|
|
9159
9159
|
}, (function(t, i) {
|
|
9160
9160
|
r = n.Wn(e, i);
|
|
9161
9161
|
})).next((function() {
|
|
@@ -9173,9 +9173,9 @@ function nu(t) {
|
|
|
9173
9173
|
size: 0,
|
|
9174
9174
|
document: sn.newInvalidDocument(e)
|
|
9175
9175
|
};
|
|
9176
|
-
return
|
|
9176
|
+
return mu(t).X({
|
|
9177
9177
|
index: "documentKeyIndex",
|
|
9178
|
-
range: IDBKeyRange.only(
|
|
9178
|
+
range: IDBKeyRange.only(yu(e))
|
|
9179
9179
|
}, (function(t, i) {
|
|
9180
9180
|
r = {
|
|
9181
9181
|
document: n.Wn(e, i),
|
|
@@ -9217,8 +9217,8 @@ function nu(t) {
|
|
|
9217
9217
|
e.forEach((function(t) {
|
|
9218
9218
|
return i = i.add(t);
|
|
9219
9219
|
}));
|
|
9220
|
-
var o = IDBKeyRange.bound(
|
|
9221
|
-
return
|
|
9220
|
+
var o = IDBKeyRange.bound(yu(i.first()), yu(i.last())), u = i.getIterator(), a = u.getNext();
|
|
9221
|
+
return mu(t).X({
|
|
9222
9222
|
index: "documentKeyIndex",
|
|
9223
9223
|
range: o
|
|
9224
9224
|
}, (function(t, e, i) {
|
|
@@ -9229,7 +9229,7 @@ function nu(t) {
|
|
|
9229
9229
|
// Key found in cache.
|
|
9230
9230
|
n(a, e), a = u.hasNext() ? u.getNext() : null),
|
|
9231
9231
|
// Skip to the next key (if there is one).
|
|
9232
|
-
a ? i.j(
|
|
9232
|
+
a ? i.j(yu(a)) : i.done();
|
|
9233
9233
|
})).next((function() {
|
|
9234
9234
|
// The rest of the keys are not in the cache. One case where `iterate`
|
|
9235
9235
|
// above won't go through them is when the cache is empty.
|
|
@@ -9237,7 +9237,7 @@ function nu(t) {
|
|
|
9237
9237
|
}));
|
|
9238
9238
|
}, t.prototype.getDocumentsMatchingQuery = function(t, e, n, r) {
|
|
9239
9239
|
var i = this, o = e.path, u = [ o.popLast().toArray(), o.lastSegment(), to(n.readTime), n.documentKey.path.isEmpty() ? "" : n.documentKey.path.lastSegment() ], a = [ o.popLast().toArray(), o.lastSegment(), [ Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER ], "" ];
|
|
9240
|
-
return
|
|
9240
|
+
return mu(t).W(IDBKeyRange.bound(u, a, !0)).next((function(t) {
|
|
9241
9241
|
for (var n = br(), o = 0, u = t; o < u.length; o++) {
|
|
9242
9242
|
var a = u[o], s = i.Wn(ft.fromSegments(a.prefixPath.concat(a.collectionGroup, a.documentId)), a);
|
|
9243
9243
|
s.isFoundDocument() && (kn(e, s) || r.has(s.key)) && (
|
|
@@ -9248,7 +9248,7 @@ function nu(t) {
|
|
|
9248
9248
|
}));
|
|
9249
9249
|
}, t.prototype.getAllFromCollectionGroup = function(t, e, n, r) {
|
|
9250
9250
|
var i = this, o = br(), u = gu(e, n), a = gu(e, Tt.max());
|
|
9251
|
-
return
|
|
9251
|
+
return mu(t).X({
|
|
9252
9252
|
index: "collectionGroupIndex",
|
|
9253
9253
|
range: IDBKeyRange.bound(u, a, !0)
|
|
9254
9254
|
}, (function(t, e, n) {
|
|
@@ -9403,14 +9403,14 @@ function vu(t) {
|
|
|
9403
9403
|
|
|
9404
9404
|
/**
|
|
9405
9405
|
* Helper to get a typed SimpleDbStore for the remoteDocuments object store.
|
|
9406
|
-
*/ function
|
|
9406
|
+
*/ function mu(t) {
|
|
9407
9407
|
return Wi(t, "remoteDocumentsV14");
|
|
9408
9408
|
}
|
|
9409
9409
|
|
|
9410
9410
|
/**
|
|
9411
9411
|
* Returns a key that can be used for document lookups on the
|
|
9412
9412
|
* `DbRemoteDocumentDocumentKeyIndex` index.
|
|
9413
|
-
*/ function
|
|
9413
|
+
*/ function yu(t) {
|
|
9414
9414
|
var e = t.path.toArray();
|
|
9415
9415
|
return [
|
|
9416
9416
|
/* prefix path */ e.slice(0, e.length - 2),
|
|
@@ -9736,7 +9736,7 @@ e) {
|
|
|
9736
9736
|
return this.indexManager.getCollectionParents(t, i).next((function(u) {
|
|
9737
9737
|
return xt.forEach(u, (function(u) {
|
|
9738
9738
|
var a = function(t, e) {
|
|
9739
|
-
return new
|
|
9739
|
+
return new yn(e,
|
|
9740
9740
|
/*collectionGroup=*/ null, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
|
|
9741
9741
|
}(e, u.child(i));
|
|
9742
9742
|
return r.getDocumentsMatchingCollectionQuery(t, a, n).next((function(t) {
|
|
@@ -11533,8 +11533,8 @@ function ju(t, r) {
|
|
|
11533
11533
|
for (var d = 0, p = r; d < p.length; d++) {
|
|
11534
11534
|
var v = p[d];
|
|
11535
11535
|
o.push(v.batchId);
|
|
11536
|
-
for (var
|
|
11537
|
-
var g = m
|
|
11536
|
+
for (var m = 0, y = v.mutations; m < y.length; m++) {
|
|
11537
|
+
var g = y[m];
|
|
11538
11538
|
u = u.add(g.key);
|
|
11539
11539
|
}
|
|
11540
11540
|
}
|
|
@@ -12454,12 +12454,12 @@ var aa = /** @class */ function() {
|
|
|
12454
12454
|
t.C = function() {
|
|
12455
12455
|
return "undefined" != typeof window && void 0 !== window.addEventListener && void 0 !== window.removeEventListener;
|
|
12456
12456
|
}, t;
|
|
12457
|
-
}(),
|
|
12457
|
+
}(), ma = {
|
|
12458
12458
|
BatchGetDocuments: "batchGet",
|
|
12459
12459
|
Commit: "commit",
|
|
12460
12460
|
RunQuery: "runQuery",
|
|
12461
12461
|
RunAggregationQuery: "runAggregationQuery"
|
|
12462
|
-
},
|
|
12462
|
+
}, ya = /** @class */ function() {
|
|
12463
12463
|
function t(t) {
|
|
12464
12464
|
this.Yr = t.Yr, this.Zr = t.Zr;
|
|
12465
12465
|
}
|
|
@@ -12573,7 +12573,7 @@ var aa = /** @class */ function() {
|
|
|
12573
12573
|
u.encodeInitMessageHeaders = !0;
|
|
12574
12574
|
var a = r.join("");
|
|
12575
12575
|
M("Connection", "Creating WebChannel: " + a, u);
|
|
12576
|
-
var s = i.createWebChannel(a, u), c = !1, l = !1, h = new
|
|
12576
|
+
var s = i.createWebChannel(a, u), c = !1, l = !1, h = new ya({
|
|
12577
12577
|
Yr: function(t) {
|
|
12578
12578
|
l ? M("Connection", "Not sending because WebChannel is closed:", t) : (c || (M("Connection", "Opening WebChannel transport."),
|
|
12579
12579
|
s.open(), c = !0), M("Connection", "WebChannel sending:", t), s.send(t));
|
|
@@ -12634,7 +12634,7 @@ var aa = /** @class */ function() {
|
|
|
12634
12634
|
// lookup by string
|
|
12635
12635
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12636
12636
|
var e = hr[t];
|
|
12637
|
-
if (void 0 !== e) return
|
|
12637
|
+
if (void 0 !== e) return yr(e);
|
|
12638
12638
|
}(o), a = i.message;
|
|
12639
12639
|
void 0 === u && (u = G.INTERNAL, a = "Unknown error status: " + o + " with message " + i.message),
|
|
12640
12640
|
// Mark closed so no further events are propagated
|
|
@@ -12697,7 +12697,7 @@ var aa = /** @class */ function() {
|
|
|
12697
12697
|
return t[n] = e;
|
|
12698
12698
|
}));
|
|
12699
12699
|
}, t.prototype.fo = function(t, e) {
|
|
12700
|
-
var n =
|
|
12700
|
+
var n = ma[t];
|
|
12701
12701
|
return "".concat(this.co, "/v1/").concat(e, ":").concat(n);
|
|
12702
12702
|
}, t;
|
|
12703
12703
|
}());
|
|
@@ -13126,7 +13126,7 @@ function wa() {
|
|
|
13126
13126
|
return t.yt ? (U(void 0 === e || "string" == typeof e), Zt.fromBase64String(e || "")) : (U(void 0 === e || e instanceof Uint8Array),
|
|
13127
13127
|
Zt.fromUint8Array(e || new Uint8Array));
|
|
13128
13128
|
}(t, e.targetChange.resumeToken), u = e.targetChange.cause, a = u && function(t) {
|
|
13129
|
-
var e = void 0 === t.code ? G.UNKNOWN :
|
|
13129
|
+
var e = void 0 === t.code ? G.UNKNOWN : yr(t.code);
|
|
13130
13130
|
return new j(e, t.message || "");
|
|
13131
13131
|
}(u);
|
|
13132
13132
|
n = new Vr(r, i, o, a || null);
|
|
@@ -13142,9 +13142,9 @@ function wa() {
|
|
|
13142
13142
|
n = new Rr(p, v, d.key, d);
|
|
13143
13143
|
} else if ("documentDelete" in e) {
|
|
13144
13144
|
e.documentDelete;
|
|
13145
|
-
var
|
|
13146
|
-
|
|
13147
|
-
var
|
|
13145
|
+
var m = e.documentDelete;
|
|
13146
|
+
m.document;
|
|
13147
|
+
var y = $r(t, m.document), g = m.readTime ? Hr(m.readTime) : at.min(), w = sn.newNoDocument(y, g), b = m.removedTargetIds || [];
|
|
13148
13148
|
n = new Rr([], b, w.key, w);
|
|
13149
13149
|
} else if ("documentRemove" in e) {
|
|
13150
13150
|
e.documentRemove;
|
|
@@ -13993,7 +13993,7 @@ function Ya(t, r) {
|
|
|
13993
13993
|
return n(this, (function(n) {
|
|
13994
13994
|
switch (n.label) {
|
|
13995
13995
|
case 0:
|
|
13996
|
-
return
|
|
13996
|
+
return mr(i = r.code) && i !== G.ABORTED ? (e = t._u.shift(),
|
|
13997
13997
|
// In this case it's also unlikely that the server itself is melting
|
|
13998
13998
|
// down -- this was just a bad request so inhibit backoff on the next
|
|
13999
13999
|
// restart.
|
|
@@ -14634,7 +14634,7 @@ function fs(t) {
|
|
|
14634
14634
|
}, t.prototype.tr = function(t) {
|
|
14635
14635
|
return Hr(t);
|
|
14636
14636
|
}, t;
|
|
14637
|
-
}(),
|
|
14637
|
+
}(), ms = /** @class */ function() {
|
|
14638
14638
|
function t(t, e, n) {
|
|
14639
14639
|
this.$u = t, this.localStore = e, this.Tt = n,
|
|
14640
14640
|
/** Batched queries to be saved into storage */
|
|
@@ -14642,7 +14642,7 @@ function fs(t) {
|
|
|
14642
14642
|
/** Batched documents to be saved into storage */
|
|
14643
14643
|
this.documents = [],
|
|
14644
14644
|
/** The collection groups affected by this bundle. */
|
|
14645
|
-
this.collectionGroups = new Set, this.progress =
|
|
14645
|
+
this.collectionGroups = new Set, this.progress = ys(t)
|
|
14646
14646
|
/**
|
|
14647
14647
|
* Adds an element from the bundle to the loader.
|
|
14648
14648
|
*
|
|
@@ -14732,7 +14732,7 @@ function fs(t) {
|
|
|
14732
14732
|
* Returns a `LoadBundleTaskProgress` representing the initial progress of
|
|
14733
14733
|
* loading a bundle.
|
|
14734
14734
|
*/
|
|
14735
|
-
function
|
|
14735
|
+
function ys(t) {
|
|
14736
14736
|
return {
|
|
14737
14737
|
taskState: "Running",
|
|
14738
14738
|
documentsLoaded: 0,
|
|
@@ -15881,7 +15881,7 @@ function Ws(t, r) {
|
|
|
15881
15881
|
|
|
15882
15882
|
function Hs(t, r, i) {
|
|
15883
15883
|
return e(this, void 0, void 0, (function() {
|
|
15884
|
-
var e, i, o, u, a, s, c, l, h, f, d, p, v,
|
|
15884
|
+
var e, i, o, u, a, s, c, l, h, f, d, p, v, m;
|
|
15885
15885
|
return n(this, (function(n) {
|
|
15886
15886
|
switch (n.label) {
|
|
15887
15887
|
case 0:
|
|
@@ -15913,10 +15913,10 @@ function Hs(t, r, i) {
|
|
|
15913
15913
|
return [ 4 /*yield*/ , Zu(e.localStore, s) ];
|
|
15914
15914
|
|
|
15915
15915
|
case 8:
|
|
15916
|
-
return
|
|
15916
|
+
return m = n.sent(), [ 4 /*yield*/ , Yu(e.localStore, m) ];
|
|
15917
15917
|
|
|
15918
15918
|
case 9:
|
|
15919
|
-
return c = n.sent(), [ 4 /*yield*/ , _s(e, Xs(
|
|
15919
|
+
return c = n.sent(), [ 4 /*yield*/ , _s(e, Xs(m), s,
|
|
15920
15920
|
/*current=*/ !1, c.resumeToken) ];
|
|
15921
15921
|
|
|
15922
15922
|
case 10:
|
|
@@ -16129,7 +16129,7 @@ function ec(t, r, i) {
|
|
|
16129
16129
|
}(e)), Promise.resolve(new Set)) ];
|
|
16130
16130
|
|
|
16131
16131
|
case 4:
|
|
16132
|
-
return i._updateProgress(
|
|
16132
|
+
return i._updateProgress(ys(e)), o = new ms(e, t.localStore, r.Tt), [ 4 /*yield*/ , r.yc() ];
|
|
16133
16133
|
|
|
16134
16134
|
case 5:
|
|
16135
16135
|
u = n.sent(), n.label = 6;
|
|
@@ -16483,7 +16483,7 @@ function uc(t, r) {
|
|
|
16483
16483
|
}));
|
|
16484
16484
|
},
|
|
16485
16485
|
releaseLock: function() {},
|
|
16486
|
-
closed: Promise.
|
|
16486
|
+
closed: Promise.resolve()
|
|
16487
16487
|
};
|
|
16488
16488
|
}
|
|
16489
16489
|
|
|
@@ -16928,7 +16928,7 @@ function uc(t, r) {
|
|
|
16928
16928
|
// In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
|
|
16929
16929
|
// non-matching document versions with ABORTED. These errors should be retried.
|
|
16930
16930
|
var e = t.code;
|
|
16931
|
-
return "aborted" === e || "failed-precondition" === e || "already-exists" === e || !
|
|
16931
|
+
return "aborted" === e || "failed-precondition" === e || "already-exists" === e || !mr(e);
|
|
16932
16932
|
}
|
|
16933
16933
|
return !1;
|
|
16934
16934
|
}, t;
|
|
@@ -17155,13 +17155,13 @@ function vc(t) {
|
|
|
17155
17155
|
}));
|
|
17156
17156
|
}
|
|
17157
17157
|
|
|
17158
|
-
function
|
|
17158
|
+
function mc(t) {
|
|
17159
17159
|
return pc(t).then((function(t) {
|
|
17160
17160
|
return t.persistence;
|
|
17161
17161
|
}));
|
|
17162
17162
|
}
|
|
17163
17163
|
|
|
17164
|
-
function
|
|
17164
|
+
function yc(t) {
|
|
17165
17165
|
return pc(t).then((function(t) {
|
|
17166
17166
|
return t.localStore;
|
|
17167
17167
|
}));
|
|
@@ -17539,7 +17539,7 @@ function Rc(t, e, n, r) {
|
|
|
17539
17539
|
if ("string" == typeof r.mockUserToken) u = r.mockUserToken, a = C.MOCK_USER; else {
|
|
17540
17540
|
// Let createMockUserToken validate first (catches common mistakes like
|
|
17541
17541
|
// invalid field "uid" and missing field "sub" / "user_id".)
|
|
17542
|
-
u =
|
|
17542
|
+
u = y(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
|
|
17543
17543
|
var s = r.mockUserToken.sub || r.mockUserToken.user_id;
|
|
17544
17544
|
if (!s) throw new j(G.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
|
|
17545
17545
|
a = new C(s);
|
|
@@ -17703,7 +17703,7 @@ function Rc(t, e, n, r) {
|
|
|
17703
17703
|
if (t = Cc(t, Fc), _c("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new j(G.INVALID_ARGUMENT, "Invalid collection ID '".concat(e, "' passed to function collectionGroup(). Collection IDs must not contain '/'."));
|
|
17704
17704
|
return new Vc(t,
|
|
17705
17705
|
/* converter= */ null, function(t) {
|
|
17706
|
-
return new
|
|
17706
|
+
return new yn(ct.emptyPath(), t);
|
|
17707
17707
|
}(e));
|
|
17708
17708
|
}
|
|
17709
17709
|
|
|
@@ -18358,7 +18358,7 @@ function nl(t) {
|
|
|
18358
18358
|
return n(this, (function(n) {
|
|
18359
18359
|
switch (n.label) {
|
|
18360
18360
|
case 0:
|
|
18361
|
-
return [ 4 /*yield*/ ,
|
|
18361
|
+
return [ 4 /*yield*/ , mc(t) ];
|
|
18362
18362
|
|
|
18363
18363
|
case 1:
|
|
18364
18364
|
return e = n.sent(), [ 4 /*yield*/ , gc(t) ];
|
|
@@ -18392,7 +18392,7 @@ function nl(t) {
|
|
|
18392
18392
|
return n(this, (function(o) {
|
|
18393
18393
|
switch (o.label) {
|
|
18394
18394
|
case 0:
|
|
18395
|
-
return [ 4 /*yield*/ ,
|
|
18395
|
+
return [ 4 /*yield*/ , mc(t) ];
|
|
18396
18396
|
|
|
18397
18397
|
case 1:
|
|
18398
18398
|
return r = o.sent(), [ 4 /*yield*/ , gc(t) ];
|
|
@@ -18533,7 +18533,7 @@ function al(t, r) {
|
|
|
18533
18533
|
return n.persistence.runTransaction("Get named query", "readonly", (function(t) {
|
|
18534
18534
|
return n.Os.getNamedQuery(t, e);
|
|
18535
18535
|
}));
|
|
18536
|
-
}, [ 4 /*yield*/ ,
|
|
18536
|
+
}, [ 4 /*yield*/ , yc(t) ];
|
|
18537
18537
|
|
|
18538
18538
|
case 1:
|
|
18539
18539
|
return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), r ]) ];
|
|
@@ -18790,7 +18790,7 @@ function(t) {
|
|
|
18790
18790
|
t.prototype._compareTo = function(t) {
|
|
18791
18791
|
return rt(this._lat, t._lat) || rt(this._long, t._long);
|
|
18792
18792
|
}, t;
|
|
18793
|
-
}(),
|
|
18793
|
+
}(), ml = /^__.*__$/, yl = /** @class */ function() {
|
|
18794
18794
|
function t(t, e, n) {
|
|
18795
18795
|
this.data = t, this.fieldMask = e, this.fieldTransforms = n;
|
|
18796
18796
|
}
|
|
@@ -18922,7 +18922,7 @@ function(t) {
|
|
|
18922
18922
|
if (this.path) for (var t = 0; t < this.path.length; t++) this.aa(this.path.get(t));
|
|
18923
18923
|
}, t.prototype.aa = function(t) {
|
|
18924
18924
|
if (0 === t.length) throw this.fa("Document fields must not be empty");
|
|
18925
|
-
if (wl(this.ra) &&
|
|
18925
|
+
if (wl(this.ra) && ml.test(t)) throw this.fa('Document fields cannot begin and end with "__"');
|
|
18926
18926
|
}, t;
|
|
18927
18927
|
}(), Il = /** @class */ function() {
|
|
18928
18928
|
function t(t, e, n) {
|
|
@@ -18964,7 +18964,7 @@ function(t) {
|
|
|
18964
18964
|
return a.covers(t.field);
|
|
18965
18965
|
}));
|
|
18966
18966
|
} else a = null, s = u.fieldTransforms;
|
|
18967
|
-
return new
|
|
18967
|
+
return new yl(new un(c), a, s);
|
|
18968
18968
|
}
|
|
18969
18969
|
|
|
18970
18970
|
var Sl = /** @class */ function(e) {
|
|
@@ -19090,12 +19090,12 @@ var Dl = /** @class */ function(e) {
|
|
|
19090
19090
|
// For Compat types, we have to "extract" the underlying types before
|
|
19091
19091
|
// performing validation.
|
|
19092
19092
|
p = v(p);
|
|
19093
|
-
var
|
|
19093
|
+
var m = u.ha(d);
|
|
19094
19094
|
if (p instanceof Sl)
|
|
19095
19095
|
// Add it to the field mask, but don't add anything to updateData.
|
|
19096
19096
|
l.push(d); else {
|
|
19097
|
-
var
|
|
19098
|
-
null !=
|
|
19097
|
+
var y = Fl(p, m);
|
|
19098
|
+
null != y && (l.push(d), h.set(d, y));
|
|
19099
19099
|
}
|
|
19100
19100
|
}
|
|
19101
19101
|
var g = new on(l);
|
|
@@ -19600,7 +19600,7 @@ function jl(t, e) {
|
|
|
19600
19600
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
19601
19601
|
// Only support QueryFilterConstraints
|
|
19602
19602
|
return t.forEach((function(t) {
|
|
19603
|
-
return
|
|
19603
|
+
return mh("or", t);
|
|
19604
19604
|
})), Jl._create("or" /* CompositeOperator.OR */ , t)
|
|
19605
19605
|
/**
|
|
19606
19606
|
* Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of
|
|
@@ -19619,7 +19619,7 @@ function Zl() {
|
|
|
19619
19619
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
19620
19620
|
// Only support QueryFilterConstraints
|
|
19621
19621
|
return t.forEach((function(t) {
|
|
19622
|
-
return
|
|
19622
|
+
return mh("and", t);
|
|
19623
19623
|
})), Jl._create("and" /* CompositeOperator.AND */ , t)
|
|
19624
19624
|
/**
|
|
19625
19625
|
* A `QueryOrderByConstraint` is used to sort the set of documents returned by a
|
|
@@ -19660,7 +19660,7 @@ var th = /** @class */ function(e) {
|
|
|
19660
19660
|
return new Vc(t.firestore, t.converter, function(t, e) {
|
|
19661
19661
|
// TODO(dimond): validate that orderBy does not list the same key twice.
|
|
19662
19662
|
var n = t.explicitOrderBy.concat([ e ]);
|
|
19663
|
-
return new
|
|
19663
|
+
return new yn(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
|
|
19664
19664
|
}(t._query, e));
|
|
19665
19665
|
}, n;
|
|
19666
19666
|
}(Wl);
|
|
@@ -19752,7 +19752,7 @@ var oh = /** @class */ function(e) {
|
|
|
19752
19752
|
}, n.prototype._apply = function(t) {
|
|
19753
19753
|
var e = hh(t, this.type, this._docOrFields, this._inclusive);
|
|
19754
19754
|
return new Vc(t.firestore, t.converter, function(t, e) {
|
|
19755
|
-
return new
|
|
19755
|
+
return new yn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
|
|
19756
19756
|
}(t._query, e));
|
|
19757
19757
|
}, n;
|
|
19758
19758
|
}(Wl);
|
|
@@ -19791,7 +19791,7 @@ function ah() {
|
|
|
19791
19791
|
}, n.prototype._apply = function(t) {
|
|
19792
19792
|
var e = hh(t, this.type, this._docOrFields, this._inclusive);
|
|
19793
19793
|
return new Vc(t.firestore, t.converter, function(t, e) {
|
|
19794
|
-
return new
|
|
19794
|
+
return new yn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
|
|
19795
19795
|
}(t._query, e));
|
|
19796
19796
|
}, n;
|
|
19797
19797
|
}(Wl);
|
|
@@ -19820,7 +19820,7 @@ function lh() {
|
|
|
19820
19820
|
// results.
|
|
19821
19821
|
for (var o = [], u = 0, a = Sn(t); u < a.length; u++) {
|
|
19822
19822
|
var s = a[u];
|
|
19823
|
-
if (s.field.isKeyField()) o.push(
|
|
19823
|
+
if (s.field.isKeyField()) o.push(me(e, r.key)); else {
|
|
19824
19824
|
var c = r.data.field(s.field);
|
|
19825
19825
|
if (ie(c)) throw new j(G.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field "' + s.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
|
|
19826
19826
|
if (null === c) {
|
|
@@ -19845,7 +19845,7 @@ function lh() {
|
|
|
19845
19845
|
var l = t.path.child(ct.fromString(c));
|
|
19846
19846
|
if (!ft.isDocumentKey(l)) throw new j(G.INVALID_ARGUMENT, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to ".concat(r, "() must result in a valid document path, but '").concat(l, "' is not because it contains an odd number of segments."));
|
|
19847
19847
|
var h = new ft(l);
|
|
19848
|
-
a.push(
|
|
19848
|
+
a.push(me(e, h));
|
|
19849
19849
|
} else {
|
|
19850
19850
|
var f = Ol(n, r, c);
|
|
19851
19851
|
a.push(f);
|
|
@@ -19861,9 +19861,9 @@ function fh(t, e, n) {
|
|
|
19861
19861
|
if (!En(e) && -1 !== n.indexOf("/")) throw new j(G.INVALID_ARGUMENT, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n, "' contains a '/' character."));
|
|
19862
19862
|
var r = e.path.child(ct.fromString(n));
|
|
19863
19863
|
if (!ft.isDocumentKey(r)) throw new j(G.INVALID_ARGUMENT, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r, "' is not because it has an odd number of segments (").concat(r.length, ")."));
|
|
19864
|
-
return
|
|
19864
|
+
return me(t, new ft(r));
|
|
19865
19865
|
}
|
|
19866
|
-
if (n instanceof Mc) return
|
|
19866
|
+
if (n instanceof Mc) return me(t, n._key);
|
|
19867
19867
|
throw new j(G.INVALID_ARGUMENT, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(Nc(n), "."));
|
|
19868
19868
|
}
|
|
19869
19869
|
|
|
@@ -19872,20 +19872,17 @@ function fh(t, e, n) {
|
|
|
19872
19872
|
* array requirements.
|
|
19873
19873
|
*/ function dh(t, e) {
|
|
19874
19874
|
if (!Array.isArray(t) || 0 === t.length) throw new j(G.INVALID_ARGUMENT, "Invalid Query. A non-empty array is required for '".concat(e.toString(), "' filters."));
|
|
19875
|
-
if (t.length > 10) throw new j(G.INVALID_ARGUMENT, "Invalid Query. '".concat(e.toString(), "' filters support a maximum of 10 elements in the value array."));
|
|
19876
19875
|
}
|
|
19877
19876
|
|
|
19878
19877
|
/**
|
|
19879
19878
|
* Given an operator, returns the set of operators that cannot be used with it.
|
|
19880
19879
|
*
|
|
19881
|
-
*
|
|
19882
|
-
*
|
|
19883
|
-
* 2. Only one disjunctive operator is allowed.
|
|
19884
|
-
* 3. `NOT_EQUAL` cannot be used with another `NOT_EQUAL` operator.
|
|
19885
|
-
* 4. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
19880
|
+
* This is not a comprehensive check, and this function should be removed in the
|
|
19881
|
+
* long term. Validations should occur in the Firestore backend.
|
|
19886
19882
|
*
|
|
19887
|
-
*
|
|
19888
|
-
*
|
|
19883
|
+
* Operators in a query must adhere to the following set of rules:
|
|
19884
|
+
* 1. Only one inequality per query.
|
|
19885
|
+
* 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
19889
19886
|
*/ function ph(t, e) {
|
|
19890
19887
|
if (e.isInequality()) {
|
|
19891
19888
|
var n = Tn(t), r = e.field;
|
|
@@ -19904,17 +19901,12 @@ function fh(t, e, n) {
|
|
|
19904
19901
|
case "!=" /* Operator.NOT_EQUAL */ :
|
|
19905
19902
|
return [ "!=" /* Operator.NOT_EQUAL */ , "not-in" /* Operator.NOT_IN */ ];
|
|
19906
19903
|
|
|
19907
|
-
case "array-contains" /* Operator.ARRAY_CONTAINS */ :
|
|
19908
|
-
return [ "array-contains" /* Operator.ARRAY_CONTAINS */ , "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ , "not-in" /* Operator.NOT_IN */ ];
|
|
19909
|
-
|
|
19910
|
-
case "in" /* Operator.IN */ :
|
|
19911
|
-
return [ "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ , "in" /* Operator.IN */ , "not-in" /* Operator.NOT_IN */ ];
|
|
19912
|
-
|
|
19913
19904
|
case "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ :
|
|
19914
|
-
|
|
19905
|
+
case "in" /* Operator.IN */ :
|
|
19906
|
+
return [ "not-in" /* Operator.NOT_IN */ ];
|
|
19915
19907
|
|
|
19916
19908
|
case "not-in" /* Operator.NOT_IN */ :
|
|
19917
|
-
return [ "array-contains
|
|
19909
|
+
return [ "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ , "in" /* Operator.IN */ , "not-in" /* Operator.NOT_IN */ , "!=" /* Operator.NOT_EQUAL */ ];
|
|
19918
19910
|
|
|
19919
19911
|
default:
|
|
19920
19912
|
return [];
|
|
@@ -19929,11 +19921,11 @@ function vh(t, e, n) {
|
|
|
19929
19921
|
if (!n.isEqual(e)) throw new j(G.INVALID_ARGUMENT, "Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '".concat(e.toString(), "' and so you must also use '").concat(e.toString(), "' as your first argument to orderBy(), but your first orderBy() is on field '").concat(n.toString(), "' instead."));
|
|
19930
19922
|
}
|
|
19931
19923
|
|
|
19932
|
-
function
|
|
19924
|
+
function mh(t, e) {
|
|
19933
19925
|
if (!(e instanceof Xl || e instanceof Jl)) throw new j(G.INVALID_ARGUMENT, "Function ".concat(t, "() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'."));
|
|
19934
19926
|
}
|
|
19935
19927
|
|
|
19936
|
-
var
|
|
19928
|
+
var yh = /** @class */ function() {
|
|
19937
19929
|
function t() {}
|
|
19938
19930
|
return t.prototype.convertValue = function(t, e) {
|
|
19939
19931
|
switch (void 0 === e && (e = "none"), ce(t)) {
|
|
@@ -20053,7 +20045,7 @@ var wh = /** @class */ function(e) {
|
|
|
20053
20045
|
var e = this.convertDocumentKey(t, this.firestore._databaseId);
|
|
20054
20046
|
return new Mc(this.firestore, /* converter= */ null, e);
|
|
20055
20047
|
}, n;
|
|
20056
|
-
}(
|
|
20048
|
+
}(yh);
|
|
20057
20049
|
|
|
20058
20050
|
/**
|
|
20059
20051
|
* @license
|
|
@@ -20408,7 +20400,7 @@ var Oh = /** @class */ function(e) {
|
|
|
20408
20400
|
var e = this.convertDocumentKey(t, this.firestore._databaseId);
|
|
20409
20401
|
return new Mc(this.firestore, /* converter= */ null, e);
|
|
20410
20402
|
}, n;
|
|
20411
|
-
}(
|
|
20403
|
+
}(yh);
|
|
20412
20404
|
|
|
20413
20405
|
/**
|
|
20414
20406
|
* Reads the document referred to by this `DocumentReference` from cache.
|
|
@@ -20453,7 +20445,7 @@ var Oh = /** @class */ function(e) {
|
|
|
20453
20445
|
}
|
|
20454
20446
|
}));
|
|
20455
20447
|
}));
|
|
20456
|
-
}, [ 4 /*yield*/ ,
|
|
20448
|
+
}, [ 4 /*yield*/ , yc(t) ];
|
|
20457
20449
|
|
|
20458
20450
|
case 1:
|
|
20459
20451
|
return [ 2 /*return*/ , i.apply(void 0, [ u.sent(), r, o ]) ];
|
|
@@ -20540,7 +20532,7 @@ function Vh(t) {
|
|
|
20540
20532
|
}
|
|
20541
20533
|
}));
|
|
20542
20534
|
}));
|
|
20543
|
-
}, [ 4 /*yield*/ ,
|
|
20535
|
+
}, [ 4 /*yield*/ , yc(t) ];
|
|
20544
20536
|
|
|
20545
20537
|
case 1:
|
|
20546
20538
|
return [ 2 /*return*/ , i.apply(void 0, [ u.sent(), r, o ]) ];
|
|
@@ -20632,12 +20624,12 @@ function Kh(t) {
|
|
|
20632
20624
|
error: u[c + 1],
|
|
20633
20625
|
complete: u[c + 2]
|
|
20634
20626
|
}; else {
|
|
20635
|
-
var
|
|
20636
|
-
h = Cc(
|
|
20637
|
-
var
|
|
20627
|
+
var m = Cc(t, Vc);
|
|
20628
|
+
h = Cc(m.firestore, Wc), f = m._query;
|
|
20629
|
+
var y = new Oh(h);
|
|
20638
20630
|
l = {
|
|
20639
20631
|
next: function(t) {
|
|
20640
|
-
u[c] && u[c](new Ah(h,
|
|
20632
|
+
u[c] && u[c](new Ah(h, y, m, t));
|
|
20641
20633
|
},
|
|
20642
20634
|
error: u[c + 1],
|
|
20643
20635
|
complete: u[c + 2]
|
|
@@ -21318,13 +21310,13 @@ function af(t, i) {
|
|
|
21318
21310
|
var o = i[r], u = sf(o, "collectionGroup"), a = [];
|
|
21319
21311
|
if (Array.isArray(o.fields)) for (var s = 0, c = o.fields; s < c.length; s++) {
|
|
21320
21312
|
var l = c[s], h = ql("setIndexConfiguration", sf(l, "fieldPath"));
|
|
21321
|
-
"CONTAINS" === l.arrayConfig ? a.push(new
|
|
21313
|
+
"CONTAINS" === l.arrayConfig ? a.push(new yt(h, 2 /* IndexKind.CONTAINS */)) : "ASCENDING" === l.order ? a.push(new yt(h, 0 /* IndexKind.ASCENDING */)) : "DESCENDING" === l.order && a.push(new yt(h, 1 /* IndexKind.DESCENDING */));
|
|
21322
21314
|
}
|
|
21323
21315
|
n.push(new dt(dt.UNKNOWN_ID, u, a, wt.empty()));
|
|
21324
21316
|
}
|
|
21325
21317
|
return n;
|
|
21326
21318
|
}(i);
|
|
21327
|
-
return
|
|
21319
|
+
return yc(u).then((function(t) {
|
|
21328
21320
|
return function(t, i) {
|
|
21329
21321
|
return e(this, void 0, void 0, (function() {
|
|
21330
21322
|
var e, o, u;
|
|
@@ -21345,7 +21337,7 @@ function af(t, i) {
|
|
|
21345
21337
|
}
|
|
21346
21338
|
for (;s < a; ) i(e[s++]);
|
|
21347
21339
|
for (;c < u; ) o(t[c++]);
|
|
21348
|
-
}(e, i,
|
|
21340
|
+
}(e, i, mt, (function(e) {
|
|
21349
21341
|
u.push(o.addFieldIndex(t, e));
|
|
21350
21342
|
}), (function(e) {
|
|
21351
21343
|
u.push(o.deleteFieldIndex(t, e));
|
|
@@ -21377,9 +21369,9 @@ function sf(t, e) {
|
|
|
21377
21369
|
return r = Object.assign({
|
|
21378
21370
|
useFetchStreams: Jh
|
|
21379
21371
|
}, r), o._setSettings(r), o;
|
|
21380
|
-
}), "PUBLIC").setMultipleInstances(!0)), u(N, "3.8.3-canary.
|
|
21372
|
+
}), "PUBLIC").setMultipleInstances(!0)), u(N, "3.8.3-canary.d5d78cbcf", void 0),
|
|
21381
21373
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
21382
|
-
u(N, "3.8.3-canary.
|
|
21374
|
+
u(N, "3.8.3-canary.d5d78cbcf", "esm5");
|
|
21383
21375
|
|
|
21384
|
-
export {
|
|
21376
|
+
export { yh as AbstractUserDataWriter, cl as AggregateField, ll as AggregateQuerySnapshot, hl as Bytes, zc as CACHE_SIZE_UNLIMITED, Lc as CollectionReference, Mc as DocumentReference, Dh as DocumentSnapshot, fl as FieldPath, pl as FieldValue, Wc as Firestore, j as FirestoreError, vl as GeoPoint, Qc as LoadBundleTask, Vc as Query, Jl as QueryCompositeFilterConstraint, Wl as QueryConstraint, xh as QueryDocumentSnapshot, sh as QueryEndAtConstraint, Xl as QueryFieldFilterConstraint, nh as QueryLimitConstraint, th as QueryOrderByConstraint, Ah as QuerySnapshot, oh as QueryStartAtConstraint, _h as SnapshotMetadata, ut as Timestamp, $h as Transaction, Xh as WriteBatch, jt as _DatabaseId, ft as _DocumentKey, tt as _EmptyAppCheckTokenProvider, W as _EmptyAuthCredentialsProvider, ht as _FieldPath, Cc as _cast, B as _debugAssert, $t as _isBase64Available, L as _logWarn, Dc as _validateIsNotUsedTogether, Bh as addDoc, Eh as aggregateFieldEqual, Sh as aggregateQuerySnapshotEqual, Zl as and, rf as arrayRemove, nf as arrayUnion, Ih as average, el as clearIndexedDbPersistence, Pc as collection, qc as collectionGroup, Rc as connectFirestoreEmulator, Th as count, Uh as deleteDoc, tf as deleteField, il as disableNetwork, Uc as doc, dl as documentId, $c as enableIndexedDbPersistence, Zc as enableMultiTabIndexedDbPersistence, rl as enableNetwork, lh as endAt, ch as endBefore, Yc as ensureFirestoreConfigured, jh as executeWrite, Wh as getAggregateFromServer, zh as getCountFromServer, kh as getDoc, Fh as getDocFromCache, Rh as getDocFromServer, Mh as getDocs, Vh as getDocsFromCache, Lh as getDocsFromServer, Xc as getFirestore, of as increment, Hc as initializeFirestore, rh as limit, ih as limitToLast, ul as loadBundle, al as namedQuery, Kh as onSnapshot, Gh as onSnapshotsInSync, $l as or, eh as orderBy, Hl as query, Kc as queryEqual, Bc as refEqual, Zh as runTransaction, ef as serverTimestamp, Ph as setDoc, af as setIndexConfiguration, R as setLogLevel, Ch as snapshotEqual, ah as startAfter, uh as startAt, bh as sum, ol as terminate, qh as updateDoc, nl as waitForPendingWrites, Yl as where, uf as writeBatch };
|
|
21385
21377
|
//# sourceMappingURL=index.esm5.js.map
|