@firebase/firestore 3.4.8-canary.5ce067663 → 3.4.8-canary.63caee2a5

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.
Files changed (65) hide show
  1. package/dist/firestore/lite/index.d.ts +1 -0
  2. package/dist/firestore/src/api/transaction.d.ts +2 -1
  3. package/dist/firestore/src/api/transaction_options.d.ts +17 -0
  4. package/dist/firestore/src/api.d.ts +1 -0
  5. package/dist/firestore/src/core/firestore_client.d.ts +2 -1
  6. package/dist/firestore/src/core/transaction_options.d.ts +25 -0
  7. package/dist/firestore/src/core/transaction_runner.d.ts +3 -2
  8. package/dist/firestore/src/lite-api/transaction.d.ts +2 -1
  9. package/dist/firestore/src/lite-api/transaction_options.d.ts +23 -0
  10. package/dist/index.d.ts +24 -1
  11. package/dist/index.esm2017.js +224 -200
  12. package/dist/index.esm2017.js.map +1 -1
  13. package/dist/index.esm5.js +158 -135
  14. package/dist/index.esm5.js.map +1 -1
  15. package/dist/index.node.cjs.js +36 -9
  16. package/dist/index.node.cjs.js.map +1 -1
  17. package/dist/index.node.mjs +36 -9
  18. package/dist/index.node.mjs.map +1 -1
  19. package/dist/index.rn.js +95 -71
  20. package/dist/index.rn.js.map +1 -1
  21. package/dist/internal.d.ts +25 -1
  22. package/dist/lite/firestore/lite/index.d.ts +1 -0
  23. package/dist/lite/firestore/src/api/transaction.d.ts +2 -1
  24. package/dist/lite/firestore/src/api/transaction_options.d.ts +17 -0
  25. package/dist/lite/firestore/src/api.d.ts +1 -0
  26. package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -1
  27. package/dist/lite/firestore/src/core/transaction_options.d.ts +25 -0
  28. package/dist/lite/firestore/src/core/transaction_runner.d.ts +3 -2
  29. package/dist/lite/firestore/src/lite-api/transaction.d.ts +2 -1
  30. package/dist/lite/firestore/src/lite-api/transaction_options.d.ts +23 -0
  31. package/dist/lite/index.browser.esm2017.js +246 -223
  32. package/dist/lite/index.browser.esm2017.js.map +1 -1
  33. package/dist/lite/index.browser.esm5.js +118 -116
  34. package/dist/lite/index.browser.esm5.js.map +1 -1
  35. package/dist/lite/index.d.ts +24 -1
  36. package/dist/lite/index.node.cjs.js +34 -7
  37. package/dist/lite/index.node.cjs.js.map +1 -1
  38. package/dist/lite/index.node.mjs +34 -7
  39. package/dist/lite/index.node.mjs.map +1 -1
  40. package/dist/lite/index.rn.esm2017.js +127 -104
  41. package/dist/lite/index.rn.esm2017.js.map +1 -1
  42. package/dist/lite/internal.d.ts +25 -1
  43. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +28 -28
  44. package/dist/lite/packages/firestore/lite/index.d.ts +1 -0
  45. package/dist/lite/packages/firestore/src/api/transaction.d.ts +2 -1
  46. package/dist/lite/packages/firestore/src/api/transaction_options.d.ts +17 -0
  47. package/dist/lite/packages/firestore/src/api.d.ts +1 -0
  48. package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -1
  49. package/dist/lite/packages/firestore/src/core/transaction_options.d.ts +25 -0
  50. package/dist/lite/packages/firestore/src/core/transaction_runner.d.ts +3 -2
  51. package/dist/lite/packages/firestore/src/lite-api/transaction.d.ts +2 -1
  52. package/dist/lite/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
  53. package/dist/lite/private.d.ts +25 -1
  54. package/dist/packages/firestore/dist/index.esm2017.d.ts +37 -36
  55. package/dist/packages/firestore/lite/index.d.ts +1 -0
  56. package/dist/packages/firestore/src/api/transaction.d.ts +2 -1
  57. package/dist/packages/firestore/src/api/transaction_options.d.ts +17 -0
  58. package/dist/packages/firestore/src/api.d.ts +1 -0
  59. package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -1
  60. package/dist/packages/firestore/src/core/transaction_options.d.ts +25 -0
  61. package/dist/packages/firestore/src/core/transaction_runner.d.ts +3 -2
  62. package/dist/packages/firestore/src/lite-api/transaction.d.ts +2 -1
  63. package/dist/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
  64. package/dist/private.d.ts +25 -1
  65. package/package.json +10 -10
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- var y = "9.7.0-canary.5ce067663", v = new l("@firebase/firestore");
70
+ var y = "9.7.0-canary.63caee2a5", v = new l("@firebase/firestore");
71
71
 
