@firebase/firestore 3.4.4-canary.f5ac47fb1 → 3.4.5

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 (151) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/firestore/src/api/credentials.d.ts +1 -0
  3. package/dist/firestore/src/index/index_byte_encoder.d.ts +18 -1
  4. package/dist/firestore/src/index/index_entry.d.ts +26 -0
  5. package/dist/firestore/src/local/document_overlay_cache.d.ts +72 -0
  6. package/dist/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
  7. package/dist/firestore/src/local/indexeddb_index_manager.d.ts +29 -2
  8. package/dist/firestore/src/local/indexeddb_persistence.d.ts +6 -4
  9. package/dist/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
  10. package/dist/firestore/src/local/indexeddb_schema.d.ts +83 -9
  11. package/dist/firestore/src/local/local_documents_view.d.ts +0 -1
  12. package/dist/firestore/src/local/local_serializer.d.ts +18 -2
  13. package/dist/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
  14. package/dist/firestore/src/local/memory_persistence.d.ts +6 -2
  15. package/dist/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
  16. package/dist/firestore/src/local/persistence.d.ts +8 -2
  17. package/dist/firestore/src/local/remote_document_cache.d.ts +7 -9
  18. package/dist/firestore/src/model/document_key.d.ts +5 -0
  19. package/dist/firestore/src/model/field_index.d.ts +2 -2
  20. package/dist/firestore/src/model/overlay.d.ts +32 -0
  21. package/dist/firestore/src/model/target_index_matcher.d.ts +70 -0
  22. package/dist/firestore/src/platform/node/grpc_connection.d.ts +2 -2
  23. package/dist/firestore/src/platform/node/load_protos.d.ts +2 -2
  24. package/dist/firestore/src/util/sorted_set.d.ts +18 -0
  25. package/dist/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
  26. package/dist/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
  27. package/dist/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
  28. package/dist/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
  29. package/dist/firestore/test/unit/local/test_index_manager.d.ts +11 -0
  30. package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
  31. package/dist/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
  32. package/dist/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
  33. package/dist/index.esm2017.js +4367 -3517
  34. package/dist/index.esm2017.js.map +1 -1
  35. package/dist/index.esm5.js +4226 -3437
  36. package/dist/index.esm5.js.map +1 -1
  37. package/dist/index.node.cjs.js +1519 -242
  38. package/dist/index.node.cjs.js.map +1 -1
  39. package/dist/index.node.mjs +1501 -245
  40. package/dist/index.node.mjs.map +1 -1
  41. package/dist/index.rn.js +4355 -3509
  42. package/dist/index.rn.js.map +1 -1
  43. package/dist/internal.d.ts +84 -12
  44. package/dist/lite/firestore/src/api/credentials.d.ts +1 -0
  45. package/dist/lite/firestore/src/index/index_byte_encoder.d.ts +18 -1
  46. package/dist/lite/firestore/src/index/index_entry.d.ts +26 -0
  47. package/dist/lite/firestore/src/local/document_overlay_cache.d.ts +72 -0
  48. package/dist/lite/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
  49. package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +29 -2
  50. package/dist/lite/firestore/src/local/indexeddb_persistence.d.ts +6 -4
  51. package/dist/lite/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
  52. package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +83 -9
  53. package/dist/lite/firestore/src/local/local_documents_view.d.ts +0 -1
  54. package/dist/lite/firestore/src/local/local_serializer.d.ts +18 -2
  55. package/dist/lite/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
  56. package/dist/lite/firestore/src/local/memory_persistence.d.ts +6 -2
  57. package/dist/lite/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
  58. package/dist/lite/firestore/src/local/persistence.d.ts +8 -2
  59. package/dist/lite/firestore/src/local/remote_document_cache.d.ts +7 -9
  60. package/dist/lite/firestore/src/model/document_key.d.ts +5 -0
  61. package/dist/lite/firestore/src/model/field_index.d.ts +2 -2
  62. package/dist/lite/firestore/src/model/overlay.d.ts +32 -0
  63. package/dist/lite/firestore/src/model/target_index_matcher.d.ts +70 -0
  64. package/dist/lite/firestore/src/platform/node/grpc_connection.d.ts +2 -2
  65. package/dist/lite/firestore/src/platform/node/load_protos.d.ts +2 -2
  66. package/dist/lite/firestore/src/util/sorted_set.d.ts +18 -0
  67. package/dist/lite/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
  68. package/dist/lite/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
  69. package/dist/lite/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
  70. package/dist/lite/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
  71. package/dist/lite/firestore/test/unit/local/test_index_manager.d.ts +11 -0
  72. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
  73. package/dist/lite/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
  74. package/dist/lite/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
  75. package/dist/lite/index.browser.esm2017.js +1121 -1112
  76. package/dist/lite/index.browser.esm2017.js.map +1 -1
  77. package/dist/lite/index.browser.esm5.js +60 -48
  78. package/dist/lite/index.browser.esm5.js.map +1 -1
  79. package/dist/lite/index.node.cjs.js +13 -2
  80. package/dist/lite/index.node.cjs.js.map +1 -1
  81. package/dist/lite/index.node.mjs +13 -2
  82. package/dist/lite/index.node.mjs.map +1 -1
  83. package/dist/lite/index.rn.esm2017.js +46 -37
  84. package/dist/lite/index.rn.esm2017.js.map +1 -1
  85. package/dist/lite/internal.d.ts +5 -0
  86. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +112 -112
  87. package/dist/lite/packages/firestore/src/api/credentials.d.ts +1 -0
  88. package/dist/lite/packages/firestore/src/index/index_byte_encoder.d.ts +18 -1
  89. package/dist/lite/packages/firestore/src/index/index_entry.d.ts +26 -0
  90. package/dist/lite/packages/firestore/src/local/document_overlay_cache.d.ts +72 -0
  91. package/dist/lite/packages/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
  92. package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +29 -2
  93. package/dist/lite/packages/firestore/src/local/indexeddb_persistence.d.ts +6 -4
  94. package/dist/lite/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
  95. package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +83 -9
  96. package/dist/lite/packages/firestore/src/local/local_documents_view.d.ts +0 -1
  97. package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +18 -2
  98. package/dist/lite/packages/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
  99. package/dist/lite/packages/firestore/src/local/memory_persistence.d.ts +6 -2
  100. package/dist/lite/packages/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
  101. package/dist/lite/packages/firestore/src/local/persistence.d.ts +8 -2
  102. package/dist/lite/packages/firestore/src/local/remote_document_cache.d.ts +7 -9
  103. package/dist/lite/packages/firestore/src/model/document_key.d.ts +5 -0
  104. package/dist/lite/packages/firestore/src/model/field_index.d.ts +2 -2
  105. package/dist/lite/packages/firestore/src/model/overlay.d.ts +32 -0
  106. package/dist/lite/packages/firestore/src/model/target_index_matcher.d.ts +70 -0
  107. package/dist/lite/packages/firestore/src/platform/node/grpc_connection.d.ts +2 -2
  108. package/dist/lite/packages/firestore/src/platform/node/load_protos.d.ts +2 -2
  109. package/dist/lite/packages/firestore/src/util/sorted_set.d.ts +18 -0
  110. package/dist/lite/packages/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
  111. package/dist/lite/packages/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
  112. package/dist/lite/packages/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
  113. package/dist/lite/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
  114. package/dist/lite/packages/firestore/test/unit/local/test_index_manager.d.ts +11 -0
  115. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
  116. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
  117. package/dist/lite/packages/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
  118. package/dist/packages/firestore/dist/index.esm2017.d.ts +187 -184
  119. package/dist/packages/firestore/src/api/credentials.d.ts +1 -0
  120. package/dist/packages/firestore/src/index/index_byte_encoder.d.ts +18 -1
  121. package/dist/packages/firestore/src/index/index_entry.d.ts +26 -0
  122. package/dist/packages/firestore/src/local/document_overlay_cache.d.ts +72 -0
  123. package/dist/packages/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
  124. package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +29 -2
  125. package/dist/packages/firestore/src/local/indexeddb_persistence.d.ts +6 -4
  126. package/dist/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
  127. package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +83 -9
  128. package/dist/packages/firestore/src/local/local_documents_view.d.ts +0 -1
  129. package/dist/packages/firestore/src/local/local_serializer.d.ts +18 -2
  130. package/dist/packages/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
  131. package/dist/packages/firestore/src/local/memory_persistence.d.ts +6 -2
  132. package/dist/packages/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
  133. package/dist/packages/firestore/src/local/persistence.d.ts +8 -2
  134. package/dist/packages/firestore/src/local/remote_document_cache.d.ts +7 -9
  135. package/dist/packages/firestore/src/model/document_key.d.ts +5 -0
  136. package/dist/packages/firestore/src/model/field_index.d.ts +2 -2
  137. package/dist/packages/firestore/src/model/overlay.d.ts +32 -0
  138. package/dist/packages/firestore/src/model/target_index_matcher.d.ts +70 -0
  139. package/dist/packages/firestore/src/platform/node/grpc_connection.d.ts +2 -2
  140. package/dist/packages/firestore/src/platform/node/load_protos.d.ts +2 -2
  141. package/dist/packages/firestore/src/util/sorted_set.d.ts +18 -0
  142. package/dist/packages/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
  143. package/dist/packages/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
  144. package/dist/packages/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
  145. package/dist/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
  146. package/dist/packages/firestore/test/unit/local/test_index_manager.d.ts +11 -0
  147. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
  148. package/dist/packages/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
  149. package/dist/packages/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
  150. package/dist/private.d.ts +79 -12
  151. package/package.json +9 -9
