@firebase/firestore 3.8.3-canary.d5d78cbcf → 3.8.3-canary.e2bf2eca2

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 @@ m.MOCK_USER = new m("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let p = "9.17.1-canary.d5d78cbcf";
69
+ let p = "9.17.1-canary.e2bf2eca2";
70
70
 
71
71
  /**
72
72
  * @license
@@ -803,6 +803,54 @@ function lt(t, e) {
803
803
  if (e <= 0) throw new B($, `Function ${t}() requires a positive number, but it was: ${e}.`);
804
804
  }
805
805
 
806
+ /**
807
+ * @license
808
+ * Copyright 2023 Google LLC
809
+ *
810
+ * Licensed under the Apache License, Version 2.0 (the "License");
811
+ * you may not use this file except in compliance with the License.
812
+ * You may obtain a copy of the License at
813
+ *
814
+ * http://www.apache.org/licenses/LICENSE-2.0
815
+ *
816
+ * Unless required by applicable law or agreed to in writing, software
817
+ * distributed under the License is distributed on an "AS IS" BASIS,
818
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
819
+ * See the License for the specific language governing permissions and
820
+ * limitations under the License.
821
+ */
822
+ /**
823
+ * The value returned from the most recent invocation of
824
+ * `generateUniqueDebugId()`, or null if it has never been invoked.
825
+ */ let ft = null;
826
+
827
+ /**
828
+ * Generates and returns an initial value for `lastUniqueDebugId`.
829
+ *
830
+ * The returned value is randomly selected from a range of integers that are
831
+ * represented as 8 hexadecimal digits. This means that (within reason) any
832
+ * numbers generated by incrementing the returned number by 1 will also be
833
+ * represented by 8 hexadecimal digits. This leads to all "IDs" having the same
834
+ * length when converted to a hexadecimal string, making reading logs containing
835
+ * these IDs easier to follow. And since the return value is randomly selected
836
+ * it will help to differentiate between logs from different executions.
837
+ */
838
+ /**
839
+ * Generates and returns a unique ID as a hexadecimal string.
840
+ *
841
+ * The returned ID is intended to be used in debug logging messages to help
842
+ * correlate log messages that may be spatially separated in the logs, but
843
+ * logically related. For example, a network connection could include the same
844
+ * "debug ID" string in all of its log messages to help trace a specific
845
+ * connection over time.
846
+ *
847
+ * @return the 10-character generated ID (e.g. "0xa1b2c3d4").
848
+ */
849
+ function dt() {
850
+ return null === ft ? ft = 268435456 + Math.round(2147483648 * Math.random()) : ft++,
851
+ "0x" + ft.toString(16);
852
+ }
853
+
806
854
  /**
807
855
  * @license
808
856
  * Copyright 2017 Google LLC
@@ -821,11 +869,11 @@ function lt(t, e) {
821
869
  */
822
870
  /**
823
871
  * Returns whether a variable is either undefined or null.
824
- */ function ft(t) {
872
+ */ function wt(t) {
825
873
  return null == t;
826
874
  }
827
875
 
828
- /** Returns whether the value represents -0. */ function dt(t) {
876
+ /** Returns whether the value represents -0. */ function mt(t) {
829
877
  // Detect if the value is -0.0. Based on polyfill from
830
878
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
831
879
  return 0 === t && 1 / t == -1 / 0;
@@ -851,7 +899,7 @@ function lt(t, e) {
851
899
  * See the License for the specific language governing permissions and
852
900
  * limitations under the License.
853
901
  */
854
- const wt = {
902
+ const pt = {
855
903
  BatchGetDocuments: "batchGet",
856
904
  Commit: "commit",
857
905
  RunQuery: "runQuery",
@@ -889,7 +937,7 @@ const wt = {
889
937
  * are used for reverse lookups from the webchannel stream. Do NOT change the
890
938
  * names of these identifiers or change this into a const enum.
891
939
  */
892
- var mt, pt;
940
+ var yt, gt;
893
941
 
894
942
  /**
895
943
  * Converts an HTTP Status Code to the equivalent error code.
@@ -898,7 +946,7 @@ var mt, pt;
898
946
  * @returns The equivalent Code. Unknown status codes are mapped to
899
947
  * Code.UNKNOWN.
900
948
  */
901
- function yt(t) {
949
+ function _t(t) {
902
950
  if (void 0 === t) return v("RPC_ERROR", "HTTP error has no status"), V;
903
951
  // The canonical error codes for Google APIs [1] specify mapping onto HTTP
904
952
  // status codes but the mapping is not bijective. In each case of ambiguity
@@ -991,16 +1039,16 @@ function yt(t) {
991
1039
  /**
992
1040
  * A Rest-based connection that relies on the native HTTP stack
993
1041
  * (e.g. `fetch` or a polyfill).
994
- */ (pt = mt || (mt = {}))[pt.OK = 0] = "OK", pt[pt.CANCELLED = 1] = "CANCELLED",
995
- pt[pt.UNKNOWN = 2] = "UNKNOWN", pt[pt.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
996
- pt[pt.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", pt[pt.NOT_FOUND = 5] = "NOT_FOUND",
997
- pt[pt.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", pt[pt.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
998
- pt[pt.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", pt[pt.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
999
- pt[pt.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", pt[pt.ABORTED = 10] = "ABORTED",
1000
- pt[pt.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", pt[pt.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
1001
- pt[pt.INTERNAL = 13] = "INTERNAL", pt[pt.UNAVAILABLE = 14] = "UNAVAILABLE", pt[pt.DATA_LOSS = 15] = "DATA_LOSS";
1042
+ */ (gt = yt || (yt = {}))[gt.OK = 0] = "OK", gt[gt.CANCELLED = 1] = "CANCELLED",
1043
+ gt[gt.UNKNOWN = 2] = "UNKNOWN", gt[gt.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
1044
+ gt[gt.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", gt[gt.NOT_FOUND = 5] = "NOT_FOUND",
1045
+ gt[gt.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", gt[gt.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
1046
+ gt[gt.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", gt[gt.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
1047
+ gt[gt.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", gt[gt.ABORTED = 10] = "ABORTED",
1048
+ gt[gt.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", gt[gt.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
1049
+ gt[gt.INTERNAL = 13] = "INTERNAL", gt[gt.UNAVAILABLE = 14] = "UNAVAILABLE", gt[gt.DATA_LOSS = 15] = "DATA_LOSS";
1002
1050
 
1003
- class gt extends
1051
+ class vt extends
1004
1052
  /**
1005
1053
  * Base class for all Rest-based connections to the backend (WebChannel and
1006
1054
  * HTTP).
@@ -1017,12 +1065,12 @@ class {
1017
1065
  return !1;
1018
1066
  }
1019
1067
  A(t, e, n, r, s) {
1020
- const i = this.I(t, e);
1021
- _("RestConnection", "Sending: ", i, n);
1022
- const o = {};
1023
- return this.T(o, r, s), this.R(t, i, o, n).then((t => (_("RestConnection", "Received: ", t),
1024
- t)), (e => {
1025
- throw b("RestConnection", `${t} failed with error: `, e, "url: ", i, "request:", n),
1068
+ const i = dt(), o = this.I(t, e);
1069
+ _("RestConnection", `Sending RPC '${t}' ${i}:`, o, n);
1070
+ const u = {};
1071
+ return this.T(u, r, s), this.R(t, o, u, n).then((e => (_("RestConnection", `Received RPC '${t}' ${i}: `, e),
1072
+ e)), (e => {
1073
+ throw b("RestConnection", `RPC '${t}' ${i} failed with error: `, e, "url: ", o, "request:", n),
1026
1074
  e;
1027
1075
  }));
1028
1076
  }
@@ -1044,7 +1092,7 @@ class {
1044
1092
  e && e.headers.forEach(((e, n) => t[n] = e)), n && n.headers.forEach(((e, n) => t[n] = e));
1045
1093
  }
1046
1094
  I(t, e) {
1047
- const n = wt[t];
1095
+ const n = pt[t];
1048
1096
  return `${this.p}/v1/${e}:${n}`;
1049
1097
  }
1050
1098
  } {
@@ -1070,13 +1118,13 @@ class {
1070
1118
  });
1071
1119
  } catch (t) {
1072
1120
  const e = t;
1073
- throw new B(yt(e.status), "Request failed with error: " + e.statusText);
1121
+ throw new B(_t(e.status), "Request failed with error: " + e.statusText);
1074
1122
  }
1075
1123
  if (!o.ok) {
1076
1124
  let t = await o.json();
1077
1125
  Array.isArray(t) && (t = t[0]);
1078
1126
  const e = null === (s = null == t ? void 0 : t.error) || void 0 === s ? void 0 : s.message;
1079
- throw new B(yt(o.status), `Request failed with error: ${null != e ? e : o.statusText}`);
1127
+ throw new B(_t(o.status), `Request failed with error: ${null != e ? e : o.statusText}`);
1080
1128
  }
1081
1129
  return o.json();
1082
1130
  }
@@ -1115,12 +1163,12 @@ class {
1115
1163
  * See the License for the specific language governing permissions and
1116
1164
  * limitations under the License.
1117
1165
  */
1118
- const _t = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1166
+ const bt = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1119
1167
 
1120
1168
  /**
1121
1169
  * An alias for aggregation results.
1122
1170
  * @internal
1123
- */ class vt {
1171
+ */ class Et {
1124
1172
  /**
1125
1173
  * @internal
1126
1174
  * @param alias Un-escaped alias representation
@@ -1131,13 +1179,13 @@ const _t = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1131
1179
  /**
1132
1180
  * Returns true if the string could be used as an alias.
1133
1181
  */ static N(t) {
1134
- return _t.test(t);
1182
+ return bt.test(t);
1135
1183
  }
1136
1184
  /**
1137
1185
  * Return an escaped and quoted string representation of the alias.
1138
1186
  */ canonicalString() {
1139
1187
  let t = this.alias.replace(/\\/g, "\\\\").replace(/`/g, "\\`");
1140
- return vt.N(t) || (t = "`" + t + "`"), t;
1188
+ return Et.N(t) || (t = "`" + t + "`"), t;
1141
1189
  }
1142
1190
  }
1143
1191
 
@@ -1159,7 +1207,7 @@ const _t = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1159
1207
  */
1160
1208
  /**
1161
1209
  * Concrete implementation of the Aggregate type.
1162
- */ class bt {
1210
+ */ class At {
1163
1211
  constructor(t, e, n) {
1164
1212
  this.alias = t, this.D = e, this.fieldPath = n;
1165
1213
  }
@@ -1185,7 +1233,7 @@ const _t = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1185
1233
  * Generates `nBytes` of random bytes.
1186
1234
  *
1187
1235
  * If `nBytes < 0` , an error will be thrown.
1188
- */ function Et(t) {
1236
+ */ function It(t) {
1189
1237
  // Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.
1190
1238
  const e =
1191
1239
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1211,14 +1259,14 @@ const _t = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1211
1259
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
1260
  * See the License for the specific language governing permissions and
1213
1261
  * limitations under the License.
1214
- */ class At {
1262
+ */ class Tt {
1215
1263
  static F() {
1216
1264
  // Alphanumeric characters
1217
1265
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length;
1218
1266
  // The largest byte value that is a multiple of `char.length`.
1219
1267
  let n = "";
1220
1268
  for (;n.length < 20; ) {
1221
- const r = Et(40);
1269
+ const r = It(40);
1222
1270
  for (let s = 0; s < r.length; ++s)
1223
1271
  // Only accept values that are [0, maxMultiple), this ensures they can
1224
1272
  // be evenly mapped to indices of `chars` via a modulo operation.
@@ -1228,11 +1276,11 @@ const _t = /^[_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)*$/;
1228
1276
  }
1229
1277
  }
1230
1278
 
1231
- function It(t, e) {
1279
+ function Rt(t, e) {
1232
1280
  return t < e ? -1 : t > e ? 1 : 0;
1233
1281
  }
1234
1282
 
1235
- /** Helper to compare arrays using isEqual(). */ function Tt(t, e, n) {
1283
+ /** Helper to compare arrays using isEqual(). */ function Pt(t, e, n) {
1236
1284
  return t.length === e.length && t.every(((t, r) => n(t, e[r])));
1237
1285
  }
1238
1286
 
@@ -1251,13 +1299,13 @@ function It(t, e) {
1251
1299
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1252
1300
  * See the License for the specific language governing permissions and
1253
1301
  * limitations under the License.
1254
- */ function Rt(t) {
1302
+ */ function Vt(t) {
1255
1303
  let e = 0;
1256
1304
  for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;
1257
1305
  return e;
1258
1306
  }
1259
1307
 
1260
- function Pt(t, e) {
1308
+ function $t(t, e) {
1261
1309
  for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);
1262
1310
  }
1263
1311
 
@@ -1280,7 +1328,7 @@ function Pt(t, e) {
1280
1328
  /**
1281
1329
  * An error encountered while decoding base64 string.
1282
1330
  */
1283
- class Vt extends Error {
1331
+ class Nt extends Error {
1284
1332
  constructor() {
1285
1333
  super(...arguments), this.name = "Base64DecodeError";
1286
1334
  }
@@ -1305,7 +1353,7 @@ class Vt extends Error {
1305
1353
  // WebSafe uses a different URL-encoding safe alphabet that doesn't match
1306
1354
  // the encoding used on the backend.
1307
1355
  /** Converts a Base64 encoded string to a binary string. */
1308
- function $t(t) {
1356
+ function Dt(t) {
1309
1357
  try {
1310
1358
  return String.fromCharCode.apply(null,
1311
1359
  // We use `decodeStringToByteArray()` instead of `decodeString()` since
@@ -1313,7 +1361,7 @@ function $t(t) {
1313
1361
  // returned by `atob()`'s Latin1 representation.
1314
1362
  a.decodeStringToByteArray(t, false));
1315
1363
  } catch (t) {
1316
- throw t instanceof h ? new Vt("Invalid base64 string: " + t) : t;
1364
+ throw t instanceof h ? new Nt("Invalid base64 string: " + t) : t;
1317
1365
  }
1318
1366
  }
1319
1367
 
@@ -1343,13 +1391,13 @@ function $t(t) {
1343
1391
  * before being sent as a proto.
1344
1392
  * @internal
1345
1393
  */
1346
- class Nt {
1394
+ class Ft {
1347
1395
  constructor(t) {
1348
1396
  this.binaryString = t;
1349
1397
  }
1350
1398
  static fromBase64String(t) {
1351
- const e = $t(t);
1352
- return new Nt(e);
1399
+ const e = Dt(t);
1400
+ return new Ft(e);
1353
1401
  }
1354
1402
  static fromUint8Array(t) {
1355
1403
  // TODO(indexing); Remove the copy of the byte string here as this method
@@ -1366,7 +1414,7 @@ class Nt {
1366
1414
  /**
1367
1415
  * Helper function to convert a binary string to an Uint8Array.
1368
1416
  */ (t);
1369
- return new Nt(e);
1417
+ return new Ft(e);
1370
1418
  }
1371
1419
  [Symbol.iterator]() {
1372
1420
  let t = 0;
@@ -1416,21 +1464,21 @@ class Nt {
1416
1464
  return 2 * this.binaryString.length;
1417
1465
  }
1418
1466
  compareTo(t) {
1419
- return It(this.binaryString, t.binaryString);
1467
+ return Rt(this.binaryString, t.binaryString);
1420
1468
  }
1421
1469
  isEqual(t) {
1422
1470
  return this.binaryString === t.binaryString;
1423
1471
  }
1424
1472
  }
1425
1473
 
1426
- Nt.EMPTY_BYTE_STRING = new Nt("");
1474
+ Ft.EMPTY_BYTE_STRING = new Ft("");
1427
1475
 
1428
- const Dt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1476
+ const xt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1429
1477
 
1430
1478
  /**
1431
1479
  * Converts the possible Proto values for a timestamp value into a "seconds and
1432
1480
  * nanos" representation.
1433
- */ function Ft(t) {
1481
+ */ function St(t) {
1434
1482
  // The json interface (for the browser) will return an iso timestamp string,
1435
1483
  // while the proto js library (for node) will return a
1436
1484
  // google.protobuf.Timestamp instance.
@@ -1439,7 +1487,7 @@ const Dt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1439
1487
  // (millis), so we do some custom parsing here.
1440
1488
  // Parse the nanos right out of the string.
1441
1489
  let e = 0;
1442
- const n = Dt.exec(t);
1490
+ const n = xt.exec(t);
1443
1491
  if (I(!!n), n[1]) {
1444
1492
  // Pad the fraction out to 9 digits (nanos).
1445
1493
  let t = n[1];
@@ -1453,21 +1501,21 @@ const Dt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1453
1501
  };
1454
1502
  }
1455
1503
  return {
1456
- seconds: xt(t.seconds),
1457
- nanos: xt(t.nanos)
1504
+ seconds: qt(t.seconds),
1505
+ nanos: qt(t.nanos)
1458
1506
  };
1459
1507
  }
1460
1508
 
1461
1509
  /**
1462
1510
  * Converts the possible Proto types for numbers into a JavaScript number.
1463
1511
  * Returns 0 if the value is not numeric.
1464
- */ function xt(t) {
1512
+ */ function qt(t) {
1465
1513
  // TODO(bjornick): Handle int64 greater than 53 bits.
1466
1514
  return "number" == typeof t ? t : "string" == typeof t ? Number(t) : 0;
1467
1515
  }
1468
1516
 
1469
- /** Converts the possible Proto types for Blobs into a ByteString. */ function St(t) {
1470
- return "string" == typeof t ? Nt.fromBase64String(t) : Nt.fromUint8Array(t);
1517
+ /** Converts the possible Proto types for Blobs into a ByteString. */ function Ot(t) {
1518
+ return "string" == typeof t ? Ft.fromBase64String(t) : Ft.fromUint8Array(t);
1471
1519
  }
1472
1520
 
1473
1521
  /**
@@ -1501,7 +1549,7 @@ const Dt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1501
1549
  * For examples and further specifications, refer to the
1502
1550
  * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.
1503
1551
  */
1504
- class qt {
1552
+ class kt {
1505
1553
  /**
1506
1554
  * Creates a new timestamp.
1507
1555
  *
@@ -1533,7 +1581,7 @@ class qt {
1533
1581
  *
1534
1582
  * @returns a new timestamp representing the current date.
1535
1583
  */ static now() {
1536
- return qt.fromMillis(Date.now());
1584
+ return kt.fromMillis(Date.now());
1537
1585
  }
1538
1586
  /**
1539
1587
  * Creates a new timestamp from the given date.
@@ -1542,7 +1590,7 @@ class qt {
1542
1590
  * @returns A new `Timestamp` representing the same point in time as the given
1543
1591
  * date.
1544
1592
  */ static fromDate(t) {
1545
- return qt.fromMillis(t.getTime());
1593
+ return kt.fromMillis(t.getTime());
1546
1594
  }
1547
1595
  /**
1548
1596
  * Creates a new timestamp from the given number of milliseconds.
@@ -1553,7 +1601,7 @@ class qt {
1553
1601
  * number of milliseconds.
1554
1602
  */ static fromMillis(t) {
1555
1603
  const e = Math.floor(t / 1e3), n = Math.floor(1e6 * (t - 1e3 * e));
1556
- return new qt(e, n);
1604
+ return new kt(e, n);
1557
1605
  }
1558
1606
  /**
1559
1607
  * Converts a `Timestamp` to a JavaScript `Date` object. This conversion
@@ -1575,7 +1623,7 @@ class qt {
1575
1623
  return 1e3 * this.seconds + this.nanoseconds / 1e6;
1576
1624
  }
1577
1625
  _compareTo(t) {
1578
- return this.seconds === t.seconds ? It(this.nanoseconds, t.nanoseconds) : It(this.seconds, t.seconds);
1626
+ return this.seconds === t.seconds ? Rt(this.nanoseconds, t.nanoseconds) : Rt(this.seconds, t.seconds);
1579
1627
  }
1580
1628
  /**
1581
1629
  * Returns true if this `Timestamp` is equal to the provided one.
@@ -1645,7 +1693,7 @@ class qt {
1645
1693
  * FieldValueOptions to value().
1646
1694
  * - With respect to other ServerTimestampValues, they sort by their
1647
1695
  * localWriteTime.
1648
- */ function Ot(t) {
1696
+ */ function Ct(t) {
1649
1697
  var e, n;
1650
1698
  return "server_timestamp" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);
1651
1699
  }
@@ -1655,16 +1703,16 @@ class qt {
1655
1703
  *
1656
1704
  * Preserving the previous values allows the user to display the last resoled
1657
1705
  * value until the backend responds with the timestamp.
1658
- */ function kt(t) {
1706
+ */ function Lt(t) {
1659
1707
  const e = t.mapValue.fields.__previous_value__;
1660
- return Ot(e) ? kt(e) : e;
1708
+ return Ct(e) ? Lt(e) : e;
1661
1709
  }
1662
1710
 
1663
1711
  /**
1664
1712
  * Returns the local time at which this timestamp was first set.
1665
- */ function Ct(t) {
1666
- const e = Ft(t.mapValue.fields.__local_write_time__.timestampValue);
1667
- return new qt(e.seconds, e.nanos);
1713
+ */ function Mt(t) {
1714
+ const e = St(t.mapValue.fields.__local_write_time__.timestampValue);
1715
+ return new kt(e.seconds, e.nanos);
1668
1716
  }
1669
1717
 
1670
1718
  /**
@@ -1682,7 +1730,7 @@ class qt {
1682
1730
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1683
1731
  * See the License for the specific language governing permissions and
1684
1732
  * limitations under the License.
1685
- */ const Lt = {
1733
+ */ const Ut = {
1686
1734
  fields: {
1687
1735
  __type__: {
1688
1736
  stringValue: "__max__"
@@ -1691,8 +1739,8 @@ class qt {
1691
1739
  };
1692
1740
 
1693
1741
  /** Extracts the backend's type order for the provided value. */
1694
- function Mt(t) {
1695
- return "nullValue" in t ? 0 /* TypeOrder.NullValue */ : "booleanValue" in t ? 1 /* TypeOrder.BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* TypeOrder.NumberValue */ : "timestampValue" in t ? 3 /* TypeOrder.TimestampValue */ : "stringValue" in t ? 5 /* TypeOrder.StringValue */ : "bytesValue" in t ? 6 /* TypeOrder.BlobValue */ : "referenceValue" in t ? 7 /* TypeOrder.RefValue */ : "geoPointValue" in t ? 8 /* TypeOrder.GeoPointValue */ : "arrayValue" in t ? 9 /* TypeOrder.ArrayValue */ : "mapValue" in t ? Ot(t) ? 4 /* TypeOrder.ServerTimestampValue */ :
1742
+ function jt(t) {
1743
+ return "nullValue" in t ? 0 /* TypeOrder.NullValue */ : "booleanValue" in t ? 1 /* TypeOrder.BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* TypeOrder.NumberValue */ : "timestampValue" in t ? 3 /* TypeOrder.TimestampValue */ : "stringValue" in t ? 5 /* TypeOrder.StringValue */ : "bytesValue" in t ? 6 /* TypeOrder.BlobValue */ : "referenceValue" in t ? 7 /* TypeOrder.RefValue */ : "geoPointValue" in t ? 8 /* TypeOrder.GeoPointValue */ : "arrayValue" in t ? 9 /* TypeOrder.ArrayValue */ : "mapValue" in t ? Ct(t) ? 4 /* TypeOrder.ServerTimestampValue */ :
1696
1744
  /** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */
1697
1745
  function(t) {
1698
1746
  return "__max__" === (((t.mapValue || {}).fields || {}).__type__ || {}).stringValue;
@@ -1729,10 +1777,10 @@ function Mt(t) {
1729
1777
  */ (t) ? 9007199254740991 /* TypeOrder.MaxValue */ : 10 /* TypeOrder.ObjectValue */ : A();
1730
1778
  }
1731
1779
 
1732
- /** Tests `left` and `right` for equality based on the backend semantics. */ function Ut(t, e) {
1780
+ /** Tests `left` and `right` for equality based on the backend semantics. */ function Bt(t, e) {
1733
1781
  if (t === e) return !0;
1734
- const n = Mt(t);
1735
- if (n !== Mt(e)) return !1;
1782
+ const n = jt(t);
1783
+ if (n !== jt(e)) return !1;
1736
1784
  switch (n) {
1737
1785
  case 0 /* TypeOrder.NullValue */ :
1738
1786
  case 9007199254740991 /* TypeOrder.MaxValue */ :
@@ -1742,14 +1790,14 @@ function Mt(t) {
1742
1790
  return t.booleanValue === e.booleanValue;
1743
1791
 
1744
1792
  case 4 /* TypeOrder.ServerTimestampValue */ :
1745
- return Ct(t).isEqual(Ct(e));
1793
+ return Mt(t).isEqual(Mt(e));
1746
1794
 
1747
1795
  case 3 /* TypeOrder.TimestampValue */ :
1748
1796
  return function(t, e) {
1749
1797
  if ("string" == typeof t.timestampValue && "string" == typeof e.timestampValue && t.timestampValue.length === e.timestampValue.length)
1750
1798
  // Use string equality for ISO 8601 timestamps
1751
1799
  return t.timestampValue === e.timestampValue;
1752
- const n = Ft(t.timestampValue), r = Ft(e.timestampValue);
1800
+ const n = St(t.timestampValue), r = St(e.timestampValue);
1753
1801
  return n.seconds === r.seconds && n.nanos === r.nanos;
1754
1802
  }(t, e);
1755
1803
 
@@ -1758,7 +1806,7 @@ function Mt(t) {
1758
1806
 
1759
1807
  case 6 /* TypeOrder.BlobValue */ :
1760
1808
  return function(t, e) {
1761
- return St(t.bytesValue).isEqual(St(e.bytesValue));
1809
+ return Ot(t.bytesValue).isEqual(Ot(e.bytesValue));
1762
1810
  }(t, e);
1763
1811
 
1764
1812
  case 7 /* TypeOrder.RefValue */ :
@@ -1766,27 +1814,27 @@ function Mt(t) {
1766
1814
 
1767
1815
  case 8 /* TypeOrder.GeoPointValue */ :
1768
1816
  return function(t, e) {
1769
- return xt(t.geoPointValue.latitude) === xt(e.geoPointValue.latitude) && xt(t.geoPointValue.longitude) === xt(e.geoPointValue.longitude);
1817
+ return qt(t.geoPointValue.latitude) === qt(e.geoPointValue.latitude) && qt(t.geoPointValue.longitude) === qt(e.geoPointValue.longitude);
1770
1818
  }(t, e);
1771
1819
 
1772
1820
  case 2 /* TypeOrder.NumberValue */ :
1773
1821
  return function(t, e) {
1774
- if ("integerValue" in t && "integerValue" in e) return xt(t.integerValue) === xt(e.integerValue);
1822
+ if ("integerValue" in t && "integerValue" in e) return qt(t.integerValue) === qt(e.integerValue);
1775
1823
  if ("doubleValue" in t && "doubleValue" in e) {
1776
- const n = xt(t.doubleValue), r = xt(e.doubleValue);
1777
- return n === r ? dt(n) === dt(r) : isNaN(n) && isNaN(r);
1824
+ const n = qt(t.doubleValue), r = qt(e.doubleValue);
1825
+ return n === r ? mt(n) === mt(r) : isNaN(n) && isNaN(r);
1778
1826
  }
1779
1827
  return !1;
1780
1828
  }(t, e);
1781
1829
 
1782
1830
  case 9 /* TypeOrder.ArrayValue */ :
1783
- return Tt(t.arrayValue.values || [], e.arrayValue.values || [], Ut);
1831
+ return Pt(t.arrayValue.values || [], e.arrayValue.values || [], Bt);
1784
1832
 
1785
1833
  case 10 /* TypeOrder.ObjectValue */ :
1786
1834
  return function(t, e) {
1787
1835
  const n = t.mapValue.fields || {}, r = e.mapValue.fields || {};
1788
- if (Rt(n) !== Rt(r)) return !1;
1789
- for (const t in n) if (n.hasOwnProperty(t) && (void 0 === r[t] || !Ut(n[t], r[t]))) return !1;
1836
+ if (Vt(n) !== Vt(r)) return !1;
1837
+ for (const t in n) if (n.hasOwnProperty(t) && (void 0 === r[t] || !Bt(n[t], r[t]))) return !1;
1790
1838
  return !0;
1791
1839
  }
1792
1840
  /** Returns true if the ArrayValue contains the specified element. */ (t, e);
@@ -1796,42 +1844,42 @@ function Mt(t) {
1796
1844
  }
1797
1845
  }
1798
1846
 
1799
- function jt(t, e) {
1800
- return void 0 !== (t.values || []).find((t => Ut(t, e)));
1847
+ function zt(t, e) {
1848
+ return void 0 !== (t.values || []).find((t => Bt(t, e)));
1801
1849
  }
1802
1850
 
1803
- function Bt(t, e) {
1851
+ function Qt(t, e) {
1804
1852
  if (t === e) return 0;
1805
- const n = Mt(t), r = Mt(e);
1806
- if (n !== r) return It(n, r);
1853
+ const n = jt(t), r = jt(e);
1854
+ if (n !== r) return Rt(n, r);
1807
1855
  switch (n) {
1808
1856
  case 0 /* TypeOrder.NullValue */ :
1809
1857
  case 9007199254740991 /* TypeOrder.MaxValue */ :
1810
1858
  return 0;
1811
1859
 
1812
1860
  case 1 /* TypeOrder.BooleanValue */ :
1813
- return It(t.booleanValue, e.booleanValue);
1861
+ return Rt(t.booleanValue, e.booleanValue);
1814
1862
 
1815
1863
  case 2 /* TypeOrder.NumberValue */ :
1816
1864
  return function(t, e) {
1817
- const n = xt(t.integerValue || t.doubleValue), r = xt(e.integerValue || e.doubleValue);
1865
+ const n = qt(t.integerValue || t.doubleValue), r = qt(e.integerValue || e.doubleValue);
1818
1866
  return n < r ? -1 : n > r ? 1 : n === r ? 0 :
1819
1867
  // one or both are NaN.
1820
1868
  isNaN(n) ? isNaN(r) ? 0 : -1 : 1;
1821
1869
  }(t, e);
1822
1870
 
1823
1871
  case 3 /* TypeOrder.TimestampValue */ :
1824
- return zt(t.timestampValue, e.timestampValue);
1872
+ return Wt(t.timestampValue, e.timestampValue);
1825
1873
 
1826
1874
  case 4 /* TypeOrder.ServerTimestampValue */ :
1827
- return zt(Ct(t), Ct(e));
1875
+ return Wt(Mt(t), Mt(e));
1828
1876
 
1829
1877
  case 5 /* TypeOrder.StringValue */ :
1830
- return It(t.stringValue, e.stringValue);
1878
+ return Rt(t.stringValue, e.stringValue);
1831
1879
 
1832
1880
  case 6 /* TypeOrder.BlobValue */ :
1833
1881
  return function(t, e) {
1834
- const n = St(t), r = St(e);
1882
+ const n = Ot(t), r = Ot(e);
1835
1883
  return n.compareTo(r);
1836
1884
  }(t.bytesValue, e.bytesValue);
1837
1885
 
@@ -1839,34 +1887,34 @@ function Bt(t, e) {
1839
1887
  return function(t, e) {
1840
1888
  const n = t.split("/"), r = e.split("/");
1841
1889
  for (let t = 0; t < n.length && t < r.length; t++) {
1842
- const e = It(n[t], r[t]);
1890
+ const e = Rt(n[t], r[t]);
1843
1891
  if (0 !== e) return e;
1844
1892
  }
1845
- return It(n.length, r.length);
1893
+ return Rt(n.length, r.length);
1846
1894
  }(t.referenceValue, e.referenceValue);
1847
1895
 
1848
1896
  case 8 /* TypeOrder.GeoPointValue */ :
1849
1897
  return function(t, e) {
1850
- const n = It(xt(t.latitude), xt(e.latitude));
1898
+ const n = Rt(qt(t.latitude), qt(e.latitude));
1851
1899
  if (0 !== n) return n;
1852
- return It(xt(t.longitude), xt(e.longitude));
1900
+ return Rt(qt(t.longitude), qt(e.longitude));
1853
1901
  }(t.geoPointValue, e.geoPointValue);
1854
1902
 
1855
1903
  case 9 /* TypeOrder.ArrayValue */ :
1856
1904
  return function(t, e) {
1857
1905
  const n = t.values || [], r = e.values || [];
1858
1906
  for (let t = 0; t < n.length && t < r.length; ++t) {
1859
- const e = Bt(n[t], r[t]);
1907
+ const e = Qt(n[t], r[t]);
1860
1908
  if (e) return e;
1861
1909
  }
1862
- return It(n.length, r.length);
1910
+ return Rt(n.length, r.length);
1863
1911
  }(t.arrayValue, e.arrayValue);
1864
1912
 
1865
1913
  case 10 /* TypeOrder.ObjectValue */ :
1866
1914
  return function(t, e) {
1867
- if (t === Lt && e === Lt) return 0;
1868
- if (t === Lt) return 1;
1869
- if (e === Lt) return -1;
1915
+ if (t === Ut && e === Ut) return 0;
1916
+ if (t === Ut) return 1;
1917
+ if (e === Ut) return -1;
1870
1918
  const n = t.fields || {}, r = Object.keys(n), s = e.fields || {}, i = Object.keys(s);
1871
1919
  // Even though MapValues are likely sorted correctly based on their insertion
1872
1920
  // order (e.g. when received from the backend), local modifications can bring
@@ -1874,12 +1922,12 @@ function Bt(t, e) {
1874
1922
  // canonical IDs are independent of insertion order.
1875
1923
  r.sort(), i.sort();
1876
1924
  for (let t = 0; t < r.length && t < i.length; ++t) {
1877
- const e = It(r[t], i[t]);
1925
+ const e = Rt(r[t], i[t]);
1878
1926
  if (0 !== e) return e;
1879
- const o = Bt(n[r[t]], s[i[t]]);
1927
+ const o = Qt(n[r[t]], s[i[t]]);
1880
1928
  if (0 !== o) return o;
1881
1929
  }
1882
- return It(r.length, i.length);
1930
+ return Rt(r.length, i.length);
1883
1931
  }
1884
1932
  /** Returns a reference value for the provided database and key. */ (t.mapValue, e.mapValue);
1885
1933
 
@@ -1888,35 +1936,35 @@ function Bt(t, e) {
1888
1936
  }
1889
1937
  }
1890
1938
 
1891
- function zt(t, e) {
1892
- if ("string" == typeof t && "string" == typeof e && t.length === e.length) return It(t, e);
1893
- const n = Ft(t), r = Ft(e), s = It(n.seconds, r.seconds);
1894
- return 0 !== s ? s : It(n.nanos, r.nanos);
1939
+ function Wt(t, e) {
1940
+ if ("string" == typeof t && "string" == typeof e && t.length === e.length) return Rt(t, e);
1941
+ const n = St(t), r = St(e), s = Rt(n.seconds, r.seconds);
1942
+ return 0 !== s ? s : Rt(n.nanos, r.nanos);
1895
1943
  }
1896
1944
 
1897
- function Qt(t, e) {
1945
+ function Gt(t, e) {
1898
1946
  return {
1899
1947
  referenceValue: `projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`
1900
1948
  };
1901
1949
  }
1902
1950
 
1903
- /** Returns true if `value` is an ArrayValue. */ function Wt(t) {
1951
+ /** Returns true if `value` is an ArrayValue. */ function Kt(t) {
1904
1952
  return !!t && "arrayValue" in t;
1905
1953
  }
1906
1954
 
1907
- /** Returns true if `value` is a NullValue. */ function Gt(t) {
1955
+ /** Returns true if `value` is a NullValue. */ function Yt(t) {
1908
1956
  return !!t && "nullValue" in t;
1909
1957
  }
1910
1958
 
1911
- /** Returns true if `value` is NaN. */ function Kt(t) {
1959
+ /** Returns true if `value` is NaN. */ function Ht(t) {
1912
1960
  return !!t && "doubleValue" in t && isNaN(Number(t.doubleValue));
1913
1961
  }
1914
1962
 
1915
- /** Returns true if `value` is a MapValue. */ function Yt(t) {
1963
+ /** Returns true if `value` is a MapValue. */ function Zt(t) {
1916
1964
  return !!t && "mapValue" in t;
1917
1965
  }
1918
1966
 
1919
- /** Creates a deep copy of `source`. */ function Ht(t) {
1967
+ /** Creates a deep copy of `source`. */ function Jt(t) {
1920
1968
  if (t.geoPointValue) return {
1921
1969
  geoPointValue: Object.assign({}, t.geoPointValue)
1922
1970
  };
@@ -1929,7 +1977,7 @@ function Qt(t, e) {
1929
1977
  fields: {}
1930
1978
  }
1931
1979
  };
1932
- return Pt(t.mapValue.fields, ((t, n) => e.mapValue.fields[t] = Ht(n))), e;
1980
+ return $t(t.mapValue.fields, ((t, n) => e.mapValue.fields[t] = Jt(n))), e;
1933
1981
  }
1934
1982
  if (t.arrayValue) {
1935
1983
  const e = {
@@ -1937,24 +1985,24 @@ function Qt(t, e) {
1937
1985
  values: []
1938
1986
  }
1939
1987
  };
1940
- for (let n = 0; n < (t.arrayValue.values || []).length; ++n) e.arrayValue.values[n] = Ht(t.arrayValue.values[n]);
1988
+ for (let n = 0; n < (t.arrayValue.values || []).length; ++n) e.arrayValue.values[n] = Jt(t.arrayValue.values[n]);
1941
1989
  return e;
1942
1990
  }
1943
1991
  return Object.assign({}, t);
1944
1992
  }
1945
1993
 
1946
- class Zt {
1994
+ class Xt {
1947
1995
  constructor(t, e) {
1948
1996
  this.position = t, this.inclusive = e;
1949
1997
  }
1950
1998
  }
1951
1999
 
1952
- function Jt(t, e) {
2000
+ function te(t, e) {
1953
2001
  if (null === t) return null === e;
1954
2002
  if (null === e) return !1;
1955
2003
  if (t.inclusive !== e.inclusive || t.position.length !== e.position.length) return !1;
1956
2004
  for (let n = 0; n < t.position.length; n++) {
1957
- if (!Ut(t.position[n], e.position[n])) return !1;
2005
+ if (!Bt(t.position[n], e.position[n])) return !1;
1958
2006
  }
1959
2007
  return !0;
1960
2008
  }
@@ -1974,24 +2022,24 @@ function Jt(t, e) {
1974
2022
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1975
2023
  * See the License for the specific language governing permissions and
1976
2024
  * limitations under the License.
1977
- */ class Xt {}
2025
+ */ class ee {}
1978
2026
 
1979
- class te extends Xt {
2027
+ class ne extends ee {
1980
2028
  constructor(t, e, n) {
1981
2029
  super(), this.field = t, this.op = e, this.value = n;
1982
2030
  }
1983
2031
  /**
1984
2032
  * Creates a filter based on the provided arguments.
1985
2033
  */ static create(t, e, n) {
1986
- return t.isKeyField() ? "in" /* Operator.IN */ === e || "not-in" /* Operator.NOT_IN */ === e ? this.createKeyFieldInFilter(t, e, n) : new re(t, e, n) : "array-contains" /* Operator.ARRAY_CONTAINS */ === e ? new ue(t, n) : "in" /* Operator.IN */ === e ? new ce(t, n) : "not-in" /* Operator.NOT_IN */ === e ? new ae(t, n) : "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === e ? new he(t, n) : new te(t, e, n);
2034
+ return t.isKeyField() ? "in" /* Operator.IN */ === e || "not-in" /* Operator.NOT_IN */ === e ? this.createKeyFieldInFilter(t, e, n) : new ie(t, e, n) : "array-contains" /* Operator.ARRAY_CONTAINS */ === e ? new ae(t, n) : "in" /* Operator.IN */ === e ? new he(t, n) : "not-in" /* Operator.NOT_IN */ === e ? new le(t, n) : "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === e ? new fe(t, n) : new ne(t, e, n);
1987
2035
  }
1988
2036
  static createKeyFieldInFilter(t, e, n) {
1989
- return "in" /* Operator.IN */ === e ? new se(t, n) : new ie(t, n);
2037
+ return "in" /* Operator.IN */ === e ? new oe(t, n) : new ue(t, n);
1990
2038
  }
1991
2039
  matches(t) {
1992
2040
  const e = t.data.field(this.field);
1993
2041
  // Types do not have to match in NOT_EQUAL filters.
1994
- return "!=" /* Operator.NOT_EQUAL */ === this.op ? null !== e && this.matchesComparison(Bt(e, this.value)) : null !== e && Mt(this.value) === Mt(e) && this.matchesComparison(Bt(e, this.value));
2042
+ return "!=" /* Operator.NOT_EQUAL */ === this.op ? null !== e && this.matchesComparison(Qt(e, this.value)) : null !== e && jt(this.value) === jt(e) && this.matchesComparison(Qt(e, this.value));
1995
2043
  // Only compare types with matching backend order (such as double and int).
1996
2044
  }
1997
2045
  matchesComparison(t) {
@@ -2032,14 +2080,14 @@ class te extends Xt {
2032
2080
  }
2033
2081
  }
2034
2082
 
2035
- class ee extends Xt {
2083
+ class re extends ee {
2036
2084
  constructor(t, e) {
2037
2085
  super(), this.filters = t, this.op = e, this.S = null;
2038
2086
  }
2039
2087
  /**
2040
2088
  * Creates a filter based on the provided arguments.
2041
2089
  */ static create(t, e) {
2042
- return new ee(t, e);
2090
+ return new re(t, e);
2043
2091
  }
2044
2092
  matches(t) {
2045
2093
  return "and" /* CompositeOperator.AND */ === this.op ? void 0 === this.filters.find((e => !e.matches(t))) : void 0 !== this.filters.find((e => e.matches(t)));
@@ -2065,19 +2113,19 @@ class ee extends Xt {
2065
2113
  }
2066
2114
  }
2067
2115
 
2068
- function ne(t, e) {
2069
- return t instanceof te ? function(t, e) {
2070
- return e instanceof te && t.op === e.op && t.field.isEqual(e.field) && Ut(t.value, e.value);
2071
- }(t, e) : t instanceof ee ? function(t, e) {
2072
- if (e instanceof ee && t.op === e.op && t.filters.length === e.filters.length) {
2073
- return t.filters.reduce(((t, n, r) => t && ne(n, e.filters[r])), !0);
2116
+ function se(t, e) {
2117
+ return t instanceof ne ? function(t, e) {
2118
+ return e instanceof ne && t.op === e.op && t.field.isEqual(e.field) && Bt(t.value, e.value);
2119
+ }(t, e) : t instanceof re ? function(t, e) {
2120
+ if (e instanceof re && t.op === e.op && t.filters.length === e.filters.length) {
2121
+ return t.filters.reduce(((t, n, r) => t && se(n, e.filters[r])), !0);
2074
2122
  }
2075
2123
  return !1;
2076
2124
  }
2077
2125
  /** Filter that matches on key fields (i.e. '__name__'). */ (t, e) : void A();
2078
2126
  }
2079
2127
 
2080
- class re extends te {
2128
+ class ie extends ne {
2081
2129
  constructor(t, e, n) {
2082
2130
  super(t, e, n), this.key = it.fromName(n.referenceValue);
2083
2131
  }
@@ -2087,69 +2135,69 @@ class re extends te {
2087
2135
  }
2088
2136
  }
2089
2137
 
2090
- /** Filter that matches on key fields within an array. */ class se extends te {
2138
+ /** Filter that matches on key fields within an array. */ class oe extends ne {
2091
2139
  constructor(t, e) {
2092
- super(t, "in" /* Operator.IN */ , e), this.keys = oe("in" /* Operator.IN */ , e);
2140
+ super(t, "in" /* Operator.IN */ , e), this.keys = ce("in" /* Operator.IN */ , e);
2093
2141
  }
2094
2142
  matches(t) {
2095
2143
  return this.keys.some((e => e.isEqual(t.key)));
2096
2144
  }
2097
2145
  }
2098
2146
 
2099
- /** Filter that matches on key fields not present within an array. */ class ie extends te {
2147
+ /** Filter that matches on key fields not present within an array. */ class ue extends ne {
2100
2148
  constructor(t, e) {
2101
- super(t, "not-in" /* Operator.NOT_IN */ , e), this.keys = oe("not-in" /* Operator.NOT_IN */ , e);
2149
+ super(t, "not-in" /* Operator.NOT_IN */ , e), this.keys = ce("not-in" /* Operator.NOT_IN */ , e);
2102
2150
  }
2103
2151
  matches(t) {
2104
2152
  return !this.keys.some((e => e.isEqual(t.key)));
2105
2153
  }
2106
2154
  }
2107
2155
 
2108
- function oe(t, e) {
2156
+ function ce(t, e) {
2109
2157
  var n;
2110
2158
  return ((null === (n = e.arrayValue) || void 0 === n ? void 0 : n.values) || []).map((t => it.fromName(t.referenceValue)));
2111
2159
  }
2112
2160
 
2113
- /** A Filter that implements the array-contains operator. */ class ue extends te {
2161
+ /** A Filter that implements the array-contains operator. */ class ae extends ne {
2114
2162
  constructor(t, e) {
2115
2163
  super(t, "array-contains" /* Operator.ARRAY_CONTAINS */ , e);
2116
2164
  }
2117
2165
  matches(t) {
2118
2166
  const e = t.data.field(this.field);
2119
- return Wt(e) && jt(e.arrayValue, this.value);
2167
+ return Kt(e) && zt(e.arrayValue, this.value);
2120
2168
  }
2121
2169
  }
2122
2170
 
2123
- /** A Filter that implements the IN operator. */ class ce extends te {
2171
+ /** A Filter that implements the IN operator. */ class he extends ne {
2124
2172
  constructor(t, e) {
2125
2173
  super(t, "in" /* Operator.IN */ , e);
2126
2174
  }
2127
2175
  matches(t) {
2128
2176
  const e = t.data.field(this.field);
2129
- return null !== e && jt(this.value.arrayValue, e);
2177
+ return null !== e && zt(this.value.arrayValue, e);
2130
2178
  }
2131
2179
  }
2132
2180
 
2133
- /** A Filter that implements the not-in operator. */ class ae extends te {
2181
+ /** A Filter that implements the not-in operator. */ class le extends ne {
2134
2182
  constructor(t, e) {
2135
2183
  super(t, "not-in" /* Operator.NOT_IN */ , e);
2136
2184
  }
2137
2185
  matches(t) {
2138
- if (jt(this.value.arrayValue, {
2186
+ if (zt(this.value.arrayValue, {
2139
2187
  nullValue: "NULL_VALUE"
2140
2188
  })) return !1;
2141
2189
  const e = t.data.field(this.field);
2142
- return null !== e && !jt(this.value.arrayValue, e);
2190
+ return null !== e && !zt(this.value.arrayValue, e);
2143
2191
  }
2144
2192
  }
2145
2193
 
2146
- /** A Filter that implements the array-contains-any operator. */ class he extends te {
2194
+ /** A Filter that implements the array-contains-any operator. */ class fe extends ne {
2147
2195
  constructor(t, e) {
2148
2196
  super(t, "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ , e);
2149
2197
  }
2150
2198
  matches(t) {
2151
2199
  const e = t.data.field(this.field);
2152
- return !(!Wt(e) || !e.arrayValue.values) && e.arrayValue.values.some((t => jt(this.value.arrayValue, t)));
2200
+ return !(!Kt(e) || !e.arrayValue.values) && e.arrayValue.values.some((t => zt(this.value.arrayValue, t)));
2153
2201
  }
2154
2202
  }
2155
2203
 
@@ -2171,13 +2219,13 @@ function oe(t, e) {
2171
2219
  */
2172
2220
  /**
2173
2221
  * An ordering on a field, in some Direction. Direction defaults to ASCENDING.
2174
- */ class le {
2222
+ */ class de {
2175
2223
  constructor(t, e = "asc" /* Direction.ASCENDING */) {
2176
2224
  this.field = t, this.dir = e;
2177
2225
  }
2178
2226
  }
2179
2227
 
2180
- function fe(t, e) {
2228
+ function we(t, e) {
2181
2229
  return t.dir === e.dir && t.field.isEqual(e.field);
2182
2230
  }
2183
2231
 
@@ -2200,18 +2248,18 @@ function fe(t, e) {
2200
2248
  /**
2201
2249
  * A version of a document in Firestore. This corresponds to the version
2202
2250
  * timestamp, such as update_time or read_time.
2203
- */ class de {
2251
+ */ class me {
2204
2252
  constructor(t) {
2205
2253
  this.timestamp = t;
2206
2254
  }
2207
2255
  static fromTimestamp(t) {
2208
- return new de(t);
2256
+ return new me(t);
2209
2257
  }
2210
2258
  static min() {
2211
- return new de(new qt(0, 0));
2259
+ return new me(new kt(0, 0));
2212
2260
  }
2213
2261
  static max() {
2214
- return new de(new qt(253402300799, 999999999));
2262
+ return new me(new kt(253402300799, 999999999));
2215
2263
  }
2216
2264
  compareTo(t) {
2217
2265
  return this.timestamp._compareTo(t.timestamp);
@@ -2249,17 +2297,17 @@ function fe(t, e) {
2249
2297
  */
2250
2298
  // An immutable sorted map implementation, based on a Left-leaning Red-Black
2251
2299
  // tree.
2252
- class we {
2300
+ class pe {
2253
2301
  constructor(t, e) {
2254
- this.comparator = t, this.root = e || pe.EMPTY;
2302
+ this.comparator = t, this.root = e || ge.EMPTY;
2255
2303
  }
2256
2304
  // Returns a copy of the map, with the specified key/value added or replaced.
2257
2305
  insert(t, e) {
2258
- return new we(this.comparator, this.root.insert(t, e, this.comparator).copy(null, null, pe.BLACK, null, null));
2306
+ return new pe(this.comparator, this.root.insert(t, e, this.comparator).copy(null, null, ge.BLACK, null, null));
2259
2307
  }
2260
2308
  // Returns a copy of the map, with the specified key removed.
2261
2309
  remove(t) {
2262
- return new we(this.comparator, this.root.remove(t, this.comparator).copy(null, null, pe.BLACK, null, null));
2310
+ return new pe(this.comparator, this.root.remove(t, this.comparator).copy(null, null, ge.BLACK, null, null));
2263
2311
  }
2264
2312
  // Returns the value of the node with the given key, or null.
2265
2313
  get(t) {
@@ -2325,22 +2373,22 @@ class we {
2325
2373
  }
2326
2374
  // Returns an iterator over the SortedMap.
2327
2375
  getIterator() {
2328
- return new me(this.root, null, this.comparator, !1);
2376
+ return new ye(this.root, null, this.comparator, !1);
2329
2377
  }
2330
2378
  getIteratorFrom(t) {
2331
- return new me(this.root, t, this.comparator, !1);
2379
+ return new ye(this.root, t, this.comparator, !1);
2332
2380
  }
2333
2381
  getReverseIterator() {
2334
- return new me(this.root, null, this.comparator, !0);
2382
+ return new ye(this.root, null, this.comparator, !0);
2335
2383
  }
2336
2384
  getReverseIteratorFrom(t) {
2337
- return new me(this.root, t, this.comparator, !0);
2385
+ return new ye(this.root, t, this.comparator, !0);
2338
2386
  }
2339
2387
  }
2340
2388
 
2341
2389
  // end SortedMap
2342
2390
  // An iterator over an LLRBNode.
2343
- class me {
2391
+ class ye {
2344
2392
  constructor(t, e, n, r) {
2345
2393
  this.isReverse = r, this.nodeStack = [];
2346
2394
  let s = 1;
@@ -2385,14 +2433,14 @@ class me {
2385
2433
 
2386
2434
  // end SortedMapIterator
2387
2435
  // Represents a node in a Left-leaning Red-Black tree.
2388
- class pe {
2436
+ class ge {
2389
2437
  constructor(t, e, n, r, s) {
2390
- this.key = t, this.value = e, this.color = null != n ? n : pe.RED, this.left = null != r ? r : pe.EMPTY,
2391
- this.right = null != s ? s : pe.EMPTY, this.size = this.left.size + 1 + this.right.size;
2438
+ this.key = t, this.value = e, this.color = null != n ? n : ge.RED, this.left = null != r ? r : ge.EMPTY,
2439
+ this.right = null != s ? s : ge.EMPTY, this.size = this.left.size + 1 + this.right.size;
2392
2440
  }
2393
2441
  // Returns a copy of the current node, optionally replacing pieces of it.
2394
2442
  copy(t, e, n, r, s) {
2395
- return new pe(null != t ? t : this.key, null != e ? e : this.value, null != n ? n : this.color, null != r ? r : this.left, null != s ? s : this.right);
2443
+ return new ge(null != t ? t : this.key, null != e ? e : this.value, null != n ? n : this.color, null != r ? r : this.left, null != s ? s : this.right);
2396
2444
  }
2397
2445
  isEmpty() {
2398
2446
  return !1;
@@ -2431,7 +2479,7 @@ class pe {
2431
2479
  r.fixUp();
2432
2480
  }
2433
2481
  removeMin() {
2434
- if (this.left.isEmpty()) return pe.EMPTY;
2482
+ if (this.left.isEmpty()) return ge.EMPTY;
2435
2483
  let t = this;
2436
2484
  return t.left.isRed() || t.left.left.isRed() || (t = t.moveRedLeft()), t = t.copy(null, null, null, t.left.removeMin(), null),
2437
2485
  t.fixUp();
@@ -2443,7 +2491,7 @@ class pe {
2443
2491
  r = r.copy(null, null, null, r.left.remove(t, e), null); else {
2444
2492
  if (r.left.isRed() && (r = r.rotateRight()), r.right.isEmpty() || r.right.isRed() || r.right.left.isRed() || (r = r.moveRedRight()),
2445
2493
  0 === e(t, r.key)) {
2446
- if (r.right.isEmpty()) return pe.EMPTY;
2494
+ if (r.right.isEmpty()) return ge.EMPTY;
2447
2495
  n = r.right.min(), r = r.copy(n.key, n.value, null, null, r.right.removeMin());
2448
2496
  }
2449
2497
  r = r.copy(null, null, null, null, r.right.remove(t, e));
@@ -2469,11 +2517,11 @@ class pe {
2469
2517
  return t.left.left.isRed() && (t = t.rotateRight(), t = t.colorFlip()), t;
2470
2518
  }
2471
2519
  rotateLeft() {
2472
- const t = this.copy(null, null, pe.RED, null, this.right.left);
2520
+ const t = this.copy(null, null, ge.RED, null, this.right.left);
2473
2521
  return this.right.copy(null, null, this.color, t, null);
2474
2522
  }
2475
2523
  rotateRight() {
2476
- const t = this.copy(null, null, pe.RED, this.left.right, null);
2524
+ const t = this.copy(null, null, ge.RED, this.left.right, null);
2477
2525
  return this.left.copy(null, null, this.color, null, t);
2478
2526
  }
2479
2527
  colorFlip() {
@@ -2499,10 +2547,10 @@ class pe {
2499
2547
  // end LLRBNode
2500
2548
  // Empty node is shared between all LLRB trees.
2501
2549
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2502
- pe.EMPTY = null, pe.RED = !0, pe.BLACK = !1;
2550
+ ge.EMPTY = null, ge.RED = !0, ge.BLACK = !1;
2503
2551
 
2504
2552
  // end LLRBEmptyNode
2505
- pe.EMPTY = new
2553
+ ge.EMPTY = new
2506
2554
  // Represents an empty node (a leaf node in the Red-Black Tree).
2507
2555
  class {
2508
2556
  constructor() {
@@ -2529,7 +2577,7 @@ class {
2529
2577
  }
2530
2578
  // Returns a copy of the tree, with the specified key/value added.
2531
2579
  insert(t, e, n) {
2532
- return new pe(t, e);
2580
+ return new ge(t, e);
2533
2581
  }
2534
2582
  // Returns a copy of the tree, with the specified key removed.
2535
2583
  remove(t, e) {
@@ -2585,9 +2633,9 @@ class {
2585
2633
  * NOTE: if provided comparator returns 0 for two elements, we consider them to
2586
2634
  * be equal!
2587
2635
  */
2588
- class ye {
2636
+ class _e {
2589
2637
  constructor(t) {
2590
- this.comparator = t, this.data = new we(this.comparator);
2638
+ this.comparator = t, this.data = new pe(this.comparator);
2591
2639
  }
2592
2640
  has(t) {
2593
2641
  return null !== this.data.get(t);
@@ -2628,10 +2676,10 @@ class ye {
2628
2676
  return e.hasNext() ? e.getNext().key : null;
2629
2677
  }
2630
2678
  getIterator() {
2631
- return new ge(this.data.getIterator());
2679
+ return new ve(this.data.getIterator());
2632
2680
  }
2633
2681
  getIteratorFrom(t) {
2634
- return new ge(this.data.getIteratorFrom(t));
2682
+ return new ve(this.data.getIteratorFrom(t));
2635
2683
  }
2636
2684
  /** Inserts or updates an element */ add(t) {
2637
2685
  return this.copy(this.data.remove(t).insert(t, !0));
@@ -2650,7 +2698,7 @@ class ye {
2650
2698
  })), e;
2651
2699
  }
2652
2700
  isEqual(t) {
2653
- if (!(t instanceof ye)) return !1;
2701
+ if (!(t instanceof _e)) return !1;
2654
2702
  if (this.size !== t.size) return !1;
2655
2703
  const e = this.data.getIterator(), n = t.data.getIterator();
2656
2704
  for (;e.hasNext(); ) {
@@ -2670,12 +2718,12 @@ class ye {
2670
2718
  return this.forEach((e => t.push(e))), "SortedSet(" + t.toString() + ")";
2671
2719
  }
2672
2720
  copy(t) {
2673
- const e = new ye(this.comparator);
2721
+ const e = new _e(this.comparator);
2674
2722
  return e.data = t, e;
2675
2723
  }
2676
2724
  }
2677
2725
 
2678
- class ge {
2726
+ class ve {
2679
2727
  constructor(t) {
2680
2728
  this.iter = t;
2681
2729
  }
@@ -2712,7 +2760,7 @@ class ge {
2712
2760
  * foo.bar - Overwrites only the field bar of the object foo.
2713
2761
  * If foo is not an object, foo is replaced with an object
2714
2762
  * containing foo
2715
- */ class _e {
2763
+ */ class be {
2716
2764
  constructor(t) {
2717
2765
  this.fields = t,
2718
2766
  // TODO(dimond): validation of FieldMask
@@ -2720,16 +2768,16 @@ class ge {
2720
2768
  t.sort(st.comparator);
2721
2769
  }
2722
2770
  static empty() {
2723
- return new _e([]);
2771
+ return new be([]);
2724
2772
  }
2725
2773
  /**
2726
2774
  * Returns a new FieldMask object that is the result of adding all the given
2727
2775
  * fields paths to this field mask.
2728
2776
  */ unionWith(t) {
2729
- let e = new ye(st.comparator);
2777
+ let e = new _e(st.comparator);
2730
2778
  for (const t of this.fields) e = e.add(t);
2731
2779
  for (const n of t) e = e.add(n);
2732
- return new _e(e.toArray());
2780
+ return new be(e.toArray());
2733
2781
  }
2734
2782
  /**
2735
2783
  * Verifies that `fieldPath` is included by at least one field in this field
@@ -2741,7 +2789,7 @@ class ge {
2741
2789
  return !1;
2742
2790
  }
2743
2791
  isEqual(t) {
2744
- return Tt(this.fields, t.fields, ((t, e) => t.isEqual(e)));
2792
+ return Pt(this.fields, t.fields, ((t, e) => t.isEqual(e)));
2745
2793
  }
2746
2794
  }
2747
2795
 
@@ -2764,12 +2812,12 @@ class ge {
2764
2812
  /**
2765
2813
  * An ObjectValue represents a MapValue in the Firestore Proto and offers the
2766
2814
  * ability to add and remove fields (via the ObjectValueBuilder).
2767
- */ class ve {
2815
+ */ class Ee {
2768
2816
  constructor(t) {
2769
2817
  this.value = t;
2770
2818
  }
2771
2819
  static empty() {
2772
- return new ve({
2820
+ return new Ee({
2773
2821
  mapValue: {}
2774
2822
  });
2775
2823
  }
@@ -2783,7 +2831,7 @@ class ge {
2783
2831
  {
2784
2832
  let e = this.value;
2785
2833
  for (let n = 0; n < t.length - 1; ++n) if (e = (e.mapValue.fields || {})[t.get(n)],
2786
- !Yt(e)) return null;
2834
+ !Zt(e)) return null;
2787
2835
  return e = (e.mapValue.fields || {})[t.lastSegment()], e || null;
2788
2836
  }
2789
2837
  }
@@ -2793,7 +2841,7 @@ class ge {
2793
2841
  * @param path - The field path to set.
2794
2842
  * @param value - The value to set.
2795
2843
  */ set(t, e) {
2796
- this.getFieldsMap(t.popLast())[t.lastSegment()] = Ht(e);
2844
+ this.getFieldsMap(t.popLast())[t.lastSegment()] = Jt(e);
2797
2845
  }
2798
2846
  /**
2799
2847
  * Sets the provided fields to the provided values.
@@ -2807,7 +2855,7 @@ class ge {
2807
2855
  const t = this.getFieldsMap(e);
2808
2856
  this.applyChanges(t, n, r), n = {}, r = [], e = s.popLast();
2809
2857
  }
2810
- t ? n[s.lastSegment()] = Ht(t) : r.push(s.lastSegment());
2858
+ t ? n[s.lastSegment()] = Jt(t) : r.push(s.lastSegment());
2811
2859
  }));
2812
2860
  const s = this.getFieldsMap(e);
2813
2861
  this.applyChanges(s, n, r);
@@ -2819,10 +2867,10 @@ class ge {
2819
2867
  * @param path - The field path to remove.
2820
2868
  */ delete(t) {
2821
2869
  const e = this.field(t.popLast());
2822
- Yt(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];
2870
+ Zt(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];
2823
2871
  }
2824
2872
  isEqual(t) {
2825
- return Ut(this.value, t.value);
2873
+ return Bt(this.value, t.value);
2826
2874
  }
2827
2875
  /**
2828
2876
  * Returns the map that contains the leaf element of `path`. If the parent
@@ -2834,7 +2882,7 @@ class ge {
2834
2882
  });
2835
2883
  for (let n = 0; n < t.length; ++n) {
2836
2884
  let r = e.mapValue.fields[t.get(n)];
2837
- Yt(r) && r.mapValue.fields || (r = {
2885
+ Zt(r) && r.mapValue.fields || (r = {
2838
2886
  mapValue: {
2839
2887
  fields: {}
2840
2888
  }
@@ -2846,11 +2894,11 @@ class ge {
2846
2894
  * Modifies `fieldsMap` by adding, replacing or deleting the specified
2847
2895
  * entries.
2848
2896
  */ applyChanges(t, e, n) {
2849
- Pt(e, ((e, n) => t[e] = n));
2897
+ $t(e, ((e, n) => t[e] = n));
2850
2898
  for (const e of n) delete t[e];
2851
2899
  }
2852
2900
  clone() {
2853
- return new ve(Ht(this.value));
2901
+ return new Ee(Jt(this.value));
2854
2902
  }
2855
2903
  }
2856
2904
 
@@ -2879,7 +2927,7 @@ class ge {
2879
2927
  * not transition to one of these states even after all mutations have been
2880
2928
  * applied, `isValidDocument()` returns false and the document should be removed
2881
2929
  * from all views.
2882
- */ class be {
2930
+ */ class Ae {
2883
2931
  constructor(t, e, n, r, s, i, o) {
2884
2932
  this.key = t, this.documentType = e, this.version = n, this.readTime = r, this.createTime = s,
2885
2933
  this.data = i, this.documentState = o;
@@ -2888,35 +2936,35 @@ class ge {
2888
2936
  * Creates a document with no known version or data, but which can serve as
2889
2937
  * base document for mutations.
2890
2938
  */ static newInvalidDocument(t) {
2891
- return new be(t, 0 /* DocumentType.INVALID */ ,
2892
- /* version */ de.min(),
2893
- /* readTime */ de.min(),
2894
- /* createTime */ de.min(), ve.empty(), 0 /* DocumentState.SYNCED */);
2939
+ return new Ae(t, 0 /* DocumentType.INVALID */ ,
2940
+ /* version */ me.min(),
2941
+ /* readTime */ me.min(),
2942
+ /* createTime */ me.min(), Ee.empty(), 0 /* DocumentState.SYNCED */);
2895
2943
  }
2896
2944
  /**
2897
2945
  * Creates a new document that is known to exist with the given data at the
2898
2946
  * given version.
2899
2947
  */ static newFoundDocument(t, e, n, r) {
2900
- return new be(t, 1 /* DocumentType.FOUND_DOCUMENT */ ,
2948
+ return new Ae(t, 1 /* DocumentType.FOUND_DOCUMENT */ ,
2901
2949
  /* version */ e,
2902
- /* readTime */ de.min(),
2950
+ /* readTime */ me.min(),
2903
2951
  /* createTime */ n, r, 0 /* DocumentState.SYNCED */);
2904
2952
  }
2905
2953
  /** Creates a new document that is known to not exist at the given version. */ static newNoDocument(t, e) {
2906
- return new be(t, 2 /* DocumentType.NO_DOCUMENT */ ,
2954
+ return new Ae(t, 2 /* DocumentType.NO_DOCUMENT */ ,
2907
2955
  /* version */ e,
2908
- /* readTime */ de.min(),
2909
- /* createTime */ de.min(), ve.empty(), 0 /* DocumentState.SYNCED */);
2956
+ /* readTime */ me.min(),
2957
+ /* createTime */ me.min(), Ee.empty(), 0 /* DocumentState.SYNCED */);
2910
2958
  }
2911
2959
  /**
2912
2960
  * Creates a new document that is known to exist at the given version but
2913
2961
  * whose data is not known (e.g. a document that was updated without a known
2914
2962
  * base document).
2915
2963
  */ static newUnknownDocument(t, e) {
2916
- return new be(t, 3 /* DocumentType.UNKNOWN_DOCUMENT */ ,
2964
+ return new Ae(t, 3 /* DocumentType.UNKNOWN_DOCUMENT */ ,
2917
2965
  /* version */ e,
2918
- /* readTime */ de.min(),
2919
- /* createTime */ de.min(), ve.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);
2966
+ /* readTime */ me.min(),
2967
+ /* createTime */ me.min(), Ee.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);
2920
2968
  }
2921
2969
  /**
2922
2970
  * Changes the document type to indicate that it exists and that its version
@@ -2927,7 +2975,7 @@ class ge {
2927
2975
  // update from Watch or due to applying a local set mutation on top
2928
2976
  // of a deleted document, our best guess about its createTime would be the
2929
2977
  // version at which the document transitioned to a FOUND_DOCUMENT.
2930
- return !this.createTime.isEqual(de.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t),
2978
+ return !this.createTime.isEqual(me.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t),
2931
2979
  this.version = t, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */ , this.data = e,
2932
2980
  this.documentState = 0 /* DocumentState.SYNCED */ , this;
2933
2981
  }
@@ -2936,7 +2984,7 @@ class ge {
2936
2984
  * version.
2937
2985
  */ convertToNoDocument(t) {
2938
2986
  return this.version = t, this.documentType = 2 /* DocumentType.NO_DOCUMENT */ ,
2939
- this.data = ve.empty(), this.documentState = 0 /* DocumentState.SYNCED */ , this;
2987
+ this.data = Ee.empty(), this.documentState = 0 /* DocumentState.SYNCED */ , this;
2940
2988
  }
2941
2989
  /**
2942
2990
  * Changes the document type to indicate that it exists at a given version but
@@ -2944,14 +2992,14 @@ class ge {
2944
2992
  * base document).
2945
2993
  */ convertToUnknownDocument(t) {
2946
2994
  return this.version = t, this.documentType = 3 /* DocumentType.UNKNOWN_DOCUMENT */ ,
2947
- this.data = ve.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ ,
2995
+ this.data = Ee.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ ,
2948
2996
  this;
2949
2997
  }
2950
2998
  setHasCommittedMutations() {
2951
2999
  return this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ , this;
2952
3000
  }
2953
3001
  setHasLocalMutations() {
2954
- return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ , this.version = de.min(),
3002
+ return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ , this.version = me.min(),
2955
3003
  this;
2956
3004
  }
2957
3005
  setReadTime(t) {
@@ -2979,10 +3027,10 @@ class ge {
2979
3027
  return 3 /* DocumentType.UNKNOWN_DOCUMENT */ === this.documentType;
2980
3028
  }
2981
3029
  isEqual(t) {
2982
- return t instanceof be && this.key.isEqual(t.key) && this.version.isEqual(t.version) && this.documentType === t.documentType && this.documentState === t.documentState && this.data.isEqual(t.data);
3030
+ return t instanceof Ae && this.key.isEqual(t.key) && this.version.isEqual(t.version) && this.documentType === t.documentType && this.documentState === t.documentState && this.data.isEqual(t.data);
2983
3031
  }
2984
3032
  mutableCopy() {
2985
- return new be(this.key, this.documentType, this.version, this.readTime, this.createTime, this.data.clone(), this.documentState);
3033
+ return new Ae(this.key, this.documentType, this.version, this.readTime, this.createTime, this.data.clone(), this.documentState);
2986
3034
  }
2987
3035
  toString() {
2988
3036
  return `Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`;
@@ -3006,7 +3054,7 @@ class ge {
3006
3054
  * limitations under the License.
3007
3055
  */
3008
3056
  // Visible for testing
3009
- class Ee {
3057
+ class Ie {
3010
3058
  constructor(t, e = null, n = [], r = [], s = null, i = null, o = null) {
3011
3059
  this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = r, this.limit = s,
3012
3060
  this.startAt = i, this.endAt = o, this.O = null;
@@ -3020,8 +3068,8 @@ class Ee {
3020
3068
  * NOTE: you should always construct `Target` from `Query.toTarget` instead of
3021
3069
  * using this factory method, because `Query` provides an implicit `orderBy`
3022
3070
  * property.
3023
- */ function Ae(t, e = null, n = [], r = [], s = null, i = null, o = null) {
3024
- return new Ee(t, e, n, r, s, i, o);
3071
+ */ function Te(t, e = null, n = [], r = [], s = null, i = null, o = null) {
3072
+ return new Ie(t, e, n, r, s, i, o);
3025
3073
  }
3026
3074
 
3027
3075
  /**
@@ -3047,7 +3095,7 @@ class Ee {
3047
3095
  *
3048
3096
  * Visible for testing.
3049
3097
  */
3050
- class Ie {
3098
+ class Re {
3051
3099
  /**
3052
3100
  * Initializes a Query with a path and optional additional query constraints.
3053
3101
  * Path must currently be empty if this is a collection group query.
@@ -3060,11 +3108,11 @@ class Ie {
3060
3108
  }
3061
3109
  }
3062
3110
 
3063
- /** Creates a new Query for a query that matches all documents at `path` */ function Te(t) {
3111
+ /** Creates a new Query for a query that matches all documents at `path` */ function Pe(t) {
3064
3112
  return t.explicitOrderBy.length > 0 ? t.explicitOrderBy[0].field : null;
3065
3113
  }
3066
3114
 
3067
- function Re(t) {
3115
+ function Ve(t) {
3068
3116
  for (const e of t.filters) {
3069
3117
  const t = e.getFirstInequalityField();
3070
3118
  if (null !== t) return t;
@@ -3080,7 +3128,7 @@ function Re(t) {
3080
3128
  * Returns whether the query matches a collection group rather than a specific
3081
3129
  * collection.
3082
3130
  */
3083
- function Pe(t) {
3131
+ function $e(t) {
3084
3132
  return null !== t.collectionGroup;
3085
3133
  }
3086
3134
 
@@ -3088,23 +3136,23 @@ function Pe(t) {
3088
3136
  * Returns the implicit order by constraint that is used to execute the Query,
3089
3137
  * which can be different from the order by constraints the user provided (e.g.
3090
3138
  * the SDK and backend always orders by `__name__`).
3091
- */ function Ve(t) {
3139
+ */ function Ne(t) {
3092
3140
  const e = T(t);
3093
3141
  if (null === e.k) {
3094
3142
  e.k = [];
3095
- const t = Re(e), n = Te(e);
3143
+ const t = Ve(e), n = Pe(e);
3096
3144
  if (null !== t && null === n)
3097
3145
  // In order to implicitly add key ordering, we must also add the
3098
3146
  // inequality filter field for it to be a valid query.
3099
3147
  // Note that the default inequality field and key ordering is ascending.
3100
- t.isKeyField() || e.k.push(new le(t)), e.k.push(new le(st.keyField(), "asc" /* Direction.ASCENDING */)); else {
3148
+ t.isKeyField() || e.k.push(new de(t)), e.k.push(new de(st.keyField(), "asc" /* Direction.ASCENDING */)); else {
3101
3149
  let t = !1;
3102
3150
  for (const n of e.explicitOrderBy) e.k.push(n), n.field.isKeyField() && (t = !0);
3103
3151
  if (!t) {
3104
3152
  // The order of the implicit key ordering always matches the last
3105
3153
  // explicit order by
3106
3154
  const t = e.explicitOrderBy.length > 0 ? e.explicitOrderBy[e.explicitOrderBy.length - 1].dir : "asc" /* Direction.ASCENDING */;
3107
- e.k.push(new le(st.keyField(), t));
3155
+ e.k.push(new de(st.keyField(), t));
3108
3156
  }
3109
3157
  }
3110
3158
  }
@@ -3113,38 +3161,38 @@ function Pe(t) {
3113
3161
 
3114
3162
  /**
3115
3163
  * Converts this `Query` instance to it's corresponding `Target` representation.
3116
- */ function $e(t) {
3164
+ */ function De(t) {
3117
3165
  const e = T(t);
3118
- if (!e.C) if ("F" /* LimitType.First */ === e.limitType) e.C = Ae(e.path, e.collectionGroup, Ve(e), e.filters, e.limit, e.startAt, e.endAt); else {
3166
+ if (!e.C) if ("F" /* LimitType.First */ === e.limitType) e.C = Te(e.path, e.collectionGroup, Ne(e), e.filters, e.limit, e.startAt, e.endAt); else {
3119
3167
  // Flip the orderBy directions since we want the last results
3120
3168
  const t = [];
3121
- for (const n of Ve(e)) {
3169
+ for (const n of Ne(e)) {
3122
3170
  const e = "desc" /* Direction.DESCENDING */ === n.dir ? "asc" /* Direction.ASCENDING */ : "desc" /* Direction.DESCENDING */;
3123
- t.push(new le(n.field, e));
3171
+ t.push(new de(n.field, e));
3124
3172
  }
3125
3173
  // We need to swap the cursors to match the now-flipped query ordering.
3126
- const n = e.endAt ? new Zt(e.endAt.position, e.endAt.inclusive) : null, r = e.startAt ? new Zt(e.startAt.position, e.startAt.inclusive) : null;
3174
+ const n = e.endAt ? new Xt(e.endAt.position, e.endAt.inclusive) : null, r = e.startAt ? new Xt(e.startAt.position, e.startAt.inclusive) : null;
3127
3175
  // Now return as a LimitType.First query.
3128
- e.C = Ae(e.path, e.collectionGroup, t, e.filters, e.limit, n, r);
3176
+ e.C = Te(e.path, e.collectionGroup, t, e.filters, e.limit, n, r);
3129
3177
  }
3130
3178
  return e.C;
3131
3179
  }
3132
3180
 
3133
- function Ne(t, e) {
3134
- e.getFirstInequalityField(), Re(t);
3181
+ function Fe(t, e) {
3182
+ e.getFirstInequalityField(), Ve(t);
3135
3183
  const n = t.filters.concat([ e ]);
3136
- return new Ie(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
3184
+ return new Re(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
3137
3185
  }
3138
3186
 
3139
- function De(t, e) {
3187
+ function xe(t, e) {
3140
3188
  return function(t, e) {
3141
3189
  if (t.limit !== e.limit) return !1;
3142
3190
  if (t.orderBy.length !== e.orderBy.length) return !1;
3143
- for (let n = 0; n < t.orderBy.length; n++) if (!fe(t.orderBy[n], e.orderBy[n])) return !1;
3191
+ for (let n = 0; n < t.orderBy.length; n++) if (!we(t.orderBy[n], e.orderBy[n])) return !1;
3144
3192
  if (t.filters.length !== e.filters.length) return !1;
3145
- for (let n = 0; n < t.filters.length; n++) if (!ne(t.filters[n], e.filters[n])) return !1;
3146
- return t.collectionGroup === e.collectionGroup && !!t.path.isEqual(e.path) && !!Jt(t.startAt, e.startAt) && Jt(t.endAt, e.endAt);
3147
- }($e(t), $e(e)) && t.limitType === e.limitType;
3193
+ for (let n = 0; n < t.filters.length; n++) if (!se(t.filters[n], e.filters[n])) return !1;
3194
+ return t.collectionGroup === e.collectionGroup && !!t.path.isEqual(e.path) && !!te(t.startAt, e.startAt) && te(t.endAt, e.endAt);
3195
+ }(De(t), De(e)) && t.limitType === e.limitType;
3148
3196
  }
3149
3197
 
3150
3198
  /**
@@ -3172,9 +3220,9 @@ function De(t, e) {
3172
3220
  * The return value is an IntegerValue if it can safely represent the value,
3173
3221
  * otherwise a DoubleValue is returned.
3174
3222
  */
3175
- function Fe(t, e) {
3223
+ function Se(t, e) {
3176
3224
  return function(t) {
3177
- return "number" == typeof t && Number.isInteger(t) && !dt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
3225
+ return "number" == typeof t && Number.isInteger(t) && !mt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
3178
3226
  }(e) ?
3179
3227
  /**
3180
3228
  * Returns an IntegerValue for `value`.
@@ -3196,7 +3244,7 @@ function Fe(t, e) {
3196
3244
  };
3197
3245
  }
3198
3246
  return {
3199
- doubleValue: dt(e) ? "-0" : e
3247
+ doubleValue: mt(e) ? "-0" : e
3200
3248
  };
3201
3249
  }(t, e);
3202
3250
  }
@@ -3217,7 +3265,7 @@ function Fe(t, e) {
3217
3265
  * See the License for the specific language governing permissions and
3218
3266
  * limitations under the License.
3219
3267
  */
3220
- /** Used to represent a field transform on a mutation. */ class xe {
3268
+ /** Used to represent a field transform on a mutation. */ class qe {
3221
3269
  constructor() {
3222
3270
  // Make sure that the structural type of `TransformOperation` is unique.
3223
3271
  // See https://github.com/microsoft/TypeScript/issues/5451
@@ -3225,15 +3273,15 @@ function Fe(t, e) {
3225
3273
  }
3226
3274
  }
3227
3275
 
3228
- /** Transforms a value into a server-generated timestamp. */ class Se extends xe {}
3276
+ /** Transforms a value into a server-generated timestamp. */ class Oe extends qe {}
3229
3277
 
3230
- /** Transforms an array value via a union operation. */ class qe extends xe {
3278
+ /** Transforms an array value via a union operation. */ class ke extends qe {
3231
3279
  constructor(t) {
3232
3280
  super(), this.elements = t;
3233
3281
  }
3234
3282
  }
3235
3283
 
3236
- /** Transforms an array value via a remove operation. */ class Oe extends xe {
3284
+ /** Transforms an array value via a remove operation. */ class Ce extends qe {
3237
3285
  constructor(t) {
3238
3286
  super(), this.elements = t;
3239
3287
  }
@@ -3244,7 +3292,7 @@ function Fe(t, e) {
3244
3292
  * transforms. Converts all field values to integers or doubles, but unlike the
3245
3293
  * backend does not cap integer values at 2^63. Instead, JavaScript number
3246
3294
  * arithmetic is used and precision loss can occur for values greater than 2^53.
3247
- */ class ke extends xe {
3295
+ */ class Le extends qe {
3248
3296
  constructor(t, e) {
3249
3297
  super(), this.M = t, this.U = e;
3250
3298
  }
@@ -3266,7 +3314,7 @@ function Fe(t, e) {
3266
3314
  * See the License for the specific language governing permissions and
3267
3315
  * limitations under the License.
3268
3316
  */
3269
- /** A field path and the TransformOperation to perform upon it. */ class Ce {
3317
+ /** A field path and the TransformOperation to perform upon it. */ class Me {
3270
3318
  constructor(t, e) {
3271
3319
  this.field = t, this.transform = e;
3272
3320
  }
@@ -3276,18 +3324,18 @@ function Fe(t, e) {
3276
3324
  * Encodes a precondition for a mutation. This follows the model that the
3277
3325
  * backend accepts with the special case of an explicit "empty" precondition
3278
3326
  * (meaning no precondition).
3279
- */ class Le {
3327
+ */ class Ue {
3280
3328
  constructor(t, e) {
3281
3329
  this.updateTime = t, this.exists = e;
3282
3330
  }
3283
3331
  /** Creates a new empty Precondition. */ static none() {
3284
- return new Le;
3332
+ return new Ue;
3285
3333
  }
3286
3334
  /** Creates a new Precondition with an exists flag. */ static exists(t) {
3287
- return new Le(void 0, t);
3335
+ return new Ue(void 0, t);
3288
3336
  }
3289
3337
  /** Creates a new Precondition based on a version a document exists at. */ static updateTime(t) {
3290
- return new Le(t);
3338
+ return new Ue(t);
3291
3339
  }
3292
3340
  /** Returns whether this Precondition is empty. */ get isNone() {
3293
3341
  return void 0 === this.updateTime && void 0 === this.exists;
@@ -3340,12 +3388,12 @@ function Fe(t, e) {
3340
3388
  * applyToLocalView() to implement the actual behavior of applying the mutation
3341
3389
  * to some source document (see `setMutationApplyToRemoteDocument()` for an
3342
3390
  * example).
3343
- */ class Me {}
3391
+ */ class je {}
3344
3392
 
3345
3393
  /**
3346
3394
  * A mutation that creates or replaces the document at the given key with the
3347
3395
  * object value contents.
3348
- */ class Ue extends Me {
3396
+ */ class Be extends je {
3349
3397
  constructor(t, e, n, r = []) {
3350
3398
  super(), this.key = t, this.value = e, this.precondition = n, this.fieldTransforms = r,
3351
3399
  this.type = 0 /* MutationType.Set */;
@@ -3367,7 +3415,7 @@ function Fe(t, e) {
3367
3415
  * is deleted.
3368
3416
  * * When a field is not in the mask but is in the values, the values map is
3369
3417
  * ignored.
3370
- */ class je extends Me {
3418
+ */ class ze extends je {
3371
3419
  constructor(t, e, n, r, s = []) {
3372
3420
  super(), this.key = t, this.data = e, this.fieldMask = n, this.precondition = r,
3373
3421
  this.fieldTransforms = s, this.type = 1 /* MutationType.Patch */;
@@ -3377,7 +3425,7 @@ function Fe(t, e) {
3377
3425
  }
3378
3426
  }
3379
3427
 
3380
- /** A mutation that deletes the document at the given key. */ class Be extends Me {
3428
+ /** A mutation that deletes the document at the given key. */ class Qe extends je {
3381
3429
  constructor(t, e) {
3382
3430
  super(), this.key = t, this.precondition = e, this.type = 2 /* MutationType.Delete */ ,
3383
3431
  this.fieldTransforms = [];
@@ -3393,7 +3441,7 @@ function Fe(t, e) {
3393
3441
  *
3394
3442
  * The `verify` operation is only used in Transactions, and this class serves
3395
3443
  * primarily to facilitate serialization into protos.
3396
- */ class ze extends Me {
3444
+ */ class We extends je {
3397
3445
  constructor(t, e) {
3398
3446
  super(), this.key = t, this.precondition = e, this.type = 3 /* MutationType.Verify */ ,
3399
3447
  this.fieldTransforms = [];
@@ -3418,13 +3466,13 @@ function Fe(t, e) {
3418
3466
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3419
3467
  * See the License for the specific language governing permissions and
3420
3468
  * limitations under the License.
3421
- */ const Qe = (() => {
3469
+ */ const Ge = (() => {
3422
3470
  const t = {
3423
3471
  asc: "ASCENDING",
3424
3472
  desc: "DESCENDING"
3425
3473
  };
3426
3474
  return t;
3427
- })(), We = (() => {
3475
+ })(), Ke = (() => {
3428
3476
  const t = {
3429
3477
  "<": "LESS_THAN",
3430
3478
  "<=": "LESS_THAN_OR_EQUAL",
@@ -3438,7 +3486,7 @@ function Fe(t, e) {
3438
3486
  "array-contains-any": "ARRAY_CONTAINS_ANY"
3439
3487
  };
3440
3488
  return t;
3441
- })(), Ge = (() => {
3489
+ })(), Ye = (() => {
3442
3490
  const t = {
3443
3491
  and: "AND",
3444
3492
  or: "OR"
@@ -3460,7 +3508,7 @@ function Fe(t, e) {
3460
3508
  * TODO(klimt): We can remove the databaseId argument if we keep the full
3461
3509
  * resource name in documents.
3462
3510
  */
3463
- class Ke {
3511
+ class He {
3464
3512
  constructor(t, e) {
3465
3513
  this.databaseId = t, this.L = e;
3466
3514
  }
@@ -3477,7 +3525,7 @@ class Ke {
3477
3525
  /**
3478
3526
  * Returns a value for a Date that's appropriate to put into a proto.
3479
3527
  */
3480
- function Ye(t, e) {
3528
+ function Ze(t, e) {
3481
3529
  if (t.L) {
3482
3530
  return `${new Date(1e3 * e.seconds).toISOString().replace(/\.\d*/, "").replace("Z", "")}.${("000000000" + e.nanoseconds).slice(-9)}Z`;
3483
3531
  }
@@ -3492,35 +3540,35 @@ function Ye(t, e) {
3492
3540
  *
3493
3541
  * Visible for testing.
3494
3542
  */
3495
- function He(t, e) {
3543
+ function Je(t, e) {
3496
3544
  return t.L ? e.toBase64() : e.toUint8Array();
3497
3545
  }
3498
3546
 
3499
- function Ze(t, e) {
3500
- return Ye(t, e.toTimestamp());
3547
+ function Xe(t, e) {
3548
+ return Ze(t, e.toTimestamp());
3501
3549
  }
3502
3550
 
3503
- function Je(t) {
3504
- return I(!!t), de.fromTimestamp(function(t) {
3505
- const e = Ft(t);
3506
- return new qt(e.seconds, e.nanos);
3551
+ function tn(t) {
3552
+ return I(!!t), me.fromTimestamp(function(t) {
3553
+ const e = St(t);
3554
+ return new kt(e.seconds, e.nanos);
3507
3555
  }(t));
3508
3556
  }
3509
3557
 
3510
- function Xe(t, e) {
3558
+ function en(t, e) {
3511
3559
  return function(t) {
3512
3560
  return new nt([ "projects", t.projectId, "databases", t.database ]);
3513
3561
  }(t).child("documents").child(e).canonicalString();
3514
3562
  }
3515
3563
 
3516
- function tn(t, e) {
3517
- return Xe(t.databaseId, e.path);
3564
+ function nn(t, e) {
3565
+ return en(t.databaseId, e.path);
3518
3566
  }
3519
3567
 
3520
- function en(t, e) {
3568
+ function rn(t, e) {
3521
3569
  const n = function(t) {
3522
3570
  const e = nt.fromString(t);
3523
- return I(mn(e)), e;
3571
+ return I(yn(e)), e;
3524
3572
  }(e);
3525
3573
  if (n.get(1) !== t.databaseId.projectId) throw new B($, "Tried to deserialize key from different project: " + n.get(1) + " vs " + t.databaseId.projectId);
3526
3574
  if (n.get(3) !== t.databaseId.database) throw new B($, "Tried to deserialize key from different database: " + n.get(3) + " vs " + t.databaseId.database);
@@ -3528,98 +3576,98 @@ function en(t, e) {
3528
3576
  var r;
3529
3577
  /** Creates a Document proto from key and fields (but no create/update time) */}
3530
3578
 
3531
- function nn(t, e) {
3532
- return Xe(t.databaseId, e);
3579
+ function sn(t, e) {
3580
+ return en(t.databaseId, e);
3533
3581
  }
3534
3582
 
3535
- function rn(t) {
3583
+ function on(t) {
3536
3584
  return new nt([ "projects", t.databaseId.projectId, "databases", t.databaseId.database ]).canonicalString();
3537
3585
  }
3538
3586
 
3539
- function sn(t, e, n) {
3587
+ function un(t, e, n) {
3540
3588
  return {
3541
- name: tn(t, e),
3589
+ name: nn(t, e),
3542
3590
  fields: n.value.mapValue.fields
3543
3591
  };
3544
3592
  }
3545
3593
 
3546
- function on(t, e) {
3594
+ function cn(t, e) {
3547
3595
  return "found" in e ? function(t, e) {
3548
3596
  I(!!e.found), e.found.name, e.found.updateTime;
3549
- const n = en(t, e.found.name), r = Je(e.found.updateTime), s = e.found.createTime ? Je(e.found.createTime) : de.min(), i = new ve({
3597
+ const n = rn(t, e.found.name), r = tn(e.found.updateTime), s = e.found.createTime ? tn(e.found.createTime) : me.min(), i = new Ee({
3550
3598
  mapValue: {
3551
3599
  fields: e.found.fields
3552
3600
  }
3553
3601
  });
3554
- return be.newFoundDocument(n, r, s, i);
3602
+ return Ae.newFoundDocument(n, r, s, i);
3555
3603
  }(t, e) : "missing" in e ? function(t, e) {
3556
3604
  I(!!e.missing), I(!!e.readTime);
3557
- const n = en(t, e.missing), r = Je(e.readTime);
3558
- return be.newNoDocument(n, r);
3605
+ const n = rn(t, e.missing), r = tn(e.readTime);
3606
+ return Ae.newNoDocument(n, r);
3559
3607
  }(t, e) : A();
3560
3608
  }
3561
3609
 
3562
- function un(t, e) {
3610
+ function an(t, e) {
3563
3611
  let n;
3564
- if (e instanceof Ue) n = {
3565
- update: sn(t, e.key, e.value)
3566
- }; else if (e instanceof Be) n = {
3567
- delete: tn(t, e.key)
3568
- }; else if (e instanceof je) n = {
3569
- update: sn(t, e.key, e.data),
3570
- updateMask: wn(e.fieldMask)
3612
+ if (e instanceof Be) n = {
3613
+ update: un(t, e.key, e.value)
3614
+ }; else if (e instanceof Qe) n = {
3615
+ delete: nn(t, e.key)
3616
+ }; else if (e instanceof ze) n = {
3617
+ update: un(t, e.key, e.data),
3618
+ updateMask: pn(e.fieldMask)
3571
3619
  }; else {
3572
- if (!(e instanceof ze)) return A();
3620
+ if (!(e instanceof We)) return A();
3573
3621
  n = {
3574
- verify: tn(t, e.key)
3622
+ verify: nn(t, e.key)
3575
3623
  };
3576
3624
  }
3577
3625
  return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map((t => function(t, e) {
3578
3626
  const n = e.transform;
3579
- if (n instanceof Se) return {
3627
+ if (n instanceof Oe) return {
3580
3628
  fieldPath: e.field.canonicalString(),
3581
3629
  setToServerValue: "REQUEST_TIME"
3582
3630
  };
3583
- if (n instanceof qe) return {
3631
+ if (n instanceof ke) return {
3584
3632
  fieldPath: e.field.canonicalString(),
3585
3633
  appendMissingElements: {
3586
3634
  values: n.elements
3587
3635
  }
3588
3636
  };
3589
- if (n instanceof Oe) return {
3637
+ if (n instanceof Ce) return {
3590
3638
  fieldPath: e.field.canonicalString(),
3591
3639
  removeAllFromArray: {
3592
3640
  values: n.elements
3593
3641
  }
3594
3642
  };
3595
- if (n instanceof ke) return {
3643
+ if (n instanceof Le) return {
3596
3644
  fieldPath: e.field.canonicalString(),
3597
3645
  increment: n.U
3598
3646
  };
3599
3647
  throw A();
3600
3648
  }(0, t)))), e.precondition.isNone || (n.currentDocument = function(t, e) {
3601
3649
  return void 0 !== e.updateTime ? {
3602
- updateTime: Ze(t, e.updateTime)
3650
+ updateTime: Xe(t, e.updateTime)
3603
3651
  } : void 0 !== e.exists ? {
3604
3652
  exists: e.exists
3605
3653
  } : A();
3606
3654
  }(t, e.precondition)), n;
3607
3655
  }
3608
3656
 
3609
- function cn(t, e) {
3657
+ function hn(t, e) {
3610
3658
  // Dissect the path into parent, collectionId, and optional key filter.
3611
3659
  const n = {
3612
3660
  structuredQuery: {}
3613
3661
  }, r = e.path;
3614
- null !== e.collectionGroup ? (n.parent = nn(t, r), n.structuredQuery.from = [ {
3662
+ null !== e.collectionGroup ? (n.parent = sn(t, r), n.structuredQuery.from = [ {
3615
3663
  collectionId: e.collectionGroup,
3616
3664
  allDescendants: !0
3617
- } ]) : (n.parent = nn(t, r.popLast()), n.structuredQuery.from = [ {
3665
+ } ]) : (n.parent = sn(t, r.popLast()), n.structuredQuery.from = [ {
3618
3666
  collectionId: r.lastSegment()
3619
3667
  } ]);
3620
3668
  const s = function(t) {
3621
3669
  if (0 === t.length) return;
3622
- return dn(ee.create(t, "and" /* CompositeOperator.AND */));
3670
+ return mn(re.create(t, "and" /* CompositeOperator.AND */));
3623
3671
  }(e.filters);
3624
3672
  s && (n.structuredQuery.where = s);
3625
3673
  const i = function(t) {
@@ -3628,8 +3676,8 @@ function cn(t, e) {
3628
3676
  // visible for testing
3629
3677
  function(t) {
3630
3678
  return {
3631
- field: fn(t.field),
3632
- direction: an(t.dir)
3679
+ field: wn(t.field),
3680
+ direction: ln(t.dir)
3633
3681
  };
3634
3682
  }
3635
3683
  // visible for testing
@@ -3637,7 +3685,7 @@ function cn(t, e) {
3637
3685
  }(e.orderBy);
3638
3686
  i && (n.structuredQuery.orderBy = i);
3639
3687
  const o = function(t, e) {
3640
- return t.L || ft(e) ? e : {
3688
+ return t.L || wt(e) ? e : {
3641
3689
  value: e
3642
3690
  };
3643
3691
  }(t, e.limit);
@@ -3655,81 +3703,81 @@ function cn(t, e) {
3655
3703
  (e.endAt)), n;
3656
3704
  }
3657
3705
 
3658
- function an(t) {
3659
- return Qe[t];
3706
+ function ln(t) {
3707
+ return Ge[t];
3660
3708
  }
3661
3709
 
3662
3710
  // visible for testing
3663
- function hn(t) {
3664
- return We[t];
3711
+ function fn(t) {
3712
+ return Ke[t];
3665
3713
  }
3666
3714
 
3667
- function ln(t) {
3668
- return Ge[t];
3715
+ function dn(t) {
3716
+ return Ye[t];
3669
3717
  }
3670
3718
 
3671
- function fn(t) {
3719
+ function wn(t) {
3672
3720
  return {
3673
3721
  fieldPath: t.canonicalString()
3674
3722
  };
3675
3723
  }
3676
3724
 
3677
- function dn(t) {
3678
- return t instanceof te ? function(t) {
3725
+ function mn(t) {
3726
+ return t instanceof ne ? function(t) {
3679
3727
  if ("==" /* Operator.EQUAL */ === t.op) {
3680
- if (Kt(t.value)) return {
3728
+ if (Ht(t.value)) return {
3681
3729
  unaryFilter: {
3682
- field: fn(t.field),
3730
+ field: wn(t.field),
3683
3731
  op: "IS_NAN"
3684
3732
  }
3685
3733
  };
3686
- if (Gt(t.value)) return {
3734
+ if (Yt(t.value)) return {
3687
3735
  unaryFilter: {
3688
- field: fn(t.field),
3736
+ field: wn(t.field),
3689
3737
  op: "IS_NULL"
3690
3738
  }
3691
3739
  };
3692
3740
  } else if ("!=" /* Operator.NOT_EQUAL */ === t.op) {
3693
- if (Kt(t.value)) return {
3741
+ if (Ht(t.value)) return {
3694
3742
  unaryFilter: {
3695
- field: fn(t.field),
3743
+ field: wn(t.field),
3696
3744
  op: "IS_NOT_NAN"
3697
3745
  }
3698
3746
  };
3699
- if (Gt(t.value)) return {
3747
+ if (Yt(t.value)) return {
3700
3748
  unaryFilter: {
3701
- field: fn(t.field),
3749
+ field: wn(t.field),
3702
3750
  op: "IS_NOT_NULL"
3703
3751
  }
3704
3752
  };
3705
3753
  }
3706
3754
  return {
3707
3755
  fieldFilter: {
3708
- field: fn(t.field),
3709
- op: hn(t.op),
3756
+ field: wn(t.field),
3757
+ op: fn(t.op),
3710
3758
  value: t.value
3711
3759
  }
3712
3760
  };
3713
- }(t) : t instanceof ee ? function(t) {
3714
- const e = t.getFilters().map((t => dn(t)));
3761
+ }(t) : t instanceof re ? function(t) {
3762
+ const e = t.getFilters().map((t => mn(t)));
3715
3763
  if (1 === e.length) return e[0];
3716
3764
  return {
3717
3765
  compositeFilter: {
3718
- op: ln(t.op),
3766
+ op: dn(t.op),
3719
3767
  filters: e
3720
3768
  }
3721
3769
  };
3722
3770
  }(t) : A();
3723
3771
  }
3724
3772
 
3725
- function wn(t) {
3773
+ function pn(t) {
3726
3774
  const e = [];
3727
3775
  return t.fields.forEach((t => e.push(t.canonicalString()))), {
3728
3776
  fieldPaths: e
3729
3777
  };
3730
3778
  }
3731
3779
 
3732
- function mn(t) {
3780
+ function yn(t) {
3733
3781
  // Resource names have at least 4 components (project ID, database ID)
3734
3782
  return t.length >= 4 && "projects" === t.get(0) && "databases" === t.get(2);
3735
3783
  }
@@ -3749,8 +3797,8 @@ function mn(t) {
3749
3797
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3750
3798
  * See the License for the specific language governing permissions and
3751
3799
  * limitations under the License.
3752
- */ function pn(t) {
3753
- return new Ke(t, /* useProto3Json= */ !0);
3800
+ */ function gn(t) {
3801
+ return new He(t, /* useProto3Json= */ !0);
3754
3802
  }
3755
3803
 
3756
3804
  /**
@@ -3778,7 +3826,7 @@ function mn(t) {
3778
3826
  * base delay. This prevents clients from accidentally synchronizing their
3779
3827
  * delays causing spikes of load to the backend.
3780
3828
  */
3781
- class yn {
3829
+ class _n {
3782
3830
  constructor(
3783
3831
  /**
3784
3832
  * The AsyncQueue to run backoff operations on.
@@ -3876,7 +3924,7 @@ class yn {
3876
3924
  * An implementation of Datastore that exposes additional state for internal
3877
3925
  * consumption.
3878
3926
  */
3879
- class gn extends class {} {
3927
+ class vn extends class {} {
3880
3928
  constructor(t, e, n, r) {
3881
3929
  super(), this.authCredentials = t, this.appCheckCredentials = e, this.connection = n,
3882
3930
  this.M = r, this.et = !1;
@@ -3903,19 +3951,19 @@ class gn extends class {} {
3903
3951
 
3904
3952
  // TODO(firestorexp): Make sure there is only one Datastore instance per
3905
3953
  // firestore-exp client.
3906
- async function _n(t, e) {
3907
- const n = T(t), r = rn(n.M) + "/documents", s = {
3908
- writes: e.map((t => un(n.M, t)))
3954
+ async function bn(t, e) {
3955
+ const n = T(t), r = on(n.M) + "/documents", s = {
3956
+ writes: e.map((t => an(n.M, t)))
3909
3957
  };
3910
3958
  await n.A("Commit", r, s);
3911
3959
  }
3912
3960
 
3913
- async function vn(t, e) {
3914
- const n = T(t), r = rn(n.M) + "/documents", s = {
3915
- documents: e.map((t => tn(n.M, t)))
3961
+ async function En(t, e) {
3962
+ const n = T(t), r = on(n.M) + "/documents", s = {
3963
+ documents: e.map((t => nn(n.M, t)))
3916
3964
  }, i = await n.P("BatchGetDocuments", r, s, e.length), o = new Map;
3917
3965
  i.forEach((t => {
3918
- const e = on(n.M, t);
3966
+ const e = cn(n.M, t);
3919
3967
  o.set(e.key.toString(), e);
3920
3968
  }));
3921
3969
  const u = [];
@@ -3925,23 +3973,23 @@ async function vn(t, e) {
3925
3973
  })), u;
3926
3974
  }
3927
3975
 
3928
- async function bn(t, e) {
3929
- const n = T(t), r = cn(n.M, $e(e));
3976
+ async function An(t, e) {
3977
+ const n = T(t), r = hn(n.M, De(e));
3930
3978
  return (await n.P("RunQuery", r.parent, {
3931
3979
  structuredQuery: r.structuredQuery
3932
3980
  })).filter((t => !!t.document)).map((t => function(t, e, n) {
3933
- const r = en(t, e.name), s = Je(e.updateTime), i = e.createTime ? Je(e.createTime) : de.min(), o = new ve({
3981
+ const r = rn(t, e.name), s = tn(e.updateTime), i = e.createTime ? tn(e.createTime) : me.min(), o = new Ee({
3934
3982
  mapValue: {
3935
3983
  fields: e.fields
3936
3984
  }
3937
- }), u = be.newFoundDocument(r, s, i, o);
3985
+ }), u = Ae.newFoundDocument(r, s, i, o);
3938
3986
  return n && u.setHasCommittedMutations(), n ? u.setHasCommittedMutations() : u;
3939
3987
  }(n.M, t.document, void 0)));
3940
3988
  }
3941
3989
 
3942
- async function En(t, e, n) {
3990
+ async function In(t, e, n) {
3943
3991
  const r = T(t), s = function(t, e, n) {
3944
- const r = cn(t, e), s = [];
3992
+ const r = hn(t, e), s = [];
3945
3993
  return n.forEach((t => {
3946
3994
  "count" === t.D ? s.push({
3947
3995
  alias: t.alias.canonicalString(),
@@ -3949,12 +3997,12 @@ async function En(t, e, n) {
3949
3997
  }) : "avg" === t.D ? s.push({
3950
3998
  alias: t.alias.canonicalString(),
3951
3999
  avg: {
3952
- field: fn(t.fieldPath)
4000
+ field: wn(t.fieldPath)
3953
4001
  }
3954
4002
  }) : "sum" === t.D && s.push({
3955
4003
  alias: t.alias.canonicalString(),
3956
4004
  sum: {
3957
- field: fn(t.fieldPath)
4005
+ field: wn(t.fieldPath)
3958
4006
  }
3959
4007
  });
3960
4008
  })), {
@@ -3964,11 +4012,11 @@ async function En(t, e, n) {
3964
4012
  },
3965
4013
  parent: r.parent
3966
4014
  };
3967
- }(r.M, $e(e), n), i = s.parent;
4015
+ }(r.M, De(e), n), i = s.parent;
3968
4016
  r.connection.v || delete s.parent;
3969
4017
  const o = (await r.P("RunAggregationQuery", i, s, /*expectedResponseCount=*/ 1)).filter((t => !!t.result));
3970
4018
  // Omit RunAggregationQueryResponse that only contain readTimes.
3971
- return I(1 === o.length), (u = o[0]).result, u.result.aggregateFields, new ve({
4019
+ return I(1 === o.length), (u = o[0]).result, u.result.aggregateFields, new Ee({
3972
4020
  mapValue: {
3973
4021
  fields: null === (c = u.result) || void 0 === c ? void 0 : c.aggregateFields
3974
4022
  }
@@ -3991,7 +4039,7 @@ async function En(t, e, n) {
3991
4039
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3992
4040
  * See the License for the specific language governing permissions and
3993
4041
  * limitations under the License.
3994
- */ const An = new Map;
4042
+ */ const Tn = new Map;
3995
4043
 
3996
4044
  /**
3997
4045
  * An instance map that ensures only one Datastore exists per Firestore
@@ -4002,17 +4050,17 @@ async function En(t, e, n) {
4002
4050
  * instance. Callers must invoke removeComponents() when the Firestore
4003
4051
  * instance is terminated.
4004
4052
  */
4005
- function In(t) {
4053
+ function Rn(t) {
4006
4054
  if (t._terminated) throw new B(O, "The client has already been terminated.");
4007
- if (!An.has(t)) {
4055
+ if (!Tn.has(t)) {
4008
4056
  _("ComponentProvider", "Initializing Datastore");
4009
4057
  const i = function(t) {
4010
- return new gt(t, fetch.bind(null));
4058
+ return new vt(t, fetch.bind(null));
4011
4059
  }((e = t._databaseId, n = t.app.options.appId || "", r = t._persistenceKey, s = t._freezeSettings(),
4012
- new X(e, n, r, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams))), o = pn(t._databaseId), u = function(t, e, n, r) {
4013
- return new gn(t, e, n, r);
4060
+ new X(e, n, r, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams))), o = gn(t._databaseId), u = function(t, e, n, r) {
4061
+ return new vn(t, e, n, r);
4014
4062
  }(t._authCredentials, t._appCheckCredentials, i, o);
4015
- An.set(t, u);
4063
+ Tn.set(t, u);
4016
4064
  }
4017
4065
  var e, n, r, s;
4018
4066
  /**
@@ -4030,7 +4078,7 @@ function In(t) {
4030
4078
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4031
4079
  * See the License for the specific language governing permissions and
4032
4080
  * limitations under the License.
4033
- */ return An.get(t);
4081
+ */ return Tn.get(t);
4034
4082
  }
4035
4083
 
4036
4084
  /**
@@ -4042,7 +4090,7 @@ function In(t) {
4042
4090
  * user-supplied `FirestoreSettings` object. This is a separate type so that
4043
4091
  * defaults can be supplied and the value can be checked for equality.
4044
4092
  */
4045
- class Tn {
4093
+ class Pn {
4046
4094
  constructor(t) {
4047
4095
  var e;
4048
4096
  if (void 0 === t.host) {
@@ -4084,7 +4132,7 @@ class Tn {
4084
4132
  * The Cloud Firestore service interface.
4085
4133
  *
4086
4134
  * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.
4087
- */ class Rn {
4135
+ */ class Vn {
4088
4136
  /** @hideconstructor */
4089
4137
  constructor(t, e, n, r) {
4090
4138
  this._authCredentials = t, this._appCheckCredentials = e, this._databaseId = n,
@@ -4092,7 +4140,7 @@ class Tn {
4092
4140
  /**
4093
4141
  * Whether it's a Firestore or Firestore Lite instance.
4094
4142
  */
4095
- this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Tn({}),
4143
+ this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Pn({}),
4096
4144
  this._settingsFrozen = !1;
4097
4145
  }
4098
4146
  /**
@@ -4110,7 +4158,7 @@ class Tn {
4110
4158
  }
4111
4159
  _setSettings(t) {
4112
4160
  if (this._settingsFrozen) throw new B(O, "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.");
4113
- this._settings = new Tn(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
4161
+ this._settings = new Pn(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
4114
4162
  if (!t) return new W;
4115
4163
  switch (t.type) {
4116
4164
  case "gapi":
@@ -4149,13 +4197,13 @@ class Tn {
4149
4197
  * Only ever called once.
4150
4198
  */ _terminate() {
4151
4199
  return function(t) {
4152
- const e = An.get(t);
4153
- e && (_("ComponentProvider", "Removing Datastore"), An.delete(t), e.terminate());
4200
+ const e = Tn.get(t);
4201
+ e && (_("ComponentProvider", "Removing Datastore"), Tn.delete(t), e.terminate());
4154
4202
  }(this), Promise.resolve();
4155
4203
  }
4156
4204
  }
4157
4205
 
4158
- function Pn(t, e, n) {
4206
+ function $n(t, e, n) {
4159
4207
  n || (n = "(default)");
4160
4208
  const r = _getProvider(t, "firestore/lite");
4161
4209
  if (r.isInitialized(n)) throw new B(O, "Firestore can only be initialized once per app.");
@@ -4165,13 +4213,13 @@ function Pn(t, e, n) {
4165
4213
  });
4166
4214
  }
4167
4215
 
4168
- function Vn(e, n) {
4216
+ function Nn(e, n) {
4169
4217
  const r = "object" == typeof e ? e : t(), s = "string" == typeof e ? e : n || "(default)", i = _getProvider(r, "firestore/lite").getImmediate({
4170
4218
  identifier: s
4171
4219
  });
4172
4220
  if (!i._initialized) {
4173
4221
  const t = l("firestore");
4174
- t && $n(i, ...t);
4222
+ t && Dn(i, ...t);
4175
4223
  }
4176
4224
  return i;
4177
4225
  }
@@ -4188,9 +4236,9 @@ function Vn(e, n) {
4188
4236
  * @param port - the emulator port (ex: 9000).
4189
4237
  * @param options.mockUserToken - the mock auth token to use for unit testing
4190
4238
  * Security Rules.
4191
- */ function $n(t, e, n, r = {}) {
4239
+ */ function Dn(t, e, n, r = {}) {
4192
4240
  var s;
4193
- const i = (t = ht(t, Rn))._getSettings();
4241
+ const i = (t = ht(t, Vn))._getSettings();
4194
4242
  if ("firestore.googleapis.com" !== i.host && i.host !== e && b("Host has been set in both settings() and useEmulator(), emulator host will be used"),
4195
4243
  t._setSettings(Object.assign(Object.assign({}, i), {
4196
4244
  host: `${e}:${n}`,
@@ -4228,8 +4276,8 @@ function Vn(e, n) {
4228
4276
  * @param firestore - The `Firestore` instance to terminate.
4229
4277
  * @returns A `Promise` that is resolved when the instance has been successfully
4230
4278
  * terminated.
4231
- */ function Nn(t) {
4232
- return t = ht(t, Rn), e(t.app, "firestore/lite"), t._delete();
4279
+ */ function Fn(t) {
4280
+ return t = ht(t, Vn), e(t.app, "firestore/lite"), t._delete();
4233
4281
  }
4234
4282
 
4235
4283
  /**
@@ -4268,7 +4316,7 @@ function Vn(e, n) {
4268
4316
  * Represents an aggregation that can be performed by Firestore.
4269
4317
  */
4270
4318
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
4271
- class Dn {
4319
+ class xn {
4272
4320
  /**
4273
4321
  * Create a new AggregateField<T>
4274
4322
  * @param _aggregateType Specifies the type of aggregation operation to perform.
@@ -4286,7 +4334,7 @@ class Dn {
4286
4334
 
4287
4335
  /**
4288
4336
  * The results of executing an aggregation query.
4289
- */ class Fn {
4337
+ */ class Sn {
4290
4338
  /** @hideconstructor */
4291
4339
  constructor(t, e, n) {
4292
4340
  this._userDataWriter = e, this._data = n,
@@ -4328,7 +4376,7 @@ class Dn {
4328
4376
  * A `DocumentReference` refers to a document location in a Firestore database
4329
4377
  * and can be used to write, read, or listen to the location. The document at
4330
4378
  * the referenced location may or may not exist.
4331
- */ class xn {
4379
+ */ class qn {
4332
4380
  /** @hideconstructor */
4333
4381
  constructor(t,
4334
4382
  /**
@@ -4356,17 +4404,17 @@ class Dn {
4356
4404
  /**
4357
4405
  * The collection this `DocumentReference` belongs to.
4358
4406
  */ get parent() {
4359
- return new qn(this.firestore, this.converter, this._key.path.popLast());
4407
+ return new kn(this.firestore, this.converter, this._key.path.popLast());
4360
4408
  }
4361
4409
  withConverter(t) {
4362
- return new xn(this.firestore, t, this._key);
4410
+ return new qn(this.firestore, t, this._key);
4363
4411
  }
4364
4412
  }
4365
4413
 
4366
4414
  /**
4367
4415
  * A `Query` refers to a query which you can read or listen to. You can also
4368
4416
  * construct refined `Query` objects by adding filters and ordering.
4369
- */ class Sn {
4417
+ */ class On {
4370
4418
  // This is the lite version of the Query class in the main SDK.
4371
4419
  /** @hideconstructor protected */
4372
4420
  constructor(t,
@@ -4379,17 +4427,17 @@ class Dn {
4379
4427
  this.type = "query", this.firestore = t;
4380
4428
  }
4381
4429
  withConverter(t) {
4382
- return new Sn(this.firestore, t, this._query);
4430
+ return new On(this.firestore, t, this._query);
4383
4431
  }
4384
4432
  }
4385
4433
 
4386
4434
  /**
4387
4435
  * A `CollectionReference` object can be used for adding documents, getting
4388
4436
  * document references, and querying for documents (using {@link query}).
4389
- */ class qn extends Sn {
4437
+ */ class kn extends On {
4390
4438
  /** @hideconstructor */
4391
4439
  constructor(t, e, n) {
4392
- super(t, e, new Ie(n)), this._path = n,
4440
+ super(t, e, new Re(n)), this._path = n,
4393
4441
  /** The type of this Firestore reference. */
4394
4442
  this.type = "collection";
4395
4443
  }
@@ -4407,23 +4455,23 @@ class Dn {
4407
4455
  * subcollection. If this isn't a subcollection, the reference is null.
4408
4456
  */ get parent() {
4409
4457
  const t = this._path.popLast();
4410
- return t.isEmpty() ? null : new xn(this.firestore,
4458
+ return t.isEmpty() ? null : new qn(this.firestore,
4411
4459
  /* converter= */ null, new it(t));
4412
4460
  }
4413
4461
  withConverter(t) {
4414
- return new qn(this.firestore, t, this._path);
4462
+ return new kn(this.firestore, t, this._path);
4415
4463
  }
4416
4464
  }
4417
4465
 
4418
- function On(t, e, ...n) {
4419
- if (t = d(t), ot("collection", "path", e), t instanceof Rn) {
4466
+ function Cn(t, e, ...n) {
4467
+ if (t = d(t), ot("collection", "path", e), t instanceof Vn) {
4420
4468
  const r = nt.fromString(e, ...n);
4421
- return ct(r), new qn(t, /* converter= */ null, r);
4469
+ return ct(r), new kn(t, /* converter= */ null, r);
4422
4470
  }
4423
4471
  {
4424
- if (!(t instanceof xn || t instanceof qn)) throw new B($, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
4472
+ if (!(t instanceof qn || t instanceof kn)) throw new B($, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
4425
4473
  const r = t._path.child(nt.fromString(e, ...n));
4426
- return ct(r), new qn(t.firestore,
4474
+ return ct(r), new kn(t.firestore,
4427
4475
  /* converter= */ null, r);
4428
4476
  }
4429
4477
  }
@@ -4440,27 +4488,27 @@ function On(t, e, ...n) {
4440
4488
  * collection or subcollection with this ID as the last segment of its path
4441
4489
  * will be included. Cannot contain a slash.
4442
4490
  * @returns The created `Query`.
4443
- */ function kn(t, e) {
4444
- if (t = ht(t, Rn), ot("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new B($, `Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);
4445
- return new Sn(t,
4491
+ */ function Ln(t, e) {
4492
+ if (t = ht(t, Vn), ot("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new B($, `Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);
4493
+ return new On(t,
4446
4494
  /* converter= */ null, function(t) {
4447
- return new Ie(nt.emptyPath(), t);
4495
+ return new Re(nt.emptyPath(), t);
4448
4496
  }(e));
4449
4497
  }
4450
4498
 
4451
- function Cn(t, e, ...n) {
4499
+ function Mn(t, e, ...n) {
4452
4500
  if (t = d(t),
4453
4501
  // We allow omission of 'pathString' but explicitly prohibit passing in both
4454
4502
  // 'undefined' and 'null'.
4455
- 1 === arguments.length && (e = At.F()), ot("doc", "path", e), t instanceof Rn) {
4503
+ 1 === arguments.length && (e = Tt.F()), ot("doc", "path", e), t instanceof Vn) {
4456
4504
  const r = nt.fromString(e, ...n);
4457
- return ut(r), new xn(t,
4505
+ return ut(r), new qn(t,
4458
4506
  /* converter= */ null, new it(r));
4459
4507
  }
4460
4508
  {
4461
- if (!(t instanceof xn || t instanceof qn)) throw new B($, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
4509
+ if (!(t instanceof qn || t instanceof kn)) throw new B($, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
4462
4510
  const r = t._path.child(nt.fromString(e, ...n));
4463
- return ut(r), new xn(t.firestore, t instanceof qn ? t.converter : null, new it(r));
4511
+ return ut(r), new qn(t.firestore, t instanceof kn ? t.converter : null, new it(r));
4464
4512
  }
4465
4513
  }
4466
4514
 
@@ -4471,8 +4519,8 @@ function Cn(t, e, ...n) {
4471
4519
  * @param right - A reference to compare.
4472
4520
  * @returns true if the references point to the same location in the same
4473
4521
  * Firestore database.
4474
- */ function Ln(t, e) {
4475
- return t = d(t), e = d(e), (t instanceof xn || t instanceof qn) && (e instanceof xn || e instanceof qn) && (t.firestore === e.firestore && t.path === e.path && t.converter === e.converter);
4522
+ */ function Un(t, e) {
4523
+ return t = d(t), e = d(e), (t instanceof qn || t instanceof kn) && (e instanceof qn || e instanceof kn) && (t.firestore === e.firestore && t.path === e.path && t.converter === e.converter);
4476
4524
  }
4477
4525
 
4478
4526
  /**
@@ -4483,8 +4531,8 @@ function Cn(t, e, ...n) {
4483
4531
  * @param right - A `Query` to compare.
4484
4532
  * @returns true if the references point to the same location in the same
4485
4533
  * Firestore database.
4486
- */ function Mn(t, e) {
4487
- return t = d(t), e = d(e), t instanceof Sn && e instanceof Sn && (t.firestore === e.firestore && De(t._query, e._query) && t.converter === e.converter);
4534
+ */ function jn(t, e) {
4535
+ return t = d(t), e = d(e), t instanceof On && e instanceof On && (t.firestore === e.firestore && xe(t._query, e._query) && t.converter === e.converter);
4488
4536
  }
4489
4537
 
4490
4538
  /**
@@ -4505,7 +4553,7 @@ function Cn(t, e, ...n) {
4505
4553
  */
4506
4554
  /**
4507
4555
  * An immutable object representing an array of bytes.
4508
- */ class Un {
4556
+ */ class Bn {
4509
4557
  /** @hideconstructor */
4510
4558
  constructor(t) {
4511
4559
  this._byteString = t;
@@ -4517,7 +4565,7 @@ function Cn(t, e, ...n) {
4517
4565
  * @param base64 - The Base64 string used to create the `Bytes` object.
4518
4566
  */ static fromBase64String(t) {
4519
4567
  try {
4520
- return new Un(Nt.fromBase64String(t));
4568
+ return new Bn(Ft.fromBase64String(t));
4521
4569
  } catch (t) {
4522
4570
  throw new B($, "Failed to construct data from Base64 string: " + t);
4523
4571
  }
@@ -4527,7 +4575,7 @@ function Cn(t, e, ...n) {
4527
4575
  *
4528
4576
  * @param array - The Uint8Array used to create the `Bytes` object.
4529
4577
  */ static fromUint8Array(t) {
4530
- return new Un(Nt.fromUint8Array(t));
4578
+ return new Bn(Ft.fromUint8Array(t));
4531
4579
  }
4532
4580
  /**
4533
4581
  * Returns the underlying bytes as a Base64-encoded string.
@@ -4583,7 +4631,7 @@ function Cn(t, e, ...n) {
4583
4631
  *
4584
4632
  * Create a `FieldPath` by providing field names. If more than one field
4585
4633
  * name is provided, the path will point to a nested field in a document.
4586
- */ class jn {
4634
+ */ class zn {
4587
4635
  /**
4588
4636
  * Creates a `FieldPath` from the provided field names. If more than one field
4589
4637
  * name is provided, the path will point to a nested field in a document.
@@ -4607,8 +4655,8 @@ function Cn(t, e, ...n) {
4607
4655
  /**
4608
4656
  * Returns a special sentinel `FieldPath` to refer to the ID of a document.
4609
4657
  * It can be used in queries to sort or filter by the document ID.
4610
- */ function Bn() {
4611
- return new jn("__name__");
4658
+ */ function Qn() {
4659
+ return new zn("__name__");
4612
4660
  }
4613
4661
 
4614
4662
  /**
@@ -4630,7 +4678,7 @@ function Cn(t, e, ...n) {
4630
4678
  /**
4631
4679
  * Sentinel values that can be used when writing document fields with `set()`
4632
4680
  * or `update()`.
4633
- */ class zn {
4681
+ */ class Wn {
4634
4682
  /**
4635
4683
  * @param _methodName - The public API endpoint that returns this class.
4636
4684
  * @hideconstructor
@@ -4662,7 +4710,7 @@ function Cn(t, e, ...n) {
4662
4710
  *
4663
4711
  * Latitude values are in the range of [-90, 90].
4664
4712
  * Longitude values are in the range of [-180, 180].
4665
- */ class Qn {
4713
+ */ class Gn {
4666
4714
  /**
4667
4715
  * Creates a new immutable `GeoPoint` object with the provided latitude and
4668
4716
  * longitude values.
@@ -4702,7 +4750,7 @@ function Cn(t, e, ...n) {
4702
4750
  * Actually private to JS consumers of our API, so this function is prefixed
4703
4751
  * with an underscore.
4704
4752
  */ _compareTo(t) {
4705
- return It(this._lat, t._lat) || It(this._long, t._long);
4753
+ return Rt(this._lat, t._lat) || Rt(this._long, t._long);
4706
4754
  }
4707
4755
  }
4708
4756
 
@@ -4721,29 +4769,29 @@ function Cn(t, e, ...n) {
4721
4769
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4722
4770
  * See the License for the specific language governing permissions and
4723
4771
  * limitations under the License.
4724
- */ const Wn = /^__.*__$/;
4772
+ */ const Kn = /^__.*__$/;
4725
4773
 
4726
- /** The result of parsing document data (e.g. for a setData call). */ class Gn {
4774
+ /** The result of parsing document data (e.g. for a setData call). */ class Yn {
4727
4775
  constructor(t, e, n) {
4728
4776
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
4729
4777
  }
4730
4778
  toMutation(t, e) {
4731
- return null !== this.fieldMask ? new je(t, this.data, this.fieldMask, e, this.fieldTransforms) : new Ue(t, this.data, e, this.fieldTransforms);
4779
+ return null !== this.fieldMask ? new ze(t, this.data, this.fieldMask, e, this.fieldTransforms) : new Be(t, this.data, e, this.fieldTransforms);
4732
4780
  }
4733
4781
  }
4734
4782
 
4735
- /** The result of parsing "update" data (i.e. for an updateData call). */ class Kn {
4783
+ /** The result of parsing "update" data (i.e. for an updateData call). */ class Hn {
4736
4784
  constructor(t,
4737
4785
  // The fieldMask does not include document transforms.
4738
4786
  e, n) {
4739
4787
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
4740
4788
  }
4741
4789
  toMutation(t, e) {
4742
- return new je(t, this.data, this.fieldMask, e, this.fieldTransforms);
4790
+ return new ze(t, this.data, this.fieldMask, e, this.fieldTransforms);
4743
4791
  }
4744
4792
  }
4745
4793
 
4746
- function Yn(t) {
4794
+ function Zn(t) {
4747
4795
  switch (t) {
4748
4796
  case 0 /* UserDataSource.Set */ :
4749
4797
  // fall through
@@ -4761,7 +4809,7 @@ function Yn(t) {
4761
4809
  }
4762
4810
  }
4763
4811
 
4764
- /** A "context" object passed around while parsing user data. */ class Hn {
4812
+ /** A "context" object passed around while parsing user data. */ class Jn {
4765
4813
  /**
4766
4814
  * Initializes a ParseContext with the given source and path.
4767
4815
  *
@@ -4793,7 +4841,7 @@ function Yn(t) {
4793
4841
  return this.settings.st;
4794
4842
  }
4795
4843
  /** Returns a new context with the specified settings overwritten. */ it(t) {
4796
- return new Hn(Object.assign(Object.assign({}, this.settings), t), this.databaseId, this.M, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
4844
+ return new Jn(Object.assign(Object.assign({}, this.settings), t), this.databaseId, this.M, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
4797
4845
  }
4798
4846
  ot(t) {
4799
4847
  var e;
@@ -4820,7 +4868,7 @@ function Yn(t) {
4820
4868
  });
4821
4869
  }
4822
4870
  lt(t) {
4823
- return pr(t, this.settings.methodName, this.settings.ft || !1, this.path, this.settings.dt);
4871
+ return gr(t, this.settings.methodName, this.settings.ft || !1, this.path, this.settings.dt);
4824
4872
  }
4825
4873
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t) {
4826
4874
  return void 0 !== this.fieldMask.find((e => t.isPrefixOf(e))) || void 0 !== this.fieldTransforms.find((e => t.isPrefixOf(e.field)));
@@ -4832,19 +4880,19 @@ function Yn(t) {
4832
4880
  }
4833
4881
  ct(t) {
4834
4882
  if (0 === t.length) throw this.lt("Document fields must not be empty");
4835
- if (Yn(this.st) && Wn.test(t)) throw this.lt('Document fields cannot begin and end with "__"');
4883
+ if (Zn(this.st) && Kn.test(t)) throw this.lt('Document fields cannot begin and end with "__"');
4836
4884
  }
4837
4885
  }
4838
4886
 
4839
4887
  /**
4840
4888
  * Helper for parsing raw user input (provided via the API) into internal model
4841
4889
  * classes.
4842
- */ class Zn {
4890
+ */ class Xn {
4843
4891
  constructor(t, e, n) {
4844
- this.databaseId = t, this.ignoreUndefinedProperties = e, this.M = n || pn(t);
4892
+ this.databaseId = t, this.ignoreUndefinedProperties = e, this.M = n || gn(t);
4845
4893
  }
4846
4894
  /** Creates a new top-level parse context. */ wt(t, e, n, r = !1) {
4847
- return new Hn({
4895
+ return new Jn({
4848
4896
  st: t,
4849
4897
  methodName: e,
4850
4898
  dt: n,
@@ -4855,29 +4903,29 @@ function Yn(t) {
4855
4903
  }
4856
4904
  }
4857
4905
 
4858
- function Jn(t) {
4859
- const e = t._freezeSettings(), n = pn(t._databaseId);
4860
- return new Zn(t._databaseId, !!e.ignoreUndefinedProperties, n);
4906
+ function tr(t) {
4907
+ const e = t._freezeSettings(), n = gn(t._databaseId);
4908
+ return new Xn(t._databaseId, !!e.ignoreUndefinedProperties, n);
4861
4909
  }
4862
4910
 
4863
- /** Parse document data from a set() call. */ function Xn(t, e, n, r, s, i = {}) {
4911
+ /** Parse document data from a set() call. */ function er(t, e, n, r, s, i = {}) {
4864
4912
  const o = t.wt(i.merge || i.mergeFields ? 2 /* UserDataSource.MergeSet */ : 0 /* UserDataSource.Set */ , e, n, s);
4865
- fr("Data must be an object, but it was:", o, r);
4866
- const u = hr(r, o);
4913
+ wr("Data must be an object, but it was:", o, r);
4914
+ const u = fr(r, o);
4867
4915
  let c, a;
4868
- if (i.merge) c = new _e(o.fieldMask), a = o.fieldTransforms; else if (i.mergeFields) {
4916
+ if (i.merge) c = new be(o.fieldMask), a = o.fieldTransforms; else if (i.mergeFields) {
4869
4917
  const t = [];
4870
4918
  for (const r of i.mergeFields) {
4871
- const s = dr(e, r, n);
4919
+ const s = mr(e, r, n);
4872
4920
  if (!o.contains(s)) throw new B($, `Field '${s}' is specified in your field mask but missing from your input data.`);
4873
- yr(t, s) || t.push(s);
4921
+ _r(t, s) || t.push(s);
4874
4922
  }
4875
- c = new _e(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));
4923
+ c = new be(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));
4876
4924
  } else c = null, a = o.fieldTransforms;
4877
- return new Gn(new ve(u), c, a);
4925
+ return new Yn(new Ee(u), c, a);
4878
4926
  }
4879
4927
 
4880
- class tr extends zn {
4928
+ class nr extends Wn {
4881
4929
  _toFieldTransform(t) {
4882
4930
  if (2 /* UserDataSource.MergeSet */ !== t.st) throw 1 /* UserDataSource.Update */ === t.st ? t.lt(`${this._methodName}() can only appear at the top level of your update data`) : t.lt(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
4883
4931
  // No transform to add for a delete, but we need to add it to our
@@ -4885,7 +4933,7 @@ class tr extends zn {
4885
4933
  return t.fieldMask.push(t.path), null;
4886
4934
  }
4887
4935
  isEqual(t) {
4888
- return t instanceof tr;
4936
+ return t instanceof nr;
4889
4937
  }
4890
4938
  }
4891
4939
 
@@ -4904,8 +4952,8 @@ class tr extends zn {
4904
4952
  * context.
4905
4953
  * @param context - The parent context.
4906
4954
  * @param arrayElement - Whether or not the FieldValue has an array.
4907
- */ function er(t, e, n) {
4908
- return new Hn({
4955
+ */ function rr(t, e, n) {
4956
+ return new Jn({
4909
4957
  st: 3 /* UserDataSource.Argument */ ,
4910
4958
  dt: e.settings.dt,
4911
4959
  methodName: t._methodName,
@@ -4913,23 +4961,23 @@ class tr extends zn {
4913
4961
  }, e.databaseId, e.M, e.ignoreUndefinedProperties);
4914
4962
  }
4915
4963
 
4916
- class nr extends zn {
4964
+ class sr extends Wn {
4917
4965
  _toFieldTransform(t) {
4918
- return new Ce(t.path, new Se);
4966
+ return new Me(t.path, new Oe);
4919
4967
  }
4920
4968
  isEqual(t) {
4921
- return t instanceof nr;
4969
+ return t instanceof sr;
4922
4970
  }
4923
4971
  }
4924
4972
 
4925
- class rr extends zn {
4973
+ class ir extends Wn {
4926
4974
  constructor(t, e) {
4927
4975
  super(t), this.yt = e;
4928
4976
  }
4929
4977
  _toFieldTransform(t) {
4930
- const e = er(this, t,
4931
- /*array=*/ !0), n = this.yt.map((t => ar(t, e))), r = new qe(n);
4932
- return new Ce(t.path, r);
4978
+ const e = rr(this, t,
4979
+ /*array=*/ !0), n = this.yt.map((t => lr(t, e))), r = new ke(n);
4980
+ return new Me(t.path, r);
4933
4981
  }
4934
4982
  isEqual(t) {
4935
4983
  // TODO(mrschmidt): Implement isEquals
@@ -4937,14 +4985,14 @@ class rr extends zn {
4937
4985
  }
4938
4986
  }
4939
4987
 
4940
- class sr extends zn {
4988
+ class or extends Wn {
4941
4989
  constructor(t, e) {
4942
4990
  super(t), this.yt = e;
4943
4991
  }
4944
4992
  _toFieldTransform(t) {
4945
- const e = er(this, t,
4946
- /*array=*/ !0), n = this.yt.map((t => ar(t, e))), r = new Oe(n);
4947
- return new Ce(t.path, r);
4993
+ const e = rr(this, t,
4994
+ /*array=*/ !0), n = this.yt.map((t => lr(t, e))), r = new Ce(n);
4995
+ return new Me(t.path, r);
4948
4996
  }
4949
4997
  isEqual(t) {
4950
4998
  // TODO(mrschmidt): Implement isEquals
@@ -4952,13 +5000,13 @@ class sr extends zn {
4952
5000
  }
4953
5001
  }
4954
5002
 
4955
- class ir extends zn {
5003
+ class ur extends Wn {
4956
5004
  constructor(t, e) {
4957
5005
  super(t), this.gt = e;
4958
5006
  }
4959
5007
  _toFieldTransform(t) {
4960
- const e = new ke(t.M, Fe(t.M, this.gt));
4961
- return new Ce(t.path, e);
5008
+ const e = new Le(t.M, Se(t.M, this.gt));
5009
+ return new Me(t.path, e);
4962
5010
  }
4963
5011
  isEqual(t) {
4964
5012
  // TODO(mrschmidt): Implement isEquals
@@ -4966,50 +5014,50 @@ class ir extends zn {
4966
5014
  }
4967
5015
  }
4968
5016
 
4969
- /** Parse update data from an update() call. */ function or(t, e, n, r) {
5017
+ /** Parse update data from an update() call. */ function cr(t, e, n, r) {
4970
5018
  const s = t.wt(1 /* UserDataSource.Update */ , e, n);
4971
- fr("Data must be an object, but it was:", s, r);
4972
- const i = [], o = ve.empty();
4973
- Pt(r, ((t, r) => {
4974
- const u = mr(e, t, n);
5019
+ wr("Data must be an object, but it was:", s, r);
5020
+ const i = [], o = Ee.empty();
5021
+ $t(r, ((t, r) => {
5022
+ const u = yr(e, t, n);
4975
5023
  // For Compat types, we have to "extract" the underlying types before
4976
5024
  // performing validation.
4977
5025
  r = d(r);
4978
5026
  const c = s.at(u);
4979
- if (r instanceof tr)
5027
+ if (r instanceof nr)
4980
5028
  // Add it to the field mask, but don't add anything to updateData.
4981
5029
  i.push(u); else {
4982
- const t = ar(r, c);
5030
+ const t = lr(r, c);
4983
5031
  null != t && (i.push(u), o.set(u, t));
4984
5032
  }
4985
5033
  }));
4986
- const u = new _e(i);
4987
- return new Kn(o, u, s.fieldTransforms);
5034
+ const u = new be(i);
5035
+ return new Hn(o, u, s.fieldTransforms);
4988
5036
  }
4989
5037
 
4990
- /** Parse update data from a list of field/value arguments. */ function ur(t, e, n, r, s, i) {
4991
- const o = t.wt(1 /* UserDataSource.Update */ , e, n), u = [ dr(e, r, n) ], c = [ s ];
5038
+ /** Parse update data from a list of field/value arguments. */ function ar(t, e, n, r, s, i) {
5039
+ const o = t.wt(1 /* UserDataSource.Update */ , e, n), u = [ mr(e, r, n) ], c = [ s ];
4992
5040
  if (i.length % 2 != 0) throw new B($, `Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);
4993
- for (let t = 0; t < i.length; t += 2) u.push(dr(e, i[t])), c.push(i[t + 1]);
4994
- const a = [], h = ve.empty();
5041
+ for (let t = 0; t < i.length; t += 2) u.push(mr(e, i[t])), c.push(i[t + 1]);
5042
+ const a = [], h = Ee.empty();
4995
5043
  // We iterate in reverse order to pick the last value for a field if the
4996
5044
  // user specified the field multiple times.
4997
- for (let t = u.length - 1; t >= 0; --t) if (!yr(a, u[t])) {
5045
+ for (let t = u.length - 1; t >= 0; --t) if (!_r(a, u[t])) {
4998
5046
  const e = u[t];
4999
5047
  let n = c[t];
5000
5048
  // For Compat types, we have to "extract" the underlying types before
5001
5049
  // performing validation.
5002
5050
  n = d(n);
5003
5051
  const r = o.at(e);
5004
- if (n instanceof tr)
5052
+ if (n instanceof nr)
5005
5053
  // Add it to the field mask, but don't add anything to updateData.
5006
5054
  a.push(e); else {
5007
- const t = ar(n, r);
5055
+ const t = lr(n, r);
5008
5056
  null != t && (a.push(e), h.set(e, t));
5009
5057
  }
5010
5058
  }
5011
- const l = new _e(a);
5012
- return new Kn(h, l, o.fieldTransforms);
5059
+ const l = new be(a);
5060
+ return new Hn(h, l, o.fieldTransforms);
5013
5061
  }
5014
5062
 
5015
5063
  /**
@@ -5018,8 +5066,8 @@ class ir extends zn {
5018
5066
  *
5019
5067
  * @param allowArrays - Whether the query value is an array that may directly
5020
5068
  * contain additional arrays (e.g. the operand of an `in` query).
5021
- */ function cr(t, e, n, r = !1) {
5022
- return ar(n, t.wt(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
5069
+ */ function hr(t, e, n, r = !1) {
5070
+ return lr(n, t.wt(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
5023
5071
  }
5024
5072
 
5025
5073
  /**
@@ -5030,12 +5078,12 @@ class ir extends zn {
5030
5078
  * the source of the data being parsed, etc.
5031
5079
  * @returns The parsed value, or null if the value was a FieldValue sentinel
5032
5080
  * that should not be included in the resulting parsed data.
5033
- */ function ar(t, e) {
5034
- if (lr(
5081
+ */ function lr(t, e) {
5082
+ if (dr(
5035
5083
  // Unwrap the API type from the Compat SDK. This will return the API type
5036
5084
  // from firestore-exp.
5037
- t = d(t))) return fr("Unsupported field value:", e, t), hr(t, e);
5038
- if (t instanceof zn)
5085
+ t = d(t))) return wr("Unsupported field value:", e, t), fr(t, e);
5086
+ if (t instanceof Wn)
5039
5087
  // FieldValues usually parse into transforms (except deleteField())
5040
5088
  // in which case we do not want to include this field in our parsed data
5041
5089
  // (as doing so will overwrite the field directly prior to the transform
@@ -5047,7 +5095,7 @@ class ir extends zn {
5047
5095
  */
5048
5096
  return function(t, e) {
5049
5097
  // Sentinels are only supported with writes, and not within arrays.
5050
- if (!Yn(e.st)) throw e.lt(`${t._methodName}() can only be used with update() and set()`);
5098
+ if (!Zn(e.st)) throw e.lt(`${t._methodName}() can only be used with update() and set()`);
5051
5099
  if (!e.path) throw e.lt(`${t._methodName}() is not currently supported inside arrays`);
5052
5100
  const n = t._toFieldTransform(e);
5053
5101
  n && e.fieldTransforms.push(n);
@@ -5077,7 +5125,7 @@ class ir extends zn {
5077
5125
  const n = [];
5078
5126
  let r = 0;
5079
5127
  for (const s of t) {
5080
- let t = ar(s, e.ht(r));
5128
+ let t = lr(s, e.ht(r));
5081
5129
  null == t && (
5082
5130
  // Just include nulls in the array for fields being replaced with a
5083
5131
  // sentinel.
@@ -5096,7 +5144,7 @@ class ir extends zn {
5096
5144
  if (null === (t = d(t))) return {
5097
5145
  nullValue: "NULL_VALUE"
5098
5146
  };
5099
- if ("number" == typeof t) return Fe(e.M, t);
5147
+ if ("number" == typeof t) return Se(e.M, t);
5100
5148
  if ("boolean" == typeof t) return {
5101
5149
  booleanValue: t
5102
5150
  };
@@ -5104,34 +5152,34 @@ class ir extends zn {
5104
5152
  stringValue: t
5105
5153
  };
5106
5154
  if (t instanceof Date) {
5107
- const n = qt.fromDate(t);
5155
+ const n = kt.fromDate(t);
5108
5156
  return {
5109
- timestampValue: Ye(e.M, n)
5157
+ timestampValue: Ze(e.M, n)
5110
5158
  };
5111
5159
  }
5112
- if (t instanceof qt) {
5160
+ if (t instanceof kt) {
5113
5161
  // Firestore backend truncates precision down to microseconds. To ensure
5114
5162
  // offline mode works the same with regards to truncation, perform the
5115
5163
  // truncation immediately without waiting for the backend to do that.
5116
- const n = new qt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
5164
+ const n = new kt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
5117
5165
  return {
5118
- timestampValue: Ye(e.M, n)
5166
+ timestampValue: Ze(e.M, n)
5119
5167
  };
5120
5168
  }
5121
- if (t instanceof Qn) return {
5169
+ if (t instanceof Gn) return {
5122
5170
  geoPointValue: {
5123
5171
  latitude: t.latitude,
5124
5172
  longitude: t.longitude
5125
5173
  }
5126
5174
  };
5127
- if (t instanceof Un) return {
5128
- bytesValue: He(e.M, t._byteString)
5175
+ if (t instanceof Bn) return {
5176
+ bytesValue: Je(e.M, t._byteString)
5129
5177
  };
5130
- if (t instanceof xn) {
5178
+ if (t instanceof qn) {
5131
5179
  const n = e.databaseId, r = t.firestore._databaseId;
5132
5180
  if (!r.isEqual(n)) throw e.lt(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);
5133
5181
  return {
5134
- referenceValue: Xe(t.firestore._databaseId || e.databaseId, t._key.path)
5182
+ referenceValue: en(t.firestore._databaseId || e.databaseId, t._key.path)
5135
5183
  };
5136
5184
  }
5137
5185
  throw e.lt(`Unsupported field value: ${at(t)}`);
@@ -5145,13 +5193,13 @@ class ir extends zn {
5145
5193
  */ (t, e);
5146
5194
  }
5147
5195
 
5148
- function hr(t, e) {
5196
+ function fr(t, e) {
5149
5197
  const n = {};
5150
5198
  return !function(t) {
5151
5199
  for (const e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
5152
5200
  return !0;
5153
- }(t) ? Pt(t, ((t, r) => {
5154
- const s = ar(r, e.ot(t));
5201
+ }(t) ? $t(t, ((t, r) => {
5202
+ const s = lr(r, e.ot(t));
5155
5203
  null != s && (n[t] = s);
5156
5204
  })) :
5157
5205
  // If we encounter an empty object, we explicitly add it to the update
@@ -5163,12 +5211,12 @@ function hr(t, e) {
5163
5211
  };
5164
5212
  }
5165
5213
 
5166
- function lr(t) {
5167
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof qt || t instanceof Qn || t instanceof Un || t instanceof xn || t instanceof zn);
5214
+ function dr(t) {
5215
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof kt || t instanceof Gn || t instanceof Bn || t instanceof qn || t instanceof Wn);
5168
5216
  }
5169
5217
 
5170
- function fr(t, e, n) {
5171
- if (!lr(n) || !function(t) {
5218
+ function wr(t, e, n) {
5219
+ if (!dr(n) || !function(t) {
5172
5220
  return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
5173
5221
  }(n)) {
5174
5222
  const r = at(n);
@@ -5178,20 +5226,20 @@ function fr(t, e, n) {
5178
5226
 
5179
5227
  /**
5180
5228
  * Helper that calls fromDotSeparatedString() but wraps any error thrown.
5181
- */ function dr(t, e, n) {
5229
+ */ function mr(t, e, n) {
5182
5230
  if ((
5183
5231
  // If required, replace the FieldPath Compat class with with the firestore-exp
5184
5232
  // FieldPath.
5185
- e = d(e)) instanceof jn) return e._internalPath;
5186
- if ("string" == typeof e) return mr(t, e);
5187
- throw pr("Field path arguments must be of type string or ", t,
5233
+ e = d(e)) instanceof zn) return e._internalPath;
5234
+ if ("string" == typeof e) return yr(t, e);
5235
+ throw gr("Field path arguments must be of type string or ", t,
5188
5236
  /* hasConverter= */ !1,
5189
5237
  /* path= */ void 0, n);
5190
5238
  }
5191
5239
 
5192
5240
  /**
5193
5241
  * Matches any characters in a field path string that are reserved.
5194
- */ const wr = new RegExp("[~\\*/\\[\\]]");
5242
+ */ const pr = new RegExp("[~\\*/\\[\\]]");
5195
5243
 
5196
5244
  /**
5197
5245
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -5201,20 +5249,20 @@ function fr(t, e, n) {
5201
5249
  * split on dots.
5202
5250
  * @param targetDoc - The document against which the field path will be
5203
5251
  * evaluated.
5204
- */ function mr(t, e, n) {
5205
- if (e.search(wr) >= 0) throw pr(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`, t,
5252
+ */ function yr(t, e, n) {
5253
+ if (e.search(pr) >= 0) throw gr(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`, t,
5206
5254
  /* hasConverter= */ !1,
5207
5255
  /* path= */ void 0, n);
5208
5256
  try {
5209
- return new jn(...e.split("."))._internalPath;
5257
+ return new zn(...e.split("."))._internalPath;
5210
5258
  } catch (r) {
5211
- throw pr(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t,
5259
+ throw gr(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t,
5212
5260
  /* hasConverter= */ !1,
5213
5261
  /* path= */ void 0, n);
5214
5262
  }
5215
5263
  }
5216
5264
 
5217
- function pr(t, e, n, r, s) {
5265
+ function gr(t, e, n, r, s) {
5218
5266
  const i = r && !r.isEmpty(), o = void 0 !== s;
5219
5267
  let u = `Function ${e}() called with invalid data`;
5220
5268
  n && (u += " (via `toFirestore()`)"), u += ". ";
@@ -5223,7 +5271,7 @@ function pr(t, e, n, r, s) {
5223
5271
  c += ")"), new B($, u + t + c);
5224
5272
  }
5225
5273
 
5226
- /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */ function yr(t, e) {
5274
+ /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */ function _r(t, e) {
5227
5275
  return t.some((t => t.isEqual(e)));
5228
5276
  }
5229
5277
 
@@ -5251,7 +5299,7 @@ function pr(t, e, n, r, s) {
5251
5299
  * For a `DocumentSnapshot` that points to a non-existing document, any data
5252
5300
  * access will return 'undefined'. You can use the `exists()` method to
5253
5301
  * explicitly verify a document's existence.
5254
- */ class gr {
5302
+ */ class vr {
5255
5303
  // Note: This class is stripped down version of the DocumentSnapshot in
5256
5304
  // the legacy SDK. The changes are:
5257
5305
  // - No support for SnapshotMetadata.
@@ -5267,7 +5315,7 @@ function pr(t, e, n, r, s) {
5267
5315
  /**
5268
5316
  * The `DocumentReference` for the document included in the `DocumentSnapshot`.
5269
5317
  */ get ref() {
5270
- return new xn(this._firestore, this._converter, this._key);
5318
+ return new qn(this._firestore, this._converter, this._key);
5271
5319
  }
5272
5320
  /**
5273
5321
  * Signals whether or not the document at the snapshot's location exists.
@@ -5287,7 +5335,7 @@ function pr(t, e, n, r, s) {
5287
5335
  if (this._converter) {
5288
5336
  // We only want to use the converter and create a new DocumentSnapshot
5289
5337
  // if a converter has been provided.
5290
- const t = new _r(this._firestore, this._userDataWriter, this._key, this._document,
5338
+ const t = new br(this._firestore, this._userDataWriter, this._key, this._document,
5291
5339
  /* converter= */ null);
5292
5340
  return this._converter.fromFirestore(t);
5293
5341
  }
@@ -5307,7 +5355,7 @@ function pr(t, e, n, r, s) {
5307
5355
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5308
5356
  get(t) {
5309
5357
  if (this._document) {
5310
- const e = this._document.data.field(Er("DocumentSnapshot.get", t));
5358
+ const e = this._document.data.field(Ir("DocumentSnapshot.get", t));
5311
5359
  if (null !== e) return this._userDataWriter.convertValue(e);
5312
5360
  }
5313
5361
  }
@@ -5323,7 +5371,7 @@ function pr(t, e, n, r, s) {
5323
5371
  * `DocumentSnapshot`. Since query results contain only existing documents, the
5324
5372
  * `exists` property will always be true and `data()` will never return
5325
5373
  * 'undefined'.
5326
- */ class _r extends gr {
5374
+ */ class br extends vr {
5327
5375
  /**
5328
5376
  * Retrieves all fields in the document as an `Object`.
5329
5377
  *
@@ -5341,7 +5389,7 @@ function pr(t, e, n, r, s) {
5341
5389
  * array via the `docs` property or enumerated using the `forEach` method. The
5342
5390
  * number of documents can be determined via the `empty` and `size`
5343
5391
  * properties.
5344
- */ class vr {
5392
+ */ class Er {
5345
5393
  /** @hideconstructor */
5346
5394
  constructor(t, e) {
5347
5395
  this._docs = e, this.query = t;
@@ -5372,14 +5420,14 @@ function pr(t, e, n, r, s) {
5372
5420
  * @param left - A snapshot to compare.
5373
5421
  * @param right - A snapshot to compare.
5374
5422
  * @returns true if the snapshots are equal.
5375
- */ function br(t, e) {
5376
- return t = d(t), e = d(e), t instanceof gr && e instanceof gr ? 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 vr && e instanceof vr && (Mn(t.query, e.query) && Tt(t.docs, e.docs, br));
5423
+ */ function Ar(t, e) {
5424
+ return t = d(t), e = d(e), t instanceof vr && e instanceof vr ? 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 Er && e instanceof Er && (jn(t.query, e.query) && Pt(t.docs, e.docs, Ar));
5377
5425
  }
5378
5426
 
5379
5427
  /**
5380
5428
  * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.
5381
- */ function Er(t, e) {
5382
- return "string" == typeof e ? mr(t, e) : e instanceof jn ? e._internalPath : e._delegate._internalPath;
5429
+ */ function Ir(t, e) {
5430
+ return "string" == typeof e ? yr(t, e) : e instanceof zn ? e._internalPath : e._delegate._internalPath;
5383
5431
  }
5384
5432
 
5385
5433
  /**
@@ -5402,7 +5450,7 @@ function pr(t, e, n, r, s) {
5402
5450
  * An `AppliableConstraint` is an abstraction of a constraint that can be applied
5403
5451
  * to a Firestore query.
5404
5452
  */
5405
- class Ar {}
5453
+ class Tr {}
5406
5454
 
5407
5455
  /**
5408
5456
  * A `QueryConstraint` is used to narrow the set of documents returned by a
@@ -5411,12 +5459,12 @@ class Ar {}
5411
5459
  * endBefore}, {@link endAt}, {@link limit}, {@link limitToLast} and
5412
5460
  * can then be passed to {@link query} to create a new query instance that
5413
5461
  * also contains this `QueryConstraint`.
5414
- */ class Ir extends Ar {}
5462
+ */ class Rr extends Tr {}
5415
5463
 
5416
- function Tr(t, e, ...n) {
5464
+ function Pr(t, e, ...n) {
5417
5465
  let r = [];
5418
- e instanceof Ar && r.push(e), r = r.concat(n), function(t) {
5419
- const e = t.filter((t => t instanceof Vr)).length, n = t.filter((t => t instanceof Rr)).length;
5466
+ e instanceof Tr && r.push(e), r = r.concat(n), function(t) {
5467
+ const e = t.filter((t => t instanceof Nr)).length, n = t.filter((t => t instanceof Vr)).length;
5420
5468
  if (e > 1 || e > 0 && n > 0) throw new B($, "InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.");
5421
5469
  }
5422
5470
  /**
@@ -5451,7 +5499,7 @@ function Tr(t, e, ...n) {
5451
5499
  * `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then
5452
5500
  * be passed to {@link query} to create a new query instance that also contains
5453
5501
  * this `QueryFieldFilterConstraint`.
5454
- */ class Rr extends Ir {
5502
+ */ class Vr extends Rr {
5455
5503
  /**
5456
5504
  * @internal
5457
5505
  */
@@ -5461,31 +5509,31 @@ function Tr(t, e, ...n) {
5461
5509
  this.type = "where";
5462
5510
  }
5463
5511
  static _create(t, e, n) {
5464
- return new Rr(t, e, n);
5512
+ return new Vr(t, e, n);
5465
5513
  }
5466
5514
  _apply(t) {
5467
5515
  const e = this._parse(t);
5468
- return Qr(t._query, e), new Sn(t.firestore, t.converter, Ne(t._query, e));
5516
+ return Gr(t._query, e), new On(t.firestore, t.converter, Fe(t._query, e));
5469
5517
  }
5470
5518
  _parse(t) {
5471
- const e = Jn(t.firestore), n = function(t, e, n, r, s, i, o) {
5519
+ const e = tr(t.firestore), n = function(t, e, n, r, s, i, o) {
5472
5520
  let u;
5473
5521
  if (s.isKeyField()) {
5474
5522
  if ("array-contains" /* Operator.ARRAY_CONTAINS */ === i || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === i) throw new B($, `Invalid Query. You can't perform '${i}' queries on documentId().`);
5475
5523
  if ("in" /* Operator.IN */ === i || "not-in" /* Operator.NOT_IN */ === i) {
5476
- zr(o, i);
5524
+ Wr(o, i);
5477
5525
  const e = [];
5478
- for (const n of o) e.push(Br(r, t, n));
5526
+ for (const n of o) e.push(Qr(r, t, n));
5479
5527
  u = {
5480
5528
  arrayValue: {
5481
5529
  values: e
5482
5530
  }
5483
5531
  };
5484
- } else u = Br(r, t, o);
5485
- } else "in" /* Operator.IN */ !== i && "not-in" /* Operator.NOT_IN */ !== i && "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ !== i || zr(o, i),
5486
- u = cr(n, e, o,
5532
+ } else u = Qr(r, t, o);
5533
+ } else "in" /* Operator.IN */ !== i && "not-in" /* Operator.NOT_IN */ !== i && "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ !== i || Wr(o, i),
5534
+ u = hr(n, e, o,
5487
5535
  /* allowArrays= */ "in" /* Operator.IN */ === i || "not-in" /* Operator.NOT_IN */ === i);
5488
- return te.create(s, i, u);
5536
+ return ne.create(s, i, u);
5489
5537
  }(t._query, "where", e, t.firestore._databaseId, this._field, this._op, this._value);
5490
5538
  return n;
5491
5539
  }
@@ -5501,9 +5549,9 @@ function Tr(t, e, ...n) {
5501
5549
  * "&lt;=", "!=").
5502
5550
  * @param value - The value for comparison
5503
5551
  * @returns The created {@link QueryFieldFilterConstraint}.
5504
- */ function Pr(t, e, n) {
5505
- const r = e, s = Er("where", t);
5506
- return Rr._create(s, r, n);
5552
+ */ function $r(t, e, n) {
5553
+ const r = e, s = Ir("where", t);
5554
+ return Vr._create(s, r, n);
5507
5555
  }
5508
5556
 
5509
5557
  /**
@@ -5514,7 +5562,7 @@ function Tr(t, e, ...n) {
5514
5562
  * {@link and} and can then be passed to {@link query} to create a new query
5515
5563
  * instance that also contains the `QueryCompositeFilterConstraint`.
5516
5564
  * @internal TODO remove this internal tag with OR Query support in the server
5517
- */ class Vr extends Ar {
5565
+ */ class Nr extends Tr {
5518
5566
  /**
5519
5567
  * @internal
5520
5568
  */
@@ -5524,22 +5572,22 @@ function Tr(t, e, ...n) {
5524
5572
  super(), this.type = t, this._queryConstraints = e;
5525
5573
  }
5526
5574
  static _create(t, e) {
5527
- return new Vr(t, e);
5575
+ return new Nr(t, e);
5528
5576
  }
5529
5577
  _parse(t) {
5530
5578
  const e = this._queryConstraints.map((e => e._parse(t))).filter((t => t.getFilters().length > 0));
5531
- return 1 === e.length ? e[0] : ee.create(e, this._getOperator());
5579
+ return 1 === e.length ? e[0] : re.create(e, this._getOperator());
5532
5580
  }
5533
5581
  _apply(t) {
5534
5582
  const e = this._parse(t);
5535
5583
  return 0 === e.getFilters().length ? t : (function(t, e) {
5536
5584
  let n = t;
5537
5585
  const r = e.getFlattenedFilters();
5538
- for (const t of r) Qr(n, t), n = Ne(n, t);
5586
+ for (const t of r) Gr(n, t), n = Fe(n, t);
5539
5587
  }
5540
5588
  // Checks if any of the provided filter operators are included in the given list of filters and
5541
5589
  // returns the first one that is, or null if none are.
5542
- (t._query, e), new Sn(t.firestore, t.converter, Ne(t._query, e)));
5590
+ (t._query, e), new On(t.firestore, t.converter, Fe(t._query, e)));
5543
5591
  }
5544
5592
  _getQueryConstraints() {
5545
5593
  return this._queryConstraints;
@@ -5559,9 +5607,9 @@ function Tr(t, e, ...n) {
5559
5607
  * created with calls to {@link where}, {@link or}, or {@link and}.
5560
5608
  * @returns The newly created {@link QueryCompositeFilterConstraint}.
5561
5609
  * @internal TODO remove this internal tag with OR Query support in the server
5562
- */ function $r(...t) {
5610
+ */ function Dr(...t) {
5563
5611
  // Only support QueryFilterConstraints
5564
- return t.forEach((t => Gr("or", t))), Vr._create("or" /* CompositeOperator.OR */ , t);
5612
+ return t.forEach((t => Yr("or", t))), Nr._create("or" /* CompositeOperator.OR */ , t);
5565
5613
  }
5566
5614
 
5567
5615
  /**
@@ -5574,9 +5622,9 @@ function Tr(t, e, ...n) {
5574
5622
  * created with calls to {@link where}, {@link or}, or {@link and}.
5575
5623
  * @returns The newly created {@link QueryCompositeFilterConstraint}.
5576
5624
  * @internal TODO remove this internal tag with OR Query support in the server
5577
- */ function Nr(...t) {
5625
+ */ function Fr(...t) {
5578
5626
  // Only support QueryFilterConstraints
5579
- return t.forEach((t => Gr("and", t))), Vr._create("and" /* CompositeOperator.AND */ , t);
5627
+ return t.forEach((t => Yr("and", t))), Nr._create("and" /* CompositeOperator.AND */ , t);
5580
5628
  }
5581
5629
 
5582
5630
  /**
@@ -5587,7 +5635,7 @@ function Tr(t, e, ...n) {
5587
5635
  *
5588
5636
  * Note: Documents that do not contain the orderBy field will not be present in
5589
5637
  * the query result.
5590
- */ class Dr extends Ir {
5638
+ */ class xr extends Rr {
5591
5639
  /**
5592
5640
  * @internal
5593
5641
  */
@@ -5597,18 +5645,18 @@ function Tr(t, e, ...n) {
5597
5645
  this.type = "orderBy";
5598
5646
  }
5599
5647
  static _create(t, e) {
5600
- return new Dr(t, e);
5648
+ return new xr(t, e);
5601
5649
  }
5602
5650
  _apply(t) {
5603
5651
  const e = function(t, e, n) {
5604
5652
  if (null !== t.startAt) throw new B($, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
5605
5653
  if (null !== t.endAt) throw new B($, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
5606
- const r = new le(e, n);
5654
+ const r = new de(e, n);
5607
5655
  return function(t, e) {
5608
- if (null === Te(t)) {
5656
+ if (null === Pe(t)) {
5609
5657
  // This is the first order by. It must match any inequality.
5610
- const n = Re(t);
5611
- null !== n && Wr(t, n, e.field);
5658
+ const n = Ve(t);
5659
+ null !== n && Kr(t, n, e.field);
5612
5660
  }
5613
5661
  }(t, r), r;
5614
5662
  }
@@ -5623,10 +5671,10 @@ function Tr(t, e, ...n) {
5623
5671
  * of the query or if any of the fields in the order by are an uncommitted
5624
5672
  * server timestamp.
5625
5673
  */ (t._query, this._field, this._direction);
5626
- return new Sn(t.firestore, t.converter, function(t, e) {
5674
+ return new On(t.firestore, t.converter, function(t, e) {
5627
5675
  // TODO(dimond): validate that orderBy does not list the same key twice.
5628
5676
  const n = t.explicitOrderBy.concat([ e ]);
5629
- return new Ie(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
5677
+ return new Re(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
5630
5678
  }(t._query, e));
5631
5679
  }
5632
5680
  }
@@ -5642,9 +5690,9 @@ function Tr(t, e, ...n) {
5642
5690
  * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If
5643
5691
  * not specified, order will be ascending.
5644
5692
  * @returns The created {@link QueryOrderByConstraint}.
5645
- */ function Fr(t, e = "asc") {
5646
- const n = e, r = Er("orderBy", t);
5647
- return Dr._create(r, n);
5693
+ */ function Sr(t, e = "asc") {
5694
+ const n = e, r = Ir("orderBy", t);
5695
+ return xr._create(r, n);
5648
5696
  }
5649
5697
 
5650
5698
  /**
@@ -5653,7 +5701,7 @@ function Tr(t, e, ...n) {
5653
5701
  * `QueryLimitConstraint`s are created by invoking {@link limit} or
5654
5702
  * {@link limitToLast} and can then be passed to {@link query} to create a new
5655
5703
  * query instance that also contains this `QueryLimitConstraint`.
5656
- */ class xr extends Ir {
5704
+ */ class qr extends Rr {
5657
5705
  /**
5658
5706
  * @internal
5659
5707
  */
@@ -5663,11 +5711,11 @@ function Tr(t, e, ...n) {
5663
5711
  super(), this.type = t, this._limit = e, this._limitType = n;
5664
5712
  }
5665
5713
  static _create(t, e, n) {
5666
- return new xr(t, e, n);
5714
+ return new qr(t, e, n);
5667
5715
  }
5668
5716
  _apply(t) {
5669
- return new Sn(t.firestore, t.converter, function(t, e, n) {
5670
- return new Ie(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
5717
+ return new On(t.firestore, t.converter, function(t, e, n) {
5718
+ return new Re(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
5671
5719
  }(t._query, this._limit, this._limitType));
5672
5720
  }
5673
5721
  }
@@ -5678,8 +5726,8 @@ function Tr(t, e, ...n) {
5678
5726
  *
5679
5727
  * @param limit - The maximum number of items to return.
5680
5728
  * @returns The created {@link QueryLimitConstraint}.
5681
- */ function Sr(t) {
5682
- return lt("limit", t), xr._create("limit", t, "F" /* LimitType.First */);
5729
+ */ function Or(t) {
5730
+ return lt("limit", t), qr._create("limit", t, "F" /* LimitType.First */);
5683
5731
  }
5684
5732
 
5685
5733
  /**
@@ -5691,8 +5739,8 @@ function Tr(t, e, ...n) {
5691
5739
  *
5692
5740
  * @param limit - The maximum number of items to return.
5693
5741
  * @returns The created {@link QueryLimitConstraint}.
5694
- */ function qr(t) {
5695
- return lt("limitToLast", t), xr._create("limitToLast", t, "L" /* LimitType.Last */);
5742
+ */ function kr(t) {
5743
+ return lt("limitToLast", t), qr._create("limitToLast", t, "L" /* LimitType.Last */);
5696
5744
  }
5697
5745
 
5698
5746
  /**
@@ -5701,7 +5749,7 @@ function Tr(t, e, ...n) {
5701
5749
  * `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or
5702
5750
  * {@link (startAfter:1)} and can then be passed to {@link query} to create a
5703
5751
  * new query instance that also contains this `QueryStartAtConstraint`.
5704
- */ class Or extends Ir {
5752
+ */ class Cr extends Rr {
5705
5753
  /**
5706
5754
  * @internal
5707
5755
  */
@@ -5711,23 +5759,23 @@ function Tr(t, e, ...n) {
5711
5759
  super(), this.type = t, this._docOrFields = e, this._inclusive = n;
5712
5760
  }
5713
5761
  static _create(t, e, n) {
5714
- return new Or(t, e, n);
5762
+ return new Cr(t, e, n);
5715
5763
  }
5716
5764
  _apply(t) {
5717
- const e = jr(t, this.type, this._docOrFields, this._inclusive);
5718
- return new Sn(t.firestore, t.converter, function(t, e) {
5719
- return new Ie(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
5765
+ const e = zr(t, this.type, this._docOrFields, this._inclusive);
5766
+ return new On(t.firestore, t.converter, function(t, e) {
5767
+ return new Re(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
5720
5768
  }(t._query, e));
5721
5769
  }
5722
5770
  }
5723
5771
 
5724
- function kr(...t) {
5725
- return Or._create("startAt", t,
5772
+ function Lr(...t) {
5773
+ return Cr._create("startAt", t,
5726
5774
  /*inclusive=*/ !0);
5727
5775
  }
5728
5776
 
5729
- function Cr(...t) {
5730
- return Or._create("startAfter", t,
5777
+ function Mr(...t) {
5778
+ return Cr._create("startAfter", t,
5731
5779
  /*inclusive=*/ !1);
5732
5780
  }
5733
5781
 
@@ -5737,7 +5785,7 @@ function Cr(...t) {
5737
5785
  * `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
5738
5786
  * {@link (endBefore:1)} and can then be passed to {@link query} to create a new
5739
5787
  * query instance that also contains this `QueryEndAtConstraint`.
5740
- */ class Lr extends Ir {
5788
+ */ class Ur extends Rr {
5741
5789
  /**
5742
5790
  * @internal
5743
5791
  */
@@ -5747,28 +5795,28 @@ function Cr(...t) {
5747
5795
  super(), this.type = t, this._docOrFields = e, this._inclusive = n;
5748
5796
  }
5749
5797
  static _create(t, e, n) {
5750
- return new Lr(t, e, n);
5798
+ return new Ur(t, e, n);
5751
5799
  }
5752
5800
  _apply(t) {
5753
- const e = jr(t, this.type, this._docOrFields, this._inclusive);
5754
- return new Sn(t.firestore, t.converter, function(t, e) {
5755
- return new Ie(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
5801
+ const e = zr(t, this.type, this._docOrFields, this._inclusive);
5802
+ return new On(t.firestore, t.converter, function(t, e) {
5803
+ return new Re(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
5756
5804
  }(t._query, e));
5757
5805
  }
5758
5806
  }
5759
5807
 
5760
- function Mr(...t) {
5761
- return Lr._create("endBefore", t,
5808
+ function jr(...t) {
5809
+ return Ur._create("endBefore", t,
5762
5810
  /*inclusive=*/ !1);
5763
5811
  }
5764
5812
 
5765
- function Ur(...t) {
5766
- return Lr._create("endAt", t,
5813
+ function Br(...t) {
5814
+ return Ur._create("endAt", t,
5767
5815
  /*inclusive=*/ !0);
5768
5816
  }
5769
5817
 
5770
- /** Helper function to create a bound from a document or fields */ function jr(t, e, n, r) {
5771
- if (n[0] = d(n[0]), n[0] instanceof gr) return function(t, e, n, r, s) {
5818
+ /** Helper function to create a bound from a document or fields */ function zr(t, e, n, r) {
5819
+ if (n[0] = d(n[0]), n[0] instanceof vr) return function(t, e, n, r, s) {
5772
5820
  if (!r) throw new B(D, `Can't use a DocumentSnapshot that doesn't exist for ${n}().`);
5773
5821
  const i = [];
5774
5822
  // Because people expect to continue/end a query at the exact document
@@ -5778,22 +5826,22 @@ function Ur(...t) {
5778
5826
  // the provided document. Without the key (by using the explicit sort
5779
5827
  // orders), multiple documents could match the position, yielding duplicate
5780
5828
  // results.
5781
- for (const n of Ve(t)) if (n.field.isKeyField()) i.push(Qt(e, r.key)); else {
5829
+ for (const n of Ne(t)) if (n.field.isKeyField()) i.push(Gt(e, r.key)); else {
5782
5830
  const t = r.data.field(n.field);
5783
- if (Ot(t)) throw new B($, 'Invalid query. You are trying to start or end a query using a document for which the field "' + n.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
5831
+ if (Ct(t)) throw new B($, 'Invalid query. You are trying to start or end a query using a document for which the field "' + n.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
5784
5832
  if (null === t) {
5785
5833
  const t = n.field.canonicalString();
5786
5834
  throw new B($, `Invalid query. You are trying to start or end a query using a document for which the field '${t}' (used as the orderBy) does not exist.`);
5787
5835
  }
5788
5836
  i.push(t);
5789
5837
  }
5790
- return new Zt(i, s);
5838
+ return new Xt(i, s);
5791
5839
  }
5792
5840
  /**
5793
5841
  * Converts a list of field values to a `Bound` for the given query.
5794
5842
  */ (t._query, t.firestore._databaseId, e, n[0]._document, r);
5795
5843
  {
5796
- const s = Jn(t.firestore);
5844
+ const s = tr(t.firestore);
5797
5845
  return function(t, e, n, r, s, i) {
5798
5846
  // Use explicit order by's because it has to match the query the user made
5799
5847
  const o = t.explicitOrderBy;
@@ -5803,17 +5851,17 @@ function Ur(...t) {
5803
5851
  const c = s[i];
5804
5852
  if (o[i].field.isKeyField()) {
5805
5853
  if ("string" != typeof c) throw new B($, `Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof c}`);
5806
- if (!Pe(t) && -1 !== c.indexOf("/")) throw new B($, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${c}' contains a slash.`);
5854
+ if (!$e(t) && -1 !== c.indexOf("/")) throw new B($, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${c}' contains a slash.`);
5807
5855
  const n = t.path.child(nt.fromString(c));
5808
5856
  if (!it.isDocumentKey(n)) throw new B($, `Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${r}() must result in a valid document path, but '${n}' is not because it contains an odd number of segments.`);
5809
5857
  const s = new it(n);
5810
- u.push(Qt(e, s));
5858
+ u.push(Gt(e, s));
5811
5859
  } else {
5812
- const t = cr(n, r, c);
5860
+ const t = hr(n, r, c);
5813
5861
  u.push(t);
5814
5862
  }
5815
5863
  }
5816
- return new Zt(u, i);
5864
+ return new Xt(u, i);
5817
5865
  }
5818
5866
  /**
5819
5867
  * Parses the given `documentIdValue` into a `ReferenceValue`, throwing
@@ -5823,22 +5871,22 @@ function Ur(...t) {
5823
5871
  }
5824
5872
  }
5825
5873
 
5826
- function Br(t, e, n) {
5874
+ function Qr(t, e, n) {
5827
5875
  if ("string" == typeof (n = d(n))) {
5828
5876
  if ("" === n) throw new B($, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
5829
- if (!Pe(e) && -1 !== n.indexOf("/")) throw new B($, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);
5877
+ if (!$e(e) && -1 !== n.indexOf("/")) throw new B($, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);
5830
5878
  const r = e.path.child(nt.fromString(n));
5831
5879
  if (!it.isDocumentKey(r)) throw new B($, `Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);
5832
- return Qt(t, new it(r));
5880
+ return Gt(t, new it(r));
5833
5881
  }
5834
- if (n instanceof xn) return Qt(t, n._key);
5882
+ if (n instanceof qn) return Gt(t, n._key);
5835
5883
  throw new B($, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${at(n)}.`);
5836
5884
  }
5837
5885
 
5838
5886
  /**
5839
5887
  * Validates that the value passed into a disjunctive filter satisfies all
5840
5888
  * array requirements.
5841
- */ function zr(t, e) {
5889
+ */ function Wr(t, e) {
5842
5890
  if (!Array.isArray(t) || 0 === t.length) throw new B($, `Invalid Query. A non-empty array is required for '${e.toString()}' filters.`);
5843
5891
  }
5844
5892
 
@@ -5851,12 +5899,12 @@ function Br(t, e, n) {
5851
5899
  * Operators in a query must adhere to the following set of rules:
5852
5900
  * 1. Only one inequality per query.
5853
5901
  * 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
5854
- */ function Qr(t, e) {
5902
+ */ function Gr(t, e) {
5855
5903
  if (e.isInequality()) {
5856
- const n = Re(t), r = e.field;
5904
+ const n = Ve(t), r = e.field;
5857
5905
  if (null !== n && !n.isEqual(r)) throw new B($, `Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${r.toString()}'`);
5858
- const s = Te(t);
5859
- null !== s && Wr(t, r, s);
5906
+ const s = Pe(t);
5907
+ null !== s && Kr(t, r, s);
5860
5908
  }
5861
5909
  const n = function(t, e) {
5862
5910
  for (const n of t) for (const t of n.getFlattenedFilters()) if (e.indexOf(t.op) >= 0) return t.op;
@@ -5882,12 +5930,12 @@ function Br(t, e, n) {
5882
5930
  throw n === e.op ? new B($, `Invalid query. You cannot use more than one '${e.op.toString()}' filter.`) : new B($, `Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`);
5883
5931
  }
5884
5932
 
5885
- function Wr(t, e, n) {
5933
+ function Kr(t, e, n) {
5886
5934
  if (!n.isEqual(e)) throw new B($, `Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`);
5887
5935
  }
5888
5936
 
5889
- function Gr(t, e) {
5890
- if (!(e instanceof Rr || e instanceof Vr)) throw new B($, `Function ${t}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);
5937
+ function Yr(t, e) {
5938
+ if (!(e instanceof Vr || e instanceof Nr)) throw new B($, `Function ${t}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);
5891
5939
  }
5892
5940
 
5893
5941
  /**
@@ -5915,7 +5963,7 @@ function Gr(t, e) {
5915
5963
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
5916
5964
  * call.
5917
5965
  */
5918
- function Kr(t, e, n) {
5966
+ function Hr(t, e, n) {
5919
5967
  let r;
5920
5968
  // Cast to `any` in order to satisfy the union type constraint on
5921
5969
  // toFirestore().
@@ -5924,9 +5972,9 @@ function Kr(t, e, n) {
5924
5972
  r;
5925
5973
  }
5926
5974
 
5927
- class Yr extends class {
5975
+ class Zr extends class {
5928
5976
  convertValue(t, e = "none") {
5929
- switch (Mt(t)) {
5977
+ switch (jt(t)) {
5930
5978
  case 0 /* TypeOrder.NullValue */ :
5931
5979
  return null;
5932
5980
 
@@ -5934,7 +5982,7 @@ class Yr extends class {
5934
5982
  return t.booleanValue;
5935
5983
 
5936
5984
  case 2 /* TypeOrder.NumberValue */ :
5937
- return xt(t.integerValue || t.doubleValue);
5985
+ return qt(t.integerValue || t.doubleValue);
5938
5986
 
5939
5987
  case 3 /* TypeOrder.TimestampValue */ :
5940
5988
  return this.convertTimestamp(t.timestampValue);
@@ -5946,7 +5994,7 @@ class Yr extends class {
5946
5994
  return t.stringValue;
5947
5995
 
5948
5996
  case 6 /* TypeOrder.BlobValue */ :
5949
- return this.convertBytes(St(t.bytesValue));
5997
+ return this.convertBytes(Ot(t.bytesValue));
5950
5998
 
5951
5999
  case 7 /* TypeOrder.RefValue */ :
5952
6000
  return this.convertReference(t.referenceValue);
@@ -5966,12 +6014,12 @@ class Yr extends class {
5966
6014
  }
5967
6015
  convertObject(t, e) {
5968
6016
  const n = {};
5969
- return Pt(t.fields, ((t, r) => {
6017
+ return $t(t.fields, ((t, r) => {
5970
6018
  n[t] = this.convertValue(r, e);
5971
6019
  })), n;
5972
6020
  }
5973
6021
  convertGeoPoint(t) {
5974
- return new Qn(xt(t.latitude), xt(t.longitude));
6022
+ return new Gn(qt(t.latitude), qt(t.longitude));
5975
6023
  }
5976
6024
  convertArray(t, e) {
5977
6025
  return (t.values || []).map((t => this.convertValue(t, e)));
@@ -5979,23 +6027,23 @@ class Yr extends class {
5979
6027
  convertServerTimestamp(t, e) {
5980
6028
  switch (e) {
5981
6029
  case "previous":
5982
- const n = kt(t);
6030
+ const n = Lt(t);
5983
6031
  return null == n ? null : this.convertValue(n, e);
5984
6032
 
5985
6033
  case "estimate":
5986
- return this.convertTimestamp(Ct(t));
6034
+ return this.convertTimestamp(Mt(t));
5987
6035
 
5988
6036
  default:
5989
6037
  return null;
5990
6038
  }
5991
6039
  }
5992
6040
  convertTimestamp(t) {
5993
- const e = Ft(t);
5994
- return new qt(e.seconds, e.nanos);
6041
+ const e = St(t);
6042
+ return new kt(e.seconds, e.nanos);
5995
6043
  }
5996
6044
  convertDocumentKey(t, e) {
5997
6045
  const n = nt.fromString(t);
5998
- I(mn(n));
6046
+ I(yn(n));
5999
6047
  const r = new tt(n.get(1), n.get(3)), s = new it(n.popFirst(5));
6000
6048
  return r.isEqual(e) ||
6001
6049
  // TODO(b/64130202): Somehow support foreign references.
@@ -6007,11 +6055,11 @@ class Yr extends class {
6007
6055
  super(), this.firestore = t;
6008
6056
  }
6009
6057
  convertBytes(t) {
6010
- return new Un(t);
6058
+ return new Bn(t);
6011
6059
  }
6012
6060
  convertReference(t) {
6013
6061
  const e = this.convertDocumentKey(t, this.firestore._databaseId);
6014
- return new xn(this.firestore, /* converter= */ null, e);
6062
+ return new qn(this.firestore, /* converter= */ null, e);
6015
6063
  }
6016
6064
  }
6017
6065
 
@@ -6027,12 +6075,12 @@ class Yr extends class {
6027
6075
  * @param reference - The reference of the document to fetch.
6028
6076
  * @returns A Promise resolved with a `DocumentSnapshot` containing the current
6029
6077
  * document contents.
6030
- */ function Hr(t) {
6031
- const e = In((t = ht(t, xn)).firestore), n = new Yr(t.firestore);
6032
- return vn(e, [ t._key ]).then((e => {
6078
+ */ function Jr(t) {
6079
+ const e = Rn((t = ht(t, qn)).firestore), n = new Zr(t.firestore);
6080
+ return En(e, [ t._key ]).then((e => {
6033
6081
  I(1 === e.length);
6034
6082
  const r = e[0];
6035
- return new gr(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
6083
+ return new vr(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
6036
6084
  }));
6037
6085
  }
6038
6086
 
@@ -6047,33 +6095,33 @@ class Yr extends class {
6047
6095
  *
6048
6096
  * @param query - The `Query` to execute.
6049
6097
  * @returns A Promise that will be resolved with the results of the query.
6050
- */ function Zr(t) {
6098
+ */ function Xr(t) {
6051
6099
  !function(t) {
6052
6100
  if ("L" /* LimitType.Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new B(L, "limitToLast() queries require specifying at least one orderBy() clause");
6053
- }((t = ht(t, Sn))._query);
6054
- const e = In(t.firestore), n = new Yr(t.firestore);
6055
- return bn(e, t._query).then((e => {
6056
- const r = e.map((e => new _r(t.firestore, n, e.key, e, t.converter)));
6101
+ }((t = ht(t, On))._query);
6102
+ const e = Rn(t.firestore), n = new Zr(t.firestore);
6103
+ return An(e, t._query).then((e => {
6104
+ const r = e.map((e => new br(t.firestore, n, e.key, e, t.converter)));
6057
6105
  return "L" /* LimitType.Last */ === t._query.limitType &&
6058
6106
  // Limit to last queries reverse the orderBy constraint that was
6059
6107
  // specified by the user. As such, we need to reverse the order of the
6060
6108
  // results to return the documents in the expected order.
6061
- r.reverse(), new vr(t, r);
6109
+ r.reverse(), new Er(t, r);
6062
6110
  }));
6063
6111
  }
6064
6112
 
6065
- function Jr(t, e, n) {
6066
- const r = Kr((t = ht(t, xn)).converter, e, n), s = Xn(Jn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
6067
- return _n(In(t.firestore), [ s.toMutation(t._key, Le.none()) ]);
6113
+ function ts(t, e, n) {
6114
+ const r = Hr((t = ht(t, qn)).converter, e, n), s = er(tr(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
6115
+ return bn(Rn(t.firestore), [ s.toMutation(t._key, Ue.none()) ]);
6068
6116
  }
6069
6117
 
6070
- function Xr(t, e, n, ...r) {
6071
- const s = Jn((t = ht(t, xn)).firestore);
6118
+ function es(t, e, n, ...r) {
6119
+ const s = tr((t = ht(t, qn)).firestore);
6072
6120
  // For Compat types, we have to "extract" the underlying types before
6073
6121
  // performing validation.
6074
6122
  let i;
6075
- i = "string" == typeof (e = d(e)) || e instanceof jn ? ur(s, "updateDoc", t._key, e, n, r) : or(s, "updateDoc", t._key, e);
6076
- return _n(In(t.firestore), [ i.toMutation(t._key, Le.exists(!0)) ]);
6123
+ i = "string" == typeof (e = d(e)) || e instanceof zn ? ar(s, "updateDoc", t._key, e, n, r) : cr(s, "updateDoc", t._key, e);
6124
+ return bn(Rn(t.firestore), [ i.toMutation(t._key, Ue.exists(!0)) ]);
6077
6125
  }
6078
6126
 
6079
6127
  /**
@@ -6087,8 +6135,8 @@ function Xr(t, e, n, ...r) {
6087
6135
  * @param reference - A reference to the document to delete.
6088
6136
  * @returns A `Promise` resolved once the document has been successfully
6089
6137
  * deleted from the backend.
6090
- */ function ts(t) {
6091
- return _n(In((t = ht(t, xn)).firestore), [ new Be(t._key, Le.none()) ]);
6138
+ */ function ns(t) {
6139
+ return bn(Rn((t = ht(t, qn)).firestore), [ new Qe(t._key, Ue.none()) ]);
6092
6140
  }
6093
6141
 
6094
6142
  /**
@@ -6105,9 +6153,9 @@ function Xr(t, e, n, ...r) {
6105
6153
  * @throws Error - If the provided input is not a valid Firestore document.
6106
6154
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
6107
6155
  * newly created document after it has been written to the backend.
6108
- */ function es(t, e) {
6109
- const n = Cn(t = ht(t, qn)), r = Kr(t.converter, e), s = Xn(Jn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
6110
- return _n(In(t.firestore), [ s.toMutation(n._key, Le.exists(!1)) ]).then((() => n));
6156
+ */ function rs(t, e) {
6157
+ const n = Mn(t = ht(t, kn)), r = Hr(t.converter, e), s = er(tr(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
6158
+ return bn(Rn(t.firestore), [ s.toMutation(n._key, Ue.exists(!1)) ]).then((() => n));
6111
6159
  }
6112
6160
 
6113
6161
  /**
@@ -6139,9 +6187,9 @@ function Xr(t, e, n, ...r) {
6139
6187
  * @returns A Promise that will be resolved with the count; the count can be
6140
6188
  * retrieved from `snapshot.data().count`, where `snapshot` is the
6141
6189
  * `AggregateQuerySnapshot` to which the returned Promise resolves.
6142
- */ function ns(t) {
6143
- return rs(t, {
6144
- count: os()
6190
+ */ function ss(t) {
6191
+ return is(t, {
6192
+ count: cs()
6145
6193
  });
6146
6194
  }
6147
6195
 
@@ -6171,16 +6219,16 @@ function Xr(t, e, n, ...r) {
6171
6219
  * const averageScore: number | null = aggregateSnapshot.data().averageScore;
6172
6220
  * ```
6173
6221
  * @internal TODO (sum/avg) remove when public
6174
- */ function rs(t, e) {
6175
- const n = ht(t.firestore, Rn), r = In(n), s = function(t, e) {
6222
+ */ function is(t, e) {
6223
+ const n = ht(t.firestore, Vn), r = Rn(n), s = function(t, e) {
6176
6224
  const n = [];
6177
6225
  for (const r in t) Object.prototype.hasOwnProperty.call(t, r) && n.push(e(t[r], r, t));
6178
6226
  return n;
6179
- }(e, ((t, e) => new bt(new vt(e), t._aggregateType, t._internalFieldPath)));
6227
+ }(e, ((t, e) => new At(new Et(e), t._aggregateType, t._internalFieldPath)));
6180
6228
  // Run the aggregation and convert the results
6181
- return En(r, t._query, s).then((e => function(t, e, n) {
6182
- const r = new Yr(t);
6183
- return new Fn(e, r, n);
6229
+ return In(r, t._query, s).then((e => function(t, e, n) {
6230
+ const r = new Zr(t);
6231
+ return new Sn(e, r, n);
6184
6232
  }
6185
6233
  /**
6186
6234
  * Create an AggregateField object that can be used to compute the sum of
@@ -6190,8 +6238,8 @@ function Xr(t, e, n, ...r) {
6190
6238
  */ (n, t, e)));
6191
6239
  }
6192
6240
 
6193
- function ss(t) {
6194
- return new Dn("sum", dr("sum", t));
6241
+ function os(t) {
6242
+ return new xn("sum", mr("sum", t));
6195
6243
  }
6196
6244
 
6197
6245
  /**
@@ -6199,16 +6247,16 @@ function ss(t) {
6199
6247
  * a specified field over a range of documents in the result set of a query.
6200
6248
  * @param field Specifies the field to average across the result set.
6201
6249
  * @internal TODO (sum/avg) remove when public
6202
- */ function is(t) {
6203
- return new Dn("avg", dr("average", t));
6250
+ */ function us(t) {
6251
+ return new xn("avg", mr("average", t));
6204
6252
  }
6205
6253
 
6206
6254
  /**
6207
6255
  * Create an AggregateField object that can be used to compute the count of
6208
6256
  * documents in the result set of a query.
6209
6257
  * @internal TODO (sum/avg) remove when public
6210
- */ function os() {
6211
- return new Dn("count");
6258
+ */ function cs() {
6259
+ return new xn("count");
6212
6260
  }
6213
6261
 
6214
6262
  /**
@@ -6217,9 +6265,9 @@ function ss(t) {
6217
6265
  * @param left Compare this AggregateField to the `right`.
6218
6266
  * @param right Compare this AggregateField to the `left`.
6219
6267
  * @internal TODO (sum/avg) remove when public
6220
- */ function us(t, e) {
6268
+ */ function as(t, e) {
6221
6269
  var n, r;
6222
- return t instanceof Dn && e instanceof Dn && t._aggregateType === e._aggregateType && (null === (n = t._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (r = e._internalFieldPath) || void 0 === r ? void 0 : r.canonicalString());
6270
+ return t instanceof xn && e instanceof xn && t._aggregateType === e._aggregateType && (null === (n = t._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (r = e._internalFieldPath) || void 0 === r ? void 0 : r.canonicalString());
6223
6271
  }
6224
6272
 
6225
6273
  /**
@@ -6233,8 +6281,8 @@ function ss(t) {
6233
6281
  *
6234
6282
  * @returns `true` if the objects are "equal", as defined above, or `false`
6235
6283
  * otherwise.
6236
- */ function cs(t, e) {
6237
- return Mn(t.query, e.query) && w(t.data(), e.data());
6284
+ */ function hs(t, e) {
6285
+ return jn(t.query, e.query) && w(t.data(), e.data());
6238
6286
  }
6239
6287
 
6240
6288
  /**
@@ -6256,15 +6304,15 @@ function ss(t) {
6256
6304
  /**
6257
6305
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
6258
6306
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
6259
- */ function as() {
6260
- return new tr("deleteField");
6307
+ */ function ls() {
6308
+ return new nr("deleteField");
6261
6309
  }
6262
6310
 
6263
6311
  /**
6264
6312
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
6265
6313
  * include a server-generated timestamp in the written data.
6266
- */ function hs() {
6267
- return new nr("serverTimestamp");
6314
+ */ function fs() {
6315
+ return new sr("serverTimestamp");
6268
6316
  }
6269
6317
 
6270
6318
  /**
@@ -6278,10 +6326,10 @@ function ss(t) {
6278
6326
  * @param elements - The elements to union into the array.
6279
6327
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
6280
6328
  * `updateDoc()`.
6281
- */ function ls(...t) {
6329
+ */ function ds(...t) {
6282
6330
  // NOTE: We don't actually parse the data until it's used in set() or
6283
6331
  // update() since we'd need the Firestore instance to do this.
6284
- return new rr("arrayUnion", t);
6332
+ return new ir("arrayUnion", t);
6285
6333
  }
6286
6334
 
6287
6335
  /**
@@ -6294,10 +6342,10 @@ function ss(t) {
6294
6342
  * @param elements - The elements to remove from the array.
6295
6343
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
6296
6344
  * `updateDoc()`
6297
- */ function fs(...t) {
6345
+ */ function ws(...t) {
6298
6346
  // NOTE: We don't actually parse the data until it's used in set() or
6299
6347
  // update() since we'd need the Firestore instance to do this.
6300
- return new sr("arrayRemove", t);
6348
+ return new or("arrayRemove", t);
6301
6349
  }
6302
6350
 
6303
6351
  /**
@@ -6318,8 +6366,8 @@ function ss(t) {
6318
6366
  * @param n - The value to increment by.
6319
6367
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
6320
6368
  * `updateDoc()`
6321
- */ function ds(t) {
6322
- return new ir("increment", t);
6369
+ */ function ms(t) {
6370
+ return new ur("increment", t);
6323
6371
  }
6324
6372
 
6325
6373
  /**
@@ -6345,25 +6393,25 @@ function ss(t) {
6345
6393
  * provides methods for adding writes to the write batch. None of the writes
6346
6394
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
6347
6395
  * called.
6348
- */ class ws {
6396
+ */ class ps {
6349
6397
  /** @hideconstructor */
6350
6398
  constructor(t, e) {
6351
6399
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
6352
- this._dataReader = Jn(t);
6400
+ this._dataReader = tr(t);
6353
6401
  }
6354
6402
  set(t, e, n) {
6355
6403
  this._verifyNotCommitted();
6356
- const r = ms(t, this._firestore), s = Kr(r.converter, e, n), i = Xn(this._dataReader, "WriteBatch.set", r._key, s, null !== r.converter, n);
6357
- return this._mutations.push(i.toMutation(r._key, Le.none())), this;
6404
+ const r = ys(t, this._firestore), s = Hr(r.converter, e, n), i = er(this._dataReader, "WriteBatch.set", r._key, s, null !== r.converter, n);
6405
+ return this._mutations.push(i.toMutation(r._key, Ue.none())), this;
6358
6406
  }
6359
6407
  update(t, e, n, ...r) {
6360
6408
  this._verifyNotCommitted();
6361
- const s = ms(t, this._firestore);
6409
+ const s = ys(t, this._firestore);
6362
6410
  // For Compat types, we have to "extract" the underlying types before
6363
6411
  // performing validation.
6364
6412
  let i;
6365
- return i = "string" == typeof (e = d(e)) || e instanceof jn ? ur(this._dataReader, "WriteBatch.update", s._key, e, n, r) : or(this._dataReader, "WriteBatch.update", s._key, e),
6366
- this._mutations.push(i.toMutation(s._key, Le.exists(!0))), this;
6413
+ return i = "string" == typeof (e = d(e)) || e instanceof zn ? ar(this._dataReader, "WriteBatch.update", s._key, e, n, r) : cr(this._dataReader, "WriteBatch.update", s._key, e),
6414
+ this._mutations.push(i.toMutation(s._key, Ue.exists(!0))), this;
6367
6415
  }
6368
6416
  /**
6369
6417
  * Deletes the document referred to by the provided {@link DocumentReference}.
@@ -6372,8 +6420,8 @@ function ss(t) {
6372
6420
  * @returns This `WriteBatch` instance. Used for chaining method calls.
6373
6421
  */ delete(t) {
6374
6422
  this._verifyNotCommitted();
6375
- const e = ms(t, this._firestore);
6376
- return this._mutations = this._mutations.concat(new Be(e._key, Le.none())), this;
6423
+ const e = ys(t, this._firestore);
6424
+ return this._mutations = this._mutations.concat(new Qe(e._key, Ue.none())), this;
6377
6425
  }
6378
6426
  /**
6379
6427
  * Commits all of the writes in this write batch as a single atomic unit.
@@ -6394,7 +6442,7 @@ function ss(t) {
6394
6442
  }
6395
6443
  }
6396
6444
 
6397
- function ms(t, e) {
6445
+ function ys(t, e) {
6398
6446
  if ((t = d(t)).firestore !== e) throw new B($, "Provided document reference is from a different Firestore instance.");
6399
6447
  return t;
6400
6448
  }
@@ -6411,9 +6459,9 @@ function ms(t, e) {
6411
6459
  *
6412
6460
  * @returns A `WriteBatch` that can be used to atomically execute multiple
6413
6461
  * writes.
6414
- */ function ps(t) {
6415
- const e = In(t = ht(t, Rn));
6416
- return new ws(t, (t => _n(e, t)));
6462
+ */ function gs(t) {
6463
+ const e = Rn(t = ht(t, Vn));
6464
+ return new ps(t, (t => bn(e, t)));
6417
6465
  }
6418
6466
 
6419
6467
  /**
@@ -6435,7 +6483,7 @@ function ms(t, e) {
6435
6483
  /**
6436
6484
  * Internal transaction object responsible for accumulating the mutations to
6437
6485
  * perform and the base versions for any documents read.
6438
- */ class ys {
6486
+ */ class _s {
6439
6487
  constructor(t) {
6440
6488
  this.datastore = t,
6441
6489
  // The version of each document that was read during this transaction.
@@ -6455,7 +6503,7 @@ function ms(t, e) {
6455
6503
  }
6456
6504
  async lookup(t) {
6457
6505
  if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new B($, "Firestore transactions require all reads to be executed before all writes.");
6458
- const e = await vn(this.datastore, t);
6506
+ const e = await En(this.datastore, t);
6459
6507
  return e.forEach((t => this.recordVersion(t))), e;
6460
6508
  }
6461
6509
  set(t, e) {
@@ -6470,7 +6518,7 @@ function ms(t, e) {
6470
6518
  this.writtenDocs.add(t.toString());
6471
6519
  }
6472
6520
  delete(t) {
6473
- this.write(new Be(t, this.precondition(t))), this.writtenDocs.add(t.toString());
6521
+ this.write(new Qe(t, this.precondition(t))), this.writtenDocs.add(t.toString());
6474
6522
  }
6475
6523
  async commit() {
6476
6524
  if (this.ensureCommitNotCalled(), this.lastWriteError) throw this.lastWriteError;
@@ -6483,15 +6531,15 @@ function ms(t, e) {
6483
6531
  // a `verify` operation.
6484
6532
  t.forEach(((t, e) => {
6485
6533
  const n = it.fromPath(e);
6486
- this.mutations.push(new ze(n, this.precondition(n)));
6487
- })), await _n(this.datastore, this.mutations), this.committed = !0;
6534
+ this.mutations.push(new We(n, this.precondition(n)));
6535
+ })), await bn(this.datastore, this.mutations), this.committed = !0;
6488
6536
  }
6489
6537
  recordVersion(t) {
6490
6538
  let e;
6491
6539
  if (t.isFoundDocument()) e = t.version; else {
6492
6540
  if (!t.isNoDocument()) throw A();
6493
6541
  // Represent a deleted doc using SnapshotVersion.min().
6494
- e = de.min();
6542
+ e = me.min();
6495
6543
  }
6496
6544
  const n = this.readVersions.get(t.key.toString());
6497
6545
  if (n) {
@@ -6505,7 +6553,7 @@ function ms(t, e) {
6505
6553
  * as a precondition, or no precondition if it was not read.
6506
6554
  */ precondition(t) {
6507
6555
  const e = this.readVersions.get(t.toString());
6508
- return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(de.min()) ? Le.exists(!1) : Le.updateTime(e) : Le.none();
6556
+ return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(me.min()) ? Ue.exists(!1) : Ue.updateTime(e) : Ue.none();
6509
6557
  }
6510
6558
  /**
6511
6559
  * Returns the precondition for a document if the operation is an update.
@@ -6514,7 +6562,7 @@ function ms(t, e) {
6514
6562
  // The first time a document is written, we want to take into account the
6515
6563
  // read time and existence
6516
6564
  if (!this.writtenDocs.has(t.toString()) && e) {
6517
- if (e.isEqual(de.min()))
6565
+ if (e.isEqual(me.min()))
6518
6566
  // The document doesn't exist, so fail the transaction.
6519
6567
  // This has to be validated locally because you can't send a
6520
6568
  // precondition that a document does not exist without changing the
@@ -6526,11 +6574,11 @@ function ms(t, e) {
6526
6574
  // transaction.
6527
6575
  throw new B($, "Can't update a document that doesn't exist.");
6528
6576
  // Document exists, base precondition on document update time.
6529
- return Le.updateTime(e);
6577
+ return Ue.updateTime(e);
6530
6578
  }
6531
6579
  // Document was not read, so we just use the preconditions for a blind
6532
6580
  // update.
6533
- return Le.exists(!0);
6581
+ return Ue.exists(!0);
6534
6582
  }
6535
6583
  write(t) {
6536
6584
  this.ensureCommitNotCalled(), this.mutations.push(t);
@@ -6553,7 +6601,7 @@ function ms(t, e) {
6553
6601
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6554
6602
  * See the License for the specific language governing permissions and
6555
6603
  * limitations under the License.
6556
- */ const gs = {
6604
+ */ const vs = {
6557
6605
  maxAttempts: 5
6558
6606
  };
6559
6607
 
@@ -6577,17 +6625,17 @@ function ms(t, e) {
6577
6625
  * TransactionRunner encapsulates the logic needed to run and retry transactions
6578
6626
  * with backoff.
6579
6627
  */
6580
- class _s {
6628
+ class bs {
6581
6629
  constructor(t, e, n, r, s) {
6582
6630
  this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = r,
6583
- this.deferred = s, this._t = n.maxAttempts, this.vt = new yn(this.asyncQueue, "transaction_retry" /* TimerId.TransactionRetry */);
6631
+ this.deferred = s, this._t = n.maxAttempts, this.vt = new _n(this.asyncQueue, "transaction_retry" /* TimerId.TransactionRetry */);
6584
6632
  }
6585
6633
  /** Runs the transaction and sets the result on deferred. */ run() {
6586
6634
  this._t -= 1, this.bt();
6587
6635
  }
6588
6636
  bt() {
6589
6637
  this.vt.J((async () => {
6590
- const t = new ys(this.datastore), e = this.Et(t);
6638
+ const t = new _s(this.datastore), e = this.Et(t);
6591
6639
  e && e.then((e => {
6592
6640
  this.asyncQueue.enqueueAndForget((() => t.commit().then((() => {
6593
6641
  this.deferred.resolve(e);
@@ -6602,7 +6650,7 @@ class _s {
6602
6650
  Et(t) {
6603
6651
  try {
6604
6652
  const e = this.updateFunction(t);
6605
- return !ft(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
6653
+ return !wt(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
6606
6654
  null);
6607
6655
  } catch (t) {
6608
6656
  // Do not retry errors thrown by user provided updateFunction.
@@ -6677,7 +6725,7 @@ class _s {
6677
6725
  * See the License for the specific language governing permissions and
6678
6726
  * limitations under the License.
6679
6727
  */
6680
- /** The Platform's 'document' implementation or null if not available. */ function vs() {
6728
+ /** The Platform's 'document' implementation or null if not available. */ function Es() {
6681
6729
  // `document` is not always available, e.g. in ReactNative and WebWorkers.
6682
6730
  // eslint-disable-next-line no-restricted-globals
6683
6731
  return "undefined" != typeof document ? document : null;
@@ -6709,7 +6757,7 @@ class _s {
6709
6757
  * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type
6710
6758
  * in newer versions of TypeScript defines `finally`, which is not available in
6711
6759
  * IE.
6712
- */ class bs {
6760
+ */ class As {
6713
6761
  constructor(t, e, n, r, s) {
6714
6762
  this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = s,
6715
6763
  this.deferred = new z, this.then = this.deferred.promise.then.bind(this.deferred.promise),
@@ -6732,7 +6780,7 @@ class _s {
6732
6780
  * PORTING NOTE: This exists to prevent making removeDelayedOperation() and
6733
6781
  * the DelayedOperation class public.
6734
6782
  */ static createAndSchedule(t, e, n, r, s) {
6735
- const i = Date.now() + n, o = new bs(t, e, i, r, s);
6783
+ const i = Date.now() + n, o = new As(t, e, i, r, s);
6736
6784
  return o.start(n), o;
6737
6785
  }
6738
6786
  /**
@@ -6781,7 +6829,7 @@ class _s {
6781
6829
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6782
6830
  * See the License for the specific language governing permissions and
6783
6831
  * limitations under the License.
6784
- */ class Es {
6832
+ */ class Is {
6785
6833
  constructor() {
6786
6834
  // The last promise in the queue.
6787
6835
  this.Tt = Promise.resolve(),
@@ -6804,15 +6852,15 @@ class _s {
6804
6852
  // List of TimerIds to fast-forward delays for.
6805
6853
  this.Ft = [],
6806
6854
  // Backoff timer used to schedule retries for retryable operations
6807
- this.vt = new yn(this, "async_queue_retry" /* TimerId.AsyncQueueRetry */),
6855
+ this.vt = new _n(this, "async_queue_retry" /* TimerId.AsyncQueueRetry */),
6808
6856
  // Visibility handler that triggers an immediate retry of all retryable
6809
6857
  // operations. Meant to speed up recovery when we regain file system access
6810
6858
  // after page comes into foreground.
6811
6859
  this.xt = () => {
6812
- const t = vs();
6860
+ const t = Es();
6813
6861
  t && _("AsyncQueue", "Visibility state changed to " + t.visibilityState), this.vt.tt();
6814
6862
  };
6815
- const t = vs();
6863
+ const t = Es();
6816
6864
  t && "function" == typeof t.addEventListener && t.addEventListener("visibilitychange", this.xt);
6817
6865
  }
6818
6866
  get isShuttingDown() {
@@ -6833,7 +6881,7 @@ class _s {
6833
6881
  enterRestrictedMode(t) {
6834
6882
  if (!this.Pt) {
6835
6883
  this.Pt = !0, this.Dt = t || !1;
6836
- const e = vs();
6884
+ const e = Es();
6837
6885
  e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.xt);
6838
6886
  }
6839
6887
  }
@@ -6965,7 +7013,7 @@ class _s {
6965
7013
  this.St(),
6966
7014
  // Fast-forward delays for timerIds that have been overriden.
6967
7015
  this.Ft.indexOf(t) > -1 && (e = 0);
6968
- const r = bs.createAndSchedule(this, t, e, n, (t => this.kt(t)));
7016
+ const r = As.createAndSchedule(this, t, e, n, (t => this.kt(t)));
6969
7017
  return this.Vt.push(r), r;
6970
7018
  }
6971
7019
  St() {
@@ -7019,10 +7067,10 @@ class _s {
7019
7067
  }
7020
7068
  }
7021
7069
 
7022
- class As {
7070
+ class Ts {
7023
7071
  /** @hideconstructor */
7024
7072
  constructor(t, e) {
7025
- this._firestore = t, this._transaction = e, this._dataReader = Jn(t);
7073
+ this._firestore = t, this._transaction = e, this._dataReader = tr(t);
7026
7074
  }
7027
7075
  /**
7028
7076
  * Reads the document referenced by the provided {@link DocumentReference}.
@@ -7030,25 +7078,25 @@ class As {
7030
7078
  * @param documentRef - A reference to the document to be read.
7031
7079
  * @returns A `DocumentSnapshot` with the read data.
7032
7080
  */ get(t) {
7033
- const e = ms(t, this._firestore), n = new Yr(this._firestore);
7081
+ const e = ys(t, this._firestore), n = new Zr(this._firestore);
7034
7082
  return this._transaction.lookup([ e._key ]).then((t => {
7035
7083
  if (!t || 1 !== t.length) return A();
7036
7084
  const r = t[0];
7037
- if (r.isFoundDocument()) return new gr(this._firestore, n, r.key, r, e.converter);
7038
- if (r.isNoDocument()) return new gr(this._firestore, n, e._key, null, e.converter);
7085
+ if (r.isFoundDocument()) return new vr(this._firestore, n, r.key, r, e.converter);
7086
+ if (r.isNoDocument()) return new vr(this._firestore, n, e._key, null, e.converter);
7039
7087
  throw A();
7040
7088
  }));
7041
7089
  }
7042
7090
  set(t, e, n) {
7043
- const r = ms(t, this._firestore), s = Kr(r.converter, e, n), i = Xn(this._dataReader, "Transaction.set", r._key, s, null !== r.converter, n);
7091
+ const r = ys(t, this._firestore), s = Hr(r.converter, e, n), i = er(this._dataReader, "Transaction.set", r._key, s, null !== r.converter, n);
7044
7092
  return this._transaction.set(r._key, i), this;
7045
7093
  }
7046
7094
  update(t, e, n, ...r) {
7047
- const s = ms(t, this._firestore);
7095
+ const s = ys(t, this._firestore);
7048
7096
  // For Compat types, we have to "extract" the underlying types before
7049
7097
  // performing validation.
7050
7098
  let i;
7051
- return i = "string" == typeof (e = d(e)) || e instanceof jn ? ur(this._dataReader, "Transaction.update", s._key, e, n, r) : or(this._dataReader, "Transaction.update", s._key, e),
7099
+ return i = "string" == typeof (e = d(e)) || e instanceof zn ? ar(this._dataReader, "Transaction.update", s._key, e, n, r) : cr(this._dataReader, "Transaction.update", s._key, e),
7052
7100
  this._transaction.update(s._key, i), this;
7053
7101
  }
7054
7102
  /**
@@ -7057,7 +7105,7 @@ class As {
7057
7105
  * @param documentRef - A reference to the document to be deleted.
7058
7106
  * @returns This `Transaction` instance. Used for chaining method calls.
7059
7107
  */ delete(t) {
7060
- const e = ms(t, this._firestore);
7108
+ const e = ys(t, this._firestore);
7061
7109
  return this._transaction.delete(e._key), this;
7062
7110
  }
7063
7111
  }
@@ -7080,13 +7128,13 @@ class As {
7080
7128
  * (the `updateFunction` returned a failed promise), the promise returned by the
7081
7129
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
7082
7130
  * rejected promise with the corresponding failure error is returned.
7083
- */ function Is(t, e, n) {
7084
- const r = In(t = ht(t, Rn)), s = Object.assign(Object.assign({}, gs), n);
7131
+ */ function Rs(t, e, n) {
7132
+ const r = Rn(t = ht(t, Vn)), s = Object.assign(Object.assign({}, vs), n);
7085
7133
  !function(t) {
7086
7134
  if (t.maxAttempts < 1) throw new B($, "Max attempts must be at least 1");
7087
7135
  }(s);
7088
7136
  const i = new z;
7089
- return new _s(new Es, r, s, (n => e(new As(t, n))), i).run(), i.promise;
7137
+ return new bs(new Is, r, s, (n => e(new Ts(t, n))), i).run(), i.promise;
7090
7138
  }
7091
7139
 
7092
7140
  /**
@@ -7099,7 +7147,7 @@ class As {
7099
7147
  */ !function(t) {
7100
7148
  p = t;
7101
7149
  }(`${s}_lite`), n(new i("firestore/lite", ((t, {instanceIdentifier: e, options: n}) => {
7102
- const r = t.getProvider("app").getImmediate(), s = new Rn(new K(t.getProvider("auth-internal")), new J(t.getProvider("app-check-internal")), function(t, e) {
7150
+ const r = t.getProvider("app").getImmediate(), s = new Vn(new K(t.getProvider("auth-internal")), new J(t.getProvider("app-check-internal")), function(t, e) {
7103
7151
  if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new B($, '"projectId" not provided in firebase.initializeApp.');
7104
7152
  return new tt(t.options.projectId, e);
7105
7153
  }
@@ -7122,7 +7170,7 @@ class As {
7122
7170
  return n && s._setSettings(n), s;
7123
7171
  }), "PUBLIC").setMultipleInstances(!0)),
7124
7172
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
7125
- r("firestore-lite", "3.8.3-canary.d5d78cbcf", "rn"), r("firestore-lite", "3.8.3-canary.d5d78cbcf", "esm2017");
7173
+ r("firestore-lite", "3.8.3-canary.e2bf2eca2", "rn"), r("firestore-lite", "3.8.3-canary.e2bf2eca2", "esm2017");
7126
7174
 
7127
- export { Dn as AggregateField, Fn as AggregateQuerySnapshot, Un as Bytes, qn as CollectionReference, xn as DocumentReference, gr as DocumentSnapshot, jn as FieldPath, zn as FieldValue, Rn as Firestore, B as FirestoreError, Qn as GeoPoint, Sn as Query, Vr as QueryCompositeFilterConstraint, Ir as QueryConstraint, _r as QueryDocumentSnapshot, Lr as QueryEndAtConstraint, Rr as QueryFieldFilterConstraint, xr as QueryLimitConstraint, Dr as QueryOrderByConstraint, vr as QuerySnapshot, Or as QueryStartAtConstraint, qt as Timestamp, As as Transaction, ws as WriteBatch, es as addDoc, us as aggregateFieldEqual, cs as aggregateQuerySnapshotEqual, Nr as and, fs as arrayRemove, ls as arrayUnion, is as average, On as collection, kn as collectionGroup, $n as connectFirestoreEmulator, os as count, ts as deleteDoc, as as deleteField, Cn as doc, Bn as documentId, Ur as endAt, Mr as endBefore, rs as getAggregate, ns as getCount, Hr as getDoc, Zr as getDocs, Vn as getFirestore, ds as increment, Pn as initializeFirestore, Sr as limit, qr as limitToLast, $r as or, Fr as orderBy, Tr as query, Mn as queryEqual, Ln as refEqual, Is as runTransaction, hs as serverTimestamp, Jr as setDoc, g as setLogLevel, br as snapshotEqual, Cr as startAfter, kr as startAt, ss as sum, Nn as terminate, Xr as updateDoc, Pr as where, ps as writeBatch };
7175
+ export { xn as AggregateField, Sn as AggregateQuerySnapshot, Bn as Bytes, kn as CollectionReference, qn as DocumentReference, vr as DocumentSnapshot, zn as FieldPath, Wn as FieldValue, Vn as Firestore, B as FirestoreError, Gn as GeoPoint, On as Query, Nr as QueryCompositeFilterConstraint, Rr as QueryConstraint, br as QueryDocumentSnapshot, Ur as QueryEndAtConstraint, Vr as QueryFieldFilterConstraint, qr as QueryLimitConstraint, xr as QueryOrderByConstraint, Er as QuerySnapshot, Cr as QueryStartAtConstraint, kt as Timestamp, Ts as Transaction, ps as WriteBatch, rs as addDoc, as as aggregateFieldEqual, hs as aggregateQuerySnapshotEqual, Fr as and, ws as arrayRemove, ds as arrayUnion, us as average, Cn as collection, Ln as collectionGroup, Dn as connectFirestoreEmulator, cs as count, ns as deleteDoc, ls as deleteField, Mn as doc, Qn as documentId, Br as endAt, jr as endBefore, is as getAggregate, ss as getCount, Jr as getDoc, Xr as getDocs, Nn as getFirestore, ms as increment, $n as initializeFirestore, Or as limit, kr as limitToLast, Dr as or, Sr as orderBy, Pr as query, jn as queryEqual, Un as refEqual, Rs as runTransaction, fs as serverTimestamp, ts as setDoc, g as setLogLevel, Ar as snapshotEqual, Mr as startAfter, Lr as startAt, os as sum, Fn as terminate, es as updateDoc, $r as where, gs as writeBatch };
7128
7176
  //# sourceMappingURL=index.rn.esm2017.js.map