72
72
  /**
73
73
  * @license
@@ -204,7 +204,7 @@ function E(t, e) {
204
204
  /**
205
205
  * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an
206
206
  * instance of `T` before casting.
207
- */ function I(t,
207
+ */ function A(t,
208
208
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
209
209
  e) {
210
210
  return t;
@@ -225,7 +225,7 @@ e) {
225
225
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
226
226
  * See the License for the specific language governing permissions and
227
227
  * limitations under the License.
228
- */ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", L = "out-of-range", j = "unimplemented", R = "internal", x = "unavailable", M = /** @class */ function(e) {
228
+ */ var I = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", j = "out-of-range", L = "unimplemented", R = "internal", x = "unavailable", M = /** @class */ function(e) {
229
229
  /** @hideconstructor */
230
230
  function n(
231
231
  /**
@@ -771,7 +771,7 @@ function dt(t) {
771
771
  // return Code.ALREADY_EXISTS;
772
772
  case 416:
773
773
  // Range Not Satisfiable
774
- return L;
774
+ return j;
775
775
 
776
776
  case 429:
777
777
  // Too Many Requests
@@ -779,7 +779,7 @@ function dt(t) {
779
779
 
780
780
  case 499:
781
781
  // Client Closed Request
782
- return A;
782
+ return I;
783
783
 
784
784
  case 500:
785
785
  // Internal Server Error
@@ -790,7 +790,7 @@ function dt(t) {
790
790
  // return Code.DATA_LOSS;
791
791
  case 501:
792
792
  // Unimplemented
793
- return j;
793
+ return L;
794
794
 
795
795
  case 503:
796
796
  // Service Unavailable
@@ -840,13 +840,13 @@ var mt = /** @class */ function(r) {
840
840
  */
841
841
  function i(t, e) {
842
842
  var n = this;
843
- return (n = r.call(this, t) || this).I = e, n;
843
+ return (n = r.call(this, t) || this).A = e, n;
844
844
  }
845
845
  /**
846
846
  * Base class for all Rest-based connections to the backend (WebChannel and
847
847
  * HTTP).
848
848
  */
849
- return t(i, r), i.prototype.A = function(t, e) {
849
+ return t(i, r), i.prototype.I = function(t, e) {
850
850
  throw new Error("Not supported by FetchConnection");
851
851
  }, i.prototype.v = function(t, r, i, o) {
852
852
  return e(this, void 0, void 0, (function() {
@@ -857,7 +857,7 @@ var mt = /** @class */ function(r) {
857
857
  t = JSON.stringify(o), n.label = 1;
858
858
 
859
859
  case 1:
860
- return n.trys.push([ 1, 3, , 4 ]), [ 4 /*yield*/ , this.I(r, {
860
+ return n.trys.push([ 1, 3, , 4 ]), [ 4 /*yield*/ , this.A(r, {
861
861
  method: "POST",
862
862
  headers: i,
863
863
  body: t
@@ -1270,7 +1270,7 @@ function St(t, e) {
1270
1270
  return t.isEqual(e);
1271
1271
  }));
1272
1272
  }, t;
1273
- }(), It = /** @class */ function() {
1273
+ }(), At = /** @class */ function() {
1274
1274
  function t(t) {
1275
1275
  this.binaryString = t;
1276
1276
  }
@@ -1359,9 +1359,9 @@ function St(t, e) {
1359
1359
  * the proto byte string in a common class that must be converted into a string
1360
1360
  * before being sent as a proto.
1361
1361
  * @internal
1362
- */ It.EMPTY_BYTE_STRING = new It("");
1362
+ */ At.EMPTY_BYTE_STRING = new At("");
1363
1363
 
1364
- var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1364
+ var It = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1365
1365
 
1366
1366
  /**
1367
1367
  * Converts the possible Proto values for a timestamp value into a "seconds and
@@ -1374,7 +1374,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1374
1374
  // The date string can have higher precision (nanos) than the Date class
1375
1375
  // (millis), so we do some custom parsing here.
1376
1376
  // Parse the nanos right out of the string.
1377
- var e = 0, n = At.exec(t);
1377
+ var e = 0, n = It.exec(t);
1378
1378
  if (E(!!n), n[1]) {
1379
1379
  // Pad the fraction out to 9 digits (nanos).
1380
1380
  var r = n[1];
@@ -1402,7 +1402,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1402
1402
  }
1403
1403
 
1404
1404
  /** Converts the possible Proto types for Blobs into a ByteString. */ function Dt(t) {
1405
- return "string" == typeof t ? It.fromBase64String(t) : It.fromUint8Array(t);
1405
+ return "string" == typeof t ? At.fromBase64String(t) : At.fromUint8Array(t);
1406
1406
  }
1407
1407
 
1408
1408
  /**
@@ -1557,13 +1557,13 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1557
1557
  }
1558
1558
  }
1559
1559
 
1560
- function Lt(t, e) {
1560
+ function jt(t, e) {
1561
1561
  return void 0 !== (t.values || []).find((function(t) {
1562
1562
  return Ct(t, e);
1563
1563
  }));
1564
1564
  }
1565
1565
 
1566
- function jt(t, e) {
1566
+ function Lt(t, e) {
1567
1567
  if (t === e) return 0;
1568
1568
  var n = Ot(t), r = Ot(e);
1569
1569
  if (n !== r) return gt(n, r);
@@ -1616,7 +1616,7 @@ function jt(t, e) {
1616
1616
  case 9 /* ArrayValue */ :
1617
1617
  return function(t, e) {
1618
1618
  for (var n = t.values || [], r = e.values || [], i = 0; i < n.length && i < r.length; ++i) {
1619
- var o = jt(n[i], r[i]);
1619
+ var o = Lt(n[i], r[i]);
1620
1620
  if (o) return o;
1621
1621
  }
1622
1622
  return gt(n.length, r.length);
@@ -1636,7 +1636,7 @@ function jt(t, e) {
1636
1636
  for (var a = 0; a < r.length && a < o.length; ++a) {
1637
1637
  var s = gt(r[a], o[a]);
1638
1638
  if (0 !== s) return s;
1639
- var u = jt(n[r[a]], i[o[a]]);
1639
+ var u = Lt(n[r[a]], i[o[a]]);
1640
1640
  if (0 !== u) return u;
1641
1641
  }
1642
1642
  return gt(r.length, o.length);
@@ -1950,7 +1950,7 @@ var Yt = /** @class */ function(e) {
1950
1950
  }, n.prototype.matches = function(t) {
1951
1951
  var e = t.data.field(this.field);
1952
1952
  // Types do not have to match in NOT_EQUAL filters.
1953
- return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(jt(e, this.value)) : null !== e && Ot(this.value) === Ot(e) && this.D(jt(e, this.value));
1953
+ return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(Lt(e, this.value)) : null !== e && Ot(this.value) === Ot(e) && this.D(Lt(e, this.value));
1954
1954
  // Only compare types with matching backend order (such as double and int).
1955
1955
  }, n.prototype.D = function(t) {
1956
1956
  switch (this.op) {
@@ -2025,7 +2025,7 @@ var Yt = /** @class */ function(e) {
2025
2025
  }
2026
2026
  return t(n, e), n.prototype.matches = function(t) {
2027
2027
  var e = t.data.field(this.field);
2028
- return Mt(e) && Lt(e.arrayValue, this.value);
2028
+ return Mt(e) && jt(e.arrayValue, this.value);
2029
2029
  }, n;
2030
2030
  }(Yt), ee = /** @class */ function(e) {
2031
2031
  function n(t, n) {
@@ -2033,18 +2033,18 @@ var Yt = /** @class */ function(e) {
2033
2033
  }
2034
2034
  return t(n, e), n.prototype.matches = function(t) {
2035
2035
  var e = t.data.field(this.field);
2036
- return null !== e && Lt(this.value.arrayValue, e);
2036
+ return null !== e && jt(this.value.arrayValue, e);
2037
2037
  }, n;
2038
2038
  }(Yt), ne = /** @class */ function(e) {
2039
2039
  function n(t, n) {
2040
2040
  return e.call(this, t, "not-in" /* NOT_IN */ , n) || this;
2041
2041
  }
2042
2042
  return t(n, e), n.prototype.matches = function(t) {
2043
- if (Lt(this.value.arrayValue, {
2043
+ if (jt(this.value.arrayValue, {
2044
2044
  nullValue: "NULL_VALUE"
2045
2045
  })) return !1;
2046
2046
  var e = t.data.field(this.field);
2047
- return null !== e && !Lt(this.value.arrayValue, e);
2047
+ return null !== e && !jt(this.value.arrayValue, e);
2048
2048
  }, n;
2049
2049
  }(Yt), re = /** @class */ function(e) {
2050
2050
  function n(t, n) {
@@ -2053,7 +2053,7 @@ var Yt = /** @class */ function(e) {
2053
2053
  return t(n, e), n.prototype.matches = function(t) {
2054
2054
  var e = this, n = t.data.field(this.field);
2055
2055
  return !(!Mt(n) || !n.arrayValue.values) && n.arrayValue.values.some((function(t) {
2056
- return Lt(e.value.arrayValue, t);
2056
+ return jt(e.value.arrayValue, t);
2057
2057
  }));
2058
2058
  }, n;
2059
2059
  }(Yt), ie = function(t, e) {
@@ -2139,7 +2139,7 @@ function le(t) {
2139
2139
  * which can be different from the order by constraints the user provided (e.g.
2140
2140
  * the SDK and backend always orders by `__name__`).
2141
2141
  */ function he(t) {
2142
- var e = I(t);
2142
+ var e = A(t);
2143
2143
  if (null === e.$) {
2144
2144
  e.$ = [];
2145
2145
  var n = le(e), r = ce(e);
@@ -2166,7 +2166,7 @@ function le(t) {
2166
2166
  /**
2167
2167
  * Converts this `Query` instance to it's corresponding `Target` representation.
2168
2168
  */ function pe(t) {
2169
- var e = I(t);
2169
+ var e = A(t);
2170
2170
  if (!e.S) if ("F" /* First */ === e.limitType) e.S = Wt(e.path, e.collectionGroup, he(e), e.filters, e.limit, e.startAt, e.endAt); else {
2171
2171
  for (
2172
2172
  // Flip the orderBy directions since we want the last results
@@ -2319,14 +2319,14 @@ function de(t, e) {
2319
2319
  a.fieldTransforms = o, a.type = 1 /* Patch */ , a;
2320
2320
  }
2321
2321
  return t(n, e), n;
2322
- }(Te), Ie = /** @class */ function(e) {
2322
+ }(Te), Ae = /** @class */ function(e) {
2323
2323
  function n(t, n) {
2324
2324
  var r = this;
2325
2325
  return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 2 /* Delete */ ,
2326
2326
  r.fieldTransforms = [], r;
2327
2327
  }
2328
2328
  return t(n, e), n;
2329
- }(Te), Ae = /** @class */ function(e) {
2329
+ }(Te), Ie = /** @class */ function(e) {
2330
2330
  function n(t, n) {
2331
2331
  var r = this;
2332
2332
  return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 3 /* Verify */ ,
@@ -2399,7 +2399,7 @@ function Ce(t, e) {
2399
2399
  return Oe(t.databaseId, e.path);
2400
2400
  }
2401
2401
 
2402
- function Le(t, e) {
2402
+ function je(t, e) {
2403
2403
  var n, r = function(t) {
2404
2404
  var e = Z.fromString(t);
2405
2405
  return E(ze(e)), e;
@@ -2409,7 +2409,7 @@ function Le(t, e) {
2409
2409
  return new nt((E((n = r).length > 4 && "documents" === n.get(4)), n.popFirst(5)));
2410
2410
  }
2411
2411
 
2412
- function je(t, e) {
2412
+ function Le(t, e) {
2413
2413
  return Oe(t.databaseId, e);
2414
2414
  }
2415
2415
 
@@ -2636,19 +2636,19 @@ function We(t, r) {
2636
2636
  return n(this, (function(n) {
2637
2637
  switch (n.label) {
2638
2638
  case 0:
2639
- return e = I(t), i = Re(e.q) + "/documents", o = {
2639
+ return e = A(t), i = Re(e.q) + "/documents", o = {
2640
2640
  writes: r.map((function(t) {
2641
2641
  return function(t, e) {
2642
2642
  var n;
2643
2643
  if (e instanceof Se) n = {
2644
2644
  update: xe(t, e.key, e.value)
2645
- }; else if (e instanceof Ie) n = {
2645
+ }; else if (e instanceof Ae) n = {
2646
2646
  delete: Ce(t, e.key)
2647
2647
  }; else if (e instanceof Ee) n = {
2648
2648
  update: xe(t, e.key, e.data),
2649
2649
  updateMask: Ge(e.fieldMask)
2650
2650
  }; else {
2651
- if (!(e instanceof Ae)) return S();
2651
+ if (!(e instanceof Ie)) return S();
2652
2652
  n = {
2653
2653
  verify: Ce(t, e.key)
2654
2654
  };
@@ -2702,7 +2702,7 @@ function Ye(t, r) {
2702
2702
  return n(this, (function(n) {
2703
2703
  switch (n.label) {
2704
2704
  case 0:
2705
- return e = I(t), i = Re(e.q) + "/documents", o = {
2705
+ return e = A(t), i = Re(e.q) + "/documents", o = {
2706
2706
  documents: r.map((function(t) {
2707
2707
  return Ce(e.q, t);
2708
2708
  }))
@@ -2713,7 +2713,7 @@ function Ye(t, r) {
2713
2713
  var n = function(t, e) {
2714
2714
  return "found" in e ? function(t, e) {
2715
2715
  E(!!e.found), e.found.name, e.found.updateTime;
2716
- var n = Le(t, e.found.name), r = Fe(e.found.updateTime), i = new Qt({
2716
+ var n = je(t, e.found.name), r = Fe(e.found.updateTime), i = new Qt({
2717
2717
  mapValue: {
2718
2718
  fields: e.found.fields
2719
2719
  }
@@ -2721,7 +2721,7 @@ function Ye(t, r) {
2721
2721
  return Kt.newFoundDocument(n, r, i);
2722
2722
  }(t, e) : "missing" in e ? function(t, e) {
2723
2723
  E(!!e.missing), E(!!e.readTime);
2724
- var n = Le(t, e.missing), r = Fe(e.readTime);
2724
+ var n = je(t, e.missing), r = Fe(e.readTime);
2725
2725
  return Kt.newNoDocument(n, r);
2726
2726
  }(t, e) : S();
2727
2727
  }(e.q, t);
@@ -2741,15 +2741,15 @@ function $e(t, r) {
2741
2741
  return n(this, (function(n) {
2742
2742
  switch (n.label) {
2743
2743
  case 0:
2744
- return e = I(t), i = function(t, e) {
2744
+ return e = A(t), i = function(t, e) {
2745
2745
  // Dissect the path into parent, collectionId, and optional key filter.
2746
2746
  var n = {
2747
2747
  structuredQuery: {}
2748
2748
  }, r = e.path;
2749
- null !== e.collectionGroup ? (n.parent = je(t, r), n.structuredQuery.from = [ {
2749
+ null !== e.collectionGroup ? (n.parent = Le(t, r), n.structuredQuery.from = [ {
2750
2750
  collectionId: e.collectionGroup,
2751
2751
  allDescendants: !0
2752
- } ]) : (n.parent = je(t, r.popLast()), n.structuredQuery.from = [ {
2752
+ } ]) : (n.parent = Le(t, r.popLast()), n.structuredQuery.from = [ {
2753
2753
  collectionId: r.lastSegment()
2754
2754
  } ]);
2755
2755
  var i = function(t) {
@@ -2837,7 +2837,7 @@ function $e(t, r) {
2837
2837
  return !!t.document;
2838
2838
  })).map((function(t) {
2839
2839
  return function(t, e, n) {
2840
- var r = Le(t, e.name), i = Fe(e.updateTime), o = new Qt({
2840
+ var r = je(t, e.name), i = Fe(e.updateTime), o = new Qt({
2841
2841
  mapValue: {
2842
2842
  fields: e.fields
2843
2843
  }
@@ -3428,7 +3428,7 @@ var dn = /** @class */ function() {
3428
3428
  * @param base64 - The Base64 string used to create the `Bytes` object.
3429
3429
  */ return t.fromBase64String = function(e) {
3430
3430
  try {
3431
- return new t(It.fromBase64String(e));
3431
+ return new t(At.fromBase64String(e));
3432
3432
  } catch (e) {
3433
3433
  throw new M(V, "Failed to construct data from Base64 string: " + e);
3434
3434
  }
@@ -3439,7 +3439,7 @@ var dn = /** @class */ function() {
3439
3439
  * @param array - The Uint8Array used to create the `Bytes` object.
3440
3440
  */
3441
3441
  t.fromUint8Array = function(e) {
3442
- return new t(It.fromUint8Array(e));
3442
+ return new t(At.fromUint8Array(e));
3443
3443
  },
3444
3444
  /**
3445
3445
  * Returns the underlying bytes as a Base64-encoded string.
@@ -3685,16 +3685,16 @@ function(t) {
3685
3685
  /**
3686
3686
  * Helper for parsing raw user input (provided via the API) into internal model
3687
3687
  * classes.
3688
- */ function In(t) {
3688
+ */ function An(t) {
3689
3689
  var e = t._freezeSettings(), n = Qe(t._databaseId);
3690
3690
  return new En(t._databaseId, !!e.ignoreUndefinedProperties, n);
3691
3691
  }
3692
3692
 
3693
- /** Parse document data from a set() call. */ function An(t, e, n, r, i, o) {
3693
+ /** Parse document data from a set() call. */ function In(t, e, n, r, i, o) {
3694
3694
  void 0 === o && (o = {});
3695
3695
  var a = t.ht(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
3696
3696
  xn("Data must be an object, but it was:", a, r);
3697
- var s, u, c = jn(r, a);
3697
+ var s, u, c = Ln(r, a);
3698
3698
  if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
3699
3699
  for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
3700
3700
  var p = Mn(e, h[f], n);
@@ -3763,7 +3763,7 @@ var Dn = /** @class */ function(e) {
3763
3763
  return t(n, e), n.prototype._toFieldTransform = function(t) {
3764
3764
  var e = Vn(this, t,
3765
3765
  /*array=*/ !0), n = this.lt.map((function(t) {
3766
- return Ln(t, e);
3766
+ return jn(t, e);
3767
3767
  })), r = new ve(n);
3768
3768
  return new be(t.path, r);
3769
3769
  }, n.prototype.isEqual = function(t) {
@@ -3778,7 +3778,7 @@ var Dn = /** @class */ function(e) {
3778
3778
  return t(n, e), n.prototype._toFieldTransform = function(t) {
3779
3779
  var e = Vn(this, t,
3780
3780
  /*array=*/ !0), n = this.lt.map((function(t) {
3781
- return Ln(t, e);
3781
+ return jn(t, e);
3782
3782
  })), r = new ge(n);
3783
3783
  return new be(t.path, r);
3784
3784
  }, n.prototype.isEqual = function(t) {
@@ -3812,7 +3812,7 @@ var Dn = /** @class */ function(e) {
3812
3812
  if (r instanceof kn)
3813
3813
  // Add it to the field mask, but don't add anything to updateData.
3814
3814
  o.push(s); else {
3815
- var c = Ln(r, u);
3815
+ var c = jn(r, u);
3816
3816
  null != c && (o.push(s), a.set(s, c));
3817
3817
  }
3818
3818
  }));
@@ -3835,7 +3835,7 @@ var Dn = /** @class */ function(e) {
3835
3835
  if (m instanceof kn)
3836
3836
  // Add it to the field mask, but don't add anything to updateData.
3837
3837
  l.push(d); else {
3838
- var v = Ln(m, y);
3838
+ var v = jn(m, y);
3839
3839
  null != v && (l.push(d), f.set(d, v));
3840
3840
  }
3841
3841
  }
@@ -3850,7 +3850,7 @@ var Dn = /** @class */ function(e) {
3850
3850
  * @param allowArrays - Whether the query value is an array that may directly
3851
3851
  * contain additional arrays (e.g. the operand of an `in` query).
3852
3852
  */ function Cn(t, e, n, r) {
3853
- return void 0 === r && (r = !1), Ln(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
3853
+ return void 0 === r && (r = !1), jn(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
3854
3854
  }
3855
3855
 
3856
3856
  /**
@@ -3861,11 +3861,11 @@ var Dn = /** @class */ function(e) {
3861
3861
  * the source of the data being parsed, etc.
3862
3862
  * @returns The parsed value, or null if the value was a FieldValue sentinel
3863
3863
  * that should not be included in the resulting parsed data.
3864
- */ function Ln(t, e) {
3864
+ */ function jn(t, e) {
3865
3865
  if (Rn(
3866
3866
  // Unwrap the API type from the Compat SDK. This will return the API type
3867
3867
  // from firestore-exp.
3868
- t = p(t))) return xn("Unsupported field value:", e, t), jn(t, e);
3868
+ t = p(t))) return xn("Unsupported field value:", e, t), Ln(t, e);
3869
3869
  if (t instanceof vn)
3870
3870
  // FieldValues usually parse into transforms (except deleteField())
3871
3871
  // in which case we do not want to include this field in our parsed data
@@ -3901,7 +3901,7 @@ var Dn = /** @class */ function(e) {
3901
3901
  if (e.settings.rt && 4 /* ArrayArgument */ !== e.tt) throw e.ut("Nested arrays are not supported");
3902
3902
  return function(t, e) {
3903
3903
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
3904
- var a = Ln(o[i], e.ot(r));
3904
+ var a = jn(o[i], e.ot(r));
3905
3905
  null == a && (
3906
3906
  // Just include nulls in the array for fields being replaced with a
3907
3907
  // sentinel.
@@ -3962,7 +3962,7 @@ var Dn = /** @class */ function(e) {
3962
3962
  }(t, e);
3963
3963
  }
3964
3964
 
3965
- function jn(t, e) {
3965
+ function Ln(t, e) {
3966
3966
  var n = {};
3967
3967
  return function(t) {
3968
3968
  for (var e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
@@ -3971,7 +3971,7 @@ function jn(t, e) {
3971
3971
  // If we encounter an empty object, we explicitly add it to the update
3972
3972
  // mask to ensure that the server creates a map entry.
3973
3973
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : St(t, (function(t, r) {
3974
- var i = Ln(r, e.nt(t));
3974
+ var i = jn(r, e.nt(t));
3975
3975
  null != i && (n[t] = i);
3976
3976
  })), {
3977
3977
  mapValue: {
@@ -4266,7 +4266,7 @@ var Jn = /** @class */ function(e) {
4266
4266
  i;
4267
4267
  }
4268
4268
  return t(n, e), n.prototype._apply = function(t) {
4269
- var e = In(t.firestore), n = function(t, e, n, r, i, o, a) {
4269
+ var e = An(t.firestore), n = function(t, e, n, r, i, o, a) {
4270
4270
  var s;
4271
4271
  if (i.isKeyField()) {
4272
4272
  if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new M(V, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
@@ -4403,12 +4403,12 @@ var tr = /** @class */ function(e) {
4403
4403
  var nr = /** @class */ function(e) {
4404
4404
  function n(t, n, r) {
4405
4405
  var i = this;
4406
- return (i = e.call(this) || this).type = t, i.gt = n, i.vt = r, i;
4406
+ return (i = e.call(this) || this).type = t, i.gt = n, i.bt = r, i;
4407
4407
  }
4408
4408
  return t(n, e), n.prototype._apply = function(t) {
4409
4409
  return new sn(t.firestore, t.converter, function(t, e, n) {
4410
4410
  return new ue(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
4411
- }(t._query, this.gt, this.vt));
4411
+ }(t._query, this.gt, this.bt));
4412
4412
  }, n;
4413
4413
  }($n);
4414
4414
 
@@ -4437,10 +4437,10 @@ function ir(t) {
4437
4437
  var or = /** @class */ function(e) {
4438
4438
  function n(t, n, r) {
4439
4439
  var i = this;
4440
- return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
4440
+ return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
4441
4441
  }
4442
4442
  return t(n, e), n.prototype._apply = function(t) {
4443
- var e = fr(t, this.type, this.bt, this.Et);
4443
+ var e = fr(t, this.type, this.vt, this.Et);
4444
4444
  return new sn(t.firestore, t.converter, function(t, e) {
4445
4445
  return new ue(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
4446
4446
  }(t._query, e));
@@ -4462,10 +4462,10 @@ function sr() {
4462
4462
  var ur = /** @class */ function(e) {
4463
4463
  function n(t, n, r) {
4464
4464
  var i = this;
4465
- return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
4465
+ return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
4466
4466
  }
4467
4467
  return t(n, e), n.prototype._apply = function(t) {
4468
- var e = fr(t, this.type, this.bt, this.Et);
4468
+ var e = fr(t, this.type, this.vt, this.Et);
4469
4469
  return new sn(t.firestore, t.converter, function(t, e) {
4470
4470
  return new ue(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
4471
4471
  }(t._query, e));
@@ -4507,7 +4507,7 @@ function lr() {
4507
4507
  }
4508
4508
  return new ie(o, i);
4509
4509
  }(t._query, t.firestore._databaseId, e, n[0]._document, r);
4510
- var i = In(t.firestore);
4510
+ var i = An(t.firestore);
4511
4511
  return function(t, e, n, r, i, o) {
4512
4512
  // Use explicit order by's because it has to match the query the user made
4513
4513
  var a = t.explicitOrderBy;
@@ -4730,7 +4730,7 @@ var yr = /** @class */ function(e) {
4730
4730
  * @returns A Promise that will be resolved with the results of the query.
4731
4731
  */ function gr(t) {
4732
4732
  !function(t) {
4733
- if ("L" /* Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new M(j, "limitToLast() queries require specifying at least one orderBy() clause");
4733
+ if ("L" /* Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new M(L, "limitToLast() queries require specifying at least one orderBy() clause");
4734
4734
  }((t = st(t, sn))._query);
4735
4735
  var e = Je(t.firestore), n = new yr(t.firestore);
4736
4736
  return $e(e, t._query).then((function(e) {
@@ -4746,13 +4746,13 @@ var yr = /** @class */ function(e) {
4746
4746
  }
4747
4747
 
4748
4748
  function wr(t, e, n) {
4749
- var r = mr((t = st(t, an)).converter, e, n), i = An(In(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
4749
+ var r = mr((t = st(t, an)).converter, e, n), i = In(An(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
4750
4750
  return We(Je(t.firestore), [ i.toMutation(t._key, _e.none()) ]);
4751
4751
  }
4752
4752
 
4753
4753
  function br(t, e, n) {
4754
4754
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
4755
- var o, a = In((t = st(t, an)).firestore);
4755
+ var o, a = An((t = st(t, an)).firestore);
4756
4756
  // For Compat types, we have to "extract" the underlying types before
4757
4757
  // performing validation.
4758
4758
  return o = "string" == typeof (e = p(e)) || e instanceof dn ? On(a, "updateDoc", t._key, e, n, r) : Fn(a, "updateDoc", t._key, e),
@@ -4771,7 +4771,7 @@ function br(t, e, n) {
4771
4771
  * @returns A `Promise` resolved once the document has been successfully
4772
4772
  * deleted from the backend.
4773
4773
  */ function _r(t) {
4774
- return We(Je((t = st(t, an)).firestore), [ new Ie(t._key, _e.none()) ]);
4774
+ return We(Je((t = st(t, an)).firestore), [ new Ae(t._key, _e.none()) ]);
4775
4775
  }
4776
4776
 
4777
4777
  /**
@@ -4789,7 +4789,7 @@ function br(t, e, n) {
4789
4789
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
4790
4790
  * newly created document after it has been written to the backend.
4791
4791
  */ function Tr(t, e) {
4792
- var n = fn(t = st(t, un)), r = mr(t.converter, e), i = An(In(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
4792
+ var n = fn(t = st(t, un)), r = mr(t.converter, e), i = In(An(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
4793
4793
  return We(Je(t.firestore), [ i.toMutation(n._key, _e.exists(!1)) ]).then((function() {
4794
4794
  return n;
4795
4795
  }));
@@ -4836,7 +4836,7 @@ function br(t, e, n) {
4836
4836
  * @param elements - The elements to union into the array.
4837
4837
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
4838
4838
  * `updateDoc()`.
4839
- */ function Ir() {
4839
+ */ function Ar() {
4840
4840
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4841
4841
  // NOTE: We don't actually parse the data until it's used in set() or
4842
4842
  // update() since we'd need the Firestore instance to do this.
@@ -4853,7 +4853,7 @@ function br(t, e, n) {
4853
4853
  * @param elements - The elements to remove from the array.
4854
4854
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
4855
4855
  * `updateDoc()`
4856
- */ function Ar() {
4856
+ */ function Ir() {
4857
4857
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4858
4858
  // NOTE: We don't actually parse the data until it's used in set() or
4859
4859
  // update() since we'd need the Firestore instance to do this.
@@ -4909,11 +4909,11 @@ function br(t, e, n) {
4909
4909
  /** @hideconstructor */
4910
4910
  function t(t, e) {
4911
4911
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
4912
- this._dataReader = In(t);
4912
+ this._dataReader = An(t);
4913
4913
  }
4914
4914
  return t.prototype.set = function(t, e, n) {
4915
4915
  this._verifyNotCommitted();
4916
- var r = Dr(t, this._firestore), i = mr(r.converter, e, n), o = An(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
4916
+ var r = Dr(t, this._firestore), i = mr(r.converter, e, n), o = In(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
4917
4917
  return this._mutations.push(o.toMutation(r._key, _e.none())), this;
4918
4918
  }, t.prototype.update = function(t, e, n) {
4919
4919
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
@@ -4933,7 +4933,7 @@ function br(t, e, n) {
4933
4933
  t.prototype.delete = function(t) {
4934
4934
  this._verifyNotCommitted();
4935
4935
  var e = Dr(t, this._firestore);
4936
- return this._mutations = this._mutations.concat(new Ie(e._key, _e.none())), this;
4936
+ return this._mutations = this._mutations.concat(new Ae(e._key, _e.none())), this;
4937
4937
  },
4938
4938
  /**
4939
4939
  * Commits all of the writes in this write batch as a single atomic unit.
@@ -5041,7 +5041,7 @@ function Dr(t, e) {
5041
5041
  }
5042
5042
  this.writtenDocs.add(t.toString());
5043
5043
  }, t.prototype.delete = function(t) {
5044
- this.write(new Ie(t, this.precondition(t))), this.writtenDocs.add(t.toString());
5044
+ this.write(new Ae(t, this.precondition(t))), this.writtenDocs.add(t.toString());
5045
5045
  }, t.prototype.commit = function() {
5046
5046
  return e(this, void 0, void 0, (function() {
5047
5047
  var t, e = this;
@@ -5058,7 +5058,7 @@ function Dr(t, e) {
5058
5058
  // a `verify` operation.
5059
5059
  t.forEach((function(t, n) {
5060
5060
  var r = nt.fromPath(n);
5061
- e.mutations.push(new Ae(r, e.precondition(r)));
5061
+ e.mutations.push(new Ie(r, e.precondition(r)));
5062
5062
  })), [ 4 /*yield*/ , We(this.datastore, this.mutations) ];
5063
5063
 
5064
5064
  case 1:
@@ -5117,17 +5117,19 @@ function Dr(t, e) {
5117
5117
  }, t.prototype.write = function(t) {
5118
5118
  this.ensureCommitNotCalled(), this.mutations.push(t);
5119
5119
  }, t.prototype.ensureCommitNotCalled = function() {}, t;
5120
- }(), qr = /** @class */ function() {
5121
- function t(t, e, n, r) {
5122
- this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = r,
5123
- this.Tt = 5, this.It = new Ke(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
5120
+ }(), qr = {
5121
+ maxAttempts: 5
5122
+ }, Fr = /** @class */ function() {
5123
+ function t(t, e, n, r, i) {
5124
+ this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = r,
5125
+ this.deferred = i, this.Tt = n.maxAttempts, this.At = new Ke(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
5124
5126
  /** Runs the transaction and sets the result on deferred. */;
5125
5127
  }
5126
5128
  return t.prototype.run = function() {
5127
- this.Tt -= 1, this.At();
5128
- }, t.prototype.At = function() {
5129
+ this.Tt -= 1, this.It();
5130
+ }, t.prototype.It = function() {
5129
5131
  var t = this;
5130
- this.It.W((function() {
5132
+ this.At.W((function() {
5131
5133
  return e(t, void 0, void 0, (function() {
5132
5134
  var t, e, r = this;
5133
5135
  return n(this, (function(n) {
@@ -5157,7 +5159,7 @@ function Dr(t, e) {
5157
5159
  }, t.prototype.Pt = function(t) {
5158
5160
  var e = this;
5159
5161
  this.Tt > 0 && this.Vt(t) ? (this.Tt -= 1, this.asyncQueue.enqueueAndForget((function() {
5160
- return e.At(), Promise.resolve();
5162
+ return e.It(), Promise.resolve();
5161
5163
  }))) : this.deferred.reject(t);
5162
5164
  }, t.prototype.Vt = function(t) {
5163
5165
  if ("FirebaseError" === t.name) {
@@ -5176,7 +5178,7 @@ function Dr(t, e) {
5176
5178
  default:
5177
5179
  return S();
5178
5180
 
5179
- case A:
5181
+ case I:
5180
5182
  case k:
5181
5183
  case D:
5182
5184
  case F:
@@ -5196,8 +5198,8 @@ function Dr(t, e) {
5196
5198
  // the context and should handled individually by the calling code.
5197
5199
  // See https://cloud.google.com/apis/design/errors.
5198
5200
  case C:
5199
- case L:
5200
5201
  case j:
5202
+ case L:
5201
5203
  case "data-loss":
5202
5204
  return !0;
5203
5205
  }
@@ -5209,7 +5211,7 @@ function Dr(t, e) {
5209
5211
 
5210
5212
  /**
5211
5213
  * @license
5212
- * Copyright 2019 Google LLC
5214
+ * Copyright 2022 Google LLC
5213
5215
  *
5214
5216
  * Licensed under the Apache License, Version 2.0 (the "License");
5215
5217
  * you may not use this file except in compliance with the License.
@@ -5223,10 +5225,6 @@ function Dr(t, e) {
5223
5225
  * See the License for the specific language governing permissions and
5224
5226
  * limitations under the License.
5225
5227
  */
5226
- /**
5227
- * TransactionRunner encapsulates the logic needed to run and retry transactions
5228
- * with backoff.
5229
- */
5230
5228
  /**
5231
5229
  * @license
5232
5230
  * Copyright 2020 Google LLC
@@ -5243,7 +5241,7 @@ function Dr(t, e) {
5243
5241
  * See the License for the specific language governing permissions and
5244
5242
  * limitations under the License.
5245
5243
  */
5246
- /** The Platform's 'document' implementation or null if not available. */ function Fr() {
5244
+ /** The Platform's 'document' implementation or null if not available. */ function Or() {
5247
5245
  // `document` is not always available, e.g. in ReactNative and WebWorkers.
5248
5246
  // eslint-disable-next-line no-restricted-globals
5249
5247
  return "undefined" != typeof document ? document : null;
@@ -5275,7 +5273,7 @@ function Dr(t, e) {
5275
5273
  * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type
5276
5274
  * in newer versions of TypeScript defines `finally`, which is not available in
5277
5275
  * IE.
5278
- */ var Or = /** @class */ function() {
5276
+ */ var Cr = /** @class */ function() {
5279
5277
  function t(t, e, n, r, i) {
5280
5278
  this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = i,
5281
5279
  this.deferred = new U, this.then = this.deferred.promise.then.bind(this.deferred.promise),
@@ -5327,7 +5325,7 @@ function Dr(t, e) {
5327
5325
  * guarantee that the operation will not be run.
5328
5326
  */
5329
5327
  t.prototype.cancel = function(t) {
5330
- null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new M(A, "Operation cancelled" + (t ? ": " + t : ""))));
5328
+ null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new M(I, "Operation cancelled" + (t ? ": " + t : ""))));
5331
5329
  }, t.prototype.handleDelayElapsed = function() {
5332
5330
  var t = this;
5333
5331
  this.asyncQueue.enqueueAndForget((function() {
@@ -5339,7 +5337,7 @@ function Dr(t, e) {
5339
5337
  null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle),
5340
5338
  this.timerHandle = null);
5341
5339
  }, t;
5342
- }(), Cr = /** @class */ function() {
5340
+ }(), jr = /** @class */ function() {
5343
5341
  function t() {
5344
5342
  var t = this;
5345
5343
  // The last promise in the queue.
@@ -5354,24 +5352,24 @@ function Dr(t, e) {
5354
5352
  // automatically removed after they are run or canceled.
5355
5353
  this.St = [],
5356
5354
  // visible for testing
5357
- this.Ft = null,
5355
+ this.xt = null,
5358
5356
  // Flag set while there's an outstanding AsyncQueue operation, used for
5359
5357
  // assertion sanity-checks.
5360
- this.xt = !1,
5358
+ this.Ft = !1,
5361
5359
  // Enabled during shutdown on Safari to prevent future access to IndexedDB.
5362
5360
  this.qt = !1,
5363
5361
  // List of TimerIds to fast-forward delays for.
5364
5362
  this.Ot = [],
5365
5363
  // Backoff timer used to schedule retries for retryable operations
5366
- this.It = new Ke(this, "async_queue_retry" /* AsyncQueueRetry */),
5364
+ this.At = new Ke(this, "async_queue_retry" /* AsyncQueueRetry */),
5367
5365
  // Visibility handler that triggers an immediate retry of all retryable
5368
5366
  // operations. Meant to speed up recovery when we regain file system access
5369
5367
  // after page comes into foreground.
5370
5368
  this.Ct = function() {
5371
- var e = Fr();
5372
- e && w("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.It.H();
5369
+ var e = Or();
5370
+ e && w("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.At.H();
5373
5371
  };
5374
- var e = Fr();
5372
+ var e = Or();
5375
5373
  e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Ct);
5376
5374
  }
5377
5375
  return Object.defineProperty(t.prototype, "isShuttingDown", {
@@ -5395,7 +5393,7 @@ function Dr(t, e) {
5395
5393
  }, t.prototype.enterRestrictedMode = function(t) {
5396
5394
  if (!this.$t) {
5397
5395
  this.$t = !0, this.qt = t || !1;
5398
- var e = Fr();
5396
+ var e = Or();
5399
5397
  e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Ct);
5400
5398
  }
5401
5399
  }, t.prototype.enqueue = function(t) {
@@ -5435,7 +5433,7 @@ function Dr(t, e) {
5435
5433
  return n.trys.push([ 1, 3, , 4 ]), [ 4 /*yield*/ , this.Nt[0]() ];
5436
5434
 
5437
5435
  case 2:
5438
- return n.sent(), this.Nt.shift(), this.It.reset(), [ 3 /*break*/ , 4 ];
5436
+ return n.sent(), this.Nt.shift(), this.At.reset(), [ 3 /*break*/ , 4 ];
5439
5437
 
5440
5438
  case 3:
5441
5439
  if (t = n.sent(), "IndexedDbTransactionError" !== t.name) throw t;
@@ -5455,7 +5453,7 @@ function Dr(t, e) {
5455
5453
  // Since `backoffAndRun()` cancels an existing backoff and schedules a
5456
5454
  // new backoff on every call, there is only ever a single additional
5457
5455
  // operation in the queue.
5458
- this.It.W((function() {
5456
+ this.At.W((function() {
5459
5457
  return e.kt();
5460
5458
  })), n.label = 5;
5461
5459
 
@@ -5466,8 +5464,8 @@ function Dr(t, e) {
5466
5464
  }));
5467
5465
  }, t.prototype.Ut = function(t) {
5468
5466
  var e = this, n = this.Dt.then((function() {
5469
- return e.xt = !0, t().catch((function(t) {
5470
- e.Ft = t, e.xt = !1;
5467
+ return e.Ft = !0, t().catch((function(t) {
5468
+ e.xt = t, e.Ft = !1;
5471
5469
  var n =
5472
5470
  /**
5473
5471
  * Chrome includes Error.message in Error.stack. Other browsers do not.
@@ -5484,7 +5482,7 @@ function Dr(t, e) {
5484
5482
  // and return the rejected Promise.
5485
5483
  throw b("INTERNAL UNHANDLED ERROR: ", n), t;
5486
5484
  })).then((function(t) {
5487
- return e.xt = !1, t;
5485
+ return e.Ft = !1, t;
5488
5486
  }));
5489
5487
  }));
5490
5488
  return this.Dt = n, n;
@@ -5493,12 +5491,12 @@ function Dr(t, e) {
5493
5491
  this.Lt(),
5494
5492
  // Fast-forward delays for timerIds that have been overriden.
5495
5493
  this.Ot.indexOf(t) > -1 && (e = 0);
5496
- var i = Or.createAndSchedule(this, t, e, n, (function(t) {
5494
+ var i = Cr.createAndSchedule(this, t, e, n, (function(t) {
5497
5495
  return r.jt(t);
5498
5496
  }));
5499
5497
  return this.St.push(i), i;
5500
5498
  }, t.prototype.Lt = function() {
5501
- this.Ft && S();
5499
+ this.xt && S();
5502
5500
  }, t.prototype.verifyOperationInProgress = function() {},
5503
5501
  /**
5504
5502
  * Waits until all currently queued tasks are finished executing. Delayed
@@ -5571,7 +5569,7 @@ function Dr(t, e) {
5571
5569
  }(), Lr = /** @class */ function() {
5572
5570
  /** @hideconstructor */
5573
5571
  function t(t, e) {
5574
- this._firestore = t, this._transaction = e, this._dataReader = In(t)
5572
+ this._firestore = t, this._transaction = e, this._dataReader = An(t)
5575
5573
  /**
5576
5574
  * Reads the document referenced by the provided {@link DocumentReference}.
5577
5575
  *
@@ -5589,7 +5587,7 @@ function Dr(t, e) {
5589
5587
  throw S();
5590
5588
  }));
5591
5589
  }, t.prototype.set = function(t, e, n) {
5592
- var r = Dr(t, this._firestore), i = mr(r.converter, e, n), o = An(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
5590
+ var r = Dr(t, this._firestore), i = mr(r.converter, e, n), o = In(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
5593
5591
  return this._transaction.set(r._key, o), this;
5594
5592
  }, t.prototype.update = function(t, e, n) {
5595
5593
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
@@ -5644,11 +5642,15 @@ function Dr(t, e) {
5644
5642
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
5645
5643
  * rejected promise with the corresponding failure error is returned.
5646
5644
  */
5647
- function jr(t, e) {
5648
- var n = Je(t = st(t, tn)), r = new U;
5649
- return new qr(new Cr, n, (function(n) {
5645
+ function Rr(t, e, n) {
5646
+ var r = Je(t = st(t, tn)), i = Object.assign(Object.assign({}, qr), n);
5647
+ !function(t) {
5648
+ if (t.maxAttempts < 1) throw new M(V, "Max attempts must be at least 1");
5649
+ }(i);
5650
+ var o = new U;
5651
+ return new Fr(new jr, r, i, (function(n) {
5650
5652
  return e(new Lr(t, n));
5651
- }), r).run(), r.promise
5653
+ }), o).run(), o.promise
5652
5654
  /**
5653
5655
  * Firestore Lite
5654
5656
  *
@@ -5664,7 +5666,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
5664
5666
  return n && i._setSettings(n), i;
5665
5667
  }), "PUBLIC")),
5666
5668
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
5667
- a("firestore-lite", "3.4.8-canary.5ce067663", ""), a("firestore-lite", "3.4.8-canary.5ce067663", "esm5");
5669
+ a("firestore-lite", "3.4.8-canary.63caee2a5", ""), a("firestore-lite", "3.4.8-canary.63caee2a5", "esm5");
5668
5670
 
5669
- export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, M as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Vr as WriteBatch, Tr as addDoc, Ar as arrayRemove, Ir as arrayUnion, cn as collection, ln as collectionGroup, rn as connectFirestoreEmulator, _r as deleteDoc, Sr as deleteField, fn as doc, mn as documentId, lr as endAt, cr as endBefore, vr as getDoc, gr as getDocs, nn as getFirestore, kr as increment, en as initializeFirestore, rr as limit, ir as limitToLast, er as orderBy, Xn as query, pn as queryEqual, hn as refEqual, jr as runTransaction, Er as serverTimestamp, wr as setDoc, g as setLogLevel, Wn as snapshotEqual, sr as startAfter, ar as startAt, on as terminate, br as updateDoc, Zn as where, Pr as writeBatch };
5671
+ export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, M as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Vr as WriteBatch, Tr as addDoc, Ir as arrayRemove, Ar as arrayUnion, cn as collection, ln as collectionGroup, rn as connectFirestoreEmulator, _r as deleteDoc, Sr as deleteField, fn as doc, mn as documentId, lr as endAt, cr as endBefore, vr as getDoc, gr as getDocs, nn as getFirestore, kr as increment, en as initializeFirestore, rr as limit, ir as limitToLast, er as orderBy, Xn as query, pn as queryEqual, hn as refEqual, Rr as runTransaction, Er as serverTimestamp, wr as setDoc, g as setLogLevel, Wn as snapshotEqual, sr as startAfter, ar as startAt, on as terminate, br as updateDoc, Zn as where, Pr as writeBatch };
5670
5672
  //# sourceMappingURL=index.browser.esm5.js.map