@firebase/firestore 3.4.0-canary.8d9a09e18 → 3.4.0-canary.fd8cd3ec4

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.
@@ -66,7 +66,7 @@ D.MOCK_USER = new D("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let C = "9.6.0-canary.8d9a09e18";
69
+ let C = "9.6.0-canary.fd8cd3ec4";
70
70
 
71
71
  /**
72
72
  * @license
@@ -774,7 +774,7 @@ function it(t, e) {
774
774
  * For examples and further specifications, refer to the
775
775
  * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.
776
776
  */
777
- class at {
777
+ class ct {
778
778
  /**
779
779
  * Creates a new timestamp.
780
780
  *
@@ -806,7 +806,7 @@ class at {
806
806
  *
807
807
  * @returns a new timestamp representing the current date.
808
808
  */ static now() {
809
- return at.fromMillis(Date.now());
809
+ return ct.fromMillis(Date.now());
810
810
  }
811
811
  /**
812
812
  * Creates a new timestamp from the given date.
@@ -815,7 +815,7 @@ class at {
815
815
  * @returns A new `Timestamp` representing the same point in time as the given
816
816
  * date.
817
817
  */ static fromDate(t) {
818
- return at.fromMillis(t.getTime());
818
+ return ct.fromMillis(t.getTime());
819
819
  }
820
820
  /**
821
821
  * Creates a new timestamp from the given number of milliseconds.
@@ -826,7 +826,7 @@ class at {
826
826
  * number of milliseconds.
827
827
  */ static fromMillis(t) {
828
828
  const e = Math.floor(t / 1e3), n = Math.floor(1e6 * (t - 1e3 * e));
829
- return new at(e, n);
829
+ return new ct(e, n);
830
830
  }
831
831
  /**
832
832
  * Converts a `Timestamp` to a JavaScript `Date` object. This conversion
@@ -904,15 +904,15 @@ class at {
904
904
  /**
905
905
  * A version of a document in Firestore. This corresponds to the version
906
906
  * timestamp, such as update_time or read_time.
907
- */ class ct {
907
+ */ class at {
908
908
  constructor(t) {
909
909
  this.timestamp = t;
910
910
  }
911
911
  static fromTimestamp(t) {
912
- return new ct(t);
912
+ return new at(t);
913
913
  }
914
914
  static min() {
915
- return new ct(new at(0, 0));
915
+ return new at(new ct(0, 0));
916
916
  }
917
917
  compareTo(t) {
918
918
  return this.timestamp._compareTo(t.timestamp);
@@ -1410,7 +1410,7 @@ function Rt(t) {
1410
1410
  * Returns the local time at which this timestamp was first set.
1411
1411
  */ function Pt(t) {
1412
1412
  const e = Tt(t.mapValue.fields.__local_write_time__.timestampValue);
1413
- return new at(e.seconds, e.nanos);
1413
+ return new ct(e.seconds, e.nanos);
1414
1414
  }
1415
1415
 
1416
1416
  /**
@@ -1927,7 +1927,7 @@ function Lt(t) {
1927
1927
  * Creates a document with no known version or data, but which can serve as
1928
1928
  * base document for mutations.
1929
1929
  */ static newInvalidDocument(t) {
1930
- return new Wt(t, 0 /* INVALID */ , ct.min(), jt.empty(), 0 /* SYNCED */);
1930
+ return new Wt(t, 0 /* INVALID */ , at.min(), jt.empty(), 0 /* SYNCED */);
1931
1931
  }
1932
1932
  /**
1933
1933
  * Creates a new document that is known to exist with the given data at the
@@ -2094,7 +2094,7 @@ class Zt extends class {} {
2094
2094
  /**
2095
2095
  * Creates a filter based on the provided arguments.
2096
2096
  */ static create(t, e, n) {
2097
- return t.isKeyField() ? "in" /* IN */ === e || "not-in" /* NOT_IN */ === e ? this.P(t, e, n) : new ee(t, e, n) : "array-contains" /* ARRAY_CONTAINS */ === e ? new re(t, n) : "in" /* IN */ === e ? new oe(t, n) : "not-in" /* NOT_IN */ === e ? new ae(t, n) : "array-contains-any" /* ARRAY_CONTAINS_ANY */ === e ? new ce(t, n) : new Zt(t, e, n);
2097
+ return t.isKeyField() ? "in" /* IN */ === e || "not-in" /* NOT_IN */ === e ? this.P(t, e, n) : new ee(t, e, n) : "array-contains" /* ARRAY_CONTAINS */ === e ? new re(t, n) : "in" /* IN */ === e ? new oe(t, n) : "not-in" /* NOT_IN */ === e ? new ce(t, n) : "array-contains-any" /* ARRAY_CONTAINS_ANY */ === e ? new ae(t, n) : new Zt(t, e, n);
2098
2098
  }
2099
2099
  static P(t, e, n) {
2100
2100
  return "in" /* IN */ === e ? new ne(t, n) : new se(t, n);
@@ -2194,7 +2194,7 @@ function ie(t, e) {
2194
2194
  }
2195
2195
  }
2196
2196
 
2197
- /** A Filter that implements the not-in operator. */ class ae extends Zt {
2197
+ /** A Filter that implements the not-in operator. */ class ce extends Zt {
2198
2198
  constructor(t, e) {
2199
2199
  super(t, "not-in" /* NOT_IN */ , e);
2200
2200
  }
@@ -2207,7 +2207,7 @@ function ie(t, e) {
2207
2207
  }
2208
2208
  }
2209
2209
 
2210
- /** A Filter that implements the array-contains-any operator. */ class ce extends Zt {
2210
+ /** A Filter that implements the array-contains-any operator. */ class ae extends Zt {
2211
2211
  constructor(t, e) {
2212
2212
  super(t, "array-contains-any" /* ARRAY_CONTAINS_ANY */ , e);
2213
2213
  }
@@ -2305,16 +2305,16 @@ function we(t, e) {
2305
2305
  * Initializes a Query with a path and optional additional query constraints.
2306
2306
  * Path must currently be empty if this is a collection group query.
2307
2307
  */
2308
- constructor(t, e = null, n = [], s = [], i = null, r = "F" /* First */ , o = null, a = null) {
2308
+ constructor(t, e = null, n = [], s = [], i = null, r = "F" /* First */ , o = null, c = null) {
2309
2309
  this.path = t, this.collectionGroup = e, this.explicitOrderBy = n, this.filters = s,
2310
- this.limit = i, this.limitType = r, this.startAt = o, this.endAt = a, this.S = null,
2310
+ this.limit = i, this.limitType = r, this.startAt = o, this.endAt = c, this.S = null,
2311
2311
  // The corresponding `Target` of this `Query` instance.
2312
2312
  this.D = null, this.startAt, this.endAt;
2313
2313
  }
2314
2314
  }
2315
2315
 
2316
- /** Creates a new Query instance with the options provided. */ function me(t, e, n, s, i, r, o, a) {
2317
- return new _e(t, e, n, s, i, r, o, a);
2316
+ /** Creates a new Query instance with the options provided. */ function me(t, e, n, s, i, r, o, c) {
2317
+ return new _e(t, e, n, s, i, r, o, c);
2318
2318
  }
2319
2319
 
2320
2320
  /** Creates a new Query for a query that matches all documents at `path` */ function ge(t) {
@@ -2815,7 +2815,7 @@ class He {
2815
2815
  // Unlike setMutationApplyToLocalView, if we're applying a mutation to a
2816
2816
  // remote document the server has accepted the mutation so the precondition
2817
2817
  // must have held.
2818
- const s = t.value.clone(), i = cn(t.fieldTransforms, e, n.transformResults);
2818
+ const s = t.value.clone(), i = an(t.fieldTransforms, e, n.transformResults);
2819
2819
  s.setAll(i), e.convertToFoundDocument(n.version, s).setHasCommittedMutations();
2820
2820
  }(t, e, n) : t instanceof on ? function(t, e, n) {
2821
2821
  if (!Ye(t.precondition, e))
@@ -2824,8 +2824,8 @@ class He {
2824
2824
  // of the document in our cache and convert to an UnknownDocument with a
2825
2825
  // known updateTime.
2826
2826
  return void e.convertToUnknownDocument(n.version);
2827
- const s = cn(t.fieldTransforms, e, n.transformResults), i = e.data;
2828
- i.setAll(an(t)), i.setAll(s), e.convertToFoundDocument(n.version, i).setHasCommittedMutations();
2827
+ const s = an(t.fieldTransforms, e, n.transformResults), i = e.data;
2828
+ i.setAll(cn(t)), i.setAll(s), e.convertToFoundDocument(n.version, i).setHasCommittedMutations();
2829
2829
  }(t, e, n) : function(t, e, n) {
2830
2830
  // Unlike applyToLocalView, if we're applying a mutation to a remote
2831
2831
  // document the server has accepted the mutation so the precondition must
@@ -2869,7 +2869,7 @@ class He {
2869
2869
  */ (t, e, n) : t instanceof on ? function(t, e, n) {
2870
2870
  if (!Ye(t.precondition, e)) return;
2871
2871
  const s = un(t.fieldTransforms, n, e), i = e.data;
2872
- i.setAll(an(t)), i.setAll(s), e.convertToFoundDocument(sn(e), i).setHasLocalMutations();
2872
+ i.setAll(cn(t)), i.setAll(s), e.convertToFoundDocument(sn(e), i).setHasLocalMutations();
2873
2873
  }
2874
2874
  /**
2875
2875
  * Returns a FieldPath/Value map with the content of the PatchMutation.
@@ -2877,7 +2877,7 @@ class He {
2877
2877
  Ye(t.precondition, e) &&
2878
2878
  // We don't call `setHasLocalMutations()` since we want to be backwards
2879
2879
  // compatible with the existing SDK behavior.
2880
- e.convertToNoDocument(ct.min());
2880
+ e.convertToNoDocument(at.min());
2881
2881
  }
2882
2882
  /**
2883
2883
  * A mutation that verifies the existence of the document at the given key with
@@ -2924,7 +2924,7 @@ function nn(t, e) {
2924
2924
  * only if it is an existing document. Deleted and unknown documents have a
2925
2925
  * post-mutation version of SnapshotVersion.min().
2926
2926
  */ function sn(t) {
2927
- return t.isFoundDocument() ? t.version : ct.min();
2927
+ return t.isFoundDocument() ? t.version : at.min();
2928
2928
  }
2929
2929
 
2930
2930
  /**
@@ -2944,7 +2944,7 @@ class on extends Xe {
2944
2944
  }
2945
2945
  }
2946
2946
 
2947
- function an(t) {
2947
+ function cn(t) {
2948
2948
  const e = new Map;
2949
2949
  return t.fieldMask.fields.forEach((n => {
2950
2950
  if (!n.isEmpty()) {
@@ -2964,12 +2964,12 @@ function an(t) {
2964
2964
  * previous mutations.
2965
2965
  * @param serverTransformResults - The transform results received by the server.
2966
2966
  * @returns The transform results list.
2967
- */ function cn(t, e, n) {
2967
+ */ function an(t, e, n) {
2968
2968
  const s = new Map;
2969
2969
  B(t.length === n.length);
2970
2970
  for (let i = 0; i < n.length; i++) {
2971
- const r = t[i], o = r.transform, a = e.data.field(r.field);
2972
- s.set(r.field, Oe(o, a, n[i]));
2971
+ const r = t[i], o = r.transform, c = e.data.field(r.field);
2972
+ s.set(r.field, Oe(o, c, n[i]));
2973
2973
  }
2974
2974
  return s;
2975
2975
  }
@@ -3749,7 +3749,7 @@ function Cn() {
3749
3749
  // PORTING NOTE: Multi-tab only
3750
3750
  static createSynthesizedRemoteEventForCurrentChange(t, e) {
3751
3751
  const n = new Map;
3752
- return n.set(t, kn.createSynthesizedTargetChangeForCurrentChange(t, e)), new Nn(ct.min(), n, Cn(), An(), Sn());
3752
+ return n.set(t, kn.createSynthesizedTargetChangeForCurrentChange(t, e)), new Nn(at.min(), n, Cn(), An(), Sn());
3753
3753
  }
3754
3754
  }
3755
3755
 
@@ -3982,8 +3982,8 @@ class Mn {
3982
3982
  /**
3983
3983
  * Processes and adds the DocumentWatchChange to the current set of changes.
3984
3984
  */ ot(t) {
3985
- for (const e of t.$) t.F && t.F.isFoundDocument() ? this.at(e, t.F) : this.ct(e, t.key, t.F);
3986
- for (const e of t.removedTargetIds) this.ct(e, t.key, t.F);
3985
+ for (const e of t.$) t.F && t.F.isFoundDocument() ? this.ct(e, t.F) : this.at(e, t.key, t.F);
3986
+ for (const e of t.removedTargetIds) this.at(e, t.key, t.F);
3987
3987
  }
3988
3988
  /** Processes and adds the WatchTargetChange to the current set of changes. */ ut(t) {
3989
3989
  this.forEachTarget(t, (e => {
@@ -4053,7 +4053,7 @@ class Mn {
4053
4053
  // until it is resolved, essentially exposing inconsistency between
4054
4054
  // queries.
4055
4055
  const n = new St(t.path);
4056
- this.ct(e, n, Wt.newNoDocument(n, ct.min()));
4056
+ this.at(e, n, Wt.newNoDocument(n, at.min()));
4057
4057
  } else B(1 === n); else {
4058
4058
  this._t(e) !== n && (
4059
4059
  // Existence filter mismatch: We reset the mapping and raise a new
@@ -4080,7 +4080,7 @@ class Mn {
4080
4080
  // instead resulting in an explicit delete message and we could
4081
4081
  // remove this special logic.
4082
4082
  const e = new St(i.target.path);
4083
- null !== this.st.get(e) || this.yt(s, e) || this.ct(s, e, Wt.newNoDocument(e, t));
4083
+ null !== this.st.get(e) || this.yt(s, e) || this.at(s, e, Wt.newNoDocument(e, t));
4084
4084
  }
4085
4085
  n.j && (e.set(s, n.G()), n.H());
4086
4086
  }
@@ -4106,7 +4106,7 @@ class Mn {
4106
4106
  * its document key to the given target's mapping.
4107
4107
  */
4108
4108
  // Visible for testing.
4109
- at(t, e) {
4109
+ ct(t, e) {
4110
4110
  if (!this.lt(t)) return;
4111
4111
  const n = this.yt(t, e.key) ? 2 /* Modified */ : 0 /* Added */;
4112
4112
  this.ht(t).J(e.key, n), this.st = this.st.insert(e.key, e), this.it = this.it.insert(e.key, this.Tt(e.key).add(t));
@@ -4119,7 +4119,7 @@ class Mn {
4119
4119
  * to update the remote document cache.
4120
4120
  */
4121
4121
  // Visible for testing.
4122
- ct(t, e, n) {
4122
+ at(t, e, n) {
4123
4123
  if (!this.lt(t)) return;
4124
4124
  const s = this.ht(t);
4125
4125
  this.yt(t, e) ? s.J(e, 1 /* Removed */) :
@@ -4174,7 +4174,7 @@ class Mn {
4174
4174
  */ ft(t) {
4175
4175
  this.nt.set(t, new On);
4176
4176
  this.et.getRemoteKeysForTarget(t).forEach((e => {
4177
- this.ct(t, e, /*updatedDocument=*/ null);
4177
+ this.at(t, e, /*updatedDocument=*/ null);
4178
4178
  }));
4179
4179
  }
4180
4180
  /**
@@ -4279,9 +4279,9 @@ function Qn(t, e) {
4279
4279
  }
4280
4280
 
4281
4281
  function Gn(t) {
4282
- return B(!!t), ct.fromTimestamp(function(t) {
4282
+ return B(!!t), at.fromTimestamp(function(t) {
4283
4283
  const e = Tt(t);
4284
- return new at(e.seconds, e.nanos);
4284
+ return new ct(e.seconds, e.nanos);
4285
4285
  }(t));
4286
4286
  }
4287
4287
 
@@ -4371,7 +4371,7 @@ function rs(t, e) {
4371
4371
  }(e.targetChange.targetChangeType || "NO_CHANGE"), i = e.targetChange.targetIds || [], r = function(t, e) {
4372
4372
  return t.C ? (B(void 0 === e || "string" == typeof e), yt.fromBase64String(e || "")) : (B(void 0 === e || e instanceof Uint8Array),
4373
4373
  yt.fromUint8Array(e || new Uint8Array));
4374
- }(t, e.targetChange.resumeToken), o = e.targetChange.cause, a = o && function(t) {
4374
+ }(t, e.targetChange.resumeToken), o = e.targetChange.cause, c = o && function(t) {
4375
4375
  const e = void 0 === t.code ? K.UNKNOWN : mn(t.code);
4376
4376
  return new j(e, t.message || "");
4377
4377
  }
@@ -4383,7 +4383,7 @@ function rs(t, e) {
4383
4383
  * our generated proto interfaces say Int32Value must be. But GRPC actually
4384
4384
  * expects a { value: <number> } struct.
4385
4385
  */ (o);
4386
- n = new Fn(s, i, r, a || null);
4386
+ n = new Fn(s, i, r, c || null);
4387
4387
  } else if ("documentChange" in e) {
4388
4388
  e.documentChange;
4389
4389
  const s = e.documentChange;
@@ -4392,14 +4392,14 @@ function rs(t, e) {
4392
4392
  mapValue: {
4393
4393
  fields: s.document.fields
4394
4394
  }
4395
- }), a = Wt.newFoundDocument(i, r, o), c = s.targetIds || [], u = s.removedTargetIds || [];
4396
- n = new xn(c, u, a.key, a);
4395
+ }), c = Wt.newFoundDocument(i, r, o), a = s.targetIds || [], u = s.removedTargetIds || [];
4396
+ n = new xn(a, u, c.key, c);
4397
4397
  } else if ("documentDelete" in e) {
4398
4398
  e.documentDelete;
4399
4399
  const s = e.documentDelete;
4400
4400
  s.document;
4401
- const i = Yn(t, s.document), r = s.readTime ? Gn(s.readTime) : ct.min(), o = Wt.newNoDocument(i, r), a = s.removedTargetIds || [];
4402
- n = new xn([], a, o.key, o);
4401
+ const i = Yn(t, s.document), r = s.readTime ? Gn(s.readTime) : at.min(), o = Wt.newNoDocument(i, r), c = s.removedTargetIds || [];
4402
+ n = new xn([], c, o.key, o);
4403
4403
  } else if ("documentRemove" in e) {
4404
4404
  e.documentRemove;
4405
4405
  const s = e.documentRemove;
@@ -4466,7 +4466,7 @@ function os(t, e) {
4466
4466
  }(t, e.precondition)), n;
4467
4467
  }
4468
4468
 
4469
- function as(t, e) {
4469
+ function cs(t, e) {
4470
4470
  const n = e.currentDocument ? function(t) {
4471
4471
  return void 0 !== t.updateTime ? Je.updateTime(Gn(t.updateTime)) : void 0 !== t.exists ? Je.exists(t.exists) : Je.none();
4472
4472
  }(e.currentDocument) : Je.none(), s = e.updateTransforms ? e.updateTransforms.map((e => function(t, e) {
@@ -4508,11 +4508,11 @@ function as(t, e) {
4508
4508
  return L();
4509
4509
  }
4510
4510
 
4511
- function cs(t, e) {
4511
+ function as(t, e) {
4512
4512
  return t && t.length > 0 ? (B(void 0 !== e), t.map((t => function(t, e) {
4513
4513
  // NOTE: Deletes don't have an updateTime.
4514
4514
  let n = t.updateTime ? Gn(t.updateTime) : Gn(e);
4515
- return n.isEqual(ct.min()) && (
4515
+ return n.isEqual(at.min()) && (
4516
4516
  // The Firestore Emulator currently returns an update time of 0 for
4517
4517
  // deletes of non-existing documents (rather than null). This breaks the
4518
4518
  // test "get deleted doc while offline with source=cache" as NoDocuments
@@ -4642,15 +4642,15 @@ function ls(t) {
4642
4642
  // visible for testing
4643
4643
  (t.direction));
4644
4644
  }(t))));
4645
- let a = null;
4646
- n.limit && (a = function(t) {
4645
+ let c = null;
4646
+ n.limit && (c = function(t) {
4647
4647
  let e;
4648
4648
  return e = "object" == typeof t ? t.value : t, bt(e) ? null : e;
4649
4649
  }(n.limit));
4650
- let c = null;
4651
- n.startAt && (c = _s(n.startAt));
4650
+ let a = null;
4651
+ n.startAt && (a = _s(n.startAt));
4652
4652
  let u = null;
4653
- return n.endAt && (u = _s(n.endAt)), me(e, i, o, r, a, "F" /* First */ , c, u);
4653
+ return n.endAt && (u = _s(n.endAt)), me(e, i, o, r, c, "F" /* First */ , a, u);
4654
4654
  }
4655
4655
 
4656
4656
  function fs(t, e) {
@@ -6114,7 +6114,7 @@ function ii(t, e) {
6114
6114
  const n = t.get(e.key), s = n;
6115
6115
  // TODO(mutabledocuments): This method should take a MutableDocumentMap
6116
6116
  // and we should remove this cast.
6117
- this.applyToLocalView(s), n.isValidDocument() || s.convertToNoDocument(ct.min());
6117
+ this.applyToLocalView(s), n.isValidDocument() || s.convertToNoDocument(at.min());
6118
6118
  }));
6119
6119
  }
6120
6120
  keys() {
@@ -6165,7 +6165,7 @@ function ii(t, e) {
6165
6165
  */
6166
6166
  /**
6167
6167
  * An immutable set of metadata that the local store tracks for each target.
6168
- */ class ai {
6168
+ */ class ci {
6169
6169
  constructor(
6170
6170
  /** The target being listened to. */
6171
6171
  t,
@@ -6182,11 +6182,11 @@ function ii(t, e) {
6182
6182
  */
6183
6183
  s,
6184
6184
  /** The latest snapshot version seen for this target. */
6185
- i = ct.min()
6185
+ i = at.min()
6186
6186
  /**
6187
6187
  * The maximum snapshot version at which the associated view
6188
6188
  * contained no limbo documents.
6189
- */ , r = ct.min()
6189
+ */ , r = at.min()
6190
6190
  /**
6191
6191
  * An opaque, server-assigned token that allows watching a target to be
6192
6192
  * resumed after disconnecting without retransmitting all the data that
@@ -6197,19 +6197,19 @@ function ii(t, e) {
6197
6197
  this.lastLimboFreeSnapshotVersion = r, this.resumeToken = o;
6198
6198
  }
6199
6199
  /** Creates a new target data instance with an updated sequence number. */ withSequenceNumber(t) {
6200
- return new ai(this.target, this.targetId, this.purpose, t, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken);
6200
+ return new ci(this.target, this.targetId, this.purpose, t, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken);
6201
6201
  }
6202
6202
  /**
6203
6203
  * Creates a new target data instance with an updated resume token and
6204
6204
  * snapshot version.
6205
6205
  */ withResumeToken(t, e) {
6206
- return new ai(this.target, this.targetId, this.purpose, this.sequenceNumber, e, this.lastLimboFreeSnapshotVersion, t);
6206
+ return new ci(this.target, this.targetId, this.purpose, this.sequenceNumber, e, this.lastLimboFreeSnapshotVersion, t);
6207
6207
  }
6208
6208
  /**
6209
6209
  * Creates a new target data instance with an updated last limbo free
6210
6210
  * snapshot version number.
6211
6211
  */ withLastLimboFreeSnapshotVersion(t) {
6212
- return new ai(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, t, this.resumeToken);
6212
+ return new ci(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, t, this.resumeToken);
6213
6213
  }
6214
6214
  }
6215
6215
 
@@ -6229,7 +6229,7 @@ function ii(t, e) {
6229
6229
  * See the License for the specific language governing permissions and
6230
6230
  * limitations under the License.
6231
6231
  */
6232
- /** Serializer for values stored in the LocalStore. */ class ci {
6232
+ /** Serializer for values stored in the LocalStore. */ class ai {
6233
6233
  constructor(t) {
6234
6234
  this.Gt = t;
6235
6235
  }
@@ -6284,8 +6284,8 @@ function li(t) {
6284
6284
  }
6285
6285
 
6286
6286
  function fi(t) {
6287
- const e = new at(t[0], t[1]);
6288
- return ct.fromTimestamp(e);
6287
+ const e = new ct(t[0], t[1]);
6288
+ return at.fromTimestamp(e);
6289
6289
  }
6290
6290
 
6291
6291
  function di(t) {
@@ -6294,14 +6294,14 @@ function di(t) {
6294
6294
  }
6295
6295
 
6296
6296
  function wi(t) {
6297
- const e = new at(t.seconds, t.nanoseconds);
6298
- return ct.fromTimestamp(e);
6297
+ const e = new ct(t.seconds, t.nanoseconds);
6298
+ return at.fromTimestamp(e);
6299
6299
  }
6300
6300
 
6301
6301
  /** Encodes a batch of mutations into a DbMutationBatch for local storage. */
6302
6302
  /** Decodes a DbMutationBatch into a MutationBatch */
6303
6303
  function _i(t, e) {
6304
- const n = (e.baseMutations || []).map((e => as(t.Gt, e)));
6304
+ const n = (e.baseMutations || []).map((e => cs(t.Gt, e)));
6305
6305
  // Squash old transform mutations into existing patch or set mutations.
6306
6306
  // The replacement of representing `transforms` with `update_transforms`
6307
6307
  // on the SDK means that old `transform` mutations stored in IndexedDB need
@@ -6315,18 +6315,18 @@ function _i(t, e) {
6315
6315
  ++t;
6316
6316
  }
6317
6317
  }
6318
- const s = e.mutations.map((e => as(t.Gt, e))), i = at.fromMillis(e.localWriteTimeMs);
6318
+ const s = e.mutations.map((e => cs(t.Gt, e))), i = ct.fromMillis(e.localWriteTimeMs);
6319
6319
  return new ri(e.batchId, i, n, s);
6320
6320
  }
6321
6321
 
6322
6322
  /** Decodes a DbTarget into TargetData */ function mi(t) {
6323
- const e = wi(t.readTime), n = void 0 !== t.lastLimboFreeSnapshotVersion ? wi(t.lastLimboFreeSnapshotVersion) : ct.min();
6323
+ const e = wi(t.readTime), n = void 0 !== t.lastLimboFreeSnapshotVersion ? wi(t.lastLimboFreeSnapshotVersion) : at.min();
6324
6324
  let s;
6325
6325
  var i;
6326
6326
  return void 0 !== t.query.documents ? (B(1 === (i = t.query).documents.length),
6327
6327
  s = Re(ge(Zn(i.documents[0])))) : s = function(t) {
6328
6328
  return Re(ls(t));
6329
- }(t.query), new ai(s, t.targetId, 0 /* Listen */ , t.lastListenSequenceNumber, e, n, yt.fromBase64String(t.resumeToken));
6329
+ }(t.query), new ci(s, t.targetId, 0 /* Listen */ , t.lastListenSequenceNumber, e, n, yt.fromBase64String(t.resumeToken));
6330
6330
  }
6331
6331
 
6332
6332
  /** Encodes TargetData into a DbTarget for storage locally. */ function gi(t, e) {
@@ -6616,12 +6616,12 @@ class vi {
6616
6616
  */
6617
6617
  function Vi(t, e, n) {
6618
6618
  const s = t.store(Cs.store), i = t.store(Ns.store), r = [], o = IDBKeyRange.only(n.batchId);
6619
- let a = 0;
6620
- const c = s.jt({
6619
+ let c = 0;
6620
+ const a = s.jt({
6621
6621
  range: o
6622
- }, ((t, e, n) => (a++, n.delete())));
6623
- r.push(c.next((() => {
6624
- B(1 === a);
6622
+ }, ((t, e, n) => (c++, n.delete())));
6623
+ r.push(a.next((() => {
6624
+ B(1 === c);
6625
6625
  })));
6626
6626
  const u = [];
6627
6627
  for (const t of n.mutations) {
@@ -6721,20 +6721,20 @@ class Di {
6721
6721
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6722
6722
  return r.add({}).next((o => {
6723
6723
  B("number" == typeof o);
6724
- const a = new ri(o, e, n, s), c = function(t, e, n) {
6724
+ const c = new ri(o, e, n, s), a = function(t, e, n) {
6725
6725
  const s = n.baseMutations.map((e => os(t.Gt, e))), i = n.mutations.map((e => os(t.Gt, e)));
6726
6726
  return new Cs(e, n.batchId, n.localWriteTime.toMillis(), s, i);
6727
- }(this.k, this.userId, a), u = [];
6727
+ }(this.k, this.userId, c), u = [];
6728
6728
  let h = new Tn(((t, e) => it(t.canonicalString(), e.canonicalString())));
6729
6729
  for (const t of s) {
6730
6730
  const e = Ns.key(this.userId, t.key.path, o);
6731
- h = h.add(t.key.path.popLast()), u.push(r.put(c)), u.push(i.put(e, Ns.PLACEHOLDER));
6731
+ h = h.add(t.key.path.popLast()), u.push(r.put(a)), u.push(i.put(e, Ns.PLACEHOLDER));
6732
6732
  }
6733
6733
  return h.forEach((e => {
6734
6734
  u.push(this.Jt.addToCollectionParentIndex(t, e));
6735
6735
  })), t.addOnCommittedListener((() => {
6736
- this.Yt[o] = a.keys();
6737
- })), Gs.waitFor(u).next((() => a));
6736
+ this.Yt[o] = c.keys();
6737
+ })), Gs.waitFor(u).next((() => c));
6738
6738
  }));
6739
6739
  }
6740
6740
  lookupMutationBatch(t, e) {
@@ -6788,7 +6788,7 @@ class Di {
6788
6788
  return ki(t).jt({
6789
6789
  range: s
6790
6790
  }, ((n, s, r) => {
6791
- const [o, a, c] = n, u = vs(a);
6791
+ const [o, c, a] = n, u = vs(c);
6792
6792
  // Only consider rows matching exactly the specific key of
6793
6793
  // interest. Note that because we order by path first, and we
6794
6794
  // order terminators before path separators, we'll encounter all
@@ -6798,7 +6798,7 @@ class Di {
6798
6798
  // can stop as soon as we hit any such row.
6799
6799
  if (o === this.userId && e.path.isEqual(u))
6800
6800
  // Look up the mutation batch in the store.
6801
- return Ni(t).get(c).next((t => {
6801
+ return Ni(t).get(a).next((t => {
6802
6802
  if (!t) throw L();
6803
6803
  B(t.userId === this.userId), i.push(_i(this.k, t));
6804
6804
  }));
@@ -6812,7 +6812,7 @@ class Di {
6812
6812
  const i = Ns.prefixForPath(this.userId, e.path), r = IDBKeyRange.lowerBound(i), o = ki(t).jt({
6813
6813
  range: r
6814
6814
  }, ((t, s, i) => {
6815
- const [r, o, a] = t, c = vs(o);
6815
+ const [r, o, c] = t, a = vs(o);
6816
6816
  // Only consider rows matching exactly the specific key of
6817
6817
  // interest. Note that because we order by path first, and we
6818
6818
  // order terminators before path separators, we'll encounter all
@@ -6820,7 +6820,7 @@ class Di {
6820
6820
  // the rows for documentKey will occur before any rows for
6821
6821
  // documents nested in a subcollection beneath documentKey so we
6822
6822
  // can stop as soon as we hit any such row.
6823
- r === this.userId && e.path.isEqual(c) ? n = n.add(a) : i.done();
6823
+ r === this.userId && e.path.isEqual(a) ? n = n.add(c) : i.done();
6824
6824
  }));
6825
6825
  s.push(o);
6826
6826
  })), Gs.waitFor(s).next((() => this.te(t, n)));
@@ -6834,14 +6834,14 @@ class Di {
6834
6834
  return ki(t).jt({
6835
6835
  range: r
6836
6836
  }, ((t, e, i) => {
6837
- const [r, a, c] = t, u = vs(a);
6837
+ const [r, c, a] = t, u = vs(c);
6838
6838
  r === this.userId && n.isPrefixOf(u) ?
6839
6839
  // Rows with document keys more than one segment longer than the
6840
6840
  // query path can't be matches. For example, a query on 'rooms'
6841
6841
  // can't match the document /rooms/abc/messages/xyx.
6842
6842
  // TODO(mcg): we'll need a different scanner when we implement
6843
6843
  // ancestor queries.
6844
- u.length === s && (o = o.add(c)) : i.done();
6844
+ u.length === s && (o = o.add(a)) : i.done();
6845
6845
  })).next((() => this.te(t, o)));
6846
6846
  }
6847
6847
  te(t, e) {
@@ -6910,8 +6910,8 @@ class Di {
6910
6910
  range: r,
6911
6911
  Kt: !0
6912
6912
  }, ((t, n, s) => {
6913
- const [r, a, /*batchID*/ c] = t;
6914
- r === e && a === i && (o = !0), s.done();
6913
+ const [r, c, /*batchID*/ a] = t;
6914
+ r === e && c === i && (o = !0), s.done();
6915
6915
  })).next((() => o));
6916
6916
  }
6917
6917
 
@@ -7014,29 +7014,29 @@ class $i {
7014
7014
  allocateTargetId(t) {
7015
7015
  return this.oe(t).next((e => {
7016
7016
  const n = new $i(e.highestTargetId);
7017
- return e.highestTargetId = n.next(), this.ae(t, e).next((() => e.highestTargetId));
7017
+ return e.highestTargetId = n.next(), this.ce(t, e).next((() => e.highestTargetId));
7018
7018
  }));
7019
7019
  }
7020
7020
  getLastRemoteSnapshotVersion(t) {
7021
- return this.oe(t).next((t => ct.fromTimestamp(new at(t.lastRemoteSnapshotVersion.seconds, t.lastRemoteSnapshotVersion.nanoseconds))));
7021
+ return this.oe(t).next((t => at.fromTimestamp(new ct(t.lastRemoteSnapshotVersion.seconds, t.lastRemoteSnapshotVersion.nanoseconds))));
7022
7022
  }
7023
7023
  getHighestSequenceNumber(t) {
7024
7024
  return this.oe(t).next((t => t.highestListenSequenceNumber));
7025
7025
  }
7026
7026
  setTargetsMetadata(t, e, n) {
7027
7027
  return this.oe(t).next((s => (s.highestListenSequenceNumber = e, n && (s.lastRemoteSnapshotVersion = n.toTimestamp()),
7028
- e > s.highestListenSequenceNumber && (s.highestListenSequenceNumber = e), this.ae(t, s))));
7028
+ e > s.highestListenSequenceNumber && (s.highestListenSequenceNumber = e), this.ce(t, s))));
7029
7029
  }
7030
7030
  addTargetData(t, e) {
7031
- return this.ce(t, e).next((() => this.oe(t).next((n => (n.targetCount += 1, this.ue(e, n),
7032
- this.ae(t, n))))));
7031
+ return this.ae(t, e).next((() => this.oe(t).next((n => (n.targetCount += 1, this.ue(e, n),
7032
+ this.ce(t, n))))));
7033
7033
  }
7034
7034
  updateTargetData(t, e) {
7035
- return this.ce(t, e);
7035
+ return this.ae(t, e);
7036
7036
  }
7037
7037
  removeTargetData(t, e) {
7038
7038
  return this.removeMatchingKeysForTargetId(t, e.targetId).next((() => Oi(t).delete(e.targetId))).next((() => this.oe(t))).next((e => (B(e.targetCount > 0),
7039
- e.targetCount -= 1, this.ae(t, e))));
7039
+ e.targetCount -= 1, this.ce(t, e))));
7040
7040
  }
7041
7041
  /**
7042
7042
  * Drops any targets with sequence number less than or equal to the upper bound, excepting those
@@ -7046,8 +7046,8 @@ class $i {
7046
7046
  let s = 0;
7047
7047
  const i = [];
7048
7048
  return Oi(t).jt(((r, o) => {
7049
- const a = mi(o);
7050
- a.sequenceNumber <= e && null === n.get(a.targetId) && (s++, i.push(this.removeTargetData(t, a)));
7049
+ const c = mi(o);
7050
+ c.sequenceNumber <= e && null === n.get(c.targetId) && (s++, i.push(this.removeTargetData(t, c)));
7051
7051
  })).next((() => Gs.waitFor(i))).next((() => s));
7052
7052
  }
7053
7053
  /**
@@ -7061,10 +7061,10 @@ class $i {
7061
7061
  oe(t) {
7062
7062
  return Mi(t).get(Ls.key).next((t => (B(null !== t), t)));
7063
7063
  }
7064
- ae(t, e) {
7064
+ ce(t, e) {
7065
7065
  return Mi(t).put(Ls.key, e);
7066
7066
  }
7067
- ce(t, e) {
7067
+ ae(t, e) {
7068
7068
  return Oi(t).put(gi(this.k, e));
7069
7069
  }
7070
7070
  /**
@@ -7316,16 +7316,16 @@ class $i {
7316
7316
  return this.ge.getCacheSize(t);
7317
7317
  }
7318
7318
  Te(t, e) {
7319
- let n, s, i, r, o, c, u;
7319
+ let n, s, i, r, o, a, u;
7320
7320
  const h = Date.now();
7321
7321
  return this.calculateTargetCount(t, this.params.percentileToCollect).next((e => (
7322
7322
  // Cap at the configured max
7323
7323
  e > this.params.maximumSequenceNumbersToCollect ? ($("LruGarbageCollector", `Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${e}`),
7324
7324
  s = this.params.maximumSequenceNumbersToCollect) : s = e, r = Date.now(), this.nthSequenceNumber(t, s)))).next((s => (n = s,
7325
- o = Date.now(), this.removeTargets(t, n, e)))).next((e => (i = e, c = Date.now(),
7325
+ o = Date.now(), this.removeTargets(t, n, e)))).next((e => (i = e, a = Date.now(),
7326
7326
  this.removeOrphanedDocuments(t, n)))).next((t => {
7327
7327
  if (u = Date.now(), k() <= LogLevel.DEBUG) {
7328
- $("LruGarbageCollector", `LRU Garbage Collection\n\tCounted targets in ${r - h}ms\n\tDetermined least recently used ${s} in ` + (o - r) + "ms\n" + `\tRemoved ${i} targets in ` + (c - o) + "ms\n" + `\tRemoved ${t} documents in ` + (u - c) + "ms\n" + `Total Duration: ${u - h}ms`);
7328
+ $("LruGarbageCollector", `LRU Garbage Collection\n\tCounted targets in ${r - h}ms\n\tDetermined least recently used ${s} in ` + (o - r) + "ms\n" + `\tRemoved ${i} targets in ` + (a - o) + "ms\n" + `\tRemoved ${t} documents in ` + (u - a) + "ms\n" + `Total Duration: ${u - h}ms`);
7329
7329
  }
7330
7330
  return Gs.resolve({
7331
7331
  didRun: !0,
@@ -7569,7 +7569,7 @@ function Wi(t, e) {
7569
7569
  }
7570
7570
  getReadTime(t) {
7571
7571
  const e = this.changes.get(t);
7572
- return e ? e.readTime : ct.min();
7572
+ return e ? e.readTime : at.min();
7573
7573
  }
7574
7574
  /**
7575
7575
  * Buffers a `RemoteDocumentCache.addEntry()` call.
@@ -7742,7 +7742,7 @@ function Wi(t, e) {
7742
7742
  getDocumentsMatchingQuery(t, e, n) {
7743
7743
  let s = An();
7744
7744
  const i = e.path.length + 1, r = {};
7745
- if (n.isEqual(ct.min())) {
7745
+ if (n.isEqual(at.min())) {
7746
7746
  // Documents are ordered by key, so we can use a prefix scan to narrow
7747
7747
  // down the documents we need to match the query against.
7748
7748
  const t = e.path.toArray();
@@ -7786,7 +7786,7 @@ function Wi(t, e) {
7786
7786
  const t = ui(this.k, e);
7787
7787
  // Whether the document is a sentinel removal and should only be used in the
7788
7788
  // `getNewDocumentChanges()`
7789
- if (!(t.isNoDocument() && t.version.isEqual(ct.min()))) return t;
7789
+ if (!(t.isNoDocument() && t.version.isEqual(at.min()))) return t;
7790
7790
  }
7791
7791
  return Wt.newInvalidDocument(t);
7792
7792
  }
@@ -7822,16 +7822,16 @@ class Ji extends zi {
7822
7822
  return this.changes.forEach(((i, r) => {
7823
7823
  const o = this.Ce.get(i);
7824
7824
  if (r.document.isValidDocument()) {
7825
- const a = hi(this.De.k, r.document, this.getReadTime(i));
7825
+ const c = hi(this.De.k, r.document, this.getReadTime(i));
7826
7826
  s = s.add(i.path.popLast());
7827
- const c = Si(a);
7828
- n += c - o, e.push(this.De.addEntry(t, i, a));
7827
+ const a = Si(c);
7828
+ n += a - o, e.push(this.De.addEntry(t, i, c));
7829
7829
  } else if (n -= o, this.trackRemovals) {
7830
7830
  // In order to track removals, we store a "sentinel delete" in the
7831
7831
  // RemoteDocumentCache. This entry is represented by a NoDocument
7832
7832
  // with a version of 0 and ignored by `maybeDecodeDocument()` but
7833
7833
  // preserved in `getNewDocumentChanges()`.
7834
- const n = hi(this.De.k, Wt.newNoDocument(i, ct.min()), this.getReadTime(i));
7834
+ const n = hi(this.De.k, Wt.newNoDocument(i, at.min()), this.getReadTime(i));
7835
7835
  e.push(this.De.addEntry(t, i, n));
7836
7836
  } else e.push(this.De.removeEntry(t, i));
7837
7837
  })), s.forEach((n => {
@@ -7934,7 +7934,7 @@ function Zi(t) {
7934
7934
  function(t) {
7935
7935
  const e = t.store(Ls.store), n = new Ls(
7936
7936
  /*highestTargetId=*/ 0,
7937
- /*lastListenSequenceNumber=*/ 0, ct.min().toTimestamp(),
7937
+ /*lastListenSequenceNumber=*/ 0, at.min().toTimestamp(),
7938
7938
  /*targetCount=*/ 0);
7939
7939
  return e.put(Ls.key, n);
7940
7940
  }
@@ -8155,14 +8155,14 @@ class sr {
8155
8155
  * Whether to synchronize the in-memory state of multiple tabs and share
8156
8156
  * access to local persistence.
8157
8157
  */
8158
- t, e, n, s, i, r, o, a, c,
8158
+ t, e, n, s, i, r, o, c, a,
8159
8159
  /**
8160
8160
  * If set to true, forcefully obtains database access. Existing tabs will
8161
8161
  * no longer be able to access IndexedDB.
8162
8162
  */
8163
8163
  u) {
8164
8164
  if (this.allowTabSynchronization = t, this.persistenceKey = e, this.clientId = n,
8165
- this.Oe = i, this.window = r, this.document = o, this.Me = c, this.Le = u, this.Be = null,
8165
+ this.Oe = i, this.window = r, this.document = o, this.Me = a, this.Le = u, this.Be = null,
8166
8166
  this.Ue = !1, this.isPrimary = !1, this.networkEnabled = !0,
8167
8167
  /** Our window.unload handler, if registered. */
8168
8168
  this.qe = null, this.inForeground = !1,
@@ -8174,7 +8174,7 @@ class sr {
8174
8174
  this.Qe = Number.NEGATIVE_INFINITY,
8175
8175
  /** A listener to notify on primary state changes. */
8176
8176
  this.We = t => Promise.resolve(), !sr.bt()) throw new j(K.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
8177
- this.referenceDelegate = new Qi(this, s), this.Ge = e + "main", this.k = new ci(a),
8177
+ this.referenceDelegate = new Qi(this, s), this.Ge = e + "main", this.k = new ai(c),
8178
8178
  this.ze = new Hs(this.Ge, 11, new tr(this.k)), this.He = new Fi(this.referenceDelegate, this.k),
8179
8179
  this.Jt = new Ri, this.Je = function(t, e) {
8180
8180
  return new Hi(t, e);
@@ -8252,7 +8252,7 @@ class sr {
8252
8252
  if (this.isPrimary) return this.rn(t).next((t => {
8253
8253
  t || (this.isPrimary = !1, this.Oe.enqueueRetryable((() => this.We(!1))));
8254
8254
  }));
8255
- })).next((() => this.on(t))).next((e => this.isPrimary && !e ? this.an(t).next((() => !1)) : !!e && this.cn(t).next((() => !0)))))).catch((t => {
8255
+ })).next((() => this.on(t))).next((e => this.isPrimary && !e ? this.cn(t).next((() => !1)) : !!e && this.an(t).next((() => !0)))))).catch((t => {
8256
8256
  if (Xs(t))
8257
8257
  // Proceed with the existing state. Any subsequent access to
8258
8258
  // IndexedDB will verify the lease.
@@ -8358,7 +8358,7 @@ class sr {
8358
8358
  // has obtained the primary lease.
8359
8359
  await this.ze.runTransaction("shutdown", "readwrite", [ Ss.store, Us.store ], (t => {
8360
8360
  const e = new si(t, et.I);
8361
- return this.an(e).next((() => this.hn(e)));
8361
+ return this.cn(e).next((() => this.hn(e)));
8362
8362
  })), this.ze.close(),
8363
8363
  // Remove the entry marking the client as zombied from LocalStorage since
8364
8364
  // we successfully deleted its metadata from IndexedDb.
@@ -8408,7 +8408,7 @@ class sr {
8408
8408
  if (!e) throw F(`Failed to obtain primary lease for action '${t}'.`), this.isPrimary = !1,
8409
8409
  this.Oe.enqueueRetryable((() => this.We(!1))), new j(K.FAILED_PRECONDITION, Qs);
8410
8410
  return n(i);
8411
- })).next((t => this.cn(i).next((() => t)))) : this.En(i).next((() => n(i)))))).then((t => (i.raiseOnCommittedEvent(),
8411
+ })).next((t => this.an(i).next((() => t)))) : this.En(i).next((() => n(i)))))).then((t => (i.raiseOnCommittedEvent(),
8412
8412
  t)));
8413
8413
  }
8414
8414
  /**
@@ -8425,14 +8425,14 @@ class sr {
8425
8425
  /**
8426
8426
  * Obtains or extends the new primary lease for the local client. This
8427
8427
  * method does not verify that the client is eligible for this lease.
8428
- */ cn(t) {
8428
+ */ an(t) {
8429
8429
  const e = new Ss(this.clientId, this.allowTabSynchronization, Date.now());
8430
8430
  return ir(t).put(Ss.key, e);
8431
8431
  }
8432
8432
  static bt() {
8433
8433
  return Hs.bt();
8434
8434
  }
8435
- /** Checks the primary lease and removes it if we are the current primary. */ an(t) {
8435
+ /** Checks the primary lease and removes it if we are the current primary. */ cn(t) {
8436
8436
  const e = ir(t);
8437
8437
  return e.get(Ss.key).next((t => this.un(t) ? ($("IndexedDbPersistence", "Releasing primary lease."),
8438
8438
  e.delete(Ss.key)) : Gs.resolve()));
@@ -8556,7 +8556,7 @@ class sr {
8556
8556
  * See the License for the specific language governing permissions and
8557
8557
  * limitations under the License.
8558
8558
  */
8559
- class ar {
8559
+ class cr {
8560
8560
  constructor(t, e) {
8561
8561
  this.progress = t, this.In = e;
8562
8562
  }
@@ -8583,7 +8583,7 @@ class ar {
8583
8583
  * have a cached version in remoteDocumentCache or local mutations for the
8584
8584
  * document). The view is computed by applying the mutations in the
8585
8585
  * MutationQueue to the RemoteDocumentCache.
8586
- */ class cr {
8586
+ */ class ar {
8587
8587
  constructor(t, e, n) {
8588
8588
  this.Je = t, this.An = e, this.Jt = n;
8589
8589
  }
@@ -8777,7 +8777,7 @@ class ar {
8777
8777
  // collection, rather than to perform individual lookups.
8778
8778
  return function(t) {
8779
8779
  return 0 === t.filters.length && null === t.limit && null == t.startAt && null == t.endAt && (0 === t.explicitOrderBy.length || 1 === t.explicitOrderBy.length && t.explicitOrderBy[0].field.isKeyField());
8780
- }(e) || n.isEqual(ct.min()) ? this.Mn(t, e) : this.On.vn(t, s).next((i => {
8780
+ }(e) || n.isEqual(at.min()) ? this.Mn(t, e) : this.On.vn(t, s).next((i => {
8781
8781
  const r = this.Ln(e, i);
8782
8782
  return (ye(e) || pe(e)) && this.Bn(e.limitType, r, s, n) ? this.Mn(t, e) : (k() <= LogLevel.DEBUG && $("QueryEngine", "Re-using previous result from %s to execute query: %s", n.toString(), Ve(e)),
8783
8783
  this.On.getDocumentsMatchingQuery(t, e, n).next((t => (
@@ -8826,7 +8826,7 @@ class ar {
8826
8826
  }
8827
8827
  Mn(t, e) {
8828
8828
  return k() <= LogLevel.DEBUG && $("QueryEngine", "Using full collection scan to execute query:", Ve(e)),
8829
- this.On.getDocumentsMatchingQuery(t, e, ct.min());
8829
+ this.On.getDocumentsMatchingQuery(t, e, at.min());
8830
8830
  }
8831
8831
  }
8832
8832
 
@@ -8874,8 +8874,8 @@ class lr {
8874
8874
  *
8875
8875
  * PORTING NOTE: This is only used for multi-tab synchronization.
8876
8876
  */
8877
- this.jn = ct.min(), this.An = t.getMutationQueue(n), this.Qn = t.getRemoteDocumentCache(),
8878
- this.He = t.getTargetCache(), this.Wn = new cr(this.Qn, this.An, this.persistence.getIndexManager()),
8877
+ this.jn = at.min(), this.An = t.getMutationQueue(n), this.Qn = t.getRemoteDocumentCache(),
8878
+ this.He = t.getTargetCache(), this.Wn = new ar(this.Qn, this.An, this.persistence.getIndexManager()),
8879
8879
  this.Ye = t.getBundleCache(), this.Un.Fn(this.Wn);
8880
8880
  }
8881
8881
  collectGarbage(t) {
@@ -8907,7 +8907,7 @@ async function dr(t, e) {
8907
8907
  return n.An.getAllMutationBatches(t).next((o => (r = o, s = n.persistence.getMutationQueue(e),
8908
8908
  // Recreate our LocalDocumentsView using the new
8909
8909
  // MutationQueue.
8910
- i = new cr(n.Qn, s, n.persistence.getIndexManager()), s.getAllMutationBatches(t)))).next((e => {
8910
+ i = new ar(n.Qn, s, n.persistence.getIndexManager()), s.getAllMutationBatches(t)))).next((e => {
8911
8911
  const n = [], s = [];
8912
8912
  // Union the old/new changed keys.
8913
8913
  let o = Sn();
@@ -9005,16 +9005,16 @@ function _r(t) {
9005
9005
  i = n.qn;
9006
9006
  const o = [];
9007
9007
  e.targetChanges.forEach(((e, r) => {
9008
- const a = i.get(r);
9009
- if (!a) return;
9008
+ const c = i.get(r);
9009
+ if (!c) return;
9010
9010
  // Only update the remote keys if the target is still active. This
9011
9011
  // ensures that we can persist the updated target data along with
9012
9012
  // the updated assignment.
9013
9013
  o.push(n.He.removeMatchingKeys(t, e.removedDocuments, r).next((() => n.He.addMatchingKeys(t, e.addedDocuments, r))));
9014
- const c = e.resumeToken;
9014
+ const a = e.resumeToken;
9015
9015
  // Update the resume token if the change includes one.
9016
- if (c.approximateByteSize() > 0) {
9017
- const u = a.withResumeToken(c, s).withSequenceNumber(t.currentSequenceNumber);
9016
+ if (a.approximateByteSize() > 0) {
9017
+ const u = c.withResumeToken(a, s).withSequenceNumber(t.currentSequenceNumber);
9018
9018
  i = i.insert(r, u),
9019
9019
  // Update the target data if there are target changes (or if
9020
9020
  // sufficient time has passed since the last update).
@@ -9047,10 +9047,10 @@ function _r(t) {
9047
9047
  }
9048
9048
  /**
9049
9049
  * Notifies local store of the changed views to locally pin documents.
9050
- */ (a, u, e) && o.push(n.He.updateTargetData(t, u));
9050
+ */ (c, u, e) && o.push(n.He.updateTargetData(t, u));
9051
9051
  }
9052
9052
  }));
9053
- let a = An();
9053
+ let c = An();
9054
9054
  // HACK: The only reason we allow a null snapshot version is so that we
9055
9055
  // can synthesize remote events when we get permission denied errors while
9056
9056
  // trying to resolve the state of a locally cached document that is in
@@ -9061,12 +9061,12 @@ function _r(t) {
9061
9061
  // Each loop iteration only affects its "own" doc, so it's safe to get all the remote
9062
9062
  // documents in advance in a single call.
9063
9063
  o.push(gr(t, r, e.documentUpdates, s, void 0).next((t => {
9064
- a = t;
9065
- }))), !s.isEqual(ct.min())) {
9064
+ c = t;
9065
+ }))), !s.isEqual(at.min())) {
9066
9066
  const e = n.He.getLastRemoteSnapshotVersion(t).next((e => n.He.setTargetsMetadata(t, t.currentSequenceNumber, s)));
9067
9067
  o.push(e);
9068
9068
  }
9069
- return Gs.waitFor(o).next((() => r.apply(t))).next((() => n.Wn.Vn(t, a))).next((() => a));
9069
+ return Gs.waitFor(o).next((() => r.apply(t))).next((() => n.Wn.Vn(t, c))).next((() => c));
9070
9070
  })).then((t => (n.qn = i, t)));
9071
9071
  }
9072
9072
 
@@ -9093,17 +9093,17 @@ i) {
9093
9093
  return n.forEach((t => r = r.add(t))), e.getEntries(t, r).next((t => {
9094
9094
  let r = An();
9095
9095
  return n.forEach(((n, o) => {
9096
- const a = t.get(n), c = (null == i ? void 0 : i.get(n)) || s;
9096
+ const c = t.get(n), a = (null == i ? void 0 : i.get(n)) || s;
9097
9097
  // Note: The order of the steps below is important, since we want
9098
9098
  // to ensure that rejected limbo resolutions (which fabricate
9099
9099
  // NoDocuments with SnapshotVersion.min()) never add documents to
9100
9100
  // cache.
9101
- o.isNoDocument() && o.version.isEqual(ct.min()) ? (
9101
+ o.isNoDocument() && o.version.isEqual(at.min()) ? (
9102
9102
  // NoDocuments with SnapshotVersion.min() are used in manufactured
9103
9103
  // events. We remove these documents from cache since we lost
9104
9104
  // access.
9105
- e.removeEntry(n, c), r = r.insert(n, o)) : !a.isValidDocument() || o.version.compareTo(a.version) > 0 || 0 === o.version.compareTo(a.version) && a.hasPendingWrites ? (e.addEntry(o, c),
9106
- r = r.insert(n, o)) : $("LocalStore", "Ignoring outdated watch update for ", n, ". Current version:", a.version, " Watch version:", o.version);
9105
+ e.removeEntry(n, a), r = r.insert(n, o)) : !c.isValidDocument() || o.version.compareTo(c.version) > 0 || 0 === o.version.compareTo(c.version) && c.hasPendingWrites ? (e.addEntry(o, a),
9106
+ r = r.insert(n, o)) : $("LocalStore", "Ignoring outdated watch update for ", n, ". Current version:", c.version, " Watch version:", o.version);
9107
9107
  })), r;
9108
9108
  }));
9109
9109
  }
@@ -9140,7 +9140,7 @@ function pr(t, e) {
9140
9140
  // This target has been listened to previously, so reuse the
9141
9141
  // previous targetID.
9142
9142
  // TODO(mcg): freshen last accessed date?
9143
- s = i, Gs.resolve(s)) : n.He.allocateTargetId(t).next((i => (s = new ai(e, i, 0 /* Listen */ , t.currentSequenceNumber),
9143
+ s = i, Gs.resolve(s)) : n.He.allocateTargetId(t).next((i => (s = new ci(e, i, 0 /* Listen */ , t.currentSequenceNumber),
9144
9144
  n.He.addTargetData(t, s).next((() => s)))))));
9145
9145
  })).then((t => {
9146
9146
  // If Multi-Tab is enabled, the existing target data may be newer than
@@ -9189,7 +9189,7 @@ async function Tr(t, e, n) {
9189
9189
  * be used to optimize this query execution.
9190
9190
  */ function Er(t, e, n) {
9191
9191
  const s = q(t);
9192
- let i = ct.min(), r = Sn();
9192
+ let i = at.min(), r = Sn();
9193
9193
  return s.persistence.runTransaction("Execute query", "readonly", (t => function(t, e, n) {
9194
9194
  const s = q(t), i = s.Kn.get(n);
9195
9195
  return void 0 !== i ? Gs.resolve(s.qn.get(i)) : s.He.getTargetData(e, n);
@@ -9197,7 +9197,7 @@ async function Tr(t, e, n) {
9197
9197
  if (e) return i = e.lastLimboFreeSnapshotVersion, s.He.getMatchingKeysForTargetId(t, e.targetId).next((t => {
9198
9198
  r = t;
9199
9199
  }));
9200
- })).next((() => s.Un.getDocumentsMatchingQuery(t, e, n ? i : ct.min(), n ? r : Sn()))).next((t => ({
9200
+ })).next((() => s.Un.getDocumentsMatchingQuery(t, e, n ? i : at.min(), n ? r : Sn()))).next((t => ({
9201
9201
  documents: t,
9202
9202
  zn: r
9203
9203
  })))));
@@ -9221,10 +9221,10 @@ function Ar(t) {
9221
9221
  return e.persistence.runTransaction("Get new document changes", "readonly", (t => function(t, e, n) {
9222
9222
  const s = q(t);
9223
9223
  let i = An(), r = li(n);
9224
- const o = Xi(e), a = IDBKeyRange.lowerBound(r, !0);
9224
+ const o = Xi(e), c = IDBKeyRange.lowerBound(r, !0);
9225
9225
  return o.jt({
9226
9226
  index: $s.readTimeIndex,
9227
- range: a
9227
+ range: c
9228
9228
  }, ((t, e) => {
9229
9229
  // Unlike `getEntry()` and others, `getNewDocumentChanges()` parses
9230
9230
  // the documents directly since we want to keep sentinel deletes.
@@ -9254,7 +9254,7 @@ async function Rr(t) {
9254
9254
  return e.persistence.runTransaction("Synchronize last document change read time", "readonly", (t => function(t) {
9255
9255
  const e = Xi(t);
9256
9256
  // If there are no existing entries, we return SnapshotVersion.min().
9257
- let n = ct.min();
9257
+ let n = at.min();
9258
9258
  return e.jt({
9259
9259
  index: $s.readTimeIndex,
9260
9260
  reverse: !0
@@ -9281,12 +9281,12 @@ async function Rr(t) {
9281
9281
  */
9282
9282
  async function Pr(t, e, n, s) {
9283
9283
  const i = q(t);
9284
- let r = Sn(), o = An(), a = vn();
9284
+ let r = Sn(), o = An(), c = vn();
9285
9285
  for (const t of n) {
9286
9286
  const n = e.Hn(t.metadata.name);
9287
- t.document && (r = r.add(n)), o = o.insert(n, e.Jn(t)), a = a.insert(n, e.Yn(t.metadata.readTime));
9287
+ t.document && (r = r.add(n)), o = o.insert(n, e.Jn(t)), c = c.insert(n, e.Yn(t.metadata.readTime));
9288
9288
  }
9289
- const c = i.Qn.newChangeBuffer({
9289
+ const a = i.Qn.newChangeBuffer({
9290
9290
  trackRemovals: !0
9291
9291
  }), u = await pr(i, function(t) {
9292
9292
  // It is OK that the path used for the query is not valid, because this will
@@ -9295,7 +9295,7 @@ async function Pr(t, e, n, s) {
9295
9295
  }(s));
9296
9296
  // Allocates a target to hold all document keys from the bundle, such that
9297
9297
  // they will not get garbage collected right away.
9298
- return i.persistence.runTransaction("Apply bundle documents", "readwrite", (t => gr(t, c, o, ct.min(), a).next((e => (c.apply(t),
9298
+ return i.persistence.runTransaction("Apply bundle documents", "readwrite", (t => gr(t, a, o, at.min(), c).next((e => (a.apply(t),
9299
9299
  e))).next((e => i.He.removeMatchingKeysForTargetId(t, u.targetId).next((() => i.He.addMatchingKeys(t, r, u.targetId))).next((() => i.Wn.Vn(t, e))).next((() => e))))));
9300
9300
  }
9301
9301
 
@@ -9771,7 +9771,7 @@ class Nr extends zi {
9771
9771
  */
9772
9772
  this.Is = new Gi((t => Ht(t)), Yt),
9773
9773
  /** The last received snapshot version. */
9774
- this.lastRemoteSnapshotVersion = ct.min(),
9774
+ this.lastRemoteSnapshotVersion = at.min(),
9775
9775
  /** The highest numbered target ID encountered. */
9776
9776
  this.highestTargetId = 0,
9777
9777
  /** The highest sequence number encountered. */
@@ -9798,16 +9798,16 @@ class Nr extends zi {
9798
9798
  return n && (this.lastRemoteSnapshotVersion = n), e > this.As && (this.As = e),
9799
9799
  Gs.resolve();
9800
9800
  }
9801
- ce(t) {
9801
+ ae(t) {
9802
9802
  this.Is.set(t.target, t);
9803
9803
  const e = t.targetId;
9804
9804
  e > this.highestTargetId && (this.Ps = new $i(e), this.highestTargetId = e), t.sequenceNumber > this.As && (this.As = t.sequenceNumber);
9805
9805
  }
9806
9806
  addTargetData(t, e) {
9807
- return this.ce(e), this.targetCount += 1, Gs.resolve();
9807
+ return this.ae(e), this.targetCount += 1, Gs.resolve();
9808
9808
  }
9809
9809
  updateTargetData(t, e) {
9810
- return this.ce(e), Gs.resolve();
9810
+ return this.ae(e), Gs.resolve();
9811
9811
  }
9812
9812
  removeTargetData(t, e) {
9813
9813
  return this.Is.delete(e.target), this.Rs.us(e.targetId), this.targetCount -= 1,
@@ -9882,7 +9882,7 @@ class xr {
9882
9882
  this.He = new kr(this);
9883
9883
  this.Jt = new Ii, this.Je = function(t, e) {
9884
9884
  return new Cr(t, e);
9885
- }(this.Jt, (t => this.referenceDelegate.vs(t))), this.k = new ci(e), this.Ye = new vr(this.k);
9885
+ }(this.Jt, (t => this.referenceDelegate.vs(t))), this.k = new ai(e), this.Ye = new vr(this.k);
9886
9886
  }
9887
9887
  start() {
9888
9888
  return Promise.resolve();
@@ -10324,7 +10324,7 @@ class jr {
10324
10324
  this.oi(t);
10325
10325
  }
10326
10326
  notifyBundleLoaded() {
10327
- this.ai();
10327
+ this.ci();
10328
10328
  }
10329
10329
  shutdown() {
10330
10330
  this.started && (this.window.removeEventListener("storage", this.Us), this.removeItem(this.Qs),
@@ -10350,7 +10350,7 @@ class jr {
10350
10350
  if (this.started) {
10351
10351
  if (null !== e.key) if (this.Gs.test(e.key)) {
10352
10352
  if (null == e.newValue) {
10353
- const t = this.ci(e.key);
10353
+ const t = this.ai(e.key);
10354
10354
  return this.ui(t, null);
10355
10355
  }
10356
10356
  {
@@ -10419,13 +10419,13 @@ class jr {
10419
10419
  const s = Lr(this.persistenceKey, t), i = new Ur(t, e, n);
10420
10420
  this.setItem(s, i.Os());
10421
10421
  }
10422
- ai() {
10422
+ ci() {
10423
10423
  this.setItem(this.Ys, "value-not-used");
10424
10424
  }
10425
10425
  /**
10426
10426
  * Parses a client state key in WebStorage. Returns null if the key does not
10427
10427
  * match the expected key format.
10428
- */ ci(t) {
10428
+ */ ai(t) {
10429
10429
  const e = this.Gs.exec(t);
10430
10430
  return e ? e[1] : null;
10431
10431
  }
@@ -10433,7 +10433,7 @@ class jr {
10433
10433
  * Parses a client state in WebStorage. Returns 'null' if the value could not
10434
10434
  * be parsed.
10435
10435
  */ hi(t, e) {
10436
- const n = this.ci(t);
10436
+ const n = this.ai(t);
10437
10437
  return qr.Fs(n, e);
10438
10438
  }
10439
10439
  /**
@@ -10789,8 +10789,8 @@ class {
10789
10789
  $("Connection", 'RPC "' + t + '" completed.');
10790
10790
  }
10791
10791
  }));
10792
- const a = JSON.stringify(s);
10793
- o.send(e, "POST", a, n, 15);
10792
+ const c = JSON.stringify(s);
10793
+ o.send(e, "POST", c, n, 15);
10794
10794
  }));
10795
10795
  }
10796
10796
  Qi(t, e, n) {
@@ -10835,9 +10835,9 @@ class {
10835
10835
  // known to (sometimes) not include an Origin. See
10836
10836
  // https://github.com/firebase/firebase-js-sdk/issues/1491.
10837
10837
  isMobileCordova() || isReactNative() || isElectron() || isIE() || isUWP() || isBrowserExtension() || (o.httpHeadersOverwriteParam = "$httpHeaders");
10838
- const a = s.join("");
10839
- $("Connection", "Creating WebChannel: " + a, o);
10840
- const c = i.createWebChannel(a, o);
10838
+ const c = s.join("");
10839
+ $("Connection", "Creating WebChannel: " + c, o);
10840
+ const a = i.createWebChannel(c, o);
10841
10841
  // WebChannel supports sending the first message with the handshake - saving
10842
10842
  // a network round trip. However, it will have to call send in the same
10843
10843
  // JS event loop as open. In order to enforce this, we delay actually
@@ -10850,9 +10850,9 @@ class {
10850
10850
  const g = new Jr({
10851
10851
  Vi: t => {
10852
10852
  h ? $("Connection", "Not sending because WebChannel is closed:", t) : (u || ($("Connection", "Opening WebChannel transport."),
10853
- c.open(), u = !0), $("Connection", "WebChannel sending:", t), c.send(t));
10853
+ a.open(), u = !0), $("Connection", "WebChannel sending:", t), a.send(t));
10854
10854
  },
10855
- Si: () => c.close()
10855
+ Si: () => a.close()
10856
10856
  }), y = (t, e, n) => {
10857
10857
  // TODO(dimond): closure typing seems broken because WebChannel does
10858
10858
  // not implement goog.events.Listenable
@@ -10870,13 +10870,13 @@ class {
10870
10870
  // exception and rethrow using a setTimeout so they become visible again.
10871
10871
  // Note that eventually this function could go away if we are confident
10872
10872
  // enough the code is exception free.
10873
- return y(c, WebChannel.EventType.OPEN, (() => {
10873
+ return y(a, WebChannel.EventType.OPEN, (() => {
10874
10874
  h || $("Connection", "WebChannel transport opened.");
10875
- })), y(c, WebChannel.EventType.CLOSE, (() => {
10875
+ })), y(a, WebChannel.EventType.CLOSE, (() => {
10876
10876
  h || (h = !0, $("Connection", "WebChannel transport closed"), g.Fi());
10877
- })), y(c, WebChannel.EventType.ERROR, (t => {
10877
+ })), y(a, WebChannel.EventType.ERROR, (t => {
10878
10878
  h || (h = !0, O("Connection", "WebChannel transport errored:", t), g.Fi(new j(K.UNAVAILABLE, "The operation could not be completed")));
10879
- })), y(c, WebChannel.EventType.MESSAGE, (t => {
10879
+ })), y(a, WebChannel.EventType.MESSAGE, (t => {
10880
10880
  var e;
10881
10881
  if (!h) {
10882
10882
  const n = t.data[0];
@@ -10906,7 +10906,7 @@ class {
10906
10906
  }(t), n = i.message;
10907
10907
  void 0 === e && (e = K.INTERNAL, n = "Unknown error status: " + t + " with message " + i.message),
10908
10908
  // Mark closed so no further events are propagated
10909
- h = !0, g.Fi(new j(e, n)), c.close();
10909
+ h = !0, g.Fi(new j(e, n)), a.close();
10910
10910
  } else $("Connection", "WebChannel received:", n), g.Oi(n);
10911
10911
  }
10912
10912
  })), y(r, Event.STAT_EVENT, (t => {
@@ -11121,15 +11121,15 @@ class eo {
11121
11121
  * ListenerType: The type of the listener that will be used for callbacks
11122
11122
  */
11123
11123
  class no {
11124
- constructor(t, e, n, s, i, r, o, a) {
11124
+ constructor(t, e, n, s, i, r, o, c) {
11125
11125
  this.Oe = t, this.nr = n, this.sr = s, this.ir = i, this.authCredentialsProvider = r,
11126
- this.appCheckCredentialsProvider = o, this.listener = a, this.state = 0 /* Initial */ ,
11126
+ this.appCheckCredentialsProvider = o, this.listener = c, this.state = 0 /* Initial */ ,
11127
11127
  /**
11128
11128
  * A close count that's incremented every time the stream is closed; used by
11129
11129
  * getCloseGuardedDispatcher() to invalidate callbacks that happen after
11130
11130
  * close.
11131
11131
  */
11132
- this.rr = 0, this.ar = null, this.cr = null, this.stream = null, this.ur = new eo(t, e);
11132
+ this.rr = 0, this.cr = null, this.ar = null, this.stream = null, this.ur = new eo(t, e);
11133
11133
  }
11134
11134
  /**
11135
11135
  * Returns true if start() has been called and no error has occurred. True
@@ -11185,7 +11185,7 @@ class no {
11185
11185
  */ _r() {
11186
11186
  // Starts the idle time if we are in state 'Open' and are not yet already
11187
11187
  // running a timer (in which case the previous idle timeout still applies).
11188
- this.lr() && null === this.ar && (this.ar = this.Oe.enqueueAfterDelay(this.nr, 6e4, (() => this.mr())));
11188
+ this.lr() && null === this.cr && (this.cr = this.Oe.enqueueAfterDelay(this.nr, 6e4, (() => this.mr())));
11189
11189
  }
11190
11190
  /** Sends a message to the underlying stream. */ gr(t) {
11191
11191
  this.yr(), this.stream.send(t);
@@ -11197,10 +11197,10 @@ class no {
11197
11197
  return this.close(0 /* Initial */);
11198
11198
  }
11199
11199
  /** Marks the stream as active again. */ yr() {
11200
- this.ar && (this.ar.cancel(), this.ar = null);
11200
+ this.cr && (this.cr.cancel(), this.cr = null);
11201
11201
  }
11202
11202
  /** Cancels the health check delayed operation. */ pr() {
11203
- this.cr && (this.cr.cancel(), this.cr = null);
11203
+ this.ar && (this.ar.cancel(), this.ar = null);
11204
11204
  }
11205
11205
  /**
11206
11206
  * Closes the stream and cleans up as necessary:
@@ -11268,7 +11268,7 @@ class no {
11268
11268
  Ir(t, e) {
11269
11269
  const n = this.Er(this.rr);
11270
11270
  this.stream = this.Rr(t, e), this.stream.Di((() => {
11271
- n((() => (this.state = 2 /* Open */ , this.cr = this.Oe.enqueueAfterDelay(this.sr, 1e4, (() => (this.lr() && (this.state = 3 /* Healthy */),
11271
+ n((() => (this.state = 2 /* Open */ , this.ar = this.Oe.enqueueAfterDelay(this.sr, 1e4, (() => (this.lr() && (this.state = 3 /* Healthy */),
11272
11272
  Promise.resolve()))), this.listener.Di())));
11273
11273
  })), this.stream.Ni((t => {
11274
11274
  n((() => this.Ar(t)));
@@ -11323,9 +11323,9 @@ class no {
11323
11323
  // We have only reached a consistent snapshot for the entire stream if there
11324
11324
  // is a read_time set and it applies to all targets (i.e. the list of
11325
11325
  // targets is empty). The backend is guaranteed to send such responses.
11326
- if (!("targetChange" in t)) return ct.min();
11326
+ if (!("targetChange" in t)) return at.min();
11327
11327
  const e = t.targetChange;
11328
- return e.targetIds && e.targetIds.length ? ct.min() : e.readTime ? Gn(e.readTime) : ct.min();
11328
+ return e.targetIds && e.targetIds.length ? at.min() : e.readTime ? Gn(e.readTime) : at.min();
11329
11329
  }(t);
11330
11330
  return this.listener.Pr(e, n);
11331
11331
  }
@@ -11343,7 +11343,7 @@ class no {
11343
11343
  documents: us(t, s)
11344
11344
  } : {
11345
11345
  query: hs(t, s)
11346
- }, n.targetId = e.targetId, e.resumeToken.approximateByteSize() > 0 ? n.resumeToken = Qn(t, e.resumeToken) : e.snapshotVersion.compareTo(ct.min()) > 0 && (
11346
+ }, n.targetId = e.targetId, e.resumeToken.approximateByteSize() > 0 ? n.resumeToken = Qn(t, e.resumeToken) : e.snapshotVersion.compareTo(at.min()) > 0 && (
11347
11347
  // TODO(wuandy): Consider removing above check because it is most likely true.
11348
11348
  // Right now, many tests depend on this behaviour though (leaving min() out
11349
11349
  // of serialization).
@@ -11406,7 +11406,7 @@ class no {
11406
11406
  // Note, that we could consider a successful handshake healthy, however,
11407
11407
  // the write itself might be causing an error we want to back off from.
11408
11408
  this.ur.reset();
11409
- const e = cs(t.writeResults, t.commitTime), n = Gn(t.commitTime);
11409
+ const e = as(t.writeResults, t.commitTime), n = Gn(t.commitTime);
11410
11410
  return this.listener.Cr(n, e);
11411
11411
  }
11412
11412
  // The first response is always the handshake response
@@ -11578,7 +11578,7 @@ class oo {
11578
11578
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11579
11579
  * See the License for the specific language governing permissions and
11580
11580
  * limitations under the License.
11581
- */ class ao {
11581
+ */ class co {
11582
11582
  constructor(
11583
11583
  /**
11584
11584
  * The local store, used to fill the write pipeline with outbound mutations.
@@ -11636,14 +11636,14 @@ class oo {
11636
11636
  await async function(t) {
11637
11637
  const e = q(t);
11638
11638
  e.Gr.add(4 /* ConnectivityChange */), await uo(e), e.Jr.set("Unknown" /* Unknown */),
11639
- e.Gr.delete(4 /* ConnectivityChange */), await co(e);
11639
+ e.Gr.delete(4 /* ConnectivityChange */), await ao(e);
11640
11640
  }(this));
11641
11641
  }));
11642
11642
  })), this.Jr = new oo(n, s);
11643
11643
  }
11644
11644
  }
11645
11645
 
11646
- async function co(t) {
11646
+ async function ao(t) {
11647
11647
  if (go(t)) for (const e of t.zr) await e(/* enabled= */ !0);
11648
11648
  }
11649
11649
 
@@ -11759,7 +11759,7 @@ async function Eo(t, e, n) {
11759
11759
  $("RemoteStore", "Failed to remove targets %s: %s ", e.targetIds.join(","), n),
11760
11760
  await Io(t, n);
11761
11761
  } else if (e instanceof xn ? t.Yr.ot(e) : e instanceof $n ? t.Yr.dt(e) : t.Yr.ut(e),
11762
- !n.isEqual(ct.min())) try {
11762
+ !n.isEqual(at.min())) try {
11763
11763
  const e = await _r(t.localStore);
11764
11764
  n.compareTo(e) >= 0 &&
11765
11765
  // We have received a target change with a global snapshot if the snapshot
@@ -11798,7 +11798,7 @@ async function Eo(t, e, n) {
11798
11798
  // mismatch, but don't actually retain that in listenTargets. This ensures
11799
11799
  // that we flag the first re-listen this way without impacting future
11800
11800
  // listens of this target (that might happen e.g. on reconnect).
11801
- const s = new ai(n.target, e, 1 /* ExistenceFilterMismatch */ , n.sequenceNumber);
11801
+ const s = new ci(n.target, e, 1 /* ExistenceFilterMismatch */ , n.sequenceNumber);
11802
11802
  fo(t, s);
11803
11803
  })), t.remoteSyncer.applyRemoteEvent(n);
11804
11804
  }(t, n);
@@ -11827,7 +11827,7 @@ async function Eo(t, e, n) {
11827
11827
  // Probe IndexedDB periodically and re-enable network
11828
11828
  t.asyncQueue.enqueueRetryable((async () => {
11829
11829
  $("RemoteStore", "Retrying IndexedDB access"), await n(), t.Gr.delete(1 /* IndexedDbFailed */),
11830
- await co(t);
11830
+ await ao(t);
11831
11831
  }));
11832
11832
  }
11833
11833
 
@@ -11928,7 +11928,7 @@ async function No(t, e) {
11928
11928
  */
11929
11929
  async function ko(t, e) {
11930
11930
  const n = q(t);
11931
- e ? (n.Gr.delete(2 /* IsSecondary */), await co(n)) : e || (n.Gr.add(2 /* IsSecondary */),
11931
+ e ? (n.Gr.delete(2 /* IsSecondary */), await ao(n)) : e || (n.Gr.add(2 /* IsSecondary */),
11932
11932
  await uo(n), n.Jr.set("Unknown" /* Unknown */));
11933
11933
  }
11934
11934
 
@@ -12244,9 +12244,9 @@ class Fo {
12244
12244
  }
12245
12245
 
12246
12246
  class Bo {
12247
- constructor(t, e, n, s, i, r, o, a) {
12247
+ constructor(t, e, n, s, i, r, o, c) {
12248
12248
  this.query = t, this.docs = e, this.oldDocs = n, this.docChanges = s, this.mutatedKeys = i,
12249
- this.fromCache = r, this.syncStateChanged = o, this.excludesMetadataChanges = a;
12249
+ this.fromCache = r, this.syncStateChanged = o, this.excludesMetadataChanges = c;
12250
12250
  }
12251
12251
  /** Returns a view snapshot as if all documents in the snapshot were added. */ static fromInitialDocuments(t, e, n, s) {
12252
12252
  const i = [];
@@ -12365,12 +12365,12 @@ function Go(t) {
12365
12365
  * It uses an Observer to dispatch events.
12366
12366
  */ class zo {
12367
12367
  constructor(t, e, n) {
12368
- this.query = t, this.ao = e,
12368
+ this.query = t, this.co = e,
12369
12369
  /**
12370
12370
  * Initial snapshots (e.g. from cache) may not be propagated to the wrapped
12371
12371
  * observer. This flag is set to true once we've actually raised an event.
12372
12372
  */
12373
- this.co = !1, this.uo = null, this.onlineState = "Unknown" /* Unknown */ , this.options = n || {};
12373
+ this.ao = !1, this.uo = null, this.onlineState = "Unknown" /* Unknown */ , this.options = n || {};
12374
12374
  }
12375
12375
  /**
12376
12376
  * Applies the new ViewSnapshot to this listener, raising a user-facing event
@@ -12386,16 +12386,16 @@ function Go(t) {
12386
12386
  /* excludesMetadataChanges= */ !0);
12387
12387
  }
12388
12388
  let e = !1;
12389
- return this.co ? this.ho(t) && (this.ao.next(t), e = !0) : this.lo(t, this.onlineState) && (this.fo(t),
12389
+ return this.ao ? this.ho(t) && (this.co.next(t), e = !0) : this.lo(t, this.onlineState) && (this.fo(t),
12390
12390
  e = !0), this.uo = t, e;
12391
12391
  }
12392
12392
  onError(t) {
12393
- this.ao.error(t);
12393
+ this.co.error(t);
12394
12394
  }
12395
12395
  /** Returns whether a snapshot was raised. */ ro(t) {
12396
12396
  this.onlineState = t;
12397
12397
  let e = !1;
12398
- return this.uo && !this.co && this.lo(this.uo, t) && (this.fo(this.uo), e = !0),
12398
+ return this.uo && !this.ao && this.lo(this.uo, t) && (this.fo(this.uo), e = !0),
12399
12399
  e;
12400
12400
  }
12401
12401
  lo(t, e) {
@@ -12422,8 +12422,8 @@ function Go(t) {
12422
12422
  // stripped out.
12423
12423
  }
12424
12424
  fo(t) {
12425
- t = Bo.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.co = !0,
12426
- this.ao.next(t);
12425
+ t = Bo.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.ao = !0,
12426
+ this.co.next(t);
12427
12427
  }
12428
12428
  }
12429
12429
 
@@ -12533,7 +12533,7 @@ function Go(t) {
12533
12533
  */ async complete() {
12534
12534
  const t = await Pr(this.localStore, new Jo(this.k), this.documents, this.mo.id), e = this.po(this.documents);
12535
12535
  for (const t of this.queries) await br(this.localStore, t, e.get(t.name));
12536
- return this.progress.taskState = "Success", new ar(Object.assign({}, this.progress), t);
12536
+ return this.progress.taskState = "Success", new cr(Object.assign({}, this.progress), t);
12537
12537
  }
12538
12538
  }
12539
12539
 
@@ -12576,7 +12576,7 @@ class Zo {
12576
12576
  }
12577
12577
  }
12578
12578
 
12579
- class ta {
12579
+ class tc {
12580
12580
  constructor(t) {
12581
12581
  this.key = t;
12582
12582
  }
@@ -12586,7 +12586,7 @@ class ta {
12586
12586
  * View is responsible for computing the final merged truth of what docs are in
12587
12587
  * a query. It gets notified of local and remote changes to docs, and applies
12588
12588
  * the query filters and limits to determine the most correct possible results.
12589
- */ class ea {
12589
+ */ class ec {
12590
12590
  constructor(t,
12591
12591
  /** Documents included in the remote target */
12592
12592
  e) {
@@ -12629,7 +12629,7 @@ class ta {
12629
12629
  // deletes. So we keep this doc at the old limit to compare the updates to.
12630
12630
  // Note that this should never get used in a refill (when previousChanges is
12631
12631
  // set), because there will only be adds -- no deletes or updates.
12632
- const a = ye(this.query) && s.size === this.query.limit ? s.last() : null, c = pe(this.query) && s.size === this.query.limit ? s.first() : null;
12632
+ const c = ye(this.query) && s.size === this.query.limit ? s.last() : null, a = pe(this.query) && s.size === this.query.limit ? s.first() : null;
12633
12633
  // Drop documents out to meet limit/limitToLast requirement.
12634
12634
  if (t.inorderTraversal(((t, e) => {
12635
12635
  const u = s.get(t), h = Se(this.query, e) ? e : null, l = !!u && this.mutatedKeys.has(u.key), f = !!h && (h.hasLocalMutations ||
@@ -12645,7 +12645,7 @@ class ta {
12645
12645
  }), d = !0) : this.Vo(u, h) || (n.track({
12646
12646
  type: 2 /* Modified */ ,
12647
12647
  doc: h
12648
- }), d = !0, (a && this.Ao(h, a) > 0 || c && this.Ao(h, c) < 0) && (
12648
+ }), d = !0, (c && this.Ao(h, c) > 0 || a && this.Ao(h, a) < 0) && (
12649
12649
  // This doc moved from inside the limit to outside the limit.
12650
12650
  // That means there may be some other doc in the local cache
12651
12651
  // that should be included instead.
@@ -12656,7 +12656,7 @@ class ta {
12656
12656
  }), d = !0) : u && !h && (n.track({
12657
12657
  type: 1 /* Removed */ ,
12658
12658
  doc: u
12659
- }), d = !0, (a || c) && (
12659
+ }), d = !0, (c || a) && (
12660
12660
  // A doc was removed from a full limit query. We'll need to
12661
12661
  // requery from the local cache to see if we know about some other
12662
12662
  // doc that should be in the results.
@@ -12740,10 +12740,10 @@ class ta {
12740
12740
  * See the License for the specific language governing permissions and
12741
12741
  * limitations under the License.
12742
12742
  */ (t.type, e.type) || this.Ao(t.doc, e.doc))), this.So(n);
12743
- const r = e ? this.Do() : [], o = 0 === this.Io.size && this.current ? 1 /* Synced */ : 0 /* Local */ , a = o !== this.Eo;
12744
- if (this.Eo = o, 0 !== i.length || a) {
12743
+ const r = e ? this.Do() : [], o = 0 === this.Io.size && this.current ? 1 /* Synced */ : 0 /* Local */ , c = o !== this.Eo;
12744
+ if (this.Eo = o, 0 !== i.length || c) {
12745
12745
  return {
12746
- snapshot: new Bo(this.query, t.Ro, s, i, t.mutatedKeys, 0 /* Local */ === o, a,
12746
+ snapshot: new Bo(this.query, t.Ro, s, i, t.mutatedKeys, 0 /* Local */ === o, c,
12747
12747
  /* excludesMetadataChanges= */ !1),
12748
12748
  Co: r
12749
12749
  };
@@ -12799,7 +12799,7 @@ class ta {
12799
12799
  // Diff the new limbo docs with the old limbo docs.
12800
12800
  const e = [];
12801
12801
  return t.forEach((t => {
12802
- this.Io.has(t) || e.push(new ta(t));
12802
+ this.Io.has(t) || e.push(new tc(t));
12803
12803
  })), this.Io.forEach((n => {
12804
12804
  t.has(n) || e.push(new Zo(n));
12805
12805
  })), e;
@@ -12844,7 +12844,7 @@ class ta {
12844
12844
  * QueryView contains all of the data that SyncEngine needs to keep track of for
12845
12845
  * a particular query.
12846
12846
  */
12847
- class na {
12847
+ class nc {
12848
12848
  constructor(
12849
12849
  /**
12850
12850
  * The query itself.
@@ -12866,7 +12866,7 @@ class na {
12866
12866
  }
12867
12867
  }
12868
12868
 
12869
- /** Tracks a limbo resolution. */ class sa {
12869
+ /** Tracks a limbo resolution. */ class sc {
12870
12870
  constructor(t) {
12871
12871
  this.key = t,
12872
12872
  /**
@@ -12891,7 +12891,7 @@ class na {
12891
12891
  * the class is not exported so they are only accessible from this module.
12892
12892
  * This is useful to implement optional features (like bundles) in free
12893
12893
  * functions, such that they are tree-shakeable.
12894
- */ class ia {
12894
+ */ class ic {
12895
12895
  constructor(t, e, n,
12896
12896
  // PORTING NOTE: Manages state synchronization in multi-tab environments.
12897
12897
  s, i, r) {
@@ -12937,8 +12937,8 @@ class na {
12937
12937
  * server. All the subsequent view snapshots or errors are sent to the
12938
12938
  * subscribed handlers. Returns the initial snapshot.
12939
12939
  */
12940
- async function ra(t, e) {
12941
- const n = xa(t);
12940
+ async function rc(t, e) {
12941
+ const n = xc(t);
12942
12942
  let s, i;
12943
12943
  const r = n.Oo.get(e);
12944
12944
  if (r)
@@ -12950,7 +12950,7 @@ async function ra(t, e) {
12950
12950
  // case and calls `listen` to obtain this ID.
12951
12951
  s = r.targetId, n.sharedClientState.addLocalQueryTarget(s), i = r.view.xo(); else {
12952
12952
  const t = await pr(n.localStore, Re(e)), r = n.sharedClientState.addLocalQueryTarget(t.targetId);
12953
- s = t.targetId, i = await oa(n, e, s, "current" === r), n.isPrimaryClient && ho(n.remoteStore, t);
12953
+ s = t.targetId, i = await oc(n, e, s, "current" === r), n.isPrimaryClient && ho(n.remoteStore, t);
12954
12954
  }
12955
12955
  return i;
12956
12956
  }
@@ -12958,7 +12958,7 @@ async function ra(t, e) {
12958
12958
  /**
12959
12959
  * Registers a view for a previously unknown query and computes its initial
12960
12960
  * snapshot.
12961
- */ async function oa(t, e, n, s) {
12961
+ */ async function oc(t, e, n, s) {
12962
12962
  // PORTING NOTE: On Web only, we inject the code that registers new Limbo
12963
12963
  // targets based on view changes. This allows us to only depend on Limbo
12964
12964
  // changes when user code includes queries.
@@ -12972,17 +12972,17 @@ async function ra(t, e) {
12972
12972
  /* usePreviousResults= */ !1).then((({documents: t}) => e.view.bo(t, i))));
12973
12973
  const r = s && s.targetChanges.get(e.targetId), o = e.view.applyChanges(i,
12974
12974
  /* updateLimboDocuments= */ t.isPrimaryClient, r);
12975
- return pa(t, e.targetId, o.Co), o.snapshot;
12975
+ return pc(t, e.targetId, o.Co), o.snapshot;
12976
12976
  }(t, e, n, s);
12977
12977
  const i = await Er(t.localStore, e,
12978
- /* usePreviousResults= */ !0), r = new ea(e, i.zn), o = r.bo(i.documents), a = kn.createSynthesizedTargetChangeForCurrentChange(n, s && "Offline" /* Offline */ !== t.onlineState), c = r.applyChanges(o,
12979
- /* updateLimboDocuments= */ t.isPrimaryClient, a);
12980
- pa(t, n, c.Co);
12981
- const u = new na(e, n, r);
12982
- return t.Oo.set(e, u), t.Mo.has(n) ? t.Mo.get(n).push(e) : t.Mo.set(n, [ e ]), c.snapshot;
12978
+ /* usePreviousResults= */ !0), r = new ec(e, i.zn), o = r.bo(i.documents), c = kn.createSynthesizedTargetChangeForCurrentChange(n, s && "Offline" /* Offline */ !== t.onlineState), a = r.applyChanges(o,
12979
+ /* updateLimboDocuments= */ t.isPrimaryClient, c);
12980
+ pc(t, n, a.Co);
12981
+ const u = new nc(e, n, r);
12982
+ return t.Oo.set(e, u), t.Mo.has(n) ? t.Mo.get(n).push(e) : t.Mo.set(n, [ e ]), a.snapshot;
12983
12983
  }
12984
12984
 
12985
- /** Stops listening to the query. */ async function aa(t, e) {
12985
+ /** Stops listening to the query. */ async function cc(t, e) {
12986
12986
  const n = q(t), s = n.Oo.get(e), i = n.Mo.get(s.targetId);
12987
12987
  if (i.length > 1) return n.Mo.set(s.targetId, i.filter((t => !be(t, e)))), void n.Oo.delete(e);
12988
12988
  // No other queries are mapped to the target, clean up the query and the target.
@@ -12993,9 +12993,9 @@ async function ra(t, e) {
12993
12993
  n.sharedClientState.isActiveQueryTarget(s.targetId) || await Tr(n.localStore, s.targetId,
12994
12994
  /*keepPersistedTargetData=*/ !1).then((() => {
12995
12995
  n.sharedClientState.clearQueryState(s.targetId), lo(n.remoteStore, s.targetId),
12996
- ga(n, s.targetId);
12996
+ gc(n, s.targetId);
12997
12997
  })).catch(Bi);
12998
- } else ga(n, s.targetId), await Tr(n.localStore, s.targetId,
12998
+ } else gc(n, s.targetId), await Tr(n.localStore, s.targetId,
12999
12999
  /*keepPersistedTargetData=*/ !0);
13000
13000
  }
13001
13001
 
@@ -13008,11 +13008,11 @@ async function ra(t, e) {
13008
13008
  * have completed, *not* when the write was acked by the backend. The
13009
13009
  * userCallback is resolved once the write was acked/rejected by the
13010
13010
  * backend (or failed locally for any other reason).
13011
- */ async function ca(t, e, n) {
13012
- const s = $a(t);
13011
+ */ async function ac(t, e, n) {
13012
+ const s = $c(t);
13013
13013
  try {
13014
13014
  const t = await function(t, e) {
13015
- const n = q(t), s = at.now(), i = e.reduce(((t, e) => t.add(e.key)), Sn());
13015
+ const n = q(t), s = ct.now(), i = e.reduce(((t, e) => t.add(e.key)), Sn());
13016
13016
  let r;
13017
13017
  return n.persistence.runTransaction("Locally write mutations", "readwrite", (t => n.Wn.vn(t, i).next((i => {
13018
13018
  r = i;
@@ -13044,7 +13044,7 @@ async function ra(t, e) {
13044
13044
  /**
13045
13045
  * Resolves or rejects the user callback for the given batch and then discards
13046
13046
  * it.
13047
- */ (s, t.batchId, n), await Ia(s, t.changes), await Ro(s.remoteStore);
13047
+ */ (s, t.batchId, n), await Ic(s, t.changes), await Ro(s.remoteStore);
13048
13048
  } catch (t) {
13049
13049
  // If we can't persist the mutation, we reject the user callback and
13050
13050
  // don't send the mutation. The user can then retry the write.
@@ -13057,7 +13057,7 @@ async function ra(t, e) {
13057
13057
  * Applies one remote event to the sync engine, notifying any views of the
13058
13058
  * changes, and releasing any pending mutation batches that would become
13059
13059
  * visible because of the snapshot version the remote event contains.
13060
- */ async function ua(t, e) {
13060
+ */ async function uc(t, e) {
13061
13061
  const n = q(t);
13062
13062
  try {
13063
13063
  const t = await mr(n.localStore, e);
@@ -13070,7 +13070,7 @@ async function ra(t, e) {
13070
13070
  B(t.addedDocuments.size + t.modifiedDocuments.size + t.removedDocuments.size <= 1),
13071
13071
  t.addedDocuments.size > 0 ? s.$o = !0 : t.modifiedDocuments.size > 0 ? B(s.$o) : t.removedDocuments.size > 0 && (B(s.$o),
13072
13072
  s.$o = !1));
13073
- })), await Ia(n, t, e);
13073
+ })), await Ic(n, t, e);
13074
13074
  } catch (t) {
13075
13075
  await Bi(t);
13076
13076
  }
@@ -13079,7 +13079,7 @@ async function ra(t, e) {
13079
13079
  /**
13080
13080
  * Applies an OnlineState change to the sync engine and notifies any views of
13081
13081
  * the change.
13082
- */ function ha(t, e, n) {
13082
+ */ function hc(t, e, n) {
13083
13083
  const s = q(t);
13084
13084
  // If we are the secondary client, we explicitly ignore the remote store's
13085
13085
  // online state (the local client may go offline, even though the primary
@@ -13113,7 +13113,7 @@ async function ra(t, e) {
13113
13113
  * @param err - A description of the condition that has forced the rejection.
13114
13114
  * Nearly always this will be an indication that the user is no longer
13115
13115
  * authorized to see the data matching the target.
13116
- */ async function la(t, e, n) {
13116
+ */ async function lc(t, e, n) {
13117
13117
  const s = q(t);
13118
13118
  // PORTING NOTE: Multi-tab only.
13119
13119
  s.sharedClientState.updateQueryState(e, "rejected", n);
@@ -13126,22 +13126,22 @@ async function ra(t, e) {
13126
13126
  // store to purge a document. However, it would be tricky to keep all of
13127
13127
  // the local store's invariants with another method.
13128
13128
  let t = new gn(St.comparator);
13129
- t = t.insert(r, Wt.newNoDocument(r, ct.min()));
13130
- const n = Sn().add(r), i = new Nn(ct.min(),
13129
+ t = t.insert(r, Wt.newNoDocument(r, at.min()));
13130
+ const n = Sn().add(r), i = new Nn(at.min(),
13131
13131
  /* targetChanges= */ new Map,
13132
13132
  /* targetMismatches= */ new Tn(it), t, n);
13133
- await ua(s, i),
13133
+ await uc(s, i),
13134
13134
  // Since this query failed, we won't want to manually unlisten to it.
13135
13135
  // We only remove it from bookkeeping after we successfully applied the
13136
13136
  // RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to
13137
13137
  // this query when the RemoteStore restarts the Watch stream, which should
13138
13138
  // re-trigger the target failure.
13139
- s.Bo = s.Bo.remove(r), s.Uo.delete(e), Ea(s);
13139
+ s.Bo = s.Bo.remove(r), s.Uo.delete(e), Ec(s);
13140
13140
  } else await Tr(s.localStore, e,
13141
- /* keepPersistedTargetData */ !1).then((() => ga(s, e, n))).catch(Bi);
13141
+ /* keepPersistedTargetData */ !1).then((() => gc(s, e, n))).catch(Bi);
13142
13142
  }
13143
13143
 
13144
- async function fa(t, e) {
13144
+ async function fc(t, e) {
13145
13145
  const n = q(t), s = e.batch.batchId;
13146
13146
  try {
13147
13147
  const t = await wr(n.localStore, e);
@@ -13149,14 +13149,14 @@ async function fa(t, e) {
13149
13149
  // raise events immediately (depending on whether the watcher is caught
13150
13150
  // up), so we raise user callbacks first so that they consistently happen
13151
13151
  // before listen events.
13152
- ma(n, s, /*error=*/ null), _a(n, s), n.sharedClientState.updateMutationState(s, "acknowledged"),
13153
- await Ia(n, t);
13152
+ mc(n, s, /*error=*/ null), _c(n, s), n.sharedClientState.updateMutationState(s, "acknowledged"),
13153
+ await Ic(n, t);
13154
13154
  } catch (t) {
13155
13155
  await Bi(t);
13156
13156
  }
13157
13157
  }
13158
13158
 
13159
- async function da(t, e, n) {
13159
+ async function dc(t, e, n) {
13160
13160
  const s = q(t);
13161
13161
  try {
13162
13162
  const t = await function(t, e) {
@@ -13176,8 +13176,8 @@ async function da(t, e, n) {
13176
13176
  // raise events immediately (depending on whether the watcher is caught up),
13177
13177
  // so we raise user callbacks first so that they consistently happen before
13178
13178
  // listen events.
13179
- ma(s, e, n), _a(s, e), s.sharedClientState.updateMutationState(e, "rejected", n),
13180
- await Ia(s, t);
13179
+ mc(s, e, n), _c(s, e), s.sharedClientState.updateMutationState(e, "rejected", n),
13180
+ await Ic(s, t);
13181
13181
  } catch (n) {
13182
13182
  await Bi(n);
13183
13183
  }
@@ -13186,7 +13186,7 @@ async function da(t, e, n) {
13186
13186
  /**
13187
13187
  * Registers a user callback that resolves when all pending mutations at the moment of calling
13188
13188
  * are acknowledged .
13189
- */ async function wa(t, e) {
13189
+ */ async function wc(t, e) {
13190
13190
  const n = q(t);
13191
13191
  go(n.remoteStore) || $("SyncEngine", "The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");
13192
13192
  try {
@@ -13208,13 +13208,13 @@ async function da(t, e, n) {
13208
13208
  /**
13209
13209
  * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,
13210
13210
  * if there are any.
13211
- */ function _a(t, e) {
13211
+ */ function _c(t, e) {
13212
13212
  (t.jo.get(e) || []).forEach((t => {
13213
13213
  t.resolve();
13214
13214
  })), t.jo.delete(e);
13215
13215
  }
13216
13216
 
13217
- /** Reject all outstanding callbacks waiting for pending writes to complete. */ function ma(t, e, n) {
13217
+ /** Reject all outstanding callbacks waiting for pending writes to complete. */ function mc(t, e, n) {
13218
13218
  const s = q(t);
13219
13219
  let i = s.Ko[s.currentUser.toKey()];
13220
13220
  // NOTE: Mutations restored from persistence won't have callbacks, so it's
@@ -13225,39 +13225,39 @@ async function da(t, e, n) {
13225
13225
  }
13226
13226
  }
13227
13227
 
13228
- function ga(t, e, n = null) {
13228
+ function gc(t, e, n = null) {
13229
13229
  t.sharedClientState.removeLocalQueryTarget(e);
13230
13230
  for (const s of t.Mo.get(e)) t.Oo.delete(s), n && t.Fo.zo(s, n);
13231
13231
  if (t.Mo.delete(e), t.isPrimaryClient) {
13232
13232
  t.qo.us(e).forEach((e => {
13233
13233
  t.qo.containsKey(e) ||
13234
13234
  // We removed the last reference for this key
13235
- ya(t, e);
13235
+ yc(t, e);
13236
13236
  }));
13237
13237
  }
13238
13238
  }
13239
13239
 
13240
- function ya(t, e) {
13240
+ function yc(t, e) {
13241
13241
  t.Lo.delete(e.path.canonicalString());
13242
13242
  // It's possible that the target already got removed because the query failed. In that case,
13243
13243
  // the key won't exist in `limboTargetsByKey`. Only do the cleanup if we still have the target.
13244
13244
  const n = t.Bo.get(e);
13245
- null !== n && (lo(t.remoteStore, n), t.Bo = t.Bo.remove(e), t.Uo.delete(n), Ea(t));
13245
+ null !== n && (lo(t.remoteStore, n), t.Bo = t.Bo.remove(e), t.Uo.delete(n), Ec(t));
13246
13246
  }
13247
13247
 
13248
- function pa(t, e, n) {
13249
- for (const s of n) if (s instanceof Zo) t.qo.addReference(s.key, e), Ta(t, s); else if (s instanceof ta) {
13248
+ function pc(t, e, n) {
13249
+ for (const s of n) if (s instanceof Zo) t.qo.addReference(s.key, e), Tc(t, s); else if (s instanceof tc) {
13250
13250
  $("SyncEngine", "Document no longer in limbo: " + s.key), t.qo.removeReference(s.key, e);
13251
13251
  t.qo.containsKey(s.key) ||
13252
13252
  // We removed the last reference for this key
13253
- ya(t, s.key);
13253
+ yc(t, s.key);
13254
13254
  } else L();
13255
13255
  }
13256
13256
 
13257
- function Ta(t, e) {
13257
+ function Tc(t, e) {
13258
13258
  const n = e.key, s = n.path.canonicalString();
13259
13259
  t.Bo.get(n) || t.Lo.has(s) || ($("SyncEngine", "New document in limbo: " + n), t.Lo.add(s),
13260
- Ea(t));
13260
+ Ec(t));
13261
13261
  }
13262
13262
 
13263
13263
  /**
@@ -13267,23 +13267,23 @@ function Ta(t, e) {
13267
13267
  * Without bounding the number of concurrent resolutions, the server can fail
13268
13268
  * with "resource exhausted" errors which can lead to pathological client
13269
13269
  * behavior as seen in https://github.com/firebase/firebase-js-sdk/issues/2683.
13270
- */ function Ea(t) {
13270
+ */ function Ec(t) {
13271
13271
  for (;t.Lo.size > 0 && t.Bo.size < t.maxConcurrentLimboResolutions; ) {
13272
13272
  const e = t.Lo.values().next().value;
13273
13273
  t.Lo.delete(e);
13274
13274
  const n = new St(dt.fromString(e)), s = t.Qo.next();
13275
- t.Uo.set(s, new sa(n)), t.Bo = t.Bo.insert(n, s), ho(t.remoteStore, new ai(Re(ge(n.path)), s, 2 /* LimboResolution */ , et.I));
13275
+ t.Uo.set(s, new sc(n)), t.Bo = t.Bo.insert(n, s), ho(t.remoteStore, new ci(Re(ge(n.path)), s, 2 /* LimboResolution */ , et.I));
13276
13276
  }
13277
13277
  }
13278
13278
 
13279
- async function Ia(t, e, n) {
13279
+ async function Ic(t, e, n) {
13280
13280
  const s = q(t), i = [], r = [], o = [];
13281
- s.Oo.isEmpty() || (s.Oo.forEach(((t, a) => {
13282
- o.push(s.Go(a, e, n).then((t => {
13281
+ s.Oo.isEmpty() || (s.Oo.forEach(((t, c) => {
13282
+ o.push(s.Go(c, e, n).then((t => {
13283
13283
  if (t) {
13284
- s.isPrimaryClient && s.sharedClientState.updateQueryState(a.targetId, t.fromCache ? "not-current" : "current"),
13284
+ s.isPrimaryClient && s.sharedClientState.updateQueryState(c.targetId, t.fromCache ? "not-current" : "current"),
13285
13285
  i.push(t);
13286
- const e = ur.$n(a.targetId, t);
13286
+ const e = ur.$n(c.targetId, t);
13287
13287
  r.push(e);
13288
13288
  }
13289
13289
  })));
@@ -13310,7 +13310,7 @@ async function Ia(t, e, n) {
13310
13310
  }(s.localStore, r));
13311
13311
  }
13312
13312
 
13313
- async function Aa(t, e) {
13313
+ async function Ac(t, e) {
13314
13314
  const n = q(t);
13315
13315
  if (!n.currentUser.isEqual(e)) {
13316
13316
  $("SyncEngine", "User change. New user:", e.toKey());
@@ -13325,11 +13325,11 @@ async function Aa(t, e) {
13325
13325
  })), t.jo.clear();
13326
13326
  }(n, "'waitForPendingWrites' promise is rejected due to a user change."),
13327
13327
  // TODO(b/114226417): Consider calling this only in the primary tab.
13328
- n.sharedClientState.handleUserChange(e, t.removedBatchIds, t.addedBatchIds), await Ia(n, t.Gn);
13328
+ n.sharedClientState.handleUserChange(e, t.removedBatchIds, t.addedBatchIds), await Ic(n, t.Gn);
13329
13329
  }
13330
13330
  }
13331
13331
 
13332
- function Ra(t, e) {
13332
+ function Rc(t, e) {
13333
13333
  const n = q(t), s = n.Uo.get(e);
13334
13334
  if (s && s.$o) return Sn().add(s.key);
13335
13335
  {
@@ -13347,10 +13347,10 @@ function Ra(t, e) {
13347
13347
  /**
13348
13348
  * Reconcile the list of synced documents in an existing view with those
13349
13349
  * from persistence.
13350
- */ async function Pa(t, e) {
13350
+ */ async function Pc(t, e) {
13351
13351
  const n = q(t), s = await Er(n.localStore, e.query,
13352
13352
  /* usePreviousResults= */ !0), i = e.view.ko(s);
13353
- return n.isPrimaryClient && pa(n, e.targetId, i.Co), i;
13353
+ return n.isPrimaryClient && pc(n, e.targetId, i.Co), i;
13354
13354
  }
13355
13355
 
13356
13356
  /**
@@ -13358,14 +13358,14 @@ function Ra(t, e) {
13358
13358
  * snapshots if needed.
13359
13359
  */
13360
13360
  // PORTING NOTE: Multi-Tab only.
13361
- async function ba(t) {
13361
+ async function bc(t) {
13362
13362
  const e = q(t);
13363
- return Ar(e.localStore).then((t => Ia(e, t)));
13363
+ return Ar(e.localStore).then((t => Ic(e, t)));
13364
13364
  }
13365
13365
 
13366
13366
  /** Applies a mutation state to an existing batch. */
13367
13367
  // PORTING NOTE: Multi-Tab only.
13368
- async function va(t, e, n, s) {
13368
+ async function vc(t, e, n, s) {
13369
13369
  const i = q(t), r = await function(t, e) {
13370
13370
  const n = q(t), s = q(n.An);
13371
13371
  return n.persistence.runTransaction("Lookup mutation documents", "readonly", (t => s.Zt(t, e).next((e => e ? n.Wn.vn(t, e) : Gs.resolve(null)))));
@@ -13379,11 +13379,11 @@ async function va(t, e, n, s) {
13379
13379
  await Ro(i.remoteStore) : "acknowledged" === n || "rejected" === n ? (
13380
13380
  // NOTE: Both these methods are no-ops for batches that originated from
13381
13381
  // other clients.
13382
- ma(i, e, s || null), _a(i, e), function(t, e) {
13382
+ mc(i, e, s || null), _c(i, e), function(t, e) {
13383
13383
  q(q(t).An).ee(e);
13384
13384
  }
13385
13385
  // PORTING NOTE: Multi-Tab only.
13386
- (i.localStore, e)) : L(), await Ia(i, r)) :
13386
+ (i.localStore, e)) : L(), await Ic(i, r)) :
13387
13387
  // A throttled tab may not have seen the mutation before it was completed
13388
13388
  // and removed from the mutation queue, in which case we won't have cached
13389
13389
  // the affected documents. In this case we can safely ignore the update
@@ -13396,26 +13396,26 @@ async function va(t, e, n, s) {
13396
13396
 
13397
13397
  /** Applies a query target change from a different tab. */
13398
13398
  // PORTING NOTE: Multi-Tab only.
13399
- async function Va(t, e) {
13399
+ async function Vc(t, e) {
13400
13400
  const n = q(t);
13401
- if (xa(n), $a(n), !0 === e && !0 !== n.Wo) {
13401
+ if (xc(n), $c(n), !0 === e && !0 !== n.Wo) {
13402
13402
  // Secondary tabs only maintain Views for their local listeners and the
13403
13403
  // Views internal state may not be 100% populated (in particular
13404
13404
  // secondary tabs don't track syncedDocuments, the set of documents the
13405
13405
  // server considers to be in the target). So when a secondary becomes
13406
13406
  // primary, we need to need to make sure that all views for all targets
13407
13407
  // match the state on disk.
13408
- const t = n.sharedClientState.getAllActiveQueryTargets(), e = await Sa(n, t.toArray());
13408
+ const t = n.sharedClientState.getAllActiveQueryTargets(), e = await Sc(n, t.toArray());
13409
13409
  n.Wo = !0, await ko(n.remoteStore, !0);
13410
13410
  for (const t of e) ho(n.remoteStore, t);
13411
13411
  } else if (!1 === e && !1 !== n.Wo) {
13412
13412
  const t = [];
13413
13413
  let e = Promise.resolve();
13414
13414
  n.Mo.forEach(((s, i) => {
13415
- n.sharedClientState.isLocalQueryTarget(i) ? t.push(i) : e = e.then((() => (ga(n, i),
13415
+ n.sharedClientState.isLocalQueryTarget(i) ? t.push(i) : e = e.then((() => (gc(n, i),
13416
13416
  Tr(n.localStore, i,
13417
13417
  /*keepPersistedTargetData=*/ !0)))), lo(n.remoteStore, i);
13418
- })), await e, await Sa(n, t),
13418
+ })), await e, await Sc(n, t),
13419
13419
  // PORTING NOTE: Multi-Tab only.
13420
13420
  function(t) {
13421
13421
  const e = q(t);
@@ -13438,7 +13438,7 @@ async function Va(t, e) {
13438
13438
  }
13439
13439
  }
13440
13440
 
13441
- async function Sa(t, e, n) {
13441
+ async function Sc(t, e, n) {
13442
13442
  const s = q(t), i = [], r = [];
13443
13443
  for (const t of e) {
13444
13444
  let e;
@@ -13450,14 +13450,14 @@ async function Sa(t, e, n) {
13450
13450
  // state (the list of syncedDocuments may have gotten out of sync).
13451
13451
  e = await pr(s.localStore, Re(n[0]));
13452
13452
  for (const t of n) {
13453
- const e = s.Oo.get(t), n = await Pa(s, e);
13453
+ const e = s.Oo.get(t), n = await Pc(s, e);
13454
13454
  n.snapshot && r.push(n.snapshot);
13455
13455
  }
13456
13456
  } else {
13457
13457
  // For queries that never executed on this client, we need to
13458
13458
  // allocate the target in LocalStore and initialize a new View.
13459
13459
  const n = await Ir(s.localStore, t);
13460
- e = await pr(s.localStore, n), await oa(s, Da(n), t,
13460
+ e = await pr(s.localStore, n), await oc(s, Dc(n), t,
13461
13461
  /*current=*/ !1);
13462
13462
  }
13463
13463
  i.push(e);
@@ -13476,20 +13476,20 @@ async function Sa(t, e, n) {
13476
13476
  * difference will not cause issues.
13477
13477
  */
13478
13478
  // PORTING NOTE: Multi-Tab only.
13479
- function Da(t) {
13479
+ function Dc(t) {
13480
13480
  return me(t.path, t.collectionGroup, t.orderBy, t.filters, t.limit, "F" /* First */ , t.startAt, t.endAt);
13481
13481
  }
13482
13482
 
13483
13483
  /** Returns the IDs of the clients that are currently active. */
13484
13484
  // PORTING NOTE: Multi-Tab only.
13485
- function Ca(t) {
13485
+ function Cc(t) {
13486
13486
  const e = q(t);
13487
13487
  return q(q(e.localStore).persistence).Tn();
13488
13488
  }
13489
13489
 
13490
13490
  /** Applies a query target change from a different tab. */
13491
13491
  // PORTING NOTE: Multi-Tab only.
13492
- async function Na(t, e, n, s) {
13492
+ async function Nc(t, e, n, s) {
13493
13493
  const i = q(t);
13494
13494
  if (i.Wo)
13495
13495
  // If we receive a target state notification via WebStorage, we are
@@ -13499,13 +13499,13 @@ async function Na(t, e, n, s) {
13499
13499
  case "not-current":
13500
13500
  {
13501
13501
  const t = await Ar(i.localStore), s = Nn.createSynthesizedRemoteEventForCurrentChange(e, "current" === n);
13502
- await Ia(i, t, s);
13502
+ await Ic(i, t, s);
13503
13503
  break;
13504
13504
  }
13505
13505
 
13506
13506
  case "rejected":
13507
13507
  await Tr(i.localStore, e,
13508
- /* keepPersistedTargetData */ !0), ga(i, e, s);
13508
+ /* keepPersistedTargetData */ !0), gc(i, e, s);
13509
13509
  break;
13510
13510
 
13511
13511
  default:
@@ -13513,8 +13513,8 @@ async function Na(t, e, n, s) {
13513
13513
  }
13514
13514
  }
13515
13515
 
13516
- /** Adds or removes Watch targets for queries from different tabs. */ async function ka(t, e, n) {
13517
- const s = xa(t);
13516
+ /** Adds or removes Watch targets for queries from different tabs. */ async function kc(t, e, n) {
13517
+ const s = xc(t);
13518
13518
  if (s.Wo) {
13519
13519
  for (const t of e) {
13520
13520
  if (s.Mo.has(t)) {
@@ -13523,7 +13523,7 @@ async function Na(t, e, n, s) {
13523
13523
  continue;
13524
13524
  }
13525
13525
  const e = await Ir(s.localStore, t), n = await pr(s.localStore, e);
13526
- await oa(s, Da(e), n.targetId,
13526
+ await oc(s, Dc(e), n.targetId,
13527
13527
  /*current=*/ !1), ho(s.remoteStore, n);
13528
13528
  }
13529
13529
  for (const t of n)
@@ -13533,21 +13533,21 @@ async function Na(t, e, n, s) {
13533
13533
  // Release queries that are still active.
13534
13534
  await Tr(s.localStore, t,
13535
13535
  /* keepPersistedTargetData */ !1).then((() => {
13536
- lo(s.remoteStore, t), ga(s, t);
13536
+ lo(s.remoteStore, t), gc(s, t);
13537
13537
  })).catch(Bi);
13538
13538
  }
13539
13539
  }
13540
13540
 
13541
- function xa(t) {
13541
+ function xc(t) {
13542
13542
  const e = q(t);
13543
- return e.remoteStore.remoteSyncer.applyRemoteEvent = ua.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = Ra.bind(null, e),
13544
- e.remoteStore.remoteSyncer.rejectListen = la.bind(null, e), e.Fo.Pr = Qo.bind(null, e.eventManager),
13543
+ return e.remoteStore.remoteSyncer.applyRemoteEvent = uc.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = Rc.bind(null, e),
13544
+ e.remoteStore.remoteSyncer.rejectListen = lc.bind(null, e), e.Fo.Pr = Qo.bind(null, e.eventManager),
13545
13545
  e.Fo.zo = Wo.bind(null, e.eventManager), e;
13546
13546
  }
13547
13547
 
13548
- function $a(t) {
13548
+ function $c(t) {
13549
13549
  const e = q(t);
13550
- return e.remoteStore.remoteSyncer.applySuccessfulWrite = fa.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = da.bind(null, e),
13550
+ return e.remoteStore.remoteSyncer.applySuccessfulWrite = fc.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = dc.bind(null, e),
13551
13551
  e;
13552
13552
  }
13553
13553
 
@@ -13558,7 +13558,7 @@ function $a(t) {
13558
13558
  * @param syncEngine - SyncEngine to use.
13559
13559
  * @param bundleReader - Bundle to load into the SDK.
13560
13560
  * @param task - LoadBundleTask used to update the loading progress to public API.
13561
- */ function Fa(t, e, n) {
13561
+ */ function Fc(t, e, n) {
13562
13562
  const s = q(t);
13563
13563
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
13564
13564
  (async function(t, e, n) {
@@ -13590,7 +13590,7 @@ function $a(t) {
13590
13590
  // TODO(b/160876443): This currently raises snapshots with
13591
13591
  // `fromCache=false` if users already listen to some queries and bundles
13592
13592
  // has newer version.
13593
- await Ia(t, o.In,
13593
+ await Ic(t, o.In,
13594
13594
  /* remoteEvent */ void 0),
13595
13595
  // Save metadata, so loading the same bundle will skip.
13596
13596
  await function(t, e) {
@@ -13629,7 +13629,7 @@ function $a(t) {
13629
13629
  }));
13630
13630
  }
13631
13631
 
13632
- class Oa {
13632
+ class Oc {
13633
13633
  constructor() {
13634
13634
  this.synchronizeTabs = !1;
13635
13635
  }
@@ -13657,14 +13657,14 @@ class Oa {
13657
13657
 
13658
13658
  /**
13659
13659
  * Provides all components needed for Firestore with IndexedDB persistence.
13660
- */ class Ma extends Oa {
13660
+ */ class Mc extends Oc {
13661
13661
  constructor(t, e, n) {
13662
- super(), this.ta = t, this.cacheSizeBytes = e, this.forceOwnership = n, this.synchronizeTabs = !1;
13662
+ super(), this.tc = t, this.cacheSizeBytes = e, this.forceOwnership = n, this.synchronizeTabs = !1;
13663
13663
  }
13664
13664
  async initialize(t) {
13665
- await super.initialize(t), await Rr(this.localStore), await this.ta.initialize(this, t),
13665
+ await super.initialize(t), await Rr(this.localStore), await this.tc.initialize(this, t),
13666
13666
  // Enqueue writes from a previous session
13667
- await $a(this.ta.syncEngine), await Ro(this.ta.remoteStore),
13667
+ await $c(this.tc.syncEngine), await Ro(this.tc.remoteStore),
13668
13668
  // NOTE: This will immediately call the listener, so we make sure to
13669
13669
  // set it after localStore / remoteStore are started.
13670
13670
  await this.persistence.sn((() => (this.gcScheduler && !this.gcScheduler.started && this.gcScheduler.start(this.localStore),
@@ -13693,24 +13693,24 @@ class Oa {
13693
13693
  * In the legacy client, this provider is used to provide both multi-tab and
13694
13694
  * non-multi-tab persistence since we cannot tell at build time whether
13695
13695
  * `synchronizeTabs` will be enabled.
13696
- */ class La extends Ma {
13696
+ */ class Lc extends Mc {
13697
13697
  constructor(t, e) {
13698
- super(t, e, /* forceOwnership= */ !1), this.ta = t, this.cacheSizeBytes = e, this.synchronizeTabs = !0;
13698
+ super(t, e, /* forceOwnership= */ !1), this.tc = t, this.cacheSizeBytes = e, this.synchronizeTabs = !0;
13699
13699
  }
13700
13700
  async initialize(t) {
13701
13701
  await super.initialize(t);
13702
- const e = this.ta.syncEngine;
13702
+ const e = this.tc.syncEngine;
13703
13703
  this.sharedClientState instanceof Qr && (this.sharedClientState.syncEngine = {
13704
- mi: va.bind(null, e),
13705
- gi: Na.bind(null, e),
13706
- yi: ka.bind(null, e),
13707
- Tn: Ca.bind(null, e),
13708
- _i: ba.bind(null, e)
13704
+ mi: vc.bind(null, e),
13705
+ gi: Nc.bind(null, e),
13706
+ yi: kc.bind(null, e),
13707
+ Tn: Cc.bind(null, e),
13708
+ _i: bc.bind(null, e)
13709
13709
  }, await this.sharedClientState.start()),
13710
13710
  // NOTE: This will immediately call the listener, so we make sure to
13711
13711
  // set it after localStore / remoteStore are started.
13712
13712
  await this.persistence.sn((async t => {
13713
- await Va(this.ta.syncEngine, t), this.gcScheduler && (t && !this.gcScheduler.started ? this.gcScheduler.start(this.localStore) : t || this.gcScheduler.stop());
13713
+ await Vc(this.tc.syncEngine, t), this.gcScheduler && (t && !this.gcScheduler.started ? this.gcScheduler.start(this.localStore) : t || this.gcScheduler.stop());
13714
13714
  }));
13715
13715
  }
13716
13716
  Jo(t) {
@@ -13724,13 +13724,13 @@ class Oa {
13724
13724
  /**
13725
13725
  * Initializes and wires the components that are needed to interface with the
13726
13726
  * network.
13727
- */ class Ba {
13727
+ */ class Bc {
13728
13728
  async initialize(t, e) {
13729
13729
  this.localStore || (this.localStore = t.localStore, this.sharedClientState = t.sharedClientState,
13730
13730
  this.datastore = this.createDatastore(e), this.remoteStore = this.createRemoteStore(e),
13731
13731
  this.eventManager = this.createEventManager(e), this.syncEngine = this.createSyncEngine(e,
13732
- /* startAsPrimary=*/ !t.synchronizeTabs), this.sharedClientState.onlineStateHandler = t => ha(this.syncEngine, t, 1 /* SharedClientState */),
13733
- this.remoteStore.remoteSyncer.handleCredentialChange = Aa.bind(null, this.syncEngine),
13732
+ /* startAsPrimary=*/ !t.synchronizeTabs), this.sharedClientState.onlineStateHandler = t => hc(this.syncEngine, t, 1 /* SharedClientState */),
13733
+ this.remoteStore.remoteSyncer.handleCredentialChange = Ac.bind(null, this.syncEngine),
13734
13734
  await ko(this.remoteStore, this.syncEngine.isPrimaryClient));
13735
13735
  }
13736
13736
  createEventManager(t) {
@@ -13744,16 +13744,16 @@ class Oa {
13744
13744
  }(t.authCredentials, t.appCheckCredentials, n, e);
13745
13745
  }
13746
13746
  createRemoteStore(t) {
13747
- return e = this.localStore, n = this.datastore, s = t.asyncQueue, i = t => ha(this.syncEngine, t, 0 /* RemoteStore */),
13748
- r = zr.bt() ? new zr : new Gr, new ao(e, n, s, i, r);
13747
+ return e = this.localStore, n = this.datastore, s = t.asyncQueue, i = t => hc(this.syncEngine, t, 0 /* RemoteStore */),
13748
+ r = zr.bt() ? new zr : new Gr, new co(e, n, s, i, r);
13749
13749
  var e, n, s, i, r;
13750
13750
  /** Re-enables the network. Idempotent. */ }
13751
13751
  createSyncEngine(t, e) {
13752
13752
  return function(t, e, n,
13753
13753
  // PORTING NOTE: Manages state synchronization in multi-tab environments.
13754
13754
  s, i, r, o) {
13755
- const a = new ia(t, e, n, s, i, r);
13756
- return o && (a.Wo = !0), a;
13755
+ const c = new ic(t, e, n, s, i, r);
13756
+ return o && (c.Wo = !0), c;
13757
13757
  }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t.initialUser, t.maxConcurrentLimboResolutions, e);
13758
13758
  }
13759
13759
  terminate() {
@@ -13795,7 +13795,7 @@ class Oa {
13795
13795
  * @param bytesPerRead - How many bytes each `read()` from the returned reader
13796
13796
  * will read.
13797
13797
  */
13798
- function Ua(t, e = 10240) {
13798
+ function Uc(t, e = 10240) {
13799
13799
  let n = 0;
13800
13800
  // The TypeScript definition for ReadableStreamReader changed. We use
13801
13801
  // `any` here to allow this code to compile with different versions.
@@ -13861,7 +13861,7 @@ function Ua(t, e = 10240) {
13861
13861
  * asynchronously. To allow immediate silencing, a mute call is added which
13862
13862
  * causes events scheduled to no longer be raised.
13863
13863
  */
13864
- class qa {
13864
+ class qc {
13865
13865
  constructor(t) {
13866
13866
  this.observer = t,
13867
13867
  /**
@@ -13871,15 +13871,15 @@ class qa {
13871
13871
  this.muted = !1;
13872
13872
  }
13873
13873
  next(t) {
13874
- this.observer.next && this.ea(this.observer.next, t);
13874
+ this.observer.next && this.ec(this.observer.next, t);
13875
13875
  }
13876
13876
  error(t) {
13877
- this.observer.error ? this.ea(this.observer.error, t) : console.error("Uncaught Error in snapshot listener:", t);
13877
+ this.observer.error ? this.ec(this.observer.error, t) : console.error("Uncaught Error in snapshot listener:", t);
13878
13878
  }
13879
- na() {
13879
+ nc() {
13880
13880
  this.muted = !0;
13881
13881
  }
13882
- ea(t, e) {
13882
+ ec(t, e) {
13883
13883
  this.muted || setTimeout((() => {
13884
13884
  this.muted || t(e);
13885
13885
  }), 0);
@@ -13907,32 +13907,32 @@ class qa {
13907
13907
  *
13908
13908
  * Takes a bundle stream or buffer, and presents abstractions to read bundled
13909
13909
  * elements out of the underlying content.
13910
- */ class Ka {
13910
+ */ class Kc {
13911
13911
  constructor(
13912
13912
  /** The reader to read from underlying binary bundle data source. */
13913
13913
  t, e) {
13914
- this.sa = t, this.k = e,
13914
+ this.sc = t, this.k = e,
13915
13915
  /** Cached bundle metadata. */
13916
13916
  this.metadata = new Q,
13917
13917
  /**
13918
13918
  * Internal buffer to hold bundle content, accumulating incomplete element
13919
13919
  * content.
13920
13920
  */
13921
- this.buffer = new Uint8Array, this.ia = new TextDecoder("utf-8"),
13921
+ this.buffer = new Uint8Array, this.ic = new TextDecoder("utf-8"),
13922
13922
  // Read the metadata (which is the first element).
13923
- this.ra().then((t => {
13923
+ this.rc().then((t => {
13924
13924
  t && t._o() ? this.metadata.resolve(t.payload.metadata) : this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\n ${JSON.stringify(null == t ? void 0 : t.payload)}`));
13925
13925
  }), (t => this.metadata.reject(t)));
13926
13926
  }
13927
13927
  close() {
13928
- return this.sa.cancel();
13928
+ return this.sc.cancel();
13929
13929
  }
13930
13930
  async getMetadata() {
13931
13931
  return this.metadata.promise;
13932
13932
  }
13933
13933
  async Ho() {
13934
13934
  // Makes sure metadata is read before proceeding.
13935
- return await this.getMetadata(), this.ra();
13935
+ return await this.getMetadata(), this.rc();
13936
13936
  }
13937
13937
  /**
13938
13938
  * Reads from the head of internal buffer, and pulling more data from
@@ -13943,15 +13943,15 @@ class qa {
13943
13943
  *
13944
13944
  * Returns either the bundled element, or null if we have reached the end of
13945
13945
  * the stream.
13946
- */ async ra() {
13947
- const t = await this.oa();
13946
+ */ async rc() {
13947
+ const t = await this.oc();
13948
13948
  if (null === t) return null;
13949
- const e = this.ia.decode(t), n = Number(e);
13950
- isNaN(n) && this.aa(`length string (${e}) is not valid number`);
13951
- const s = await this.ca(n);
13949
+ const e = this.ic.decode(t), n = Number(e);
13950
+ isNaN(n) && this.cc(`length string (${e}) is not valid number`);
13951
+ const s = await this.ac(n);
13952
13952
  return new Ho(JSON.parse(s), t.length + n);
13953
13953
  }
13954
- /** First index of '{' from the underlying buffer. */ ua() {
13954
+ /** First index of '{' from the underlying buffer. */ uc() {
13955
13955
  return this.buffer.findIndex((t => t === "{".charCodeAt(0)));
13956
13956
  }
13957
13957
  /**
@@ -13959,17 +13959,17 @@ class qa {
13959
13959
  * return the content.
13960
13960
  *
13961
13961
  * If reached end of the stream, returns a null.
13962
- */ async oa() {
13963
- for (;this.ua() < 0; ) {
13964
- if (await this.ha()) break;
13962
+ */ async oc() {
13963
+ for (;this.uc() < 0; ) {
13964
+ if (await this.hc()) break;
13965
13965
  }
13966
13966
  // Broke out of the loop because underlying stream is closed, and there
13967
13967
  // happens to be no more data to process.
13968
13968
  if (0 === this.buffer.length) return null;
13969
- const t = this.ua();
13969
+ const t = this.uc();
13970
13970
  // Broke out of the loop because underlying stream is closed, but still
13971
13971
  // cannot find an open bracket.
13972
- t < 0 && this.aa("Reached the end of bundle when a length string is expected.");
13972
+ t < 0 && this.cc("Reached the end of bundle when a length string is expected.");
13973
13973
  const e = this.buffer.slice(0, t);
13974
13974
  // Update the internal buffer to drop the read length.
13975
13975
  return this.buffer = this.buffer.slice(t), e;
@@ -13979,23 +13979,23 @@ class qa {
13979
13979
  * number of bytes, pulling more data from the underlying stream if needed.
13980
13980
  *
13981
13981
  * Returns a string decoded from the read bytes.
13982
- */ async ca(t) {
13982
+ */ async ac(t) {
13983
13983
  for (;this.buffer.length < t; ) {
13984
- await this.ha() && this.aa("Reached the end of bundle when more is expected.");
13984
+ await this.hc() && this.cc("Reached the end of bundle when more is expected.");
13985
13985
  }
13986
- const e = this.ia.decode(this.buffer.slice(0, t));
13986
+ const e = this.ic.decode(this.buffer.slice(0, t));
13987
13987
  // Update the internal buffer to drop the read json string.
13988
13988
  return this.buffer = this.buffer.slice(t), e;
13989
13989
  }
13990
- aa(t) {
13990
+ cc(t) {
13991
13991
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
13992
- throw this.sa.cancel(), new Error(`Invalid bundle format: ${t}`);
13992
+ throw this.sc.cancel(), new Error(`Invalid bundle format: ${t}`);
13993
13993
  }
13994
13994
  /**
13995
13995
  * Pulls more data from underlying stream to internal buffer.
13996
13996
  * Returns a boolean indicating whether the stream is finished.
13997
- */ async ha() {
13998
- const t = await this.sa.read();
13997
+ */ async hc() {
13998
+ const t = await this.sc.read();
13999
13999
  if (!t.done) {
14000
14000
  const e = new Uint8Array(this.buffer.length + t.value.length);
14001
14001
  e.set(this.buffer), e.set(t.value, this.buffer.length), this.buffer = e;
@@ -14024,7 +14024,7 @@ class qa {
14024
14024
  * Internal transaction object responsible for accumulating the mutations to
14025
14025
  * perform and the base versions for any documents read.
14026
14026
  */
14027
- class ja {
14027
+ class jc {
14028
14028
  constructor(t) {
14029
14029
  this.datastore = t,
14030
14030
  // The version of each document that was read during this transaction.
@@ -14052,11 +14052,11 @@ class ja {
14052
14052
  const e = is(n.k, t);
14053
14053
  o.set(e.key.toString(), e);
14054
14054
  }));
14055
- const a = [];
14055
+ const c = [];
14056
14056
  return e.forEach((t => {
14057
14057
  const e = o.get(t.toString());
14058
- B(!!e), a.push(e);
14059
- })), a;
14058
+ B(!!e), c.push(e);
14059
+ })), c;
14060
14060
  }(this.datastore, t);
14061
14061
  return e.forEach((t => this.recordVersion(t))), e;
14062
14062
  }
@@ -14098,7 +14098,7 @@ class ja {
14098
14098
  if (t.isFoundDocument()) e = t.version; else {
14099
14099
  if (!t.isNoDocument()) throw L();
14100
14100
  // For deleted docs, we must use baseVersion 0 when we overwrite them.
14101
- e = ct.min();
14101
+ e = at.min();
14102
14102
  }
14103
14103
  const n = this.readVersions.get(t.key.toString());
14104
14104
  if (n) {
@@ -14121,7 +14121,7 @@ class ja {
14121
14121
  // The first time a document is written, we want to take into account the
14122
14122
  // read time and existence
14123
14123
  if (!this.writtenDocs.has(t.toString()) && e) {
14124
- if (e.isEqual(ct.min()))
14124
+ if (e.isEqual(at.min()))
14125
14125
  // The document doesn't exist, so fail the transaction.
14126
14126
  // This has to be validated locally because you can't send a
14127
14127
  // precondition that a document does not exist without changing the
@@ -14165,29 +14165,29 @@ class ja {
14165
14165
  * TransactionRunner encapsulates the logic needed to run and retry transactions
14166
14166
  * with backoff.
14167
14167
  */
14168
- class Qa {
14168
+ class Qc {
14169
14169
  constructor(t, e, n, s) {
14170
14170
  this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = s,
14171
- this.la = 5, this.ur = new eo(this.asyncQueue, "transaction_retry" /* TransactionRetry */);
14171
+ this.lc = 5, this.ur = new eo(this.asyncQueue, "transaction_retry" /* TransactionRetry */);
14172
14172
  }
14173
14173
  /** Runs the transaction and sets the result on deferred. */ run() {
14174
- this.la -= 1, this.fa();
14174
+ this.lc -= 1, this.fc();
14175
14175
  }
14176
- fa() {
14176
+ fc() {
14177
14177
  this.ur.Zi((async () => {
14178
- const t = new ja(this.datastore), e = this.da(t);
14178
+ const t = new jc(this.datastore), e = this.dc(t);
14179
14179
  e && e.then((e => {
14180
14180
  this.asyncQueue.enqueueAndForget((() => t.commit().then((() => {
14181
14181
  this.deferred.resolve(e);
14182
14182
  })).catch((t => {
14183
- this.wa(t);
14183
+ this.wc(t);
14184
14184
  }))));
14185
14185
  })).catch((t => {
14186
- this.wa(t);
14186
+ this.wc(t);
14187
14187
  }));
14188
14188
  }));
14189
14189
  }
14190
- da(t) {
14190
+ dc(t) {
14191
14191
  try {
14192
14192
  const e = this.updateFunction(t);
14193
14193
  return !bt(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
@@ -14197,11 +14197,11 @@ class Qa {
14197
14197
  return this.deferred.reject(t), null;
14198
14198
  }
14199
14199
  }
14200
- wa(t) {
14201
- this.la > 0 && this._a(t) ? (this.la -= 1, this.asyncQueue.enqueueAndForget((() => (this.fa(),
14200
+ wc(t) {
14201
+ this.lc > 0 && this._c(t) ? (this.lc -= 1, this.asyncQueue.enqueueAndForget((() => (this.fc(),
14202
14202
  Promise.resolve())))) : this.deferred.reject(t);
14203
14203
  }
14204
- _a(t) {
14204
+ _c(t) {
14205
14205
  if ("FirebaseError" === t.name) {
14206
14206
  // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
14207
14207
  // non-matching document versions with ABORTED. These errors should be retried.
@@ -14233,7 +14233,7 @@ class Qa {
14233
14233
  * pieces of the client SDK architecture. It is responsible for creating the
14234
14234
  * async queue that is shared by all of the other components in the system.
14235
14235
  */
14236
- class Wa {
14236
+ class Wc {
14237
14237
  constructor(t, e,
14238
14238
  /**
14239
14239
  * Asynchronous queue responsible for all of our internal processing. When
@@ -14291,7 +14291,7 @@ class Wa {
14291
14291
  }
14292
14292
  }
14293
14293
 
14294
- async function Ga(t, e) {
14294
+ async function Gc(t, e) {
14295
14295
  t.asyncQueue.verifyOperationInProgress(), $("FirestoreClient", "Initializing OfflineComponentProvider");
14296
14296
  const n = await t.getConfiguration();
14297
14297
  await e.initialize(n);
@@ -14304,9 +14304,9 @@ async function Ga(t, e) {
14304
14304
  e.persistence.setDatabaseDeletedListener((() => t.terminate())), t.offlineComponents = e;
14305
14305
  }
14306
14306
 
14307
- async function za(t, e) {
14307
+ async function zc(t, e) {
14308
14308
  t.asyncQueue.verifyOperationInProgress();
14309
- const n = await Ha(t);
14309
+ const n = await Hc(t);
14310
14310
  $("FirestoreClient", "Initializing OnlineComponentProvider");
14311
14311
  const s = await t.getConfiguration();
14312
14312
  await e.initialize(n, s),
@@ -14322,55 +14322,55 @@ async function za(t, e) {
14322
14322
  n.Gr.add(3 /* CredentialChange */), await uo(n), s &&
14323
14323
  // Don't set the network status to Unknown if we are offline.
14324
14324
  n.Jr.set("Unknown" /* Unknown */), await n.remoteSyncer.handleCredentialChange(e),
14325
- n.Gr.delete(3 /* CredentialChange */), await co(n);
14325
+ n.Gr.delete(3 /* CredentialChange */), await ao(n);
14326
14326
  }(e.remoteStore, t))), t.onlineComponents = e;
14327
14327
  }
14328
14328
 
14329
- async function Ha(t) {
14329
+ async function Hc(t) {
14330
14330
  return t.offlineComponents || ($("FirestoreClient", "Using default OfflineComponentProvider"),
14331
- await Ga(t, new Oa)), t.offlineComponents;
14331
+ await Gc(t, new Oc)), t.offlineComponents;
14332
14332
  }
14333
14333
 
14334
- async function Ja(t) {
14334
+ async function Jc(t) {
14335
14335
  return t.onlineComponents || ($("FirestoreClient", "Using default OnlineComponentProvider"),
14336
- await za(t, new Ba)), t.onlineComponents;
14336
+ await zc(t, new Bc)), t.onlineComponents;
14337
14337
  }
14338
14338
 
14339
- function Ya(t) {
14340
- return Ha(t).then((t => t.persistence));
14339
+ function Yc(t) {
14340
+ return Hc(t).then((t => t.persistence));
14341
14341
  }
14342
14342
 
14343
- function Xa(t) {
14344
- return Ha(t).then((t => t.localStore));
14343
+ function Xc(t) {
14344
+ return Hc(t).then((t => t.localStore));
14345
14345
  }
14346
14346
 
14347
- function Za(t) {
14348
- return Ja(t).then((t => t.remoteStore));
14347
+ function Zc(t) {
14348
+ return Jc(t).then((t => t.remoteStore));
14349
14349
  }
14350
14350
 
14351
- function tc(t) {
14352
- return Ja(t).then((t => t.syncEngine));
14351
+ function ta(t) {
14352
+ return Jc(t).then((t => t.syncEngine));
14353
14353
  }
14354
14354
 
14355
- async function ec(t) {
14356
- const e = await Ja(t), n = e.eventManager;
14357
- return n.onListen = ra.bind(null, e.syncEngine), n.onUnlisten = aa.bind(null, e.syncEngine),
14355
+ async function ea(t) {
14356
+ const e = await Jc(t), n = e.eventManager;
14357
+ return n.onListen = rc.bind(null, e.syncEngine), n.onUnlisten = cc.bind(null, e.syncEngine),
14358
14358
  n;
14359
14359
  }
14360
14360
 
14361
- /** Enables the network connection and re-enqueues all pending operations. */ function nc(t) {
14361
+ /** Enables the network connection and re-enqueues all pending operations. */ function na(t) {
14362
14362
  return t.asyncQueue.enqueue((async () => {
14363
- const e = await Ya(t), n = await Za(t);
14363
+ const e = await Yc(t), n = await Zc(t);
14364
14364
  return e.setNetworkEnabled(!0), function(t) {
14365
14365
  const e = q(t);
14366
- return e.Gr.delete(0 /* UserDisabled */), co(e);
14366
+ return e.Gr.delete(0 /* UserDisabled */), ao(e);
14367
14367
  }(n);
14368
14368
  }));
14369
14369
  }
14370
14370
 
14371
- /** Disables the network connection. Pending operations will not complete. */ function sc(t) {
14371
+ /** Disables the network connection. Pending operations will not complete. */ function sa(t) {
14372
14372
  return t.asyncQueue.enqueue((async () => {
14373
- const e = await Ya(t), n = await Za(t);
14373
+ const e = await Yc(t), n = await Zc(t);
14374
14374
  return e.setNetworkEnabled(!1), async function(t) {
14375
14375
  const e = q(t);
14376
14376
  e.Gr.add(0 /* UserDisabled */), await uo(e),
@@ -14384,7 +14384,7 @@ async function ec(t) {
14384
14384
  * Returns a Promise that resolves when all writes that were pending at the time
14385
14385
  * this method was called received server acknowledgement. An acknowledgement
14386
14386
  * can be either acceptance or rejection.
14387
- */ function ic(t, e) {
14387
+ */ function ia(t, e) {
14388
14388
  const n = new Q;
14389
14389
  return t.asyncQueue.enqueueAndForget((async () => async function(t, e, n) {
14390
14390
  try {
@@ -14401,19 +14401,19 @@ async function ec(t) {
14401
14401
  /**
14402
14402
  * Retrieves a latency-compensated document from the backend via a
14403
14403
  * SnapshotListener.
14404
- */ (await Xa(t), e, n))), n.promise;
14404
+ */ (await Xc(t), e, n))), n.promise;
14405
14405
  }
14406
14406
 
14407
- function rc(t, e, n = {}) {
14407
+ function ra(t, e, n = {}) {
14408
14408
  const s = new Q;
14409
14409
  return t.asyncQueue.enqueueAndForget((async () => function(t, e, n, s, i) {
14410
- const r = new qa({
14410
+ const r = new qc({
14411
14411
  next: r => {
14412
14412
  // Remove query first before passing event to user to avoid
14413
14413
  // user actions affecting the now stale query.
14414
14414
  e.enqueueAndForget((() => jo(t, o)));
14415
- const a = r.docs.has(n);
14416
- !a && r.fromCache ?
14415
+ const c = r.docs.has(n);
14416
+ !c && r.fromCache ?
14417
14417
  // TODO(dimond): If we're online and the document doesn't
14418
14418
  // exist then we resolve with a doc.exists set to false. If
14419
14419
  // we're offline however, we reject the Promise in this
@@ -14421,7 +14421,7 @@ function rc(t, e, n = {}) {
14421
14421
  // the server so we can deliver that even when you're
14422
14422
  // offline 2) Actually reject the Promise in the online case
14423
14423
  // if the document doesn't exist.
14424
- i.reject(new j(K.UNAVAILABLE, "Failed to get document because the client is offline.")) : a && r.fromCache && s && "server" === s.source ? i.reject(new j(K.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')) : i.resolve(r);
14424
+ i.reject(new j(K.UNAVAILABLE, "Failed to get document because the client is offline.")) : c && r.fromCache && s && "server" === s.source ? i.reject(new j(K.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')) : i.resolve(r);
14425
14425
  },
14426
14426
  error: t => i.reject(t)
14427
14427
  }), o = new zo(ge(n.path), r, {
@@ -14429,15 +14429,15 @@ function rc(t, e, n = {}) {
14429
14429
  wo: !0
14430
14430
  });
14431
14431
  return Ko(t, o);
14432
- }(await ec(t), t.asyncQueue, e, n, s))), s.promise;
14432
+ }(await ea(t), t.asyncQueue, e, n, s))), s.promise;
14433
14433
  }
14434
14434
 
14435
- function oc(t, e) {
14435
+ function oa(t, e) {
14436
14436
  const n = new Q;
14437
14437
  return t.asyncQueue.enqueueAndForget((async () => async function(t, e, n) {
14438
14438
  try {
14439
14439
  const s = await Er(t, e,
14440
- /* usePreviousResults= */ !0), i = new ea(e, s.zn), r = i.bo(s.documents), o = i.applyChanges(r,
14440
+ /* usePreviousResults= */ !0), i = new ec(e, s.zn), r = i.bo(s.documents), o = i.applyChanges(r,
14441
14441
  /* updateLimboDocuments= */ !1);
14442
14442
  n.resolve(o.snapshot);
14443
14443
  } catch (t) {
@@ -14448,13 +14448,13 @@ function oc(t, e) {
14448
14448
  /**
14449
14449
  * Retrieves a latency-compensated query snapshot from the backend via a
14450
14450
  * SnapshotListener.
14451
- */ (await Xa(t), e, n))), n.promise;
14451
+ */ (await Xc(t), e, n))), n.promise;
14452
14452
  }
14453
14453
 
14454
- function ac(t, e, n = {}) {
14454
+ function ca(t, e, n = {}) {
14455
14455
  const s = new Q;
14456
14456
  return t.asyncQueue.enqueueAndForget((async () => function(t, e, n, s, i) {
14457
- const r = new qa({
14457
+ const r = new qc({
14458
14458
  next: n => {
14459
14459
  // Remove query first before passing event to user to avoid
14460
14460
  // user actions affecting the now stale query.
@@ -14466,20 +14466,20 @@ function ac(t, e, n = {}) {
14466
14466
  wo: !0
14467
14467
  });
14468
14468
  return Ko(t, o);
14469
- }(await ec(t), t.asyncQueue, e, n, s))), s.promise;
14469
+ }(await ea(t), t.asyncQueue, e, n, s))), s.promise;
14470
14470
  }
14471
14471
 
14472
- function cc(t, e) {
14473
- const n = new qa(e);
14472
+ function aa(t, e) {
14473
+ const n = new qc(e);
14474
14474
  return t.asyncQueue.enqueueAndForget((async () => function(t, e) {
14475
14475
  q(t).io.add(e),
14476
14476
  // Immediately fire an initial event, indicating all existing listeners
14477
14477
  // are in-sync.
14478
14478
  e.next();
14479
- }(await ec(t), n))), () => {
14480
- n.na(), t.asyncQueue.enqueueAndForget((async () => function(t, e) {
14479
+ }(await ea(t), n))), () => {
14480
+ n.nc(), t.asyncQueue.enqueueAndForget((async () => function(t, e) {
14481
14481
  q(t).io.delete(e);
14482
- }(await ec(t), n)));
14482
+ }(await ea(t), n)));
14483
14483
  };
14484
14484
  }
14485
14485
 
@@ -14497,25 +14497,25 @@ function cc(t, e) {
14497
14497
  * accessed with the transaction will not reflect local changes that have not
14498
14498
  * been committed. For this reason, it is required that all reads are
14499
14499
  * performed before any writes. Transactions must be performed while online.
14500
- */ function uc(t, e) {
14500
+ */ function ua(t, e) {
14501
14501
  const n = new Q;
14502
14502
  return t.asyncQueue.enqueueAndForget((async () => {
14503
14503
  const s = await function(t) {
14504
- return Ja(t).then((t => t.datastore));
14504
+ return Jc(t).then((t => t.datastore));
14505
14505
  }(t);
14506
- new Qa(t.asyncQueue, s, e, n).run();
14506
+ new Qc(t.asyncQueue, s, e, n).run();
14507
14507
  })), n.promise;
14508
14508
  }
14509
14509
 
14510
- function hc(t, e, n, s) {
14510
+ function ha(t, e, n, s) {
14511
14511
  const i = function(t, e) {
14512
14512
  let n;
14513
14513
  n = "string" == typeof t ? (new TextEncoder).encode(t) : t;
14514
14514
  return function(t, e) {
14515
- return new Ka(t, e);
14515
+ return new Kc(t, e);
14516
14516
  }(function(t, e) {
14517
- if (t instanceof Uint8Array) return Ua(t, e);
14518
- if (t instanceof ArrayBuffer) return Ua(new Uint8Array(t), e);
14517
+ if (t instanceof Uint8Array) return Uc(t, e);
14518
+ if (t instanceof ArrayBuffer) return Uc(new Uint8Array(t), e);
14519
14519
  if (t instanceof ReadableStream) return t.getReader();
14520
14520
  throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream");
14521
14521
  }(n), e);
@@ -14537,18 +14537,18 @@ function hc(t, e, n, s) {
14537
14537
  * limitations under the License.
14538
14538
  */ (n, to(e));
14539
14539
  t.asyncQueue.enqueueAndForget((async () => {
14540
- Fa(await tc(t), i, s);
14540
+ Fc(await ta(t), i, s);
14541
14541
  }));
14542
14542
  }
14543
14543
 
14544
- function lc(t, e) {
14544
+ function la(t, e) {
14545
14545
  return t.asyncQueue.enqueue((async () => function(t, e) {
14546
14546
  const n = q(t);
14547
14547
  return n.persistence.runTransaction("Get named query", "readonly", (t => n.Ye.getNamedQuery(t, e)));
14548
- }(await Xa(t), e)));
14548
+ }(await Xc(t), e)));
14549
14549
  }
14550
14550
 
14551
- class fc {
14551
+ class fa {
14552
14552
  /**
14553
14553
  * Constructs a DatabaseInfo using the provided host, databaseId and
14554
14554
  * persistenceKey.
@@ -14566,9 +14566,9 @@ class fc {
14566
14566
  * @param useFetchStreams Whether to use the Fetch API instead of
14567
14567
  * XMLHTTPRequest
14568
14568
  */
14569
- constructor(t, e, n, s, i, r, o, a) {
14569
+ constructor(t, e, n, s, i, r, o, c) {
14570
14570
  this.databaseId = t, this.appId = e, this.persistenceKey = n, this.host = s, this.ssl = i,
14571
- this.forceLongPolling = r, this.autoDetectLongPolling = o, this.useFetchStreams = a;
14571
+ this.forceLongPolling = r, this.autoDetectLongPolling = o, this.useFetchStreams = c;
14572
14572
  }
14573
14573
  }
14574
14574
 
@@ -14577,7 +14577,7 @@ class fc {
14577
14577
  * Represents the database ID a Firestore client is associated with.
14578
14578
  * @internal
14579
14579
  */
14580
- class dc {
14580
+ class da {
14581
14581
  constructor(t, e) {
14582
14582
  this.projectId = t, this.database = e || "(default)";
14583
14583
  }
@@ -14585,7 +14585,7 @@ class dc {
14585
14585
  return "(default)" === this.database;
14586
14586
  }
14587
14587
  isEqual(t) {
14588
- return t instanceof dc && t.projectId === this.projectId && t.database === this.database;
14588
+ return t instanceof da && t.projectId === this.projectId && t.database === this.database;
14589
14589
  }
14590
14590
  }
14591
14591
 
@@ -14604,7 +14604,7 @@ class dc {
14604
14604
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14605
14605
  * See the License for the specific language governing permissions and
14606
14606
  * limitations under the License.
14607
- */ const wc = new Map;
14607
+ */ const wa = new Map;
14608
14608
 
14609
14609
  /**
14610
14610
  * An instance map that ensures only one Datastore exists per Firestore
@@ -14626,28 +14626,28 @@ class dc {
14626
14626
  * See the License for the specific language governing permissions and
14627
14627
  * limitations under the License.
14628
14628
  */
14629
- function _c(t, e, n) {
14629
+ function _a(t, e, n) {
14630
14630
  if (!n) throw new j(K.INVALID_ARGUMENT, `Function ${t}() cannot be called with an empty ${e}.`);
14631
14631
  }
14632
14632
 
14633
14633
  /**
14634
14634
  * Validates that two boolean options are not set at the same time.
14635
14635
  * @internal
14636
- */ function mc(t, e, n, s) {
14636
+ */ function ma(t, e, n, s) {
14637
14637
  if (!0 === e && !0 === s) throw new j(K.INVALID_ARGUMENT, `${t} and ${n} cannot be used together.`);
14638
14638
  }
14639
14639
 
14640
14640
  /**
14641
14641
  * Validates that `path` refers to a document (indicated by the fact it contains
14642
14642
  * an even numbers of segments).
14643
- */ function gc(t) {
14643
+ */ function ga(t) {
14644
14644
  if (!St.isDocumentKey(t)) throw new j(K.INVALID_ARGUMENT, `Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`);
14645
14645
  }
14646
14646
 
14647
14647
  /**
14648
14648
  * Validates that `path` refers to a collection (indicated by the fact it
14649
14649
  * contains an odd numbers of segments).
14650
- */ function yc(t) {
14650
+ */ function ya(t) {
14651
14651
  if (St.isDocumentKey(t)) throw new j(K.INVALID_ARGUMENT, `Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`);
14652
14652
  }
14653
14653
 
@@ -14656,7 +14656,7 @@ function _c(t, e, n) {
14656
14656
  * (i.e. excludes Array, Date, etc.).
14657
14657
  */
14658
14658
  /** Returns a string describing the type / value of the provided input. */
14659
- function pc(t) {
14659
+ function pa(t) {
14660
14660
  if (void 0 === t) return "undefined";
14661
14661
  if (null === t) return "null";
14662
14662
  if ("string" == typeof t) return t.length > 20 && (t = `${t.substring(0, 20)}...`),
@@ -14685,7 +14685,7 @@ function pc(t) {
14685
14685
  return "function" == typeof t ? "a function" : L();
14686
14686
  }
14687
14687
 
14688
- function Tc(t,
14688
+ function Ta(t,
14689
14689
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14690
14690
  e) {
14691
14691
  if ("_delegate" in t && (
@@ -14694,14 +14694,14 @@ e) {
14694
14694
  t = t._delegate), !(t instanceof e)) {
14695
14695
  if (e.name === t.constructor.name) throw new j(K.INVALID_ARGUMENT, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
14696
14696
  {
14697
- const n = pc(t);
14697
+ const n = pa(t);
14698
14698
  throw new j(K.INVALID_ARGUMENT, `Expected type '${e.name}', but it was: ${n}`);
14699
14699
  }
14700
14700
  }
14701
14701
  return t;
14702
14702
  }
14703
14703
 
14704
- function Ec(t, e) {
14704
+ function Ea(t, e) {
14705
14705
  if (e <= 0) throw new j(K.INVALID_ARGUMENT, `Function ${t}() requires a positive number, but it was: ${e}.`);
14706
14706
  }
14707
14707
 
@@ -14727,7 +14727,7 @@ function Ec(t, e) {
14727
14727
  * user-supplied `FirestoreSettings` object. This is a separate type so that
14728
14728
  * defaults can be supplied and the value can be checked for equality.
14729
14729
  */
14730
- class Ic {
14730
+ class Ia {
14731
14731
  constructor(t) {
14732
14732
  var e;
14733
14733
  if (void 0 === t.host) {
@@ -14740,7 +14740,7 @@ class Ic {
14740
14740
  this.cacheSizeBytes = t.cacheSizeBytes;
14741
14741
  }
14742
14742
  this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling,
14743
- this.useFetchStreams = !!t.useFetchStreams, mc("experimentalForceLongPolling", t.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t.experimentalAutoDetectLongPolling);
14743
+ this.useFetchStreams = !!t.useFetchStreams, ma("experimentalForceLongPolling", t.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t.experimentalAutoDetectLongPolling);
14744
14744
  }
14745
14745
  isEqual(t) {
14746
14746
  return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;
@@ -14767,18 +14767,18 @@ class Ic {
14767
14767
  * The Cloud Firestore service interface.
14768
14768
  *
14769
14769
  * Do not call this constructor directly. Instead, use {@link getFirestore}.
14770
- */ class Ac {
14770
+ */ class Aa {
14771
14771
  /** @hideconstructor */
14772
14772
  constructor(t, e, n) {
14773
14773
  this._authCredentials = e, this._appCheckCredentials = n,
14774
14774
  /**
14775
14775
  * Whether it's a Firestore or Firestore Lite instance.
14776
14776
  */
14777
- this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Ic({}),
14778
- this._settingsFrozen = !1, t instanceof dc ? this._databaseId = t : (this._app = t,
14777
+ this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Ia({}),
14778
+ this._settingsFrozen = !1, t instanceof da ? this._databaseId = t : (this._app = t,
14779
14779
  this._databaseId = function(t) {
14780
14780
  if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new j(K.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
14781
- return new dc(t.options.projectId);
14781
+ return new da(t.options.projectId);
14782
14782
  }
14783
14783
  /**
14784
14784
  * Modify this instance to communicate with the Cloud Firestore emulator.
@@ -14809,7 +14809,7 @@ class Ic {
14809
14809
  }
14810
14810
  _setSettings(t) {
14811
14811
  if (this._settingsFrozen) throw new j(K.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
14812
- this._settings = new Ic(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
14812
+ this._settings = new Ia(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
14813
14813
  if (!t) return new G;
14814
14814
  switch (t.type) {
14815
14815
  case "gapi":
@@ -14854,15 +14854,15 @@ class Ic {
14854
14854
  * when the `Firestore` instance is terminated.
14855
14855
  */
14856
14856
  return function(t) {
14857
- const e = wc.get(t);
14858
- e && ($("ComponentProvider", "Removing Datastore"), wc.delete(t), e.terminate());
14857
+ const e = wa.get(t);
14858
+ e && ($("ComponentProvider", "Removing Datastore"), wa.delete(t), e.terminate());
14859
14859
  }(this), Promise.resolve();
14860
14860
  }
14861
14861
  }
14862
14862
 
14863
- function Rc(t, e, n, s = {}) {
14863
+ function Ra(t, e, n, s = {}) {
14864
14864
  var i;
14865
- const r = (t = Tc(t, Ac))._getSettings();
14865
+ const r = (t = Ta(t, Aa))._getSettings();
14866
14866
  if ("firestore.googleapis.com" !== r.host && r.host !== e && O("Host has been set in both settings() and useEmulator(), emulator host will be used"),
14867
14867
  t._setSettings(Object.assign(Object.assign({}, r), {
14868
14868
  host: `${e}:${n}`,
@@ -14901,7 +14901,7 @@ function Rc(t, e, n, s = {}) {
14901
14901
  * A `DocumentReference` refers to a document location in a Firestore database
14902
14902
  * and can be used to write, read, or listen to the location. The document at
14903
14903
  * the referenced location may or may not exist.
14904
- */ class Pc {
14904
+ */ class Pa {
14905
14905
  /** @hideconstructor */
14906
14906
  constructor(t,
14907
14907
  /**
@@ -14929,17 +14929,17 @@ function Rc(t, e, n, s = {}) {
14929
14929
  /**
14930
14930
  * The collection this `DocumentReference` belongs to.
14931
14931
  */ get parent() {
14932
- return new vc(this.firestore, this.converter, this._key.path.popLast());
14932
+ return new va(this.firestore, this.converter, this._key.path.popLast());
14933
14933
  }
14934
14934
  withConverter(t) {
14935
- return new Pc(this.firestore, t, this._key);
14935
+ return new Pa(this.firestore, t, this._key);
14936
14936
  }
14937
14937
  }
14938
14938
 
14939
14939
  /**
14940
14940
  * A `Query` refers to a query which you can read or listen to. You can also
14941
14941
  * construct refined `Query` objects by adding filters and ordering.
14942
- */ class bc {
14942
+ */ class ba {
14943
14943
  // This is the lite version of the Query class in the main SDK.
14944
14944
  /** @hideconstructor protected */
14945
14945
  constructor(t,
@@ -14952,14 +14952,14 @@ function Rc(t, e, n, s = {}) {
14952
14952
  this.type = "query", this.firestore = t;
14953
14953
  }
14954
14954
  withConverter(t) {
14955
- return new bc(this.firestore, t, this._query);
14955
+ return new ba(this.firestore, t, this._query);
14956
14956
  }
14957
14957
  }
14958
14958
 
14959
14959
  /**
14960
14960
  * A `CollectionReference` object can be used for adding documents, getting
14961
14961
  * document references, and querying for documents (using {@link query}).
14962
- */ class vc extends bc {
14962
+ */ class va extends ba {
14963
14963
  /** @hideconstructor */
14964
14964
  constructor(t, e, n) {
14965
14965
  super(t, e, ge(n)), this._path = n,
@@ -14980,23 +14980,23 @@ function Rc(t, e, n, s = {}) {
14980
14980
  * subcollection. If this isn't a subcollection, the reference is null.
14981
14981
  */ get parent() {
14982
14982
  const t = this._path.popLast();
14983
- return t.isEmpty() ? null : new Pc(this.firestore,
14983
+ return t.isEmpty() ? null : new Pa(this.firestore,
14984
14984
  /* converter= */ null, new St(t));
14985
14985
  }
14986
14986
  withConverter(t) {
14987
- return new vc(this.firestore, t, this._path);
14987
+ return new va(this.firestore, t, this._path);
14988
14988
  }
14989
14989
  }
14990
14990
 
14991
- function Vc(t, e, ...n) {
14992
- if (t = getModularInstance(t), _c("collection", "path", e), t instanceof Ac) {
14991
+ function Va(t, e, ...n) {
14992
+ if (t = getModularInstance(t), _a("collection", "path", e), t instanceof Aa) {
14993
14993
  const s = dt.fromString(e, ...n);
14994
- return yc(s), new vc(t, /* converter= */ null, s);
14994
+ return ya(s), new va(t, /* converter= */ null, s);
14995
14995
  }
14996
14996
  {
14997
- if (!(t instanceof Pc || t instanceof vc)) throw new j(K.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
14997
+ if (!(t instanceof Pa || t instanceof va)) throw new j(K.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
14998
14998
  const s = t._path.child(dt.fromString(e, ...n));
14999
- return yc(s), new vc(t.firestore,
14999
+ return ya(s), new va(t.firestore,
15000
15000
  /* converter= */ null, s);
15001
15001
  }
15002
15002
  }
@@ -15013,9 +15013,9 @@ function Vc(t, e, ...n) {
15013
15013
  * collection or subcollection with this ID as the last segment of its path
15014
15014
  * will be included. Cannot contain a slash.
15015
15015
  * @returns The created `Query`.
15016
- */ function Sc(t, e) {
15017
- if (t = Tc(t, Ac), _c("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new j(K.INVALID_ARGUMENT, `Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);
15018
- return new bc(t,
15016
+ */ function Sa(t, e) {
15017
+ if (t = Ta(t, Aa), _a("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new j(K.INVALID_ARGUMENT, `Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);
15018
+ return new ba(t,
15019
15019
  /* converter= */ null,
15020
15020
  /**
15021
15021
  * Creates a new Query for a collection group query that matches all documents
@@ -15026,19 +15026,19 @@ function Vc(t, e, ...n) {
15026
15026
  }(e));
15027
15027
  }
15028
15028
 
15029
- function Dc(t, e, ...n) {
15029
+ function Da(t, e, ...n) {
15030
15030
  if (t = getModularInstance(t),
15031
15031
  // We allow omission of 'pathString' but explicitly prohibit passing in both
15032
15032
  // 'undefined' and 'null'.
15033
- 1 === arguments.length && (e = st.A()), _c("doc", "path", e), t instanceof Ac) {
15033
+ 1 === arguments.length && (e = st.A()), _a("doc", "path", e), t instanceof Aa) {
15034
15034
  const s = dt.fromString(e, ...n);
15035
- return gc(s), new Pc(t,
15035
+ return ga(s), new Pa(t,
15036
15036
  /* converter= */ null, new St(s));
15037
15037
  }
15038
15038
  {
15039
- if (!(t instanceof Pc || t instanceof vc)) throw new j(K.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
15039
+ if (!(t instanceof Pa || t instanceof va)) throw new j(K.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
15040
15040
  const s = t._path.child(dt.fromString(e, ...n));
15041
- return gc(s), new Pc(t.firestore, t instanceof vc ? t.converter : null, new St(s));
15041
+ return ga(s), new Pa(t.firestore, t instanceof va ? t.converter : null, new St(s));
15042
15042
  }
15043
15043
  }
15044
15044
 
@@ -15049,8 +15049,8 @@ function Dc(t, e, ...n) {
15049
15049
  * @param right - A reference to compare.
15050
15050
  * @returns true if the references point to the same location in the same
15051
15051
  * Firestore database.
15052
- */ function Cc(t, e) {
15053
- return t = getModularInstance(t), e = getModularInstance(e), (t instanceof Pc || t instanceof vc) && (e instanceof Pc || e instanceof vc) && (t.firestore === e.firestore && t.path === e.path && t.converter === e.converter);
15052
+ */ function Ca(t, e) {
15053
+ return t = getModularInstance(t), e = getModularInstance(e), (t instanceof Pa || t instanceof va) && (e instanceof Pa || e instanceof va) && (t.firestore === e.firestore && t.path === e.path && t.converter === e.converter);
15054
15054
  }
15055
15055
 
15056
15056
  /**
@@ -15061,8 +15061,8 @@ function Dc(t, e, ...n) {
15061
15061
  * @param right - A `Query` to compare.
15062
15062
  * @returns true if the references point to the same location in the same
15063
15063
  * Firestore database.
15064
- */ function Nc(t, e) {
15065
- return t = getModularInstance(t), e = getModularInstance(e), t instanceof bc && e instanceof bc && (t.firestore === e.firestore && be(t._query, e._query) && t.converter === e.converter);
15064
+ */ function Na(t, e) {
15065
+ return t = getModularInstance(t), e = getModularInstance(e), t instanceof ba && e instanceof ba && (t.firestore === e.firestore && be(t._query, e._query) && t.converter === e.converter);
15066
15066
  }
15067
15067
 
15068
15068
  /**
@@ -15080,42 +15080,42 @@ function Dc(t, e, ...n) {
15080
15080
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15081
15081
  * See the License for the specific language governing permissions and
15082
15082
  * limitations under the License.
15083
- */ class kc {
15083
+ */ class ka {
15084
15084
  constructor() {
15085
15085
  // The last promise in the queue.
15086
- this.ma = Promise.resolve(),
15086
+ this.mc = Promise.resolve(),
15087
15087
  // A list of retryable operations. Retryable operations are run in order and
15088
15088
  // retried with backoff.
15089
- this.ga = [],
15089
+ this.gc = [],
15090
15090
  // Is this AsyncQueue being shut down? Once it is set to true, it will not
15091
15091
  // be changed again.
15092
- this.ya = !1,
15092
+ this.yc = !1,
15093
15093
  // Operations scheduled to be queued in the future. Operations are
15094
15094
  // automatically removed after they are run or canceled.
15095
- this.pa = [],
15095
+ this.Tc = [],
15096
15096
  // visible for testing
15097
- this.Ta = null,
15097
+ this.Ec = null,
15098
15098
  // Flag set while there's an outstanding AsyncQueue operation, used for
15099
15099
  // assertion sanity-checks.
15100
- this.Ea = !1,
15100
+ this.Ic = !1,
15101
15101
  // Enabled during shutdown on Safari to prevent future access to IndexedDB.
15102
- this.Ia = !1,
15102
+ this.Ac = !1,
15103
15103
  // List of TimerIds to fast-forward delays for.
15104
- this.Aa = [],
15104
+ this.Rc = [],
15105
15105
  // Backoff timer used to schedule retries for retryable operations
15106
15106
  this.ur = new eo(this, "async_queue_retry" /* AsyncQueueRetry */),
15107
15107
  // Visibility handler that triggers an immediate retry of all retryable
15108
15108
  // operations. Meant to speed up recovery when we regain file system access
15109
15109
  // after page comes into foreground.
15110
- this.Ra = () => {
15110
+ this.Pc = () => {
15111
15111
  const t = Zr();
15112
15112
  t && $("AsyncQueue", "Visibility state changed to " + t.visibilityState), this.ur.er();
15113
15113
  };
15114
15114
  const t = Zr();
15115
- t && "function" == typeof t.addEventListener && t.addEventListener("visibilitychange", this.Ra);
15115
+ t && "function" == typeof t.addEventListener && t.addEventListener("visibilitychange", this.Pc);
15116
15116
  }
15117
15117
  get isShuttingDown() {
15118
- return this.ya;
15118
+ return this.yc;
15119
15119
  }
15120
15120
  /**
15121
15121
  * Adds a new operation to the queue without waiting for it to complete (i.e.
@@ -15125,44 +15125,44 @@ function Dc(t, e, ...n) {
15125
15125
  this.enqueue(t);
15126
15126
  }
15127
15127
  enqueueAndForgetEvenWhileRestricted(t) {
15128
- this.Pa(),
15128
+ this.bc(),
15129
15129
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
15130
- this.ba(t);
15130
+ this.vc(t);
15131
15131
  }
15132
15132
  enterRestrictedMode(t) {
15133
- if (!this.ya) {
15134
- this.ya = !0, this.Ia = t || !1;
15133
+ if (!this.yc) {
15134
+ this.yc = !0, this.Ac = t || !1;
15135
15135
  const e = Zr();
15136
- e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Ra);
15136
+ e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Pc);
15137
15137
  }
15138
15138
  }
15139
15139
  enqueue(t) {
15140
- if (this.Pa(), this.ya)
15140
+ if (this.bc(), this.yc)
15141
15141
  // Return a Promise which never resolves.
15142
15142
  return new Promise((() => {}));
15143
15143
  // Create a deferred Promise that we can return to the callee. This
15144
15144
  // allows us to return a "hanging Promise" only to the callee and still
15145
15145
  // advance the queue even when the operation is not run.
15146
15146
  const e = new Q;
15147
- return this.ba((() => this.ya && this.Ia ? Promise.resolve() : (t().then(e.resolve, e.reject),
15147
+ return this.vc((() => this.yc && this.Ac ? Promise.resolve() : (t().then(e.resolve, e.reject),
15148
15148
  e.promise))).then((() => e.promise));
15149
15149
  }
15150
15150
  enqueueRetryable(t) {
15151
- this.enqueueAndForget((() => (this.ga.push(t), this.va())));
15151
+ this.enqueueAndForget((() => (this.gc.push(t), this.Vc())));
15152
15152
  }
15153
15153
  /**
15154
15154
  * Runs the next operation from the retryable queue. If the operation fails,
15155
15155
  * reschedules with backoff.
15156
- */ async va() {
15157
- if (0 !== this.ga.length) {
15156
+ */ async Vc() {
15157
+ if (0 !== this.gc.length) {
15158
15158
  try {
15159
- await this.ga[0](), this.ga.shift(), this.ur.reset();
15159
+ await this.gc[0](), this.gc.shift(), this.ur.reset();
15160
15160
  } catch (t) {
15161
15161
  if (!Xs(t)) throw t;
15162
15162
  // Failure will be handled by AsyncQueue
15163
15163
  $("AsyncQueue", "Operation failed with retryable error: " + t);
15164
15164
  }
15165
- this.ga.length > 0 &&
15165
+ this.gc.length > 0 &&
15166
15166
  // If there are additional operations, we re-schedule `retryNextOp()`.
15167
15167
  // This is necessary to run retryable operations that failed during
15168
15168
  // their initial attempt since we don't know whether they are already
@@ -15173,12 +15173,12 @@ function Dc(t, e, ...n) {
15173
15173
  // Since `backoffAndRun()` cancels an existing backoff and schedules a
15174
15174
  // new backoff on every call, there is only ever a single additional
15175
15175
  // operation in the queue.
15176
- this.ur.Zi((() => this.va()));
15176
+ this.ur.Zi((() => this.Vc()));
15177
15177
  }
15178
15178
  }
15179
- ba(t) {
15180
- const e = this.ma.then((() => (this.Ea = !0, t().catch((t => {
15181
- this.Ta = t, this.Ea = !1;
15179
+ vc(t) {
15180
+ const e = this.mc.then((() => (this.Ic = !0, t().catch((t => {
15181
+ this.Ec = t, this.Ic = !1;
15182
15182
  const e =
15183
15183
  /**
15184
15184
  * Chrome includes Error.message in Error.stack. Other browsers do not.
@@ -15210,38 +15210,38 @@ function Dc(t, e, ...n) {
15210
15210
  // all further attempts to chain (via .then) will just short-circuit
15211
15211
  // and return the rejected Promise.
15212
15212
  throw F("INTERNAL UNHANDLED ERROR: ", e), t;
15213
- })).then((t => (this.Ea = !1, t))))));
15214
- return this.ma = e, e;
15213
+ })).then((t => (this.Ic = !1, t))))));
15214
+ return this.mc = e, e;
15215
15215
  }
15216
15216
  enqueueAfterDelay(t, e, n) {
15217
- this.Pa(),
15217
+ this.bc(),
15218
15218
  // Fast-forward delays for timerIds that have been overriden.
15219
- this.Aa.indexOf(t) > -1 && (e = 0);
15220
- const s = Fo.createAndSchedule(this, t, e, n, (t => this.Va(t)));
15221
- return this.pa.push(s), s;
15219
+ this.Rc.indexOf(t) > -1 && (e = 0);
15220
+ const s = Fo.createAndSchedule(this, t, e, n, (t => this.Sc(t)));
15221
+ return this.Tc.push(s), s;
15222
15222
  }
15223
- Pa() {
15224
- this.Ta && L();
15223
+ bc() {
15224
+ this.Ec && L();
15225
15225
  }
15226
15226
  verifyOperationInProgress() {}
15227
15227
  /**
15228
15228
  * Waits until all currently queued tasks are finished executing. Delayed
15229
15229
  * operations are not run.
15230
- */ async Sa() {
15230
+ */ async Dc() {
15231
15231
  // Operations in the queue prior to draining may have enqueued additional
15232
15232
  // operations. Keep draining the queue until the tail is no longer advanced,
15233
15233
  // which indicates that no more new operations were enqueued and that all
15234
15234
  // operations were executed.
15235
15235
  let t;
15236
15236
  do {
15237
- t = this.ma, await t;
15238
- } while (t !== this.ma);
15237
+ t = this.mc, await t;
15238
+ } while (t !== this.mc);
15239
15239
  }
15240
15240
  /**
15241
15241
  * For Tests: Determine if a delayed operation with a particular TimerId
15242
15242
  * exists.
15243
- */ Da(t) {
15244
- for (const e of this.pa) if (e.timerId === t) return !0;
15243
+ */ Cc(t) {
15244
+ for (const e of this.Tc) if (e.timerId === t) return !0;
15245
15245
  return !1;
15246
15246
  }
15247
15247
  /**
@@ -15250,28 +15250,28 @@ function Dc(t, e, ...n) {
15250
15250
  * @param lastTimerId - Delayed operations up to and including this TimerId
15251
15251
  * will be drained. Pass TimerId.All to run all delayed operations.
15252
15252
  * @returns a Promise that resolves once all operations have been run.
15253
- */ Ca(t) {
15253
+ */ Nc(t) {
15254
15254
  // Note that draining may generate more delayed ops, so we do that first.
15255
- return this.Sa().then((() => {
15255
+ return this.Dc().then((() => {
15256
15256
  // Run ops in the same order they'd run if they ran naturally.
15257
- this.pa.sort(((t, e) => t.targetTimeMs - e.targetTimeMs));
15258
- for (const e of this.pa) if (e.skipDelay(), "all" /* All */ !== t && e.timerId === t) break;
15259
- return this.Sa();
15257
+ this.Tc.sort(((t, e) => t.targetTimeMs - e.targetTimeMs));
15258
+ for (const e of this.Tc) if (e.skipDelay(), "all" /* All */ !== t && e.timerId === t) break;
15259
+ return this.Dc();
15260
15260
  }));
15261
15261
  }
15262
15262
  /**
15263
15263
  * For Tests: Skip all subsequent delays for a timer id.
15264
- */ Na(t) {
15265
- this.Aa.push(t);
15264
+ */ kc(t) {
15265
+ this.Rc.push(t);
15266
15266
  }
15267
- /** Called once a DelayedOperation is run or canceled. */ Va(t) {
15267
+ /** Called once a DelayedOperation is run or canceled. */ Sc(t) {
15268
15268
  // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.
15269
- const e = this.pa.indexOf(t);
15270
- this.pa.splice(e, 1);
15269
+ const e = this.Tc.indexOf(t);
15270
+ this.Tc.splice(e, 1);
15271
15271
  }
15272
15272
  }
15273
15273
 
15274
- function xc(t) {
15274
+ function xa(t) {
15275
15275
  /**
15276
15276
  * Returns true if obj is an object and contains at least one of the specified
15277
15277
  * methods.
@@ -15306,7 +15306,7 @@ function xc(t) {
15306
15306
  */ (t, [ "next", "error", "complete" ]);
15307
15307
  }
15308
15308
 
15309
- class $c {
15309
+ class $a {
15310
15310
  constructor() {
15311
15311
  this._progressObserver = {}, this._taskCompletionResolver = new Q, this._lastProgress = {
15312
15312
  taskState: "Running",
@@ -15390,27 +15390,27 @@ class $c {
15390
15390
  * See the License for the specific language governing permissions and
15391
15391
  * limitations under the License.
15392
15392
  */
15393
- /** DOMException error code constants. */ const Fc = -1;
15393
+ /** DOMException error code constants. */ const Fa = -1;
15394
15394
 
15395
15395
  /**
15396
15396
  * The Cloud Firestore service interface.
15397
15397
  *
15398
15398
  * Do not call this constructor directly. Instead, use {@link getFirestore}.
15399
15399
  */
15400
- class Oc extends Ac {
15400
+ class Oa extends Aa {
15401
15401
  /** @hideconstructor */
15402
15402
  constructor(t, e, n) {
15403
15403
  super(t, e, n),
15404
15404
  /**
15405
15405
  * Whether it's a {@link Firestore} or Firestore Lite instance.
15406
15406
  */
15407
- this.type = "firestore", this._queue = new kc, this._persistenceKey = "name" in t ? t.name : "[DEFAULT]";
15407
+ this.type = "firestore", this._queue = new ka, this._persistenceKey = "name" in t ? t.name : "[DEFAULT]";
15408
15408
  }
15409
15409
  _terminate() {
15410
15410
  return this._firestoreClient ||
15411
15411
  // The client must be initialized to ensure that all subsequent API
15412
15412
  // usage throws an exception.
15413
- Uc(this), this._firestoreClient.terminate();
15413
+ Ua(this), this._firestoreClient.terminate();
15414
15414
  }
15415
15415
  }
15416
15416
 
@@ -15424,7 +15424,7 @@ class Oc extends Ac {
15424
15424
  * be associated.
15425
15425
  * @param settings - A settings object to configure the {@link Firestore} instance.
15426
15426
  * @returns A newly initialized {@link Firestore} instance.
15427
- */ function Mc(t, e) {
15427
+ */ function Ma(t, e) {
15428
15428
  const n = _getProvider(t, "firestore");
15429
15429
  if (n.isInitialized()) {
15430
15430
  const t = n.getImmediate(), s = n.getOptions();
@@ -15445,22 +15445,22 @@ class Oc extends Ac {
15445
15445
  * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
15446
15446
  * instance is associated with.
15447
15447
  * @returns The {@link Firestore} instance of the provided app.
15448
- */ function Lc(e = getApp()) {
15448
+ */ function La(e = getApp()) {
15449
15449
  return _getProvider(e, "firestore").getImmediate();
15450
15450
  }
15451
15451
 
15452
15452
  /**
15453
15453
  * @internal
15454
- */ function Bc(t) {
15455
- return t._firestoreClient || Uc(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;
15454
+ */ function Ba(t) {
15455
+ return t._firestoreClient || Ua(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;
15456
15456
  }
15457
15457
 
15458
- function Uc(t) {
15458
+ function Ua(t) {
15459
15459
  var e;
15460
15460
  const n = t._freezeSettings(), s = function(t, e, n, s) {
15461
- return new fc(t, e, n, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams);
15461
+ return new fa(t, e, n, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams);
15462
15462
  }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", t._persistenceKey, n);
15463
- t._firestoreClient = new Wa(t._authCredentials, t._appCheckCredentials, t._queue, s);
15463
+ t._firestoreClient = new Wc(t._authCredentials, t._appCheckCredentials, t._queue, s);
15464
15464
  }
15465
15465
 
15466
15466
  /**
@@ -15485,10 +15485,10 @@ function Uc(t) {
15485
15485
  * @param persistenceSettings - Optional settings object to configure
15486
15486
  * persistence.
15487
15487
  * @returns A `Promise` that represents successfully enabling persistent storage.
15488
- */ function qc(t, e) {
15489
- Xc(t = Tc(t, Oc));
15490
- const n = Bc(t), s = t._freezeSettings(), i = new Ba;
15491
- return jc(n, i, new Ma(i, s.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));
15488
+ */ function qa(t, e) {
15489
+ Xa(t = Ta(t, Oa));
15490
+ const n = Ba(t), s = t._freezeSettings(), i = new Bc;
15491
+ return ja(n, i, new Mc(i, s.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));
15492
15492
  }
15493
15493
 
15494
15494
  /**
@@ -15512,10 +15512,10 @@ function Uc(t) {
15512
15512
  * @param firestore - The {@link Firestore} instance to enable persistence for.
15513
15513
  * @returns A `Promise` that represents successfully enabling persistent
15514
15514
  * storage.
15515
- */ function Kc(t) {
15516
- Xc(t = Tc(t, Oc));
15517
- const e = Bc(t), n = t._freezeSettings(), s = new Ba;
15518
- return jc(e, s, new La(s, n.cacheSizeBytes));
15515
+ */ function Ka(t) {
15516
+ Xa(t = Ta(t, Oa));
15517
+ const e = Ba(t), n = t._freezeSettings(), s = new Bc;
15518
+ return ja(e, s, new Lc(s, n.cacheSizeBytes));
15519
15519
  }
15520
15520
 
15521
15521
  /**
@@ -15523,11 +15523,11 @@ function Uc(t) {
15523
15523
  * If the operation fails with a recoverable error (see
15524
15524
  * `canRecoverFromIndexedDbError()` below), the returned Promise is rejected
15525
15525
  * but the client remains usable.
15526
- */ function jc(t, e, n) {
15526
+ */ function ja(t, e, n) {
15527
15527
  const s = new Q;
15528
15528
  return t.asyncQueue.enqueue((async () => {
15529
15529
  try {
15530
- await Ga(t, n), await za(t, e), s.resolve();
15530
+ await Gc(t, n), await zc(t, e), s.resolve();
15531
15531
  } catch (t) {
15532
15532
  if (!
15533
15533
  /**
@@ -15581,7 +15581,7 @@ function Uc(t) {
15581
15581
  })).then((() => s.promise));
15582
15582
  }
15583
15583
 
15584
- function Qc(t) {
15584
+ function Qa(t) {
15585
15585
  if (t._initialized && !t._terminated) throw new j(K.FAILED_PRECONDITION, "Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");
15586
15586
  const e = new Q;
15587
15587
  return t._queue.enqueueAndForgetEvenWhileRestricted((async () => {
@@ -15612,11 +15612,11 @@ function Qc(t) {
15612
15612
  *
15613
15613
  * @returns A `Promise` which resolves when all currently pending writes have been
15614
15614
  * acknowledged by the backend.
15615
- */ function Wc(t) {
15615
+ */ function Wa(t) {
15616
15616
  return function(t) {
15617
15617
  const e = new Q;
15618
- return t.asyncQueue.enqueueAndForget((async () => wa(await tc(t), e))), e.promise;
15619
- }(Bc(t = Tc(t, Oc)));
15618
+ return t.asyncQueue.enqueueAndForget((async () => wc(await ta(t), e))), e.promise;
15619
+ }(Ba(t = Ta(t, Oa)));
15620
15620
  }
15621
15621
 
15622
15622
  /**
@@ -15624,8 +15624,8 @@ function Qc(t) {
15624
15624
  * call to {@link disableNetwork}.
15625
15625
  *
15626
15626
  * @returns A `Promise` that is resolved once the network has been enabled.
15627
- */ function Gc(t) {
15628
- return nc(Bc(t = Tc(t, Oc)));
15627
+ */ function Ga(t) {
15628
+ return na(Ba(t = Ta(t, Oa)));
15629
15629
  }
15630
15630
 
15631
15631
  /**
@@ -15635,8 +15635,8 @@ function Qc(t) {
15635
15635
  * operations will be queued until the network is restored.
15636
15636
  *
15637
15637
  * @returns A `Promise` that is resolved once the network has been disabled.
15638
- */ function zc(t) {
15639
- return sc(Bc(t = Tc(t, Oc)));
15638
+ */ function za(t) {
15639
+ return sa(Ba(t = Ta(t, Oa)));
15640
15640
  }
15641
15641
 
15642
15642
  /**
@@ -15660,7 +15660,7 @@ function Qc(t) {
15660
15660
  *
15661
15661
  * @returns A `Promise` that is resolved when the instance has been successfully
15662
15662
  * terminated.
15663
- */ function Hc(t) {
15663
+ */ function Ha(t) {
15664
15664
  return _removeServiceInstance(t.app, "firestore"), t._delete();
15665
15665
  }
15666
15666
 
@@ -15674,9 +15674,9 @@ function Qc(t) {
15674
15674
  * @returns
15675
15675
  * A `LoadBundleTask` object, which notifies callers with progress updates, and completion
15676
15676
  * or error events. It can be used as a `Promise<LoadBundleTaskProgress>`.
15677
- */ function Jc(t, e) {
15678
- const n = Bc(t = Tc(t, Oc)), s = new $c;
15679
- return hc(n, t._databaseId, e, s), s;
15677
+ */ function Ja(t, e) {
15678
+ const n = Ba(t = Ta(t, Oa)), s = new $a;
15679
+ return ha(n, t._databaseId, e, s), s;
15680
15680
  }
15681
15681
 
15682
15682
  /**
@@ -15685,11 +15685,11 @@ function Qc(t) {
15685
15685
  * The named queries are packaged into bundles on the server side (along
15686
15686
  * with resulting documents), and loaded to local cache using `loadBundle`. Once in local
15687
15687
  * cache, use this method to extract a {@link Query} by name.
15688
- */ function Yc(t, e) {
15689
- return lc(Bc(t = Tc(t, Oc)), e).then((e => e ? new bc(t, null, e.query) : null));
15688
+ */ function Ya(t, e) {
15689
+ return la(Ba(t = Ta(t, Oa)), e).then((e => e ? new ba(t, null, e.query) : null));
15690
15690
  }
15691
15691
 
15692
- function Xc(t) {
15692
+ function Xa(t) {
15693
15693
  if (t._initialized || t._terminated) throw new j(K.FAILED_PRECONDITION, "Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.");
15694
15694
  }
15695
15695
 
@@ -15733,7 +15733,7 @@ function Xc(t) {
15733
15733
  * Create a `FieldPath` by providing field names. If more than one field
15734
15734
  * name is provided, the path will point to a nested field in a document.
15735
15735
  */
15736
- class Zc {
15736
+ class Za {
15737
15737
  /**
15738
15738
  * Creates a `FieldPath` from the provided field names. If more than one field
15739
15739
  * name is provided, the path will point to a nested field in a document.
@@ -15758,7 +15758,7 @@ class Zc {
15758
15758
  * Returns a special sentinel `FieldPath` to refer to the ID of a document.
15759
15759
  * It can be used in queries to sort or filter by the document ID.
15760
15760
  */ function tu() {
15761
- return new Zc("__name__");
15761
+ return new Za("__name__");
15762
15762
  }
15763
15763
 
15764
15764
  /**
@@ -15966,7 +15966,7 @@ class Zc {
15966
15966
  }
15967
15967
  }
15968
15968
 
15969
- function au(t) {
15969
+ function cu(t) {
15970
15970
  switch (t) {
15971
15971
  case 0 /* Set */ :
15972
15972
  // fall through
@@ -15984,7 +15984,7 @@ function au(t) {
15984
15984
  }
15985
15985
  }
15986
15986
 
15987
- /** A "context" object passed around while parsing user data. */ class cu {
15987
+ /** A "context" object passed around while parsing user data. */ class au {
15988
15988
  /**
15989
15989
  * Initializes a ParseContext with the given source and path.
15990
15990
  *
@@ -16007,55 +16007,55 @@ function au(t) {
16007
16007
  this.settings = t, this.databaseId = e, this.k = n, this.ignoreUndefinedProperties = s,
16008
16008
  // Minor hack: If fieldTransforms is undefined, we assume this is an
16009
16009
  // external call and we need to validate the entire path.
16010
- void 0 === i && this.ka(), this.fieldTransforms = i || [], this.fieldMask = r || [];
16010
+ void 0 === i && this.xc(), this.fieldTransforms = i || [], this.fieldMask = r || [];
16011
16011
  }
16012
16012
  get path() {
16013
16013
  return this.settings.path;
16014
16014
  }
16015
- get xa() {
16016
- return this.settings.xa;
16015
+ get $c() {
16016
+ return this.settings.$c;
16017
16017
  }
16018
- /** Returns a new context with the specified settings overwritten. */ $a(t) {
16019
- return new cu(Object.assign(Object.assign({}, this.settings), t), this.databaseId, this.k, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
16018
+ /** Returns a new context with the specified settings overwritten. */ Fc(t) {
16019
+ return new au(Object.assign(Object.assign({}, this.settings), t), this.databaseId, this.k, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
16020
16020
  }
16021
- Fa(t) {
16021
+ Oc(t) {
16022
16022
  var e;
16023
- const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), s = this.$a({
16023
+ const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), s = this.Fc({
16024
16024
  path: n,
16025
- Oa: !1
16025
+ Mc: !1
16026
16026
  });
16027
- return s.Ma(t), s;
16027
+ return s.Lc(t), s;
16028
16028
  }
16029
- La(t) {
16029
+ Bc(t) {
16030
16030
  var e;
16031
- const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), s = this.$a({
16031
+ const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), s = this.Fc({
16032
16032
  path: n,
16033
- Oa: !1
16033
+ Mc: !1
16034
16034
  });
16035
- return s.ka(), s;
16035
+ return s.xc(), s;
16036
16036
  }
16037
- Ba(t) {
16037
+ Uc(t) {
16038
16038
  // TODO(b/34871131): We don't support array paths right now; so make path
16039
16039
  // undefined.
16040
- return this.$a({
16040
+ return this.Fc({
16041
16041
  path: void 0,
16042
- Oa: !0
16042
+ Mc: !0
16043
16043
  });
16044
16044
  }
16045
- Ua(t) {
16046
- return Vu(t, this.settings.methodName, this.settings.qa || !1, this.path, this.settings.Ka);
16045
+ qc(t) {
16046
+ return Vu(t, this.settings.methodName, this.settings.Kc || !1, this.path, this.settings.jc);
16047
16047
  }
16048
16048
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t) {
16049
16049
  return void 0 !== this.fieldMask.find((e => t.isPrefixOf(e))) || void 0 !== this.fieldTransforms.find((e => t.isPrefixOf(e.field)));
16050
16050
  }
16051
- ka() {
16051
+ xc() {
16052
16052
  // TODO(b/34871131): Remove null check once we have proper paths for fields
16053
16053
  // within arrays.
16054
- if (this.path) for (let t = 0; t < this.path.length; t++) this.Ma(this.path.get(t));
16054
+ if (this.path) for (let t = 0; t < this.path.length; t++) this.Lc(this.path.get(t));
16055
16055
  }
16056
- Ma(t) {
16057
- if (0 === t.length) throw this.Ua("Document fields must not be empty");
16058
- if (au(this.xa) && iu.test(t)) throw this.Ua('Document fields cannot begin and end with "__"');
16056
+ Lc(t) {
16057
+ if (0 === t.length) throw this.qc("Document fields must not be empty");
16058
+ if (cu(this.$c) && iu.test(t)) throw this.qc('Document fields cannot begin and end with "__"');
16059
16059
  }
16060
16060
  }
16061
16061
 
@@ -16066,14 +16066,14 @@ function au(t) {
16066
16066
  constructor(t, e, n) {
16067
16067
  this.databaseId = t, this.ignoreUndefinedProperties = e, this.k = n || to(t);
16068
16068
  }
16069
- /** Creates a new top-level parse context. */ ja(t, e, n, s = !1) {
16070
- return new cu({
16071
- xa: t,
16069
+ /** Creates a new top-level parse context. */ Qc(t, e, n, s = !1) {
16070
+ return new au({
16071
+ $c: t,
16072
16072
  methodName: e,
16073
- Ka: n,
16073
+ jc: n,
16074
16074
  path: _t.emptyPath(),
16075
- Oa: !1,
16076
- qa: s
16075
+ Mc: !1,
16076
+ Kc: s
16077
16077
  }, this.databaseId, this.k, this.ignoreUndefinedProperties);
16078
16078
  }
16079
16079
  }
@@ -16084,25 +16084,25 @@ function hu(t) {
16084
16084
  }
16085
16085
 
16086
16086
  /** Parse document data from a set() call. */ function lu(t, e, n, s, i, r = {}) {
16087
- const o = t.ja(r.merge || r.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
16087
+ const o = t.Qc(r.merge || r.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
16088
16088
  Ru("Data must be an object, but it was:", o, s);
16089
- const a = Iu(s, o);
16090
- let c, u;
16091
- if (r.merge) c = new mt(o.fieldMask), u = o.fieldTransforms; else if (r.mergeFields) {
16089
+ const c = Iu(s, o);
16090
+ let a, u;
16091
+ if (r.merge) a = new mt(o.fieldMask), u = o.fieldTransforms; else if (r.mergeFields) {
16092
16092
  const t = [];
16093
16093
  for (const s of r.mergeFields) {
16094
16094
  const i = Pu(e, s, n);
16095
16095
  if (!o.contains(i)) throw new j(K.INVALID_ARGUMENT, `Field '${i}' is specified in your field mask but missing from your input data.`);
16096
16096
  Su(t, i) || t.push(i);
16097
16097
  }
16098
- c = new mt(t), u = o.fieldTransforms.filter((t => c.covers(t.field)));
16099
- } else c = null, u = o.fieldTransforms;
16100
- return new ru(new jt(a), c, u);
16098
+ a = new mt(t), u = o.fieldTransforms.filter((t => a.covers(t.field)));
16099
+ } else a = null, u = o.fieldTransforms;
16100
+ return new ru(new jt(c), a, u);
16101
16101
  }
16102
16102
 
16103
16103
  class fu extends nu {
16104
16104
  _toFieldTransform(t) {
16105
- if (2 /* MergeSet */ !== t.xa) throw 1 /* Update */ === t.xa ? t.Ua(`${this._methodName}() can only appear at the top level of your update data`) : t.Ua(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
16105
+ if (2 /* MergeSet */ !== t.$c) throw 1 /* Update */ === t.$c ? t.qc(`${this._methodName}() can only appear at the top level of your update data`) : t.qc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
16106
16106
  // No transform to add for a delete, but we need to add it to our
16107
16107
  // fieldMask so it gets deleted.
16108
16108
  return t.fieldMask.push(t.path), null;
@@ -16128,11 +16128,11 @@ class fu extends nu {
16128
16128
  * @param context - The parent context.
16129
16129
  * @param arrayElement - Whether or not the FieldValue has an array.
16130
16130
  */ function du(t, e, n) {
16131
- return new cu({
16132
- xa: 3 /* Argument */ ,
16133
- Ka: e.settings.Ka,
16131
+ return new au({
16132
+ $c: 3 /* Argument */ ,
16133
+ jc: e.settings.jc,
16134
16134
  methodName: t._methodName,
16135
- Oa: n
16135
+ Mc: n
16136
16136
  }, e.databaseId, e.k, e.ignoreUndefinedProperties);
16137
16137
  }
16138
16138
 
@@ -16147,11 +16147,11 @@ class wu extends nu {
16147
16147
 
16148
16148
  class _u extends nu {
16149
16149
  constructor(t, e) {
16150
- super(t), this.Qa = e;
16150
+ super(t), this.Wc = e;
16151
16151
  }
16152
16152
  _toFieldTransform(t) {
16153
16153
  const e = du(this, t,
16154
- /*array=*/ !0), n = this.Qa.map((t => Eu(t, e))), s = new Be(n);
16154
+ /*array=*/ !0), n = this.Wc.map((t => Eu(t, e))), s = new Be(n);
16155
16155
  return new Ge(t.path, s);
16156
16156
  }
16157
16157
  isEqual(t) {
@@ -16162,11 +16162,11 @@ class _u extends nu {
16162
16162
 
16163
16163
  class mu extends nu {
16164
16164
  constructor(t, e) {
16165
- super(t), this.Qa = e;
16165
+ super(t), this.Wc = e;
16166
16166
  }
16167
16167
  _toFieldTransform(t) {
16168
16168
  const e = du(this, t,
16169
- /*array=*/ !0), n = this.Qa.map((t => Eu(t, e))), s = new qe(n);
16169
+ /*array=*/ !0), n = this.Wc.map((t => Eu(t, e))), s = new qe(n);
16170
16170
  return new Ge(t.path, s);
16171
16171
  }
16172
16172
  isEqual(t) {
@@ -16177,10 +16177,10 @@ class mu extends nu {
16177
16177
 
16178
16178
  class gu extends nu {
16179
16179
  constructor(t, e) {
16180
- super(t), this.Wa = e;
16180
+ super(t), this.Gc = e;
16181
16181
  }
16182
16182
  _toFieldTransform(t) {
16183
- const e = new je(t.k, xe(t.k, this.Wa));
16183
+ const e = new je(t.k, xe(t.k, this.Gc));
16184
16184
  return new Ge(t.path, e);
16185
16185
  }
16186
16186
  isEqual(t) {
@@ -16190,40 +16190,40 @@ class gu extends nu {
16190
16190
  }
16191
16191
 
16192
16192
  /** Parse update data from an update() call. */ function yu(t, e, n, s) {
16193
- const i = t.ja(1 /* Update */ , e, n);
16193
+ const i = t.Qc(1 /* Update */ , e, n);
16194
16194
  Ru("Data must be an object, but it was:", i, s);
16195
16195
  const r = [], o = jt.empty();
16196
16196
  ht(s, ((t, s) => {
16197
- const a = vu(e, t, n);
16197
+ const c = vu(e, t, n);
16198
16198
  // For Compat types, we have to "extract" the underlying types before
16199
16199
  // performing validation.
16200
16200
  s = getModularInstance(s);
16201
- const c = i.La(a);
16201
+ const a = i.Bc(c);
16202
16202
  if (s instanceof fu)
16203
16203
  // Add it to the field mask, but don't add anything to updateData.
16204
- r.push(a); else {
16205
- const t = Eu(s, c);
16206
- null != t && (r.push(a), o.set(a, t));
16204
+ r.push(c); else {
16205
+ const t = Eu(s, a);
16206
+ null != t && (r.push(c), o.set(c, t));
16207
16207
  }
16208
16208
  }));
16209
- const a = new mt(r);
16210
- return new ou(o, a, i.fieldTransforms);
16209
+ const c = new mt(r);
16210
+ return new ou(o, c, i.fieldTransforms);
16211
16211
  }
16212
16212
 
16213
16213
  /** Parse update data from a list of field/value arguments. */ function pu(t, e, n, s, i, r) {
16214
- const o = t.ja(1 /* Update */ , e, n), a = [ Pu(e, s, n) ], c = [ i ];
16214
+ const o = t.Qc(1 /* Update */ , e, n), c = [ Pu(e, s, n) ], a = [ i ];
16215
16215
  if (r.length % 2 != 0) throw new j(K.INVALID_ARGUMENT, `Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);
16216
- for (let t = 0; t < r.length; t += 2) a.push(Pu(e, r[t])), c.push(r[t + 1]);
16216
+ for (let t = 0; t < r.length; t += 2) c.push(Pu(e, r[t])), a.push(r[t + 1]);
16217
16217
  const u = [], h = jt.empty();
16218
16218
  // We iterate in reverse order to pick the last value for a field if the
16219
16219
  // user specified the field multiple times.
16220
- for (let t = a.length - 1; t >= 0; --t) if (!Su(u, a[t])) {
16221
- const e = a[t];
16222
- let n = c[t];
16220
+ for (let t = c.length - 1; t >= 0; --t) if (!Su(u, c[t])) {
16221
+ const e = c[t];
16222
+ let n = a[t];
16223
16223
  // For Compat types, we have to "extract" the underlying types before
16224
16224
  // performing validation.
16225
16225
  n = getModularInstance(n);
16226
- const s = o.La(e);
16226
+ const s = o.Bc(e);
16227
16227
  if (n instanceof fu)
16228
16228
  // Add it to the field mask, but don't add anything to updateData.
16229
16229
  u.push(e); else {
@@ -16242,7 +16242,7 @@ class gu extends nu {
16242
16242
  * @param allowArrays - Whether the query value is an array that may directly
16243
16243
  * contain additional arrays (e.g. the operand of an `in` query).
16244
16244
  */ function Tu(t, e, n, s = !1) {
16245
- return Eu(n, t.ja(s ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
16245
+ return Eu(n, t.Qc(s ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
16246
16246
  }
16247
16247
 
16248
16248
  /**
@@ -16270,8 +16270,8 @@ class gu extends nu {
16270
16270
  */
16271
16271
  return function(t, e) {
16272
16272
  // Sentinels are only supported with writes, and not within arrays.
16273
- if (!au(e.xa)) throw e.Ua(`${t._methodName}() can only be used with update() and set()`);
16274
- if (!e.path) throw e.Ua(`${t._methodName}() is not currently supported inside arrays`);
16273
+ if (!cu(e.$c)) throw e.qc(`${t._methodName}() can only be used with update() and set()`);
16274
+ if (!e.path) throw e.qc(`${t._methodName}() is not currently supported inside arrays`);
16275
16275
  const n = t._toFieldTransform(e);
16276
16276
  n && e.fieldTransforms.push(n);
16277
16277
  }
@@ -16295,12 +16295,12 @@ class gu extends nu {
16295
16295
  // the set of values to be included for the IN query) that may directly
16296
16296
  // contain additional arrays (each representing an individual field
16297
16297
  // value), so we disable this validation.
16298
- if (e.settings.Oa && 4 /* ArrayArgument */ !== e.xa) throw e.Ua("Nested arrays are not supported");
16298
+ if (e.settings.Mc && 4 /* ArrayArgument */ !== e.$c) throw e.qc("Nested arrays are not supported");
16299
16299
  return function(t, e) {
16300
16300
  const n = [];
16301
16301
  let s = 0;
16302
16302
  for (const i of t) {
16303
- let t = Eu(i, e.Ba(s));
16303
+ let t = Eu(i, e.Uc(s));
16304
16304
  null == t && (
16305
16305
  // Just include nulls in the array for fields being replaced with a
16306
16306
  // sentinel.
@@ -16327,16 +16327,16 @@ class gu extends nu {
16327
16327
  stringValue: t
16328
16328
  };
16329
16329
  if (t instanceof Date) {
16330
- const n = at.fromDate(t);
16330
+ const n = ct.fromDate(t);
16331
16331
  return {
16332
16332
  timestampValue: jn(e.k, n)
16333
16333
  };
16334
16334
  }
16335
- if (t instanceof at) {
16335
+ if (t instanceof ct) {
16336
16336
  // Firestore backend truncates precision down to microseconds. To ensure
16337
16337
  // offline mode works the same with regards to truncation, perform the
16338
16338
  // truncation immediately without waiting for the backend to do that.
16339
- const n = new at(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
16339
+ const n = new ct(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
16340
16340
  return {
16341
16341
  timestampValue: jn(e.k, n)
16342
16342
  };
@@ -16350,14 +16350,14 @@ class gu extends nu {
16350
16350
  if (t instanceof eu) return {
16351
16351
  bytesValue: Qn(e.k, t._byteString)
16352
16352
  };
16353
- if (t instanceof Pc) {
16353
+ if (t instanceof Pa) {
16354
16354
  const n = e.databaseId, s = t.firestore._databaseId;
16355
- if (!s.isEqual(n)) throw e.Ua(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${n.projectId}/${n.database}`);
16355
+ if (!s.isEqual(n)) throw e.qc(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${n.projectId}/${n.database}`);
16356
16356
  return {
16357
16357
  referenceValue: zn(t.firestore._databaseId || e.databaseId, t._key.path)
16358
16358
  };
16359
16359
  }
16360
- throw e.Ua(`Unsupported field value: ${pc(t)}`);
16360
+ throw e.qc(`Unsupported field value: ${pa(t)}`);
16361
16361
  }
16362
16362
  /**
16363
16363
  * Checks whether an object looks like a JSON object that should be converted
@@ -16374,7 +16374,7 @@ function Iu(t, e) {
16374
16374
  // If we encounter an empty object, we explicitly add it to the update
16375
16375
  // mask to ensure that the server creates a map entry.
16376
16376
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : ht(t, ((t, s) => {
16377
- const i = Eu(s, e.Fa(t));
16377
+ const i = Eu(s, e.Oc(t));
16378
16378
  null != i && (n[t] = i);
16379
16379
  })), {
16380
16380
  mapValue: {
@@ -16384,15 +16384,15 @@ function Iu(t, e) {
16384
16384
  }
16385
16385
 
16386
16386
  function Au(t) {
16387
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof at || t instanceof su || t instanceof eu || t instanceof Pc || t instanceof nu);
16387
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof ct || t instanceof su || t instanceof eu || t instanceof Pa || t instanceof nu);
16388
16388
  }
16389
16389
 
16390
16390
  function Ru(t, e, n) {
16391
16391
  if (!Au(n) || !function(t) {
16392
16392
  return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
16393
16393
  }(n)) {
16394
- const s = pc(n);
16395
- throw "an object" === s ? e.Ua(t + " a custom object") : e.Ua(t + " " + s);
16394
+ const s = pa(n);
16395
+ throw "an object" === s ? e.qc(t + " a custom object") : e.qc(t + " " + s);
16396
16396
  }
16397
16397
  }
16398
16398
 
@@ -16402,7 +16402,7 @@ function Ru(t, e, n) {
16402
16402
  if ((
16403
16403
  // If required, replace the FieldPath Compat class with with the firestore-exp
16404
16404
  // FieldPath.
16405
- e = getModularInstance(e)) instanceof Zc) return e._internalPath;
16405
+ e = getModularInstance(e)) instanceof Za) return e._internalPath;
16406
16406
  if ("string" == typeof e) return vu(t, e);
16407
16407
  throw Vu("Field path arguments must be of type string or FieldPath.", t,
16408
16408
  /* hasConverter= */ !1,
@@ -16426,7 +16426,7 @@ function Ru(t, e, n) {
16426
16426
  /* hasConverter= */ !1,
16427
16427
  /* path= */ void 0, n);
16428
16428
  try {
16429
- return new Zc(...e.split("."))._internalPath;
16429
+ return new Za(...e.split("."))._internalPath;
16430
16430
  } catch (s) {
16431
16431
  throw Vu(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t,
16432
16432
  /* hasConverter= */ !1,
@@ -16436,11 +16436,11 @@ function Ru(t, e, n) {
16436
16436
 
16437
16437
  function Vu(t, e, n, s, i) {
16438
16438
  const r = s && !s.isEmpty(), o = void 0 !== i;
16439
- let a = `Function ${e}() called with invalid data`;
16440
- n && (a += " (via `toFirestore()`)"), a += ". ";
16441
- let c = "";
16442
- return (r || o) && (c += " (found", r && (c += ` in field ${s}`), o && (c += ` in document ${i}`),
16443
- c += ")"), new j(K.INVALID_ARGUMENT, a + t + c);
16439
+ let c = `Function ${e}() called with invalid data`;
16440
+ n && (c += " (via `toFirestore()`)"), c += ". ";
16441
+ let a = "";
16442
+ return (r || o) && (a += " (found", r && (a += ` in field ${s}`), o && (a += ` in document ${i}`),
16443
+ a += ")"), new j(K.INVALID_ARGUMENT, c + t + a);
16444
16444
  }
16445
16445
 
16446
16446
  /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */ function Su(t, e) {
@@ -16487,7 +16487,7 @@ function Vu(t, e, n, s, i) {
16487
16487
  /**
16488
16488
  * The `DocumentReference` for the document included in the `DocumentSnapshot`.
16489
16489
  */ get ref() {
16490
- return new Pc(this._firestore, this._converter, this._key);
16490
+ return new Pa(this._firestore, this._converter, this._key);
16491
16491
  }
16492
16492
  /**
16493
16493
  * Signals whether or not the document at the snapshot's location exists.
@@ -16558,7 +16558,7 @@ function Vu(t, e, n, s, i) {
16558
16558
  /**
16559
16559
  * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.
16560
16560
  */ function Nu(t, e) {
16561
- return "string" == typeof e ? vu(t, e) : e instanceof Zc ? e._internalPath : e._delegate._internalPath;
16561
+ return "string" == typeof e ? vu(t, e) : e instanceof Za ? e._internalPath : e._delegate._internalPath;
16562
16562
  }
16563
16563
 
16564
16564
  /**
@@ -16795,7 +16795,7 @@ function Ou(t) {
16795
16795
  * @param right - A snapshot to compare.
16796
16796
  * @returns true if the snapshots are equal.
16797
16797
  */ function Mu(t, e) {
16798
- return t instanceof xu && e instanceof xu ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Fu && e instanceof Fu && (t._firestore === e._firestore && Nc(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot));
16798
+ return t instanceof xu && e instanceof xu ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Fu && e instanceof Fu && (t._firestore === e._firestore && Na(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot));
16799
16799
  }
16800
16800
 
16801
16801
  /**
@@ -16841,27 +16841,27 @@ function Ou(t) {
16841
16841
 
16842
16842
  class qu extends Bu {
16843
16843
  constructor(t, e, n) {
16844
- super(), this.Ga = t, this.za = e, this.Ha = n, this.type = "where";
16844
+ super(), this.zc = t, this.Hc = e, this.Jc = n, this.type = "where";
16845
16845
  }
16846
16846
  _apply(t) {
16847
16847
  const e = hu(t.firestore), n = function(t, e, n, s, i, r, o) {
16848
- let a;
16848
+ let c;
16849
16849
  if (i.isKeyField()) {
16850
16850
  if ("array-contains" /* ARRAY_CONTAINS */ === r || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === r) throw new j(K.INVALID_ARGUMENT, `Invalid Query. You can't perform '${r}' queries on FieldPath.documentId().`);
16851
16851
  if ("in" /* IN */ === r || "not-in" /* NOT_IN */ === r) {
16852
16852
  sh(o, r);
16853
16853
  const e = [];
16854
16854
  for (const n of o) e.push(nh(s, t, n));
16855
- a = {
16855
+ c = {
16856
16856
  arrayValue: {
16857
16857
  values: e
16858
16858
  }
16859
16859
  };
16860
- } else a = nh(s, t, o);
16860
+ } else c = nh(s, t, o);
16861
16861
  } else "in" /* IN */ !== r && "not-in" /* NOT_IN */ !== r && "array-contains-any" /* ARRAY_CONTAINS_ANY */ !== r || sh(o, r),
16862
- a = Tu(n, e, o,
16862
+ c = Tu(n, e, o,
16863
16863
  /* allowArrays= */ "in" /* IN */ === r || "not-in" /* NOT_IN */ === r);
16864
- const c = Zt.create(i, r, a);
16864
+ const a = Zt.create(i, r, c);
16865
16865
  return function(t, e) {
16866
16866
  if (e.V()) {
16867
16867
  const n = Ee(t);
@@ -16909,9 +16909,9 @@ class qu extends Bu {
16909
16909
  if (null !== n)
16910
16910
  // Special case when it's a duplicate op to give a slightly clearer error message.
16911
16911
  throw n === e.op ? new j(K.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${e.op.toString()}' filter.`) : new j(K.INVALID_ARGUMENT, `Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`);
16912
- }(t, c), c;
16913
- }(t._query, "where", e, t.firestore._databaseId, this.Ga, this.za, this.Ha);
16914
- return new bc(t.firestore, t.converter, function(t, e) {
16912
+ }(t, a), a;
16913
+ }(t._query, "where", e, t.firestore._databaseId, this.zc, this.Hc, this.Jc);
16914
+ return new ba(t.firestore, t.converter, function(t, e) {
16915
16915
  const n = t.filters.concat([ e ]);
16916
16916
  return new _e(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
16917
16917
  }(t._query, n));
@@ -16935,7 +16935,7 @@ class qu extends Bu {
16935
16935
 
16936
16936
  class ju extends Bu {
16937
16937
  constructor(t, e) {
16938
- super(), this.Ga = t, this.Ja = e, this.type = "orderBy";
16938
+ super(), this.zc = t, this.Yc = e, this.type = "orderBy";
16939
16939
  }
16940
16940
  _apply(t) {
16941
16941
  const e = function(t, e, n) {
@@ -16960,8 +16960,8 @@ class ju extends Bu {
16960
16960
  * Will throw if the document does not contain all fields of the order by
16961
16961
  * of the query or if any of the fields in the order by are an uncommitted
16962
16962
  * server timestamp.
16963
- */ (t._query, this.Ga, this.Ja);
16964
- return new bc(t.firestore, t.converter, function(t, e) {
16963
+ */ (t._query, this.zc, this.Yc);
16964
+ return new ba(t.firestore, t.converter, function(t, e) {
16965
16965
  // TODO(dimond): validate that orderBy does not list the same key twice.
16966
16966
  const n = t.explicitOrderBy.concat([ e ]);
16967
16967
  return new _e(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
@@ -16984,10 +16984,10 @@ class ju extends Bu {
16984
16984
 
16985
16985
  class Wu extends Bu {
16986
16986
  constructor(t, e, n) {
16987
- super(), this.type = t, this.Ya = e, this.Xa = n;
16987
+ super(), this.type = t, this.Xc = e, this.Zc = n;
16988
16988
  }
16989
16989
  _apply(t) {
16990
- return new bc(t.firestore, t.converter, Pe(t._query, this.Ya, this.Xa));
16990
+ return new ba(t.firestore, t.converter, Pe(t._query, this.Xc, this.Zc));
16991
16991
  }
16992
16992
  }
16993
16993
 
@@ -16997,7 +16997,7 @@ class Wu extends Bu {
16997
16997
  * @param limit - The maximum number of items to return.
16998
16998
  * @returns The created {@link Query}.
16999
16999
  */ function Gu(t) {
17000
- return Ec("limit", t), new Wu("limit", t, "F" /* First */);
17000
+ return Ea("limit", t), new Wu("limit", t, "F" /* First */);
17001
17001
  }
17002
17002
 
17003
17003
  /**
@@ -17009,16 +17009,16 @@ class Wu extends Bu {
17009
17009
  * @param limit - The maximum number of items to return.
17010
17010
  * @returns The created {@link Query}.
17011
17011
  */ function zu(t) {
17012
- return Ec("limitToLast", t), new Wu("limitToLast", t, "L" /* Last */);
17012
+ return Ea("limitToLast", t), new Wu("limitToLast", t, "L" /* Last */);
17013
17013
  }
17014
17014
 
17015
17015
  class Hu extends Bu {
17016
17016
  constructor(t, e, n) {
17017
- super(), this.type = t, this.Za = e, this.tc = n;
17017
+ super(), this.type = t, this.ta = e, this.ea = n;
17018
17018
  }
17019
17019
  _apply(t) {
17020
- const e = eh(t, this.type, this.Za, this.tc);
17021
- return new bc(t.firestore, t.converter, function(t, e) {
17020
+ const e = eh(t, this.type, this.ta, this.ea);
17021
+ return new ba(t.firestore, t.converter, function(t, e) {
17022
17022
  return new _e(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
17023
17023
  }(t._query, e));
17024
17024
  }
@@ -17035,11 +17035,11 @@ function Yu(...t) {
17035
17035
 
17036
17036
  class Xu extends Bu {
17037
17037
  constructor(t, e, n) {
17038
- super(), this.type = t, this.Za = e, this.tc = n;
17038
+ super(), this.type = t, this.ta = e, this.ea = n;
17039
17039
  }
17040
17040
  _apply(t) {
17041
- const e = eh(t, this.type, this.Za, this.tc);
17042
- return new bc(t.firestore, t.converter, function(t, e) {
17041
+ const e = eh(t, this.type, this.ta, this.ea);
17042
+ return new ba(t.firestore, t.converter, function(t, e) {
17043
17043
  return new _e(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
17044
17044
  }(t._query, e));
17045
17045
  }
@@ -17084,22 +17084,22 @@ function th(...t) {
17084
17084
  // Use explicit order by's because it has to match the query the user made
17085
17085
  const o = t.explicitOrderBy;
17086
17086
  if (i.length > o.length) throw new j(K.INVALID_ARGUMENT, `Too many arguments provided to ${s}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);
17087
- const a = [];
17087
+ const c = [];
17088
17088
  for (let r = 0; r < i.length; r++) {
17089
- const c = i[r];
17089
+ const a = i[r];
17090
17090
  if (o[r].field.isKeyField()) {
17091
- if ("string" != typeof c) throw new j(K.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${s}(), but got a ${typeof c}`);
17092
- if (!Ie(t) && -1 !== c.indexOf("/")) throw new j(K.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to ${s}() must be a plain document ID, but '${c}' contains a slash.`);
17093
- const n = t.path.child(dt.fromString(c));
17091
+ if ("string" != typeof a) throw new j(K.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${s}(), but got a ${typeof a}`);
17092
+ if (!Ie(t) && -1 !== a.indexOf("/")) throw new j(K.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to ${s}() must be a plain document ID, but '${a}' contains a slash.`);
17093
+ const n = t.path.child(dt.fromString(a));
17094
17094
  if (!St.isDocumentKey(n)) throw new j(K.INVALID_ARGUMENT, `Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to ${s}() must result in a valid document path, but '${n}' is not because it contains an odd number of segments.`);
17095
17095
  const i = new St(n);
17096
- a.push(Ot(e, i));
17096
+ c.push(Ot(e, i));
17097
17097
  } else {
17098
- const t = Tu(n, s, c);
17099
- a.push(t);
17098
+ const t = Tu(n, s, a);
17099
+ c.push(t);
17100
17100
  }
17101
17101
  }
17102
- return new ue(a, r);
17102
+ return new ue(c, r);
17103
17103
  }
17104
17104
  /**
17105
17105
  * Parses the given `documentIdValue` into a `ReferenceValue`, throwing
@@ -17117,8 +17117,8 @@ function nh(t, e, n) {
17117
17117
  if (!St.isDocumentKey(s)) throw new j(K.INVALID_ARGUMENT, `Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '${s}' is not because it has an odd number of segments (${s.length}).`);
17118
17118
  return Ot(t, new St(s));
17119
17119
  }
17120
- if (n instanceof Pc) return Ot(t, n._key);
17121
- throw new j(K.INVALID_ARGUMENT, `Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: ${pc(n)}.`);
17120
+ if (n instanceof Pa) return Ot(t, n._key);
17121
+ throw new j(K.INVALID_ARGUMENT, `Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: ${pa(n)}.`);
17122
17122
  }
17123
17123
 
17124
17124
  /**
@@ -17221,12 +17221,12 @@ function ih(t, e, n) {
17221
17221
  }
17222
17222
  convertTimestamp(t) {
17223
17223
  const e = Tt(t);
17224
- return new at(e.seconds, e.nanos);
17224
+ return new ct(e.seconds, e.nanos);
17225
17225
  }
17226
17226
  convertDocumentKey(t, e) {
17227
17227
  const n = dt.fromString(t);
17228
17228
  B(As(n));
17229
- const s = new dc(n.get(1), n.get(3)), i = new St(n.popFirst(5));
17229
+ const s = new da(n.get(1), n.get(3)), i = new St(n.popFirst(5));
17230
17230
  return s.isEqual(e) ||
17231
17231
  // TODO(b/64130202): Somehow support foreign references.
17232
17232
  F(`Document ${i} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),
@@ -17267,7 +17267,7 @@ function ih(t, e, n) {
17267
17267
  s;
17268
17268
  }
17269
17269
 
17270
- class ah extends rh {
17270
+ class ch extends rh {
17271
17271
  constructor(t) {
17272
17272
  super(), this.firestore = t;
17273
17273
  }
@@ -17276,7 +17276,7 @@ class ah extends rh {
17276
17276
  }
17277
17277
  convertReference(t) {
17278
17278
  const e = this.convertDocumentKey(t, this.firestore._databaseId);
17279
- return new Pc(this.firestore, /* converter= */ null, e);
17279
+ return new Pa(this.firestore, /* converter= */ null, e);
17280
17280
  }
17281
17281
  }
17282
17282
 
@@ -17303,7 +17303,7 @@ class ah extends rh {
17303
17303
  * provides methods for adding writes to the write batch. None of the writes
17304
17304
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
17305
17305
  * called.
17306
- */ class ch {
17306
+ */ class ah {
17307
17307
  /** @hideconstructor */
17308
17308
  constructor(t, e) {
17309
17309
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
@@ -17320,7 +17320,7 @@ class ah extends rh {
17320
17320
  // For Compat types, we have to "extract" the underlying types before
17321
17321
  // performing validation.
17322
17322
  let r;
17323
- return r = "string" == typeof (e = getModularInstance(e)) || e instanceof Zc ? pu(this._dataReader, "WriteBatch.update", i._key, e, n, s) : yu(this._dataReader, "WriteBatch.update", i._key, e),
17323
+ return r = "string" == typeof (e = getModularInstance(e)) || e instanceof Za ? pu(this._dataReader, "WriteBatch.update", i._key, e, n, s) : yu(this._dataReader, "WriteBatch.update", i._key, e),
17324
17324
  this._mutations.push(r.toMutation(i._key, Je.exists(!0))), this;
17325
17325
  }
17326
17326
  /**
@@ -17411,9 +17411,9 @@ function uh(t, e) {
17411
17411
  * current document contents.
17412
17412
  */
17413
17413
  function hh(t) {
17414
- t = Tc(t, Pc);
17415
- const e = Tc(t.firestore, Oc);
17416
- return rc(Bc(e), t._key).then((n => Rh(e, t, n)));
17414
+ t = Ta(t, Pa);
17415
+ const e = Ta(t.firestore, Oa);
17416
+ return ra(Ba(e), t._key).then((n => Rh(e, t, n)));
17417
17417
  }
17418
17418
 
17419
17419
  class lh extends rh {
@@ -17425,7 +17425,7 @@ class lh extends rh {
17425
17425
  }
17426
17426
  convertReference(t) {
17427
17427
  const e = this.convertDocumentKey(t, this.firestore._databaseId);
17428
- return new Pc(this.firestore, /* converter= */ null, e);
17428
+ return new Pa(this.firestore, /* converter= */ null, e);
17429
17429
  }
17430
17430
  }
17431
17431
 
@@ -17436,9 +17436,9 @@ class lh extends rh {
17436
17436
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
17437
17437
  * current document contents.
17438
17438
  */ function fh(t) {
17439
- t = Tc(t, Pc);
17440
- const e = Tc(t.firestore, Oc), n = Bc(e), s = new lh(e);
17441
- return ic(n, t._key).then((n => new xu(e, s, t._key, n, new ku(null !== n && n.hasLocalMutations,
17439
+ t = Ta(t, Pa);
17440
+ const e = Ta(t.firestore, Oa), n = Ba(e), s = new lh(e);
17441
+ return ia(n, t._key).then((n => new xu(e, s, t._key, n, new ku(null !== n && n.hasLocalMutations,
17442
17442
  /* fromCache= */ !0), t.converter)));
17443
17443
  }
17444
17444
 
@@ -17449,9 +17449,9 @@ class lh extends rh {
17449
17449
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
17450
17450
  * current document contents.
17451
17451
  */ function dh(t) {
17452
- t = Tc(t, Pc);
17453
- const e = Tc(t.firestore, Oc);
17454
- return rc(Bc(e), t._key, {
17452
+ t = Ta(t, Pa);
17453
+ const e = Ta(t.firestore, Oa);
17454
+ return ra(Ba(e), t._key, {
17455
17455
  source: "server"
17456
17456
  }).then((n => Rh(e, t, n)));
17457
17457
  }
@@ -17466,9 +17466,9 @@ class lh extends rh {
17466
17466
  *
17467
17467
  * @returns A `Promise` that will be resolved with the results of the query.
17468
17468
  */ function wh(t) {
17469
- t = Tc(t, bc);
17470
- const e = Tc(t.firestore, Oc), n = Bc(e), s = new lh(e);
17471
- return Lu(t._query), ac(n, t._query).then((n => new Fu(e, s, t, n)));
17469
+ t = Ta(t, ba);
17470
+ const e = Ta(t.firestore, Oa), n = Ba(e), s = new lh(e);
17471
+ return Lu(t._query), ca(n, t._query).then((n => new Fu(e, s, t, n)));
17472
17472
  }
17473
17473
 
17474
17474
  /**
@@ -17477,9 +17477,9 @@ class lh extends rh {
17477
17477
  *
17478
17478
  * @returns A `Promise` that will be resolved with the results of the query.
17479
17479
  */ function _h(t) {
17480
- t = Tc(t, bc);
17481
- const e = Tc(t.firestore, Oc), n = Bc(e), s = new lh(e);
17482
- return oc(n, t._query).then((n => new Fu(e, s, t, n)));
17480
+ t = Ta(t, ba);
17481
+ const e = Ta(t.firestore, Oa), n = Ba(e), s = new lh(e);
17482
+ return oa(n, t._query).then((n => new Fu(e, s, t, n)));
17483
17483
  }
17484
17484
 
17485
17485
  /**
@@ -17488,27 +17488,27 @@ class lh extends rh {
17488
17488
  *
17489
17489
  * @returns A `Promise` that will be resolved with the results of the query.
17490
17490
  */ function mh(t) {
17491
- t = Tc(t, bc);
17492
- const e = Tc(t.firestore, Oc), n = Bc(e), s = new lh(e);
17493
- return ac(n, t._query, {
17491
+ t = Ta(t, ba);
17492
+ const e = Ta(t.firestore, Oa), n = Ba(e), s = new lh(e);
17493
+ return ca(n, t._query, {
17494
17494
  source: "server"
17495
17495
  }).then((n => new Fu(e, s, t, n)));
17496
17496
  }
17497
17497
 
17498
17498
  function gh(t, e, n) {
17499
- t = Tc(t, Pc);
17500
- const s = Tc(t.firestore, Oc), i = oh(t.converter, e, n);
17499
+ t = Ta(t, Pa);
17500
+ const s = Ta(t.firestore, Oa), i = oh(t.converter, e, n);
17501
17501
  return Ah(s, [ lu(hu(s), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, Je.none()) ]);
17502
17502
  }
17503
17503
 
17504
17504
  function yh(t, e, n, ...s) {
17505
- t = Tc(t, Pc);
17506
- const i = Tc(t.firestore, Oc), r = hu(i);
17505
+ t = Ta(t, Pa);
17506
+ const i = Ta(t.firestore, Oa), r = hu(i);
17507
17507
  let o;
17508
17508
  o = "string" == typeof (
17509
17509
  // For Compat types, we have to "extract" the underlying types before
17510
17510
  // performing validation.
17511
- e = getModularInstance(e)) || e instanceof Zc ? pu(r, "updateDoc", t._key, e, n, s) : yu(r, "updateDoc", t._key, e);
17511
+ e = getModularInstance(e)) || e instanceof Za ? pu(r, "updateDoc", t._key, e, n, s) : yu(r, "updateDoc", t._key, e);
17512
17512
  return Ah(i, [ o.toMutation(t._key, Je.exists(!0)) ]);
17513
17513
  }
17514
17514
 
@@ -17519,7 +17519,7 @@ function yh(t, e, n, ...s) {
17519
17519
  * @returns A Promise resolved once the document has been successfully
17520
17520
  * deleted from the backend (note that it won't resolve while you're offline).
17521
17521
  */ function ph(t) {
17522
- return Ah(Tc(t.firestore, Oc), [ new hn(t._key, Je.none()) ]);
17522
+ return Ah(Ta(t.firestore, Oa), [ new hn(t._key, Je.none()) ]);
17523
17523
  }
17524
17524
 
17525
17525
  /**
@@ -17532,7 +17532,7 @@ function yh(t, e, n, ...s) {
17532
17532
  * newly created document after it has been written to the backend (Note that it
17533
17533
  * won't resolve while you're offline).
17534
17534
  */ function Th(t, e) {
17535
- const n = Tc(t.firestore, Oc), s = Dc(t), i = oh(t.converter, e);
17535
+ const n = Ta(t.firestore, Oa), s = Da(t), i = oh(t.converter, e);
17536
17536
  return Ah(n, [ lu(hu(t.firestore), "addDoc", s._key, i, null !== t.converter, {}).toMutation(s._key, Je.exists(!1)) ]).then((() => s));
17537
17537
  }
17538
17538
 
@@ -17542,27 +17542,27 @@ function Eh(t, ...e) {
17542
17542
  let r = {
17543
17543
  includeMetadataChanges: !1
17544
17544
  }, o = 0;
17545
- "object" != typeof e[o] || xc(e[o]) || (r = e[o], o++);
17546
- const a = {
17545
+ "object" != typeof e[o] || xa(e[o]) || (r = e[o], o++);
17546
+ const c = {
17547
17547
  includeMetadataChanges: r.includeMetadataChanges
17548
17548
  };
17549
- if (xc(e[o])) {
17549
+ if (xa(e[o])) {
17550
17550
  const t = e[o];
17551
17551
  e[o] = null === (n = t.next) || void 0 === n ? void 0 : n.bind(t), e[o + 1] = null === (s = t.error) || void 0 === s ? void 0 : s.bind(t),
17552
17552
  e[o + 2] = null === (i = t.complete) || void 0 === i ? void 0 : i.bind(t);
17553
17553
  }
17554
- let c, u, h;
17555
- if (t instanceof Pc) u = Tc(t.firestore, Oc), h = ge(t._key.path), c = {
17554
+ let a, u, h;
17555
+ if (t instanceof Pa) u = Ta(t.firestore, Oa), h = ge(t._key.path), a = {
17556
17556
  next: n => {
17557
17557
  e[o] && e[o](Rh(u, t, n));
17558
17558
  },
17559
17559
  error: e[o + 1],
17560
17560
  complete: e[o + 2]
17561
17561
  }; else {
17562
- const n = Tc(t, bc);
17563
- u = Tc(n.firestore, Oc), h = n._query;
17562
+ const n = Ta(t, ba);
17563
+ u = Ta(n.firestore, Oa), h = n._query;
17564
17564
  const s = new lh(u);
17565
- c = {
17565
+ a = {
17566
17566
  next: t => {
17567
17567
  e[o] && e[o](new Fu(u, s, n, t));
17568
17568
  },
@@ -17571,15 +17571,15 @@ function Eh(t, ...e) {
17571
17571
  }, Lu(t._query);
17572
17572
  }
17573
17573
  return function(t, e, n, s) {
17574
- const i = new qa(s), r = new zo(e, i, n);
17575
- return t.asyncQueue.enqueueAndForget((async () => Ko(await ec(t), r))), () => {
17576
- i.na(), t.asyncQueue.enqueueAndForget((async () => jo(await ec(t), r)));
17574
+ const i = new qc(s), r = new zo(e, i, n);
17575
+ return t.asyncQueue.enqueueAndForget((async () => Ko(await ea(t), r))), () => {
17576
+ i.nc(), t.asyncQueue.enqueueAndForget((async () => jo(await ea(t), r)));
17577
17577
  };
17578
- }(Bc(u), h, a, c);
17578
+ }(Ba(u), h, c, a);
17579
17579
  }
17580
17580
 
17581
17581
  function Ih(t, e) {
17582
- return cc(Bc(t = Tc(t, Oc)), xc(e) ? e : {
17582
+ return aa(Ba(t = Ta(t, Oa)), xa(e) ? e : {
17583
17583
  next: e
17584
17584
  });
17585
17585
  }
@@ -17590,8 +17590,8 @@ function Ih(t, e) {
17590
17590
  */ function Ah(t, e) {
17591
17591
  return function(t, e) {
17592
17592
  const n = new Q;
17593
- return t.asyncQueue.enqueueAndForget((async () => ca(await tc(t), e, n))), n.promise;
17594
- }(Bc(t), e);
17593
+ return t.asyncQueue.enqueueAndForget((async () => ac(await ta(t), e, n))), n.promise;
17594
+ }(Ba(t), e);
17595
17595
  }
17596
17596
 
17597
17597
  /**
@@ -17635,7 +17635,7 @@ function Ih(t, e) {
17635
17635
  * @param documentRef - A reference to the document to be read.
17636
17636
  * @returns A `DocumentSnapshot` with the read data.
17637
17637
  */ get(t) {
17638
- const e = uh(t, this._firestore), n = new ah(this._firestore);
17638
+ const e = uh(t, this._firestore), n = new ch(this._firestore);
17639
17639
  return this._transaction.lookup([ e._key ]).then((t => {
17640
17640
  if (!t || 1 !== t.length) return L();
17641
17641
  const s = t[0];
@@ -17653,7 +17653,7 @@ function Ih(t, e) {
17653
17653
  // For Compat types, we have to "extract" the underlying types before
17654
17654
  // performing validation.
17655
17655
  let r;
17656
- return r = "string" == typeof (e = getModularInstance(e)) || e instanceof Zc ? pu(this._dataReader, "Transaction.update", i._key, e, n, s) : yu(this._dataReader, "Transaction.update", i._key, e),
17656
+ return r = "string" == typeof (e = getModularInstance(e)) || e instanceof Za ? pu(this._dataReader, "Transaction.update", i._key, e, n, s) : yu(this._dataReader, "Transaction.update", i._key, e),
17657
17657
  this._transaction.update(i._key, r), this;
17658
17658
  }
17659
17659
  /**
@@ -17702,7 +17702,7 @@ function Ih(t, e) {
17702
17702
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
17703
17703
  * rejected promise with the corresponding failure error is returned.
17704
17704
  */ function bh(t, e) {
17705
- return uc(Bc(t = Tc(t, Oc)), (n => e(new Ph(t, n))));
17705
+ return ua(Ba(t = Ta(t, Oa)), (n => e(new Ph(t, n))));
17706
17706
  }
17707
17707
 
17708
17708
  /**
@@ -17817,7 +17817,7 @@ function Ih(t, e) {
17817
17817
  * @returns A {@link WriteBatch} that can be used to atomically execute multiple
17818
17818
  * writes.
17819
17819
  */ function Nh(t) {
17820
- return Bc(t = Tc(t, Oc)), new ch(t, (e => Ah(t, e)));
17820
+ return Ba(t = Ta(t, Oa)), new ah(t, (e => Ah(t, e)));
17821
17821
  }
17822
17822
 
17823
17823
  /**
@@ -17828,14 +17828,14 @@ function Ih(t, e) {
17828
17828
  !function(t) {
17829
17829
  C = t;
17830
17830
  }(SDK_VERSION), _registerComponent(new Component("firestore", ((t, {options: n}) => {
17831
- const s = t.getProvider("app").getImmediate(), i = new Oc(s, new H(t.getProvider("auth-internal")), new Z(t.getProvider("app-check-internal")));
17831
+ const s = t.getProvider("app").getImmediate(), i = new Oa(s, new H(t.getProvider("auth-internal")), new Z(t.getProvider("app-check-internal")));
17832
17832
  return n = Object.assign({
17833
17833
  useFetchStreams: e
17834
17834
  }, n), i._setSettings(n), i;
17835
- }), "PUBLIC")), registerVersion(S, "3.4.0-canary.8d9a09e18", t),
17835
+ }), "PUBLIC")), registerVersion(S, "3.4.0-canary.fd8cd3ec4", t),
17836
17836
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
17837
- registerVersion(S, "3.4.0-canary.8d9a09e18", "esm2017");
17837
+ registerVersion(S, "3.4.0-canary.fd8cd3ec4", "esm2017");
17838
17838
  }();
17839
17839
 
17840
- export { rh as AbstractUserDataWriter, eu as Bytes, Fc as CACHE_SIZE_UNLIMITED, vc as CollectionReference, Pc as DocumentReference, xu as DocumentSnapshot, Zc as FieldPath, nu as FieldValue, Oc as Firestore, j as FirestoreError, su as GeoPoint, $c as LoadBundleTask, bc as Query, Bu as QueryConstraint, $u as QueryDocumentSnapshot, Fu as QuerySnapshot, ku as SnapshotMetadata, at as Timestamp, Ph as Transaction, ch as WriteBatch, dc as _DatabaseId, St as _DocumentKey, tt as _EmptyAppCheckTokenProvider, G as _EmptyAuthCredentialsProvider, _t as _FieldPath, Tc as _cast, U as _debugAssert, gt as _isBase64Available, O as _logWarn, mc as _validateIsNotUsedTogether, Th as addDoc, Dh as arrayRemove, Sh as arrayUnion, Qc as clearIndexedDbPersistence, Vc as collection, Sc as collectionGroup, Rc as connectFirestoreEmulator, ph as deleteDoc, vh as deleteField, zc as disableNetwork, Dc as doc, tu as documentId, qc as enableIndexedDbPersistence, Kc as enableMultiTabIndexedDbPersistence, Gc as enableNetwork, th as endAt, Zu as endBefore, Bc as ensureFirestoreConfigured, Ah as executeWrite, hh as getDoc, fh as getDocFromCache, dh as getDocFromServer, wh as getDocs, _h as getDocsFromCache, mh as getDocsFromServer, Lc as getFirestore, Ch as increment, Mc as initializeFirestore, Gu as limit, zu as limitToLast, Jc as loadBundle, Yc as namedQuery, Eh as onSnapshot, Ih as onSnapshotsInSync, Qu as orderBy, Uu as query, Nc as queryEqual, Cc as refEqual, bh as runTransaction, Vh as serverTimestamp, gh as setDoc, x as setLogLevel, Mu as snapshotEqual, Yu as startAfter, Ju as startAt, Hc as terminate, yh as updateDoc, Wc as waitForPendingWrites, Ku as where, Nh as writeBatch };
17840
+ export { rh as AbstractUserDataWriter, eu as Bytes, Fa as CACHE_SIZE_UNLIMITED, va as CollectionReference, Pa as DocumentReference, xu as DocumentSnapshot, Za as FieldPath, nu as FieldValue, Oa as Firestore, j as FirestoreError, su as GeoPoint, $a as LoadBundleTask, ba as Query, Bu as QueryConstraint, $u as QueryDocumentSnapshot, Fu as QuerySnapshot, ku as SnapshotMetadata, ct as Timestamp, Ph as Transaction, ah as WriteBatch, da as _DatabaseId, St as _DocumentKey, tt as _EmptyAppCheckTokenProvider, G as _EmptyAuthCredentialsProvider, _t as _FieldPath, Ta as _cast, U as _debugAssert, gt as _isBase64Available, O as _logWarn, ma as _validateIsNotUsedTogether, Th as addDoc, Dh as arrayRemove, Sh as arrayUnion, Qa as clearIndexedDbPersistence, Va as collection, Sa as collectionGroup, Ra as connectFirestoreEmulator, ph as deleteDoc, vh as deleteField, za as disableNetwork, Da as doc, tu as documentId, qa as enableIndexedDbPersistence, Ka as enableMultiTabIndexedDbPersistence, Ga as enableNetwork, th as endAt, Zu as endBefore, Ba as ensureFirestoreConfigured, Ah as executeWrite, hh as getDoc, fh as getDocFromCache, dh as getDocFromServer, wh as getDocs, _h as getDocsFromCache, mh as getDocsFromServer, La as getFirestore, Ch as increment, Ma as initializeFirestore, Gu as limit, zu as limitToLast, Ja as loadBundle, Ya as namedQuery, Eh as onSnapshot, Ih as onSnapshotsInSync, Qu as orderBy, Uu as query, Na as queryEqual, Ca as refEqual, bh as runTransaction, Vh as serverTimestamp, gh as setDoc, x as setLogLevel, Mu as snapshotEqual, Yu as startAfter, Ju as startAt, Ha as terminate, yh as updateDoc, Wa as waitForPendingWrites, Ku as where, Nh as writeBatch };
17841
17841
  //# sourceMappingURL=index.esm2017.js.map