@firebase/firestore 4.7.5-canary.1e8edb705 → 4.7.5-canary.46c91bc3b

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
@@ -71,7 +71,7 @@ User.MOCK_USER = new User("mock-user");
71
71
  * See the License for the specific language governing permissions and
72
72
  * limitations under the License.
73
73
  */
74
- let S = "11.0.2-canary.1e8edb705";
74
+ let b = "11.1.0-canary.46c91bc3b";
75
75
 
76
76
  /**
77
77
  * @license
@@ -89,11 +89,11 @@ let S = "11.0.2-canary.1e8edb705";
89
89
  * See the License for the specific language governing permissions and
90
90
  * limitations under the License.
91
91
  */
92
- const b = new logger.Logger("@firebase/firestore");
92
+ const S = new logger.Logger("@firebase/firestore");
93
93
 
94
94
  // Helper methods are needed because variables can't be exported as read/write
95
95
  function __PRIVATE_getLogLevel() {
96
- return b.logLevel;
96
+ return S.logLevel;
97
97
  }
98
98
 
99
99
  /**
@@ -109,29 +109,29 @@ function __PRIVATE_getLogLevel() {
109
109
  * <li><code>`silent` to turn off logging.</li>
110
110
  * </ul>
111
111
  */ function setLogLevel(e) {
112
- b.setLogLevel(e);
112
+ S.setLogLevel(e);
113
113
  }
114
114
 
