@dereekb/firebase 13.12.8 → 13.13.0

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.
@@ -243,7 +243,7 @@ import { parse as parse$2 } from '@typescript-eslint/parser';
243
243
  description: 'Reject function signatures with more than four positional parameters; require a single config object.'
244
244
  });
245
245
 
246
- function _array_like_to_array$h(arr, len) {
246
+ function _array_like_to_array$i(arr, len) {
247
247
  if (len == null || len > arr.length) len = arr.length;
248
248
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
249
249
  return arr2;
@@ -279,15 +279,15 @@ function _non_iterable_rest$a() {
279
279
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
280
280
  }
281
281
  function _sliced_to_array$a(arr, i) {
282
- return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$a();
282
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$a();
283
283
  }
284
- function _unsupported_iterable_to_array$h(o, minLen) {
284
+ function _unsupported_iterable_to_array$i(o, minLen) {
285
285
  if (!o) return;
286
- if (typeof o === "string") return _array_like_to_array$h(o, minLen);
286
+ if (typeof o === "string") return _array_like_to_array$i(o, minLen);
287
287
  var n = Object.prototype.toString.call(o).slice(8, -1);
288
288
  if (n === "Object" && o.constructor) n = o.constructor.name;
289
289
  if (n === "Map" || n === "Set") return Array.from(n);
290
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
290
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
291
291
  }
292
292
  var TAG_LINE_REGEX = /^@([A-Za-z_]\w*)\s*(.*)$/;
293
293
  var TYPE_ANNOTATION_REGEX = /^\{([^}]*)\}\s*(.*)$/;
@@ -636,7 +636,7 @@ var LINE_PREFIX_REGEX = /^(\s*\*?\s?)(.*)$/;
636
636
  * companions are required/optional, what value format each accepts, and which
637
637
  * messageId to emit when a check fails. The rule body itself only wires the
638
638
  * visitors and message map; all value-format validation lives here.
639
- */ function _array_like_to_array$g(arr, len) {
639
+ */ function _array_like_to_array$h(arr, len) {
640
640
  if (len == null || len > arr.length) len = arr.length;
641
641
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
642
642
  return arr2;
@@ -672,15 +672,15 @@ function _non_iterable_rest$9() {
672
672
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
673
673
  }
674
674
  function _sliced_to_array$9(arr, i) {
675
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$9();
675
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$9();
676
676
  }
677
- function _unsupported_iterable_to_array$g(o, minLen) {
677
+ function _unsupported_iterable_to_array$h(o, minLen) {
678
678
  if (!o) return;
679
- if (typeof o === "string") return _array_like_to_array$g(o, minLen);
679
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
680
680
  var n = Object.prototype.toString.call(o).slice(8, -1);
681
681
  if (n === "Object" && o.constructor) n = o.constructor.name;
682
682
  if (n === "Map" || n === "Set") return Array.from(n);
683
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
683
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
684
684
  }
685
685
  /**
686
686
  * Kebab-case slug pattern: lowercase letters/digits, words separated by single hyphens,
@@ -1128,30 +1128,30 @@ function checkCompanion(input) {
1128
1128
  return result;
1129
1129
  }
1130
1130
 
1131
- function _array_like_to_array$f(arr, len) {
1131
+ function _array_like_to_array$g(arr, len) {
1132
1132
  if (len == null || len > arr.length) len = arr.length;
1133
1133
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1134
1134
  return arr2;
1135
1135
  }
1136
- function _array_without_holes$a(arr) {
1137
- if (Array.isArray(arr)) return _array_like_to_array$f(arr);
1136
+ function _array_without_holes$b(arr) {
1137
+ if (Array.isArray(arr)) return _array_like_to_array$g(arr);
1138
1138
  }
1139
- function _iterable_to_array$a(iter) {
1139
+ function _iterable_to_array$b(iter) {
1140
1140
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1141
1141
  }
1142
- function _non_iterable_spread$a() {
1142
+ function _non_iterable_spread$b() {
1143
1143
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1144
1144
  }
1145
- function _to_consumable_array$a(arr) {
1146
- return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$a();
1145
+ function _to_consumable_array$b(arr) {
1146
+ return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$b();
1147
1147
  }
1148
- function _unsupported_iterable_to_array$f(o, minLen) {
1148
+ function _unsupported_iterable_to_array$g(o, minLen) {
1149
1149
  if (!o) return;
1150
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
1150
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
1151
1151
  var n = Object.prototype.toString.call(o).slice(8, -1);
1152
1152
  if (n === "Object" && o.constructor) n = o.constructor.name;
1153
1153
  if (n === "Map" || n === "Set") return Array.from(n);
1154
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
1154
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
1155
1155
  }
1156
1156
  /**
1157
1157
  * Module that publishes the `@dereekb/firebase` Firestore constraint factories (`where`, `orderBy`, etc.).
@@ -1300,7 +1300,7 @@ function qualifiedNameTail(node) {
1300
1300
  * Combined list of every Firestore constraint factory exported from `@dereekb/firebase`. Used
1301
1301
  * by the body-coherence rule to ensure a tagged factory body contains at least one constraint
1302
1302
  * call of any kind (index-affecting or pagination) before warning that the marker is orphaned.
1303
- */ var DEFAULT_CONSTRAINT_FACTORY_NAMES = _to_consumable_array$a(DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES).concat(_to_consumable_array$a(DEFAULT_PAGINATION_CONSTRAINT_NAMES));
1303
+ */ var DEFAULT_CONSTRAINT_FACTORY_NAMES = _to_consumable_array$b(DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES).concat(_to_consumable_array$b(DEFAULT_PAGINATION_CONSTRAINT_NAMES));
1304
1304
  /**
1305
1305
  * Creates an empty {@link ImportRegistry}.
1306
1306
  *
@@ -1761,30 +1761,30 @@ function qualifiedNameTail(node) {
1761
1761
  });
1762
1762
  }
1763
1763
 
1764
- function _array_like_to_array$e(arr, len) {
1764
+ function _array_like_to_array$f(arr, len) {
1765
1765
  if (len == null || len > arr.length) len = arr.length;
1766
1766
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1767
1767
  return arr2;
1768
1768
  }
1769
- function _array_without_holes$9(arr) {
1770
- if (Array.isArray(arr)) return _array_like_to_array$e(arr);
1769
+ function _array_without_holes$a(arr) {
1770
+ if (Array.isArray(arr)) return _array_like_to_array$f(arr);
1771
1771
  }
1772
- function _iterable_to_array$9(iter) {
1772
+ function _iterable_to_array$a(iter) {
1773
1773
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1774
1774
  }
1775
- function _non_iterable_spread$9() {
1775
+ function _non_iterable_spread$a() {
1776
1776
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1777
1777
  }
1778
- function _to_consumable_array$9(arr) {
1779
- return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$9();
1778
+ function _to_consumable_array$a(arr) {
1779
+ return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$a();
1780
1780
  }
1781
- function _unsupported_iterable_to_array$e(o, minLen) {
1781
+ function _unsupported_iterable_to_array$f(o, minLen) {
1782
1782
  if (!o) return;
1783
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
1783
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
1784
1784
  var n = Object.prototype.toString.call(o).slice(8, -1);
1785
1785
  if (n === "Object" && o.constructor) n = o.constructor.name;
1786
1786
  if (n === "Map" || n === "Set") return Array.from(n);
1787
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
1787
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
1788
1788
  }
1789
1789
  /**
1790
1790
  * ESLint rule that forbids inline `@dereekb/firebase` Firestore constraint factory calls
@@ -1842,7 +1842,7 @@ function _unsupported_iterable_to_array$e(o, minLen) {
1842
1842
  var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
1843
1843
  var sourceCode = context.sourceCode;
1844
1844
  var baseNames = (_options_constraintNames = options.constraintNames) !== null && _options_constraintNames !== void 0 ? _options_constraintNames : DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES;
1845
- var constraintNames = new Set(_to_consumable_array$9(baseNames).concat(_to_consumable_array$9((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
1845
+ var constraintNames = new Set(_to_consumable_array$a(baseNames).concat(_to_consumable_array$a((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
1846
1846
  var allowedSources = new Set((_options_allowedImportSources = options.allowedImportSources) !== null && _options_allowedImportSources !== void 0 ? _options_allowedImportSources : [
1847
1847
  FIREBASE_MODULE
1848
1848
  ]);
@@ -1861,10 +1861,10 @@ function _unsupported_iterable_to_array$e(o, minLen) {
1861
1861
  return result;
1862
1862
  }
1863
1863
  function pushFrame(node) {
1864
- var _ref;
1864
+ var _stack_at, _ref;
1865
1865
  var anchor = getFunctionJsdocAnchor(node);
1866
1866
  var tagged = anchor ? jsdocHasMarker(anchor) : false;
1867
- var parent = stack.length > 0 ? stack[stack.length - 1] : null;
1867
+ var parent = (_stack_at = stack.at(-1)) !== null && _stack_at !== void 0 ? _stack_at : null;
1868
1868
  var taggedDeep = tagged || ((_ref = parent === null || parent === void 0 ? void 0 : parent.taggedDeep) !== null && _ref !== void 0 ? _ref : false);
1869
1869
  stack.push({
1870
1870
  node: node,
@@ -1873,7 +1873,8 @@ function _unsupported_iterable_to_array$e(o, minLen) {
1873
1873
  });
1874
1874
  }
1875
1875
  function popFrame(node) {
1876
- if (stack.length > 0 && stack[stack.length - 1].node === node) {
1876
+ var _stack_at;
1877
+ if (((_stack_at = stack.at(-1)) === null || _stack_at === void 0 ? void 0 : _stack_at.node) === node) {
1877
1878
  stack.pop();
1878
1879
  }
1879
1880
  }
@@ -2135,6 +2136,19 @@ var DEFAULT_KNOWN_COMPANIONS = [
2135
2136
  'Path',
2136
2137
  'Helper'
2137
2138
  ];
2139
+ function extractGenericIdentifier(callNode) {
2140
+ var _callNode_typeArguments;
2141
+ var params = (_callNode_typeArguments = callNode.typeArguments) !== null && _callNode_typeArguments !== void 0 ? _callNode_typeArguments : callNode.typeParameters;
2142
+ var result = null;
2143
+ if (params && Array.isArray(params.params) && params.params.length > 0) {
2144
+ var _first_typeName;
2145
+ var first = params.params[0];
2146
+ if ((first === null || first === void 0 ? void 0 : first.type) === 'TSTypeReference' && ((_first_typeName = first.typeName) === null || _first_typeName === void 0 ? void 0 : _first_typeName.type) === 'Identifier') {
2147
+ result = first.typeName.name;
2148
+ }
2149
+ }
2150
+ return result;
2151
+ }
2138
2152
  /**
2139
2153
  * ESLint rule enforcing `@dbxModelFirebaseIndex` companion tags and body coherence.
2140
2154
  * Mirrors the scanner schema at
@@ -2550,19 +2564,6 @@ var DEFAULT_KNOWN_COMPANIONS = [
2550
2564
  }
2551
2565
  }
2552
2566
  }
2553
- function extractGenericIdentifier(callNode) {
2554
- var _callNode_typeArguments;
2555
- var params = (_callNode_typeArguments = callNode.typeArguments) !== null && _callNode_typeArguments !== void 0 ? _callNode_typeArguments : callNode.typeParameters;
2556
- var result = null;
2557
- if (params && Array.isArray(params.params) && params.params.length > 0) {
2558
- var _first_typeName;
2559
- var first = params.params[0];
2560
- if ((first === null || first === void 0 ? void 0 : first.type) === 'TSTypeReference' && ((_first_typeName = first.typeName) === null || _first_typeName === void 0 ? void 0 : _first_typeName.type) === 'Identifier') {
2561
- result = first.typeName.name;
2562
- }
2563
- }
2564
- return result;
2565
- }
2566
2567
  function checkBody(node, parsed) {
2567
2568
  if (!checkBodyCoherence) return;
2568
2569
  var skip = getSkipTagValue(parsed);
@@ -2651,6 +2652,15 @@ function _type_of$8(obj) {
2651
2652
  /**
2652
2653
  * Default suffix used to recognise a presumed-tagged query factory by name (single-file scope).
2653
2654
  */ var DEFAULT_PRESUMED_TAGGED_SUFFIX = 'Query';
2655
+ function recordVariableDeclarator(node, emptyArrayDeclarators) {
2656
+ var _node_id, _node_init;
2657
+ if (((_node_id = node.id) === null || _node_id === void 0 ? void 0 : _node_id.type) === 'Identifier' && ((_node_init = node.init) === null || _node_init === void 0 ? void 0 : _node_init.type) === 'ArrayExpression' && Array.isArray(node.init.elements) && node.init.elements.length === 0) {
2658
+ emptyArrayDeclarators.push({
2659
+ node: node,
2660
+ name: node.id.name
2661
+ });
2662
+ }
2663
+ }
2654
2664
  /**
2655
2665
  * ESLint rule enforcing that `@dbxModelFirebaseIndexDispatcher`-tagged factories delegate to
2656
2666
  * other `@dbxModelFirebaseIndex`-tagged query factories instead of building constraints directly.
@@ -2774,15 +2784,6 @@ function _type_of$8(obj) {
2774
2784
  pushReceivers.add(node.callee.object.name);
2775
2785
  }
2776
2786
  }
2777
- function recordVariableDeclarator(node, emptyArrayDeclarators) {
2778
- var _node_id, _node_init;
2779
- if (((_node_id = node.id) === null || _node_id === void 0 ? void 0 : _node_id.type) === 'Identifier' && ((_node_init = node.init) === null || _node_init === void 0 ? void 0 : _node_init.type) === 'ArrayExpression' && Array.isArray(node.init.elements) && node.init.elements.length === 0) {
2780
- emptyArrayDeclarators.push({
2781
- node: node,
2782
- name: node.id.name
2783
- });
2784
- }
2785
- }
2786
2787
  function scanBody(body) {
2787
2788
  var constraintCalls = [];
2788
2789
  var emptyArrayDeclarators = [];
@@ -2925,30 +2926,35 @@ function _type_of$8(obj) {
2925
2926
  }
2926
2927
  };
2927
2928
 
2928
- function _array_like_to_array$d(arr, len) {
2929
+ function _array_like_to_array$e(arr, len) {
2929
2930
  if (len == null || len > arr.length) len = arr.length;
2930
2931
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2931
2932
  return arr2;
2932
2933
  }
2933
- function _array_without_holes$8(arr) {
2934
- if (Array.isArray(arr)) return _array_like_to_array$d(arr);
2934
+ function _array_without_holes$9(arr) {
2935
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
2935
2936
  }
2936
- function _iterable_to_array$8(iter) {
2937
+ function _iterable_to_array$9(iter) {
2937
2938
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2938
2939
  }
2939
- function _non_iterable_spread$8() {
2940
+ function _non_iterable_spread$9() {
2940
2941
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2941
2942
  }
2942
- function _to_consumable_array$8(arr) {
2943
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$8();
2943
+ function _to_consumable_array$9(arr) {
2944
+ return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$9();
2944
2945
  }
2945
- function _unsupported_iterable_to_array$d(o, minLen) {
2946
+ function _unsupported_iterable_to_array$e(o, minLen) {
2946
2947
  if (!o) return;
2947
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
2948
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
2948
2949
  var n = Object.prototype.toString.call(o).slice(8, -1);
2949
2950
  if (n === "Object" && o.constructor) n = o.constructor.name;
2950
2951
  if (n === "Map" || n === "Set") return Array.from(n);
2951
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
2952
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
2953
+ }
2954
+ function hasTypeArgument(node) {
2955
+ var _node_typeArguments;
2956
+ var args = (_node_typeArguments = node.typeArguments) !== null && _node_typeArguments !== void 0 ? _node_typeArguments : node.typeParameters;
2957
+ return Boolean(args && Array.isArray(args.params) && args.params.length > 0);
2952
2958
  }
2953
2959
  /**
2954
2960
  * ESLint rule that warns when an `@dereekb/firebase` field-path-narrowing constraint factory
@@ -3003,7 +3009,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
3003
3009
  var _context_options_, _options_constraintNames, _options_additionalConstraintNames, _options_allowedImportSources;
3004
3010
  var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
3005
3011
  var baseNames = (_options_constraintNames = options.constraintNames) !== null && _options_constraintNames !== void 0 ? _options_constraintNames : DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES;
3006
- var constraintNames = new Set(_to_consumable_array$8(baseNames).concat(_to_consumable_array$8((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
3012
+ var constraintNames = new Set(_to_consumable_array$9(baseNames).concat(_to_consumable_array$9((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
3007
3013
  var allowedSources = new Set((_options_allowedImportSources = options.allowedImportSources) !== null && _options_allowedImportSources !== void 0 ? _options_allowedImportSources : [
3008
3014
  FIREBASE_MODULE
3009
3015
  ]);
@@ -3024,11 +3030,6 @@ function _unsupported_iterable_to_array$d(o, minLen) {
3024
3030
  }
3025
3031
  return result;
3026
3032
  }
3027
- function hasTypeArgument(node) {
3028
- var _node_typeArguments;
3029
- var args = (_node_typeArguments = node.typeArguments) !== null && _node_typeArguments !== void 0 ? _node_typeArguments : node.typeParameters;
3030
- return Boolean(args && Array.isArray(args.params) && args.params.length > 0);
3031
- }
3032
3033
  return {
3033
3034
  ImportDeclaration: function ImportDeclaration(node) {
3034
3035
  return trackImportDeclaration(registry, node);
@@ -3049,7 +3050,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
3049
3050
  }
3050
3051
  };
3051
3052
 
3052
- function _array_like_to_array$c(arr, len) {
3053
+ function _array_like_to_array$d(arr, len) {
3053
3054
  if (len == null || len > arr.length) len = arr.length;
3054
3055
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3055
3056
  return arr2;
@@ -3085,15 +3086,15 @@ function _non_iterable_rest$8() {
3085
3086
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3086
3087
  }
3087
3088
  function _sliced_to_array$8(arr, i) {
3088
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$8();
3089
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$8();
3089
3090
  }
3090
- function _unsupported_iterable_to_array$c(o, minLen) {
3091
+ function _unsupported_iterable_to_array$d(o, minLen) {
3091
3092
  if (!o) return;
3092
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
3093
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
3093
3094
  var n = Object.prototype.toString.call(o).slice(8, -1);
3094
3095
  if (n === "Object" && o.constructor) n = o.constructor.name;
3095
3096
  if (n === "Map" || n === "Set") return Array.from(n);
3096
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
3097
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
3097
3098
  }
3098
3099
  /**
3099
3100
  * Type-reference name that triggers this rule. Variables whose declared type is
@@ -4661,7 +4662,7 @@ var RESERVED = new Set([
4661
4662
  'prototype'
4662
4663
  ]);
4663
4664
 
4664
- function _array_like_to_array$b(arr, len) {
4665
+ function _array_like_to_array$c(arr, len) {
4665
4666
  if (len == null || len > arr.length) len = arr.length;
4666
4667
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4667
4668
  return arr2;
@@ -4764,19 +4765,19 @@ function _non_iterable_rest$7() {
4764
4765
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4765
4766
  }
4766
4767
  function _sliced_to_array$7(arr, i) {
4767
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$7();
4768
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$7();
4768
4769
  }
4769
4770
  function _type_of$6(obj) {
4770
4771
  "@swc/helpers - typeof";
4771
4772
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4772
4773
  }
4773
- function _unsupported_iterable_to_array$b(o, minLen) {
4774
+ function _unsupported_iterable_to_array$c(o, minLen) {
4774
4775
  if (!o) return;
4775
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
4776
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
4776
4777
  var n = Object.prototype.toString.call(o).slice(8, -1);
4777
4778
  if (n === "Object" && o.constructor) n = o.constructor.name;
4778
4779
  if (n === "Map" || n === "Set") return Array.from(n);
4779
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
4780
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
4780
4781
  }
4781
4782
  var _value = /*#__PURE__*/ new WeakMap();
4782
4783
  var _Symbol_for = Symbol.for('nodejs.util.inspect.custom');
@@ -5431,7 +5432,7 @@ function stringSize(str) {
5431
5432
  return count;
5432
5433
  }
5433
5434
 
5434
- function _array_like_to_array$a(arr, len) {
5435
+ function _array_like_to_array$b(arr, len) {
5435
5436
  if (len == null || len > arr.length) len = arr.length;
5436
5437
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5437
5438
  return arr2;
@@ -5439,8 +5440,8 @@ function _array_like_to_array$a(arr, len) {
5439
5440
  function _array_with_holes$6(arr) {
5440
5441
  if (Array.isArray(arr)) return arr;
5441
5442
  }
5442
- function _array_without_holes$7(arr) {
5443
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
5443
+ function _array_without_holes$8(arr) {
5444
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
5444
5445
  }
5445
5446
  function _assert_this_initialized$2(self) {
5446
5447
  if (self === void 0) {
@@ -5596,7 +5597,7 @@ function _instanceof$6(left, right) {
5596
5597
  function _is_native_function(fn) {
5597
5598
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
5598
5599
  }
5599
- function _iterable_to_array$7(iter) {
5600
+ function _iterable_to_array$8(iter) {
5600
5601
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5601
5602
  }
5602
5603
  function _iterable_to_array_limit$6(arr, i) {
@@ -5626,7 +5627,7 @@ function _iterable_to_array_limit$6(arr, i) {
5626
5627
  function _non_iterable_rest$6() {
5627
5628
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5628
5629
  }
5629
- function _non_iterable_spread$7() {
5630
+ function _non_iterable_spread$8() {
5630
5631
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5631
5632
  }
5632
5633
  function _possible_constructor_return$2(self, call) {
@@ -5643,7 +5644,7 @@ function _set_prototype_of$2(o, p) {
5643
5644
  return _set_prototype_of$2(o, p);
5644
5645
  }
5645
5646
  function _sliced_to_array$6(arr, i) {
5646
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$6();
5647
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$6();
5647
5648
  }
5648
5649
  function _super_prop_base(object, property) {
5649
5650
  while(!Object.prototype.hasOwnProperty.call(object, property)){
@@ -5652,20 +5653,20 @@ function _super_prop_base(object, property) {
5652
5653
  }
5653
5654
  return object;
5654
5655
  }
5655
- function _to_consumable_array$7(arr) {
5656
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$7();
5656
+ function _to_consumable_array$8(arr) {
5657
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$8();
5657
5658
  }
5658
5659
  function _type_of$5(obj) {
5659
5660
  "@swc/helpers - typeof";
5660
5661
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5661
5662
  }
5662
- function _unsupported_iterable_to_array$a(o, minLen) {
5663
+ function _unsupported_iterable_to_array$b(o, minLen) {
5663
5664
  if (!o) return;
5664
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
5665
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
5665
5666
  var n = Object.prototype.toString.call(o).slice(8, -1);
5666
5667
  if (n === "Object" && o.constructor) n = o.constructor.name;
5667
5668
  if (n === "Map" || n === "Set") return Array.from(n);
5668
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
5669
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
5669
5670
  }
5670
5671
  function _wrap_native_super(Class) {
5671
5672
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -6511,7 +6512,7 @@ var objTypesDecls = [
6511
6512
  TYPES.bytes,
6512
6513
  celTypes.bytes
6513
6514
  ]
6514
- ].concat(_to_consumable_array$7(typeof Buffer !== 'undefined' ? [
6515
+ ].concat(_to_consumable_array$8(typeof Buffer !== 'undefined' ? [
6515
6516
  [
6516
6517
  Buffer,
6517
6518
  'bytes',
@@ -7154,11 +7155,11 @@ function ensureCandiate(c, key) {
7154
7155
  }
7155
7156
  function getOperators() {
7156
7157
  if (_class_private_field_get$2(this, _operators)) return _class_private_field_get$2(this, _operators);
7157
- return _class_private_field_set$2(this, _operators, _to_consumable_array$7(_class_private_field_get$2(this, _others).operators));
7158
+ return _class_private_field_set$2(this, _operators, _to_consumable_array$8(_class_private_field_get$2(this, _others).operators));
7158
7159
  }
7159
7160
  function getFunctions() {
7160
7161
  if (_class_private_field_get$2(this, _functions)) return _class_private_field_get$2(this, _functions);
7161
- return _class_private_field_set$2(this, _functions, _to_consumable_array$7(_class_private_field_get$2(this, _others).functions));
7162
+ return _class_private_field_set$2(this, _functions, _to_consumable_array$8(_class_private_field_get$2(this, _others).functions));
7162
7163
  }
7163
7164
  function functionCandidates(key) {
7164
7165
  if (_class_private_field_get$2(this, _functionsByKey)) return _class_private_method_get$2(this, _ensureCandiate, ensureCandiate).call(this, _class_private_field_get$2(this, _functionsByKey), key);
@@ -7270,7 +7271,7 @@ function createDeclaration(creator, key) {
7270
7271
  for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
7271
7272
  args[_key - 2] = arguments[_key];
7272
7273
  }
7273
- return _class_private_field_get$2(this, _typeDeclarations).get(key) || _class_private_field_get$2(this, _typeDeclarations).set(key, creator.apply(void 0, _to_consumable_array$7(args))).get(key);
7274
+ return _class_private_field_get$2(this, _typeDeclarations).get(key) || _class_private_field_get$2(this, _typeDeclarations).set(key, creator.apply(void 0, _to_consumable_array$8(args))).get(key);
7274
7275
  }
7275
7276
  function toCelFieldType(field) {
7276
7277
  if (typeof field === 'string') return {
@@ -7723,7 +7724,7 @@ var OverlayContext = /*#__PURE__*/ function() {
7723
7724
  }
7724
7725
  }
7725
7726
 
7726
- function _array_like_to_array$9(arr, len) {
7727
+ function _array_like_to_array$a(arr, len) {
7727
7728
  if (len == null || len > arr.length) len = arr.length;
7728
7729
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7729
7730
  return arr2;
@@ -7731,8 +7732,8 @@ function _array_like_to_array$9(arr, len) {
7731
7732
  function _array_with_holes$5(arr) {
7732
7733
  if (Array.isArray(arr)) return arr;
7733
7734
  }
7734
- function _array_without_holes$6(arr) {
7735
- if (Array.isArray(arr)) return _array_like_to_array$9(arr);
7735
+ function _array_without_holes$7(arr) {
7736
+ if (Array.isArray(arr)) return _array_like_to_array$a(arr);
7736
7737
  }
7737
7738
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
7738
7739
  try {
@@ -7802,7 +7803,7 @@ function _instanceof$5(left, right) {
7802
7803
  return left instanceof right;
7803
7804
  }
7804
7805
  }
7805
- function _iterable_to_array$6(iter) {
7806
+ function _iterable_to_array$7(iter) {
7806
7807
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7807
7808
  }
7808
7809
  function _iterable_to_array_limit$5(arr, i) {
@@ -7832,26 +7833,26 @@ function _iterable_to_array_limit$5(arr, i) {
7832
7833
  function _non_iterable_rest$5() {
7833
7834
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7834
7835
  }
7835
- function _non_iterable_spread$6() {
7836
+ function _non_iterable_spread$7() {
7836
7837
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7837
7838
  }
7838
7839
  function _sliced_to_array$5(arr, i) {
7839
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$5();
7840
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$5();
7840
7841
  }
7841
- function _to_consumable_array$6(arr) {
7842
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$6();
7842
+ function _to_consumable_array$7(arr) {
7843
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$7();
7843
7844
  }
7844
7845
  function _type_of$4(obj) {
7845
7846
  "@swc/helpers - typeof";
7846
7847
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
7847
7848
  }
7848
- function _unsupported_iterable_to_array$9(o, minLen) {
7849
+ function _unsupported_iterable_to_array$a(o, minLen) {
7849
7850
  if (!o) return;
7850
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
7851
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
7851
7852
  var n = Object.prototype.toString.call(o).slice(8, -1);
7852
7853
  if (n === "Object" && o.constructor) n = o.constructor.name;
7853
7854
  if (n === "Map" || n === "Set") return Array.from(n);
7854
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
7855
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
7855
7856
  }
7856
7857
  function _ts_generator(thisArg, body) {
7857
7858
  var f, y, t, _ = {
@@ -8241,8 +8242,8 @@ function comprehensionElementType(chk, iterable, ctx) {
8241
8242
  throw chk.createError('invalid_comprehension_range', "Expression of type '".concat(chk.formatType(iterType), "' cannot be range of a comprehension (must be list, map, or dynamic)."), iterable);
8242
8243
  }
8243
8244
  function toIterable(ev, args, coll) {
8244
- if (_instanceof$5(coll, Set)) return _to_consumable_array$6(coll);
8245
- if (_instanceof$5(coll, Map)) return _to_consumable_array$6(coll.keys());
8245
+ if (_instanceof$5(coll, Set)) return _to_consumable_array$7(coll);
8246
+ if (_instanceof$5(coll, Map)) return _to_consumable_array$7(coll.keys());
8246
8247
  if (coll && (typeof coll === "undefined" ? "undefined" : _type_of$4(coll)) === 'object') return objKeys(coll);
8247
8248
  throw ev.createError('invalid_comprehension_range', "Expression of type '".concat(ev.debugType(coll), "' cannot be range of a comprehension (must be list, map, or dynamic)."), args.iterable);
8248
8249
  }
@@ -8513,7 +8514,7 @@ var OPERATORS = {
8513
8514
  });
8514
8515
  ast.receiverWithArgs = [
8515
8516
  receiver
8516
- ].concat(_to_consumable_array$6(args));
8517
+ ].concat(_to_consumable_array$7(args));
8517
8518
  ast.handle = maybeAsync(ast.receiverWithArgs, false, callRecFn);
8518
8519
  if (receiverType.kind === 'dyn' && candidates.returnType) return candidates.returnType;
8519
8520
  var decl = candidates.findFunction(argTypes, receiverType);
@@ -8766,7 +8767,7 @@ try {
8766
8767
  }
8767
8768
  }
8768
8769
 
8769
- function _array_like_to_array$8(arr, len) {
8770
+ function _array_like_to_array$9(arr, len) {
8770
8771
  if (len == null || len > arr.length) len = arr.length;
8771
8772
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8772
8773
  return arr2;
@@ -8815,15 +8816,15 @@ function _non_iterable_rest$4() {
8815
8816
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8816
8817
  }
8817
8818
  function _sliced_to_array$4(arr, i) {
8818
- return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$4();
8819
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$4();
8819
8820
  }
8820
- function _unsupported_iterable_to_array$8(o, minLen) {
8821
+ function _unsupported_iterable_to_array$9(o, minLen) {
8821
8822
  if (!o) return;
8822
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
8823
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
8823
8824
  var n = Object.prototype.toString.call(o).slice(8, -1);
8824
8825
  if (n === "Object" && o.constructor) n = o.constructor.name;
8825
8826
  if (n === "Map" || n === "Set") return Array.from(n);
8826
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
8827
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
8827
8828
  }
8828
8829
  var identity = function identity(x) {
8829
8830
  return x;
@@ -9063,7 +9064,7 @@ function registerMacros(registry) {
9063
9064
  });
9064
9065
  }
9065
9066
 
9066
- function _array_like_to_array$7(arr, len) {
9067
+ function _array_like_to_array$8(arr, len) {
9067
9068
  if (len == null || len > arr.length) len = arr.length;
9068
9069
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9069
9070
  return arr2;
@@ -9071,8 +9072,8 @@ function _array_like_to_array$7(arr, len) {
9071
9072
  function _array_with_holes$3(arr) {
9072
9073
  if (Array.isArray(arr)) return arr;
9073
9074
  }
9074
- function _array_without_holes$5(arr) {
9075
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
9075
+ function _array_without_holes$6(arr) {
9076
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
9076
9077
  }
9077
9078
  function _instanceof$3(left, right) {
9078
9079
  "@swc/helpers - instanceof";
@@ -9082,7 +9083,7 @@ function _instanceof$3(left, right) {
9082
9083
  return left instanceof right;
9083
9084
  }
9084
9085
  }
9085
- function _iterable_to_array$5(iter) {
9086
+ function _iterable_to_array$6(iter) {
9086
9087
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9087
9088
  }
9088
9089
  function _iterable_to_array_limit$3(arr, i) {
@@ -9112,26 +9113,26 @@ function _iterable_to_array_limit$3(arr, i) {
9112
9113
  function _non_iterable_rest$3() {
9113
9114
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9114
9115
  }
9115
- function _non_iterable_spread$5() {
9116
+ function _non_iterable_spread$6() {
9116
9117
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9117
9118
  }
9118
9119
  function _sliced_to_array$3(arr, i) {
9119
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$3();
9120
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$3();
9120
9121
  }
9121
- function _to_consumable_array$5(arr) {
9122
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$5();
9122
+ function _to_consumable_array$6(arr) {
9123
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$6();
9123
9124
  }
9124
9125
  function _type_of$3(obj) {
9125
9126
  "@swc/helpers - typeof";
9126
9127
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9127
9128
  }
9128
- function _unsupported_iterable_to_array$7(o, minLen) {
9129
+ function _unsupported_iterable_to_array$8(o, minLen) {
9129
9130
  if (!o) return;
9130
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
9131
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
9131
9132
  var n = Object.prototype.toString.call(o).slice(8, -1);
9132
9133
  if (n === "Object" && o.constructor) n = o.constructor.name;
9133
9134
  if (n === "Map" || n === "Set") return Array.from(n);
9134
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
9135
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
9135
9136
  }
9136
9137
  function registerOverloads(registry) {
9137
9138
  var unaryOverload = function unaryOverload(op, t, h, ret) {
@@ -9198,7 +9199,7 @@ function registerOverloads(registry) {
9198
9199
  return a + b;
9199
9200
  });
9200
9201
  binaryOverload('list<V>', '+', 'list<V>', function(a, b) {
9201
- return _to_consumable_array$5(a).concat(_to_consumable_array$5(b));
9202
+ return _to_consumable_array$6(a).concat(_to_consumable_array$6(b));
9202
9203
  });
9203
9204
  binaryOverload('bytes', '+', 'bytes', function(a, b) {
9204
9205
  if (!a.length) return b;
@@ -9671,13 +9672,13 @@ var toDynTypeBinding = new Map().set('A', 'dyn').set('T', 'dyn').set('K', 'dyn')
9671
9672
  return TypeChecker;
9672
9673
  }(Base);
9673
9674
 
9674
- function _array_like_to_array$6(arr, len) {
9675
+ function _array_like_to_array$7(arr, len) {
9675
9676
  if (len == null || len > arr.length) len = arr.length;
9676
9677
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9677
9678
  return arr2;
9678
9679
  }
9679
- function _array_without_holes$4(arr) {
9680
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
9680
+ function _array_without_holes$5(arr) {
9681
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
9681
9682
  }
9682
9683
  function _check_private_redeclaration$1(obj, privateCollection) {
9683
9684
  if (privateCollection.has(obj)) {
@@ -9768,22 +9769,22 @@ function _instanceof$2(left, right) {
9768
9769
  return left instanceof right;
9769
9770
  }
9770
9771
  }
9771
- function _iterable_to_array$4(iter) {
9772
+ function _iterable_to_array$5(iter) {
9772
9773
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9773
9774
  }
9774
- function _non_iterable_spread$4() {
9775
+ function _non_iterable_spread$5() {
9775
9776
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9776
9777
  }
9777
- function _to_consumable_array$4(arr) {
9778
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
9778
+ function _to_consumable_array$5(arr) {
9779
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$5();
9779
9780
  }
9780
- function _unsupported_iterable_to_array$6(o, minLen) {
9781
+ function _unsupported_iterable_to_array$7(o, minLen) {
9781
9782
  if (!o) return;
9782
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
9783
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
9783
9784
  var n = Object.prototype.toString.call(o).slice(8, -1);
9784
9785
  if (n === "Object" && o.constructor) n = o.constructor.name;
9785
9786
  if (n === "Map" || n === "Set") return Array.from(n);
9786
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
9787
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
9787
9788
  }
9788
9789
  var TOKEN = {
9789
9790
  EOF: 0,
@@ -9980,7 +9981,7 @@ var ASTNode = /*#__PURE__*/ function() {
9980
9981
  ];
9981
9982
  return [
9982
9983
  this.op
9983
- ].concat(_to_consumable_array$4(args.map(function(a) {
9984
+ ].concat(_to_consumable_array$5(args.map(function(a) {
9984
9985
  return _instanceof$2(a, ASTNode) ? a.toOldStructure() : a;
9985
9986
  })));
9986
9987
  }
@@ -11325,7 +11326,7 @@ function parse(expression) {
11325
11326
  return globalEnvironment.parse(expression);
11326
11327
  }
11327
11328
 
11328
- function _array_like_to_array$5(arr, len) {
11329
+ function _array_like_to_array$6(arr, len) {
11329
11330
  if (len == null || len > arr.length) len = arr.length;
11330
11331
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11331
11332
  return arr2;
@@ -11333,8 +11334,8 @@ function _array_like_to_array$5(arr, len) {
11333
11334
  function _array_with_holes$2(arr) {
11334
11335
  if (Array.isArray(arr)) return arr;
11335
11336
  }
11336
- function _array_without_holes$3(arr) {
11337
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
11337
+ function _array_without_holes$4(arr) {
11338
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
11338
11339
  }
11339
11340
  function _instanceof(left, right) {
11340
11341
  "@swc/helpers - instanceof";
@@ -11344,7 +11345,7 @@ function _instanceof(left, right) {
11344
11345
  return left instanceof right;
11345
11346
  }
11346
11347
  }
11347
- function _iterable_to_array$3(iter) {
11348
+ function _iterable_to_array$4(iter) {
11348
11349
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11349
11350
  }
11350
11351
  function _iterable_to_array_limit$2(arr, i) {
@@ -11374,26 +11375,26 @@ function _iterable_to_array_limit$2(arr, i) {
11374
11375
  function _non_iterable_rest$2() {
11375
11376
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11376
11377
  }
11377
- function _non_iterable_spread$3() {
11378
+ function _non_iterable_spread$4() {
11378
11379
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11379
11380
  }
11380
11381
  function _sliced_to_array$2(arr, i) {
11381
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$2();
11382
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$2();
11382
11383
  }
11383
- function _to_consumable_array$3(arr) {
11384
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
11384
+ function _to_consumable_array$4(arr) {
11385
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
11385
11386
  }
11386
11387
  function _type_of(obj) {
11387
11388
  "@swc/helpers - typeof";
11388
11389
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
11389
11390
  }
11390
- function _unsupported_iterable_to_array$5(o, minLen) {
11391
+ function _unsupported_iterable_to_array$6(o, minLen) {
11391
11392
  if (!o) return;
11392
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
11393
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
11393
11394
  var n = Object.prototype.toString.call(o).slice(8, -1);
11394
11395
  if (n === "Object" && o.constructor) n = o.constructor.name;
11395
11396
  if (n === "Map" || n === "Set") return Array.from(n);
11396
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
11397
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
11397
11398
  }
11398
11399
  var REGEX_METACHARS_RE = /[.*+?^${}()|[\]\\]/;
11399
11400
  var HELPER_INLINE_MAX_DEPTH = 8;
@@ -11637,7 +11638,7 @@ function collectUniqueBranches(ast, helpers) {
11637
11638
  var result;
11638
11639
  if (node.op === '||') {
11639
11640
  var _node_args = _sliced_to_array$2(node.args, 2), l = _node_args[0], r = _node_args[1];
11640
- result = _to_consumable_array$3(toDnf(l)).concat(_to_consumable_array$3(toDnf(r)));
11641
+ result = _to_consumable_array$4(toDnf(l)).concat(_to_consumable_array$4(toDnf(r)));
11641
11642
  } else if (node.op === '&&') {
11642
11643
  var _node_args1 = _sliced_to_array$2(node.args, 2), l1 = _node_args1[0], r1 = _node_args1[1];
11643
11644
  var left = toDnf(l1);
@@ -11651,7 +11652,7 @@ function collectUniqueBranches(ast, helpers) {
11651
11652
  try {
11652
11653
  for(var _iterator1 = right[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
11653
11654
  var rd = _step1.value;
11654
- result.push(_to_consumable_array$3(ld).concat(_to_consumable_array$3(rd)));
11655
+ result.push(_to_consumable_array$4(ld).concat(_to_consumable_array$4(rd)));
11655
11656
  }
11656
11657
  } catch (err) {
11657
11658
  _didIteratorError1 = true;
@@ -11975,10 +11976,10 @@ function applyNumericBinaryOp(op, left, right) {
11975
11976
  * @param branch - The parsed branch.
11976
11977
  * @returns A signature string usable as a Map/Set key.
11977
11978
  */ function branchSignature(branch) {
11978
- var literals = _to_consumable_array$3(branch.allowedMimeLiterals).sort(function(a, b) {
11979
+ var literals = _to_consumable_array$4(branch.allowedMimeLiterals).sort(function(a, b) {
11979
11980
  return a.localeCompare(b);
11980
11981
  });
11981
- var regexes = _to_consumable_array$3(branch.allowedMimeRegexes).sort(function(a, b) {
11982
+ var regexes = _to_consumable_array$4(branch.allowedMimeRegexes).sort(function(a, b) {
11982
11983
  return a.localeCompare(b);
11983
11984
  });
11984
11985
  return "".concat(branch.maxFileSizeBytes, "|").concat(literals.join(','), "|").concat(regexes.join(','));
@@ -12580,30 +12581,30 @@ var ALLOW_WRITE_RE = /allow\s+(?:write|create|update)(?:\s*,\s*(?:write|create|u
12580
12581
  return ctx.results;
12581
12582
  }
12582
12583
 
12583
- function _array_like_to_array$4(arr, len) {
12584
+ function _array_like_to_array$5(arr, len) {
12584
12585
  if (len == null || len > arr.length) len = arr.length;
12585
12586
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
12586
12587
  return arr2;
12587
12588
  }
12588
- function _array_without_holes$2(arr) {
12589
- if (Array.isArray(arr)) return _array_like_to_array$4(arr);
12589
+ function _array_without_holes$3(arr) {
12590
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
12590
12591
  }
12591
- function _iterable_to_array$2(iter) {
12592
+ function _iterable_to_array$3(iter) {
12592
12593
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
12593
12594
  }
12594
- function _non_iterable_spread$2() {
12595
+ function _non_iterable_spread$3() {
12595
12596
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12596
12597
  }
12597
- function _to_consumable_array$2(arr) {
12598
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
12598
+ function _to_consumable_array$3(arr) {
12599
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
12599
12600
  }
12600
- function _unsupported_iterable_to_array$4(o, minLen) {
12601
+ function _unsupported_iterable_to_array$5(o, minLen) {
12601
12602
  if (!o) return;
12602
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
12603
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
12603
12604
  var n = Object.prototype.toString.call(o).slice(8, -1);
12604
12605
  if (n === "Object" && o.constructor) n = o.constructor.name;
12605
12606
  if (n === "Map" || n === "Set") return Array.from(n);
12606
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
12607
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
12607
12608
  }
12608
12609
  var MAX_FOLD_DEPTH = 24;
12609
12610
  var PATH_SEPARATOR = '/';
@@ -12647,29 +12648,29 @@ var PATH_SEPARATOR = '/';
12647
12648
  var env = new Map();
12648
12649
  bindParamsAsWildcards((_fn_params = fn.params) !== null && _fn_params !== void 0 ? _fn_params : [], env);
12649
12650
  var body = functionBodyExpression(fn);
12650
- if (!body) {
12651
- result = {
12652
- ok: false,
12653
- reason: 'buildUploadPath body is not a single return expression'
12654
- };
12655
- } else {
12651
+ if (body) {
12656
12652
  var frags = foldFrags(body, {
12657
12653
  scope: scope,
12658
12654
  env: env
12659
12655
  }, 0);
12660
- if (!frags) {
12661
- result = {
12662
- ok: false,
12663
- reason: 'buildUploadPath does not fold to a constant path (unknown const, unmodeled call, or runtime value)'
12664
- };
12665
- } else {
12656
+ if (frags) {
12666
12657
  result = {
12667
12658
  ok: true,
12668
12659
  path: {
12669
12660
  segments: fragsToSegments(frags)
12670
12661
  }
12671
12662
  };
12663
+ } else {
12664
+ result = {
12665
+ ok: false,
12666
+ reason: 'buildUploadPath does not fold to a constant path (unknown const, unmodeled call, or runtime value)'
12667
+ };
12672
12668
  }
12669
+ } else {
12670
+ result = {
12671
+ ok: false,
12672
+ reason: 'buildUploadPath body is not a single return expression'
12673
+ };
12673
12674
  }
12674
12675
  }
12675
12676
  return result;
@@ -12818,7 +12819,7 @@ function foldTemplateLiteral(node, frame, depth) {
12818
12819
  var _ref;
12819
12820
  var _quasis_i_value, _quasis_i;
12820
12821
  var cooked = (_ref = (_quasis_i = quasis[i]) === null || _quasis_i === void 0 ? void 0 : (_quasis_i_value = _quasis_i.value) === null || _quasis_i_value === void 0 ? void 0 : _quasis_i_value.cooked) !== null && _ref !== void 0 ? _ref : '';
12821
- var next = _to_consumable_array$2(result).concat([
12822
+ var next = _to_consumable_array$3(result).concat([
12822
12823
  {
12823
12824
  kind: 'literal',
12824
12825
  value: cooked
@@ -12826,7 +12827,7 @@ function foldTemplateLiteral(node, frame, depth) {
12826
12827
  ]);
12827
12828
  if (i < expressions.length) {
12828
12829
  var exprFrags = foldFrags(expressions[i], frame, depth + 1);
12829
- result = exprFrags ? _to_consumable_array$2(next).concat(_to_consumable_array$2(exprFrags)) : null;
12830
+ result = exprFrags ? _to_consumable_array$3(next).concat(_to_consumable_array$3(exprFrags)) : null;
12830
12831
  } else {
12831
12832
  result = next;
12832
12833
  }
@@ -12838,7 +12839,7 @@ function foldStringConcat(node, frame, depth) {
12838
12839
  var left = foldFrags(node.left, frame, depth + 1);
12839
12840
  var right = foldFrags(node.right, frame, depth + 1);
12840
12841
  if (left && right) {
12841
- result = _to_consumable_array$2(left).concat(_to_consumable_array$2(right));
12842
+ result = _to_consumable_array$3(left).concat(_to_consumable_array$3(right));
12842
12843
  }
12843
12844
  return result;
12844
12845
  }
@@ -12931,7 +12932,7 @@ function foldStringConcat(node, frame, depth) {
12931
12932
  value: PATH_SEPARATOR
12932
12933
  });
12933
12934
  }
12934
- (_joined = joined).push.apply(_joined, _to_consumable_array$2(item));
12935
+ (_joined = joined).push.apply(_joined, _to_consumable_array$3(item));
12935
12936
  first = false;
12936
12937
  }
12937
12938
  }
@@ -13059,10 +13060,10 @@ function foldStringConcat(node, frame, depth) {
13059
13060
  }
13060
13061
  if ((arg === null || arg === void 0 ? void 0 : arg.type) === 'SpreadElement') {
13061
13062
  var list = foldSpreadOperand(arg.argument, frame, depth);
13062
- result = list ? _to_consumable_array$2(result).concat(_to_consumable_array$2(list)) : null;
13063
+ result = list ? _to_consumable_array$3(result).concat(_to_consumable_array$3(list)) : null;
13063
13064
  } else {
13064
13065
  var frags = foldFrags(arg, frame, depth + 1);
13065
- result = frags ? _to_consumable_array$2(result).concat([
13066
+ result = frags ? _to_consumable_array$3(result).concat([
13066
13067
  frags
13067
13068
  ]) : null;
13068
13069
  }
@@ -13127,10 +13128,10 @@ function foldStringConcat(node, frame, depth) {
13127
13128
  result = null;
13128
13129
  } else if (element.type === 'SpreadElement') {
13129
13130
  var list = foldSpreadOperand(element.argument, frame, depth);
13130
- result = list ? _to_consumable_array$2(result).concat(_to_consumable_array$2(list)) : null;
13131
+ result = list ? _to_consumable_array$3(result).concat(_to_consumable_array$3(list)) : null;
13131
13132
  } else {
13132
13133
  var frags = foldFrags(element, frame, depth + 1);
13133
- result = frags ? _to_consumable_array$2(result).concat([
13134
+ result = frags ? _to_consumable_array$3(result).concat([
13134
13135
  frags
13135
13136
  ]) : null;
13136
13137
  }
@@ -13517,7 +13518,7 @@ function fragListsToStrings(items) {
13517
13518
  break;
13518
13519
  }
13519
13520
  var str = fragsToConcreteString(item);
13520
- result = str != null ? _to_consumable_array$2(result).concat([
13521
+ result = str != null ? _to_consumable_array$3(result).concat([
13521
13522
  str
13522
13523
  ]) : null;
13523
13524
  }
@@ -13609,9 +13610,7 @@ function applyNumericOperator(operator, left, right) {
13609
13610
  for(var i = 0; result && i < folded.segments.length; i++){
13610
13611
  var a = folded.segments[i];
13611
13612
  var b = ruleSegments[i];
13612
- if (a.kind !== b.kind) {
13613
- result = false;
13614
- } else if (a.kind === 'literal' && a.value !== b.value) {
13613
+ if (a.kind !== b.kind || a.kind === 'literal' && a.value !== b.value) {
13615
13614
  result = false;
13616
13615
  }
13617
13616
  }
@@ -14587,30 +14586,30 @@ function unwrapVariableDeclaration$1(statement) {
14587
14586
  }
14588
14587
  }
14589
14588
 
14590
- function _array_like_to_array$3(arr, len) {
14589
+ function _array_like_to_array$4(arr, len) {
14591
14590
  if (len == null || len > arr.length) len = arr.length;
14592
14591
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14593
14592
  return arr2;
14594
14593
  }
14595
- function _array_without_holes$1(arr) {
14596
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
14594
+ function _array_without_holes$2(arr) {
14595
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
14597
14596
  }
14598
- function _iterable_to_array$1(iter) {
14597
+ function _iterable_to_array$2(iter) {
14599
14598
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14600
14599
  }
14601
- function _non_iterable_spread$1() {
14600
+ function _non_iterable_spread$2() {
14602
14601
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14603
14602
  }
14604
- function _to_consumable_array$1(arr) {
14605
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$1();
14603
+ function _to_consumable_array$2(arr) {
14604
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
14606
14605
  }
14607
- function _unsupported_iterable_to_array$3(o, minLen) {
14606
+ function _unsupported_iterable_to_array$4(o, minLen) {
14608
14607
  if (!o) return;
14609
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
14608
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
14610
14609
  var n = Object.prototype.toString.call(o).slice(8, -1);
14611
14610
  if (n === "Object" && o.constructor) n = o.constructor.name;
14612
14611
  if (n === "Map" || n === "Set") return Array.from(n);
14613
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
14612
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
14614
14613
  }
14615
14614
  var ALLOW_RE = /\ballow\s+([A-Za-z, \t]+?)\s*:\s*if\b/g;
14616
14615
  var COLLECTION_GROUP_PREFIX = /^\/\{[A-Za-z_]\w*=\*\*\}\//;
@@ -14654,7 +14653,7 @@ var BARE_IDENTIFIER_RE = /^[A-Za-z_]\w*$/;
14654
14653
  }
14655
14654
  match = ALLOW_RE.exec(body);
14656
14655
  }
14657
- return _to_consumable_array$1(seen);
14656
+ return _to_consumable_array$2(seen);
14658
14657
  }
14659
14658
  /**
14660
14659
  * Pulls the first bare-identifier collection token from a match path. Skips an optional
@@ -14816,7 +14815,7 @@ var BARE_IDENTIFIER_RE = /^[A-Za-z_]\w*$/;
14816
14815
  return walkBlock(masked, 0, source);
14817
14816
  }
14818
14817
 
14819
- function _array_like_to_array$2(arr, len) {
14818
+ function _array_like_to_array$3(arr, len) {
14820
14819
  if (len == null || len > arr.length) len = arr.length;
14821
14820
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14822
14821
  return arr2;
@@ -14899,15 +14898,15 @@ function _object_spread_props(target, source) {
14899
14898
  return target;
14900
14899
  }
14901
14900
  function _sliced_to_array$1(arr, i) {
14902
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
14901
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
14903
14902
  }
14904
- function _unsupported_iterable_to_array$2(o, minLen) {
14903
+ function _unsupported_iterable_to_array$3(o, minLen) {
14905
14904
  if (!o) return;
14906
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
14905
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
14907
14906
  var n = Object.prototype.toString.call(o).slice(8, -1);
14908
14907
  if (n === "Object" && o.constructor) n = o.constructor.name;
14909
14908
  if (n === "Map" || n === "Set") return Array.from(n);
14910
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
14909
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
14911
14910
  }
14912
14911
  /**
14913
14912
  * Default file name searched relative to the lint root when `firestoreRulesPath` is omitted.
@@ -16236,30 +16235,30 @@ function reportModelKey(context, modelKey) {
16236
16235
  }
16237
16236
  };
16238
16237
 
16239
- function _array_like_to_array$1(arr, len) {
16238
+ function _array_like_to_array$2(arr, len) {
16240
16239
  if (len == null || len > arr.length) len = arr.length;
16241
16240
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
16242
16241
  return arr2;
16243
16242
  }
16244
- function _array_without_holes(arr) {
16245
- if (Array.isArray(arr)) return _array_like_to_array$1(arr);
16243
+ function _array_without_holes$1(arr) {
16244
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
16246
16245
  }
16247
- function _iterable_to_array(iter) {
16246
+ function _iterable_to_array$1(iter) {
16248
16247
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16249
16248
  }
16250
- function _non_iterable_spread() {
16249
+ function _non_iterable_spread$1() {
16251
16250
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16252
16251
  }
16253
- function _to_consumable_array(arr) {
16254
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
16252
+ function _to_consumable_array$1(arr) {
16253
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
16255
16254
  }
16256
- function _unsupported_iterable_to_array$1(o, minLen) {
16255
+ function _unsupported_iterable_to_array$2(o, minLen) {
16257
16256
  if (!o) return;
16258
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
16257
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
16259
16258
  var n = Object.prototype.toString.call(o).slice(8, -1);
16260
16259
  if (n === "Object" && o.constructor) n = o.constructor.name;
16261
16260
  if (n === "Map" || n === "Set") return Array.from(n);
16262
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
16261
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
16263
16262
  }
16264
16263
  /**
16265
16264
  * Default glob pattern (relative to ESLint `cwd`) used to locate `@dbxModelServiceFactory` source
@@ -16533,7 +16532,7 @@ function extractFactoryModelTypes(text, factoryTag) {
16533
16532
  for(var _iterator = comments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
16534
16533
  var comment = _step.value;
16535
16534
  var _out;
16536
- (_out = out).push.apply(_out, _to_consumable_array(modelTypesFromFactoryComment(comment, factoryTag)));
16535
+ (_out = out).push.apply(_out, _to_consumable_array$1(modelTypesFromFactoryComment(comment, factoryTag)));
16537
16536
  }
16538
16537
  } catch (err) {
16539
16538
  _didIteratorError = true;
@@ -16552,7 +16551,7 @@ function extractFactoryModelTypes(text, factoryTag) {
16552
16551
  return out;
16553
16552
  }
16554
16553
 
16555
- function _array_like_to_array(arr, len) {
16554
+ function _array_like_to_array$1(arr, len) {
16556
16555
  if (len == null || len > arr.length) len = arr.length;
16557
16556
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
16558
16557
  return arr2;
@@ -16588,15 +16587,15 @@ function _non_iterable_rest() {
16588
16587
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16589
16588
  }
16590
16589
  function _sliced_to_array(arr, i) {
16591
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
16590
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest();
16592
16591
  }
16593
- function _unsupported_iterable_to_array(o, minLen) {
16592
+ function _unsupported_iterable_to_array$1(o, minLen) {
16594
16593
  if (!o) return;
16595
- if (typeof o === "string") return _array_like_to_array(o, minLen);
16594
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
16596
16595
  var n = Object.prototype.toString.call(o).slice(8, -1);
16597
16596
  if (n === "Object" && o.constructor) n = o.constructor.name;
16598
16597
  if (n === "Map" || n === "Set") return Array.from(n);
16599
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
16598
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
16600
16599
  }
16601
16600
  var MODEL_MARKERS = new Set([
16602
16601
  'dbxModel',
@@ -17241,20 +17240,19 @@ var SPEC_SUFFIX = '.spec.ts';
17241
17240
  */ function classifySpecFile(config) {
17242
17241
  var filename = config.filename, parentFolderName = config.parentFolderName;
17243
17242
  var result;
17244
- if (!filename.endsWith(SPEC_SUFFIX)) {
17245
- result = {
17246
- filename: filename,
17247
- group: '',
17248
- kind: 'non-spec',
17249
- subgroups: [],
17250
- isCanonical: false
17251
- };
17252
- } else {
17243
+ if (filename.endsWith(SPEC_SUFFIX)) {
17253
17244
  var _parts_;
17254
17245
  var stem = filename.slice(0, -SPEC_SUFFIX.length);
17255
17246
  var parts = stem.split('.');
17256
17247
  var group = (_parts_ = parts[0]) !== null && _parts_ !== void 0 ? _parts_ : '';
17257
- if (group !== parentFolderName) {
17248
+ if (group === parentFolderName) {
17249
+ var rest = parts.slice(1);
17250
+ result = classifyRemainingSegments({
17251
+ filename: filename,
17252
+ group: group,
17253
+ rest: rest
17254
+ });
17255
+ } else {
17258
17256
  result = {
17259
17257
  filename: filename,
17260
17258
  group: group,
@@ -17262,14 +17260,15 @@ var SPEC_SUFFIX = '.spec.ts';
17262
17260
  subgroups: [],
17263
17261
  isCanonical: false
17264
17262
  };
17265
- } else {
17266
- var rest = parts.slice(1);
17267
- result = classifyRemainingSegments({
17268
- filename: filename,
17269
- group: group,
17270
- rest: rest
17271
- });
17272
17263
  }
17264
+ } else {
17265
+ result = {
17266
+ filename: filename,
17267
+ group: '',
17268
+ kind: 'non-spec',
17269
+ subgroups: [],
17270
+ isCanonical: false
17271
+ };
17273
17272
  }
17274
17273
  return result;
17275
17274
  }
@@ -17636,6 +17635,446 @@ function hasCrudSpec(groupDir, group) {
17636
17635
  }
17637
17636
  };
17638
17637
 
17638
+ /**
17639
+ * JSDoc marker tag that every CRUD params interface should carry so the dbx-components manifest
17640
+ * extractor (`packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts`) records it as an
17641
+ * intentionally-exposed API params type rather than an untagged one.
17642
+ */ var DBX_MODEL_API_PARAMS_MARKER = 'dbxModelApiParams';
17643
+ /**
17644
+ * Suffix on the type alias that declares a model-group CRUD function config (e.g.
17645
+ * `GuestbookModelCrudFunctionsConfig`). Its referenced params interfaces are the ones the marker
17646
+ * tag is required on.
17647
+ */ var DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX = 'ModelCrudFunctionsConfig';
17648
+ /**
17649
+ * Suffix on the type alias that declares a group's standalone function type map (e.g.
17650
+ * `GuestbookFunctionTypeMap`). Each entry's params type is also subject to the marker tag.
17651
+ */ var DEFAULT_FUNCTION_TYPE_MAP_SUFFIX = 'FunctionTypeMap';
17652
+ /**
17653
+ * Returns the first element type node of a `TSTupleType`, normalizing across `@typescript-eslint`
17654
+ * versions (`elementTypes` historically, `elements` in newer releases). CRUD config tuples take the
17655
+ * form `[Params, Result]`, so element 0 is always the params type.
17656
+ *
17657
+ * @param node - A `TSTupleType` node.
17658
+ * @returns The first element type node, or null when the tuple is empty.
17659
+ */ function tupleFirstElement(node) {
17660
+ var _ref, _ref1;
17661
+ var elements = (_ref = node === null || node === void 0 ? void 0 : node.elementTypes) !== null && _ref !== void 0 ? _ref : node === null || node === void 0 ? void 0 : node.elements;
17662
+ return (_ref1 = elements === null || elements === void 0 ? void 0 : elements[0]) !== null && _ref1 !== void 0 ? _ref1 : null;
17663
+ }
17664
+ /**
17665
+ * Recursively collects the params type-reference names declared by a CRUD config / function-type-map
17666
+ * type node into `out`, mirroring the resolution in `extract-crud.ts`. A bare `TSTypeReference`
17667
+ * (`create: CreateGuestbookParams`) contributes its referenced name; a `TSTupleType`
17668
+ * (`query: [QueryGuestbooksParams, OnCallQueryModelResult<...>]`) contributes element 0 only, since
17669
+ * element 1 is the result type; and a `TSTypeLiteral` (model literal, verb literal, or
17670
+ * `{ specifier: ... }` object) is recursed into per property-signature value. Generic type arguments
17671
+ * on a reference are intentionally not descended into — only the params type itself is collected.
17672
+ *
17673
+ * @param node - The type node to inspect.
17674
+ * @param out - The accumulating set of params type-reference names.
17675
+ */ function collectParamsTypeNames(node, out) {
17676
+ if (!node) {
17677
+ return;
17678
+ }
17679
+ if (node.type === 'TSTypeReference') {
17680
+ var name = typeReferenceTypeName$1(node);
17681
+ if (name) {
17682
+ out.add(name);
17683
+ }
17684
+ } else if (node.type === 'TSTupleType') {
17685
+ collectParamsTypeNames(tupleFirstElement(node), out);
17686
+ } else if (node.type === 'TSTypeLiteral' && Array.isArray(node.members)) {
17687
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
17688
+ try {
17689
+ for(var _iterator = node.members[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17690
+ var member = _step.value;
17691
+ if ((member === null || member === void 0 ? void 0 : member.type) === 'TSPropertySignature') {
17692
+ var _member_typeAnnotation;
17693
+ collectParamsTypeNames((_member_typeAnnotation = member.typeAnnotation) === null || _member_typeAnnotation === void 0 ? void 0 : _member_typeAnnotation.typeAnnotation, out);
17694
+ }
17695
+ }
17696
+ } catch (err) {
17697
+ _didIteratorError = true;
17698
+ _iteratorError = err;
17699
+ } finally{
17700
+ try {
17701
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
17702
+ _iterator.return();
17703
+ }
17704
+ } finally{
17705
+ if (_didIteratorError) {
17706
+ throw _iteratorError;
17707
+ }
17708
+ }
17709
+ }
17710
+ }
17711
+ }
17712
+ /**
17713
+ * Returns the inner declaration node when `statement` is (or wraps) a `TSInterfaceDeclaration`, along
17714
+ * with the statement-level anchor ESLint attaches leading comments to.
17715
+ *
17716
+ * @param statement - A top-level `Program.body` statement.
17717
+ * @returns The interface declaration + its JSDoc anchor, or null when the statement is not an interface.
17718
+ */ function interfaceFromStatement(statement) {
17719
+ var _statement_declaration;
17720
+ var result = null;
17721
+ if ((statement === null || statement === void 0 ? void 0 : statement.type) === 'TSInterfaceDeclaration') {
17722
+ result = {
17723
+ decl: statement,
17724
+ anchor: statement
17725
+ };
17726
+ } else if (((statement === null || statement === void 0 ? void 0 : statement.type) === 'ExportNamedDeclaration' || (statement === null || statement === void 0 ? void 0 : statement.type) === 'ExportDefaultDeclaration') && ((_statement_declaration = statement.declaration) === null || _statement_declaration === void 0 ? void 0 : _statement_declaration.type) === 'TSInterfaceDeclaration') {
17727
+ result = {
17728
+ decl: statement.declaration,
17729
+ anchor: statement
17730
+ };
17731
+ }
17732
+ return result;
17733
+ }
17734
+ /**
17735
+ * Returns true when the interface's leading JSDoc carries the given marker tag.
17736
+ *
17737
+ * @param sourceCode - The ESLint `SourceCode` object.
17738
+ * @param anchor - The interface's JSDoc anchor node.
17739
+ * @param tagName - The marker tag name (without the leading `@`).
17740
+ * @returns True when the marker tag is present on the interface's JSDoc.
17741
+ */ function interfaceHasMarker(sourceCode, anchor, tagName) {
17742
+ var jsdoc = leadingJsdocFor(sourceCode, anchor);
17743
+ var result = false;
17744
+ if (jsdoc) {
17745
+ var parsed = parseJsdocComment(jsdoc.value);
17746
+ result = parsed.tags.some(function(tag) {
17747
+ return tag.tag === tagName;
17748
+ });
17749
+ }
17750
+ return result;
17751
+ }
17752
+ /**
17753
+ * ESLint rule that requires every params interface referenced by a `*ModelCrudFunctionsConfig` (and,
17754
+ * by default, `*FunctionTypeMap`) type alias and declared in the same file to carry the
17755
+ * `@dbxModelApiParams` JSDoc marker tag.
17756
+ *
17757
+ * The marker is the signal the dbx-components manifest extractor
17758
+ * (`packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts`) reads to distinguish an
17759
+ * intentionally-exposed API params type from an untagged one — missing it produces the
17760
+ * `[no-api-params-tag]` build warning and the "Missing `@dbxModelApiParams` marker" hint in the
17761
+ * `dbx_model_api_lookup` MCP tool. This rule surfaces the same gap in-editor at lint time.
17762
+ *
17763
+ * Same-file resolution only — matching the extractor, which itself resolves params interfaces from a
17764
+ * single in-memory source file. Params types declared in another file (e.g. shared base params like
17765
+ * `TargetModelParams`) are skipped, exactly as the extractor reports them as unresolved.
17766
+ *
17767
+ * @example
17768
+ * ```ts
17769
+ * export type GuestbookModelCrudFunctionsConfig = {
17770
+ * guestbook: { create: CreateGuestbookParams };
17771
+ * };
17772
+ *
17773
+ * // OK
17774
+ * /**
17775
+ * * @dbxModelApiParams
17776
+ * *\/
17777
+ * export interface CreateGuestbookParams { readonly name: string; }
17778
+ *
17779
+ * // WARN — missingApiParamsTag
17780
+ * export interface CreateGuestbookParams { readonly name: string; }
17781
+ * ```
17782
+ */ var FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE = {
17783
+ meta: {
17784
+ type: 'suggestion',
17785
+ fixable: undefined,
17786
+ docs: {
17787
+ description: 'Require the `@dbxModelApiParams` marker tag on params interfaces referenced by a `*ModelCrudFunctionsConfig` / `*FunctionTypeMap` alias and declared in the same file, mirroring the manifest extractor that reads the tag.',
17788
+ recommended: true
17789
+ },
17790
+ messages: {
17791
+ missingApiParamsTag: 'Params interface "{{name}}" is referenced by the CRUD config "{{configName}}" but is missing the `@{{tag}}` marker. Add `@{{tag}}` to its JSDoc so the manifest extractor records it as an intentionally-exposed API params type.'
17792
+ },
17793
+ schema: [
17794
+ {
17795
+ type: 'object',
17796
+ additionalProperties: false,
17797
+ properties: {
17798
+ configTypeSuffix: {
17799
+ type: 'string'
17800
+ },
17801
+ alsoFunctionTypeMap: {
17802
+ type: 'boolean'
17803
+ },
17804
+ tagName: {
17805
+ type: 'string'
17806
+ }
17807
+ }
17808
+ }
17809
+ ]
17810
+ },
17811
+ create: function create(context) {
17812
+ var _context_options_, _options_configTypeSuffix, _options_tagName;
17813
+ var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
17814
+ var configTypeSuffix = (_options_configTypeSuffix = options.configTypeSuffix) !== null && _options_configTypeSuffix !== void 0 ? _options_configTypeSuffix : DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX;
17815
+ var alsoFunctionTypeMap = options.alsoFunctionTypeMap !== false;
17816
+ var tagName = (_options_tagName = options.tagName) !== null && _options_tagName !== void 0 ? _options_tagName : DBX_MODEL_API_PARAMS_MARKER;
17817
+ var sourceCode = context.sourceCode;
17818
+ function isConfigAliasName(name) {
17819
+ return name.endsWith(configTypeSuffix) || alsoFunctionTypeMap && name.endsWith(DEFAULT_FUNCTION_TYPE_MAP_SUFFIX);
17820
+ }
17821
+ return {
17822
+ Program: function Program(programNode) {
17823
+ var _ref;
17824
+ var body = (_ref = programNode === null || programNode === void 0 ? void 0 : programNode.body) !== null && _ref !== void 0 ? _ref : [];
17825
+ // Index the interfaces declared in this file by name (same-file resolution, like the extractor).
17826
+ var interfaces = new Map();
17827
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
17828
+ try {
17829
+ for(var _iterator = body[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17830
+ var statement = _step.value;
17831
+ var _found_decl_id, _found_decl;
17832
+ var found = interfaceFromStatement(statement);
17833
+ if ((found === null || found === void 0 ? void 0 : (_found_decl = found.decl) === null || _found_decl === void 0 ? void 0 : (_found_decl_id = _found_decl.id) === null || _found_decl_id === void 0 ? void 0 : _found_decl_id.type) === 'Identifier') {
17834
+ interfaces.set(found.decl.id.name, found);
17835
+ }
17836
+ }
17837
+ } catch (err) {
17838
+ _didIteratorError = true;
17839
+ _iteratorError = err;
17840
+ } finally{
17841
+ try {
17842
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
17843
+ _iterator.return();
17844
+ }
17845
+ } finally{
17846
+ if (_didIteratorError) {
17847
+ throw _iteratorError;
17848
+ }
17849
+ }
17850
+ }
17851
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
17852
+ try {
17853
+ for(var _iterator1 = body[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
17854
+ var statement1 = _step1.value;
17855
+ var _statement_declaration, _alias_id;
17856
+ var alias = (statement1 === null || statement1 === void 0 ? void 0 : statement1.type) === 'TSTypeAliasDeclaration' ? statement1 : (statement1 === null || statement1 === void 0 ? void 0 : statement1.type) === 'ExportNamedDeclaration' && ((_statement_declaration = statement1.declaration) === null || _statement_declaration === void 0 ? void 0 : _statement_declaration.type) === 'TSTypeAliasDeclaration' ? statement1.declaration : null;
17857
+ if (!alias || ((_alias_id = alias.id) === null || _alias_id === void 0 ? void 0 : _alias_id.type) !== 'Identifier' || !isConfigAliasName(alias.id.name)) {
17858
+ continue;
17859
+ }
17860
+ var paramsNames = new Set();
17861
+ collectParamsTypeNames(alias.typeAnnotation, paramsNames);
17862
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
17863
+ try {
17864
+ for(var _iterator2 = paramsNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
17865
+ var paramsName = _step2.value;
17866
+ var target = interfaces.get(paramsName);
17867
+ // Skip params types not declared in this file — the extractor cannot resolve them either.
17868
+ if (target && !interfaceHasMarker(sourceCode, target.anchor, tagName)) {
17869
+ context.report({
17870
+ node: target.decl.id,
17871
+ messageId: 'missingApiParamsTag',
17872
+ data: {
17873
+ name: paramsName,
17874
+ configName: alias.id.name,
17875
+ tag: tagName
17876
+ }
17877
+ });
17878
+ }
17879
+ }
17880
+ } catch (err) {
17881
+ _didIteratorError2 = true;
17882
+ _iteratorError2 = err;
17883
+ } finally{
17884
+ try {
17885
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
17886
+ _iterator2.return();
17887
+ }
17888
+ } finally{
17889
+ if (_didIteratorError2) {
17890
+ throw _iteratorError2;
17891
+ }
17892
+ }
17893
+ }
17894
+ }
17895
+ } catch (err) {
17896
+ _didIteratorError1 = true;
17897
+ _iteratorError1 = err;
17898
+ } finally{
17899
+ try {
17900
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
17901
+ _iterator1.return();
17902
+ }
17903
+ } finally{
17904
+ if (_didIteratorError1) {
17905
+ throw _iteratorError1;
17906
+ }
17907
+ }
17908
+ }
17909
+ }
17910
+ };
17911
+ }
17912
+ };
17913
+
17914
+ function _array_like_to_array(arr, len) {
17915
+ if (len == null || len > arr.length) len = arr.length;
17916
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
17917
+ return arr2;
17918
+ }
17919
+ function _array_without_holes(arr) {
17920
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
17921
+ }
17922
+ function _iterable_to_array(iter) {
17923
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
17924
+ }
17925
+ function _non_iterable_spread() {
17926
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17927
+ }
17928
+ function _to_consumable_array(arr) {
17929
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
17930
+ }
17931
+ function _unsupported_iterable_to_array(o, minLen) {
17932
+ if (!o) return;
17933
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
17934
+ var n = Object.prototype.toString.call(o).slice(8, -1);
17935
+ if (n === "Object" && o.constructor) n = o.constructor.name;
17936
+ if (n === "Map" || n === "Set") return Array.from(n);
17937
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
17938
+ }
17939
+ /**
17940
+ * Default method names this rule inspects for a `roles` selection option.
17941
+ *
17942
+ * Matches `nest.useModel(...)` and the multi-model `nest.useMultipleModels(...)`,
17943
+ * both of which accept an optional `roles` selection option.
17944
+ */ var DEFAULT_USE_MODEL_METHOD_NAMES = [
17945
+ 'useModel',
17946
+ 'useMultipleModels'
17947
+ ];
17948
+ /**
17949
+ * Returns the called method name when the call is a non-computed member-expression call
17950
+ * (e.g. `nest.useModel(...)`, `this._nestContext.useMultipleModels(...)`) whose method is
17951
+ * in the tracked set, otherwise null.
17952
+ */ function trackedMethodName(node, methodNames) {
17953
+ var _callee_property;
17954
+ var result = null;
17955
+ var callee = node.callee;
17956
+ if ((callee === null || callee === void 0 ? void 0 : callee.type) === 'MemberExpression' && !callee.computed && ((_callee_property = callee.property) === null || _callee_property === void 0 ? void 0 : _callee_property.type) === 'Identifier') {
17957
+ var name = callee.property.name;
17958
+ if (methodNames.has(name)) {
17959
+ result = name;
17960
+ }
17961
+ }
17962
+ return result;
17963
+ }
17964
+ /**
17965
+ * Returns true when the object literal explicitly declares a `roles` property, or contains a
17966
+ * spread element (in which case `roles` may originate from the spread and cannot be ruled out).
17967
+ */ function hasRolesPropertyOrSpread(objectNode) {
17968
+ var _objectNode_properties;
17969
+ var result = false;
17970
+ var properties = (_objectNode_properties = objectNode.properties) !== null && _objectNode_properties !== void 0 ? _objectNode_properties : [];
17971
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
17972
+ try {
17973
+ for(var _iterator = properties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17974
+ var property = _step.value;
17975
+ if (property.type === 'SpreadElement' || property.type === 'ExperimentalSpreadProperty') {
17976
+ result = true;
17977
+ break;
17978
+ }
17979
+ if (property.type === 'Property' && !property.computed) {
17980
+ var key = property.key;
17981
+ var keyName = (key === null || key === void 0 ? void 0 : key.type) === 'Identifier' ? key.name : (key === null || key === void 0 ? void 0 : key.type) === 'Literal' ? String(key.value) : undefined;
17982
+ if (keyName === 'roles') {
17983
+ result = true;
17984
+ break;
17985
+ }
17986
+ }
17987
+ }
17988
+ } catch (err) {
17989
+ _didIteratorError = true;
17990
+ _iteratorError = err;
17991
+ } finally{
17992
+ try {
17993
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
17994
+ _iterator.return();
17995
+ }
17996
+ } finally{
17997
+ if (_didIteratorError) {
17998
+ throw _iteratorError;
17999
+ }
18000
+ }
18001
+ }
18002
+ return result;
18003
+ }
18004
+ /**
18005
+ * ESLint rule that warns when a `nest.useModel(...)` / `nest.useMultipleModels(...)` selection
18006
+ * does not specify a `roles` option. The `roles` option declares which granted roles the caller
18007
+ * requires for the selected model; omitting it silently runs the selection without an explicit
18008
+ * role assertion.
18009
+ *
18010
+ * Intentionally role-free selections are still allowed: pass `roles: []` to assert "no role
18011
+ * required", or add an inline eslint-disable for this rule. The rule only checks for the presence
18012
+ * of a `roles` property, so an empty array satisfies it.
18013
+ *
18014
+ * The rule matches by AST shape (member-expression method call) rather than receiver name, so it
18015
+ * covers `nest.useModel(...)`, `this._nestContext.useModel(...)`, etc. When the selection argument
18016
+ * is not an inline object literal (an identifier/variable, conditional, call result, or a literal
18017
+ * containing a spread), the rule skips it to avoid false positives.
18018
+ *
18019
+ * Not auto-fixable: the rule cannot infer the correct role(s) for a given selection.
18020
+ */ var FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE = {
18021
+ meta: {
18022
+ type: 'suggestion',
18023
+ fixable: undefined,
18024
+ docs: {
18025
+ description: 'Require an explicit `roles` selection option on `useModel` / `useMultipleModels` calls so model access asserts the roles it requires. Pass `roles: []` to intentionally require no role.',
18026
+ recommended: true
18027
+ },
18028
+ messages: {
18029
+ missingRoles: "`{{name}}(...)` does not specify `roles`. Pass a `roles` value (e.g. `roles: 'read'`), or `roles: []` to intentionally require no role, or add an inline eslint-disable for this rule."
18030
+ },
18031
+ schema: [
18032
+ {
18033
+ type: 'object',
18034
+ additionalProperties: false,
18035
+ properties: {
18036
+ methodNames: {
18037
+ type: 'array',
18038
+ items: {
18039
+ type: 'string'
18040
+ }
18041
+ },
18042
+ additionalMethodNames: {
18043
+ type: 'array',
18044
+ items: {
18045
+ type: 'string'
18046
+ }
18047
+ }
18048
+ }
18049
+ }
18050
+ ]
18051
+ },
18052
+ create: function create(context) {
18053
+ var _context_options_, _options_methodNames, _options_additionalMethodNames;
18054
+ var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
18055
+ var baseNames = (_options_methodNames = options.methodNames) !== null && _options_methodNames !== void 0 ? _options_methodNames : DEFAULT_USE_MODEL_METHOD_NAMES;
18056
+ var methodNames = new Set(_to_consumable_array(baseNames).concat(_to_consumable_array((_options_additionalMethodNames = options.additionalMethodNames) !== null && _options_additionalMethodNames !== void 0 ? _options_additionalMethodNames : [])));
18057
+ return {
18058
+ CallExpression: function CallExpression(node) {
18059
+ var name = trackedMethodName(node, methodNames);
18060
+ if (name) {
18061
+ var _node_arguments;
18062
+ var selection = (_node_arguments = node.arguments) === null || _node_arguments === void 0 ? void 0 : _node_arguments[1];
18063
+ if ((selection === null || selection === void 0 ? void 0 : selection.type) === 'ObjectExpression' && !hasRolesPropertyOrSpread(selection)) {
18064
+ context.report({
18065
+ node: node.callee,
18066
+ messageId: 'missingRoles',
18067
+ data: {
18068
+ name: name
18069
+ }
18070
+ });
18071
+ }
18072
+ }
18073
+ }
18074
+ };
18075
+ }
18076
+ };
18077
+
17639
18078
  /**
17640
18079
  * ESLint plugin for `@dereekb/firebase` rules.
17641
18080
  *
@@ -17657,7 +18096,9 @@ function hasCrudSpec(groupDir, group) {
17657
18096
  'require-service-factory-for-dbx-model': FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE,
17658
18097
  'require-dbx-model-companion-tags': FIREBASE_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE,
17659
18098
  'require-canonical-api-spec-filename': FIREBASE_REQUIRE_CANONICAL_API_SPEC_FILENAME_RULE,
17660
- 'require-api-crud-spec-for-group': FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE
18099
+ 'require-api-crud-spec-for-group': FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE,
18100
+ 'require-dbx-model-api-params-tag': FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE,
18101
+ 'require-use-model-roles': FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE
17661
18102
  }
17662
18103
  };
17663
18104
  /**
@@ -17666,4 +18107,4 @@ function hasCrudSpec(groupDir, group) {
17666
18107
  * @dbxAllowConstantName
17667
18108
  */ var firebaseESLintPlugin = FIREBASE_ESLINT_PLUGIN;
17668
18109
 
17669
- export { API_DETAILS_IMPORT_MODULE, DBX_MODEL_FIREBASE_INDEX_MARKER, DBX_MODEL_SERVICE_FACTORY_TAG, DEFAULT_API_DETAILS_FACTORY_NAME, DEFAULT_CONSTRAINT_FACTORY_NAMES, DEFAULT_CRUD_FUNCTION_TYPE_VERBS, DEFAULT_CRUD_VERB_NAMES, DEFAULT_DISCOVERY_EXCLUDED_DIRS, DEFAULT_FACTORY_SEARCH_ROOTS, DEFAULT_FACTORY_TAG, DEFAULT_FIRESTORE_RULES_FILENAME, DEFAULT_FUNCTION_DIR_SEGMENT, DEFAULT_IDENTITY_FACTORY_NAME, DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES, DEFAULT_MODEL_MARKER_TAG, DEFAULT_MODEL_SEARCH_ROOTS, DEFAULT_PAGINATION_CONSTRAINT_NAMES, DEFAULT_REGISTRY_FACTORY_CALL_NAME, DEFAULT_STORAGE_FILE_UPLOAD_POLICY_TYPE_NAME, DEFAULT_STORAGE_RULES_FILENAME, FIREBASE_ESLINT_PLUGIN, FIREBASE_MODEL_SERVICE_FACTORY_MODULE, FIREBASE_MODEL_SERVICE_FACTORY_NAME, FIREBASE_MODULE, FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE, FIREBASE_REQUIRE_API_DETAILS_FOR_CRUD_FUNCTION_RULE, FIREBASE_REQUIRE_CANONICAL_API_SPEC_FILENAME_RULE, FIREBASE_REQUIRE_COMPLETE_CRUD_FUNCTION_CONFIG_MAP_RULE, FIREBASE_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE, FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_COMPANION_TAGS_RULE, FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_QUERY_SUFFIX_RULE, FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_VALID_DISPATCHER_RULE, FIREBASE_REQUIRE_DBX_MODEL_SERVICE_FACTORY_TAG_RULE, FIREBASE_REQUIRE_FIRESTORE_CONSTRAINT_TYPE_PARAMETER_RULE, FIREBASE_REQUIRE_FIRESTORE_RULE_FOR_SERVICE_MODEL_RULE, FIREBASE_REQUIRE_INPUT_TYPE_FOR_API_DETAILS_RULE, FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE, FIREBASE_REQUIRE_STORAGEFILE_POLICY_MATCHES_RULES_RULE, FIREBASE_REQUIRE_TAGGED_FIRESTORE_CONSTRAINTS_RULE, INPUT_TYPE_PROPERTY_NAME, MIRRORS_POLICY_KEY_MARKER_REGEX, MODEL_FIREBASE_CRUD_FUNCTION_CONFIG_MAP_TYPE_NAME, QUERY_SUFFIX, discoveryGlobExcludeFilter, firebaseESLintPlugin, parseFirestoreRules, parseStorageRules };
18110
+ export { API_DETAILS_IMPORT_MODULE, DBX_MODEL_API_PARAMS_MARKER, DBX_MODEL_FIREBASE_INDEX_MARKER, DBX_MODEL_SERVICE_FACTORY_TAG, DEFAULT_API_DETAILS_FACTORY_NAME, DEFAULT_CONSTRAINT_FACTORY_NAMES, DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX, DEFAULT_CRUD_FUNCTION_TYPE_VERBS, DEFAULT_CRUD_VERB_NAMES, DEFAULT_DISCOVERY_EXCLUDED_DIRS, DEFAULT_FACTORY_SEARCH_ROOTS, DEFAULT_FACTORY_TAG, DEFAULT_FIRESTORE_RULES_FILENAME, DEFAULT_FUNCTION_DIR_SEGMENT, DEFAULT_FUNCTION_TYPE_MAP_SUFFIX, DEFAULT_IDENTITY_FACTORY_NAME, DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES, DEFAULT_MODEL_MARKER_TAG, DEFAULT_MODEL_SEARCH_ROOTS, DEFAULT_PAGINATION_CONSTRAINT_NAMES, DEFAULT_REGISTRY_FACTORY_CALL_NAME, DEFAULT_STORAGE_FILE_UPLOAD_POLICY_TYPE_NAME, DEFAULT_STORAGE_RULES_FILENAME, DEFAULT_USE_MODEL_METHOD_NAMES, FIREBASE_ESLINT_PLUGIN, FIREBASE_MODEL_SERVICE_FACTORY_MODULE, FIREBASE_MODEL_SERVICE_FACTORY_NAME, FIREBASE_MODULE, FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE, FIREBASE_REQUIRE_API_DETAILS_FOR_CRUD_FUNCTION_RULE, FIREBASE_REQUIRE_CANONICAL_API_SPEC_FILENAME_RULE, FIREBASE_REQUIRE_COMPLETE_CRUD_FUNCTION_CONFIG_MAP_RULE, FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE, FIREBASE_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE, FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_COMPANION_TAGS_RULE, FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_QUERY_SUFFIX_RULE, FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_VALID_DISPATCHER_RULE, FIREBASE_REQUIRE_DBX_MODEL_SERVICE_FACTORY_TAG_RULE, FIREBASE_REQUIRE_FIRESTORE_CONSTRAINT_TYPE_PARAMETER_RULE, FIREBASE_REQUIRE_FIRESTORE_RULE_FOR_SERVICE_MODEL_RULE, FIREBASE_REQUIRE_INPUT_TYPE_FOR_API_DETAILS_RULE, FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE, FIREBASE_REQUIRE_STORAGEFILE_POLICY_MATCHES_RULES_RULE, FIREBASE_REQUIRE_TAGGED_FIRESTORE_CONSTRAINTS_RULE, FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE, INPUT_TYPE_PROPERTY_NAME, MIRRORS_POLICY_KEY_MARKER_REGEX, MODEL_FIREBASE_CRUD_FUNCTION_CONFIG_MAP_TYPE_NAME, QUERY_SUFFIX, discoveryGlobExcludeFilter, firebaseESLintPlugin, parseFirestoreRules, parseStorageRules };