@@ -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.6.6-canary.f5ac47fb1", v = new l("@firebase/firestore");
70
+ var y = "9.6.7", v = new l("@firebase/firestore");
71
71
 
72
72
  /**
73
73
  * @license
@@ -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", j = "out-of-range", L = "unimplemented", R = "internal", M = "unavailable", U = /** @class */ function(e) {
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", M = "unavailable", U = /** @class */ function(e) {
229
229
  /** @hideconstructor */
230
230
  function n(
231
231
  /**
@@ -527,9 +527,21 @@ function(t, e, n, r, i, o, a, s) {
527
527
  return new t(Z.fromString(e).popFirst(5));
528
528
  }, t.empty = function() {
529
529
  return new t(Z.emptyPath());
530
- },
530
+ }, Object.defineProperty(t.prototype, "collectionGroup", {
531
+ get: function() {
532
+ return this.path.popLast().lastSegment();
533
+ },
534
+ enumerable: !1,
535
+ configurable: !0
536
+ }),
531
537
  /** Returns true if the document is in the specified collectionId. */ t.prototype.hasCollectionId = function(t) {
532
538
  return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;
539
+ },
540
+ /** Returns the collection group (i.e. the name of the parent collection) for this key. */ t.prototype.getCollectionGroup = function() {
541
+ return this.path.get(this.path.length - 2);
542
+ },
543
+ /** Returns the fully qualified path to the parent collection. */ t.prototype.getCollectionPath = function() {
544
+ return this.path.popLast();
533
545
  }, t.prototype.isEqual = function(t) {
534
546
  return null !== t && 0 === Z.comparator(this.path, t.path);
535
547
  }, t.prototype.toString = function() {
@@ -759,7 +771,7 @@ function dt(t) {
759
771
  // return Code.ALREADY_EXISTS;
760
772
  case 416:
761
773
  // Range Not Satisfiable
762
- return j;
774
+ return L;
763
775
 
764
776
  case 429:
765
777
  // Too Many Requests
@@ -778,7 +790,7 @@ function dt(t) {
778
790
  // return Code.DATA_LOSS;
779
791
  case 501:
780
792
  // Unimplemented
781
- return L;
793
+ return j;
782
794
 
783
795
  case 503:
784
796
  // Service Unavailable
@@ -1535,7 +1547,7 @@ function Ct(t, e) {
1535
1547
  }));
1536
1548
  }
1537
1549
 
1538
- function jt(t, e) {
1550
+ function Lt(t, e) {
1539
1551
  if (t === e) return 0;
1540
1552
  var n = Ft(t), r = Ft(e);
1541
1553
  if (n !== r) return gt(n, r);
@@ -1555,10 +1567,10 @@ function jt(t, e) {
1555
1567
  }(t, e);
1556
1568
 
1557
1569
  case 3 /* TimestampValue */ :
1558
- return Lt(t.timestampValue, e.timestampValue);
1570
+ return jt(t.timestampValue, e.timestampValue);
1559
1571
 
1560
1572
  case 4 /* ServerTimestampValue */ :
1561
- return Lt(qt(t), qt(e));
1573
+ return jt(qt(t), qt(e));
1562
1574
 
1563
1575
  case 5 /* StringValue */ :
1564
1576
  return gt(t.stringValue, e.stringValue);
@@ -1587,7 +1599,7 @@ function jt(t, e) {
1587
1599
  case 9 /* ArrayValue */ :
1588
1600
  return function(t, e) {
1589
1601
  for (var n = t.values || [], r = e.values || [], i = 0; i < n.length && i < r.length; ++i) {
1590
- var o = jt(n[i], r[i]);
1602
+ var o = Lt(n[i], r[i]);
1591
1603
  if (o) return o;
1592
1604
  }
1593
1605
  return gt(n.length, r.length);
@@ -1604,7 +1616,7 @@ function jt(t, e) {
1604
1616
  for (var a = 0; a < r.length && a < o.length; ++a) {
1605
1617
  var s = gt(r[a], o[a]);
1606
1618
  if (0 !== s) return s;
1607
- var u = jt(n[r[a]], i[o[a]]);
1619
+ var u = Lt(n[r[a]], i[o[a]]);
1608
1620
  if (0 !== u) return u;
1609
1621
  }
1610
1622
  return gt(r.length, o.length);
@@ -1615,7 +1627,7 @@ function jt(t, e) {
1615
1627
  }
1616
1628
  }
1617
1629
 
1618
- function Lt(t, e) {
1630
+ function jt(t, e) {
1619
1631
  if ("string" == typeof t && "string" == typeof e && t.length === e.length) return gt(t, e);
1620
1632
  var n = kt(t), r = kt(e), i = gt(n.seconds, r.seconds);
1621
1633
  return 0 !== i ? i : gt(n.nanos, r.nanos);
@@ -1937,7 +1949,7 @@ var Wt = /** @class */ function(e) {
1937
1949
  }, n.prototype.matches = function(t) {
1938
1950
  var e = t.data.field(this.field);
1939
1951
  // Types do not have to match in NOT_EQUAL filters.
1940
- return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(jt(e, this.value)) : null !== e && Ft(this.value) === Ft(e) && this.D(jt(e, this.value));
1952
+ return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(Lt(e, this.value)) : null !== e && Ft(this.value) === Ft(e) && this.D(Lt(e, this.value));
1941
1953
  // Only compare types with matching backend order (such as double and int).
1942
1954
  }, n.prototype.D = function(t) {
1943
1955
  switch (this.op) {
@@ -2390,7 +2402,7 @@ function Ce(t, e) {
2390
2402
  return Oe(t.databaseId, e.path);
2391
2403
  }
2392
2404
 
2393
- function je(t, e) {
2405
+ function Le(t, e) {
2394
2406
  var n, r = function(t) {
2395
2407
  var e = Z.fromString(t);
2396
2408
  return E(ze(e)), e;
@@ -2400,7 +2412,7 @@ function je(t, e) {
2400
2412
  return new nt((E((n = r).length > 4 && "documents" === n.get(4)), n.popFirst(5)));
2401
2413
  }
2402
2414
 
2403
- function Le(t, e) {
2415
+ function je(t, e) {
2404
2416
  return Oe(t.databaseId, e);
2405
2417
  }
2406
2418
 
@@ -2704,7 +2716,7 @@ function Ye(t, r) {
2704
2716
  var n = function(t, e) {
2705
2717
  return "found" in e ? function(t, e) {
2706
2718
  E(!!e.found), e.found.name, e.found.updateTime;
2707
- var n = je(t, e.found.name), r = Fe(e.found.updateTime), i = new zt({
2719
+ var n = Le(t, e.found.name), r = Fe(e.found.updateTime), i = new zt({
2708
2720
  mapValue: {
2709
2721
  fields: e.found.fields
2710
2722
  }
@@ -2712,7 +2724,7 @@ function Ye(t, r) {
2712
2724
  return Qt.newFoundDocument(n, r, i);
2713
2725
  }(t, e) : "missing" in e ? function(t, e) {
2714
2726
  E(!!e.missing), E(!!e.readTime);
2715
- var n = je(t, e.missing), r = Fe(e.readTime);
2727
+ var n = Le(t, e.missing), r = Fe(e.readTime);
2716
2728
  return Qt.newNoDocument(n, r);
2717
2729
  }(t, e) : S();
2718
2730
  }(e.q, t);
@@ -2737,10 +2749,10 @@ function $e(t, r) {
2737
2749
  var n = {
2738
2750
  structuredQuery: {}
2739
2751
  }, r = e.path;
2740
- null !== e.collectionGroup ? (n.parent = Le(t, r), n.structuredQuery.from = [ {
2752
+ null !== e.collectionGroup ? (n.parent = je(t, r), n.structuredQuery.from = [ {
2741
2753
  collectionId: e.collectionGroup,
2742
2754
  allDescendants: !0
2743
- } ]) : (n.parent = Le(t, r.popLast()), n.structuredQuery.from = [ {
2755
+ } ]) : (n.parent = je(t, r.popLast()), n.structuredQuery.from = [ {
2744
2756
  collectionId: r.lastSegment()
2745
2757
  } ]);
2746
2758
  var i = function(t) {
@@ -2828,7 +2840,7 @@ function $e(t, r) {
2828
2840
  return !!t.document;
2829
2841
  })).map((function(t) {
2830
2842
  return function(t, e, n) {
2831
- var r = je(t, e.name), i = Fe(e.updateTime), o = new zt({
2843
+ var r = Le(t, e.name), i = Fe(e.updateTime), o = new zt({
2832
2844
  mapValue: {
2833
2845
  fields: e.fields
2834
2846
  }
@@ -3618,16 +3630,16 @@ function(t) {
3618
3630
  enumerable: !1,
3619
3631
  configurable: !0
3620
3632
  }),
3621
- /** Returns a new context with the specified settings overwritten. */ t.prototype.nt = function(e) {
3633
+ /** Returns a new context with the specified settings overwritten. */ t.prototype.et = function(e) {
3622
3634
  return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.q, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
3623
- }, t.prototype.et = function(t) {
3624
- var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.nt({
3635
+ }, t.prototype.nt = function(t) {
3636
+ var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.et({
3625
3637
  path: n,
3626
3638
  rt: !1
3627
3639
  });
3628
3640
  return r.st(t), r;
3629
3641
  }, t.prototype.it = function(t) {
3630
- var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.nt({
3642
+ var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.et({
3631
3643
  path: n,
3632
3644
  rt: !1
3633
3645
  });
@@ -3635,7 +3647,7 @@ function(t) {
3635
3647
  }, t.prototype.ot = function(t) {
3636
3648
  // TODO(b/34871131): We don't support array paths right now; so make path
3637
3649
  // undefined.
3638
- return this.nt({
3650
+ return this.et({
3639
3651
  path: void 0,
3640
3652
  rt: !0
3641
3653
  });
@@ -3685,7 +3697,7 @@ function(t) {
3685
3697
  void 0 === o && (o = {});
3686
3698
  var a = t.ht(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
3687
3699
  Mn("Data must be an object, but it was:", a, r);
3688
- var s, u, c = Ln(r, a);
3700
+ var s, u, c = jn(r, a);
3689
3701
  if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
3690
3702
  for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
3691
3703
  var p = Un(e, h[f], n);
@@ -3754,7 +3766,7 @@ var Dn = /** @class */ function(e) {
3754
3766
  return t(n, e), n.prototype._toFieldTransform = function(t) {
3755
3767
  var e = Vn(this, t,
3756
3768
  /*array=*/ !0), n = this.lt.map((function(t) {
3757
- return jn(t, e);
3769
+ return Ln(t, e);
3758
3770
  })), r = new ve(n);
3759
3771
  return new be(t.path, r);
3760
3772
  }, n.prototype.isEqual = function(t) {
@@ -3769,7 +3781,7 @@ var Dn = /** @class */ function(e) {
3769
3781
  return t(n, e), n.prototype._toFieldTransform = function(t) {
3770
3782
  var e = Vn(this, t,
3771
3783
  /*array=*/ !0), n = this.lt.map((function(t) {
3772
- return jn(t, e);
3784
+ return Ln(t, e);
3773
3785
  })), r = new ge(n);
3774
3786
  return new be(t.path, r);
3775
3787
  }, n.prototype.isEqual = function(t) {
@@ -3803,7 +3815,7 @@ var Dn = /** @class */ function(e) {
3803
3815
  if (r instanceof kn)
3804
3816
  // Add it to the field mask, but don't add anything to updateData.
3805
3817
  o.push(s); else {
3806
- var c = jn(r, u);
3818
+ var c = Ln(r, u);
3807
3819
  null != c && (o.push(s), a.set(s, c));
3808
3820
  }
3809
3821
  }));
@@ -3826,7 +3838,7 @@ var Dn = /** @class */ function(e) {
3826
3838
  if (m instanceof kn)
3827
3839
  // Add it to the field mask, but don't add anything to updateData.
3828
3840
  l.push(d); else {
3829
- var v = jn(m, y);
3841
+ var v = Ln(m, y);
3830
3842
  null != v && (l.push(d), f.set(d, v));
3831
3843
  }
3832
3844
  }
@@ -3841,7 +3853,7 @@ var Dn = /** @class */ function(e) {
3841
3853
  * @param allowArrays - Whether the query value is an array that may directly
3842
3854
  * contain additional arrays (e.g. the operand of an `in` query).
3843
3855
  */ function Cn(t, e, n, r) {
3844
- return void 0 === r && (r = !1), jn(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
3856
+ return void 0 === r && (r = !1), Ln(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
3845
3857
  }
3846
3858
 
3847
3859
  /**
@@ -3852,11 +3864,11 @@ var Dn = /** @class */ function(e) {
3852
3864
  * the source of the data being parsed, etc.
3853
3865
  * @returns The parsed value, or null if the value was a FieldValue sentinel
3854
3866
  * that should not be included in the resulting parsed data.
3855
- */ function jn(t, e) {
3867
+ */ function Ln(t, e) {
3856
3868
  if (Rn(
3857
3869
  // Unwrap the API type from the Compat SDK. This will return the API type
3858
3870
  // from firestore-exp.
3859
- t = p(t))) return Mn("Unsupported field value:", e, t), Ln(t, e);
3871
+ t = p(t))) return Mn("Unsupported field value:", e, t), jn(t, e);
3860
3872
  if (t instanceof vn)
3861
3873
  // FieldValues usually parse into transforms (except deleteField())
3862
3874
  // in which case we do not want to include this field in our parsed data
@@ -3892,7 +3904,7 @@ var Dn = /** @class */ function(e) {
3892
3904
  if (e.settings.rt && 4 /* ArrayArgument */ !== e.tt) throw e.ut("Nested arrays are not supported");
3893
3905
  return function(t, e) {
3894
3906
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
3895
- var a = jn(o[i], e.ot(r));
3907
+ var a = Ln(o[i], e.ot(r));
3896
3908
  null == a && (
3897
3909
  // Just include nulls in the array for fields being replaced with a
3898
3910
  // sentinel.
@@ -3953,7 +3965,7 @@ var Dn = /** @class */ function(e) {
3953
3965
  }(t, e);
3954
3966
  }
3955
3967
 
3956
- function Ln(t, e) {
3968
+ function jn(t, e) {
3957
3969
  var n = {};
3958
3970
  return function(t) {
3959
3971
  for (var e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
@@ -3962,7 +3974,7 @@ function Ln(t, e) {
3962
3974
  // If we encounter an empty object, we explicitly add it to the update
3963
3975
  // mask to ensure that the server creates a map entry.
3964
3976
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : St(t, (function(t, r) {
3965
- var i = jn(r, e.et(t));
3977
+ var i = Ln(r, e.nt(t));
3966
3978
  null != i && (n[t] = i);
3967
3979
  })), {
3968
3980
  mapValue: {
@@ -4394,12 +4406,12 @@ var tr = /** @class */ function(e) {
4394
4406
  var nr = /** @class */ function(e) {
4395
4407
  function n(t, n, r) {
4396
4408
  var i = this;
4397
- return (i = e.call(this) || this).type = t, i.gt = n, i.bt = r, i;
4409
+ return (i = e.call(this) || this).type = t, i.gt = n, i.vt = r, i;
4398
4410
  }
4399
4411
  return t(n, e), n.prototype._apply = function(t) {
4400
4412
  return new sn(t.firestore, t.converter, function(t, e, n) {
4401
4413
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
4402
- }(t._query, this.gt, this.bt));
4414
+ }(t._query, this.gt, this.vt));
4403
4415
  }, n;
4404
4416
  }($n);
4405
4417
 
@@ -4428,10 +4440,10 @@ function ir(t) {
4428
4440
  var or = /** @class */ function(e) {
4429
4441
  function n(t, n, r) {
4430
4442
  var i = this;
4431
- return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
4443
+ return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
4432
4444
  }
4433
4445
  return t(n, e), n.prototype._apply = function(t) {
4434
- var e = fr(t, this.type, this.vt, this.Et);
4446
+ var e = fr(t, this.type, this.bt, this.Et);
4435
4447
  return new sn(t.firestore, t.converter, function(t, e) {
4436
4448
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
4437
4449
  }(t._query, e));
@@ -4453,10 +4465,10 @@ function sr() {
4453
4465
  var ur = /** @class */ function(e) {
4454
4466
  function n(t, n, r) {
4455
4467
  var i = this;
4456
- return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
4468
+ return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
4457
4469
  }
4458
4470
  return t(n, e), n.prototype._apply = function(t) {
4459
- var e = fr(t, this.type, this.vt, this.Et);
4471
+ var e = fr(t, this.type, this.bt, this.Et);
4460
4472
  return new sn(t.firestore, t.converter, function(t, e) {
4461
4473
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
4462
4474
  }(t._query, e));
@@ -4721,7 +4733,7 @@ var yr = /** @class */ function(e) {
4721
4733
  * @returns A Promise that will be resolved with the results of the query.
4722
4734
  */ function gr(t) {
4723
4735
  !function(t) {
4724
- if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(L, "limitToLast() queries require specifying at least one orderBy() clause");
4736
+ if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(j, "limitToLast() queries require specifying at least one orderBy() clause");
4725
4737
  }((t = st(t, sn))._query);
4726
4738
  var e = Je(t.firestore), n = new yr(t.firestore);
4727
4739
  return $e(e, t._query).then((function(e) {
@@ -5187,8 +5199,8 @@ function Dr(t, e) {
5187
5199
  // the context and should handled individually by the calling code.
5188
5200
  // See https://cloud.google.com/apis/design/errors.
5189
5201
  case C:
5190
- case j:
5191
5202
  case L:
5203
+ case j:
5192
5204
  case "data-loss":
5193
5205
  return !0;
5194
5206
  }
@@ -5559,7 +5571,7 @@ function Dr(t, e) {
5559
5571
  var e = this.St.indexOf(t);
5560
5572
  this.St.splice(e, 1);
5561
5573
  }, t;
5562
- }(), jr = /** @class */ function() {
5574
+ }(), Lr = /** @class */ function() {
5563
5575
  /** @hideconstructor */
5564
5576
  function t(t, e) {
5565
5577
  this._firestore = t, this._transaction = e, this._dataReader = In(t)
@@ -5635,10 +5647,10 @@ function Dr(t, e) {
5635
5647
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
5636
5648
  * rejected promise with the corresponding failure error is returned.
5637
5649
  */
5638
- function Lr(t, e) {
5650
+ function jr(t, e) {
5639
5651
  var n = Je(t = st(t, tn)), r = new x;
5640
5652
  return new qr(new Cr, n, (function(n) {
5641
- return e(new jr(t, n));
5653
+ return e(new Lr(t, n));
5642
5654
  }), r).run(), r.promise
5643
5655
  /**
5644
5656
  * Firestore Lite
@@ -5655,7 +5667,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
5655
5667
  return n && i._setSettings(n), i;
5656
5668
  }), "PUBLIC")),
5657
5669
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
5658
- a("firestore-lite", "3.4.4-canary.f5ac47fb1", ""), a("firestore-lite", "3.4.4-canary.f5ac47fb1", "esm5");
5670
+ a("firestore-lite", "3.4.5", ""), a("firestore-lite", "3.4.5", "esm5");
5659
5671
 
5660
- export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, U as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, jr 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, Lr 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 };
5672
+ export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, U 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 };
5661
5673
  //# sourceMappingURL=index.browser.esm5.js.map