115
115
  function __PRIVATE_logDebug(e, ...t) {
116
- if (b.logLevel <= logger.LogLevel.DEBUG) {
116
+ if (S.logLevel <= logger.LogLevel.DEBUG) {
117
117
  const n = t.map(__PRIVATE_argToString);
118
- b.debug(`Firestore (${S}): ${e}`, ...n);
118
+ S.debug(`Firestore (${b}): ${e}`, ...n);
119
119
  }
120
120
  }
121
121
 
122
122
  function __PRIVATE_logError(e, ...t) {
123
- if (b.logLevel <= logger.LogLevel.ERROR) {
123
+ if (S.logLevel <= logger.LogLevel.ERROR) {
124
124
  const n = t.map(__PRIVATE_argToString);
125
- b.error(`Firestore (${S}): ${e}`, ...n);
125
+ S.error(`Firestore (${b}): ${e}`, ...n);
126
126
  }
127
127
  }
128
128
 
129
129
  /**
130
130
  * @internal
131
131
  */ function __PRIVATE_logWarn(e, ...t) {
132
- if (b.logLevel <= logger.LogLevel.WARN) {
132
+ if (S.logLevel <= logger.LogLevel.WARN) {
133
133
  const n = t.map(__PRIVATE_argToString);
134
- b.warn(`Firestore (${S}): ${e}`, ...n);
134
+ S.warn(`Firestore (${b}): ${e}`, ...n);
135
135
  }
136
136
  }
137
137
 
@@ -192,7 +192,7 @@ function __PRIVATE_logError(e, ...t) {
192
192
  */ function fail(e = "Unexpected state") {
193
193
  // Log the failure in addition to throw an exception, just in case the
194
194
  // exception is swallowed.
195
- const t = `FIRESTORE (${S}) INTERNAL ASSERTION FAILED: ` + e;
195
+ const t = `FIRESTORE (${b}) INTERNAL ASSERTION FAILED: ` + e;
196
196
  // NOTE: We don't use FirestoreError here because these are internal failures
197
197
  // that cannot be handled by the user. (Also it would create a circular
198
198
  // dependency between the error and assert modules which doesn't work.)
@@ -6151,10 +6151,10 @@ class __PRIVATE_WatchTargetChange {
6151
6151
  /** The last resume token sent to us for this target. */ get resumeToken() {
6152
6152
  return this.pe;
6153
6153
  }
6154
- /** Whether this target has pending target adds or target removes. */ get Se() {
6154
+ /** Whether this target has pending target adds or target removes. */ get be() {
6155
6155
  return 0 !== this.fe;
6156
6156
  }
6157
- /** Whether we have modified any state that should trigger a snapshot. */ get be() {
6157
+ /** Whether we have modified any state that should trigger a snapshot. */ get Se() {
6158
6158
  return this.we;
6159
6159
  }
6160
6160
  /**
@@ -6247,7 +6247,7 @@ class __PRIVATE_WatchChangeAggregator {
6247
6247
  case 1 /* WatchTargetChangeState.Added */ :
6248
6248
  // We need to decrement the number of pending acks needed from watch
6249
6249
  // for this targetId.
6250
- n.Oe(), n.Se ||
6250
+ n.Oe(), n.be ||
6251
6251
  // We have a freshly added target, so we need to reset any state
6252
6252
  // that we had previously. This can happen e.g. when remove and add
6253
6253
  // back a target for existence filter mismatches.
@@ -6259,7 +6259,7 @@ class __PRIVATE_WatchChangeAggregator {
6259
6259
  // remove any target changes.
6260
6260
  // We need to decrement the number of pending acks needed from watch
6261
6261
  // for this targetId.
6262
- n.Oe(), n.Se || this.removeTarget(t);
6262
+ n.Oe(), n.be || this.removeTarget(t);
6263
6263
  break;
6264
6264
 
6265
6265
  case 3 /* WatchTargetChangeState.Current */ :
@@ -6420,7 +6420,7 @@ class __PRIVATE_WatchChangeAggregator {
6420
6420
  const t = new DocumentKey(i.target.path);
6421
6421
  this.st(t).has(r) || this.ot(r, t) || this.We(r, t, MutableDocument.newNoDocument(t, e));
6422
6422
  }
6423
- n.be && (t.set(r, n.ve()), n.Ce());
6423
+ n.Se && (t.set(r, n.ve()), n.Ce());
6424
6424
  }
6425
6425
  }));
6426
6426
  let n = __PRIVATE_documentKeySet();
@@ -6515,7 +6515,7 @@ class __PRIVATE_WatchChangeAggregator {
6515
6515
  * is still interested in that has no outstanding target change requests).
6516
6516
  */ Ye(e) {
6517
6517
  const t = this.Be.get(e);
6518
- return t && t.Se ? null : this.Le.ut(e);
6518
+ return t && t.be ? null : this.Le.ut(e);
6519
6519
  }
6520
6520
  /**
6521
6521
  * Resets the state of a Watch target to its initial state (e.g. sets
@@ -7738,10 +7738,10 @@ class __PRIVATE_FirestoreIndexValueWriter {
7738
7738
  this.Rt(t, 20), "string" == typeof n && (n = __PRIVATE_normalizeTimestamp(n)), t.ft(`${n.seconds || ""}`),
7739
7739
  t.Vt(n.nanos || 0);
7740
7740
  } else if ("stringValue" in e) this.gt(e.stringValue, t), this.yt(t); else if ("bytesValue" in e) this.Rt(t, 30),
7741
- t.wt(__PRIVATE_normalizeByteString(e.bytesValue)), this.yt(t); else if ("referenceValue" in e) this.St(e.referenceValue, t); else if ("geoPointValue" in e) {
7741
+ t.wt(__PRIVATE_normalizeByteString(e.bytesValue)), this.yt(t); else if ("referenceValue" in e) this.bt(e.referenceValue, t); else if ("geoPointValue" in e) {
7742
7742
  const n = e.geoPointValue;
7743
7743
  this.Rt(t, 45), t.Vt(n.latitude || 0), t.Vt(n.longitude || 0);
7744
- } else "mapValue" in e ? __PRIVATE_isMaxValue(e) ? this.Rt(t, Number.MAX_SAFE_INTEGER) : __PRIVATE_isVectorValue(e) ? this.bt(e.mapValue, t) : (this.Dt(e.mapValue, t),
7744
+ } else "mapValue" in e ? __PRIVATE_isMaxValue(e) ? this.Rt(t, Number.MAX_SAFE_INTEGER) : __PRIVATE_isVectorValue(e) ? this.St(e.mapValue, t) : (this.Dt(e.mapValue, t),
7745
7745
  this.yt(t)) : "arrayValue" in e ? (this.vt(e.arrayValue, t), this.yt(t)) : fail();
7746
7746
  }
7747
7747
  gt(e, t) {
@@ -7755,7 +7755,7 @@ class __PRIVATE_FirestoreIndexValueWriter {
7755
7755
  this.Rt(t, 55);
7756
7756
  for (const e of Object.keys(n)) this.gt(e, t), this.dt(n[e], t);
7757
7757
  }
7758
- bt(e, t) {
7758
+ St(e, t) {
7759
7759
  var n, r;
7760
7760
  const i = e.fields || {};
7761
7761
  this.Rt(t, 53);
@@ -7770,7 +7770,7 @@ class __PRIVATE_FirestoreIndexValueWriter {
7770
7770
  this.Rt(t, 50);
7771
7771
  for (const e of n) this.dt(e, t);
7772
7772
  }
7773
- St(e, t) {
7773
+ bt(e, t) {
7774
7774
  this.Rt(t, 37);
7775
7775
  DocumentKey.fromName(e).path.forEach((e => {
7776
7776
  this.Rt(t, 60), this.Ct(e, t);
@@ -8870,7 +8870,7 @@ class __PRIVATE_IndexedDbIndexManager {
8870
8870
  }
8871
8871
  updateCollectionGroup(e, t, n) {
8872
8872
  const r = __PRIVATE_indexConfigurationStore(e), i = __PRIVATE_indexStateStore(e);
8873
- return this.Sn(e).next((e => r.U("collectionGroupIndex", IDBKeyRange.bound(t, t)).next((t => PersistencePromise.forEach(t, (t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.uid, e, n))))))));
8873
+ return this.bn(e).next((e => r.U("collectionGroupIndex", IDBKeyRange.bound(t, t)).next((t => PersistencePromise.forEach(t, (t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.uid, e, n))))))));
8874
8874
  }
8875
8875
  updateIndexEntries(e, t) {
8876
8876
  // Porting Note: `getFieldIndexes()` on Web does not cache index lookups as
@@ -8882,7 +8882,7 @@ class __PRIVATE_IndexedDbIndexManager {
8882
8882
  return PersistencePromise.forEach(t, ((t, r) => {
8883
8883
  const i = n.get(t.collectionGroup);
8884
8884
  return (i ? PersistencePromise.resolve(i) : this.getFieldIndexes(e, t.collectionGroup)).next((i => (n.set(t.collectionGroup, i),
8885
- PersistencePromise.forEach(i, (n => this.bn(e, t, n).next((t => {
8885
+ PersistencePromise.forEach(i, (n => this.Sn(e, t, n).next((t => {
8886
8886
  const i = this.Dn(r, n);
8887
8887
  return t.isEqual(i) ? PersistencePromise.resolve() : this.vn(e, r, n, t, i);
8888
8888
  })))))));
@@ -8901,7 +8901,7 @@ class __PRIVATE_IndexedDbIndexManager {
8901
8901
  Fn(e, t, n, r) {
8902
8902
  return __PRIVATE_indexEntriesStore(e).delete([ r.indexId, this.uid, r.arrayValue, r.directionalValue, this.gn(n, t.key), t.key.path.toArray() ]);
8903
8903
  }
8904
- bn(e, t, n) {
8904
+ Sn(e, t, n) {
8905
8905
  const r = __PRIVATE_indexEntriesStore(e);
8906
8906
  let i = new SortedSet(__PRIVATE_indexEntryComparator);
8907
8907
  return r.J({
@@ -8957,7 +8957,7 @@ class __PRIVATE_IndexedDbIndexManager {
8957
8957
  s.push(this.Fn(e, t, n, r));
8958
8958
  })), PersistencePromise.waitFor(s);
8959
8959
  }
8960
- Sn(e) {
8960
+ bn(e) {
8961
8961
  let t = 1;
8962
8962
  return __PRIVATE_indexStateStore(e).J({
8963
8963
  index: "sequenceNumberIndex",
@@ -10902,7 +10902,7 @@ class OverlayedDocument {
10902
10902
  gr(e) {
10903
10903
  this.dr = this.dr.delete(e), this.Rr = this.Rr.delete(e);
10904
10904
  }
10905
- Sr(e) {
10905
+ br(e) {
10906
10906
  const t = new DocumentKey(new ResourcePath([])), n = new __PRIVATE_DocReference(t, e), r = new __PRIVATE_DocReference(t, e + 1);
10907
10907
  let i = __PRIVATE_documentKeySet();
10908
10908
  return this.Rr.forEachInRange([ n, r ], (e => {
@@ -10917,13 +10917,13 @@ class OverlayedDocument {
10917
10917
 
10918
10918
  class __PRIVATE_DocReference {
10919
10919
  constructor(e, t) {
10920
- this.key = e, this.br = t;
10920
+ this.key = e, this.Sr = t;
10921
10921
  }
10922
10922
  /** Compare by key then by ID */ static Ar(e, t) {
10923
- return DocumentKey.comparator(e.key, t.key) || __PRIVATE_primitiveComparator(e.br, t.br);
10923
+ return DocumentKey.comparator(e.key, t.key) || __PRIVATE_primitiveComparator(e.Sr, t.Sr);
10924
10924
  }
10925
10925
  /** Compare by ID then by key */ static Vr(e, t) {
10926
- return __PRIVATE_primitiveComparator(e.br, t.br) || DocumentKey.comparator(e.key, t.key);
10926
+ return __PRIVATE_primitiveComparator(e.Sr, t.Sr) || DocumentKey.comparator(e.key, t.key);
10927
10927
  }
10928
10928
  }
10929
10929
 
@@ -10986,7 +10986,7 @@ class __PRIVATE_DocReference {
10986
10986
  getAllMutationBatchesAffectingDocumentKey(e, t) {
10987
10987
  const n = new __PRIVATE_DocReference(t, 0), r = new __PRIVATE_DocReference(t, Number.POSITIVE_INFINITY), i = [];
10988
10988
  return this.vr.forEachInRange([ n, r ], (e => {
10989
- const t = this.Cr(e.br);
10989
+ const t = this.Cr(e.Sr);
10990
10990
  i.push(t);
10991
10991
  })), PersistencePromise.resolve(i);
10992
10992
  }
@@ -10995,7 +10995,7 @@ class __PRIVATE_DocReference {
10995
10995
  return t.forEach((e => {
10996
10996
  const t = new __PRIVATE_DocReference(e, 0), r = new __PRIVATE_DocReference(e, Number.POSITIVE_INFINITY);
10997
10997
  this.vr.forEachInRange([ t, r ], (e => {
10998
- n = n.add(e.br);
10998
+ n = n.add(e.Sr);
10999
10999
  }));
11000
11000
  })), PersistencePromise.resolve(this.Mr(n));
11001
11001
  }
@@ -11021,7 +11021,7 @@ class __PRIVATE_DocReference {
11021
11021
  // the document /rooms/abc/messages/xyx.
11022
11022
  // TODO(mcg): we'll need a different scanner when we implement
11023
11023
  // ancestor queries.
11024
- t.length === r && (o = o.add(e.br)), !0);
11024
+ t.length === r && (o = o.add(e.Sr)), !0);
11025
11025
  }), s), PersistencePromise.resolve(this.Mr(o));
11026
11026
  }
