@firebase/firestore 4.6.0-canary.ef3039ba8 → 4.6.0-passkey-preview.103ead202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -8,7 +8,7 @@ var logger = require('@firebase/logger');
8
8
  var util = require('@firebase/util');
9
9
  var webchannelWrapper = require('@firebase/webchannel-wrapper');
10
10
 
11
- const w = "@firebase/firestore";
11
+ const w = "@firebase/firestore", S = "4.6.0-passkey-preview.103ead202";
12
12
 
13
13
  /**
14
14
  * @license
@@ -70,7 +70,7 @@ User.MOCK_USER = new User("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let S = "10.11.0-canary.ef3039ba8";
73
+ let b = "10.11.0-passkey-preview.103ead202";
74
74
 
75
75
  /**
76
76
  * @license
@@ -88,11 +88,11 @@ let S = "10.11.0-canary.ef3039ba8";
88
88
  * See the License for the specific language governing permissions and
89
89
  * limitations under the License.
90
90
  */
91
- const b = new logger.Logger("@firebase/firestore");
91
+ const D = new logger.Logger("@firebase/firestore");
92
92
 
93
93
  // Helper methods are needed because variables can't be exported as read/write
94
94
  function __PRIVATE_getLogLevel() {
95
- return b.logLevel;
95
+ return D.logLevel;
96
96
  }
97
97
 
98
98
  /**
@@ -108,29 +108,29 @@ function __PRIVATE_getLogLevel() {
108
108
  * <li><code>`silent` to turn off logging.</li>
109
109
  * </ul>
110
110
  */ function setLogLevel(e) {
111
- b.setLogLevel(e);
111
+ D.setLogLevel(e);
112
112
  }
113
113
 
