@firebase/firestore 4.7.3-canary.1ca18c459 → 4.7.3-canary.aa6db78eb

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.
@@ -67,7 +67,7 @@ User.MOCK_USER = new User("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- let S = "10.14.0-canary.1ca18c459";
70
+ let b = "10.14.0-canary.aa6db78eb";
71
71
 
72
72
  /**
73
73
  * @license
@@ -85,11 +85,11 @@ let S = "10.14.0-canary.1ca18c459";
85
85
  * See the License for the specific language governing permissions and
86
86
  * limitations under the License.
87
87
  */
88
- const b = new Logger("@firebase/firestore");
88
+ const S = new Logger("@firebase/firestore");
89
89
 
90
90
  // Helper methods are needed because variables can't be exported as read/write
91
91
  function __PRIVATE_getLogLevel() {
92
- return b.logLevel;
92
+ return S.logLevel;
93
93
  }
94
94
 
95
95
  /**
@@ -105,29 +105,29 @@ function __PRIVATE_getLogLevel() {
105
105
  * <li><code>`silent` to turn off logging.</li>
106
106
  * </ul>
107
107
  */ function setLogLevel(e) {
108
- b.setLogLevel(e);
108
+ S.setLogLevel(e);
109
109
  }
110
110
 
111
111
  function __PRIVATE_logDebug(e, ...t) {
112
- if (b.logLevel <= LogLevel.DEBUG) {
112
+ if (S.logLevel <= LogLevel.DEBUG) {
113
113
  const n = t.map(__PRIVATE_argToString);
114
- b.debug(`Firestore (${S}): ${e}`, ...n);
114
+ S.debug(`Firestore (${b}): ${e}`, ...n);
115
115
  }
116
116
  }
117
117
 
118
118
  function __PRIVATE_logError(e, ...t) {
119
- if (b.logLevel <= LogLevel.ERROR) {
119
+ if (S.logLevel <= LogLevel.ERROR) {
120
120
  const n = t.map(__PRIVATE_argToString);
121
- b.error(`Firestore (${S}): ${e}`, ...n);
121
+ S.error(`Firestore (${b}): ${e}`, ...n);
122
122
  }
123
123
  }
124
124
 
125
125
  /**
126
126
  * @internal
127
127
  */ function __PRIVATE_logWarn(e, ...t) {
128
- if (b.logLevel <= LogLevel.WARN) {
128
+ if (S.logLevel <= LogLevel.WARN) {
129
129
  const n = t.map(__PRIVATE_argToString);
130
- b.warn(`Firestore (${S}): ${e}`, ...n);
130
+ S.warn(`Firestore (${b}): ${e}`, ...n);
131
131
  }
132
132
  }
133
133
 
@@ -188,7 +188,7 @@ function __PRIVATE_logError(e, ...t) {
188
188
  */ function fail(e = "Unexpected state") {
189
189
  // Log the failure in addition to throw an exception, just in case the
190
190
  // exception is swallowed.
191
- const t = `FIRESTORE (${S}) INTERNAL ASSERTION FAILED: ` + e;
191
+ const t = `FIRESTORE (${b}) INTERNAL ASSERTION FAILED: ` + e;
192
192
  // NOTE: We don't use FirestoreError here because these are internal failures
193
193
  // that cannot be handled by the user. (Also it would create a circular
194
194
  // dependency between the error and assert modules which doesn't work.)
@@ -6147,10 +6147,10 @@ class __PRIVATE_WatchTargetChange {
6147
6147
  /** The last resume token sent to us for this target. */ get resumeToken() {
6148
6148
  return this.pe;
6149
6149
  }
6150
- /** Whether this target has pending target adds or target removes. */ get Se() {
6150
+ /** Whether this target has pending target adds or target removes. */ get be() {
6151
6151
  return 0 !== this.fe;
6152
6152
  }
6153
- /** Whether we have modified any state that should trigger a snapshot. */ get be() {
6153
+ /** Whether we have modified any state that should trigger a snapshot. */ get Se() {
6154
6154
  return this.we;
6155
6155
  }
6156
6156
  /**
@@ -6243,7 +6243,7 @@ class __PRIVATE_WatchChangeAggregator {
6243
6243
  case 1 /* WatchTargetChangeState.Added */ :
6244
6244
  // We need to decrement the number of pending acks needed from watch
6245
6245
  // for this targetId.
6246
- n.Oe(), n.Se ||
6246
+ n.Oe(), n.be ||
6247
6247
  // We have a freshly added target, so we need to reset any state
6248
6248
  // that we had previously. This can happen e.g. when remove and add
6249
6249
  // back a target for existence filter mismatches.
@@ -6255,7 +6255,7 @@ class __PRIVATE_WatchChangeAggregator {
6255
6255
  // remove any target changes.
6256
6256
  // We need to decrement the number of pending acks needed from watch
6257
6257
  // for this targetId.
6258
- n.Oe(), n.Se || this.removeTarget(t);
6258
+ n.Oe(), n.be || this.removeTarget(t);
6259
6259
  break;
6260
6260
 
6261
6261
  case 3 /* WatchTargetChangeState.Current */ :
@@ -6416,7 +6416,7 @@ class __PRIVATE_WatchChangeAggregator {
6416
6416
  const t = new DocumentKey(i.target.path);
6417
6417
  null !== this.ke.get(t) || this.it(r, t) || this.Ue(r, t, MutableDocument.newNoDocument(t, e));
6418
6418
  }
6419
- n.be && (t.set(r, n.ve()), n.Ce());
6419
+ n.Se && (t.set(r, n.ve()), n.Ce());
6420
6420
  }
6421
6421
  }));
6422
6422
  let n = __PRIVATE_documentKeySet();
@@ -6503,7 +6503,7 @@ class __PRIVATE_WatchChangeAggregator {
6503
6503
  * is still interested in that has no outstanding target change requests).
6504
6504
  */ Je(e) {
6505
6505
  const t = this.Be.get(e);
6506
- return t && t.Se ? null : this.Le.ot(e);
6506
+ return t && t.be ? null : this.Le.ot(e);
6507
6507
  }
6508
6508
  /**
6509
6509
  * Resets the state of a Watch target to its initial state (e.g. sets
@@ -7729,8 +7729,8 @@ class __PRIVATE_FirestoreIndexValueWriter {
7729
7729
  t.gt(__PRIVATE_normalizeByteString(e.bytesValue)), this.ft(t); else if ("referenceValue" in e) this.yt(e.referenceValue, t); else if ("geoPointValue" in e) {
7730
7730
  const n = e.geoPointValue;
7731
7731
  this.dt(t, 45), t.At(n.latitude || 0), t.At(n.longitude || 0);
7732
- } else "mapValue" in e ? __PRIVATE_isMaxValue(e) ? this.dt(t, Number.MAX_SAFE_INTEGER) : __PRIVATE_isVectorValue(e) ? this.wt(e.mapValue, t) : (this.St(e.mapValue, t),
7733
- this.ft(t)) : "arrayValue" in e ? (this.bt(e.arrayValue, t), this.ft(t)) : fail();
7732
+ } else "mapValue" in e ? __PRIVATE_isMaxValue(e) ? this.dt(t, Number.MAX_SAFE_INTEGER) : __PRIVATE_isVectorValue(e) ? this.wt(e.mapValue, t) : (this.bt(e.mapValue, t),
7733
+ this.ft(t)) : "arrayValue" in e ? (this.St(e.arrayValue, t), this.ft(t)) : fail();
7734
7734
  }
7735
7735
  Vt(e, t) {
7736
7736
  this.dt(t, 25), this.Dt(e, t);
@@ -7738,7 +7738,7 @@ class __PRIVATE_FirestoreIndexValueWriter {
7738
7738
  Dt(e, t) {
7739
7739
  t.Rt(e);
7740
7740
  }
7741
- St(e, t) {
7741
+ bt(e, t) {
7742
7742
  const n = e.fields || {};
7743
7743
  this.dt(t, 55);
7744
7744
  for (const e of Object.keys(n)) this.Vt(e, t), this.Tt(n[e], t);
@@ -7753,7 +7753,7 @@ class __PRIVATE_FirestoreIndexValueWriter {
7753
7753
  // Vectors then sort by position value
7754
7754
  this.Vt(s, t), this.Tt(i[s], t);
7755
7755
  }
7756
- bt(e, t) {
7756
+ St(e, t) {
7757
7757
  const n = e.values || [];
7758
7758
  this.dt(t, 50);
7759
7759
  for (const e of n) this.Tt(e, t);
@@ -8871,8 +8871,8 @@ class __PRIVATE_IndexedDbIndexManager {
8871
8871
  const i = n.get(t.collectionGroup);
8872
8872
  return (i ? PersistencePromise.resolve(i) : this.getFieldIndexes(e, t.collectionGroup)).next((i => (n.set(t.collectionGroup, i),
8873
8873
  PersistencePromise.forEach(i, (n => this.wn(e, t, n).next((t => {
8874
- const i = this.Sn(r, n);
8875
- return t.isEqual(i) ? PersistencePromise.resolve() : this.bn(e, r, n, t, i);
8874
+ const i = this.bn(r, n);
8875
+ return t.isEqual(i) ? PersistencePromise.resolve() : this.Sn(e, r, n, t, i);
8876
8876
  })))))));
8877
8877
  }));
8878
8878
  }
@@ -8899,7 +8899,7 @@ class __PRIVATE_IndexedDbIndexManager {
8899
8899
  i = i.add(new __PRIVATE_IndexEntry(n.indexId, t, r.arrayValue, r.directionalValue));
8900
8900
  })).next((() => i));
8901
8901
  }
8902
- /** Creates the index entries for the given document. */ Sn(e, t) {
8902
+ /** Creates the index entries for the given document. */ bn(e, t) {
8903
8903
  let n = new SortedSet(__PRIVATE_indexEntryComparator);
8904
8904
  const r = this.Vn(t, e);
8905
8905
  if (null == r) return n;
@@ -8914,7 +8914,7 @@ class __PRIVATE_IndexedDbIndexManager {
8914
8914
  * Updates the index entries for the provided document by deleting entries
8915
8915
  * that are no longer referenced in `newEntries` and adding all newly added
8916
8916
  * entries.
8917
- */ bn(e, t, n, r, i) {
8917
+ */ Sn(e, t, n, r, i) {
8918
8918
  __PRIVATE_logDebug("IndexedDbIndexManager", "Updating index entries for document '%s'", t.key);
8919
8919
  const s = [];
8920
8920
  return function __PRIVATE_diffSortedSets(e, t, n, r, i) {
@@ -10939,20 +10939,20 @@ class __PRIVATE_DocReference {
10939
10939
  */
10940
10940
  this.mutationQueue = [],
10941
10941
  /** Next value to use when assigning sequential IDs to each mutation batch. */
10942
- this.Sr = 1,
10942
+ this.br = 1,
10943
10943
  /** An ordered mapping between documents and the mutations batch IDs. */
10944
- this.br = new SortedSet(__PRIVATE_DocReference.Er);
10944
+ this.Sr = new SortedSet(__PRIVATE_DocReference.Er);
10945
10945
  }
10946
10946
  checkEmpty(e) {
10947
10947
  return PersistencePromise.resolve(0 === this.mutationQueue.length);
10948
10948
  }
10949
10949
  addMutationBatch(e, t, n, r) {
10950
- const i = this.Sr;
10951
- this.Sr++, this.mutationQueue.length > 0 && this.mutationQueue[this.mutationQueue.length - 1];
10950
+ const i = this.br;
10951
+ this.br++, this.mutationQueue.length > 0 && this.mutationQueue[this.mutationQueue.length - 1];
10952
10952
  const s = new MutationBatch(i, t, n, r);
10953
10953
  this.mutationQueue.push(s);
10954
10954
  // Track references by document key and index collection parents.
10955
- for (const t of r) this.br = this.br.add(new __PRIVATE_DocReference(t.key, i)),
10955
+ for (const t of r) this.Sr = this.Sr.add(new __PRIVATE_DocReference(t.key, i)),
10956
10956
  this.indexManager.addToCollectionParentIndex(e, t.key.path.popLast());
10957
10957
  return PersistencePromise.resolve(s);
10958
10958
  }
@@ -10966,14 +10966,14 @@ class __PRIVATE_DocReference {
10966
10966
  return PersistencePromise.resolve(this.mutationQueue.length > i ? this.mutationQueue[i] : null);
10967
10967
  }
10968
10968
  getHighestUnacknowledgedBatchId() {
10969
- return PersistencePromise.resolve(0 === this.mutationQueue.length ? -1 : this.Sr - 1);
10969
+ return PersistencePromise.resolve(0 === this.mutationQueue.length ? -1 : this.br - 1);
10970
10970
  }
10971
10971
  getAllMutationBatches(e) {
10972
10972
  return PersistencePromise.resolve(this.mutationQueue.slice());
10973
10973
  }
10974
10974
  getAllMutationBatchesAffectingDocumentKey(e, t) {
10975
10975
  const n = new __PRIVATE_DocReference(t, 0), r = new __PRIVATE_DocReference(t, Number.POSITIVE_INFINITY), i = [];
10976
- return this.br.forEachInRange([ n, r ], (e => {
10976
+ return this.Sr.forEachInRange([ n, r ], (e => {
10977
10977
  const t = this.Dr(e.wr);
10978
10978
  i.push(t);
10979
10979
  })), PersistencePromise.resolve(i);
@@ -10982,7 +10982,7 @@ class __PRIVATE_DocReference {
10982
10982
  let n = new SortedSet(__PRIVATE_primitiveComparator);
10983
10983
  return t.forEach((e => {
10984
10984
  const t = new __PRIVATE_DocReference(e, 0), r = new __PRIVATE_DocReference(e, Number.POSITIVE_INFINITY);
10985
- this.br.forEachInRange([ t, r ], (e => {
10985
+ this.Sr.forEachInRange([ t, r ], (e => {
10986
10986
  n = n.add(e.wr);
10987
10987
  }));
10988
10988
  })), PersistencePromise.resolve(this.Cr(n));
@@ -11001,7 +11001,7 @@ class __PRIVATE_DocReference {
11001
11001
  // Find unique batchIDs referenced by all documents potentially matching the
11002
11002
  // query.
11003
11003
  let o = new SortedSet(__PRIVATE_primitiveComparator);
11004
- return this.br.forEachWhile((e => {
11004
+ return this.Sr.forEachWhile((e => {
11005
11005
  const t = e.key.path;
11006
11006
  return !!n.isPrefixOf(t) && (
11007
11007
  // Rows with document keys more than one segment longer than the query
@@ -11023,19 +11023,19 @@ class __PRIVATE_DocReference {
11023
11023
  }
11024
11024
  removeMutationBatch(e, t) {
11025
11025
  __PRIVATE_hardAssert(0 === this.Fr(t.batchId, "removed")), this.mutationQueue.shift();
11026
- let n = this.br;
11026
+ let n = this.Sr;
11027
11027
  return PersistencePromise.forEach(t.mutations, (r => {
11028
11028
  const i = new __PRIVATE_DocReference(r.key, t.batchId);
11029
11029
  return n = n.delete(i), this.referenceDelegate.markPotentiallyOrphaned(e, r.key);
11030
11030
  })).next((() => {
11031
- this.br = n;
11031
+ this.Sr = n;
11032
11032
  }));
11033
11033
  }
11034
11034
  On(e) {
11035
11035
  // No-op since the memory mutation queue does not maintain a separate cache.
11036
11036
  }
11037
11037
  containsKey(e, t) {
11038
- const n = new __PRIVATE_DocReference(t, 0), r = this.br.firstAfterOrEqual(n);
11038
+ const n = new __PRIVATE_DocReference(t, 0), r = this.Sr.firstAfterOrEqual(n);
11039
11039
  return PersistencePromise.resolve(t.isEqual(r && r.key));
11040
11040
  }
11041
11041
  performConsistencyCheck(e) {
@@ -11997,7 +11997,7 @@ class __PRIVATE_IndexedDbPersistence {
11997
11997
  if (this.isPrimary) return this.wi(e).next((e => {
11998
11998
  e || (this.isPrimary = !1, this.ui.enqueueRetryable((() => this.di(!1))));
11999
11999
  }));
12000
- })).next((() => this.Si(e))).next((t => this.isPrimary && !t ? this.bi(e).next((() => !1)) : !!t && this.Di(e).next((() => !0)))))).catch((e => {
12000
+ })).next((() => this.bi(e))).next((t => this.isPrimary && !t ? this.Si(e).next((() => !1)) : !!t && this.Di(e).next((() => !0)))))).catch((e => {
12001
12001
  if (__PRIVATE_isIndexedDbTransactionError(e))
12002
12002
  // Proceed with the existing state. Any subsequent access to
12003
12003
  // IndexedDB will verify the lease.
@@ -12054,7 +12054,7 @@ class __PRIVATE_IndexedDbPersistence {
12054
12054
  * the client is eligible for the lease, but does not actually acquire it.
12055
12055
  * May return 'false' even if there is no active leaseholder and another
12056
12056
  * (foreground) client should become leaseholder instead.
12057
- */ Si(e) {
12057
+ */ bi(e) {
12058
12058
  if (this.li) return PersistencePromise.resolve(!0);
12059
12059
  return __PRIVATE_primaryClientStore(e).get("owner").next((t => {
12060
12060
  // A client is eligible for the primary lease if:
@@ -12104,7 +12104,7 @@ class __PRIVATE_IndexedDbPersistence {
12104
12104
  // has obtained the primary lease.
12105
12105
  await this.Ri.runTransaction("shutdown", "readwrite", [ "owner", "clientMetadata" ], (e => {
12106
12106
  const t = new __PRIVATE_IndexedDbTransaction(e, __PRIVATE_ListenSequence.oe);
12107
- return this.bi(t).next((() => this.Ci(t)));
12107
+ return this.Si(t).next((() => this.Ci(t)));
12108
12108
  })), this.Ri.close(),
12109
12109
  // Remove the entry marking the client as zombied from LocalStorage since
12110
12110
  // we successfully deleted its metadata from IndexedDb.
@@ -12160,7 +12160,7 @@ class __PRIVATE_IndexedDbPersistence {
12160
12160
  // Do all transactions as readwrite against all object stores, since we
12161
12161
  // are the only reader/writer.
12162
12162
  return this.Ri.runTransaction(e, r, i, (r => (s = new __PRIVATE_IndexedDbTransaction(r, this.Qr ? this.Qr.next() : __PRIVATE_ListenSequence.oe),
12163
- "readwrite-primary" === t ? this.wi(s).next((e => !!e || this.Si(s))).next((t => {
12163
+ "readwrite-primary" === t ? this.wi(s).next((e => !!e || this.bi(s))).next((t => {
12164
12164
  if (!t) throw __PRIVATE_logError(`Failed to obtain primary lease for action '${e}'.`),
12165
12165
  this.isPrimary = !1, this.ui.enqueueRetryable((() => this.di(!1))), new FirestoreError(D.FAILED_PRECONDITION, C);
12166
12166
  return n(s);
@@ -12192,7 +12192,7 @@ class __PRIVATE_IndexedDbPersistence {
12192
12192
  static D() {
12193
12193
  return __PRIVATE_SimpleDb.D();
12194
12194
  }
12195
- /** Checks the primary lease and removes it if we are the current primary. */ bi(e) {
12195
+ /** Checks the primary lease and removes it if we are the current primary. */ Si(e) {
12196
12196
  const t = __PRIVATE_primaryClientStore(e);
12197
12197
  return t.get("owner").next((e => this.vi(e) ? (__PRIVATE_logDebug("IndexedDbPersistence", "Releasing primary lease."),
12198
12198
  t.delete("owner")) : PersistencePromise.resolve()));
@@ -13216,12 +13216,12 @@ class __PRIVATE_LocalClientState {
13216
13216
  constructor(e, t, n, r, i) {
13217
13217
  this.window = e, this.ui = t, this.persistenceKey = n, this.ps = r, this.syncEngine = null,
13218
13218
  this.onlineStateHandler = null, this.sequenceNumberHandler = null, this.ys = this.ws.bind(this),
13219
- this.Ss = new SortedMap(__PRIVATE_primitiveComparator), this.started = !1,
13219
+ this.bs = new SortedMap(__PRIVATE_primitiveComparator), this.started = !1,
13220
13220
  /**
13221
13221
  * Captures WebStorage events that occur before `start()` is called. These
13222
13222
  * events are replayed once `WebStorageSharedClientState` is started.
13223
13223
  */
13224
- this.bs = [];
13224
+ this.Ss = [];
13225
13225
  // Escape the special characters mentioned here:
13226
13226
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
13227
13227
  const s = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -13246,7 +13246,7 @@ class __PRIVATE_LocalClientState {
13246
13246
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13247
13247
  * See the License for the specific language governing permissions and
13248
13248
  * limitations under the License.
13249
- */ (this.persistenceKey), this.Ss = this.Ss.insert(this.ps, new __PRIVATE_LocalClientState),
13249
+ */ (this.persistenceKey), this.bs = this.bs.insert(this.ps, new __PRIVATE_LocalClientState),
13250
13250
  this.Cs = new RegExp(`^firestore_clients_${s}_([^_]*)$`), this.Fs = new RegExp(`^firestore_mutations_${s}_(\\d+)(?:_(.*))?$`),
13251
13251
  this.Ms = new RegExp(`^firestore_targets_${s}_(\\d+)$`), this.xs =
13252
13252
  /** Assembles the key for the online state of the primary tab. */
@@ -13284,7 +13284,7 @@ class __PRIVATE_LocalClientState {
13284
13284
  const e = this.getItem(createWebStorageClientStateKey(this.persistenceKey, t));
13285
13285
  if (e) {
13286
13286
  const n = __PRIVATE_RemoteClientState.Rs(t, e);
13287
- n && (this.Ss = this.Ss.insert(n.clientId, n));
13287
+ n && (this.bs = this.bs.insert(n.clientId, n));
13288
13288
  }
13289
13289
  }
13290
13290
  this.Ns();
@@ -13295,8 +13295,8 @@ class __PRIVATE_LocalClientState {
13295
13295
  const e = this.Ls(t);
13296
13296
  e && this.Bs(e);
13297
13297
  }
13298
- for (const e of this.bs) this.ws(e);
13299
- this.bs = [],
13298
+ for (const e of this.Ss) this.ws(e);
13299
+ this.Ss = [],
13300
13300
  // Register a window unload hook to remove the client metadata entry from
13301
13301
  // WebStorage even if `shutdown()` was not called.
13302
13302
  this.window.addEventListener("pagehide", (() => this.shutdown())), this.started = !0;
@@ -13305,11 +13305,11 @@ class __PRIVATE_LocalClientState {
13305
13305
  this.setItem(this.vs, JSON.stringify(e));
13306
13306
  }
13307
13307
  getAllActiveQueryTargets() {
13308
- return this.ks(this.Ss);
13308
+ return this.ks(this.bs);
13309
13309
  }
13310
13310
  isActiveQueryTarget(e) {
13311
13311
  let t = !1;
13312
- return this.Ss.forEach(((n, r) => {
13312
+ return this.bs.forEach(((n, r) => {
13313
13313
  r.activeTargetIds.has(e) && (t = !0);
13314
13314
  })), t;
13315
13315
  }
@@ -13430,12 +13430,12 @@ class __PRIVATE_LocalClientState {
13430
13430
  const e = this.Xs(t.newValue);
13431
13431
  await Promise.all(e.map((e => this.syncEngine.eo(e))));
13432
13432
  }
13433
- } else this.bs.push(t);
13433
+ } else this.Ss.push(t);
13434
13434
  }));
13435
13435
  }
13436
13436
  }
13437
13437
  get Ks() {
13438
- return this.Ss.get(this.ps);
13438
+ return this.bs.get(this.ps);
13439
13439
  }
13440
13440
  Ns() {
13441
13441
  this.setItem(this.Ds, this.Ks.Vs());
@@ -13508,13 +13508,13 @@ class __PRIVATE_LocalClientState {
13508
13508
  return this.syncEngine.ro(e.targetId, e.state, e.error);
13509
13509
  }
13510
13510
  zs(e, t) {
13511
- const n = t ? this.Ss.insert(e, t) : this.Ss.remove(e), r = this.ks(this.Ss), i = this.ks(n), s = [], o = [];
13511
+ const n = t ? this.bs.insert(e, t) : this.bs.remove(e), r = this.ks(this.bs), i = this.ks(n), s = [], o = [];
13512
13512
  return i.forEach((e => {
13513
13513
  r.has(e) || s.push(e);
13514
13514
  })), r.forEach((e => {
13515
13515
  i.has(e) || o.push(e);
13516
13516
  })), this.syncEngine.io(s, o).then((() => {
13517
- this.Ss = n;
13517
+ this.bs = n;
13518
13518
  }));
13519
13519
  }
13520
13520
  Bs(e) {
@@ -13523,7 +13523,7 @@ class __PRIVATE_LocalClientState {
13523
13523
  // IndexedDb. If a client does not update their IndexedDb client state
13524
13524
  // within 5 seconds, it is considered inactive and we don't emit an online
13525
13525
  // state event.
13526
- this.Ss.get(e.clientId) && this.onlineStateHandler(e.onlineState);
13526
+ this.bs.get(e.clientId) && this.onlineStateHandler(e.onlineState);
13527
13527
  }
13528
13528
  ks(e) {
13529
13529
  let t = __PRIVATE_targetIdSet();
@@ -13780,10 +13780,10 @@ class __PRIVATE_StreamBridge {
13780
13780
  wo() {
13781
13781
  this.Vo();
13782
13782
  }
13783
- So(e) {
13783
+ bo(e) {
13784
13784
  this.fo(e);
13785
13785
  }
13786
- bo(e) {
13786
+ So(e) {
13787
13787
  this.po(e);
13788
13788
  }
13789
13789
  }
@@ -13847,7 +13847,7 @@ class __PRIVATE_RestConnection {
13847
13847
  // SDK_VERSION is updated to different value at runtime depending on the entry point,
13848
13848
  // so we need to get its value when we need it in a function.
13849
13849
  function __PRIVATE_getGoogApiClientValue() {
13850
- return "gl-js/ fire/" + S;
13850
+ return "gl-js/ fire/" + b;
13851
13851
  }(),
13852
13852
  // Content-Type: text/plain will avoid preflight requests which might
13853
13853
  // mess with CORS and redirects by proxies. If we add custom headers
@@ -13997,10 +13997,10 @@ class __PRIVATE_RestConnection {
13997
13997
  h || (__PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} transport opened.`), P.yo());
13998
13998
  })), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.CLOSE, (() => {
13999
13999
  h || (h = !0, __PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} transport closed`),
14000
- P.So());
14000
+ P.bo());
14001
14001
  })), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.ERROR, (t => {
14002
14002
  h || (h = !0, __PRIVATE_logWarn(ge, `RPC '${e}' stream ${r} transport errored:`, t),
14003
- P.So(new FirestoreError(D.UNAVAILABLE, "The operation could not be completed")));
14003
+ P.bo(new FirestoreError(D.UNAVAILABLE, "The operation could not be completed")));
14004
14004
  })), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.MESSAGE, (t => {
14005
14005
  var n;
14006
14006
  if (!h) {
@@ -14031,8 +14031,8 @@ class __PRIVATE_RestConnection {
14031
14031
  }(t), i = o.message;
14032
14032
  void 0 === n && (n = D.INTERNAL, i = "Unknown error status: " + t + " with message " + o.message),
14033
14033
  // Mark closed so no further events are propagated
14034
- h = !0, P.So(new FirestoreError(n, i)), c.close();
14035
- } else __PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} received:`, i), P.bo(i);
14034
+ h = !0, P.bo(new FirestoreError(n, i)), c.close();
14035
+ } else __PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} received:`, i), P.So(i);
14036
14036
  }
14037
14037
  })), __PRIVATE_unguardedEventListen(o, Event.STAT_EVENT, (t => {
14038
14038
  t.stat === Stat.PROXY ? __PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === Stat.NOPROXY && __PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} detected no buffering proxy`);
@@ -14663,13 +14663,13 @@ class __PRIVATE_OnlineStateTracker {
14663
14663
  * maximum defined by MAX_WATCH_STREAM_FAILURES, we'll set the OnlineState to
14664
14664
  * Offline.
14665
14665
  */
14666
- this.S_ = 0,
14666
+ this.b_ = 0,
14667
14667
  /**
14668
14668
  * A timer that elapses after ONLINE_STATE_TIMEOUT_MS, at which point we
14669
14669
  * transition from OnlineState.Unknown to OnlineState.Offline without waiting
14670
14670
  * for the stream to actually fail (MAX_WATCH_STREAM_FAILURES times).
14671
14671
  */
14672
- this.b_ = null,
14672
+ this.S_ = null,
14673
14673
  /**
14674
14674
  * Whether the client should log a warning message if it fails to connect to
14675
14675
  * the backend (initially true, cleared after a successful stream, or if we've
@@ -14684,7 +14684,7 @@ class __PRIVATE_OnlineStateTracker {
14684
14684
  * If this is the first attempt, it sets the OnlineState to Unknown and starts
14685
14685
  * the onlineStateTimer.
14686
14686
  */ v_() {
14687
- 0 === this.S_ && (this.C_("Unknown" /* OnlineState.Unknown */), this.b_ = this.asyncQueue.enqueueAfterDelay("online_state_timeout" /* TimerId.OnlineStateTimeout */ , 1e4, (() => (this.b_ = null,
14687
+ 0 === this.b_ && (this.C_("Unknown" /* OnlineState.Unknown */), this.S_ = this.asyncQueue.enqueueAfterDelay("online_state_timeout" /* TimerId.OnlineStateTimeout */ , 1e4, (() => (this.S_ = null,
14688
14688
  this.F_("Backend didn't respond within 10 seconds."), this.C_("Offline" /* OnlineState.Offline */),
14689
14689
  Promise.resolve()))));
14690
14690
  }
@@ -14694,8 +14694,8 @@ class __PRIVATE_OnlineStateTracker {
14694
14694
  * allow multiple failures (based on MAX_WATCH_STREAM_FAILURES) before we
14695
14695
  * actually transition to the 'Offline' state.
14696
14696
  */ M_(e) {
14697
- "Online" /* OnlineState.Online */ === this.state ? this.C_("Unknown" /* OnlineState.Unknown */) : (this.S_++,
14698
- this.S_ >= 1 && (this.x_(), this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),
14697
+ "Online" /* OnlineState.Online */ === this.state ? this.C_("Unknown" /* OnlineState.Unknown */) : (this.b_++,
14698
+ this.b_ >= 1 && (this.x_(), this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),
14699
14699
  this.C_("Offline" /* OnlineState.Offline */)));
14700
14700
  }
14701
14701
  /**
@@ -14705,7 +14705,7 @@ class __PRIVATE_OnlineStateTracker {
14705
14705
  * Offline heuristics, so must not be used in place of
14706
14706
  * handleWatchStreamStart() and handleWatchStreamFailure().
14707
14707
  */ set(e) {
14708
- this.x_(), this.S_ = 0, "Online" /* OnlineState.Online */ === e && (
14708
+ this.x_(), this.b_ = 0, "Online" /* OnlineState.Online */ === e && (
14709
14709
  // We've connected to watch at least once. Don't warn the developer
14710
14710
  // about being offline going forward.
14711
14711
  this.D_ = !1), this.C_(e);
@@ -14718,7 +14718,7 @@ class __PRIVATE_OnlineStateTracker {
14718
14718
  this.D_ ? (__PRIVATE_logError(t), this.D_ = !1) : __PRIVATE_logDebug("OnlineStateTracker", t);
14719
14719
  }
14720
14720
  x_() {
14721
- null !== this.b_ && (this.b_.cancel(), this.b_ = null);
14721
+ null !== this.S_ && (this.S_.cancel(), this.S_ = null);
14722
14722
  }
14723
14723
  }
14724
14724
 
@@ -16050,7 +16050,7 @@ class __PRIVATE_RemovedLimboDocument {
16050
16050
  }
16051
16051
  /**
16052
16052
  * Returns whether the doc for the given key should be in limbo.
16053
- */ Sa(e) {
16053
+ */ ba(e) {
16054
16054
  // If the remote end says it's part of this query, it's not in limbo.
16055
16055
  return !this.Ta.has(e) && (
16056
16056
  // The local store doesn't think it's a result, so it shouldn't be in limbo.
@@ -16070,7 +16070,7 @@ class __PRIVATE_RemovedLimboDocument {
16070
16070
  // updating many documents.
16071
16071
  const e = this.da;
16072
16072
  this.da = __PRIVATE_documentKeySet(), this.Ra.forEach((e => {
16073
- this.Sa(e.key) && (this.da = this.da.add(e.key));
16073
+ this.ba(e.key) && (this.da = this.da.add(e.key));
16074
16074
  }));
16075
16075
  // Diff the new limbo docs with the old limbo docs.
16076
16076
  const t = [];
@@ -16100,7 +16100,7 @@ class __PRIVATE_RemovedLimboDocument {
16100
16100
  * @returns The ViewChange that resulted from this synchronization.
16101
16101
  */
16102
16102
  // PORTING NOTE: Multi-tab only.
16103
- ba(e) {
16103
+ Sa(e) {
16104
16104
  this.Ta = e.Ts, this.da = __PRIVATE_documentKeySet();
16105
16105
  const t = this.ma(e.documents);
16106
16106
  return this.applyChanges(t, /* limboResolutionEnabled= */ !0);
@@ -16679,7 +16679,7 @@ function __PRIVATE_syncEngineGetRemoteKeysForTarget(e, t) {
16679
16679
  * from persistence.
16680
16680
  */ async function __PRIVATE_synchronizeViewAndComputeSnapshot(e, t) {
16681
16681
  const n = __PRIVATE_debugCast(e), r = await __PRIVATE_localStoreExecuteQuery(n.localStore, t.query,
16682
- /* usePreviousResults= */ !0), i = t.view.ba(r);
16682
+ /* usePreviousResults= */ !0), i = t.view.Sa(r);
16683
16683
  return n.isPrimaryClient && __PRIVATE_updateTrackedLimbos(n, t.targetId, i.wa),
16684
16684
  i;
16685
16685
  }
@@ -18730,7 +18730,7 @@ function doc(e, t, ...n) {
18730
18730
  /**
18731
18731
  * For Tests: Determine if a delayed operation with a particular TimerId
18732
18732
  * exists.
18733
- */ Su(e) {
18733
+ */ bu(e) {
18734
18734
  for (const t of this.Tu) if (t.timerId === e) return !0;
18735
18735
  return !1;
18736
18736
  }
@@ -18740,7 +18740,7 @@ function doc(e, t, ...n) {
18740
18740
  * @param lastTimerId - Delayed operations up to and including this TimerId
18741
18741
  * will be drained. Pass TimerId.All to run all delayed operations.
18742
18742
  * @returns a Promise that resolves once all operations have been run.
18743
- */ bu(e) {
18743
+ */ Su(e) {
18744
18744
  // Note that draining may generate more delayed ops, so we do that first.
18745
18745
  return this.wu().then((() => {
18746
18746
  // Run ops in the same order they'd run if they ran naturally.
@@ -18886,7 +18886,7 @@ class LoadBundleTask {
18886
18886
  * Constant used to indicate the LRU garbage collection should be disabled.
18887
18887
  * Set this value as the `cacheSizeBytes` on the settings passed to the
18888
18888
  * {@link Firestore} instance.
18889
- */ const Se = -1;
18889
+ */ const be = -1;
18890
18890
 
18891
18891
  /**
18892
18892
  * The Cloud Firestore service interface.
@@ -19546,7 +19546,7 @@ class AggregateField {
19546
19546
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19547
19547
  * See the License for the specific language governing permissions and
19548
19548
  * limitations under the License.
19549
- */ const be = /^__.*__$/;
19549
+ */ const Se = /^__.*__$/;
19550
19550
 
19551
19551
  /** The result of parsing document data (e.g. for a setData call). */ class ParsedSetData {
19552
19552
  constructor(e, t, n) {
@@ -19657,7 +19657,7 @@ function __PRIVATE_isWrite(e) {
19657
19657
  }
19658
19658
  Ou(e) {
19659
19659
  if (0 === e.length) throw this.Bu("Document fields must not be empty");
19660
- if (__PRIVATE_isWrite(this.Cu) && be.test(e)) throw this.Bu('Document fields cannot begin and end with "__"');
19660
+ if (__PRIVATE_isWrite(this.Cu) && Se.test(e)) throw this.Bu('Document fields cannot begin and end with "__"');
19661
19661
  }
19662
19662
  }
19663
19663
 
@@ -22210,7 +22210,7 @@ let Fe = null;
22210
22210
  * @packageDocumentation
22211
22211
  */ !function __PRIVATE_registerFirestore(e, t = !0) {
22212
22212
  !function __PRIVATE_setSDKVersion(e) {
22213
- S = e;
22213
+ b = e;
22214
22214
  }(SDK_VERSION), _registerComponent(new Component("firestore", ((e, {instanceIdentifier: n, options: r}) => {
22215
22215
  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) {
22216
22216
  if (!Object.prototype.hasOwnProperty.apply(e.options, [ "projectId" ])) throw new FirestoreError(D.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
@@ -22219,10 +22219,10 @@ let Fe = null;
22219
22219
  return r = Object.assign({
22220
22220
  useFetchStreams: t
22221
22221
  }, r), s._setSettings(r), s;
22222
- }), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.7.3-canary.1ca18c459", e),
22222
+ }), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.7.3-canary.aa6db78eb", e),
22223
22223
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
22224
- registerVersion(w, "4.7.3-canary.1ca18c459", "esm2017");
22224
+ registerVersion(w, "4.7.3-canary.aa6db78eb", "esm2017");
22225
22225
  }();
22226
22226
 
22227
- export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, Se as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, VectorValue, WriteBatch, __PRIVATE_AutoId as _AutoId, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, _internalAggregationQueryToProtoRunAggregationQueryRequest, _internalQueryToProtoQueryTarget, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, vector, waitForPendingWrites, where, writeBatch };
22227
+ export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, be as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, VectorValue, WriteBatch, __PRIVATE_AutoId as _AutoId, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, _internalAggregationQueryToProtoRunAggregationQueryRequest, _internalQueryToProtoQueryTarget, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, vector, waitForPendingWrites, where, writeBatch };
22228
22228
  //# sourceMappingURL=index.esm2017.js.map