11027
11027
  Mr(e) {
@@ -11314,7 +11314,7 @@ class __PRIVATE_MemoryRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuf
11314
11314
  return this.qr.yr(t), PersistencePromise.resolve();
11315
11315
  }
11316
11316
  getMatchingKeysForTargetId(e, t) {
11317
- const n = this.qr.Sr(t);
11317
+ const n = this.qr.br(t);
11318
11318
  return PersistencePromise.resolve(n);
11319
11319
  }
11320
11320
  containsKey(e, t) {
@@ -11965,7 +11965,7 @@ class __PRIVATE_IndexedDbPersistence {
11965
11965
  * with the current primary state.
11966
11966
  *
11967
11967
  * PORTING NOTE: This is only used for Web multi-tab.
11968
- */ Si(e) {
11968
+ */ bi(e) {
11969
11969
  return this.Ri = async t => {
11970
11970
  if (this.started) return e(t);
11971
11971
  }, e(this.isPrimary);
@@ -12006,7 +12006,7 @@ class __PRIVATE_IndexedDbPersistence {
12006
12006
  networkEnabled: this.networkEnabled,
12007
12007
  inForeground: this.inForeground
12008
12008
  }).next((() => {
12009
- if (this.isPrimary) return this.bi(e).next((e => {
12009
+ if (this.isPrimary) return this.Si(e).next((e => {
12010
12010
  e || (this.isPrimary = !1, this.li.enqueueRetryable((() => this.Ri(!1))));
12011
12011
  }));
12012
12012
  })).next((() => this.Di(e))).next((t => this.isPrimary && !t ? this.vi(e).next((() => !1)) : !!t && this.Ci(e).next((() => !0)))))).catch((e => {
@@ -12022,7 +12022,7 @@ class __PRIVATE_IndexedDbPersistence {
12022
12022
  this.isPrimary !== e && this.li.enqueueRetryable((() => this.Ri(e))), this.isPrimary = e;
12023
12023
  }));
12024
12024
  }
12025
- bi(e) {
12025
+ Si(e) {
12026
12026
  return __PRIVATE_primaryClientStore(e).get("owner").next((e => PersistencePromise.resolve(this.Fi(e))));
12027
12027
  }
12028
12028
  Mi(e) {
@@ -12172,7 +12172,7 @@ class __PRIVATE_IndexedDbPersistence {
12172
12172
  // Do all transactions as readwrite against all object stores, since we
12173
12173
  // are the only reader/writer.
12174
12174
  return this.mi.runTransaction(e, r, i, (r => (s = new __PRIVATE_IndexedDbTransaction(r, this.$r ? this.$r.next() : __PRIVATE_ListenSequence.oe),
12175
- "readwrite-primary" === t ? this.bi(s).next((e => !!e || this.Di(s))).next((t => {
12175
+ "readwrite-primary" === t ? this.Si(s).next((e => !!e || this.Di(s))).next((t => {
12176
12176
  if (!t) throw __PRIVATE_logError(`Failed to obtain primary lease for action '${e}'.`),
12177
12177
  this.isPrimary = !1, this.li.enqueueRetryable((() => this.Ri(!1))), new FirestoreError(D.FAILED_PRECONDITION, C);
12178
12178
  return n(s);
@@ -13227,7 +13227,7 @@ class __PRIVATE_LocalClientState {
13227
13227
  */ class __PRIVATE_WebStorageSharedClientState {
13228
13228
  constructor(e, t, n, r, i) {
13229
13229
  this.window = e, this.li = t, this.persistenceKey = n, this.ws = r, this.syncEngine = null,
13230
- this.onlineStateHandler = null, this.sequenceNumberHandler = null, this.Ss = this.bs.bind(this),
13230
+ this.onlineStateHandler = null, this.sequenceNumberHandler = null, this.bs = this.Ss.bind(this),
13231
13231
  this.Ds = new SortedMap(__PRIVATE_primitiveComparator), this.started = !1,
13232
13232
  /**
13233
13233
  * Captures WebStorage events that occur before `start()` is called. These
@@ -13282,7 +13282,7 @@ class __PRIVATE_LocalClientState {
13282
13282
  // respective start() calls). Otherwise, we might for example miss a
13283
13283
  // mutation that is added after LocalStore's start() processed the existing
13284
13284
  // mutations but before we observe WebStorage events.
13285
- this.window.addEventListener("storage", this.Ss);
13285
+ this.window.addEventListener("storage", this.bs);
13286
13286
  }
13287
13287
  /** Returns 'true' if WebStorage is available in the current environment. */ static p(e) {
13288
13288
  return !(!e || !e.localStorage);
@@ -13307,7 +13307,7 @@ class __PRIVATE_LocalClientState {
13307
13307
  const e = this.ks(t);
13308
13308
  e && this.qs(e);
13309
13309
  }
13310
- for (const e of this.vs) this.bs(e);
13310
+ for (const e of this.vs) this.Ss(e);
13311
13311
  this.vs = [],
13312
13312
  // Register a window unload hook to remove the client metadata entry from
13313
13313
  // WebStorage even if `shutdown()` was not called.
@@ -13376,7 +13376,7 @@ class __PRIVATE_LocalClientState {
13376
13376
  this.zs(e);
13377
13377
  }
13378
13378
  shutdown() {
13379
- this.started && (this.window.removeEventListener("storage", this.Ss), this.removeItem(this.Cs),
13379
+ this.started && (this.window.removeEventListener("storage", this.bs), this.removeItem(this.Cs),
13380
13380
  this.started = !1);
13381
13381
  }
13382
13382
  getItem(e) {
@@ -13389,7 +13389,7 @@ class __PRIVATE_LocalClientState {
13389
13389
  removeItem(e) {
13390
13390
  __PRIVATE_logDebug("SharedClientState", "REMOVE", e), this.storage.removeItem(e);
13391
13391
  }
13392
- bs(e) {
13392
+ Ss(e) {
13393
13393
  // Note: The function is typed to take Event to be interface-compatible with
13394
13394
  // `Window.addEventListener`.
13395
13395
  const t = e;
@@ -13786,10 +13786,10 @@ class __PRIVATE_StreamBridge {
13786
13786
  send(e) {
13787
13787
  this.Eo(e);
13788
13788
  }
13789
- So() {
13789
+ bo() {
13790
13790
  this.Vo();
13791
13791
  }
13792
- bo() {
13792
+ So() {
13793
13793
  this.fo();
13794
13794
  }
13795
13795
  Do(e) {
@@ -13859,7 +13859,7 @@ class __PRIVATE_RestConnection {
13859
13859
  // SDK_VERSION is updated to different value at runtime depending on the entry point,
13860
13860
  // so we need to get its value when we need it in a function.
13861
13861
  function __PRIVATE_getGoogApiClientValue() {
13862
- return "gl-js/ fire/" + S;
13862
+ return "gl-js/ fire/" + b;
13863
13863
  }(),
13864
13864
  // Content-Type: text/plain will avoid preflight requests which might
13865
13865
  // mess with CORS and redirects by proxies. If we add custom headers
@@ -14006,7 +14006,7 @@ class __PRIVATE_RestConnection {
14006
14006
  // Note that eventually this function could go away if we are confident
14007
14007
  // enough the code is exception free.
14008
14008
  return __PRIVATE_unguardedEventListen(c, webchannelBlob.WebChannel.EventType.OPEN, (() => {
14009
- h || (__PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} transport opened.`), P.So());
14009
+ h || (__PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} transport opened.`), P.bo());
14010
14010
  })), __PRIVATE_unguardedEventListen(c, webchannelBlob.WebChannel.EventType.CLOSE, (() => {
14011
14011
  h || (h = !0, __PRIVATE_logDebug(ge, `RPC '${e}' stream ${r} transport closed`),
14012
14012
  P.Do());
@@ -14053,7 +14053,7 @@ class __PRIVATE_RestConnection {
14053
14053
  // but because we want to send the first message with the WebChannel
14054
14054
  // handshake we pretend the channel opened here (asynchronously), and
14055
14055
  // then delay the actual open until the first message is sent.
14056
- P.bo();
14056
+ P.So();
14057
14057
  }), 0), P;
14058
14058
  }
14059
14059
  }
@@ -14630,25 +14630,25 @@ class __PRIVATE_PersistentStream {
14630
14630
  class __PRIVATE_DatastoreImpl extends class Datastore {} {
14631
14631
  constructor(e, t, n, r) {
14632
14632
  super(), this.authCredentials = e, this.appCheckCredentials = t, this.connection = n,
14633
- this.serializer = r, this.S_ = !1;
14633
+ this.serializer = r, this.b_ = !1;
14634
14634
  }
14635
- b_() {
14636
- if (this.S_) throw new FirestoreError(D.FAILED_PRECONDITION, "The client has already been terminated.");
14635
+ S_() {
14636
+ if (this.b_) throw new FirestoreError(D.FAILED_PRECONDITION, "The client has already been terminated.");
14637
14637
  }
14638
14638
  /** Invokes the provided RPC with auth and AppCheck tokens. */ Oo(e, t, n, r) {
14639
- return this.b_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, s]) => this.connection.Oo(e, __PRIVATE_toResourcePath(t, n), r, i, s))).catch((e => {
14639
+ return this.S_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, s]) => this.connection.Oo(e, __PRIVATE_toResourcePath(t, n), r, i, s))).catch((e => {
14640
14640
  throw "FirebaseError" === e.name ? (e.code === D.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
14641
14641
  this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(D.UNKNOWN, e.toString());
14642
14642
  }));
14643
14643
  }
14644
14644
  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ ko(e, t, n, r, i) {
14645
- return this.b_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([s, o]) => this.connection.ko(e, __PRIVATE_toResourcePath(t, n), r, s, o, i))).catch((e => {
14645
+ return this.S_(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([s, o]) => this.connection.ko(e, __PRIVATE_toResourcePath(t, n), r, s, o, i))).catch((e => {
14646
14646
  throw "FirebaseError" === e.name ? (e.code === D.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
14647
14647
  this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(D.UNKNOWN, e.toString());
14648
14648
  }));
14649
14649
  }
14650
14650
  terminate() {
14651
- this.S_ = !0, this.connection.terminate();
14651
+ this.b_ = !0, this.connection.terminate();
14652
14652
  }
14653
14653
  }
14654
14654
 
@@ -15141,7 +15141,7 @@ async function __PRIVATE_remoteStoreHandleCredentialChange(e, t) {
15141
15141
  // Create stream (but note that it is not started yet).
15142
15142
  e.W_ = function __PRIVATE_newPersistentWatchStream(e, t, n) {
15143
15143
  const r = __PRIVATE_debugCast(e);
15144
- return r.b_(), new __PRIVATE_PersistentListenStream(t, r.connection, r.authCredentials, r.appCheckCredentials, r.serializer, n);
15144
+ return r.S_(), new __PRIVATE_PersistentListenStream(t, r.connection, r.authCredentials, r.appCheckCredentials, r.serializer, n);
15145
15145
  }
15146
15146
  /**
15147
15147
  * @license
@@ -15181,7 +15181,7 @@ async function __PRIVATE_remoteStoreHandleCredentialChange(e, t) {
15181
15181
  // Create stream (but note that it is not started yet).
15182
15182
  e.G_ = function __PRIVATE_newPersistentWriteStream(e, t, n) {
15183
15183
  const r = __PRIVATE_debugCast(e);
15184
- return r.b_(), new __PRIVATE_PersistentWriteStream(t, r.connection, r.authCredentials, r.appCheckCredentials, r.serializer, n);
15184
+ return r.S_(), new __PRIVATE_PersistentWriteStream(t, r.connection, r.authCredentials, r.appCheckCredentials, r.serializer, n);
15185
15185
  }(e.datastore, e.asyncQueue, {
15186
15186
  Ro: () => Promise.resolve(),
15187
15187
  mo: __PRIVATE_onWriteStreamOpen.bind(null, e),
@@ -16026,19 +16026,19 @@ class __PRIVATE_RemovedLimboDocument {
16026
16026
  * See the License for the specific language governing permissions and
16027
16027
  * limitations under the License.
16028
16028
  */ (e.type, t.type) || this.Va(e.doc, t.doc))), this.wa(n), r = null != r && r;
16029
- const o = t && !r ? this.Sa() : [], _ = 0 === this.Ra.size && this.current && !r ? 1 /* SyncState.Synced */ : 0 /* SyncState.Local */ , a = _ !== this.Aa;
16029
+ const o = t && !r ? this.ba() : [], _ = 0 === this.Ra.size && this.current && !r ? 1 /* SyncState.Synced */ : 0 /* SyncState.Local */ , a = _ !== this.Aa;
16030
16030
  // We are at synced state if there is no limbo docs are waiting to be resolved, view is current
16031
16031
  // with the backend, and the query is not pending to reset due to existence filter mismatch.
16032
16032
  if (this.Aa = _, 0 !== s.length || a) {
16033
16033
  return {
16034
16034
  snapshot: new ViewSnapshot(this.query, e.ma, i, s, e.mutatedKeys, 0 /* SyncState.Local */ === _, a,
16035
16035
  /* excludesMetadataChanges= */ !1, !!n && n.resumeToken.approximateByteSize() > 0),
16036
- ba: o
16036
+ Sa: o
16037
16037
  };
16038
16038
  }
16039
16039
  // no changes
16040
16040
  return {
16041
- ba: o
16041
+ Sa: o
16042
16042
  };
16043
16043
  }
16044
16044
  /**
@@ -16057,7 +16057,7 @@ class __PRIVATE_RemovedLimboDocument {
16057
16057
  ss: !1
16058
16058
  },
16059
16059
  /* limboResolutionEnabled= */ !1)) : {
16060
- ba: []
16060
+ Sa: []
16061
16061
  };
16062
16062
  }
16063
16063
  /**
@@ -16075,7 +16075,7 @@ class __PRIVATE_RemovedLimboDocument {
16075
16075
  e && (e.addedDocuments.forEach((e => this.da = this.da.add(e))), e.modifiedDocuments.forEach((e => {})),
16076
16076
  e.removedDocuments.forEach((e => this.da = this.da.delete(e))), this.current = e.current);
16077
16077
  }
16078
- Sa() {
16078
+ ba() {
16079
16079
  // We can only determine limbo documents when we're in-sync with the server.
16080
16080
  if (!this.current) return [];
16081
16081
  // TODO(klimt): Do this incrementally so that it's not quadratic when
@@ -16271,12 +16271,12 @@ async function __PRIVATE_allocateTargetAndMaybeListen(e, t, n, r) {
16271
16271
  /* usePreviousResults= */ !1).then((({documents: e}) => t.view.ga(e, i))));
16272
16272
  const s = r && r.targetChanges.get(t.targetId), o = r && null != r.targetMismatches.get(t.targetId), _ = t.view.applyChanges(i,
16273
16273
  /* limboResolutionEnabled= */ e.isPrimaryClient, s, o);
16274
- return __PRIVATE_updateTrackedLimbos(e, t.targetId, _.ba), _.snapshot;
16274
+ return __PRIVATE_updateTrackedLimbos(e, t.targetId, _.Sa), _.snapshot;
16275
16275
  }(e, t, n, r);
16276
16276
  const s = await __PRIVATE_localStoreExecuteQuery(e.localStore, t,
16277
16277
  /* usePreviousResults= */ !0), o = new __PRIVATE_View(t, s.ds), _ = o.ga(s.documents), a = TargetChange.createSynthesizedTargetChangeForCurrentChange(n, r && "Offline" /* OnlineState.Offline */ !== e.onlineState, i), u = o.applyChanges(_,
16278
16278
  /* limboResolutionEnabled= */ e.isPrimaryClient, a);
16279
- __PRIVATE_updateTrackedLimbos(e, n, u.ba);
16279
+ __PRIVATE_updateTrackedLimbos(e, n, u.Sa);
16280
16280
  const c = new __PRIVATE_QueryView(t, n, o);
16281
16281
  return e.xa.set(t, c), e.Oa.has(n) ? e.Oa.get(n).push(t) : e.Oa.set(n, [ t ]), u.snapshot;
16282
16282
  }
@@ -16692,7 +16692,7 @@ function __PRIVATE_syncEngineGetRemoteKeysForTarget(e, t) {
16692
16692
  */ async function __PRIVATE_synchronizeViewAndComputeSnapshot(e, t) {
16693
16693
  const n = __PRIVATE_debugCast(e), r = await __PRIVATE_localStoreExecuteQuery(n.localStore, t.query,
16694
16694
  /* usePreviousResults= */ !0), i = t.view.va(r);
16695
- return n.isPrimaryClient && __PRIVATE_updateTrackedLimbos(n, t.targetId, i.ba),
16695
+ return n.isPrimaryClient && __PRIVATE_updateTrackedLimbos(n, t.targetId, i.Sa),
16696
16696
  i;
16697
16697
  }
16698
16698
 
@@ -17042,7 +17042,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
17042
17042
  await __PRIVATE_syncEngineEnsureWriteCallbacks(this.Za.syncEngine), await __PRIVATE_fillWritePipeline(this.Za.remoteStore),
17043
17043
  // NOTE: This will immediately call the listener, so we make sure to
17044
17044
  // set it after localStore / remoteStore are started.
17045
- await this.persistence.Si((() => (this.gcScheduler && !this.gcScheduler.started && this.gcScheduler.start(),
17045
+ await this.persistence.bi((() => (this.gcScheduler && !this.gcScheduler.started && this.gcScheduler.start(),
17046
17046
  this.indexBackfillerScheduler && !this.indexBackfillerScheduler.started && this.indexBackfillerScheduler.start(),
17047
17047
  Promise.resolve())));
17048
17048
  }
@@ -17089,7 +17089,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
17089
17089
  }, await this.sharedClientState.start()),
17090
17090
  // NOTE: This will immediately call the listener, so we make sure to
17091
17091
  // set it after localStore / remoteStore are started.
17092
- await this.persistence.Si((async e => {
17092
+ await this.persistence.bi((async e => {
17093
17093
  await __PRIVATE_syncEngineApplyPrimaryState(this.Za.syncEngine, e), this.gcScheduler && (e && !this.gcScheduler.started ? this.gcScheduler.start() : e || this.gcScheduler.stop()),
17094
17094
  this.indexBackfillerScheduler && (e && !this.indexBackfillerScheduler.started ? this.indexBackfillerScheduler.start() : e || this.indexBackfillerScheduler.stop());
17095
17095
  }));
@@ -18719,7 +18719,7 @@ function doc(e, t, ...n) {
18719
18719
  this.pu(),
18720
18720
  // Fast-forward delays for timerIds that have been overridden.
18721
18721
  this.mu.indexOf(e) > -1 && (t = 0);
18722
- const r = DelayedOperation.createAndSchedule(this, e, t, n, (e => this.Su(e)));
18722
+ const r = DelayedOperation.createAndSchedule(this, e, t, n, (e => this.bu(e)));
18723
18723
  return this.du.push(r), r;
18724
18724
  }
18725
18725
  pu() {
@@ -18729,7 +18729,7 @@ function doc(e, t, ...n) {
18729
18729
  /**
18730
18730
  * Waits until all currently queued tasks are finished executing. Delayed
18731
18731
  * operations are not run.
18732
- */ async bu() {
18732
+ */ async Su() {
18733
18733
  // Operations in the queue prior to draining may have enqueued additional
18734
18734
  // operations. Keep draining the queue until the tail is no longer advanced,
18735
18735
  // which indicates that no more new operations were enqueued and that all
@@ -18754,12 +18754,12 @@ function doc(e, t, ...n) {
18754
18754
  * @returns a Promise that resolves once all operations have been run.
18755
18755
  */ vu(e) {
18756
18756
  // Note that draining may generate more delayed ops, so we do that first.
18757
- return this.bu().then((() => {
18757
+ return this.Su().then((() => {
18758
18758
  // Run ops in the same order they'd run if they ran naturally.
18759
18759
  /* eslint-disable-next-line @typescript-eslint/no-floating-promises */
18760
18760
  this.du.sort(((e, t) => e.targetTimeMs - t.targetTimeMs));
18761
18761
  for (const t of this.du) if (t.skipDelay(), "all" /* TimerId.All */ !== e && t.timerId === e) break;
18762
- return this.bu();
18762
+ return this.Su();
18763
18763
  }));
18764
18764
  }
18765
18765
  /**
@@ -18767,7 +18767,7 @@ function doc(e, t, ...n) {
18767
18767
  */ Cu(e) {
18768
18768
  this.mu.push(e);
18769
18769
  }
18770
- /** Called once a DelayedOperation is run or canceled. */ Su(e) {
18770
+ /** Called once a DelayedOperation is run or canceled. */ bu(e) {
18771
18771
  // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.
18772
18772
  const t = this.du.indexOf(e);
18773
18773
  /* eslint-disable-next-line @typescript-eslint/no-floating-promises */ this.du.splice(t, 1);
@@ -18898,7 +18898,7 @@ class LoadBundleTask {
18898
18898
  * Constant used to indicate the LRU garbage collection should be disabled.
18899
18899
  * Set this value as the `cacheSizeBytes` on the settings passed to the
18900
18900
  * {@link Firestore} instance.
18901
- */ const Se = -1;
18901
+ */ const be = -1;
18902
18902
 
18903
18903
  /**
18904
18904
  * The Cloud Firestore service interface.
@@ -19558,7 +19558,7 @@ class AggregateField {
19558
19558
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19559
19559
  * See the License for the specific language governing permissions and
19560
19560
  * limitations under the License.
19561
- */ const be = /^__.*__$/;
19561
+ */ const Se = /^__.*__$/;
19562
19562
 
19563
19563
  /** The result of parsing document data (e.g. for a setData call). */ class ParsedSetData {
19564
19564
  constructor(e, t, n) {
@@ -19669,7 +19669,7 @@ function __PRIVATE_isWrite(e) {
19669
19669
  }
19670
19670
  Lu(e) {
19671
19671
  if (0 === e.length) throw this.qu("Document fields must not be empty");
19672
- if (__PRIVATE_isWrite(this.Mu) && be.test(e)) throw this.qu('Document fields cannot begin and end with "__"');
19672
+ if (__PRIVATE_isWrite(this.Mu) && Se.test(e)) throw this.qu('Document fields cannot begin and end with "__"');
19673
19673
  }
19674
19674
  }
19675
19675
 
@@ -22224,7 +22224,7 @@ let Fe = null;
22224
22224
  * @packageDocumentation
22225
22225
  */ !function __PRIVATE_registerFirestore(e, t = !0) {
22226
22226
  !function __PRIVATE_setSDKVersion(e) {
22227
- S = e;
22227
+ b = e;
22228
22228
  }(app.SDK_VERSION), app._registerComponent(new component.Component("firestore", ((e, {instanceIdentifier: n, options: r}) => {
22229
22229
  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) {
22230
22230
  if (!Object.prototype.hasOwnProperty.apply(e.options, [ "projectId" ])) throw new FirestoreError(D.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
@@ -22233,16 +22233,16 @@ let Fe = null;
22233
22233
  return r = Object.assign({
22234
22234
  useFetchStreams: t
22235
22235
  }, r), s._setSettings(r), s;
22236
- }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.7.5-canary.1e8edb705", e),
22236
+ }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.7.5-canary.46c91bc3b", e),
22237
22237
  // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
22238
- app.registerVersion(w, "4.7.5-canary.1e8edb705", "cjs2017");
22238
+ app.registerVersion(w, "4.7.5-canary.46c91bc3b", "cjs2017");
22239
22239
  }();
22240
22240
 
22241
22241
  exports.AbstractUserDataWriter = AbstractUserDataWriter;
22242
22242
  exports.AggregateField = AggregateField;
22243
22243
  exports.AggregateQuerySnapshot = AggregateQuerySnapshot;
22244
22244
  exports.Bytes = Bytes;
22245
- exports.CACHE_SIZE_UNLIMITED = Se;
22245
+ exports.CACHE_SIZE_UNLIMITED = be;
22246
22246
  exports.CollectionReference = CollectionReference;
22247
22247
  exports.DocumentReference = DocumentReference;
22248
22248
  exports.DocumentSnapshot = DocumentSnapshot;