@firebase/firestore 3.4.1-canary.be7ccb8ed → 3.4.2

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.
@@ -71,6 +71,7 @@ export declare function bound(values: Array<[string, {}, firestore.OrderByDirect
71
71
  export declare function query(resourcePath: string, ...constraints: Array<OrderBy | Filter>): Query;
72
72
  export declare function targetData(targetId: TargetId, queryPurpose: TargetPurpose, path: string): TargetData;
73
73
  export declare function noChangeEvent(targetId: number, snapshotVersion: number, resumeToken?: ByteString): RemoteEvent;
74
+ export declare function existenceFilterEvent(targetId: number, count: number, snapshotVersion: number): RemoteEvent;
74
75
  export declare function docAddedRemoteEvent(docOrDocs: MutableDocument | MutableDocument[], updatedInTargets?: TargetId[], removedFromTargets?: TargetId[], activeTargets?: TargetId[]): RemoteEvent;
75
76
  export declare function docUpdateRemoteEvent(doc: MutableDocument, updatedInTargets?: TargetId[], removedFromTargets?: TargetId[], limboTargets?: TargetId[]): RemoteEvent;
76
77
  export declare class TestBundledDocuments {
@@ -63,7 +63,7 @@ l.MOCK_USER = new l("mock-user");
63
63
  * See the License for the specific language governing permissions and
64
64
  * limitations under the License.
65
65
  */
66
- let f = "9.6.1-canary.be7ccb8ed";
66
+ let f = "9.6.2";
67
67
 
68
68
  /**
69
69
  * @license
@@ -190,14 +190,14 @@ function p(t, ...e) {
190
190
  * given message if it did.
191
191
  *
192
192
  * Messages are stripped in production builds.
193
- */ function b(t, e) {
193
+ */ function v(t, e) {
194
194
  t || g();
195
195
  }
196
196
 
197
197
  /**
198
198
  * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an
199
199
  * instance of `T` before casting.
200
- */ function v(t,
200
+ */ function b(t,
201
201
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
202
202
  e) {
203
203
  return t;
@@ -332,7 +332,7 @@ e) {
332
332
  }));
333
333
  }
334
334
  getToken() {
335
- return this.auth ? this.auth.getToken().then((t => t ? (b("string" == typeof t.accessToken),
335
+ return this.auth ? this.auth.getToken().then((t => t ? (v("string" == typeof t.accessToken),
336
336
  new j(t.accessToken, new l(this.auth.getUid()))) : null)) : Promise.resolve(null);
337
337
  }
338
338
  invalidateToken() {}
@@ -386,7 +386,7 @@ class W {
386
386
  }));
387
387
  }
388
388
  getToken() {
389
- return this.appCheck ? this.appCheck.getToken().then((t => t ? (b("string" == typeof t.token),
389
+ return this.appCheck ? this.appCheck.getToken().then((t => t ? (v("string" == typeof t.token),
390
390
  new W(t.token)) : null)) : Promise.resolve(null);
391
391
  }
392
392
  invalidateToken() {}
@@ -1305,15 +1305,15 @@ class gt {
1305
1305
  /**
1306
1306
  * A version of a document in Firestore. This corresponds to the version
1307
1307
  * timestamp, such as update_time or read_time.
1308
- */ class bt {
1308
+ */ class vt {
1309
1309
  constructor(t) {
1310
1310
  this.timestamp = t;
1311
1311
  }
1312
1312
  static fromTimestamp(t) {
1313
- return new bt(t);
1313
+ return new vt(t);
1314
1314
  }
1315
1315
  static min() {
1316
- return new bt(new gt(0, 0));
1316
+ return new vt(new gt(0, 0));
1317
1317
  }
1318
1318
  compareTo(t) {
1319
1319
  return this.timestamp._compareTo(t.timestamp);
@@ -1348,7 +1348,7 @@ class gt {
1348
1348
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1349
1349
  * See the License for the specific language governing permissions and
1350
1350
  * limitations under the License.
1351
- */ function vt(t) {
1351
+ */ function bt(t) {
1352
1352
  let e = 0;
1353
1353
  for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;
1354
1354
  return e;
@@ -1534,13 +1534,13 @@ const At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1534
1534
  // The json interface (for the browser) will return an iso timestamp string,
1535
1535
  // while the proto js library (for node) will return a
1536
1536
  // google.protobuf.Timestamp instance.
1537
- if (b(!!t), "string" == typeof t) {
1537
+ if (v(!!t), "string" == typeof t) {
1538
1538
  // The date string can have higher precision (nanos) than the Date class
1539
1539
  // (millis), so we do some custom parsing here.
1540
1540
  // Parse the nanos right out of the string.
1541
1541
  let e = 0;
1542
1542
  const n = At.exec(t);
1543
- if (b(!!n), n[1]) {
1543
+ if (v(!!n), n[1]) {
1544
1544
  // Pad the fraction out to 9 digits (nanos).
1545
1545
  let t = n[1];
1546
1546
  t = (t + "000000000").substr(0, 9), e = Number(t);
@@ -1700,7 +1700,7 @@ const At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1700
1700
  case 10 /* ObjectValue */ :
1701
1701
  return function(t, e) {
1702
1702
  const n = t.mapValue.fields || {}, r = e.mapValue.fields || {};
1703
- if (vt(n) !== vt(r)) return !1;
1703
+ if (bt(n) !== bt(r)) return !1;
1704
1704
  for (const t in n) if (n.hasOwnProperty(t) && (void 0 === r[t] || !St(n[t], r[t]))) return !1;
1705
1705
  return !0;
1706
1706
  }
@@ -1996,7 +1996,7 @@ function Ct(t, e) {
1996
1996
  * Creates a document with no known version or data, but which can serve as
1997
1997
  * base document for mutations.
1998
1998
  */ static newInvalidDocument(t) {
1999
- return new zt(t, 0 /* INVALID */ , bt.min(), Bt.empty(), 0 /* SYNCED */);
1999
+ return new zt(t, 0 /* INVALID */ , vt.min(), Bt.empty(), 0 /* SYNCED */);
2000
2000
  }
2001
2001
  /**
2002
2002
  * Creates a new document that is known to exist with the given data at the
@@ -2339,7 +2339,7 @@ function he(t) {
2339
2339
  * which can be different from the order by constraints the user provided (e.g.
2340
2340
  * the SDK and backend always orders by `__name__`).
2341
2341
  */ function le(t) {
2342
- const e = v(t);
2342
+ const e = b(t);
2343
2343
  if (null === e.$) {
2344
2344
  e.$ = [];
2345
2345
  const t = ae(e), n = ce(e);
@@ -2364,7 +2364,7 @@ function he(t) {
2364
2364
  /**
2365
2365
  * Converts this `Query` instance to it's corresponding `Target` representation.
2366
2366
  */ function fe(t) {
2367
- const e = v(t);
2367
+ const e = b(t);
2368
2368
  if (!e.F) if ("F" /* First */ === e.limitType) e.F = Qt(e.path, e.collectionGroup, le(e), e.filters, e.limit, e.startAt, e.endAt); else {
2369
2369
  // Flip the orderBy directions since we want the last results
2370
2370
  const t = [];
@@ -2512,7 +2512,7 @@ function we(t, e) {
2512
2512
  * See the License for the specific language governing permissions and
2513
2513
  * limitations under the License.
2514
2514
  */
2515
- /** A field path and the TransformOperation to perform upon it. */ class be {
2515
+ /** A field path and the TransformOperation to perform upon it. */ class ve {
2516
2516
  constructor(t, e) {
2517
2517
  this.field = t, this.transform = e;
2518
2518
  }
@@ -2522,18 +2522,18 @@ function we(t, e) {
2522
2522
  * Encodes a precondition for a mutation. This follows the model that the
2523
2523
  * backend accepts with the special case of an explicit "empty" precondition
2524
2524
  * (meaning no precondition).
2525
- */ class ve {
2525
+ */ class be {
2526
2526
  constructor(t, e) {
2527
2527
  this.updateTime = t, this.exists = e;
2528
2528
  }
2529
2529
  /** Creates a new empty Precondition. */ static none() {
2530
- return new ve;
2530
+ return new be;
2531
2531
  }
2532
2532
  /** Creates a new Precondition with an exists flag. */ static exists(t) {
2533
- return new ve(void 0, t);
2533
+ return new be(void 0, t);
2534
2534
  }
2535
2535
  /** Creates a new Precondition based on a version a document exists at. */ static updateTime(t) {
2536
- return new ve(t);
2536
+ return new be(t);
2537
2537
  }
2538
2538
  /** Returns whether this Precondition is empty. */ get isNone() {
2539
2539
  return void 0 === this.updateTime && void 0 === this.exists;
@@ -2727,7 +2727,7 @@ function Fe(t, e) {
2727
2727
  }
2728
2728
 
2729
2729
  function Se(t) {
2730
- return b(!!t), bt.fromTimestamp(function(t) {
2730
+ return v(!!t), vt.fromTimestamp(function(t) {
2731
2731
  const e = Pt(t);
2732
2732
  return new gt(e.seconds, e.nanos);
2733
2733
  }(t));
@@ -2746,11 +2746,11 @@ function qe(t, e) {
2746
2746
  function Oe(t, e) {
2747
2747
  const n = function(t) {
2748
2748
  const e = X.fromString(t);
2749
- return b(Ye(e)), e;
2749
+ return v(Ye(e)), e;
2750
2750
  }(e);
2751
2751
  if (n.get(1) !== t.databaseId.projectId) throw new U(A, "Tried to deserialize key from different project: " + n.get(1) + " vs " + t.databaseId.projectId);
2752
2752
  if (n.get(3) !== t.databaseId.database) throw new U(A, "Tried to deserialize key from different database: " + n.get(3) + " vs " + t.databaseId.database);
2753
- return new et((b((r = n).length > 4 && "documents" === r.get(4)), r.popFirst(5)));
2753
+ return new et((v((r = n).length > 4 && "documents" === r.get(4)), r.popFirst(5)));
2754
2754
  var r;
2755
2755
  /** Creates a Document proto from key and fields (but no create/update time) */}
2756
2756
 
@@ -2771,7 +2771,7 @@ function Ue(t, e, n) {
2771
2771
 
2772
2772
  function ke(t, e) {
2773
2773
  return "found" in e ? function(t, e) {
2774
- b(!!e.found), e.found.name, e.found.updateTime;
2774
+ v(!!e.found), e.found.name, e.found.updateTime;
2775
2775
  const n = Oe(t, e.found.name), r = Se(e.found.updateTime), s = new Bt({
2776
2776
  mapValue: {
2777
2777
  fields: e.found.fields
@@ -2779,7 +2779,7 @@ function ke(t, e) {
2779
2779
  });
2780
2780
  return zt.newFoundDocument(n, r, s);
2781
2781
  }(t, e) : "missing" in e ? function(t, e) {
2782
- b(!!e.missing), b(!!e.readTime);
2782
+ v(!!e.missing), v(!!e.readTime);
2783
2783
  const n = Oe(t, e.missing), r = Se(e.readTime);
2784
2784
  return zt.newNoDocument(n, r);
2785
2785
  }(t, e) : g();
@@ -3118,14 +3118,14 @@ class Je extends class {} {
3118
3118
  // TODO(firestorexp): Make sure there is only one Datastore instance per
3119
3119
  // firestore-exp client.
3120
3120
  async function Xe(t, e) {
3121
- const n = v(t), r = Le(n.q) + "/documents", s = {
3121
+ const n = b(t), r = Le(n.q) + "/documents", s = {
3122
3122
  writes: e.map((t => je(n.q, t)))
3123
3123
  };
3124
3124
  await n.m("Commit", r, s);
3125
3125
  }
3126
3126
 
3127
3127
  async function Ze(t, e) {
3128
- const n = v(t), r = Le(n.q) + "/documents", s = {
3128
+ const n = b(t), r = Le(n.q) + "/documents", s = {
3129
3129
  documents: e.map((t => qe(n.q, t)))
3130
3130
  }, i = await n.T("BatchGetDocuments", r, s), o = new Map;
3131
3131
  i.forEach((t => {
@@ -3135,12 +3135,12 @@ async function Ze(t, e) {
3135
3135
  const u = [];
3136
3136
  return e.forEach((t => {
3137
3137
  const e = o.get(t.toString());
3138
- b(!!e), u.push(e);
3138
+ v(!!e), u.push(e);
3139
3139
  })), u;
3140
3140
  }
3141
3141
 
3142
3142
  async function tn(t, e) {
3143
- const n = v(t), r = Me(n.q, fe(e));
3143
+ const n = b(t), r = Me(n.q, fe(e));
3144
3144
  return (await n.T("RunQuery", r.parent, {
3145
3145
  structuredQuery: r.structuredQuery
3146
3146
  })).filter((t => !!t.document)).map((t => function(t, e, n) {
@@ -3307,7 +3307,7 @@ class rn {
3307
3307
  case "gapi":
3308
3308
  const e = t.client;
3309
3309
  // Make sure this really is a Gapi client.
3310
- return b(!("object" != typeof e || null === e || !e.auth || !e.auth.getAuthHeaderValueForFirstParty)),
3310
+ return v(!("object" != typeof e || null === e || !e.auth || !e.auth.getAuthHeaderValueForFirstParty)),
3311
3311
  new Q(e, t.sessionIndex || "0", t.iamToken || null);
3312
3312
 
3313
3313
  case "provider":
@@ -3694,7 +3694,7 @@ function mn(t, e, ...n) {
3694
3694
  */
3695
3695
  /**
3696
3696
  * An immutable object representing an array of bytes.
3697
- */ class bn {
3697
+ */ class vn {
3698
3698
  /** @hideconstructor */
3699
3699
  constructor(t) {
3700
3700
  this._byteString = t;
@@ -3706,7 +3706,7 @@ function mn(t, e, ...n) {
3706
3706
  * @param base64 - The Base64 string used to create the `Bytes` object.
3707
3707
  */ static fromBase64String(t) {
3708
3708
  try {
3709
- return new bn(It.fromBase64String(t));
3709
+ return new vn(It.fromBase64String(t));
3710
3710
  } catch (t) {
3711
3711
  throw new U(A, "Failed to construct data from Base64 string: " + t);
3712
3712
  }
@@ -3716,7 +3716,7 @@ function mn(t, e, ...n) {
3716
3716
  *
3717
3717
  * @param array - The Uint8Array used to create the `Bytes` object.
3718
3718
  */ static fromUint8Array(t) {
3719
- return new bn(It.fromUint8Array(t));
3719
+ return new vn(It.fromUint8Array(t));
3720
3720
  }
3721
3721
  /**
3722
3722
  * Returns the underlying bytes as a Base64-encoded string.
@@ -3768,7 +3768,7 @@ function mn(t, e, ...n) {
3768
3768
  /**
3769
3769
  * Sentinel values that can be used when writing document fields with `set()`
3770
3770
  * or `update()`.
3771
- */ class vn {
3771
+ */ class bn {
3772
3772
  /**
3773
3773
  * @param _methodName - The public API endpoint that returns this class.
3774
3774
  * @hideconstructor
@@ -4015,7 +4015,7 @@ function Dn(t) {
4015
4015
  return new In(new Bt(u), c, a);
4016
4016
  }
4017
4017
 
4018
- class $n extends vn {
4018
+ class $n extends bn {
4019
4019
  _toFieldTransform(t) {
4020
4020
  if (2 /* MergeSet */ !== t.tt) throw 1 /* Update */ === t.tt ? t.ut(`${this._methodName}() can only appear at the top level of your update data`) : t.ut(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
4021
4021
  // No transform to add for a delete, but we need to add it to our
@@ -4051,23 +4051,23 @@ class $n extends vn {
4051
4051
  }, e.databaseId, e.q, e.ignoreUndefinedProperties);
4052
4052
  }
4053
4053
 
4054
- class Sn extends vn {
4054
+ class Sn extends bn {
4055
4055
  _toFieldTransform(t) {
4056
- return new be(t.path, new pe);
4056
+ return new ve(t.path, new pe);
4057
4057
  }
4058
4058
  isEqual(t) {
4059
4059
  return t instanceof Sn;
4060
4060
  }
4061
4061
  }
4062
4062
 
4063
- class xn extends vn {
4063
+ class xn extends bn {
4064
4064
  constructor(t, e) {
4065
4065
  super(t), this.lt = e;
4066
4066
  }
4067
4067
  _toFieldTransform(t) {
4068
4068
  const e = Fn(this, t,
4069
4069
  /*array=*/ !0), n = this.lt.map((t => kn(t, e))), r = new ye(n);
4070
- return new be(t.path, r);
4070
+ return new ve(t.path, r);
4071
4071
  }
4072
4072
  isEqual(t) {
4073
4073
  // TODO(mrschmidt): Implement isEquals
@@ -4075,14 +4075,14 @@ class xn extends vn {
4075
4075
  }
4076
4076
  }
4077
4077
 
4078
- class qn extends vn {
4078
+ class qn extends bn {
4079
4079
  constructor(t, e) {
4080
4080
  super(t), this.lt = e;
4081
4081
  }
4082
4082
  _toFieldTransform(t) {
4083
4083
  const e = Fn(this, t,
4084
4084
  /*array=*/ !0), n = this.lt.map((t => kn(t, e))), r = new _e(n);
4085
- return new be(t.path, r);
4085
+ return new ve(t.path, r);
4086
4086
  }
4087
4087
  isEqual(t) {
4088
4088
  // TODO(mrschmidt): Implement isEquals
@@ -4090,13 +4090,13 @@ class qn extends vn {
4090
4090
  }
4091
4091
  }
4092
4092
 
4093
- class On extends vn {
4093
+ class On extends bn {
4094
4094
  constructor(t, e) {
4095
4095
  super(t), this.ft = e;
4096
4096
  }
4097
4097
  _toFieldTransform(t) {
4098
4098
  const e = new ge(t.q, we(t.q, this.ft));
4099
- return new be(t.path, e);
4099
+ return new ve(t.path, e);
4100
4100
  }
4101
4101
  isEqual(t) {
4102
4102
  // TODO(mrschmidt): Implement isEquals
@@ -4173,7 +4173,7 @@ class On extends vn {
4173
4173
  // Unwrap the API type from the Compat SDK. This will return the API type
4174
4174
  // from firestore-exp.
4175
4175
  t = getModularInstance(t))) return Bn("Unsupported field value:", e, t), jn(t, e);
4176
- if (t instanceof vn)
4176
+ if (t instanceof bn)
4177
4177
  // FieldValues usually parse into transforms (except FieldValue.delete())
4178
4178
  // in which case we do not want to include this field in our parsed data
4179
4179
  // (as doing so will overwrite the field directly prior to the transform
@@ -4262,7 +4262,7 @@ class On extends vn {
4262
4262
  longitude: t.longitude
4263
4263
  }
4264
4264
  };
4265
- if (t instanceof bn) return {
4265
+ if (t instanceof vn) return {
4266
4266
  bytesValue: $e(e.q, t._byteString)
4267
4267
  };
4268
4268
  if (t instanceof hn) {
@@ -4302,7 +4302,7 @@ function jn(t, e) {
4302
4302
  }
4303
4303
 
4304
4304
  function Mn(t) {
4305
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof gt || t instanceof En || t instanceof bn || t instanceof hn || t instanceof vn);
4305
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof gt || t instanceof En || t instanceof vn || t instanceof hn || t instanceof bn);
4306
4306
  }
4307
4307
 
4308
4308
  function Bn(t, e, n) {
@@ -4704,12 +4704,12 @@ class sr extends tr {
4704
4704
 
4705
4705
  class or extends tr {
4706
4706
  constructor(t, e, n) {
4707
- super(), this.type = t, this.gt = e, this.bt = n;
4707
+ super(), this.type = t, this.gt = e, this.vt = n;
4708
4708
  }
4709
4709
  _apply(t) {
4710
4710
  return new ln(t.firestore, t.converter, function(t, e, n) {
4711
4711
  return new oe(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
4712
- }(t._query, this.gt, this.bt));
4712
+ }(t._query, this.gt, this.vt));
4713
4713
  }
4714
4714
  }
4715
4715
 
@@ -4736,10 +4736,10 @@ class or extends tr {
4736
4736
 
4737
4737
  class ar extends tr {
4738
4738
  constructor(t, e, n) {
4739
- super(), this.type = t, this.vt = e, this.Et = n;
4739
+ super(), this.type = t, this.bt = e, this.Et = n;
4740
4740
  }
4741
4741
  _apply(t) {
4742
- const e = mr(t, this.type, this.vt, this.Et);
4742
+ const e = mr(t, this.type, this.bt, this.Et);
4743
4743
  return new ln(t.firestore, t.converter, function(t, e) {
4744
4744
  return new oe(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
4745
4745
  }(t._query, e));
@@ -4757,10 +4757,10 @@ function lr(...t) {
4757
4757
 
4758
4758
  class fr extends tr {
4759
4759
  constructor(t, e, n) {
4760
- super(), this.type = t, this.vt = e, this.Et = n;
4760
+ super(), this.type = t, this.bt = e, this.Et = n;
4761
4761
  }
4762
4762
  _apply(t) {
4763
- const e = mr(t, this.type, this.vt, this.Et);
4763
+ const e = mr(t, this.type, this.bt, this.Et);
4764
4764
  return new ln(t.firestore, t.converter, function(t, e) {
4765
4765
  return new oe(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
4766
4766
  }(t._query, e));
@@ -4911,7 +4911,7 @@ function gr(t, e, n) {
4911
4911
  r;
4912
4912
  }
4913
4913
 
4914
- class br extends class {
4914
+ class vr extends class {
4915
4915
  convertValue(t, e = "none") {
4916
4916
  switch (Ft(t)) {
4917
4917
  case 0 /* NullValue */ :
@@ -4982,7 +4982,7 @@ class br extends class {
4982
4982
  }
4983
4983
  convertDocumentKey(t, e) {
4984
4984
  const n = X.fromString(t);
4985
- b(Ye(n));
4985
+ v(Ye(n));
4986
4986
  const r = new K(n.get(1), n.get(3)), s = new et(n.popFirst(5));
4987
4987
  return r.isEqual(e) ||
4988
4988
  // TODO(b/64130202): Somehow support foreign references.
@@ -4994,7 +4994,7 @@ class br extends class {
4994
4994
  super(), this.firestore = t;
4995
4995
  }
4996
4996
  convertBytes(t) {
4997
- return new bn(t);
4997
+ return new vn(t);
4998
4998
  }
4999
4999
  convertReference(t) {
5000
5000
  const e = this.convertDocumentKey(t, this.firestore._databaseId);
@@ -5014,10 +5014,10 @@ class br extends class {
5014
5014
  * @param reference - The reference of the document to fetch.
5015
5015
  * @returns A Promise resolved with a `DocumentSnapshot` containing the current
5016
5016
  * document contents.
5017
- */ function vr(t) {
5018
- const e = nn((t = ot(t, hn)).firestore), n = new br(t.firestore);
5017
+ */ function br(t) {
5018
+ const e = nn((t = ot(t, hn)).firestore), n = new vr(t.firestore);
5019
5019
  return Ze(e, [ t._key ]).then((e => {
5020
- b(1 === e.length);
5020
+ v(1 === e.length);
5021
5021
  const r = e[0];
5022
5022
  return new Hn(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
5023
5023
  }));
@@ -5038,7 +5038,7 @@ class br extends class {
5038
5038
  !function(t) {
5039
5039
  if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(q, "limitToLast() queries require specifying at least one orderBy() clause");
5040
5040
  }((t = ot(t, ln))._query);
5041
- const e = nn(t.firestore), n = new br(t.firestore);
5041
+ const e = nn(t.firestore), n = new vr(t.firestore);
5042
5042
  return tn(e, t._query).then((e => {
5043
5043
  const r = e.map((e => new Kn(t.firestore, n, e.key, e, t.converter)));
5044
5044
  return ue(t._query) &&
@@ -5051,7 +5051,7 @@ class br extends class {
5051
5051
 
5052
5052
  function Tr(t, e, n) {
5053
5053
  const r = gr((t = ot(t, hn)).converter, e, n), s = Nn(Dn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
5054
- return Xe(nn(t.firestore), [ s.toMutation(t._key, ve.none()) ]);
5054
+ return Xe(nn(t.firestore), [ s.toMutation(t._key, be.none()) ]);
5055
5055
  }
5056
5056
 
5057
5057
  function Ir(t, e, n, ...r) {
@@ -5060,7 +5060,7 @@ function Ir(t, e, n, ...r) {
5060
5060
  // performing validation.
5061
5061
  let i;
5062
5062
  i = "string" == typeof (e = getModularInstance(e)) || e instanceof _n ? Ln(s, "updateDoc", t._key, e, n, r) : Cn(s, "updateDoc", t._key, e);
5063
- return Xe(nn(t.firestore), [ i.toMutation(t._key, ve.exists(!0)) ]);
5063
+ return Xe(nn(t.firestore), [ i.toMutation(t._key, be.exists(!0)) ]);
5064
5064
  }
5065
5065
 
5066
5066
  /**
@@ -5075,7 +5075,7 @@ function Ir(t, e, n, ...r) {
5075
5075
  * @returns A `Promise` resolved once the document has been successfully
5076
5076
  * deleted from the backend.
5077
5077
  */ function Ar(t) {
5078
- return Xe(nn((t = ot(t, hn)).firestore), [ new Ae(t._key, ve.none()) ]);
5078
+ return Xe(nn((t = ot(t, hn)).firestore), [ new Ae(t._key, be.none()) ]);
5079
5079
  }
5080
5080
 
5081
5081
  /**
@@ -5094,7 +5094,7 @@ function Ir(t, e, n, ...r) {
5094
5094
  * newly created document after it has been written to the backend.
5095
5095
  */ function Pr(t, e) {
5096
5096
  const n = mn(t = ot(t, fn)), r = gr(t.converter, e), s = Nn(Dn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5097
- return Xe(nn(t.firestore), [ s.toMutation(n._key, ve.exists(!1)) ]).then((() => n));
5097
+ return Xe(nn(t.firestore), [ s.toMutation(n._key, be.exists(!1)) ]).then((() => n));
5098
5098
  }
5099
5099
 
5100
5100
  /**
@@ -5214,7 +5214,7 @@ function Ir(t, e, n, ...r) {
5214
5214
  set(t, e, n) {
5215
5215
  this._verifyNotCommitted();
5216
5216
  const r = Sr(t, this._firestore), s = gr(r.converter, e, n), i = Nn(this._dataReader, "WriteBatch.set", r._key, s, null !== r.converter, n);
5217
- return this._mutations.push(i.toMutation(r._key, ve.none())), this;
5217
+ return this._mutations.push(i.toMutation(r._key, be.none())), this;
5218
5218
  }
5219
5219
  update(t, e, n, ...r) {
5220
5220
  this._verifyNotCommitted();
@@ -5223,7 +5223,7 @@ function Ir(t, e, n, ...r) {
5223
5223
  // performing validation.
5224
5224
  let i;
5225
5225
  return i = "string" == typeof (e = getModularInstance(e)) || e instanceof _n ? Ln(this._dataReader, "WriteBatch.update", s._key, e, n, r) : Cn(this._dataReader, "WriteBatch.update", s._key, e),
5226
- this._mutations.push(i.toMutation(s._key, ve.exists(!0))), this;
5226
+ this._mutations.push(i.toMutation(s._key, be.exists(!0))), this;
5227
5227
  }
5228
5228
  /**
5229
5229
  * Deletes the document referred to by the provided {@link DocumentReference}.
@@ -5233,7 +5233,7 @@ function Ir(t, e, n, ...r) {
5233
5233
  */ delete(t) {
5234
5234
  this._verifyNotCommitted();
5235
5235
  const e = Sr(t, this._firestore);
5236
- return this._mutations = this._mutations.concat(new Ae(e._key, ve.none())), this;
5236
+ return this._mutations = this._mutations.concat(new Ae(e._key, be.none())), this;
5237
5237
  }
5238
5238
  /**
5239
5239
  * Commits all of the writes in this write batch as a single atomic unit.
@@ -5351,7 +5351,7 @@ function Sr(t, e) {
5351
5351
  if (t.isFoundDocument()) e = t.version; else {
5352
5352
  if (!t.isNoDocument()) throw g();
5353
5353
  // For deleted docs, we must use baseVersion 0 when we overwrite them.
5354
- e = bt.min();
5354
+ e = vt.min();
5355
5355
  }
5356
5356
  const n = this.readVersions.get(t.key.toString());
5357
5357
  if (n) {
@@ -5365,7 +5365,7 @@ function Sr(t, e) {
5365
5365
  * as a precondition, or no precondition if it was not read.
5366
5366
  */ precondition(t) {
5367
5367
  const e = this.readVersions.get(t.toString());
5368
- return !this.writtenDocs.has(t.toString()) && e ? ve.updateTime(e) : ve.none();
5368
+ return !this.writtenDocs.has(t.toString()) && e ? be.updateTime(e) : be.none();
5369
5369
  }
5370
5370
  /**
5371
5371
  * Returns the precondition for a document if the operation is an update.
@@ -5374,7 +5374,7 @@ function Sr(t, e) {
5374
5374
  // The first time a document is written, we want to take into account the
5375
5375
  // read time and existence
5376
5376
  if (!this.writtenDocs.has(t.toString()) && e) {
5377
- if (e.isEqual(bt.min()))
5377
+ if (e.isEqual(vt.min()))
5378
5378
  // The document doesn't exist, so fail the transaction.
5379
5379
  // This has to be validated locally because you can't send a
5380
5380
  // precondition that a document does not exist without changing the
@@ -5386,11 +5386,11 @@ function Sr(t, e) {
5386
5386
  // transaction.
5387
5387
  throw new U(A, "Can't update a document that doesn't exist.");
5388
5388
  // Document exists, base precondition on document update time.
5389
- return ve.updateTime(e);
5389
+ return be.updateTime(e);
5390
5390
  }
5391
5391
  // Document was not read, so we just use the preconditions for a blind
5392
5392
  // update.
5393
- return ve.exists(!0);
5393
+ return be.exists(!0);
5394
5394
  }
5395
5395
  write(t) {
5396
5396
  this.ensureCommitNotCalled(), this.mutations.push(t);
@@ -5871,7 +5871,7 @@ class kr {
5871
5871
  * @param documentRef - A reference to the document to be read.
5872
5872
  * @returns A `DocumentSnapshot` with the read data.
5873
5873
  */ get(t) {
5874
- const e = Sr(t, this._firestore), n = new br(this._firestore);
5874
+ const e = Sr(t, this._firestore), n = new vr(this._firestore);
5875
5875
  return this._transaction.lookup([ e._key ]).then((t => {
5876
5876
  if (!t || 1 !== t.length) return g();
5877
5877
  const r = t[0];
@@ -5938,7 +5938,7 @@ class kr {
5938
5938
  return e && r._setSettings(e), r;
5939
5939
  }), "PUBLIC")),
5940
5940
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
5941
- registerVersion("firestore-lite", "3.4.1-canary.be7ccb8ed", ""), registerVersion("firestore-lite", "3.4.1-canary.be7ccb8ed", "esm2017");
5941
+ registerVersion("firestore-lite", "3.4.2", ""), registerVersion("firestore-lite", "3.4.2", "esm2017");
5942
5942
 
5943
- export { bn as Bytes, fn as CollectionReference, hn as DocumentReference, Hn as DocumentSnapshot, _n as FieldPath, vn as FieldValue, sn as Firestore, U as FirestoreError, En as GeoPoint, ln as Query, tr as QueryConstraint, Kn as QueryDocumentSnapshot, Jn as QuerySnapshot, gt as Timestamp, kr as Transaction, Fr as WriteBatch, Pr as addDoc, Nr as arrayRemove, Dr as arrayUnion, dn as collection, wn as collectionGroup, cn as connectFirestoreEmulator, Ar as deleteDoc, Rr as deleteField, mn as doc, gn as documentId, wr as endAt, dr as endBefore, vr as getDoc, Er as getDocs, un as getFirestore, $r as increment, on as initializeFirestore, ur as limit, cr as limitToLast, ir as orderBy, er as query, yn as queryEqual, pn as refEqual, jr as runTransaction, Vr as serverTimestamp, Tr as setDoc, w as setLogLevel, Xn as snapshotEqual, lr as startAfter, hr as startAt, an as terminate, Ir as updateDoc, rr as where, xr as writeBatch };
5943
+ export { vn as Bytes, fn as CollectionReference, hn as DocumentReference, Hn as DocumentSnapshot, _n as FieldPath, bn as FieldValue, sn as Firestore, U as FirestoreError, En as GeoPoint, ln as Query, tr as QueryConstraint, Kn as QueryDocumentSnapshot, Jn as QuerySnapshot, gt as Timestamp, kr as Transaction, Fr as WriteBatch, Pr as addDoc, Nr as arrayRemove, Dr as arrayUnion, dn as collection, wn as collectionGroup, cn as connectFirestoreEmulator, Ar as deleteDoc, Rr as deleteField, mn as doc, gn as documentId, wr as endAt, dr as endBefore, br as getDoc, Er as getDocs, un as getFirestore, $r as increment, on as initializeFirestore, ur as limit, cr as limitToLast, ir as orderBy, er as query, yn as queryEqual, pn as refEqual, jr as runTransaction, Vr as serverTimestamp, Tr as setDoc, w as setLogLevel, Xn as snapshotEqual, lr as startAfter, hr as startAt, an as terminate, Ir as updateDoc, rr as where, xr as writeBatch };
5944
5944
  //# sourceMappingURL=index.browser.esm2017.js.map