114
114
  function __PRIVATE_logDebug(e, ...t) {
115
- if (b.logLevel <= logger.LogLevel.DEBUG) {
115
+ if (D.logLevel <= logger.LogLevel.DEBUG) {
116
116
  const n = t.map(__PRIVATE_argToString);
117
- b.debug(`Firestore (${S}): ${e}`, ...n);
117
+ D.debug(`Firestore (${b}): ${e}`, ...n);
118
118
  }
119
119
  }
120
120
 
121
121
  function __PRIVATE_logError(e, ...t) {
122
- if (b.logLevel <= logger.LogLevel.ERROR) {
122
+ if (D.logLevel <= logger.LogLevel.ERROR) {
123
123
  const n = t.map(__PRIVATE_argToString);
124
- b.error(`Firestore (${S}): ${e}`, ...n);
124
+ D.error(`Firestore (${b}): ${e}`, ...n);
125
125
  }
126
126
  }
127
127
 
128
128
  /**
129
129
  * @internal
130
130
  */ function __PRIVATE_logWarn(e, ...t) {
131
- if (b.logLevel <= logger.LogLevel.WARN) {
131
+ if (D.logLevel <= logger.LogLevel.WARN) {
132
132
  const n = t.map(__PRIVATE_argToString);
133
- b.warn(`Firestore (${S}): ${e}`, ...n);
133
+ D.warn(`Firestore (${b}): ${e}`, ...n);
134
134
  }
135
135
  }
136
136
 
@@ -191,7 +191,7 @@ function __PRIVATE_logError(e, ...t) {
191
191
  */ function fail(e = "Unexpected state") {
192
192
  // Log the failure in addition to throw an exception, just in case the
193
193
  // exception is swallowed.
194
- const t = `FIRESTORE (${S}) INTERNAL ASSERTION FAILED: ` + e;
194
+ const t = `FIRESTORE (${b}) INTERNAL ASSERTION FAILED: ` + e;
195
195
  // NOTE: We don't use FirestoreError here because these are internal failures
196
196
  // that cannot be handled by the user. (Also it would create a circular
197
197
  // dependency between the error and assert modules which doesn't work.)
@@ -244,7 +244,7 @@ t) {
244
244
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
245
245
  * See the License for the specific language governing permissions and
246
246
  * limitations under the License.
247
- */ const D = {
247
+ */ const C = {
248
248
  // Causes are copied from:
249
249
  // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h
250
250
  /** Not an error; returned on success. */
@@ -789,11 +789,11 @@ class Timestamp {
789
789
  * The fractions of a second at nanosecond resolution.*
790
790
  */
791
791
  t) {
792
- if (this.seconds = e, this.nanoseconds = t, t < 0) throw new FirestoreError(D.INVALID_ARGUMENT, "Timestamp nanoseconds out of range: " + t);
793
- if (t >= 1e9) throw new FirestoreError(D.INVALID_ARGUMENT, "Timestamp nanoseconds out of range: " + t);
794
- if (e < -62135596800) throw new FirestoreError(D.INVALID_ARGUMENT, "Timestamp seconds out of range: " + e);
792
+ if (this.seconds = e, this.nanoseconds = t, t < 0) throw new FirestoreError(C.INVALID_ARGUMENT, "Timestamp nanoseconds out of range: " + t);
793
+ if (t >= 1e9) throw new FirestoreError(C.INVALID_ARGUMENT, "Timestamp nanoseconds out of range: " + t);
794
+ if (e < -62135596800) throw new FirestoreError(C.INVALID_ARGUMENT, "Timestamp seconds out of range: " + e);
795
795
  // This will break in the year 10,000.
796
- if (e >= 253402300800) throw new FirestoreError(D.INVALID_ARGUMENT, "Timestamp seconds out of range: " + e);
796
+ if (e >= 253402300800) throw new FirestoreError(C.INVALID_ARGUMENT, "Timestamp seconds out of range: " + e);
797
797
  }
798
798
  /**
799
799
  * Creates a new timestamp with the current date, with millisecond precision.
@@ -1048,7 +1048,7 @@ class BasePath {
1048
1048
  // for legacy reasons and should not be used frequently).
1049
1049
  const t = [];
1050
1050
  for (const n of e) {
1051
- if (n.indexOf("//") >= 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid segment (${n}). Paths must not contain // in them.`);
1051
+ if (n.indexOf("//") >= 0) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid segment (${n}). Paths must not contain // in them.`);
1052
1052
  // Strip leading and traling slashed.
1053
1053
  t.push(...n.split("/").filter((e => e.length > 0)));
1054
1054
  }
@@ -1059,7 +1059,7 @@ class BasePath {
1059
1059
  }
1060
1060
  }
1061
1061
 
1062
- const C = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
1062
+ const v = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
1063
1063
 
1064
1064
  /**
1065
1065
  * A dot-separated path for navigating sub-objects within a document.
@@ -1072,7 +1072,7 @@ const C = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
1072
1072
  * Returns true if the string could be used as a segment in a field path
1073
1073
  * without escaping.
1074
1074
  */ static isValidIdentifier(e) {
1075
- return C.test(e);
1075
+ return v.test(e);
1076
1076
  }
1077
1077
  canonicalString() {
1078
1078
  return this.toArray().map((e => (e = e.replace(/\\/g, "\\\\").replace(/`/g, "\\`"),
@@ -1104,21 +1104,21 @@ const C = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
1104
1104
  const t = [];
1105
1105
  let n = "", r = 0;
1106
1106
  const __PRIVATE_addCurrentSegment = () => {
1107
- if (0 === n.length) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);
1107
+ if (0 === n.length) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);
1108
1108
  t.push(n), n = "";
1109
1109
  };
1110
1110
  let i = !1;
1111
1111
  for (;r < e.length; ) {
1112
1112
  const t = e[r];
1113
1113
  if ("\\" === t) {
1114
- if (r + 1 === e.length) throw new FirestoreError(D.INVALID_ARGUMENT, "Path has trailing escape character: " + e);
1114
+ if (r + 1 === e.length) throw new FirestoreError(C.INVALID_ARGUMENT, "Path has trailing escape character: " + e);
1115
1115
  const t = e[r + 1];
1116
- if ("\\" !== t && "." !== t && "`" !== t) throw new FirestoreError(D.INVALID_ARGUMENT, "Path has invalid escape sequence: " + e);
1116
+ if ("\\" !== t && "." !== t && "`" !== t) throw new FirestoreError(C.INVALID_ARGUMENT, "Path has invalid escape sequence: " + e);
1117
1117
  n += t, r += 2;
1118
1118
  } else "`" === t ? (i = !i, r++) : "." !== t || i ? (n += t, r++) : (__PRIVATE_addCurrentSegment(),
1119
1119
  r++);
1120
1120
  }
1121
- if (__PRIVATE_addCurrentSegment(), i) throw new FirestoreError(D.INVALID_ARGUMENT, "Unterminated ` in path: " + e);
1121
+ if (__PRIVATE_addCurrentSegment(), i) throw new FirestoreError(C.INVALID_ARGUMENT, "Unterminated ` in path: " + e);
1122
1122
  return new FieldPath$1(t);
1123
1123
  }
1124
1124
  static emptyPath() {
@@ -1370,7 +1370,7 @@ function __PRIVATE_indexOffsetComparator(e, t) {
1370
1370
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1371
1371
  * See the License for the specific language governing permissions and
1372
1372
  * limitations under the License.
1373
- */ const v = "The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";
1373
+ */ const F = "The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";
1374
1374
 
1375
1375
  /**
1376
1376
  * A base class representing a persistence transaction, encapsulating both the
@@ -1417,7 +1417,7 @@ function __PRIVATE_indexOffsetComparator(e, t) {
1417
1417
  * @param err - An error returned by a LocalStore operation.
1418
1418
  * @returns A Promise that resolves after we recovered, or the original error.
1419
1419
  */ async function __PRIVATE_ignoreIfPrimaryLeaseLoss(e) {
1420
- if (e.code !== D.FAILED_PRECONDITION || e.message !== v) throw e;
1420
+ if (e.code !== C.FAILED_PRECONDITION || e.message !== F) throw e;
1421
1421
  __PRIVATE_logDebug("LocalStore", "Unexpectedly lost primary lease");
1422
1422
  }
1423
1423
 
@@ -1728,7 +1728,7 @@ class __PRIVATE_SimpleDbTransaction {
1728
1728
  n(new __PRIVATE_IndexedDbTransactionError(e, "Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."));
1729
1729
  }, r.onerror = t => {
1730
1730
  const r = t.target.error;
1731
- "VersionError" === r.name ? n(new FirestoreError(D.FAILED_PRECONDITION, "A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")) : "InvalidStateError" === r.name ? n(new FirestoreError(D.FAILED_PRECONDITION, "Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: " + r)) : n(new __PRIVATE_IndexedDbTransactionError(e, r));
1731
+ "VersionError" === r.name ? n(new FirestoreError(C.FAILED_PRECONDITION, "A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")) : "InvalidStateError" === r.name ? n(new FirestoreError(C.FAILED_PRECONDITION, "Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: " + r)) : n(new __PRIVATE_IndexedDbTransactionError(e, r));
1732
1732
  }, r.onupgradeneeded = e => {
1733
1733
  __PRIVATE_logDebug("SimpleDb", 'Database "' + this.name + '" requires upgrade from version:', e.oldVersion);
1734
1734
  const t = e.target.result;
@@ -1815,7 +1815,7 @@ class __PRIVATE_SimpleDbTransaction {
1815
1815
 
1816
1816
  /** An error that wraps exceptions that thrown during IndexedDB execution. */ class __PRIVATE_IndexedDbTransactionError extends FirestoreError {
1817
1817
  constructor(e, t) {
1818
- super(D.UNAVAILABLE, `IndexedDB transaction '${e}' failed: ${t}`), this.name = "IndexedDbTransactionError";
1818
+ super(C.UNAVAILABLE, `IndexedDB transaction '${e}' failed: ${t}`), this.name = "IndexedDbTransactionError";
1819
1819
  }
1820
1820
  }
1821
1821
 
@@ -1999,7 +1999,7 @@ class __PRIVATE_SimpleDbTransaction {
1999
1999
  }
2000
2000
 
2001
2001
  // Guard so we only report the error once.
2002
- let F = !1;
2002
+ let M = !1;
2003
2003
 
2004
2004
  function __PRIVATE_checkForAndReportiOSError(e) {
2005
2005
  const t = __PRIVATE_SimpleDb.S(util.getUA());
@@ -2008,7 +2008,7 @@ function __PRIVATE_checkForAndReportiOSError(e) {
2008
2008
  if (e.message.indexOf(t) >= 0) {
2009
2009
  // Wrap error in a more descriptive one.
2010
2010
  const e = new FirestoreError("internal", `IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);
2011
- return F || (F = !0,
2011
+ return M || (M = !0,
2012
2012
  // Throw a global exception outside of this promise chain, for the user to
2013
2013
  // potentially catch.
2014
2014
  setTimeout((() => {
@@ -2260,7 +2260,7 @@ function __PRIVATE_encodeResourcePath(e) {
2260
2260
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2261
2261
  * See the License for the specific language governing permissions and
2262
2262
  * limitations under the License.
2263
- */ const M = [ "userId", "batchId" ];
2263
+ */ const x = [ "userId", "batchId" ];
2264
2264
 
2265
2265
  /**
2266
2266
  * @license
@@ -2305,7 +2305,7 @@ function __PRIVATE_newDbDocumentMutationPrefixForPath(e, t) {
2305
2305
  * there is no useful information to store as the value. The raw (unencoded)
2306
2306
  * path cannot be stored because IndexedDb doesn't store prototype
2307
2307
  * information.
2308
- */ const x = {}, O = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], N = [ "prefixPath", "collectionGroup", "documentId" ], L = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], B = [ "canonicalId", "targetId" ], k = [ "targetId", "path" ], q = [ "path", "targetId" ], Q = [ "collectionId", "parent" ], K = [ "indexId", "uid" ], $ = [ "uid", "sequenceNumber" ], U = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], W = [ "indexId", "uid", "orderedDocumentKey" ], G = [ "userId", "collectionPath", "documentId" ], z = [ "userId", "collectionPath", "largestBatchId" ], j = [ "userId", "collectionGroup", "largestBatchId" ], H = [ ...[ ...[ ...[ ...[ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], "clientMetadata" ], "remoteDocumentGlobal" ], "collectionParents" ], "bundles", "namedQueries" ], J = [ ...H, "documentOverlays" ], Y = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Z = Y, X = [ ...Z, "indexConfiguration", "indexState", "indexEntries" ], ee = X;
2308
+ */ const O = {}, N = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], L = [ "prefixPath", "collectionGroup", "documentId" ], B = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], k = [ "canonicalId", "targetId" ], q = [ "targetId", "path" ], Q = [ "path", "targetId" ], K = [ "collectionId", "parent" ], $ = [ "indexId", "uid" ], U = [ "uid", "sequenceNumber" ], W = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], G = [ "indexId", "uid", "orderedDocumentKey" ], z = [ "userId", "collectionPath", "documentId" ], j = [ "userId", "collectionPath", "largestBatchId" ], H = [ "userId", "collectionGroup", "largestBatchId" ], J = [ ...[ ...[ ...[ ...[ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], "clientMetadata" ], "remoteDocumentGlobal" ], "collectionParents" ], "bundles", "namedQueries" ], Y = [ ...J, "documentOverlays" ], Z = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], X = Z, ee = [ ...X, "indexConfiguration", "indexState", "indexEntries" ], te = ee;
2309
2309
 
2310
2310
  /**
2311
2311
  * @license
@@ -3062,7 +3062,7 @@ function __PRIVATE_isBase64Available() {
3062
3062
 
3063
3063
  ByteString.EMPTY_BYTE_STRING = new ByteString("");
3064
3064
 
3065
- const te = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
3065
+ const ne = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
3066
3066
 
3067
3067
  /**
3068
3068
  * Converts the possible Proto values for a timestamp value into a "seconds and
@@ -3076,7 +3076,7 @@ const te = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
3076
3076
  // (millis), so we do some custom parsing here.
3077
3077
  // Parse the nanos right out of the string.
3078
3078
  let t = 0;
3079
- const n = te.exec(e);
3079
+ const n = ne.exec(e);
3080
3080
  if (__PRIVATE_hardAssert(!!n), n[1]) {
3081
3081
  // Pad the fraction out to 9 digits (nanos).
3082
3082
  let e = n[1];
@@ -3243,7 +3243,7 @@ class DatabaseId {
3243
3243
  * See the License for the specific language governing permissions and
3244
3244
  * limitations under the License.
3245
3245
  */
3246
- const ne = {
3246
+ const re = {
3247
3247
  mapValue: {
3248
3248
  fields: {
3249
3249
  __type__: {
@@ -3251,7 +3251,7 @@ const ne = {
3251
3251
  }
3252
3252
  }
3253
3253
  }
3254
- }, re = {
3254
+ }, ie = {
3255
3255
  nullValue: "NULL_VALUE"
3256
3256
  };
3257
3257
 
@@ -3395,9 +3395,9 @@ function __PRIVATE_valueCompare(e, t) {
3395
3395
 
3396
3396
  case 10 /* TypeOrder.ObjectValue */ :
3397
3397
  return function __PRIVATE_compareMaps(e, t) {
3398
- if (e === ne.mapValue && t === ne.mapValue) return 0;
3399
- if (e === ne.mapValue) return 1;
3400
- if (t === ne.mapValue) return -1;
3398
+ if (e === re.mapValue && t === re.mapValue) return 0;
3399
+ if (e === re.mapValue) return 1;
3400
+ if (t === re.mapValue) return -1;
3401
3401
  const n = e.fields || {}, r = Object.keys(n), i = t.fields || {}, s = Object.keys(i);
3402
3402
  // Even though MapValues are likely sorted correctly based on their insertion
3403
3403
  // order (e.g. when received from the backend), local modifications can bring
@@ -3573,7 +3573,7 @@ function isArray(e) {
3573
3573
  }
3574
3574
 
3575
3575
  /** Returns the lowest value for the given value type (inclusive). */ function __PRIVATE_valuesGetLowerBound(e) {
3576
- return "nullValue" in e ? re : "booleanValue" in e ? {
3576
+ return "nullValue" in e ? ie : "booleanValue" in e ? {
3577
3577
  booleanValue: !1
3578
3578
  } : "integerValue" in e || "doubleValue" in e ? {
3579
3579
  doubleValue: NaN
@@ -3619,7 +3619,7 @@ function isArray(e) {
3619
3619
  arrayValue: {}
3620
3620
  } : "arrayValue" in e ? {
3621
3621
  mapValue: {}
3622
- } : "mapValue" in e ? ne : fail();
3622
+ } : "mapValue" in e ? re : fail();
3623
3623
  }
3624
3624
 
3625
3625
  function __PRIVATE_lowerBoundCompare(e, t) {
@@ -4307,10 +4307,10 @@ function __PRIVATE_targetIsDocumentTarget(e) {
4307
4307
  * the provided `fieldPath` (or the upper bound for an descending segment).
4308
4308
  */
4309
4309
  function __PRIVATE_targetGetAscendingBound(e, t, n) {
4310
- let r = re, i = !0;
4310
+ let r = ie, i = !0;
4311
4311
  // Process all filters to find a value for the current field segment
4312
4312
  for (const n of __PRIVATE_targetGetFieldFiltersForPath(e, t)) {
4313
- let e = re, t = !0;
4313
+ let e = ie, t = !0;
4314
4314
  switch (n.op) {
4315
4315
  case "<" /* Operator.LESS_THAN */ :
4316
4316
  case "<=" /* Operator.LESS_THAN_OR_EQUAL */ :
@@ -4329,7 +4329,7 @@ function __PRIVATE_targetGetAscendingBound(e, t, n) {
4329
4329
 
4330
4330
  case "!=" /* Operator.NOT_EQUAL */ :
4331
4331
  case "not-in" /* Operator.NOT_IN */ :
4332
- e = re;
4332
+ e = ie;
4333
4333
  // Remaining filters cannot be used as lower bounds.
4334
4334
  }
4335
4335
  __PRIVATE_lowerBoundCompare({
@@ -4365,10 +4365,10 @@ function __PRIVATE_targetGetAscendingBound(e, t, n) {
4365
4365
  * Returns the value to use as the upper bound for ascending index segment at
4366
4366
  * the provided `fieldPath` (or the lower bound for a descending segment).
4367
4367
  */ function __PRIVATE_targetGetDescendingBound(e, t, n) {
4368
- let r = ne, i = !0;
4368
+ let r = re, i = !0;
4369
4369
  // Process all filters to find a value for the current field segment
4370
4370
  for (const n of __PRIVATE_targetGetFieldFiltersForPath(e, t)) {
4371
- let e = ne, t = !0;
4371
+ let e = re, t = !0;
4372
4372
  switch (n.op) {
4373
4373
  case ">=" /* Operator.GREATER_THAN_OR_EQUAL */ :
4374
4374
  case ">" /* Operator.GREATER_THAN */ :
@@ -4387,7 +4387,7 @@ function __PRIVATE_targetGetAscendingBound(e, t, n) {
4387
4387
 
4388
4388
  case "!=" /* Operator.NOT_EQUAL */ :
4389
4389
  case "not-in" /* Operator.NOT_IN */ :
4390
- e = ne;
4390
+ e = re;
4391
4391
  // Remaining filters cannot be used as upper bounds.
4392
4392
  }
4393
4393
  __PRIVATE_upperBoundCompare({
@@ -4764,22 +4764,22 @@ function __PRIVATE_compareDocs(e, t, n) {
4764
4764
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4765
4765
  * See the License for the specific language governing permissions and
4766
4766
  * limitations under the License.
4767
- */ const ie = new SortedMap(DocumentKey.comparator);
4767
+ */ const se = new SortedMap(DocumentKey.comparator);
4768
4768
 
4769
4769
  function __PRIVATE_mutableDocumentMap() {
4770
- return ie;
4770
+ return se;
4771
4771
  }
4772
4772
 
4773
- const se = new SortedMap(DocumentKey.comparator);
4773
+ const oe = new SortedMap(DocumentKey.comparator);
4774
4774
 
4775
4775
  function documentMap(...e) {
4776
- let t = se;
4776
+ let t = oe;
4777
4777
  for (const n of e) t = t.insert(n.key, n);
4778
4778
  return t;
4779
4779
  }
4780
4780
 
4781
4781
  function __PRIVATE_convertOverlayedDocumentMapToDocumentMap(e) {
4782
- let t = se;
4782
+ let t = oe;
4783
4783
  return e.forEach(((e, n) => t = t.insert(e, n.overlayedDocument))), t;
4784
4784
  }
4785
4785
 
@@ -4795,20 +4795,20 @@ function __PRIVATE_newDocumentKeyMap() {
4795
4795
  return new ObjectMap((e => e.toString()), ((e, t) => e.isEqual(t)));
4796
4796
  }
4797
4797
 
4798
- const oe = new SortedMap(DocumentKey.comparator);
4798
+ const _e = new SortedMap(DocumentKey.comparator);
4799
4799
 
4800
- const _e = new SortedSet(DocumentKey.comparator);
4800
+ const ae = new SortedSet(DocumentKey.comparator);
4801
4801
 
4802
4802
  function __PRIVATE_documentKeySet(...e) {
4803
- let t = _e;
4803
+ let t = ae;
4804
4804
  for (const n of e) t = t.add(n);
4805
4805
  return t;
4806
4806
  }
4807
4807
 
4808
- const ae = new SortedSet(__PRIVATE_primitiveComparator);
4808
+ const ue = new SortedSet(__PRIVATE_primitiveComparator);
4809
4809
 
4810
4810
  function __PRIVATE_targetIdSet() {
4811
- return ae;
4811
+ return ue;
4812
4812
  }
4813
4813
 
4814
4814
  /**
@@ -5499,7 +5499,7 @@ class __PRIVATE_VerifyMutation extends Mutation {
5499
5499
  */ static from(e, t, n) {
5500
5500
  __PRIVATE_hardAssert(e.mutations.length === n.length);
5501
5501
  let r = function __PRIVATE_documentVersionMap() {
5502
- return oe;
5502
+ return _e;
5503
5503
  }();
5504
5504
  const i = e.mutations;
5505
5505
  for (let e = 0; e < i.length; e++) r = r.insert(i[e].key, n[e].version);
@@ -5613,7 +5613,7 @@ class __PRIVATE_VerifyMutation extends Mutation {
5613
5613
  * Important! The names of these identifiers matter because the string forms
5614
5614
  * are used for reverse lookups from the webchannel stream. Do NOT change the
5615
5615
  * names of these identifiers or change this into a const enum.
5616
- */ var ue, ce;
5616
+ */ var ce, le;
5617
5617
 
5618
5618
  /**
5619
5619
  * Determines whether an error code represents a permanent error when received
@@ -5626,29 +5626,29 @@ function __PRIVATE_isPermanentError(e) {
5626
5626
  default:
5627
5627
  return fail();
5628
5628
 
5629
- case D.CANCELLED:
5630
- case D.UNKNOWN:
5631
- case D.DEADLINE_EXCEEDED:
5632
- case D.RESOURCE_EXHAUSTED:
5633
- case D.INTERNAL:
5634
- case D.UNAVAILABLE:
5629
+ case C.CANCELLED:
5630
+ case C.UNKNOWN:
5631
+ case C.DEADLINE_EXCEEDED:
5632
+ case C.RESOURCE_EXHAUSTED:
5633
+ case C.INTERNAL:
5634
+ case C.UNAVAILABLE:
5635
5635
  // Unauthenticated means something went wrong with our token and we need
5636
5636
  // to retry with new credentials which will happen automatically.
5637
- case D.UNAUTHENTICATED:
5637
+ case C.UNAUTHENTICATED:
5638
5638
  return !1;
5639
5639
 
5640
- case D.INVALID_ARGUMENT:
5641
- case D.NOT_FOUND:
5642
- case D.ALREADY_EXISTS:
5643
- case D.PERMISSION_DENIED:
5644
- case D.FAILED_PRECONDITION:
5640
+ case C.INVALID_ARGUMENT:
5641
+ case C.NOT_FOUND:
5642
+ case C.ALREADY_EXISTS:
5643
+ case C.PERMISSION_DENIED:
5644
+ case C.FAILED_PRECONDITION:
5645
5645
  // Aborted might be retried in some scenarios, but that is dependant on
5646
5646
  // the context and should handled individually by the calling code.
5647
5647
  // See https://cloud.google.com/apis/design/errors.
5648
- case D.ABORTED:
5649
- case D.OUT_OF_RANGE:
5650
- case D.UNIMPLEMENTED:
5651
- case D.DATA_LOSS:
5648
+ case C.ABORTED:
5649
+ case C.OUT_OF_RANGE:
5650
+ case C.UNIMPLEMENTED:
5651
+ case C.DATA_LOSS:
5652
5652
  return !0;
5653
5653
  }
5654
5654
  }
@@ -5676,58 +5676,58 @@ function __PRIVATE_mapCodeFromRpcCode(e) {
5676
5676
  if (void 0 === e)
5677
5677
  // This shouldn't normally happen, but in certain error cases (like trying
5678
5678
  // to send invalid proto messages) we may get an error with no GRPC code.
5679
- return __PRIVATE_logError("GRPC error has no .code"), D.UNKNOWN;
5679
+ return __PRIVATE_logError("GRPC error has no .code"), C.UNKNOWN;
5680
5680
  switch (e) {
5681
- case ue.OK:
5682
- return D.OK;
5681
+ case ce.OK:
5682
+ return C.OK;
5683
5683
 
5684
- case ue.CANCELLED:
5685
- return D.CANCELLED;
5684
+ case ce.CANCELLED:
5685
+ return C.CANCELLED;
5686
5686
 
5687
- case ue.UNKNOWN:
5688
- return D.UNKNOWN;
5687
+ case ce.UNKNOWN:
5688
+ return C.UNKNOWN;
5689
5689
 
5690
- case ue.DEADLINE_EXCEEDED:
5691
- return D.DEADLINE_EXCEEDED;
5690
+ case ce.DEADLINE_EXCEEDED:
5691
+ return C.DEADLINE_EXCEEDED;
5692
5692
 
5693
- case ue.RESOURCE_EXHAUSTED:
5694
- return D.RESOURCE_EXHAUSTED;
5693
+ case ce.RESOURCE_EXHAUSTED:
5694
+ return C.RESOURCE_EXHAUSTED;
5695
5695
 
5696
- case ue.INTERNAL:
5697
- return D.INTERNAL;
5696
+ case ce.INTERNAL:
5697
+ return C.INTERNAL;
5698
5698
 
5699
- case ue.UNAVAILABLE:
5700
- return D.UNAVAILABLE;
5699
+ case ce.UNAVAILABLE:
5700
+ return C.UNAVAILABLE;
5701
5701
 
5702
- case ue.UNAUTHENTICATED:
5703
- return D.UNAUTHENTICATED;
5702
+ case ce.UNAUTHENTICATED:
5703
+ return C.UNAUTHENTICATED;
5704
5704
 
5705
- case ue.INVALID_ARGUMENT:
5706
- return D.INVALID_ARGUMENT;
5705
+ case ce.INVALID_ARGUMENT:
5706
+ return C.INVALID_ARGUMENT;
5707
5707
 
5708
- case ue.NOT_FOUND:
5709
- return D.NOT_FOUND;
5708
+ case ce.NOT_FOUND:
5709
+ return C.NOT_FOUND;
5710
5710
 
5711
- case ue.ALREADY_EXISTS:
5712
- return D.ALREADY_EXISTS;
5711
+ case ce.ALREADY_EXISTS:
5712
+ return C.ALREADY_EXISTS;
5713
5713
 
5714
- case ue.PERMISSION_DENIED:
5715
- return D.PERMISSION_DENIED;
5714
+ case ce.PERMISSION_DENIED:
5715
+ return C.PERMISSION_DENIED;
5716
5716
 
5717
- case ue.FAILED_PRECONDITION:
5718
- return D.FAILED_PRECONDITION;
5717
+ case ce.FAILED_PRECONDITION:
5718
+ return C.FAILED_PRECONDITION;
5719
5719
 
5720
- case ue.ABORTED:
5721
- return D.ABORTED;
5720
+ case ce.ABORTED:
5721
+ return C.ABORTED;
5722
5722
 
5723
- case ue.OUT_OF_RANGE:
5724
- return D.OUT_OF_RANGE;
5723
+ case ce.OUT_OF_RANGE:
5724
+ return C.OUT_OF_RANGE;
5725
5725
 
5726
- case ue.UNIMPLEMENTED:
5727
- return D.UNIMPLEMENTED;
5726
+ case ce.UNIMPLEMENTED:
5727
+ return C.UNIMPLEMENTED;
5728
5728
 
5729
- case ue.DATA_LOSS:
5730
- return D.DATA_LOSS;
5729
+ case ce.DATA_LOSS:
5730
+ return C.DATA_LOSS;
5731
5731
 
5732
5732
  default:
5733
5733
  return fail();
@@ -5741,14 +5741,14 @@ function __PRIVATE_mapCodeFromRpcCode(e) {
5741
5741
  * "UNKNOWN", etc.)
5742
5742
  * @returns The equivalent Code. Non-matching responses are mapped to
5743
5743
  * Code.UNKNOWN.
5744
- */ (ce = ue || (ue = {}))[ce.OK = 0] = "OK", ce[ce.CANCELLED = 1] = "CANCELLED",
5745
- ce[ce.UNKNOWN = 2] = "UNKNOWN", ce[ce.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
5746
- ce[ce.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", ce[ce.NOT_FOUND = 5] = "NOT_FOUND",
5747
- ce[ce.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", ce[ce.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
5748
- ce[ce.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", ce[ce.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
5749
- ce[ce.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", ce[ce.ABORTED = 10] = "ABORTED",
5750
- ce[ce.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", ce[ce.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
5751
- ce[ce.INTERNAL = 13] = "INTERNAL", ce[ce.UNAVAILABLE = 14] = "UNAVAILABLE", ce[ce.DATA_LOSS = 15] = "DATA_LOSS";
5744
+ */ (le = ce || (ce = {}))[le.OK = 0] = "OK", le[le.CANCELLED = 1] = "CANCELLED",
5745
+ le[le.UNKNOWN = 2] = "UNKNOWN", le[le.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
5746
+ le[le.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", le[le.NOT_FOUND = 5] = "NOT_FOUND",
5747
+ le[le.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", le[le.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
5748
+ le[le.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", le[le.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
5749
+ le[le.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", le[le.ABORTED = 10] = "ABORTED",
5750
+ le[le.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", le[le.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
5751
+ le[le.INTERNAL = 13] = "INTERNAL", le[le.UNAVAILABLE = 14] = "UNAVAILABLE", le[le.DATA_LOSS = 15] = "DATA_LOSS";
5752
5752
 
5753
5753
  /**
5754
5754
  * @license
@@ -5773,7 +5773,7 @@ ce[ce.INTERNAL = 13] = "INTERNAL", ce[ce.UNAVAILABLE = 14] = "UNAVAILABLE", ce[c
5773
5773
  * integration tests that have registered callbacks to be notified of events
5774
5774
  * that happen during the test execution.
5775
5775
  */
5776
- let le = null;
5776
+ let he = null;
5777
5777
 
5778
5778
  /**
5779
5779
  * Sets the value of the `testingHooksSpi` object.
@@ -5821,7 +5821,7 @@ function __PRIVATE_newTextEncoder() {
5821
5821
  * See the License for the specific language governing permissions and
5822
5822
  * limitations under the License.
5823
5823
  */
5824
- const he = new webchannelWrapper.Integer([ 4294967295, 4294967295 ], 0);
5824
+ const Pe = new webchannelWrapper.Integer([ 4294967295, 4294967295 ], 0);
5825
5825
 
5826
5826
  // Hash a string using md5 hashing algorithm.
5827
5827
  function __PRIVATE_getMd5HashValue(e) {
@@ -5856,7 +5856,7 @@ class BloomFilter {
5856
5856
  // Calculate hashed value h(i) = h1 + (i * h2).
5857
5857
  let r = e.add(t.multiply(webchannelWrapper.Integer.fromNumber(n)));
5858
5858
  // Wrap if hash value overflow 64bit.
5859
- return 1 === r.compare(he) && (r = new webchannelWrapper.Integer([ r.getBits(0), r.getBits(1) ], 0)),
5859
+ return 1 === r.compare(Pe) && (r = new webchannelWrapper.Integer([ r.getBits(0), r.getBits(1) ], 0)),
5860
5860
  r.modulo(this.Ee).toNumber();
5861
5861
  }
5862
5862
  // Return whether the bit on the given index in the bitmap is set to 1.
@@ -6274,7 +6274,7 @@ class __PRIVATE_WatchChangeAggregator {
6274
6274
  const e = 2 /* BloomFilterApplicationStatus.FalsePositive */ === i ? "TargetPurposeExistenceFilterMismatchBloom" /* TargetPurpose.ExistenceFilterMismatchBloom */ : "TargetPurposeExistenceFilterMismatch" /* TargetPurpose.ExistenceFilterMismatch */;
6275
6275
  this.Ke = this.Ke.insert(t, e);
6276
6276
  }
6277
- null == le || le.tt(function __PRIVATE_createExistenceFilterMismatchInfoForTestingHooks(e, t, n, r, i) {
6277
+ null == he || he.tt(function __PRIVATE_createExistenceFilterMismatchInfoForTestingHooks(e, t, n, r, i) {
6278
6278
  var s, o, _, a, u, c;
6279
6279
  const l = {
6280
6280
  localCacheCount: e,
@@ -6490,13 +6490,13 @@ function __PRIVATE_snapshotChangesMap() {
6490
6490
  return new SortedMap(DocumentKey.comparator);
6491
6491
  }
6492
6492
 
6493
- const Pe = (() => {
6493
+ const Ie = (() => {
6494
6494
  const e = {
6495
6495
  asc: "ASCENDING",
6496
6496
  desc: "DESCENDING"
6497
6497
  };
6498
6498
  return e;
6499
- })(), Ie = (() => {
6499
+ })(), Te = (() => {
6500
6500
  const e = {
6501
6501
  "<": "LESS_THAN",
6502
6502
  "<=": "LESS_THAN_OR_EQUAL",
@@ -6510,7 +6510,7 @@ const Pe = (() => {
6510
6510
  "array-contains-any": "ARRAY_CONTAINS_ANY"
6511
6511
  };
6512
6512
  return e;
6513
- })(), Te = (() => {
6513
+ })(), Ee = (() => {
6514
6514
  const e = {
6515
6515
  and: "AND",
6516
6516
  or: "OR"
@@ -6612,8 +6612,8 @@ function __PRIVATE_toName(e, t) {
6612
6612
 
6613
6613
  function fromName(e, t) {
6614
6614
  const n = __PRIVATE_fromResourceName(t);
6615
- if (n.get(1) !== e.databaseId.projectId) throw new FirestoreError(D.INVALID_ARGUMENT, "Tried to deserialize key from different project: " + n.get(1) + " vs " + e.databaseId.projectId);
6616
- if (n.get(3) !== e.databaseId.database) throw new FirestoreError(D.INVALID_ARGUMENT, "Tried to deserialize key from different database: " + n.get(3) + " vs " + e.databaseId.database);
6615
+ if (n.get(1) !== e.databaseId.projectId) throw new FirestoreError(C.INVALID_ARGUMENT, "Tried to deserialize key from different project: " + n.get(1) + " vs " + e.databaseId.projectId);
6616
+ if (n.get(3) !== e.databaseId.database) throw new FirestoreError(C.INVALID_ARGUMENT, "Tried to deserialize key from different database: " + n.get(3) + " vs " + e.databaseId.database);
6617
6617
  return new DocumentKey(__PRIVATE_extractLocalPathFromResourceName(n));
6618
6618
  }
6619
6619
 
@@ -6687,7 +6687,7 @@ function __PRIVATE_fromWatchChange(e, t) {
6687
6687
  // does not indicate that it extends Uint8Array.
6688
6688
  t instanceof Buffer || t instanceof Uint8Array), ByteString.fromUint8Array(t || new Uint8Array));
6689
6689
  }(e, t.targetChange.resumeToken), o = t.targetChange.cause, _ = o && function __PRIVATE_fromRpcStatus(e) {
6690
- const t = void 0 === e.code ? D.UNKNOWN : __PRIVATE_mapCodeFromRpcCode(e.code);
6690
+ const t = void 0 === e.code ? C.UNKNOWN : __PRIVATE_mapCodeFromRpcCode(e.code);
6691
6691
  return new FirestoreError(t, e.message || "");
6692
6692
  }(o);
6693
6693
  n = new __PRIVATE_WatchTargetChange(r, i, s, _ || null);
@@ -7047,15 +7047,15 @@ function __PRIVATE_fromFilter(e) {
7047
7047
  }
7048
7048
 
7049
7049
  function __PRIVATE_toDirection(e) {
7050
- return Pe[e];
7050
+ return Ie[e];
7051
7051
  }
7052
7052
 
7053
7053
  function __PRIVATE_toOperatorName(e) {
7054
- return Ie[e];
7054
+ return Te[e];
7055
7055
  }
7056
7056
 
7057
7057
  function __PRIVATE_toCompositeOperatorName(e) {
7058
- return Te[e];
7058
+ return Ee[e];
7059
7059
  }
7060
7060
 
7061
7061
  function __PRIVATE_toFieldPathReference(e) {
@@ -8377,7 +8377,7 @@ function __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) {
8377
8377
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8378
8378
  * See the License for the specific language governing permissions and
8379
8379
  * limitations under the License.
8380
- */ const Ee = new Uint8Array(0);
8380
+ */ const de = new Uint8Array(0);
8381
8381
 
8382
8382
  /**
8383
8383
  * A persisted implementation of IndexManager.
@@ -8591,7 +8591,7 @@ class __PRIVATE_IndexedDbIndexManager {
8591
8591
  // combined with the values from the query bounds.
8592
8592
  const _ = (null != t ? t.length : 1) * Math.max(n.length, i.length), a = _ / (null != t ? t.length : 1), u = [];
8593
8593
  for (let c = 0; c < _; ++c) {
8594
- const _ = t ? this.Tn(t[c / a]) : Ee, l = this.En(e, _, n[c % a], r), h = this.dn(e, _, i[c % a], s), P = o.map((t => this.En(e, _, t,
8594
+ const _ = t ? this.Tn(t[c / a]) : de, l = this.En(e, _, n[c % a], r), h = this.dn(e, _, i[c % a], s), P = o.map((t => this.En(e, _, t,
8595
8595
  /* inclusive= */ !0)));
8596
8596
  u.push(...this.createRange(l, h, P));
8597
8597
  }
@@ -8788,7 +8788,7 @@ class __PRIVATE_IndexedDbIndexManager {
8788
8788
  if (null != i) {
8789
8789
  const s = e.data.field(i.fieldPath);
8790
8790
  if (isArray(s)) for (const i of s.arrayValue.values || []) n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, this.Tn(i), r));
8791
- } else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, Ee, r));
8791
+ } else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, de, r));
8792
8792
  return n;
8793
8793
  }
8794
8794
  /**
@@ -8863,7 +8863,7 @@ class __PRIVATE_IndexedDbIndexManager {
8863
8863
  // If we encounter two bounds that will create an unmatchable key range,
8864
8864
  // then we return an empty set of key ranges.
8865
8865
  if (this.Dn(r[e], r[e + 1])) return [];
8866
- const t = [ r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue, Ee, [] ], n = [ r[e + 1].indexId, this.uid, r[e + 1].arrayValue, r[e + 1].directionalValue, Ee, [] ];
8866
+ const t = [ r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue, de, [] ], n = [ r[e + 1].indexId, this.uid, r[e + 1].arrayValue, r[e + 1].directionalValue, de, [] ];
8867
8867
  i.push(IDBKeyRange.bound(t, n));
8868
8868
  }
8869
8869
  return i;
@@ -8931,7 +8931,7 @@ function __PRIVATE_getMinOffsetFromFieldIndexes(e) {
8931
8931
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8932
8932
  * See the License for the specific language governing permissions and
8933
8933
  * limitations under the License.
8934
- */ const de = {
8934
+ */ const Ae = {
8935
8935
  didRun: !1,
8936
8936
  sequenceNumbersCollected: 0,
8937
8937
  targetsRemoved: 0,
@@ -9095,7 +9095,7 @@ class __PRIVATE_IndexedDbMutationQueue {
9095
9095
  let c = new SortedSet(((e, t) => __PRIVATE_primitiveComparator(e.canonicalString(), t.canonicalString())));
9096
9096
  for (const e of r) {
9097
9097
  const t = __PRIVATE_newDbDocumentMutationKey(this.userId, e.key.path, o);
9098
- c = c.add(e.key.path.popLast()), u.push(s.put(a)), u.push(i.put(t, x));
9098
+ c = c.add(e.key.path.popLast()), u.push(s.put(a)), u.push(i.put(t, O));
9099
9099
  }
9100
9100
  return c.forEach((t => {
9101
9101
  u.push(this.indexManager.addToCollectionParentIndex(e, t));
@@ -9664,8 +9664,8 @@ class __PRIVATE_TargetIdGenerator {
9664
9664
  }
9665
9665
  collect(e, t) {
9666
9666
  return -1 === this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug("LruGarbageCollector", "Garbage collection skipped; disabled"),
9667
- PersistencePromise.resolve(de)) : this.getCacheSize(e).next((n => n < this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug("LruGarbageCollector", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),
9668
- de) : this.Yn(e, t)));
9667
+ PersistencePromise.resolve(Ae)) : this.getCacheSize(e).next((n => n < this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug("LruGarbageCollector", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),
9668
+ Ae) : this.Yn(e, t)));
9669
9669
  }
9670
9670
  getCacheSize(e) {
9671
9671
  return this.jn.getCacheSize(e);
@@ -11425,7 +11425,7 @@ class __PRIVATE_MemoryLruDelegate {
11425
11425
  e.createObjectStore("mutations", {
11426
11426
  keyPath: "batchId",
11427
11427
  autoIncrement: !0
11428
- }).createIndex("userMutationsIndex", M, {
11428
+ }).createIndex("userMutationsIndex", x, {
11429
11429
  unique: !0
11430
11430
  }), e.createObjectStore("documentMutations");
11431
11431
  }
@@ -11470,7 +11470,7 @@ class __PRIVATE_MemoryLruDelegate {
11470
11470
  e.createObjectStore("mutations", {
11471
11471
  keyPath: "batchId",
11472
11472
  autoIncrement: !0
11473
- }).createIndex("userMutationsIndex", M, {
11473
+ }).createIndex("userMutationsIndex", x, {
11474
11474
  unique: !0
11475
11475
  });
11476
11476
  const r = t.store("mutations"), i = n.map((e => r.put(e)));
@@ -11507,19 +11507,19 @@ class __PRIVATE_MemoryLruDelegate {
11507
11507
  }))), n < 12 && r >= 12 && (s = s.next((() => {
11508
11508
  !function __PRIVATE_createDocumentOverlayStore(e) {
11509
11509
  const t = e.createObjectStore("documentOverlays", {
11510
- keyPath: G
11510
+ keyPath: z
11511
11511
  });
11512
- t.createIndex("collectionPathOverlayIndex", z, {
11512
+ t.createIndex("collectionPathOverlayIndex", j, {
11513
11513
  unique: !1
11514
- }), t.createIndex("collectionGroupOverlayIndex", j, {
11514
+ }), t.createIndex("collectionGroupOverlayIndex", H, {
11515
11515
  unique: !1
11516
11516
  });
11517
11517
  }(e);
11518
11518
  }))), n < 13 && r >= 13 && (s = s.next((() => function __PRIVATE_createRemoteDocumentCache(e) {
11519
11519
  const t = e.createObjectStore("remoteDocumentsV14", {
11520
- keyPath: O
11520
+ keyPath: N
11521
11521
  });
11522
- t.createIndex("documentKeyIndex", N), t.createIndex("collectionGroupIndex", L);
11522
+ t.createIndex("documentKeyIndex", L), t.createIndex("collectionGroupIndex", B);
11523
11523
  }(e))).next((() => this.ii(e, i))).next((() => e.deleteObjectStore("remoteDocuments")))),
11524
11524
  n < 14 && r >= 14 && (s = s.next((() => this.si(e, i)))), n < 15 && r >= 15 && (s = s.next((() => function __PRIVATE_createFieldIndex(e) {
11525
11525
  e.createObjectStore("indexConfiguration", {
@@ -11529,13 +11529,13 @@ class __PRIVATE_MemoryLruDelegate {
11529
11529
  unique: !1
11530
11530
  });
11531
11531
  e.createObjectStore("indexState", {
11532
- keyPath: K
11533
- }).createIndex("sequenceNumberIndex", $, {
11532
+ keyPath: $
11533
+ }).createIndex("sequenceNumberIndex", U, {
11534
11534
  unique: !1
11535
11535
  });
11536
11536
  e.createObjectStore("indexEntries", {
11537
- keyPath: U
11538
- }).createIndex("documentKeyIndex", W, {
11537
+ keyPath: W
11538
+ }).createIndex("documentKeyIndex", G, {
11539
11539
  unique: !1
11540
11540
  });
11541
11541
  }(e)))), n < 16 && r >= 16 && (
@@ -11590,7 +11590,7 @@ class __PRIVATE_MemoryLruDelegate {
11590
11590
  ni(e, t) {
11591
11591
  // Create the index.
11592
11592
  e.createObjectStore("collectionParents", {
11593
- keyPath: Q
11593
+ keyPath: K
11594
11594
  });
11595
11595
  const n = t.store("collectionParents"), r = new __PRIVATE_MemoryCollectionParentIndex, addEntry = e => {
11596
11596
  if (r.add(e)) {
@@ -11675,19 +11675,19 @@ class __PRIVATE_MemoryLruDelegate {
11675
11675
 
11676
11676
  function __PRIVATE_createQueryCache(e) {
11677
11677
  e.createObjectStore("targetDocuments", {
11678
- keyPath: k
11679
- }).createIndex("documentTargetsIndex", q, {
11678
+ keyPath: q
11679
+ }).createIndex("documentTargetsIndex", Q, {
11680
11680
  unique: !0
11681
11681
  });
11682
11682
  // NOTE: This is unique only because the TargetId is the suffix.
11683
11683
  e.createObjectStore("targets", {
11684
11684
  keyPath: "targetId"
11685
- }).createIndex("queryTargetsIndex", B, {
11685
+ }).createIndex("queryTargetsIndex", k, {
11686
11686
  unique: !0
11687
11687
  }), e.createObjectStore("targetGlobal");
11688
11688
  }
11689
11689
 
11690
- const Ae = "Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";
11690
+ const Re = "Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";
11691
11691
 
11692
11692
  /**
11693
11693
  * Oldest acceptable age in milliseconds for client metadata before the client
@@ -11763,7 +11763,7 @@ class __PRIVATE_IndexedDbPersistence {
11763
11763
  /** The last time we garbage collected the client metadata object store. */
11764
11764
  this.Pi = Number.NEGATIVE_INFINITY,
11765
11765
  /** A listener to notify on primary state changes. */
11766
- this.Ii = e => Promise.resolve(), !__PRIVATE_IndexedDbPersistence.D()) throw new FirestoreError(D.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
11766
+ this.Ii = e => Promise.resolve(), !__PRIVATE_IndexedDbPersistence.D()) throw new FirestoreError(C.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
11767
11767
  this.referenceDelegate = new __PRIVATE_IndexedDbLruDelegateImpl(this, r), this.Ti = t + "main",
11768
11768
  this.serializer = new __PRIVATE_LocalSerializer(_), this.Ei = new __PRIVATE_SimpleDb(this.Ti, this.ui, new __PRIVATE_SchemaConverter(this.serializer)),
11769
11769
  this.Qr = new __PRIVATE_IndexedDbTargetCache(this.referenceDelegate, this.serializer),
@@ -11783,7 +11783,7 @@ class __PRIVATE_IndexedDbPersistence {
11783
11783
  if (!this.isPrimary && !this.allowTabSynchronization)
11784
11784
  // Fail `start()` if `synchronizeTabs` is disabled and we cannot
11785
11785
  // obtain the primary lease.
11786
- throw new FirestoreError(D.FAILED_PRECONDITION, Ae);
11786
+ throw new FirestoreError(C.FAILED_PRECONDITION, Re);
11787
11787
  return this.Ri(), this.Vi(), this.mi(), this.runTransaction("getHighestListenSequenceNumber", "readonly", (e => this.Qr.getHighestSequenceNumber(e)));
11788
11788
  })).then((e => {
11789
11789
  this.kr = new __PRIVATE_ListenSequence(e, this._i);
@@ -11925,7 +11925,7 @@ class __PRIVATE_IndexedDbPersistence {
11925
11925
  // settings is not supported.
11926
11926
  // TODO(b/114226234): Remove this check when `synchronizeTabs` can
11927
11927
  // no longer be turned off.
11928
- throw new FirestoreError(D.FAILED_PRECONDITION, Ae);
11928
+ throw new FirestoreError(C.FAILED_PRECONDITION, Re);
11929
11929
  return !1;
11930
11930
  }
11931
11931
  }
@@ -11995,7 +11995,7 @@ class __PRIVATE_IndexedDbPersistence {
11995
11995
  const r = "readonly" === t ? "readonly" : "readwrite", i =
11996
11996
  /** Returns the object stores for the provided schema. */
11997
11997
  function __PRIVATE_getObjectStores(e) {
11998
- return 16 === e ? ee : 15 === e ? X : 14 === e ? Z : 13 === e ? Y : 12 === e ? J : 11 === e ? H : void fail();
11998
+ return 16 === e ? te : 15 === e ? ee : 14 === e ? X : 13 === e ? Z : 12 === e ? Y : 11 === e ? J : void fail();
11999
11999
  }(this.ui);
12000
12000
  let s;
12001
12001
  // Do all transactions as readwrite against all object stores, since we
@@ -12003,7 +12003,7 @@ class __PRIVATE_IndexedDbPersistence {
12003
12003
  return this.Ei.runTransaction(e, r, i, (r => (s = new __PRIVATE_IndexedDbTransaction(r, this.kr ? this.kr.next() : __PRIVATE_ListenSequence._e),
12004
12004
  "readwrite-primary" === t ? this.gi(s).next((e => !!e || this.pi(s))).next((t => {
12005
12005
  if (!t) throw __PRIVATE_logError(`Failed to obtain primary lease for action '${e}'.`),
12006
- this.isPrimary = !1, this.oi.enqueueRetryable((() => this.Ii(!1))), new FirestoreError(D.FAILED_PRECONDITION, v);
12006
+ this.isPrimary = !1, this.oi.enqueueRetryable((() => this.Ii(!1))), new FirestoreError(C.FAILED_PRECONDITION, F);
12007
12007
  return n(s);
12008
12008
  })).next((e => this.wi(s).next((() => e)))) : this.ki(s).next((() => n(s)))))).then((e => (s.raiseOnCommittedEvent(),
12009
12009
  e)));
@@ -12016,7 +12016,7 @@ class __PRIVATE_IndexedDbPersistence {
12016
12016
  // be turned off.
12017
12017
  ki(e) {
12018
12018
  return __PRIVATE_primaryClientStore(e).get("owner").next((e => {
12019
- if (null !== e && this.Ci(e.leaseTimestampMs, 5e3) && !this.Mi(e.ownerId) && !this.Si(e) && !(this.ai || this.allowTabSynchronization && e.allowTabSynchronization)) throw new FirestoreError(D.FAILED_PRECONDITION, Ae);
12019
+ if (null !== e && this.Ci(e.leaseTimestampMs, 5e3) && !this.Mi(e.ownerId) && !this.Si(e) && !(this.ai || this.allowTabSynchronization && e.allowTabSynchronization)) throw new FirestoreError(C.FAILED_PRECONDITION, Re);
12020
12020
  }));
12021
12021
  }
12022
12022
  /**
@@ -13513,7 +13513,7 @@ class __PRIVATE_BrowserConnectivityMonitor {
13513
13513
  /**
13514
13514
  * The value returned from the most recent invocation of
13515
13515
  * `generateUniqueDebugId()`, or null if it has never been invoked.
13516
- */ let Re = null;
13516
+ */ let Ve = null;
13517
13517
 
13518
13518
  /**
13519
13519
  * Generates and returns an initial value for `lastUniqueDebugId`.
@@ -13538,9 +13538,9 @@ class __PRIVATE_BrowserConnectivityMonitor {
13538
13538
  * @return the 10-character generated ID (e.g. "0xa1b2c3d4").
13539
13539
  */
13540
13540
  function __PRIVATE_generateUniqueDebugId() {
13541
- return null === Re ? Re = function __PRIVATE_generateInitialUniqueDebugId() {
13541
+ return null === Ve ? Ve = function __PRIVATE_generateInitialUniqueDebugId() {
13542
13542
  return 268435456 + Math.round(2147483648 * Math.random());
13543
- }() : Re++, "0x" + Re.toString(16);
13543
+ }() : Ve++, "0x" + Ve.toString(16);
13544
13544
  }
13545
13545
 
13546
13546
  /**
@@ -13558,7 +13558,7 @@ function __PRIVATE_generateUniqueDebugId() {
13558
13558
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13559
13559
  * See the License for the specific language governing permissions and
13560
13560
  * limitations under the License.
13561
- */ const Ve = {
13561
+ */ const me = {
13562
13562
  BatchGetDocuments: "batchGet",
13563
13563
  Commit: "commit",
13564
13564
  RunQuery: "runQuery",
@@ -13636,7 +13636,7 @@ class __PRIVATE_StreamBridge {
13636
13636
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13637
13637
  * See the License for the specific language governing permissions and
13638
13638
  * limitations under the License.
13639
- */ const me = "WebChannelConnection";
13639
+ */ const fe = "WebChannelConnection";
13640
13640
 
13641
13641
  class __PRIVATE_WebChannelConnection extends
13642
13642
  /**
@@ -13680,7 +13680,7 @@ class __PRIVATE_RestConnection {
13680
13680
  // SDK_VERSION is updated to different value at runtime depending on the entry point,
13681
13681
  // so we need to get its value when we need it in a function.
13682
13682
  function __PRIVATE_getGoogApiClientValue() {
13683
- return "gl-js/ fire/" + S;
13683
+ return "gl-js/ fire/" + b;
13684
13684
  }(),
13685
13685
  // Content-Type: text/plain will avoid preflight requests which might
13686
13686
  // mess with CORS and redirects by proxies. If we add custom headers
@@ -13690,7 +13690,7 @@ class __PRIVATE_RestConnection {
13690
13690
  t && t.headers.forEach(((t, n) => e[n] = t)), n && n.headers.forEach(((t, n) => e[n] = t));
13691
13691
  }
13692
13692
  bo(e, t) {
13693
- const n = Ve[e];
13693
+ const n = me[e];
13694
13694
  return `${this.fo}/v1/${t}:${n}`;
13695
13695
  }
13696
13696
  /**
@@ -13714,17 +13714,17 @@ class __PRIVATE_RestConnection {
13714
13714
  switch (_.getLastErrorCode()) {
13715
13715
  case webchannelWrapper.ErrorCode.NO_ERROR:
13716
13716
  const t = _.getResponseJson();
13717
- __PRIVATE_logDebug(me, `XHR for RPC '${e}' ${i} received:`, JSON.stringify(t)),
13717
+ __PRIVATE_logDebug(fe, `XHR for RPC '${e}' ${i} received:`, JSON.stringify(t)),
13718
13718
  s(t);
13719
13719
  break;
13720
13720
 
13721
13721
  case webchannelWrapper.ErrorCode.TIMEOUT:
13722
- __PRIVATE_logDebug(me, `RPC '${e}' ${i} timed out`), o(new FirestoreError(D.DEADLINE_EXCEEDED, "Request time out"));
13722
+ __PRIVATE_logDebug(fe, `RPC '${e}' ${i} timed out`), o(new FirestoreError(C.DEADLINE_EXCEEDED, "Request time out"));
13723
13723
  break;
13724
13724
 
13725
13725
  case webchannelWrapper.ErrorCode.HTTP_ERROR:
13726
13726
  const n = _.getStatus();
13727
- if (__PRIVATE_logDebug(me, `RPC '${e}' ${i} failed with status:`, n, "response text:", _.getResponseText()),
13727
+ if (__PRIVATE_logDebug(fe, `RPC '${e}' ${i} failed with status:`, n, "response text:", _.getResponseText()),
13728
13728
  n > 0) {
13729
13729
  let e = _.getResponseJson();
13730
13730
  Array.isArray(e) && (e = e[0]);
@@ -13732,25 +13732,25 @@ class __PRIVATE_RestConnection {
13732
13732
  if (t && t.status && t.message) {
13733
13733
  const e = function __PRIVATE_mapCodeFromHttpResponseErrorStatus(e) {
13734
13734
  const t = e.toLowerCase().replace(/_/g, "-");
13735
- return Object.values(D).indexOf(t) >= 0 ? t : D.UNKNOWN;
13735
+ return Object.values(C).indexOf(t) >= 0 ? t : C.UNKNOWN;
13736
13736
  }(t.status);
13737
13737
  o(new FirestoreError(e, t.message));
13738
- } else o(new FirestoreError(D.UNKNOWN, "Server responded with status " + _.getStatus()));
13738
+ } else o(new FirestoreError(C.UNKNOWN, "Server responded with status " + _.getStatus()));
13739
13739
  } else
13740
13740
  // If we received an HTTP_ERROR but there's no status code,
13741
13741
  // it's most probably a connection issue
13742
- o(new FirestoreError(D.UNAVAILABLE, "Connection failed."));
13742
+ o(new FirestoreError(C.UNAVAILABLE, "Connection failed."));
13743
13743
  break;
13744
13744
 
13745
13745
  default:
13746
13746
  fail();
13747
13747
  }
13748
13748
  } finally {
13749
- __PRIVATE_logDebug(me, `RPC '${e}' ${i} completed.`);
13749
+ __PRIVATE_logDebug(fe, `RPC '${e}' ${i} completed.`);
13750
13750
  }
13751
13751
  }));
13752
13752
  const a = JSON.stringify(r);
13753
- __PRIVATE_logDebug(me, `RPC '${e}' ${i} sending request:`, r), _.send(t, "POST", a, n, 15);
13753
+ __PRIVATE_logDebug(fe, `RPC '${e}' ${i} sending request:`, r), _.send(t, "POST", a, n, 15);
13754
13754
  }));
13755
13755
  }
13756
13756
  Fo(e, t, n) {
@@ -13791,7 +13791,7 @@ class __PRIVATE_RestConnection {
13791
13791
  // which is recognized by the webchannel backend.
13792
13792
  _.encodeInitMessageHeaders = !0;
13793
13793
  const u = i.join("");
13794
- __PRIVATE_logDebug(me, `Creating RPC '${e}' stream ${r}: ${u}`, _);
13794
+ __PRIVATE_logDebug(fe, `Creating RPC '${e}' stream ${r}: ${u}`, _);
13795
13795
  const c = s.createWebChannel(u, _);
13796
13796
  // WebChannel supports sending the first message with the handshake - saving
13797
13797
  // a network round trip. However, it will have to call send in the same
@@ -13804,8 +13804,8 @@ class __PRIVATE_RestConnection {
13804
13804
  // on a closed stream
13805
13805
  const P = new __PRIVATE_StreamBridge({
13806
13806
  lo: t => {
13807
- h ? __PRIVATE_logDebug(me, `Not sending because RPC '${e}' stream ${r} is closed:`, t) : (l || (__PRIVATE_logDebug(me, `Opening RPC '${e}' stream ${r} transport.`),
13808
- c.open(), l = !0), __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} sending:`, t),
13807
+ h ? __PRIVATE_logDebug(fe, `Not sending because RPC '${e}' stream ${r} is closed:`, t) : (l || (__PRIVATE_logDebug(fe, `Opening RPC '${e}' stream ${r} transport.`),
13808
+ c.open(), l = !0), __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} sending:`, t),
13809
13809
  c.send(t));
13810
13810
  },
13811
13811
  ho: () => c.close()
@@ -13827,13 +13827,13 @@ class __PRIVATE_RestConnection {
13827
13827
  // Note that eventually this function could go away if we are confident
13828
13828
  // enough the code is exception free.
13829
13829
  return __PRIVATE_unguardedEventListen(c, webchannelWrapper.WebChannel.EventType.OPEN, (() => {
13830
- h || __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} transport opened.`);
13830
+ h || __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} transport opened.`);
13831
13831
  })), __PRIVATE_unguardedEventListen(c, webchannelWrapper.WebChannel.EventType.CLOSE, (() => {
13832
- h || (h = !0, __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} transport closed`),
13832
+ h || (h = !0, __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} transport closed`),
13833
13833
  P.Vo());
13834
13834
  })), __PRIVATE_unguardedEventListen(c, webchannelWrapper.WebChannel.EventType.ERROR, (t => {
13835
- h || (h = !0, __PRIVATE_logWarn(me, `RPC '${e}' stream ${r} transport errored:`, t),
13836
- P.Vo(new FirestoreError(D.UNAVAILABLE, "The operation could not be completed")));
13835
+ h || (h = !0, __PRIVATE_logWarn(fe, `RPC '${e}' stream ${r} transport errored:`, t),
13836
+ P.Vo(new FirestoreError(C.UNAVAILABLE, "The operation could not be completed")));
13837
13837
  })), __PRIVATE_unguardedEventListen(c, webchannelWrapper.WebChannel.EventType.MESSAGE, (t => {
13838
13838
  var n;
13839
13839
  if (!h) {
@@ -13846,7 +13846,7 @@ class __PRIVATE_RestConnection {
13846
13846
  // Use any because msgData.error is not typed.
13847
13847
  const s = i, o = s.error || (null === (n = s[0]) || void 0 === n ? void 0 : n.error);
13848
13848
  if (o) {
13849
- __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} received error:`, o);
13849
+ __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} received error:`, o);
13850
13850
  // error.status will be a string like 'OK' or 'NOT_FOUND'.
13851
13851
  const t = o.status;
13852
13852
  let n =
@@ -13859,16 +13859,16 @@ class __PRIVATE_RestConnection {
13859
13859
  function __PRIVATE_mapCodeFromRpcStatus(e) {
13860
13860
  // lookup by string
13861
13861
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13862
- const t = ue[e];
13862
+ const t = ce[e];
13863
13863
  if (void 0 !== t) return __PRIVATE_mapCodeFromRpcCode(t);
13864
13864
  }(t), i = o.message;
13865
- void 0 === n && (n = D.INTERNAL, i = "Unknown error status: " + t + " with message " + o.message),
13865
+ void 0 === n && (n = C.INTERNAL, i = "Unknown error status: " + t + " with message " + o.message),
13866
13866
  // Mark closed so no further events are propagated
13867
13867
  h = !0, P.Vo(new FirestoreError(n, i)), c.close();
13868
- } else __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} received:`, i), P.mo(i);
13868
+ } else __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} received:`, i), P.mo(i);
13869
13869
  }
13870
13870
  })), __PRIVATE_unguardedEventListen(o, webchannelWrapper.Event.STAT_EVENT, (t => {
13871
- t.stat === webchannelWrapper.Stat.PROXY ? __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === webchannelWrapper.Stat.NOPROXY && __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} detected no buffering proxy`);
13871
+ t.stat === webchannelWrapper.Stat.PROXY ? __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === webchannelWrapper.Stat.NOPROXY && __PRIVATE_logDebug(fe, `RPC '${e}' stream ${r} detected no buffering proxy`);
13872
13872
  })), setTimeout((() => {
13873
13873
  // Technically we could/should wait for the WebChannel opened event,
13874
13874
  // but because we want to send the first message with the WebChannel
@@ -14192,10 +14192,10 @@ class __PRIVATE_PersistentStream {
14192
14192
  // underlying stream), guaranteeing they won't execute.
14193
14193
  this.Wo++, 4 /* PersistentStreamState.Error */ !== e ?
14194
14194
  // If this is an intentional close ensure we don't delay our next connection attempt.
14195
- this.jo.reset() : t && t.code === D.RESOURCE_EXHAUSTED ? (
14195
+ this.jo.reset() : t && t.code === C.RESOURCE_EXHAUSTED ? (
14196
14196
  // Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)
14197
14197
  __PRIVATE_logError(t.toString()), __PRIVATE_logError("Using maximum backoff delay to prevent overloading the backend."),
14198
- this.jo.ko()) : t && t.code === D.UNAUTHENTICATED && 3 /* PersistentStreamState.Healthy */ !== this.state && (
14198
+ this.jo.ko()) : t && t.code === C.UNAUTHENTICATED && 3 /* PersistentStreamState.Healthy */ !== this.state && (
14199
14199
  // "unauthenticated" error means the token was rejected. This should rarely
14200
14200
  // happen since both Auth and AppCheck ensure a sufficient TTL when we
14201
14201
  // request a token. If a user manually resets their system clock this can
@@ -14231,7 +14231,7 @@ class __PRIVATE_PersistentStream {
14231
14231
  this.o_(e, n);
14232
14232
  }), (t => {
14233
14233
  e((() => {
14234
- const e = new FirestoreError(D.UNKNOWN, "Fetching auth token failed: " + t.message);
14234
+ const e = new FirestoreError(C.UNKNOWN, "Fetching auth token failed: " + t.message);
14235
14235
  return this.__(e);
14236
14236
  }));
14237
14237
  }));
@@ -14444,18 +14444,18 @@ class __PRIVATE_DatastoreImpl extends class Datastore {} {
14444
14444
  this.serializer = r, this.A_ = !1;
14445
14445
  }
14446
14446
  R_() {
14447
- if (this.A_) throw new FirestoreError(D.FAILED_PRECONDITION, "The client has already been terminated.");
14447
+ if (this.A_) throw new FirestoreError(C.FAILED_PRECONDITION, "The client has already been terminated.");
14448
14448
  }
14449
14449
  /** Invokes the provided RPC with auth and AppCheck tokens. */ So(e, t, n, r) {
14450
14450
  return this.R_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, s]) => this.connection.So(e, __PRIVATE_toResourcePath(t, n), r, i, s))).catch((e => {
14451
- throw "FirebaseError" === e.name ? (e.code === D.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
14452
- this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(D.UNKNOWN, e.toString());
14451
+ throw "FirebaseError" === e.name ? (e.code === C.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
14452
+ this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(C.UNKNOWN, e.toString());
14453
14453
  }));
14454
14454
  }
14455
14455
  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ vo(e, t, n, r, i) {
14456
14456
  return this.R_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([s, o]) => this.connection.vo(e, __PRIVATE_toResourcePath(t, n), r, s, o, i))).catch((e => {
14457
- throw "FirebaseError" === e.name ? (e.code === D.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
14458
- this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(D.UNKNOWN, e.toString());
14457
+ throw "FirebaseError" === e.name ? (e.code === C.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
14458
+ this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(C.UNKNOWN, e.toString());
14459
14459
  }));
14460
14460
  }
14461
14461
  terminate() {
@@ -14947,7 +14947,7 @@ async function __PRIVATE_onWriteStreamClose(e, t) {
14947
14947
  // Only handle permanent errors here. If it's transient, just let the retry
14948
14948
  // logic kick in.
14949
14949
  if (function __PRIVATE_isPermanentWriteError(e) {
14950
- return __PRIVATE_isPermanentError(e) && e !== D.ABORTED;
14950
+ return __PRIVATE_isPermanentError(e) && e !== C.ABORTED;
14951
14951
  }(t.code)) {
14952
14952
  // This was a permanent error, the request itself was the problem
14953
14953
  // so it's not going to succeed if we resend it.
@@ -15128,7 +15128,7 @@ class DelayedOperation {
15128
15128
  * As long as the operation has not yet been run, calling cancel() provides a
15129
15129
  * guarantee that the operation will not be run.
15130
15130
  */ cancel(e) {
15131
- null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new FirestoreError(D.CANCELLED, "Operation cancelled" + (e ? ": " + e : ""))));
15131
+ null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new FirestoreError(C.CANCELLED, "Operation cancelled" + (e ? ": " + e : ""))));
15132
15132
  }
15133
15133
  handleDelayElapsed() {
15134
15134
  this.asyncQueue.enqueueAndForget((() => null !== this.timerHandle ? (this.clearTimeout(),
@@ -15144,7 +15144,7 @@ class DelayedOperation {
15144
15144
  * Returns a FirestoreError that can be surfaced to the user if the provided
15145
15145
  * error is an IndexedDbTransactionError. Re-throws the error otherwise.
15146
15146
  */ function __PRIVATE_wrapInUserErrorIfRecoverable(e, t) {
15147
- if (__PRIVATE_logError("AsyncQueue", `${t}: ${e}`), __PRIVATE_isIndexedDbTransactionError(e)) return new FirestoreError(D.UNAVAILABLE, `${t}: ${e}`);
15147
+ if (__PRIVATE_logError("AsyncQueue", `${t}: ${e}`), __PRIVATE_isIndexedDbTransactionError(e)) return new FirestoreError(C.UNAVAILABLE, `${t}: ${e}`);
15148
15148
  throw e;
15149
15149
  }
15150
15150
 
@@ -15457,12 +15457,12 @@ function __PRIVATE_raiseSnapshotsInSyncEvent(e) {
15457
15457
  }));
15458
15458
  }
15459
15459
 
15460
- var fe, ge;
15460
+ var ge, pe;
15461
15461
 
15462
15462
  /** Listen to both cache and server changes */
15463
- (ge = fe || (fe = {})).j_ = "default",
15463
+ (pe = ge || (ge = {})).j_ = "default",
15464
15464
  /** Listen to changes in cache only */
15465
- ge.Cache = "cache";
15465
+ pe.Cache = "cache";
15466
15466
 
15467
15467
  /**
15468
15468
  * QueryListener takes a series of internal view snapshots and determines
@@ -15537,7 +15537,7 @@ class __PRIVATE_QueryListener {
15537
15537
  this.J_ = !0, this.H_.next(e);
15538
15538
  }
15539
15539
  U_() {
15540
- return this.options.source !== fe.Cache;
15540
+ return this.options.source !== ge.Cache;
15541
15541
  }
15542
15542
  }
15543
15543
 
@@ -16499,7 +16499,7 @@ async function __PRIVATE_syncEngineHandleCredentialChange(e, t) {
16499
16499
  function __PRIVATE_rejectOutstandingPendingWritesCallbacks(e, t) {
16500
16500
  e.Ma.forEach((e => {
16501
16501
  e.forEach((e => {
16502
- e.reject(new FirestoreError(D.CANCELLED, t));
16502
+ e.reject(new FirestoreError(C.CANCELLED, t));
16503
16503
  }));
16504
16504
  })), e.Ma.clear();
16505
16505
  }(n, "'waitForPendingWrites' promise is rejected due to a user change."),
@@ -16928,7 +16928,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends MemoryOfflineCompone
16928
16928
  }
16929
16929
  createSharedClientState(e) {
16930
16930
  const t = __PRIVATE_getWindow();
16931
- if (!__PRIVATE_WebStorageSharedClientState.D(t)) throw new FirestoreError(D.UNIMPLEMENTED, "IndexedDB persistence is only available on platforms that support LocalStorage.");
16931
+ if (!__PRIVATE_WebStorageSharedClientState.D(t)) throw new FirestoreError(C.UNIMPLEMENTED, "IndexedDB persistence is only available on platforms that support LocalStorage.");
16932
16932
  const n = __PRIVATE_indexedDbStoragePrefix(e.databaseInfo.databaseId, e.databaseInfo.persistenceKey);
16933
16933
  return new __PRIVATE_WebStorageSharedClientState(t, e.asyncQueue, n, e.clientId, e.initialUser);
16934
16934
  }
@@ -17266,7 +17266,7 @@ class Transaction$2 {
17266
17266
  this.writtenDocs = new Set;
17267
17267
  }
17268
17268
  async lookup(e) {
17269
- if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw this.lastTransactionError = new FirestoreError(D.INVALID_ARGUMENT, "Firestore transactions require all reads to be executed before all writes."),
17269
+ if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw this.lastTransactionError = new FirestoreError(C.INVALID_ARGUMENT, "Firestore transactions require all reads to be executed before all writes."),
17270
17270
  this.lastTransactionError;
17271
17271
  const t = await async function __PRIVATE_invokeBatchGetDocumentsRpc(e, t) {
17272
17272
  const n = __PRIVATE_debugCast(e), r = {
@@ -17328,7 +17328,7 @@ class Transaction$2 {
17328
17328
  if (n) {
17329
17329
  if (!t.isEqual(n))
17330
17330
  // This transaction will fail no matter what.
17331
- throw new FirestoreError(D.ABORTED, "Document version changed between two reads.");
17331
+ throw new FirestoreError(C.ABORTED, "Document version changed between two reads.");
17332
17332
  } else this.readVersions.set(e.key.toString(), t);
17333
17333
  }
17334
17334
  /**
@@ -17355,7 +17355,7 @@ class Transaction$2 {
17355
17355
  // express that to the backend, we have to validate locally.
17356
17356
  // Note: this can change once we can send separate verify writes in the
17357
17357
  // transaction.
17358
- throw new FirestoreError(D.INVALID_ARGUMENT, "Can't update a document that doesn't exist.");
17358
+ throw new FirestoreError(C.INVALID_ARGUMENT, "Can't update a document that doesn't exist.");
17359
17359
  // Document exists, base precondition on document update time.
17360
17360
  return Precondition.updateTime(t);
17361
17361
  }
@@ -17496,7 +17496,7 @@ class FirestoreClient {
17496
17496
  * Checks that the client has not been terminated. Ensures that other methods on //
17497
17497
  * this class cannot be called after the client is terminated. //
17498
17498
  */ verifyNotTerminated() {
17499
- if (this.asyncQueue.isShuttingDown) throw new FirestoreError(D.FAILED_PRECONDITION, "The client has already been terminated.");
17499
+ if (this.asyncQueue.isShuttingDown) throw new FirestoreError(C.FAILED_PRECONDITION, "The client has already been terminated.");
17500
17500
  }
17501
17501
  terminate() {
17502
17502
  this.asyncQueue.enterRestrictedMode();
@@ -17544,7 +17544,7 @@ async function __PRIVATE_setOnlineComponentProvider(e, t) {
17544
17544
  * Decides whether the provided error allows us to gracefully disable
17545
17545
  * persistence (as opposed to crashing the client).
17546
17546
  */ function __PRIVATE_canFallbackFromIndexedDbError(e) {
17547
- return "FirebaseError" === e.name ? e.code === D.FAILED_PRECONDITION || e.code === D.UNIMPLEMENTED : !("undefined" != typeof DOMException && e instanceof DOMException) || (
17547
+ return "FirebaseError" === e.name ? e.code === C.FAILED_PRECONDITION || e.code === C.UNIMPLEMENTED : !("undefined" != typeof DOMException && e instanceof DOMException) || (
17548
17548
  // When the browser is out of quota we could get either quota exceeded
17549
17549
  // or an aborted error depending on whether the error happened during
17550
17550
  // schema migration.
@@ -17638,7 +17638,7 @@ async function __PRIVATE_getEventManager(e) {
17638
17638
  const n = __PRIVATE_debugCast(e);
17639
17639
  return n.persistence.runTransaction("read document", "readonly", (e => n.localDocuments.getDocument(e, t)));
17640
17640
  }(e, t);
17641
- r.isFoundDocument() ? n.resolve(r) : r.isNoDocument() ? n.resolve(null) : n.reject(new FirestoreError(D.UNAVAILABLE, "Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"));
17641
+ r.isFoundDocument() ? n.resolve(r) : r.isNoDocument() ? n.resolve(null) : n.reject(new FirestoreError(C.UNAVAILABLE, "Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"));
17642
17642
  } catch (e) {
17643
17643
  const r = __PRIVATE_wrapInUserErrorIfRecoverable(e, `Failed to get document '${t} from cache`);
17644
17644
  n.reject(r);
@@ -17667,7 +17667,7 @@ function __PRIVATE_firestoreClientGetDocumentViaSnapshotListener(e, t, n = {}) {
17667
17667
  // the server so we can deliver that even when you're
17668
17668
  // offline 2) Actually reject the Promise in the online case
17669
17669
  // if the document doesn't exist.
17670
- i.reject(new FirestoreError(D.UNAVAILABLE, "Failed to get document because the client is offline.")) : _ && s.fromCache && r && "server" === r.source ? i.reject(new FirestoreError(D.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')) : i.resolve(s);
17670
+ i.reject(new FirestoreError(C.UNAVAILABLE, "Failed to get document because the client is offline.")) : _ && s.fromCache && r && "server" === r.source ? i.reject(new FirestoreError(C.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')) : i.resolve(s);
17671
17671
  },
17672
17672
  error: e => i.reject(e)
17673
17673
  }), o = new __PRIVATE_QueryListener(__PRIVATE_newQueryForPath(n.path), s, {
@@ -17704,7 +17704,7 @@ function __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(e, t, n = {})
17704
17704
  next: n => {
17705
17705
  // Remove query first before passing event to user to avoid
17706
17706
  // user actions affecting the now stale query.
17707
- t.enqueueAndForget((() => __PRIVATE_eventManagerUnlisten(e, o))), n.fromCache && "server" === r.source ? i.reject(new FirestoreError(D.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')) : i.resolve(n);
17707
+ t.enqueueAndForget((() => __PRIVATE_eventManagerUnlisten(e, o))), n.fromCache && "server" === r.source ? i.reject(new FirestoreError(C.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')) : i.resolve(n);
17708
17708
  },
17709
17709
  error: e => i.reject(e)
17710
17710
  }), o = new __PRIVATE_QueryListener(n, s, {
@@ -17904,7 +17904,7 @@ function __PRIVATE_cloneLongPollingOptions(e) {
17904
17904
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17905
17905
  * See the License for the specific language governing permissions and
17906
17906
  * limitations under the License.
17907
- */ const pe = new Map;
17907
+ */ const ye = new Map;
17908
17908
 
17909
17909
  /**
17910
17910
  * An instance map that ensures only one Datastore exists per Firestore
@@ -17927,28 +17927,28 @@ function __PRIVATE_cloneLongPollingOptions(e) {
17927
17927
  * limitations under the License.
17928
17928
  */
17929
17929
  function __PRIVATE_validateNonEmptyArgument(e, t, n) {
17930
- if (!n) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${e}() cannot be called with an empty ${t}.`);
17930
+ if (!n) throw new FirestoreError(C.INVALID_ARGUMENT, `Function ${e}() cannot be called with an empty ${t}.`);
17931
17931
  }
17932
17932
 
17933
17933
  /**
17934
17934
  * Validates that two boolean options are not set at the same time.
17935
17935
  * @internal
17936
17936
  */ function __PRIVATE_validateIsNotUsedTogether(e, t, n, r) {
17937
- if (!0 === t && !0 === r) throw new FirestoreError(D.INVALID_ARGUMENT, `${e} and ${n} cannot be used together.`);
17937
+ if (!0 === t && !0 === r) throw new FirestoreError(C.INVALID_ARGUMENT, `${e} and ${n} cannot be used together.`);
17938
17938
  }
17939
17939
 
17940
17940
  /**
17941
17941
  * Validates that `path` refers to a document (indicated by the fact it contains
17942
17942
  * an even numbers of segments).
17943
17943
  */ function __PRIVATE_validateDocumentPath(e) {
17944
- if (!DocumentKey.isDocumentKey(e)) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`);
17944
+ if (!DocumentKey.isDocumentKey(e)) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`);
17945
17945
  }
17946
17946
 
17947
17947
  /**
17948
17948
  * Validates that `path` refers to a collection (indicated by the fact it
17949
17949
  * contains an odd numbers of segments).
17950
17950
  */ function __PRIVATE_validateCollectionPath(e) {
17951
- if (DocumentKey.isDocumentKey(e)) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`);
17951
+ if (DocumentKey.isDocumentKey(e)) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`);
17952
17952
  }
17953
17953
 
17954
17954
  /**
@@ -17992,17 +17992,17 @@ t) {
17992
17992
  // Unwrap Compat types
17993
17993
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
17994
17994
  e = e._delegate), !(e instanceof t)) {
17995
- if (t.name === e.constructor.name) throw new FirestoreError(D.INVALID_ARGUMENT, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
17995
+ if (t.name === e.constructor.name) throw new FirestoreError(C.INVALID_ARGUMENT, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
17996
17996
  {
17997
17997
  const n = __PRIVATE_valueDescription(e);
17998
- throw new FirestoreError(D.INVALID_ARGUMENT, `Expected type '${t.name}', but it was: ${n}`);
17998
+ throw new FirestoreError(C.INVALID_ARGUMENT, `Expected type '${t.name}', but it was: ${n}`);
17999
17999
  }
18000
18000
  }
18001
18001
  return e;
18002
18002
  }
18003
18003
 
18004
18004
  function __PRIVATE_validatePositiveNumber(e, t) {
18005
- if (t <= 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${e}() requires a positive number, but it was: ${t}.`);
18005
+ if (t <= 0) throw new FirestoreError(C.INVALID_ARGUMENT, `Function ${e}() requires a positive number, but it was: ${t}.`);
18006
18006
  }
18007
18007
 
18008
18008
  /**
@@ -18031,12 +18031,12 @@ class FirestoreSettingsImpl {
18031
18031
  constructor(e) {
18032
18032
  var t, n;
18033
18033
  if (void 0 === e.host) {
18034
- if (void 0 !== e.ssl) throw new FirestoreError(D.INVALID_ARGUMENT, "Can't provide ssl option if host option is not set");
18034
+ if (void 0 !== e.ssl) throw new FirestoreError(C.INVALID_ARGUMENT, "Can't provide ssl option if host option is not set");
18035
18035
  this.host = "firestore.googleapis.com", this.ssl = true;
18036
18036
  } else this.host = e.host, this.ssl = null === (t = e.ssl) || void 0 === t || t;
18037
18037
  if (this.credentials = e.credentials, this.ignoreUndefinedProperties = !!e.ignoreUndefinedProperties,
18038
18038
  this.localCache = e.localCache, void 0 === e.cacheSizeBytes) this.cacheSizeBytes = 41943040; else {
18039
- if (-1 !== e.cacheSizeBytes && e.cacheSizeBytes < 1048576) throw new FirestoreError(D.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
18039
+ if (-1 !== e.cacheSizeBytes && e.cacheSizeBytes < 1048576) throw new FirestoreError(C.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
18040
18040
  this.cacheSizeBytes = e.cacheSizeBytes;
18041
18041
  }
18042
18042
  __PRIVATE_validateIsNotUsedTogether("experimentalForceLongPolling", e.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", e.experimentalAutoDetectLongPolling),
@@ -18048,9 +18048,9 @@ class FirestoreSettingsImpl {
18048
18048
  this.experimentalLongPollingOptions = __PRIVATE_cloneLongPollingOptions(null !== (n = e.experimentalLongPollingOptions) && void 0 !== n ? n : {}),
18049
18049
  function __PRIVATE_validateLongPollingOptions(e) {
18050
18050
  if (void 0 !== e.timeoutSeconds) {
18051
- if (isNaN(e.timeoutSeconds)) throw new FirestoreError(D.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);
18052
- if (e.timeoutSeconds < 5) throw new FirestoreError(D.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);
18053
- if (e.timeoutSeconds > 30) throw new FirestoreError(D.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`);
18051
+ if (isNaN(e.timeoutSeconds)) throw new FirestoreError(C.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);
18052
+ if (e.timeoutSeconds < 5) throw new FirestoreError(C.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);
18053
+ if (e.timeoutSeconds > 30) throw new FirestoreError(C.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`);
18054
18054
  }
18055
18055
  }
18056
18056
  /**
@@ -18097,7 +18097,7 @@ class Firestore$1 {
18097
18097
  * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
18098
18098
  * instance.
18099
18099
  */ get app() {
18100
- if (!this._app) throw new FirestoreError(D.FAILED_PRECONDITION, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
18100
+ if (!this._app) throw new FirestoreError(C.FAILED_PRECONDITION, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
18101
18101
  return this._app;
18102
18102
  }
18103
18103
  get _initialized() {
@@ -18107,7 +18107,7 @@ class Firestore$1 {
18107
18107
  return void 0 !== this._terminateTask;
18108
18108
  }
18109
18109
  _setSettings(e) {
18110
- if (this._settingsFrozen) throw new FirestoreError(D.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
18110
+ if (this._settingsFrozen) throw new FirestoreError(C.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
18111
18111
  this._settings = new FirestoreSettingsImpl(e), void 0 !== e.credentials && (this._authCredentials = function __PRIVATE_makeAuthCredentialsProvider(e) {
18112
18112
  if (!e) return new __PRIVATE_EmptyAuthCredentialsProvider;
18113
18113
  switch (e.type) {
@@ -18118,7 +18118,7 @@ class Firestore$1 {
18118
18118
  return e.client;
18119
18119
 
18120
18120
  default:
18121
- throw new FirestoreError(D.INVALID_ARGUMENT, "makeAuthCredentialsProvider failed due to invalid credential type");
18121
+ throw new FirestoreError(C.INVALID_ARGUMENT, "makeAuthCredentialsProvider failed due to invalid credential type");
18122
18122
  }
18123
18123
  }(e.credentials));
18124
18124
  }
@@ -18150,8 +18150,8 @@ class Firestore$1 {
18150
18150
  * when the `Firestore` instance is terminated.
18151
18151
  */
18152
18152
  return function __PRIVATE_removeComponents(e) {
18153
- const t = pe.get(e);
18154
- t && (__PRIVATE_logDebug("ComponentProvider", "Removing Datastore"), pe.delete(e),
18153
+ const t = ye.get(e);
18154
+ t && (__PRIVATE_logDebug("ComponentProvider", "Removing Datastore"), ye.delete(e),
18155
18155
  t.terminate());
18156
18156
  }(this), Promise.resolve();
18157
18157
  }
@@ -18183,7 +18183,7 @@ class Firestore$1 {
18183
18183
  // invalid field "uid" and missing field "sub" / "user_id".)
18184
18184
  t = util.createMockUserToken(r.mockUserToken, null === (i = e._app) || void 0 === i ? void 0 : i.options.projectId);
18185
18185
  const s = r.mockUserToken.sub || r.mockUserToken.user_id;
18186
- if (!s) throw new FirestoreError(D.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
18186
+ if (!s) throw new FirestoreError(C.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
18187
18187
  n = new User(s);
18188
18188
  }
18189
18189
  e._authCredentials = new __PRIVATE_EmulatorAuthCredentialsProvider(new __PRIVATE_OAuthToken(t, n));
@@ -18303,7 +18303,7 @@ function collection(e, t, ...n) {
18303
18303
  return __PRIVATE_validateCollectionPath(r), new CollectionReference(e, /* converter= */ null, r);
18304
18304
  }
18305
18305
  {
18306
- if (!(e instanceof DocumentReference || e instanceof CollectionReference)) throw new FirestoreError(D.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
18306
+ if (!(e instanceof DocumentReference || e instanceof CollectionReference)) throw new FirestoreError(C.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
18307
18307
  const r = e._path.child(ResourcePath.fromString(t, ...n));
18308
18308
  return __PRIVATE_validateCollectionPath(r), new CollectionReference(e.firestore,
18309
18309
  /* converter= */ null, r);
@@ -18324,7 +18324,7 @@ function collection(e, t, ...n) {
18324
18324
  * @returns The created `Query`.
18325
18325
  */ function collectionGroup(e, t) {
18326
18326
  if (e = __PRIVATE_cast(e, Firestore$1), __PRIVATE_validateNonEmptyArgument("collectionGroup", "collection id", t),
18327
- t.indexOf("/") >= 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid collection ID '${t}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);
18327
+ t.indexOf("/") >= 0) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid collection ID '${t}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);
18328
18328
  return new Query(e,
18329
18329
  /* converter= */ null, function __PRIVATE_newQueryForCollectionGroup(e) {
18330
18330
  return new __PRIVATE_QueryImpl(ResourcePath.emptyPath(), e);
@@ -18342,7 +18342,7 @@ function doc(e, t, ...n) {
18342
18342
  /* converter= */ null, new DocumentKey(r));
18343
18343
  }
18344
18344
  {
18345
- if (!(e instanceof DocumentReference || e instanceof CollectionReference)) throw new FirestoreError(D.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
18345
+ if (!(e instanceof DocumentReference || e instanceof CollectionReference)) throw new FirestoreError(C.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
18346
18346
  const r = e._path.child(ResourcePath.fromString(t, ...n));
18347
18347
  return __PRIVATE_validateDocumentPath(r), new DocumentReference(e.firestore, e instanceof CollectionReference ? e.converter : null, new DocumentKey(r));
18348
18348
  }
@@ -18702,7 +18702,7 @@ class LoadBundleTask {
18702
18702
  * Constant used to indicate the LRU garbage collection should be disabled.
18703
18703
  * Set this value as the `cacheSizeBytes` on the settings passed to the
18704
18704
  * {@link Firestore} instance.
18705
- */ const ye = -1;
18705
+ */ const we = -1;
18706
18706
 
18707
18707
  /**
18708
18708
  * The Cloud Firestore service interface.
@@ -18746,10 +18746,10 @@ class LoadBundleTask {
18746
18746
  identifier: n
18747
18747
  }), i = r.getOptions(n);
18748
18748
  if (util.deepEqual(i, t)) return e;
18749
- throw new FirestoreError(D.FAILED_PRECONDITION, "initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.");
18749
+ throw new FirestoreError(C.FAILED_PRECONDITION, "initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.");
18750
18750
  }
18751
- if (void 0 !== t.cacheSizeBytes && void 0 !== t.localCache) throw new FirestoreError(D.INVALID_ARGUMENT, "cache and cacheSizeBytes cannot be specified at the same time as cacheSizeBytes willbe deprecated. Instead, specify the cache size in the cache object");
18752
- if (void 0 !== t.cacheSizeBytes && -1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new FirestoreError(D.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
18751
+ if (void 0 !== t.cacheSizeBytes && void 0 !== t.localCache) throw new FirestoreError(C.INVALID_ARGUMENT, "cache and cacheSizeBytes cannot be specified at the same time as cacheSizeBytes willbe deprecated. Instead, specify the cache size in the cache object");
18752
+ if (void 0 !== t.cacheSizeBytes && -1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new FirestoreError(C.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
18753
18753
  return r.initialize({
18754
18754
  options: t,
18755
18755
  instanceIdentifier: n
@@ -18818,7 +18818,7 @@ function __PRIVATE_configureFirestore(e) {
18818
18818
  */ function enableIndexedDbPersistence(e, t) {
18819
18819
  __PRIVATE_verifyNotInitialized(e = __PRIVATE_cast(e, Firestore));
18820
18820
  const n = ensureFirestoreConfigured(e);
18821
- if (n._uninitializedComponentsProvider) throw new FirestoreError(D.FAILED_PRECONDITION, "SDK cache is already specified.");
18821
+ if (n._uninitializedComponentsProvider) throw new FirestoreError(C.FAILED_PRECONDITION, "SDK cache is already specified.");
18822
18822
  __PRIVATE_logWarn("enableIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");
18823
18823
  const r = e._freezeSettings(), i = new OnlineComponentProvider;
18824
18824
  return __PRIVATE_setPersistenceProviders(n, i, new __PRIVATE_IndexedDbOfflineComponentProvider(i, r.cacheSizeBytes, null == t ? void 0 : t.forceOwnership));
@@ -18852,7 +18852,7 @@ function __PRIVATE_configureFirestore(e) {
18852
18852
  */ function enableMultiTabIndexedDbPersistence(e) {
18853
18853
  __PRIVATE_verifyNotInitialized(e = __PRIVATE_cast(e, Firestore));
18854
18854
  const t = ensureFirestoreConfigured(e);
18855
- if (t._uninitializedComponentsProvider) throw new FirestoreError(D.FAILED_PRECONDITION, "SDK cache is already specified.");
18855
+ if (t._uninitializedComponentsProvider) throw new FirestoreError(C.FAILED_PRECONDITION, "SDK cache is already specified.");
18856
18856
  __PRIVATE_logWarn("enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");
18857
18857
  const n = e._freezeSettings(), r = new OnlineComponentProvider;
18858
18858
  return __PRIVATE_setPersistenceProviders(t, r, new __PRIVATE_MultiTabOfflineComponentProvider(r, n.cacheSizeBytes));
@@ -18900,7 +18900,7 @@ function __PRIVATE_configureFirestore(e) {
18900
18900
  * @returns A `Promise` that is resolved when the persistent storage is
18901
18901
  * cleared. Otherwise, the promise is rejected with an error.
18902
18902
  */ function clearIndexedDbPersistence(e) {
18903
- if (e._initialized && !e._terminated) throw new FirestoreError(D.FAILED_PRECONDITION, "Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");
18903
+ if (e._initialized && !e._terminated) throw new FirestoreError(C.FAILED_PRECONDITION, "Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");
18904
18904
  const t = new __PRIVATE_Deferred;
18905
18905
  return e._queue.enqueueAndForgetEvenWhileRestricted((async () => {
18906
18906
  try {
@@ -19014,7 +19014,7 @@ function __PRIVATE_configureFirestore(e) {
19014
19014
  }
19015
19015
 
19016
19016
  function __PRIVATE_verifyNotInitialized(e) {
19017
- if (e._initialized || e._terminated) throw new FirestoreError(D.FAILED_PRECONDITION, "Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.");
19017
+ if (e._initialized || e._terminated) throw new FirestoreError(C.FAILED_PRECONDITION, "Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.");
19018
19018
  }
19019
19019
 
19020
19020
  /**
@@ -19123,7 +19123,7 @@ class AggregateField {
19123
19123
  try {
19124
19124
  return new Bytes(ByteString.fromBase64String(e));
19125
19125
  } catch (e) {
19126
- throw new FirestoreError(D.INVALID_ARGUMENT, "Failed to construct data from Base64 string: " + e);
19126
+ throw new FirestoreError(C.INVALID_ARGUMENT, "Failed to construct data from Base64 string: " + e);
19127
19127
  }
19128
19128
  }
19129
19129
  /**
@@ -19195,7 +19195,7 @@ class AggregateField {
19195
19195
  * @param fieldNames - A list of field names.
19196
19196
  */
19197
19197
  constructor(...e) {
19198
- for (let t = 0; t < e.length; ++t) if (0 === e[t].length) throw new FirestoreError(D.INVALID_ARGUMENT, "Invalid field name at argument $(i + 1). Field names must not be empty.");
19198
+ for (let t = 0; t < e.length; ++t) if (0 === e[t].length) throw new FirestoreError(C.INVALID_ARGUMENT, "Invalid field name at argument $(i + 1). Field names must not be empty.");
19199
19199
  this._internalPath = new FieldPath$1(e);
19200
19200
  }
19201
19201
  /**
@@ -19274,8 +19274,8 @@ class AggregateField {
19274
19274
  * @param longitude - The longitude as number between -180 and 180.
19275
19275
  */
19276
19276
  constructor(e, t) {
19277
- if (!isFinite(e) || e < -90 || e > 90) throw new FirestoreError(D.INVALID_ARGUMENT, "Latitude must be a number between -90 and 90, but was: " + e);
19278
- if (!isFinite(t) || t < -180 || t > 180) throw new FirestoreError(D.INVALID_ARGUMENT, "Longitude must be a number between -180 and 180, but was: " + t);
19277
+ if (!isFinite(e) || e < -90 || e > 90) throw new FirestoreError(C.INVALID_ARGUMENT, "Latitude must be a number between -90 and 90, but was: " + e);
19278
+ if (!isFinite(t) || t < -180 || t > 180) throw new FirestoreError(C.INVALID_ARGUMENT, "Longitude must be a number between -180 and 180, but was: " + t);
19279
19279
  this._lat = e, this._long = t;
19280
19280
  }
19281
19281
  /**
@@ -19325,7 +19325,7 @@ class AggregateField {
19325
19325
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19326
19326
  * See the License for the specific language governing permissions and
19327
19327
  * limitations under the License.
19328
- */ const we = /^__.*__$/;
19328
+ */ const Se = /^__.*__$/;
19329
19329
 
19330
19330
  /** The result of parsing document data (e.g. for a setData call). */ class ParsedSetData {
19331
19331
  constructor(e, t, n) {
@@ -19436,7 +19436,7 @@ function __PRIVATE_isWrite(e) {
19436
19436
  }
19437
19437
  pu(e) {
19438
19438
  if (0 === e.length) throw this.Su("Document fields must not be empty");
19439
- if (__PRIVATE_isWrite(this.Vu) && we.test(e)) throw this.Su('Document fields cannot begin and end with "__"');
19439
+ if (__PRIVATE_isWrite(this.Vu) && Se.test(e)) throw this.Su('Document fields cannot begin and end with "__"');
19440
19440
  }
19441
19441
  }
19442
19442
 
@@ -19473,7 +19473,7 @@ function __PRIVATE_newUserDataReader(e) {
19473
19473
  const e = [];
19474
19474
  for (const r of s.mergeFields) {
19475
19475
  const i = __PRIVATE_fieldPathFromArgument$1(t, r, n);
19476
- if (!o.contains(i)) throw new FirestoreError(D.INVALID_ARGUMENT, `Field '${i}' is specified in your field mask but missing from your input data.`);
19476
+ if (!o.contains(i)) throw new FirestoreError(C.INVALID_ARGUMENT, `Field '${i}' is specified in your field mask but missing from your input data.`);
19477
19477
  __PRIVATE_fieldMaskContains(e, i) || e.push(i);
19478
19478
  }
19479
19479
  a = new FieldMask(e), u = o.fieldTransforms.filter((e => a.covers(e.field)));
@@ -19590,7 +19590,7 @@ class __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue {
19590
19590
 
19591
19591
  /** Parse update data from a list of field/value arguments. */ function __PRIVATE_parseUpdateVarargs(e, t, n, r, i, s) {
19592
19592
  const o = e.Cu(1 /* UserDataSource.Update */ , t, n), _ = [ __PRIVATE_fieldPathFromArgument$1(t, r, n) ], a = [ i ];
19593
- if (s.length % 2 != 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);
19593
+ if (s.length % 2 != 0) throw new FirestoreError(C.INVALID_ARGUMENT, `Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);
19594
19594
  for (let e = 0; e < s.length; e += 2) _.push(__PRIVATE_fieldPathFromArgument$1(t, s[e])),
19595
19595
  a.push(s[e + 1]);
19596
19596
  const u = [], c = ObjectValue.empty();
@@ -19791,7 +19791,7 @@ function __PRIVATE_validatePlainObject(e, t, n) {
19791
19791
 
19792
19792
  /**
19793
19793
  * Matches any characters in a field path string that are reserved.
19794
- */ const Se = new RegExp("[~\\*/\\[\\]]");
19794
+ */ const be = new RegExp("[~\\*/\\[\\]]");
19795
19795
 
19796
19796
  /**
19797
19797
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -19802,7 +19802,7 @@ function __PRIVATE_validatePlainObject(e, t, n) {
19802
19802
  * @param targetDoc - The document against which the field path will be
19803
19803
  * evaluated.
19804
19804
  */ function __PRIVATE_fieldPathFromDotSeparatedString(e, t, n) {
19805
- if (t.search(Se) >= 0) throw __PRIVATE_createError(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`, e,
19805
+ if (t.search(be) >= 0) throw __PRIVATE_createError(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`, e,
19806
19806
  /* hasConverter= */ !1,
19807
19807
  /* path= */ void 0, n);
19808
19808
  try {
@@ -19820,7 +19820,7 @@ function __PRIVATE_createError(e, t, n, r, i) {
19820
19820
  n && (_ += " (via `toFirestore()`)"), _ += ". ";
19821
19821
  let a = "";
19822
19822
  return (s || o) && (a += " (found", s && (a += ` in field ${r}`), o && (a += ` in document ${i}`),
19823
- a += ")"), new FirestoreError(D.INVALID_ARGUMENT, _ + e + a);
19823
+ a += ")"), new FirestoreError(C.INVALID_ARGUMENT, _ + e + a);
19824
19824
  }
19825
19825
 
19826
19826
  /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */ function __PRIVATE_fieldMaskContains(e, t) {
@@ -19957,7 +19957,7 @@ function __PRIVATE_createError(e, t, n, r, i) {
19957
19957
  * See the License for the specific language governing permissions and
19958
19958
  * limitations under the License.
19959
19959
  */ function __PRIVATE_validateHasExplicitOrderByForLimitToLast(e) {
19960
- if ("L" /* LimitType.Last */ === e.limitType && 0 === e.explicitOrderBy.length) throw new FirestoreError(D.UNIMPLEMENTED, "limitToLast() queries require specifying at least one orderBy() clause");
19960
+ if ("L" /* LimitType.Last */ === e.limitType && 0 === e.explicitOrderBy.length) throw new FirestoreError(C.UNIMPLEMENTED, "limitToLast() queries require specifying at least one orderBy() clause");
19961
19961
  }
19962
19962
 
19963
19963
  /**
@@ -19978,7 +19978,7 @@ function query(e, t, ...n) {
19978
19978
  let r = [];
19979
19979
  t instanceof AppliableConstraint && r.push(t), r = r.concat(n), function __PRIVATE_validateQueryConstraintArray(e) {
19980
19980
  const t = e.filter((e => e instanceof QueryCompositeFilterConstraint)).length, n = e.filter((e => e instanceof QueryFieldFilterConstraint)).length;
19981
- if (t > 1 || t > 0 && n > 0) throw new FirestoreError(D.INVALID_ARGUMENT, "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(...)))`.");
19981
+ if (t > 1 || t > 0 && n > 0) throw new FirestoreError(C.INVALID_ARGUMENT, "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(...)))`.");
19982
19982
  }
19983
19983
  /**
19984
19984
  * @license
@@ -20032,7 +20032,7 @@ function query(e, t, ...n) {
20032
20032
  const t = __PRIVATE_newUserDataReader(e.firestore), n = function __PRIVATE_newQueryFilter(e, t, n, r, i, s, o) {
20033
20033
  let _;
20034
20034
  if (i.isKeyField()) {
20035
- if ("array-contains" /* Operator.ARRAY_CONTAINS */ === s || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === s) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid Query. You can't perform '${s}' queries on documentId().`);
20035
+ if ("array-contains" /* Operator.ARRAY_CONTAINS */ === s || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === s) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid Query. You can't perform '${s}' queries on documentId().`);
20036
20036
  if ("in" /* Operator.IN */ === s || "not-in" /* Operator.NOT_IN */ === s) {
20037
20037
  __PRIVATE_validateDisjunctiveFilterElements(o, s);
20038
20038
  const t = [];
@@ -20159,8 +20159,8 @@ function query(e, t, ...n) {
20159
20159
  }
20160
20160
  _apply(e) {
20161
20161
  const t = function __PRIVATE_newQueryOrderBy(e, t, n) {
20162
- if (null !== e.startAt) throw new FirestoreError(D.INVALID_ARGUMENT, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
20163
- if (null !== e.endAt) throw new FirestoreError(D.INVALID_ARGUMENT, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
20162
+ if (null !== e.startAt) throw new FirestoreError(C.INVALID_ARGUMENT, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
20163
+ if (null !== e.endAt) throw new FirestoreError(C.INVALID_ARGUMENT, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
20164
20164
  return new OrderBy(t, n);
20165
20165
  }
20166
20166
  /**
@@ -20318,7 +20318,7 @@ function endAt(...e) {
20318
20318
 
20319
20319
  /** Helper function to create a bound from a document or fields */ function __PRIVATE_newQueryBoundFromDocOrFields(e, t, n, r) {
20320
20320
  if (n[0] = util.getModularInstance(n[0]), n[0] instanceof DocumentSnapshot$1) return function __PRIVATE_newQueryBoundFromDocument(e, t, n, r, i) {
20321
- if (!r) throw new FirestoreError(D.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${n}().`);
20321
+ if (!r) throw new FirestoreError(C.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${n}().`);
20322
20322
  const s = [];
20323
20323
  // Because people expect to continue/end a query at the exact document
20324
20324
  // provided, we need to use the implicit sort order rather than the explicit
@@ -20329,10 +20329,10 @@ function endAt(...e) {
20329
20329
  // results.
20330
20330
  for (const n of __PRIVATE_queryNormalizedOrderBy(e)) if (n.field.isKeyField()) s.push(__PRIVATE_refValue(t, r.key)); else {
20331
20331
  const e = r.data.field(n.field);
20332
- if (__PRIVATE_isServerTimestamp(e)) throw new FirestoreError(D.INVALID_ARGUMENT, '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.)');
20332
+ if (__PRIVATE_isServerTimestamp(e)) throw new FirestoreError(C.INVALID_ARGUMENT, '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.)');
20333
20333
  if (null === e) {
20334
20334
  const e = n.field.canonicalString();
20335
- throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. You are trying to start or end a query using a document for which the field '${e}' (used as the orderBy) does not exist.`);
20335
+ throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. You are trying to start or end a query using a document for which the field '${e}' (used as the orderBy) does not exist.`);
20336
20336
  }
20337
20337
  s.push(e);
20338
20338
  }
@@ -20346,15 +20346,15 @@ function endAt(...e) {
20346
20346
  return function __PRIVATE_newQueryBoundFromFields(e, t, n, r, i, s) {
20347
20347
  // Use explicit order by's because it has to match the query the user made
20348
20348
  const o = e.explicitOrderBy;
20349
- if (i.length > o.length) throw new FirestoreError(D.INVALID_ARGUMENT, `Too many arguments provided to ${r}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);
20349
+ if (i.length > o.length) throw new FirestoreError(C.INVALID_ARGUMENT, `Too many arguments provided to ${r}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);
20350
20350
  const _ = [];
20351
20351
  for (let s = 0; s < i.length; s++) {
20352
20352
  const a = i[s];
20353
20353
  if (o[s].field.isKeyField()) {
20354
- if ("string" != typeof a) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof a}`);
20355
- if (!__PRIVATE_isCollectionGroupQuery(e) && -1 !== a.indexOf("/")) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${a}' contains a slash.`);
20354
+ if ("string" != typeof a) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof a}`);
20355
+ if (!__PRIVATE_isCollectionGroupQuery(e) && -1 !== a.indexOf("/")) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${a}' contains a slash.`);
20356
20356
  const n = e.path.child(ResourcePath.fromString(a));
20357
- if (!DocumentKey.isDocumentKey(n)) throw new FirestoreError(D.INVALID_ARGUMENT, `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.`);
20357
+ if (!DocumentKey.isDocumentKey(n)) throw new FirestoreError(C.INVALID_ARGUMENT, `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.`);
20358
20358
  const i = new DocumentKey(n);
20359
20359
  _.push(__PRIVATE_refValue(t, i));
20360
20360
  } else {
@@ -20374,21 +20374,21 @@ function endAt(...e) {
20374
20374
 
20375
20375
  function __PRIVATE_parseDocumentIdValue(e, t, n) {
20376
20376
  if ("string" == typeof (n = util.getModularInstance(n))) {
20377
- if ("" === n) throw new FirestoreError(D.INVALID_ARGUMENT, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
20378
- if (!__PRIVATE_isCollectionGroupQuery(t) && -1 !== n.indexOf("/")) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);
20377
+ if ("" === n) throw new FirestoreError(C.INVALID_ARGUMENT, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
20378
+ if (!__PRIVATE_isCollectionGroupQuery(t) && -1 !== n.indexOf("/")) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);
20379
20379
  const r = t.path.child(ResourcePath.fromString(n));
20380
- if (!DocumentKey.isDocumentKey(r)) throw new FirestoreError(D.INVALID_ARGUMENT, `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}).`);
20380
+ if (!DocumentKey.isDocumentKey(r)) throw new FirestoreError(C.INVALID_ARGUMENT, `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}).`);
20381
20381
  return __PRIVATE_refValue(e, new DocumentKey(r));
20382
20382
  }
20383
20383
  if (n instanceof DocumentReference) return __PRIVATE_refValue(e, n._key);
20384
- throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${__PRIVATE_valueDescription(n)}.`);
20384
+ throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${__PRIVATE_valueDescription(n)}.`);
20385
20385
  }
20386
20386
 
20387
20387
  /**
20388
20388
  * Validates that the value passed into a disjunctive filter satisfies all
20389
20389
  * array requirements.
20390
20390
  */ function __PRIVATE_validateDisjunctiveFilterElements(e, t) {
20391
- if (!Array.isArray(e) || 0 === e.length) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);
20391
+ if (!Array.isArray(e) || 0 === e.length) throw new FirestoreError(C.INVALID_ARGUMENT, `Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);
20392
20392
  }
20393
20393
 
20394
20394
  /**
@@ -20422,11 +20422,11 @@ function __PRIVATE_parseDocumentIdValue(e, t, n) {
20422
20422
  }(t.op));
20423
20423
  if (null !== n)
20424
20424
  // Special case when it's a duplicate op to give a slightly clearer error message.
20425
- throw n === t.op ? new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${t.op.toString()}' filter.`) : new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`);
20425
+ throw n === t.op ? new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${t.op.toString()}' filter.`) : new FirestoreError(C.INVALID_ARGUMENT, `Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`);
20426
20426
  }
20427
20427
 
20428
20428
  function __PRIVATE_validateQueryFilterConstraint(e, t) {
20429
- if (!(t instanceof QueryFieldFilterConstraint || t instanceof QueryCompositeFilterConstraint)) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${e}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);
20429
+ if (!(t instanceof QueryFieldFilterConstraint || t instanceof QueryCompositeFilterConstraint)) throw new FirestoreError(C.INVALID_ARGUMENT, `Function ${e}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);
20430
20430
  }
20431
20431
 
20432
20432
  class AbstractUserDataWriter {
@@ -20798,7 +20798,7 @@ class __PRIVATE_LiteUserDataWriter extends AbstractUserDataWriter {
20798
20798
  * snapshot events.
20799
20799
  */ docChanges(e = {}) {
20800
20800
  const t = !!e.includeMetadataChanges;
20801
- if (t && this._snapshot.excludesMetadataChanges) throw new FirestoreError(D.INVALID_ARGUMENT, "To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");
20801
+ if (t && this._snapshot.excludesMetadataChanges) throw new FirestoreError(C.INVALID_ARGUMENT, "To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");
20802
20802
  return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === t || (this._cachedChanges =
20803
20803
  /** Calculates the array of `DocumentChange`s for a given `ViewSnapshot`. */
20804
20804
  function __PRIVATE_changesFromSnapshot(e, t) {
@@ -21356,7 +21356,7 @@ class __PRIVATE_MultiTabManagerImpl {
21356
21356
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21357
21357
  * See the License for the specific language governing permissions and
21358
21358
  * limitations under the License.
21359
- */ const be = {
21359
+ */ const De = {
21360
21360
  maxAttempts: 5
21361
21361
  };
21362
21362
 
@@ -21430,12 +21430,12 @@ class WriteBatch {
21430
21430
  return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();
21431
21431
  }
21432
21432
  _verifyNotCommitted() {
21433
- if (this._committed) throw new FirestoreError(D.FAILED_PRECONDITION, "A write batch can no longer be used after commit() has been called.");
21433
+ if (this._committed) throw new FirestoreError(C.FAILED_PRECONDITION, "A write batch can no longer be used after commit() has been called.");
21434
21434
  }
21435
21435
  }
21436
21436
 
21437
21437
  function __PRIVATE_validateReference(e, t) {
21438
- if ((e = util.getModularInstance(e)).firestore !== t) throw new FirestoreError(D.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
21438
+ if ((e = util.getModularInstance(e)).firestore !== t) throw new FirestoreError(C.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
21439
21439
  return e;
21440
21440
  }
21441
21441
 
@@ -21568,9 +21568,9 @@ class Transaction extends class Transaction$1 {
21568
21568
  * rejected promise with the corresponding failure error is returned.
21569
21569
  */ function runTransaction(e, t, n) {
21570
21570
  e = __PRIVATE_cast(e, Firestore);
21571
- const r = Object.assign(Object.assign({}, be), n);
21571
+ const r = Object.assign(Object.assign({}, De), n);
21572
21572
  !function __PRIVATE_validateTransactionOptions(e) {
21573
- if (e.maxAttempts < 1) throw new FirestoreError(D.INVALID_ARGUMENT, "Max attempts must be at least 1");
21573
+ if (e.maxAttempts < 1) throw new FirestoreError(C.INVALID_ARGUMENT, "Max attempts must be at least 1");
21574
21574
  }(r);
21575
21575
  return function __PRIVATE_firestoreClientTransaction(e, t, n) {
21576
21576
  const r = new __PRIVATE_Deferred;
@@ -21724,7 +21724,7 @@ class Transaction extends class Transaction$1 {
21724
21724
  try {
21725
21725
  return JSON.parse(e);
21726
21726
  } catch (e) {
21727
- throw new FirestoreError(D.INVALID_ARGUMENT, "Failed to parse JSON: " + (null == e ? void 0 : e.message));
21727
+ throw new FirestoreError(C.INVALID_ARGUMENT, "Failed to parse JSON: " + (null == e ? void 0 : e.message));
21728
21728
  }
21729
21729
  }(e) : e, n = [];
21730
21730
  if (Array.isArray(t.indexes)) for (const e of t.indexes) {
@@ -21741,7 +21741,7 @@ class Transaction extends class Transaction$1 {
21741
21741
  }
21742
21742
 
21743
21743
  function __PRIVATE_tryGetString(e, t) {
21744
- if ("string" != typeof e[t]) throw new FirestoreError(D.INVALID_ARGUMENT, "Missing string value for: " + t);
21744
+ if ("string" != typeof e[t]) throw new FirestoreError(C.INVALID_ARGUMENT, "Missing string value for: " + t);
21745
21745
  return e[t];
21746
21746
  }
21747
21747
 
@@ -21784,12 +21784,12 @@ function __PRIVATE_tryGetString(e, t) {
21784
21784
  */ function getPersistentCacheIndexManager(e) {
21785
21785
  var t;
21786
21786
  e = __PRIVATE_cast(e, Firestore);
21787
- const n = De.get(e);
21787
+ const n = Ce.get(e);
21788
21788
  if (n) return n;
21789
21789
  const r = ensureFirestoreConfigured(e);
21790
21790
  if ("persistent" !== (null === (t = r._uninitializedComponentsProvider) || void 0 === t ? void 0 : t._offlineKind)) return null;
21791
21791
  const i = new PersistentCacheIndexManager(r);
21792
- return De.set(e, i), i;
21792
+ return Ce.set(e, i), i;
21793
21793
  }
21794
21794
 
21795
21795
  /**
@@ -21832,7 +21832,7 @@ function __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {
21832
21832
  * Use a `WeakMap` so that the mapping will be automatically dropped when the
21833
21833
  * `Firestore` instance is garbage collected. This emulates a private member
21834
21834
  * as described in https://goo.gle/454yvug.
21835
- */ const De = new WeakMap;
21835
+ */ const Ce = new WeakMap;
21836
21836
 
21837
21837
  /**
21838
21838
  * @license
@@ -21885,10 +21885,10 @@ function __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {
21885
21885
  this.Mu = new Map;
21886
21886
  }
21887
21887
  static get instance() {
21888
- return Ce || (Ce = new __PRIVATE_TestingHooksSpiImpl, function __PRIVATE_setTestingHooksSpi(e) {
21889
- if (le) throw new Error("a TestingHooksSpi instance is already set");
21890
- le = e;
21891
- }(Ce)), Ce;
21888
+ return ve || (ve = new __PRIVATE_TestingHooksSpiImpl, function __PRIVATE_setTestingHooksSpi(e) {
21889
+ if (he) throw new Error("a TestingHooksSpi instance is already set");
21890
+ he = e;
21891
+ }(ve)), ve;
21892
21892
  }
21893
21893
  tt(e) {
21894
21894
  this.Mu.forEach((t => t(e)));
@@ -21899,7 +21899,7 @@ function __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {
21899
21899
  }
21900
21900
  }
21901
21901
 
21902
- let Ce = null;
21902
+ let ve = null;
21903
21903
 
21904
21904
  /**
21905
21905
  * Cloud Firestore
@@ -21907,25 +21907,25 @@ let Ce = null;
21907
21907
  * @packageDocumentation
21908
21908
  */ !function __PRIVATE_registerFirestore(e, t = !0) {
21909
21909
  !function __PRIVATE_setSDKVersion(e) {
21910
- S = e;
21910
+ b = e;
21911
21911
  }(app.SDK_VERSION), app._registerComponent(new component.Component("firestore", ((e, {instanceIdentifier: n, options: r}) => {
21912
21912
  const i = e.getProvider("app").getImmediate(), s = new Firestore(new __PRIVATE_FirebaseAuthCredentialsProvider(e.getProvider("auth-internal")), new __PRIVATE_FirebaseAppCheckTokenProvider(e.getProvider("app-check-internal")), function __PRIVATE_databaseIdFromApp(e, t) {
21913
- if (!Object.prototype.hasOwnProperty.apply(e.options, [ "projectId" ])) throw new FirestoreError(D.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
21913
+ if (!Object.prototype.hasOwnProperty.apply(e.options, [ "projectId" ])) throw new FirestoreError(C.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
21914
21914
  return new DatabaseId(e.options.projectId, t);
21915
21915
  }(i, n), i);
21916
21916
  return r = Object.assign({
21917
21917
  useFetchStreams: t
21918
21918
  }, r), s._setSettings(r), s;
21919
- }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.6.0-canary.ef3039ba8", e),
21919
+ }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, S, e),
21920
21920
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21921
- app.registerVersion(w, "4.6.0-canary.ef3039ba8", "cjs2017");
21921
+ app.registerVersion(w, S, "cjs2017");
21922
21922
  }();
21923
21923
 
21924
21924
  exports.AbstractUserDataWriter = AbstractUserDataWriter;
21925
21925
  exports.AggregateField = AggregateField;
21926
21926
  exports.AggregateQuerySnapshot = AggregateQuerySnapshot;
21927
21927
  exports.Bytes = Bytes;
21928
- exports.CACHE_SIZE_UNLIMITED = ye;
21928
+ exports.CACHE_SIZE_UNLIMITED = we;
21929
21929
  exports.CollectionReference = CollectionReference;
21930
21930
  exports.DocumentReference = DocumentReference;
21931
21931
  exports.DocumentSnapshot = DocumentSnapshot;