@fictjs/compiler 0.2.3 → 0.3.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.
package/dist/index.js CHANGED
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  mod
25
25
  ));
26
26
 
27
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/shallowEqual.js
27
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/shallowEqual.js
28
28
  var require_shallowEqual = __commonJS({
29
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
29
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
30
30
  "use strict";
31
31
  Object.defineProperty(exports, "__esModule", {
32
32
  value: true
@@ -44,9 +44,9 @@ var require_shallowEqual = __commonJS({
44
44
  }
45
45
  });
46
46
 
47
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/deprecationWarning.js
47
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/deprecationWarning.js
48
48
  var require_deprecationWarning = __commonJS({
49
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/deprecationWarning.js"(exports) {
49
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/deprecationWarning.js"(exports) {
50
50
  "use strict";
51
51
  Object.defineProperty(exports, "__esModule", {
52
52
  value: true
@@ -92,9 +92,9 @@ ${trace}`);
92
92
  }
93
93
  });
94
94
 
95
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/generated/index.js
95
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/generated/index.js
96
96
  var require_generated = __commonJS({
97
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
97
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
98
98
  "use strict";
99
99
  Object.defineProperty(exports, "__esModule", {
100
100
  value: true
@@ -2892,9 +2892,9 @@ var require_generated = __commonJS({
2892
2892
  }
2893
2893
  });
2894
2894
 
2895
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/matchesPattern.js
2895
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/matchesPattern.js
2896
2896
  var require_matchesPattern = __commonJS({
2897
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
2897
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
2898
2898
  "use strict";
2899
2899
  Object.defineProperty(exports, "__esModule", {
2900
2900
  value: true
@@ -2939,9 +2939,9 @@ var require_matchesPattern = __commonJS({
2939
2939
  }
2940
2940
  });
2941
2941
 
2942
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
2942
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
2943
2943
  var require_buildMatchMemberExpression = __commonJS({
2944
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
2944
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
2945
2945
  "use strict";
2946
2946
  Object.defineProperty(exports, "__esModule", {
2947
2947
  value: true
@@ -2955,9 +2955,9 @@ var require_buildMatchMemberExpression = __commonJS({
2955
2955
  }
2956
2956
  });
2957
2957
 
2958
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/react/isReactComponent.js
2958
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isReactComponent.js
2959
2959
  var require_isReactComponent = __commonJS({
2960
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
2960
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
2961
2961
  "use strict";
2962
2962
  Object.defineProperty(exports, "__esModule", {
2963
2963
  value: true
@@ -2969,9 +2969,9 @@ var require_isReactComponent = __commonJS({
2969
2969
  }
2970
2970
  });
2971
2971
 
2972
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/react/isCompatTag.js
2972
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isCompatTag.js
2973
2973
  var require_isCompatTag = __commonJS({
2974
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
2974
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
2975
2975
  "use strict";
2976
2976
  Object.defineProperty(exports, "__esModule", {
2977
2977
  value: true
@@ -2983,9 +2983,9 @@ var require_isCompatTag = __commonJS({
2983
2983
  }
2984
2984
  });
2985
2985
 
2986
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isType.js
2986
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isType.js
2987
2987
  var require_isType = __commonJS({
2988
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isType.js"(exports) {
2988
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isType.js"(exports) {
2989
2989
  "use strict";
2990
2990
  Object.defineProperty(exports, "__esModule", {
2991
2991
  value: true
@@ -3003,9 +3003,9 @@ var require_isType = __commonJS({
3003
3003
  }
3004
3004
  });
3005
3005
 
3006
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isPlaceholderType.js
3006
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isPlaceholderType.js
3007
3007
  var require_isPlaceholderType = __commonJS({
3008
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
3008
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
3009
3009
  "use strict";
3010
3010
  Object.defineProperty(exports, "__esModule", {
3011
3011
  value: true
@@ -3021,9 +3021,9 @@ var require_isPlaceholderType = __commonJS({
3021
3021
  }
3022
3022
  });
3023
3023
 
3024
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/is.js
3024
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/is.js
3025
3025
  var require_is = __commonJS({
3026
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/is.js"(exports) {
3026
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/is.js"(exports) {
3027
3027
  "use strict";
3028
3028
  Object.defineProperty(exports, "__esModule", {
3029
3029
  value: true
@@ -3222,9 +3222,9 @@ var require_lib = __commonJS({
3222
3222
  }
3223
3223
  });
3224
3224
 
3225
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isValidIdentifier.js
3225
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidIdentifier.js
3226
3226
  var require_isValidIdentifier = __commonJS({
3227
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
3227
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
3228
3228
  "use strict";
3229
3229
  Object.defineProperty(exports, "__esModule", {
3230
3230
  value: true
@@ -3539,9 +3539,9 @@ var require_lib2 = __commonJS({
3539
3539
  }
3540
3540
  });
3541
3541
 
3542
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/constants/index.js
3542
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/index.js
3543
3543
  var require_constants = __commonJS({
3544
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/constants/index.js"(exports) {
3544
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/index.js"(exports) {
3545
3545
  "use strict";
3546
3546
  Object.defineProperty(exports, "__esModule", {
3547
3547
  value: true
@@ -3568,16 +3568,14 @@ var require_constants = __commonJS({
3568
3568
  optional: ["typeAnnotation", "typeParameters", "returnType"],
3569
3569
  force: ["start", "loc", "end"]
3570
3570
  };
3571
- {
3572
- exports.BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
3573
- exports.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
3574
- }
3571
+ exports.BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
3572
+ exports.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
3575
3573
  }
3576
3574
  });
3577
3575
 
3578
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/utils.js
3576
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/utils.js
3579
3577
  var require_utils = __commonJS({
3580
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
3578
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
3581
3579
  "use strict";
3582
3580
  Object.defineProperty(exports, "__esModule", {
3583
3581
  value: true
@@ -3876,9 +3874,9 @@ ${errors.join("\n")}`);
3876
3874
  }
3877
3875
  });
3878
3876
 
3879
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/core.js
3877
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/core.js
3880
3878
  var require_core = __commonJS({
3881
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/core.js"(exports) {
3879
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/core.js"(exports) {
3882
3880
  "use strict";
3883
3881
  Object.defineProperty(exports, "__esModule", {
3884
3882
  value: true
@@ -4347,8 +4345,6 @@ var require_core = __commonJS({
4347
4345
  validate: (0, _utils.chain)((0, _utils.assertValueType)("number"), Object.assign(function(node, key, val) {
4348
4346
  if (1 / val < 0 || !Number.isFinite(val)) {
4349
4347
  const error = new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${val}) instead.`);
4350
- {
4351
- }
4352
4348
  }
4353
4349
  }, {
4354
4350
  type: "number"
@@ -4956,13 +4952,13 @@ var require_core = __commonJS({
4956
4952
  attributes: {
4957
4953
  optional: true,
4958
4954
  validate: (0, _utils.arrayOfType)("ImportAttribute")
4959
- },
4960
- assertions: {
4961
- deprecated: true,
4962
- optional: true,
4963
- validate: (0, _utils.arrayOfType)("ImportAttribute")
4964
4955
  }
4965
4956
  };
4957
+ importAttributes.assertions = {
4958
+ deprecated: true,
4959
+ optional: true,
4960
+ validate: (0, _utils.arrayOfType)("ImportAttribute")
4961
+ };
4966
4962
  defineType("ExportAllDeclaration", {
4967
4963
  builder: ["source"],
4968
4964
  visitor: ["source", "attributes", "assertions"],
@@ -5609,9 +5605,9 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
5609
5605
  }
5610
5606
  });
5611
5607
 
5612
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/flow.js
5608
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/flow.js
5613
5609
  var require_flow = __commonJS({
5614
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/flow.js"() {
5610
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/flow.js"() {
5615
5611
  "use strict";
5616
5612
  var _core = require_core();
5617
5613
  var _utils = require_utils();
@@ -6107,9 +6103,9 @@ var require_flow = __commonJS({
6107
6103
  }
6108
6104
  });
6109
6105
 
6110
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/jsx.js
6106
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/jsx.js
6111
6107
  var require_jsx = __commonJS({
6112
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/jsx.js"() {
6108
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/jsx.js"() {
6113
6109
  "use strict";
6114
6110
  var _utils = require_utils();
6115
6111
  var defineType = (0, _utils.defineAliasedType)("JSX");
@@ -6267,9 +6263,9 @@ var require_jsx = __commonJS({
6267
6263
  }
6268
6264
  });
6269
6265
 
6270
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/placeholders.js
6266
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/placeholders.js
6271
6267
  var require_placeholders = __commonJS({
6272
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
6268
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
6273
6269
  "use strict";
6274
6270
  Object.defineProperty(exports, "__esModule", {
6275
6271
  value: true
@@ -6297,19 +6293,17 @@ var require_placeholders = __commonJS({
6297
6293
  }
6298
6294
  });
6299
6295
 
6300
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/misc.js
6296
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/misc.js
6301
6297
  var require_misc = __commonJS({
6302
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/misc.js"() {
6298
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/misc.js"() {
6303
6299
  "use strict";
6304
6300
  var _utils = require_utils();
6305
6301
  var _placeholders = require_placeholders();
6306
6302
  var _core = require_core();
6307
6303
  var defineType = (0, _utils.defineAliasedType)("Miscellaneous");
6308
- {
6309
- defineType("Noop", {
6310
- visitor: []
6311
- });
6312
- }
6304
+ defineType("Noop", {
6305
+ visitor: []
6306
+ });
6313
6307
  defineType("Placeholder", {
6314
6308
  visitor: [],
6315
6309
  builder: ["expectedNode", "name"],
@@ -6333,9 +6327,9 @@ var require_misc = __commonJS({
6333
6327
  }
6334
6328
  });
6335
6329
 
6336
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/experimental.js
6330
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/experimental.js
6337
6331
  var require_experimental = __commonJS({
6338
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/experimental.js"() {
6332
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/experimental.js"() {
6339
6333
  "use strict";
6340
6334
  var _utils = require_utils();
6341
6335
  (0, _utils.default)("ArgumentPlaceholder", {});
@@ -6412,17 +6406,15 @@ var require_experimental = __commonJS({
6412
6406
  visitor: ["elements"],
6413
6407
  aliases: ["Expression"]
6414
6408
  });
6415
- {
6416
- (0, _utils.default)("DecimalLiteral", {
6417
- builder: ["value"],
6418
- fields: {
6419
- value: {
6420
- validate: (0, _utils.assertValueType)("string")
6421
- }
6422
- },
6423
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
6424
- });
6425
- }
6409
+ (0, _utils.default)("DecimalLiteral", {
6410
+ builder: ["value"],
6411
+ fields: {
6412
+ value: {
6413
+ validate: (0, _utils.assertValueType)("string")
6414
+ }
6415
+ },
6416
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
6417
+ });
6426
6418
  (0, _utils.default)("ModuleExpression", {
6427
6419
  visitor: ["body"],
6428
6420
  fields: {
@@ -6464,9 +6456,9 @@ var require_experimental = __commonJS({
6464
6456
  }
6465
6457
  });
6466
6458
 
6467
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/typescript.js
6459
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/typescript.js
6468
6460
  var require_typescript = __commonJS({
6469
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/typescript.js"() {
6461
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/typescript.js"() {
6470
6462
  "use strict";
6471
6463
  var _utils = require_utils();
6472
6464
  var _core = require_core();
@@ -6778,16 +6770,14 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
6778
6770
  }
6779
6771
  }
6780
6772
  });
6781
- {
6782
- defineType("TSExpressionWithTypeArguments", {
6783
- aliases: ["TSType"],
6784
- visitor: ["expression", "typeParameters"],
6785
- fields: {
6786
- expression: (0, _utils.validateType)("TSEntityName"),
6787
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
6788
- }
6789
- });
6790
- }
6773
+ defineType("TSExpressionWithTypeArguments", {
6774
+ aliases: ["TSType"],
6775
+ visitor: ["expression", "typeParameters"],
6776
+ fields: {
6777
+ expression: (0, _utils.validateType)("TSEntityName"),
6778
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
6779
+ }
6780
+ });
6791
6781
  defineType("TSInterfaceDeclaration", {
6792
6782
  aliases: ["Statement", "Declaration"],
6793
6783
  visitor: ["id", "typeParameters", "extends", "body"],
@@ -6847,20 +6837,18 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
6847
6837
  members: (0, _utils.validateArrayOfType)("TSEnumMember")
6848
6838
  }
6849
6839
  });
6850
- {
6851
- defineType("TSEnumDeclaration", {
6852
- aliases: ["Statement", "Declaration"],
6853
- visitor: ["id", "members"],
6854
- fields: {
6855
- declare: (0, _utils.validateOptional)(bool),
6856
- const: (0, _utils.validateOptional)(bool),
6857
- id: (0, _utils.validateType)("Identifier"),
6858
- members: (0, _utils.validateArrayOfType)("TSEnumMember"),
6859
- initializer: (0, _utils.validateOptionalType)("Expression"),
6860
- body: (0, _utils.validateOptionalType)("TSEnumBody")
6861
- }
6862
- });
6863
- }
6840
+ defineType("TSEnumDeclaration", {
6841
+ aliases: ["Statement", "Declaration"],
6842
+ visitor: ["id", "members"],
6843
+ fields: {
6844
+ declare: (0, _utils.validateOptional)(bool),
6845
+ const: (0, _utils.validateOptional)(bool),
6846
+ id: (0, _utils.validateType)("Identifier"),
6847
+ members: (0, _utils.validateArrayOfType)("TSEnumMember"),
6848
+ initializer: (0, _utils.validateOptionalType)("Expression"),
6849
+ body: (0, _utils.validateOptionalType)("TSEnumBody")
6850
+ }
6851
+ });
6864
6852
  defineType("TSEnumMember", {
6865
6853
  visitor: ["id", "initializer"],
6866
6854
  fields: {
@@ -6894,15 +6882,18 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
6894
6882
  aliases: ["TSType"],
6895
6883
  builder: ["argument", "qualifier", "typeParameters"],
6896
6884
  visitor: ["argument", "options", "qualifier", "typeParameters"],
6897
- fields: {
6898
- argument: (0, _utils.validateType)("StringLiteral"),
6899
- qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
6900
- ["typeParameters"]: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation"),
6885
+ fields: Object.assign({}, {
6886
+ argument: (0, _utils.validateType)("StringLiteral")
6887
+ }, {
6888
+ qualifier: (0, _utils.validateOptionalType)("TSEntityName")
6889
+ }, {
6890
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
6891
+ }, {
6901
6892
  options: {
6902
6893
  validate: (0, _utils.assertNodeType)("ObjectExpression"),
6903
6894
  optional: true
6904
6895
  }
6905
- }
6896
+ })
6906
6897
  });
6907
6898
  defineType("TSImportEqualsDeclaration", {
6908
6899
  aliases: ["Statement", "Declaration"],
@@ -6997,9 +6988,9 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
6997
6988
  }
6998
6989
  });
6999
6990
 
7000
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/deprecated-aliases.js
6991
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/deprecated-aliases.js
7001
6992
  var require_deprecated_aliases = __commonJS({
7002
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/deprecated-aliases.js"(exports) {
6993
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/deprecated-aliases.js"(exports) {
7003
6994
  "use strict";
7004
6995
  Object.defineProperty(exports, "__esModule", {
7005
6996
  value: true
@@ -7011,9 +7002,9 @@ var require_deprecated_aliases = __commonJS({
7011
7002
  }
7012
7003
  });
7013
7004
 
7014
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/index.js
7005
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/index.js
7015
7006
  var require_definitions = __commonJS({
7016
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/definitions/index.js"(exports) {
7007
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/index.js"(exports) {
7017
7008
  "use strict";
7018
7009
  Object.defineProperty(exports, "__esModule", {
7019
7010
  value: true
@@ -7120,9 +7111,9 @@ var require_definitions = __commonJS({
7120
7111
  }
7121
7112
  });
7122
7113
 
7123
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/validate.js
7114
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/validate.js
7124
7115
  var require_validate = __commonJS({
7125
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/validate.js"(exports) {
7116
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/validate.js"(exports) {
7126
7117
  "use strict";
7127
7118
  Object.defineProperty(exports, "__esModule", {
7128
7119
  value: true
@@ -7165,9 +7156,9 @@ var require_validate = __commonJS({
7165
7156
  }
7166
7157
  });
7167
7158
 
7168
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js
7159
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/lowercase.js
7169
7160
  var require_lowercase = __commonJS({
7170
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js"(exports) {
7161
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/lowercase.js"(exports) {
7171
7162
  "use strict";
7172
7163
  Object.defineProperty(exports, "__esModule", {
7173
7164
  value: true
@@ -10064,9 +10055,9 @@ var require_lowercase = __commonJS({
10064
10055
  }
10065
10056
  });
10066
10057
 
10067
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/uppercase.js
10058
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/uppercase.js
10068
10059
  var require_uppercase = __commonJS({
10069
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
10060
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
10070
10061
  "use strict";
10071
10062
  Object.defineProperty(exports, "__esModule", {
10072
10063
  value: true
@@ -10077,9 +10068,7 @@ var require_uppercase = __commonJS({
10077
10068
  var b = require_lowercase();
10078
10069
  var _deprecationWarning = require_deprecationWarning();
10079
10070
  function alias(lowercase) {
10080
- {
10081
- return b[lowercase];
10082
- }
10071
+ return b[lowercase];
10083
10072
  }
10084
10073
  var ArrayExpression = exports.ArrayExpression = alias("arrayExpression");
10085
10074
  var AssignmentExpression = exports.AssignmentExpression = alias("assignmentExpression");
@@ -10341,9 +10330,9 @@ var require_uppercase = __commonJS({
10341
10330
  }
10342
10331
  });
10343
10332
 
10344
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/index.js
10333
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/index.js
10345
10334
  var require_generated2 = __commonJS({
10346
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
10335
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
10347
10336
  "use strict";
10348
10337
  Object.defineProperty(exports, "__esModule", {
10349
10338
  value: true
@@ -10373,9 +10362,9 @@ var require_generated2 = __commonJS({
10373
10362
  }
10374
10363
  });
10375
10364
 
10376
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
10365
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
10377
10366
  var require_cleanJSXElementLiteralChild = __commonJS({
10378
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
10367
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
10379
10368
  "use strict";
10380
10369
  Object.defineProperty(exports, "__esModule", {
10381
10370
  value: true
@@ -10416,9 +10405,9 @@ var require_cleanJSXElementLiteralChild = __commonJS({
10416
10405
  }
10417
10406
  });
10418
10407
 
10419
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/react/buildChildren.js
10408
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/react/buildChildren.js
10420
10409
  var require_buildChildren = __commonJS({
10421
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
10410
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
10422
10411
  "use strict";
10423
10412
  Object.defineProperty(exports, "__esModule", {
10424
10413
  value: true
@@ -10443,9 +10432,9 @@ var require_buildChildren = __commonJS({
10443
10432
  }
10444
10433
  });
10445
10434
 
10446
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isNode.js
10435
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNode.js
10447
10436
  var require_isNode = __commonJS({
10448
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
10437
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
10449
10438
  "use strict";
10450
10439
  Object.defineProperty(exports, "__esModule", {
10451
10440
  value: true
@@ -10458,9 +10447,9 @@ var require_isNode = __commonJS({
10458
10447
  }
10459
10448
  });
10460
10449
 
10461
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/asserts/assertNode.js
10450
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/assertNode.js
10462
10451
  var require_assertNode = __commonJS({
10463
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
10452
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
10464
10453
  "use strict";
10465
10454
  Object.defineProperty(exports, "__esModule", {
10466
10455
  value: true
@@ -10477,9 +10466,9 @@ var require_assertNode = __commonJS({
10477
10466
  }
10478
10467
  });
10479
10468
 
10480
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/asserts/generated/index.js
10469
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/generated/index.js
10481
10470
  var require_generated3 = __commonJS({
10482
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
10471
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
10483
10472
  "use strict";
10484
10473
  Object.defineProperty(exports, "__esModule", {
10485
10474
  value: true
@@ -11731,9 +11720,9 @@ var require_generated3 = __commonJS({
11731
11720
  }
11732
11721
  });
11733
11722
 
11734
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
11723
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
11735
11724
  var require_createTypeAnnotationBasedOnTypeof = __commonJS({
11736
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
11725
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
11737
11726
  "use strict";
11738
11727
  Object.defineProperty(exports, "__esModule", {
11739
11728
  value: true
@@ -11765,9 +11754,9 @@ var require_createTypeAnnotationBasedOnTypeof = __commonJS({
11765
11754
  }
11766
11755
  });
11767
11756
 
11768
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
11757
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
11769
11758
  var require_removeTypeDuplicates = __commonJS({
11770
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
11759
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
11771
11760
  "use strict";
11772
11761
  Object.defineProperty(exports, "__esModule", {
11773
11762
  value: true
@@ -11833,9 +11822,9 @@ var require_removeTypeDuplicates = __commonJS({
11833
11822
  }
11834
11823
  });
11835
11824
 
11836
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
11825
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
11837
11826
  var require_createFlowUnionType = __commonJS({
11838
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
11827
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
11839
11828
  "use strict";
11840
11829
  Object.defineProperty(exports, "__esModule", {
11841
11830
  value: true
@@ -11854,9 +11843,9 @@ var require_createFlowUnionType = __commonJS({
11854
11843
  }
11855
11844
  });
11856
11845
 
11857
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
11846
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
11858
11847
  var require_removeTypeDuplicates2 = __commonJS({
11859
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
11848
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
11860
11849
  "use strict";
11861
11850
  Object.defineProperty(exports, "__esModule", {
11862
11851
  value: true
@@ -11923,9 +11912,9 @@ var require_removeTypeDuplicates2 = __commonJS({
11923
11912
  }
11924
11913
  });
11925
11914
 
11926
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
11915
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
11927
11916
  var require_createTSUnionType = __commonJS({
11928
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
11917
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
11929
11918
  "use strict";
11930
11919
  Object.defineProperty(exports, "__esModule", {
11931
11920
  value: true
@@ -11948,9 +11937,9 @@ var require_createTSUnionType = __commonJS({
11948
11937
  }
11949
11938
  });
11950
11939
 
11951
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/productions.js
11940
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/productions.js
11952
11941
  var require_productions = __commonJS({
11953
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/productions.js"(exports) {
11942
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/productions.js"(exports) {
11954
11943
  "use strict";
11955
11944
  Object.defineProperty(exports, "__esModule", {
11956
11945
  value: true
@@ -11963,9 +11952,9 @@ var require_productions = __commonJS({
11963
11952
  }
11964
11953
  });
11965
11954
 
11966
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneNode.js
11955
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneNode.js
11967
11956
  var require_cloneNode = __commonJS({
11968
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
11957
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
11969
11958
  "use strict";
11970
11959
  Object.defineProperty(exports, "__esModule", {
11971
11960
  value: true
@@ -12073,9 +12062,9 @@ var require_cloneNode = __commonJS({
12073
12062
  }
12074
12063
  });
12075
12064
 
12076
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/clone.js
12065
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/clone.js
12077
12066
  var require_clone = __commonJS({
12078
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/clone.js"(exports) {
12067
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/clone.js"(exports) {
12079
12068
  "use strict";
12080
12069
  Object.defineProperty(exports, "__esModule", {
12081
12070
  value: true
@@ -12088,9 +12077,9 @@ var require_clone = __commonJS({
12088
12077
  }
12089
12078
  });
12090
12079
 
12091
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneDeep.js
12080
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeep.js
12092
12081
  var require_cloneDeep = __commonJS({
12093
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
12082
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
12094
12083
  "use strict";
12095
12084
  Object.defineProperty(exports, "__esModule", {
12096
12085
  value: true
@@ -12103,9 +12092,9 @@ var require_cloneDeep = __commonJS({
12103
12092
  }
12104
12093
  });
12105
12094
 
12106
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
12095
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
12107
12096
  var require_cloneDeepWithoutLoc = __commonJS({
12108
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
12097
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
12109
12098
  "use strict";
12110
12099
  Object.defineProperty(exports, "__esModule", {
12111
12100
  value: true
@@ -12118,9 +12107,9 @@ var require_cloneDeepWithoutLoc = __commonJS({
12118
12107
  }
12119
12108
  });
12120
12109
 
12121
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
12110
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
12122
12111
  var require_cloneWithoutLoc = __commonJS({
12123
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
12112
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
12124
12113
  "use strict";
12125
12114
  Object.defineProperty(exports, "__esModule", {
12126
12115
  value: true
@@ -12133,9 +12122,9 @@ var require_cloneWithoutLoc = __commonJS({
12133
12122
  }
12134
12123
  });
12135
12124
 
12136
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/addComments.js
12125
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComments.js
12137
12126
  var require_addComments = __commonJS({
12138
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
12127
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
12139
12128
  "use strict";
12140
12129
  Object.defineProperty(exports, "__esModule", {
12141
12130
  value: true
@@ -12158,9 +12147,9 @@ var require_addComments = __commonJS({
12158
12147
  }
12159
12148
  });
12160
12149
 
12161
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/addComment.js
12150
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComment.js
12162
12151
  var require_addComment = __commonJS({
12163
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
12152
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
12164
12153
  "use strict";
12165
12154
  Object.defineProperty(exports, "__esModule", {
12166
12155
  value: true
@@ -12176,9 +12165,9 @@ var require_addComment = __commonJS({
12176
12165
  }
12177
12166
  });
12178
12167
 
12179
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/inherit.js
12168
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/inherit.js
12180
12169
  var require_inherit = __commonJS({
12181
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
12170
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
12182
12171
  "use strict";
12183
12172
  Object.defineProperty(exports, "__esModule", {
12184
12173
  value: true
@@ -12192,9 +12181,9 @@ var require_inherit = __commonJS({
12192
12181
  }
12193
12182
  });
12194
12183
 
12195
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritInnerComments.js
12184
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritInnerComments.js
12196
12185
  var require_inheritInnerComments = __commonJS({
12197
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
12186
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
12198
12187
  "use strict";
12199
12188
  Object.defineProperty(exports, "__esModule", {
12200
12189
  value: true
@@ -12207,9 +12196,9 @@ var require_inheritInnerComments = __commonJS({
12207
12196
  }
12208
12197
  });
12209
12198
 
12210
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
12199
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
12211
12200
  var require_inheritLeadingComments = __commonJS({
12212
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
12201
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
12213
12202
  "use strict";
12214
12203
  Object.defineProperty(exports, "__esModule", {
12215
12204
  value: true
@@ -12222,9 +12211,9 @@ var require_inheritLeadingComments = __commonJS({
12222
12211
  }
12223
12212
  });
12224
12213
 
12225
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
12214
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
12226
12215
  var require_inheritTrailingComments = __commonJS({
12227
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
12216
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
12228
12217
  "use strict";
12229
12218
  Object.defineProperty(exports, "__esModule", {
12230
12219
  value: true
@@ -12237,9 +12226,9 @@ var require_inheritTrailingComments = __commonJS({
12237
12226
  }
12238
12227
  });
12239
12228
 
12240
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritsComments.js
12229
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritsComments.js
12241
12230
  var require_inheritsComments = __commonJS({
12242
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
12231
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
12243
12232
  "use strict";
12244
12233
  Object.defineProperty(exports, "__esModule", {
12245
12234
  value: true
@@ -12257,9 +12246,9 @@ var require_inheritsComments = __commonJS({
12257
12246
  }
12258
12247
  });
12259
12248
 
12260
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/removeComments.js
12249
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/removeComments.js
12261
12250
  var require_removeComments = __commonJS({
12262
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
12251
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
12263
12252
  "use strict";
12264
12253
  Object.defineProperty(exports, "__esModule", {
12265
12254
  value: true
@@ -12275,9 +12264,9 @@ var require_removeComments = __commonJS({
12275
12264
  }
12276
12265
  });
12277
12266
 
12278
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/constants/generated/index.js
12267
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/generated/index.js
12279
12268
  var require_generated4 = __commonJS({
12280
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
12269
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
12281
12270
  "use strict";
12282
12271
  Object.defineProperty(exports, "__esModule", {
12283
12272
  value: true
@@ -12338,9 +12327,9 @@ var require_generated4 = __commonJS({
12338
12327
  }
12339
12328
  });
12340
12329
 
12341
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toBlock.js
12330
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBlock.js
12342
12331
  var require_toBlock = __commonJS({
12343
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
12332
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
12344
12333
  "use strict";
12345
12334
  Object.defineProperty(exports, "__esModule", {
12346
12335
  value: true
@@ -12370,9 +12359,9 @@ var require_toBlock = __commonJS({
12370
12359
  }
12371
12360
  });
12372
12361
 
12373
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/ensureBlock.js
12362
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/ensureBlock.js
12374
12363
  var require_ensureBlock = __commonJS({
12375
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
12364
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
12376
12365
  "use strict";
12377
12366
  Object.defineProperty(exports, "__esModule", {
12378
12367
  value: true
@@ -12387,9 +12376,9 @@ var require_ensureBlock = __commonJS({
12387
12376
  }
12388
12377
  });
12389
12378
 
12390
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toIdentifier.js
12379
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toIdentifier.js
12391
12380
  var require_toIdentifier = __commonJS({
12392
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
12381
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
12393
12382
  "use strict";
12394
12383
  Object.defineProperty(exports, "__esModule", {
12395
12384
  value: true
@@ -12415,9 +12404,9 @@ var require_toIdentifier = __commonJS({
12415
12404
  }
12416
12405
  });
12417
12406
 
12418
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
12407
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
12419
12408
  var require_toBindingIdentifierName = __commonJS({
12420
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
12409
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
12421
12410
  "use strict";
12422
12411
  Object.defineProperty(exports, "__esModule", {
12423
12412
  value: true
@@ -12432,9 +12421,9 @@ var require_toBindingIdentifierName = __commonJS({
12432
12421
  }
12433
12422
  });
12434
12423
 
12435
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toComputedKey.js
12424
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toComputedKey.js
12436
12425
  var require_toComputedKey = __commonJS({
12437
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
12426
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
12438
12427
  "use strict";
12439
12428
  Object.defineProperty(exports, "__esModule", {
12440
12429
  value: true
@@ -12449,9 +12438,9 @@ var require_toComputedKey = __commonJS({
12449
12438
  }
12450
12439
  });
12451
12440
 
12452
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toExpression.js
12441
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toExpression.js
12453
12442
  var require_toExpression = __commonJS({
12454
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
12443
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
12455
12444
  "use strict";
12456
12445
  Object.defineProperty(exports, "__esModule", {
12457
12446
  value: true
@@ -12480,9 +12469,9 @@ var require_toExpression = __commonJS({
12480
12469
  }
12481
12470
  });
12482
12471
 
12483
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/traverse/traverseFast.js
12472
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverseFast.js
12484
12473
  var require_traverseFast = __commonJS({
12485
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
12474
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
12486
12475
  "use strict";
12487
12476
  Object.defineProperty(exports, "__esModule", {
12488
12477
  value: true
@@ -12523,9 +12512,9 @@ var require_traverseFast = __commonJS({
12523
12512
  }
12524
12513
  });
12525
12514
 
12526
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/removeProperties.js
12515
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removeProperties.js
12527
12516
  var require_removeProperties = __commonJS({
12528
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
12517
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
12529
12518
  "use strict";
12530
12519
  Object.defineProperty(exports, "__esModule", {
12531
12520
  value: true
@@ -12540,7 +12529,7 @@ var require_removeProperties = __commonJS({
12540
12529
  if (node[key] != null) node[key] = void 0;
12541
12530
  }
12542
12531
  for (const key of Object.keys(node)) {
12543
- if (key[0] === "_" && node[key] != null) node[key] = void 0;
12532
+ if (key.startsWith("_") && node[key] != null) node[key] = void 0;
12544
12533
  }
12545
12534
  const symbols = Object.getOwnPropertySymbols(node);
12546
12535
  for (const sym of symbols) {
@@ -12550,9 +12539,9 @@ var require_removeProperties = __commonJS({
12550
12539
  }
12551
12540
  });
12552
12541
 
12553
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
12542
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
12554
12543
  var require_removePropertiesDeep = __commonJS({
12555
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
12544
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
12556
12545
  "use strict";
12557
12546
  Object.defineProperty(exports, "__esModule", {
12558
12547
  value: true
@@ -12567,9 +12556,9 @@ var require_removePropertiesDeep = __commonJS({
12567
12556
  }
12568
12557
  });
12569
12558
 
12570
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toKeyAlias.js
12559
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toKeyAlias.js
12571
12560
  var require_toKeyAlias = __commonJS({
12572
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
12561
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
12573
12562
  "use strict";
12574
12563
  Object.defineProperty(exports, "__esModule", {
12575
12564
  value: true
@@ -12608,9 +12597,9 @@ var require_toKeyAlias = __commonJS({
12608
12597
  }
12609
12598
  });
12610
12599
 
12611
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toStatement.js
12600
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toStatement.js
12612
12601
  var require_toStatement = __commonJS({
12613
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
12602
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
12614
12603
  "use strict";
12615
12604
  Object.defineProperty(exports, "__esModule", {
12616
12605
  value: true
@@ -12650,9 +12639,9 @@ var require_toStatement = __commonJS({
12650
12639
  }
12651
12640
  });
12652
12641
 
12653
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/valueToNode.js
12642
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/valueToNode.js
12654
12643
  var require_valueToNode = __commonJS({
12655
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
12644
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
12656
12645
  "use strict";
12657
12646
  Object.defineProperty(exports, "__esModule", {
12658
12647
  value: true
@@ -12741,9 +12730,9 @@ var require_valueToNode = __commonJS({
12741
12730
  }
12742
12731
  });
12743
12732
 
12744
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
12733
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
12745
12734
  var require_appendToMemberExpression = __commonJS({
12746
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
12735
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
12747
12736
  "use strict";
12748
12737
  Object.defineProperty(exports, "__esModule", {
12749
12738
  value: true
@@ -12759,9 +12748,9 @@ var require_appendToMemberExpression = __commonJS({
12759
12748
  }
12760
12749
  });
12761
12750
 
12762
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/inherits.js
12751
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/inherits.js
12763
12752
  var require_inherits = __commonJS({
12764
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
12753
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
12765
12754
  "use strict";
12766
12755
  Object.defineProperty(exports, "__esModule", {
12767
12756
  value: true
@@ -12777,7 +12766,7 @@ var require_inherits = __commonJS({
12777
12766
  }
12778
12767
  }
12779
12768
  for (const key of Object.keys(parent)) {
12780
- if (key[0] === "_" && key !== "__clone") {
12769
+ if (key.startsWith("_") && key !== "__clone") {
12781
12770
  child[key] = parent[key];
12782
12771
  }
12783
12772
  }
@@ -12790,9 +12779,9 @@ var require_inherits = __commonJS({
12790
12779
  }
12791
12780
  });
12792
12781
 
12793
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
12782
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
12794
12783
  var require_prependToMemberExpression = __commonJS({
12795
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
12784
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
12796
12785
  "use strict";
12797
12786
  Object.defineProperty(exports, "__esModule", {
12798
12787
  value: true
@@ -12810,9 +12799,9 @@ var require_prependToMemberExpression = __commonJS({
12810
12799
  }
12811
12800
  });
12812
12801
 
12813
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js
12802
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js
12814
12803
  var require_getAssignmentIdentifiers = __commonJS({
12815
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js"(exports) {
12804
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js"(exports) {
12816
12805
  "use strict";
12817
12806
  Object.defineProperty(exports, "__esModule", {
12818
12807
  value: true
@@ -12861,9 +12850,9 @@ var require_getAssignmentIdentifiers = __commonJS({
12861
12850
  }
12862
12851
  });
12863
12852
 
12864
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
12853
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
12865
12854
  var require_getBindingIdentifiers = __commonJS({
12866
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
12855
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
12867
12856
  "use strict";
12868
12857
  Object.defineProperty(exports, "__esModule", {
12869
12858
  value: true
@@ -12966,9 +12955,9 @@ var require_getBindingIdentifiers = __commonJS({
12966
12955
  }
12967
12956
  });
12968
12957
 
12969
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
12958
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
12970
12959
  var require_getOuterBindingIdentifiers = __commonJS({
12971
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
12960
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
12972
12961
  "use strict";
12973
12962
  Object.defineProperty(exports, "__esModule", {
12974
12963
  value: true
@@ -12982,9 +12971,9 @@ var require_getOuterBindingIdentifiers = __commonJS({
12982
12971
  }
12983
12972
  });
12984
12973
 
12985
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getFunctionName.js
12974
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getFunctionName.js
12986
12975
  var require_getFunctionName = __commonJS({
12987
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/retrievers/getFunctionName.js"(exports) {
12976
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getFunctionName.js"(exports) {
12988
12977
  "use strict";
12989
12978
  Object.defineProperty(exports, "__esModule", {
12990
12979
  value: true
@@ -13049,9 +13038,9 @@ var require_getFunctionName = __commonJS({
13049
13038
  }
13050
13039
  });
13051
13040
 
13052
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/traverse/traverse.js
13041
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverse.js
13053
13042
  var require_traverse = __commonJS({
13054
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
13043
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
13055
13044
  "use strict";
13056
13045
  Object.defineProperty(exports, "__esModule", {
13057
13046
  value: true
@@ -13102,9 +13091,9 @@ var require_traverse = __commonJS({
13102
13091
  }
13103
13092
  });
13104
13093
 
13105
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isBinding.js
13094
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBinding.js
13106
13095
  var require_isBinding = __commonJS({
13107
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
13096
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
13108
13097
  "use strict";
13109
13098
  Object.defineProperty(exports, "__esModule", {
13110
13099
  value: true
@@ -13132,30 +13121,25 @@ var require_isBinding = __commonJS({
13132
13121
  }
13133
13122
  });
13134
13123
 
13135
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isLet.js
13124
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isLet.js
13136
13125
  var require_isLet = __commonJS({
13137
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
13126
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
13138
13127
  "use strict";
13139
13128
  Object.defineProperty(exports, "__esModule", {
13140
13129
  value: true
13141
13130
  });
13142
13131
  exports.default = isLet;
13143
13132
  var _index = require_generated();
13144
- {
13145
- BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
13146
- }
13147
- var BLOCK_SCOPED_SYMBOL;
13133
+ var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
13148
13134
  function isLet(node) {
13149
- {
13150
- return (0, _index.isVariableDeclaration)(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]);
13151
- }
13135
+ return (0, _index.isVariableDeclaration)(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]);
13152
13136
  }
13153
13137
  }
13154
13138
  });
13155
13139
 
13156
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isBlockScoped.js
13140
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBlockScoped.js
13157
13141
  var require_isBlockScoped = __commonJS({
13158
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
13142
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
13159
13143
  "use strict";
13160
13144
  Object.defineProperty(exports, "__esModule", {
13161
13145
  value: true
@@ -13169,9 +13153,9 @@ var require_isBlockScoped = __commonJS({
13169
13153
  }
13170
13154
  });
13171
13155
 
13172
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isImmutable.js
13156
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isImmutable.js
13173
13157
  var require_isImmutable = __commonJS({
13174
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
13158
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
13175
13159
  "use strict";
13176
13160
  Object.defineProperty(exports, "__esModule", {
13177
13161
  value: true
@@ -13193,9 +13177,9 @@ var require_isImmutable = __commonJS({
13193
13177
  }
13194
13178
  });
13195
13179
 
13196
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
13180
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
13197
13181
  var require_isNodesEquivalent = __commonJS({
13198
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
13182
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
13199
13183
  "use strict";
13200
13184
  Object.defineProperty(exports, "__esModule", {
13201
13185
  value: true
@@ -13253,9 +13237,9 @@ var require_isNodesEquivalent = __commonJS({
13253
13237
  }
13254
13238
  });
13255
13239
 
13256
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isReferenced.js
13240
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isReferenced.js
13257
13241
  var require_isReferenced = __commonJS({
13258
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
13242
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
13259
13243
  "use strict";
13260
13244
  Object.defineProperty(exports, "__esModule", {
13261
13245
  value: true
@@ -13288,7 +13272,7 @@ var require_isReferenced = __commonJS({
13288
13272
  if (parent.key === node) {
13289
13273
  return !!parent.computed;
13290
13274
  }
13291
- return !grandparent || grandparent.type !== "ObjectPattern";
13275
+ return (grandparent == null ? void 0 : grandparent.type) !== "ObjectPattern";
13292
13276
  case "ClassProperty":
13293
13277
  case "ClassAccessorProperty":
13294
13278
  if (parent.key === node) {
@@ -13352,9 +13336,9 @@ var require_isReferenced = __commonJS({
13352
13336
  }
13353
13337
  });
13354
13338
 
13355
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isScope.js
13339
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isScope.js
13356
13340
  var require_isScope = __commonJS({
13357
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
13341
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
13358
13342
  "use strict";
13359
13343
  Object.defineProperty(exports, "__esModule", {
13360
13344
  value: true
@@ -13373,9 +13357,9 @@ var require_isScope = __commonJS({
13373
13357
  }
13374
13358
  });
13375
13359
 
13376
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
13360
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
13377
13361
  var require_isSpecifierDefault = __commonJS({
13378
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
13362
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
13379
13363
  "use strict";
13380
13364
  Object.defineProperty(exports, "__esModule", {
13381
13365
  value: true
@@ -13390,9 +13374,9 @@ var require_isSpecifierDefault = __commonJS({
13390
13374
  }
13391
13375
  });
13392
13376
 
13393
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
13377
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
13394
13378
  var require_isValidES3Identifier = __commonJS({
13395
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
13379
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
13396
13380
  "use strict";
13397
13381
  Object.defineProperty(exports, "__esModule", {
13398
13382
  value: true
@@ -13406,32 +13390,27 @@ var require_isValidES3Identifier = __commonJS({
13406
13390
  }
13407
13391
  });
13408
13392
 
13409
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isVar.js
13393
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isVar.js
13410
13394
  var require_isVar = __commonJS({
13411
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
13395
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
13412
13396
  "use strict";
13413
13397
  Object.defineProperty(exports, "__esModule", {
13414
13398
  value: true
13415
13399
  });
13416
13400
  exports.default = isVar;
13417
13401
  var _index = require_generated();
13418
- {
13419
- BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
13420
- }
13421
- var BLOCK_SCOPED_SYMBOL;
13402
+ var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
13422
13403
  function isVar(node) {
13423
- {
13424
- return (0, _index.isVariableDeclaration)(node, {
13425
- kind: "var"
13426
- }) && !node[BLOCK_SCOPED_SYMBOL];
13427
- }
13404
+ return (0, _index.isVariableDeclaration)(node, {
13405
+ kind: "var"
13406
+ }) && !node[BLOCK_SCOPED_SYMBOL];
13428
13407
  }
13429
13408
  }
13430
13409
  });
13431
13410
 
13432
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
13411
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
13433
13412
  var require_gatherSequenceExpressions = __commonJS({
13434
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
13413
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
13435
13414
  "use strict";
13436
13415
  Object.defineProperty(exports, "__esModule", {
13437
13416
  value: true
@@ -13497,9 +13476,9 @@ var require_gatherSequenceExpressions = __commonJS({
13497
13476
  }
13498
13477
  });
13499
13478
 
13500
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toSequenceExpression.js
13479
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toSequenceExpression.js
13501
13480
  var require_toSequenceExpression = __commonJS({
13502
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
13481
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
13503
13482
  "use strict";
13504
13483
  Object.defineProperty(exports, "__esModule", {
13505
13484
  value: true
@@ -13519,9 +13498,9 @@ var require_toSequenceExpression = __commonJS({
13519
13498
  }
13520
13499
  });
13521
13500
 
13522
- // ../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/index.js
13501
+ // ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.js
13523
13502
  var require_lib3 = __commonJS({
13524
- "../../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/index.js"(exports) {
13503
+ "../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.js"(exports) {
13525
13504
  "use strict";
13526
13505
  Object.defineProperty(exports, "__esModule", {
13527
13506
  value: true
@@ -14097,9 +14076,7 @@ var require_lib3 = __commonJS({
14097
14076
  isCompatTag: _isCompatTag.default,
14098
14077
  buildChildren: _buildChildren.default
14099
14078
  };
14100
- {
14101
- exports.toSequenceExpression = _toSequenceExpression.default;
14102
- }
14079
+ exports.toSequenceExpression = _toSequenceExpression.default;
14103
14080
  if (process.env.BABEL_TYPES_8_BREAKING) {
14104
14081
  console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!");
14105
14082
  }
@@ -14152,6 +14129,7 @@ var RUNTIME_HELPERS = {
14152
14129
  propsRest: "__fictPropsRest",
14153
14130
  mergeProps: "mergeProps",
14154
14131
  prop: "prop",
14132
+ keyed: "keyed",
14155
14133
  runInScope: "runInScope",
14156
14134
  createElement: "createElement",
14157
14135
  conditional: "createConditional",
@@ -14186,6 +14164,7 @@ var RUNTIME_ALIASES = {
14186
14164
  propGetter: "__fictProp",
14187
14165
  propsRest: "__fictPropsRest",
14188
14166
  prop: "prop",
14167
+ keyed: "keyed",
14189
14168
  mergeProps: "mergeProps",
14190
14169
  runInScope: "runInScope",
14191
14170
  createElement: "createElement",
@@ -15298,8 +15277,18 @@ function convertFunction(name, params, body, options) {
15298
15277
  loc: options?.loc ?? null
15299
15278
  };
15300
15279
  }
15301
- function convertStatementsToHIRFunction(name, statements) {
15302
- return convertFunction(name, [], statements, { loc: getLoc(statements[0]) });
15280
+ function convertStatementsToHIRFunction(name, statements, options) {
15281
+ const prevOptions = activeBuildOptions;
15282
+ if (options) {
15283
+ activeBuildOptions = options;
15284
+ }
15285
+ try {
15286
+ return convertFunction(name, [], statements, { loc: getLoc(statements[0]) });
15287
+ } finally {
15288
+ if (options) {
15289
+ activeBuildOptions = prevOptions;
15290
+ }
15291
+ }
15303
15292
  }
15304
15293
  function convertAssignmentValue(expr) {
15305
15294
  const right = convertExpression(expr.right);
@@ -15817,9 +15806,9 @@ function processStatement(stmt, bb, jumpTarget, ctx) {
15817
15806
  }
15818
15807
  return bb;
15819
15808
  }
15820
- function convertExpression(node) {
15809
+ function convertExpression(node, options) {
15821
15810
  const loc = getLoc(node);
15822
- const convertCallArguments = (args) => args.map((arg) => {
15811
+ const convertCallArguments = (args, reactiveScope) => args.map((arg) => {
15823
15812
  if (t.isSpreadElement(arg)) {
15824
15813
  return {
15825
15814
  kind: "SpreadElement",
@@ -15827,9 +15816,25 @@ function convertExpression(node) {
15827
15816
  loc: getLoc(arg)
15828
15817
  };
15829
15818
  }
15830
- if (t.isExpression(arg)) return convertExpression(arg);
15819
+ if (t.isExpression(arg)) {
15820
+ if (reactiveScope && arg === args[0] && (t.isArrowFunctionExpression(arg) || t.isFunctionExpression(arg))) {
15821
+ return convertExpression(arg, { reactiveScope });
15822
+ }
15823
+ return convertExpression(arg);
15824
+ }
15831
15825
  return void 0;
15832
15826
  }).filter(Boolean);
15827
+ const resolveReactiveScope = (callee) => {
15828
+ const reactiveScopes = activeBuildOptions?.reactiveScopes;
15829
+ if (!reactiveScopes || reactiveScopes.size === 0) return void 0;
15830
+ if (t.isIdentifier(callee)) {
15831
+ return reactiveScopes.has(callee.name) ? callee.name : void 0;
15832
+ }
15833
+ if ((t.isMemberExpression(callee) || t.isOptionalMemberExpression(callee)) && !callee.computed && t.isIdentifier(callee.property)) {
15834
+ return reactiveScopes.has(callee.property.name) ? callee.property.name : void 0;
15835
+ }
15836
+ return void 0;
15837
+ };
15833
15838
  if (t.isParenthesizedExpression(node) && t.isExpression(node.expression)) {
15834
15839
  return convertExpression(node.expression);
15835
15840
  }
@@ -15876,10 +15881,11 @@ function convertExpression(node) {
15876
15881
  if (t.isCallExpression(node)) {
15877
15882
  const callee = normalizeMacroCallee(node.callee);
15878
15883
  const pure = hasPureAnnotation(node) || hasPureAnnotation(node.callee);
15884
+ const reactiveScope = resolveReactiveScope(node.callee);
15879
15885
  const call = {
15880
15886
  kind: "CallExpression",
15881
15887
  callee: convertExpression(callee),
15882
- arguments: convertCallArguments(node.arguments),
15888
+ arguments: convertCallArguments(node.arguments, reactiveScope),
15883
15889
  ...pure ? { pure: true } : null,
15884
15890
  loc
15885
15891
  };
@@ -16089,6 +16095,7 @@ function convertExpression(node) {
16089
16095
  body: nested.blocks,
16090
16096
  isExpression: false,
16091
16097
  isAsync: node.async,
16098
+ reactiveScope: options?.reactiveScope,
16092
16099
  loc
16093
16100
  };
16094
16101
  return arrow;
@@ -16101,6 +16108,7 @@ function convertExpression(node) {
16101
16108
  body: convertExpression(node.body),
16102
16109
  isExpression: true,
16103
16110
  isAsync: node.async,
16111
+ reactiveScope: options?.reactiveScope,
16104
16112
  loc
16105
16113
  };
16106
16114
  return arrow;
@@ -16120,6 +16128,7 @@ function convertExpression(node) {
16120
16128
  params: nested.params,
16121
16129
  body: nested.blocks,
16122
16130
  isAsync: node.async,
16131
+ reactiveScope: options?.reactiveScope,
16123
16132
  loc
16124
16133
  };
16125
16134
  return fn;
@@ -16190,10 +16199,11 @@ function convertExpression(node) {
16190
16199
  }
16191
16200
  if (t.isOptionalCallExpression(node)) {
16192
16201
  const callee = normalizeMacroCallee(node.callee);
16202
+ const reactiveScope = resolveReactiveScope(node.callee);
16193
16203
  return {
16194
16204
  kind: "OptionalCallExpression",
16195
16205
  callee: convertExpression(callee),
16196
- arguments: convertCallArguments(node.arguments),
16206
+ arguments: convertCallArguments(node.arguments, reactiveScope),
16197
16207
  optional: node.optional,
16198
16208
  ...hasPureAnnotation(node) || hasPureAnnotation(node.callee) ? { pure: true } : null,
16199
16209
  loc
@@ -16381,16 +16391,57 @@ function shouldMemoizeRegion(region) {
16381
16391
  }
16382
16392
 
16383
16393
  // src/module-metadata.ts
16394
+ import { existsSync, readFileSync, statSync, writeFileSync } from "fs";
16384
16395
  import path from "path";
16385
- import { existsSync, statSync } from "fs";
16396
+ import { fileURLToPath } from "url";
16386
16397
  var globalMetadata = /* @__PURE__ */ new Map();
16387
16398
  var MODULE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"];
16399
+ var DEFAULT_META_EXTENSION = ".fict.meta.json";
16388
16400
  function normalizeFileName(fileName) {
16389
- return path.resolve(fileName);
16401
+ let normalized = fileName;
16402
+ const queryStart = normalized.indexOf("?");
16403
+ if (queryStart !== -1) {
16404
+ normalized = normalized.slice(0, queryStart);
16405
+ }
16406
+ if (normalized.startsWith("/@fs/")) {
16407
+ normalized = normalized.slice("/@fs/".length);
16408
+ }
16409
+ if (normalized.startsWith("file://")) {
16410
+ try {
16411
+ normalized = fileURLToPath(normalized);
16412
+ } catch {
16413
+ }
16414
+ }
16415
+ return path.resolve(normalized);
16390
16416
  }
16391
16417
  function getMetadataStore(options) {
16392
16418
  return options?.moduleMetadata ?? globalMetadata;
16393
16419
  }
16420
+ function getMetadataExtension(options) {
16421
+ return options?.moduleMetadataExtension ?? DEFAULT_META_EXTENSION;
16422
+ }
16423
+ function getMetadataFilePath(fileName, options) {
16424
+ return `${normalizeFileName(fileName)}${getMetadataExtension(options)}`;
16425
+ }
16426
+ function shouldEmitModuleMetadata(options) {
16427
+ const opt = options?.emitModuleMetadata;
16428
+ if (opt === true) return true;
16429
+ if (opt === false) return false;
16430
+ if (options?.moduleMetadata || options?.resolveModuleMetadata) return false;
16431
+ return true;
16432
+ }
16433
+ function readMetadataFromDisk(fileName, store, options) {
16434
+ const metaPath = getMetadataFilePath(fileName, options);
16435
+ if (!existsSync(metaPath)) return void 0;
16436
+ try {
16437
+ const raw = readFileSync(metaPath, "utf8");
16438
+ const parsed = JSON.parse(raw);
16439
+ store.set(normalizeFileName(fileName), parsed);
16440
+ return parsed;
16441
+ } catch {
16442
+ return void 0;
16443
+ }
16444
+ }
16394
16445
  function isFile(pathName) {
16395
16446
  try {
16396
16447
  return statSync(pathName).isFile();
@@ -16421,23 +16472,64 @@ function resolveImportSource(source, importer, store) {
16421
16472
  }
16422
16473
  return void 0;
16423
16474
  }
16475
+ function resolveImportSourceByMetadata(source, importer, options) {
16476
+ if (!importer) return void 0;
16477
+ const isAbsolute = path.isAbsolute(source);
16478
+ if (!isAbsolute && !source.startsWith(".")) return void 0;
16479
+ const base = isAbsolute ? source : path.resolve(path.dirname(importer), source);
16480
+ const normalized = normalizeFileName(base);
16481
+ const metaExt = getMetadataExtension(options);
16482
+ const candidates = [];
16483
+ const ext = path.extname(normalized);
16484
+ if (ext) {
16485
+ candidates.push(normalized);
16486
+ } else {
16487
+ for (const suffix of MODULE_EXTENSIONS) {
16488
+ candidates.push(`${normalized}${suffix}`);
16489
+ }
16490
+ }
16491
+ for (const suffix of MODULE_EXTENSIONS) {
16492
+ candidates.push(path.join(normalized, `index${suffix}`));
16493
+ }
16494
+ for (const candidate of candidates) {
16495
+ if (existsSync(`${candidate}${metaExt}`)) {
16496
+ return candidate;
16497
+ }
16498
+ }
16499
+ return void 0;
16500
+ }
16424
16501
  function resolveModuleMetadata(source, importer, options) {
16425
16502
  if (options?.resolveModuleMetadata) {
16426
16503
  const resolved = options.resolveModuleMetadata(source, importer);
16427
16504
  if (resolved) return resolved;
16428
16505
  }
16429
16506
  const store = getMetadataStore(options);
16430
- const resolvedKey = resolveImportSource(source, importer, store);
16507
+ let resolvedKey = resolveImportSource(source, importer, store);
16508
+ if (!resolvedKey) {
16509
+ resolvedKey = resolveImportSourceByMetadata(source, importer, options);
16510
+ }
16431
16511
  if (resolvedKey) {
16432
- return store.get(resolvedKey);
16512
+ const existing = store.get(resolvedKey);
16513
+ if (existing) return existing;
16514
+ const loaded2 = readMetadataFromDisk(resolvedKey, store, options);
16515
+ if (loaded2) return loaded2;
16433
16516
  }
16434
16517
  if (store.has(source)) return store.get(source);
16518
+ const loaded = readMetadataFromDisk(source, store, options);
16519
+ if (loaded) return loaded;
16435
16520
  return void 0;
16436
16521
  }
16437
16522
  function setModuleMetadata(fileName, metadata, options) {
16438
16523
  if (!fileName) return;
16439
16524
  const store = getMetadataStore(options);
16440
- store.set(normalizeFileName(fileName), metadata);
16525
+ const normalized = normalizeFileName(fileName);
16526
+ store.set(normalized, metadata);
16527
+ if (!shouldEmitModuleMetadata(options)) return;
16528
+ try {
16529
+ const metaPath = getMetadataFilePath(normalized, options);
16530
+ writeFileSync(metaPath, JSON.stringify(metadata), "utf8");
16531
+ } catch {
16532
+ }
16441
16533
  }
16442
16534
  function clearModuleMetadata(options) {
16443
16535
  const store = getMetadataStore(options);
@@ -16602,7 +16694,9 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
16602
16694
  return false;
16603
16695
  };
16604
16696
  const isRuntimeMergeProps = () => !ctx.shadowedNames?.has(RUNTIME_ALIASES.mergeProps) && !ctx.localDeclaredNames?.has(RUNTIME_ALIASES.mergeProps) && (!ctx.moduleDeclaredNames?.has(RUNTIME_ALIASES.mergeProps) || (ctx.moduleRuntimeNames?.has(RUNTIME_ALIASES.mergeProps) ?? false));
16697
+ const isRuntimeKeyed = () => !ctx.shadowedNames?.has(RUNTIME_ALIASES.keyed) && !ctx.localDeclaredNames?.has(RUNTIME_ALIASES.keyed) && (!ctx.moduleDeclaredNames?.has(RUNTIME_ALIASES.keyed) || (ctx.moduleRuntimeNames?.has(RUNTIME_ALIASES.keyed) ?? false));
16605
16698
  const isMergePropsCall = (expr) => expr.kind === "CallExpression" && expr.callee.kind === "Identifier" && expr.callee.name === RUNTIME_ALIASES.mergeProps && isRuntimeMergeProps();
16699
+ const isKeyedCall = (expr) => expr.kind === "CallExpression" && expr.callee.kind === "Identifier" && expr.callee.name === RUNTIME_ALIASES.keyed && isRuntimeKeyed();
16606
16700
  const isDynamicMemberSpread = (expr) => {
16607
16701
  if (expr.kind !== "MemberExpression" && expr.kind !== "OptionalMemberExpression") return false;
16608
16702
  if (expr.computed) return true;
@@ -16653,6 +16747,14 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
16653
16747
  if (!base) return false;
16654
16748
  return ctx.storeVars?.has(helpers.deSSAVarName(base)) ?? false;
16655
16749
  };
16750
+ const getKeyedCandidate = (expr) => {
16751
+ if (expr.kind !== "MemberExpression") return null;
16752
+ if (!expr.computed || expr.optional) return null;
16753
+ if (expr.property.kind === "Literal" && (typeof expr.property.value === "string" || typeof expr.property.value === "number")) {
16754
+ return null;
16755
+ }
16756
+ return { base: expr.object, key: expr.property };
16757
+ };
16656
16758
  const flushBucket = () => {
16657
16759
  if (bucket.length === 0) return;
16658
16760
  segments.push({ kind: "object", properties: bucket });
@@ -16715,9 +16817,11 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
16715
16817
  ctx.inPropsContext = prevPropsCtx;
16716
16818
  }
16717
16819
  const baseIdent = attr.value.kind === "Identifier" ? helpers.deSSAVarName(attr.value.name) : void 0;
16820
+ const keyedCandidate = getKeyedCandidate(attr.value);
16821
+ const keyedBaseIdent = keyedCandidate && keyedCandidate.base.kind === "Identifier" ? helpers.deSSAVarName(keyedCandidate.base.name) : void 0;
16718
16822
  const isAccessorBase = baseIdent && ((ctx.memoVars?.has(baseIdent) ?? false) || (ctx.signalVars?.has(baseIdent) ?? false) || (ctx.aliasVars?.has(baseIdent) ?? false));
16719
16823
  const isStoreBase = baseIdent ? ctx.storeVars?.has(baseIdent) ?? false : false;
16720
- const alreadyGetter = isFunctionLike || (baseIdent ? isStoreBase || (ctx.memoVars?.has(baseIdent) ?? false) || (ctx.aliasVars?.has(baseIdent) ?? false) : false);
16824
+ const alreadyGetter = isFunctionLike || isKeyedCall(attr.value) || (baseIdent ? isStoreBase || (ctx.memoVars?.has(baseIdent) ?? false) || (ctx.aliasVars?.has(baseIdent) ?? false) : false);
16721
16825
  const usesTracked = (!ctx.nonReactiveScopeDepth || ctx.nonReactiveScopeDepth === 0) && helpers.expressionUsesTracked(attr.value, ctx) && !alreadyGetter;
16722
16826
  const trackedExpr = usesTracked ? helpers.lowerTrackedExpression(
16723
16827
  attr.value,
@@ -16726,12 +16830,21 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
16726
16830
  const useMemoProp = usesTracked && trackedExpr && t4.isExpression(trackedExpr) && !t4.isIdentifier(trackedExpr) && !t4.isMemberExpression(trackedExpr) && !t4.isLiteral(trackedExpr);
16727
16831
  const forceMemoProp = usesTracked && isDynamicStoreMember(attr.value);
16728
16832
  const shouldMemoProp = useMemoProp || forceMemoProp;
16833
+ const canKeyed = usesTracked && keyedCandidate && keyedBaseIdent && !(ctx.signalVars?.has(keyedBaseIdent) ?? false) && !(ctx.memoVars?.has(keyedBaseIdent) ?? false) && !(ctx.aliasVars?.has(keyedBaseIdent) ?? false) && !(ctx.functionVars?.has(keyedBaseIdent) ?? false);
16729
16834
  const valueExpr = !isFunctionLike && isAccessorBase && baseIdent ? (() => {
16730
16835
  ctx.helpersUsed.add("propGetter");
16731
16836
  return t4.callExpression(t4.identifier(RUNTIME_ALIASES.propGetter), [
16732
16837
  t4.arrowFunctionExpression([], t4.callExpression(t4.identifier(baseIdent), []))
16733
16838
  ]);
16734
16839
  })() : usesTracked && t4.isExpression(lowered) ? (() => {
16840
+ if (canKeyed && keyedCandidate) {
16841
+ ctx.helpersUsed.add("keyed");
16842
+ const keyExpr = helpers.lowerDomExpression(keyedCandidate.key, ctx);
16843
+ return t4.callExpression(t4.identifier(RUNTIME_ALIASES.keyed), [
16844
+ t4.identifier(keyedBaseIdent),
16845
+ t4.arrowFunctionExpression([], keyExpr)
16846
+ ]);
16847
+ }
16735
16848
  if (shouldMemoProp) {
16736
16849
  ctx.helpersUsed.add("prop");
16737
16850
  return t4.callExpression(t4.identifier(RUNTIME_ALIASES.prop), [
@@ -18634,6 +18747,16 @@ function createPropsShape() {
18634
18747
  source: { kind: "props" }
18635
18748
  };
18636
18749
  }
18750
+ function createStoreShape(name) {
18751
+ return {
18752
+ knownKeys: /* @__PURE__ */ new Set(),
18753
+ mutableKeys: /* @__PURE__ */ new Set(),
18754
+ dynamicAccess: false,
18755
+ escapes: false,
18756
+ isSpread: false,
18757
+ source: { kind: "store", name }
18758
+ };
18759
+ }
18637
18760
  function cloneKeyContext(ctx) {
18638
18761
  const cloneMap = (map) => {
18639
18762
  const next = /* @__PURE__ */ new Map();
@@ -18711,7 +18834,7 @@ function resolveNarrowedKeys(expr, ctx) {
18711
18834
  }
18712
18835
  return null;
18713
18836
  }
18714
- function resolveKeySet(expr, ctx) {
18837
+ function resolveKeySet(expr, ctx, shapes) {
18715
18838
  if (expr.kind === "Identifier") {
18716
18839
  const set = ctx.keySets.get(expr.name);
18717
18840
  return set ? new Set(set) : null;
@@ -18730,7 +18853,7 @@ function resolveKeySet(expr, ctx) {
18730
18853
  if (expr.callee.kind === "MemberExpression") {
18731
18854
  const object = expr.callee.object;
18732
18855
  const property = expr.callee.property;
18733
- if (object.kind === "Identifier" && object.name === "Object" && !expr.callee.computed && property.kind === "Identifier" && property.name === "keys" && expr.arguments.length === 1) {
18856
+ if (object.kind === "Identifier" && object.name === "Object" && !expr.callee.computed && property.kind === "Identifier" && (property.name === "keys" || property.name === "getOwnPropertyNames") && expr.arguments.length === 1) {
18734
18857
  const arg = expr.arguments[0];
18735
18858
  if (arg.kind === "ObjectExpression") {
18736
18859
  const values = [];
@@ -18749,12 +18872,18 @@ function resolveKeySet(expr, ctx) {
18749
18872
  }
18750
18873
  return values.length > 0 ? new Set(values) : null;
18751
18874
  }
18875
+ if (arg.kind === "Identifier" && shapes) {
18876
+ const shape = shapes.get(arg.name);
18877
+ if (shape && shape.knownKeys.size > 0 && !shape.dynamicAccess && !shape.escapes && shape.mutableKeys.size === 0) {
18878
+ return new Set(Array.from(shape.knownKeys));
18879
+ }
18880
+ }
18752
18881
  }
18753
18882
  }
18754
18883
  }
18755
18884
  if (expr.kind === "ConditionalExpression") {
18756
- const consequent = resolveKeySet(expr.consequent, ctx);
18757
- const alternate = resolveKeySet(expr.alternate, ctx);
18885
+ const consequent = resolveKeySet(expr.consequent, ctx, shapes);
18886
+ const alternate = resolveKeySet(expr.alternate, ctx, shapes);
18758
18887
  if (consequent && alternate) {
18759
18888
  return /* @__PURE__ */ new Set([...consequent, ...alternate]);
18760
18889
  }
@@ -18762,7 +18891,7 @@ function resolveKeySet(expr, ctx) {
18762
18891
  }
18763
18892
  if (expr.kind === "SequenceExpression" && expr.expressions.length > 0) {
18764
18893
  const last = expr.expressions[expr.expressions.length - 1];
18765
- return resolveKeySet(last, ctx);
18894
+ return resolveKeySet(last, ctx, shapes);
18766
18895
  }
18767
18896
  return null;
18768
18897
  }
@@ -18778,6 +18907,26 @@ function extractEqualityNarrowing(expr) {
18778
18907
  };
18779
18908
  }
18780
18909
  }
18910
+ if (expr.kind === "LogicalExpression" && expr.operator === "&&") {
18911
+ const left = extractEqualityNarrowing(expr.left);
18912
+ const right = extractEqualityNarrowing(expr.right);
18913
+ if (left && right && left.name === right.name && left.kind === right.kind) {
18914
+ if (left.kind === "eq") {
18915
+ const intersection = /* @__PURE__ */ new Set();
18916
+ for (const value of left.values) {
18917
+ if (right.values.has(value)) intersection.add(value);
18918
+ }
18919
+ return intersection.size > 0 ? { name: left.name, values: intersection, kind: "eq" } : null;
18920
+ }
18921
+ if (left.kind === "neq") {
18922
+ const union = /* @__PURE__ */ new Set();
18923
+ for (const value of left.values) union.add(value);
18924
+ for (const value of right.values) union.add(value);
18925
+ return { name: left.name, values: union, kind: "neq" };
18926
+ }
18927
+ }
18928
+ return left ?? right;
18929
+ }
18781
18930
  if (expr.kind !== "BinaryExpression") return null;
18782
18931
  const isEq = expr.operator === "===";
18783
18932
  const isNeq = expr.operator === "!==";
@@ -18819,20 +18968,20 @@ function applyNarrowing(ctx, name, values) {
18819
18968
  ctx.values.delete(name);
18820
18969
  }
18821
18970
  }
18822
- function applyKeyAssignment(ctx, name, expr) {
18971
+ function applyKeyAssignment(ctx, name, expr, shapes) {
18823
18972
  ctx.values.delete(name);
18824
18973
  ctx.keySets.delete(name);
18825
18974
  let assignedKeys = null;
18826
18975
  let keySet = null;
18827
18976
  if (expr.kind === "Identifier") {
18828
18977
  assignedKeys = resolveNarrowedKeys(expr, ctx);
18829
- keySet = resolveKeySet(expr, ctx);
18978
+ keySet = resolveKeySet(expr, ctx, shapes);
18830
18979
  if (ctx.keySets.has(expr.name)) {
18831
18980
  ctx.keySets.delete(expr.name);
18832
18981
  }
18833
18982
  } else {
18834
18983
  assignedKeys = resolveNarrowedKeys(expr, ctx);
18835
- keySet = resolveKeySet(expr, ctx);
18984
+ keySet = resolveKeySet(expr, ctx, shapes);
18836
18985
  }
18837
18986
  if (assignedKeys && assignedKeys.size > 0) {
18838
18987
  ctx.values.set(name, new Set(assignedKeys));
@@ -18896,6 +19045,13 @@ function analyzeObjectShapes(fn) {
18896
19045
  const propertySubscription = /* @__PURE__ */ new Map();
18897
19046
  const spreadWrapping = /* @__PURE__ */ new Set();
18898
19047
  for (const [name, shape] of shapes) {
19048
+ if (shape.source.kind === "store") {
19049
+ const reads = propertyReads.get(name);
19050
+ if (reads && reads.size > 0) {
19051
+ propertySubscription.set(name, reads);
19052
+ }
19053
+ continue;
19054
+ }
18899
19055
  if (shape.dynamicAccess || shape.source.kind === "unknown") {
18900
19056
  wholeObjectSubscription.add(name);
18901
19057
  } else if (shape.isSpread && !shape.escapes) {
@@ -19002,6 +19158,16 @@ function analyzeStructuredNode(node, shapes, propertyReads, ctx) {
19002
19158
  if (node.pattern) {
19003
19159
  clearPatternBindings(node.pattern, bodyCtx);
19004
19160
  }
19161
+ if (node.iterable.kind === "Identifier") {
19162
+ const keySet = ctx.keySets.get(node.iterable.name);
19163
+ if (keySet) {
19164
+ if (node.pattern && t2.isIdentifier(node.pattern)) {
19165
+ bodyCtx.values.set(node.pattern.name, new Set(keySet));
19166
+ } else {
19167
+ bodyCtx.values.set(node.variable, new Set(keySet));
19168
+ }
19169
+ }
19170
+ }
19005
19171
  analyzeStructuredNode(node.body, shapes, propertyReads, bodyCtx);
19006
19172
  }
19007
19173
  return;
@@ -19014,6 +19180,17 @@ function analyzeStructuredNode(node, shapes, propertyReads, ctx) {
19014
19180
  if (node.pattern) {
19015
19181
  clearPatternBindings(node.pattern, bodyCtx);
19016
19182
  }
19183
+ if (node.object.kind === "Identifier") {
19184
+ const shape = shapes.get(node.object.name);
19185
+ if (shape && shape.knownKeys.size > 0 && !shape.dynamicAccess && !shape.escapes && shape.mutableKeys.size === 0) {
19186
+ const keySet = new Set(shape.knownKeys);
19187
+ if (node.pattern && t2.isIdentifier(node.pattern)) {
19188
+ bodyCtx.values.set(node.pattern.name, keySet);
19189
+ } else {
19190
+ bodyCtx.values.set(node.variable, keySet);
19191
+ }
19192
+ }
19193
+ }
19017
19194
  analyzeStructuredNode(node.body, shapes, propertyReads, bodyCtx);
19018
19195
  }
19019
19196
  return;
@@ -19049,7 +19226,7 @@ function analyzeStructuredNode(node, shapes, propertyReads, ctx) {
19049
19226
  }
19050
19227
  function analyzeInstruction(instr, shapes, propertyReads, ctx) {
19051
19228
  if (instr.kind === "Assign") {
19052
- applyKeyAssignment(ctx, instr.target.name, instr.value);
19229
+ applyKeyAssignment(ctx, instr.target.name, instr.value, shapes);
19053
19230
  const valueShape = analyzeExpression(instr.value, shapes, propertyReads, ctx);
19054
19231
  if (valueShape) {
19055
19232
  const existing = shapes.get(instr.target.name);
@@ -19167,15 +19344,22 @@ function analyzeExpression(expr, shapes, propertyReads, ctx) {
19167
19344
  markEscaping(arg, shapes);
19168
19345
  }
19169
19346
  let returnedShape = null;
19170
- if (expr.callee.kind === "Identifier" && expr.callee.name === "$state" && expr.arguments[0]) {
19347
+ if (expr.callee.kind === "Identifier" && (expr.callee.name === "$state" || expr.callee.name === "$store") && expr.arguments[0]) {
19171
19348
  returnedShape = analyzeExpression(
19172
19349
  expr.arguments[0],
19173
19350
  shapes,
19174
19351
  propertyReads,
19175
19352
  ctx
19176
19353
  );
19354
+ if (expr.callee.name === "$store") {
19355
+ if (!returnedShape) {
19356
+ returnedShape = createStoreShape();
19357
+ } else {
19358
+ returnedShape.source = { kind: "store" };
19359
+ }
19360
+ }
19177
19361
  }
19178
- if (!(expr.callee.kind === "Identifier" && expr.callee.name === "$state")) {
19362
+ if (!(expr.callee.kind === "Identifier" && (expr.callee.name === "$state" || expr.callee.name === "$store"))) {
19179
19363
  analyzeExpression(expr.callee, shapes, propertyReads, ctx);
19180
19364
  }
19181
19365
  expr.arguments.slice(returnedShape ? 1 : 0).forEach((arg) => analyzeExpression(arg, shapes, propertyReads, ctx));
@@ -19214,7 +19398,7 @@ function analyzeExpression(expr, shapes, propertyReads, ctx) {
19214
19398
  }
19215
19399
  case "AssignmentExpression": {
19216
19400
  if (expr.left.kind === "Identifier") {
19217
- applyKeyAssignment(ctx, expr.left.name, expr.right);
19401
+ applyKeyAssignment(ctx, expr.left.name, expr.right, shapes);
19218
19402
  }
19219
19403
  if (expr.left.kind === "MemberExpression") {
19220
19404
  const base = getBaseIdentifier(expr.left.object);
@@ -19710,6 +19894,10 @@ function expressionUsesTracked(expr, ctx) {
19710
19894
  return expr.expressions.some((e) => expressionUsesTracked(e, ctx));
19711
19895
  case "SpreadElement":
19712
19896
  return expressionUsesTracked(expr.argument, ctx);
19897
+ case "UnaryExpression":
19898
+ return expressionUsesTracked(expr.argument, ctx);
19899
+ case "UpdateExpression":
19900
+ return expressionUsesTracked(expr.argument, ctx);
19713
19901
  default:
19714
19902
  return false;
19715
19903
  }
@@ -19848,6 +20036,12 @@ function lowerNodeWithRegionContext(node, t4, ctx, declaredVars, regionCtx) {
19848
20036
  case "if": {
19849
20037
  const prevConditional = ctx.inConditional ?? 0;
19850
20038
  ctx.inConditional = prevConditional + 1;
20039
+ const inNonReactiveScope = !!(ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0);
20040
+ const mightWrapInEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx);
20041
+ const prevNonReactiveDepth = ctx.nonReactiveScopeDepth ?? 0;
20042
+ if (mightWrapInEffect) {
20043
+ ctx.nonReactiveScopeDepth = prevNonReactiveDepth + 1;
20044
+ }
19851
20045
  const conseqStmts = lowerNodeWithRegionContext(
19852
20046
  node.consequent,
19853
20047
  t4,
@@ -19856,6 +20050,9 @@ function lowerNodeWithRegionContext(node, t4, ctx, declaredVars, regionCtx) {
19856
20050
  regionCtx
19857
20051
  );
19858
20052
  const altStmts = node.alternate ? lowerNodeWithRegionContext(node.alternate, t4, ctx, declaredVars, regionCtx) : null;
20053
+ if (mightWrapInEffect) {
20054
+ ctx.nonReactiveScopeDepth = prevNonReactiveDepth;
20055
+ }
19859
20056
  ctx.inConditional = prevConditional;
19860
20057
  const conseqReactiveOnly = nodeIsPureReactiveScope(node.consequent, ctx.memoMacroNames);
19861
20058
  const altReactiveOnly = node.alternate ? nodeIsPureReactiveScope(node.alternate, ctx.memoMacroNames) : false;
@@ -19904,13 +20101,17 @@ function lowerNodeWithRegionContext(node, t4, ctx, declaredVars, regionCtx) {
19904
20101
  }
19905
20102
  return stmts;
19906
20103
  }
20104
+ const conseqIsEmpty = conseqStmts.length === 0;
20105
+ const altIsEmpty = !altStmts || altStmts.length === 0;
20106
+ if (conseqIsEmpty && altIsEmpty) {
20107
+ return [];
20108
+ }
19907
20109
  const ifStmt = t4.ifStatement(
19908
20110
  testExpr,
19909
20111
  t4.blockStatement(conseqStmts),
19910
20112
  altStmts ? t4.blockStatement(altStmts) : null
19911
20113
  );
19912
- const inNonReactiveScope = !!(ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0);
19913
- const shouldWrapEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx) && !statementHasEarlyExit(ifStmt, t4);
20114
+ const shouldWrapEffect = mightWrapInEffect && !statementHasEarlyExit(ifStmt, t4);
19914
20115
  if (shouldWrapEffect) {
19915
20116
  const effectFn = t4.arrowFunctionExpression([], t4.blockStatement([ifStmt]));
19916
20117
  return [t4.expressionStatement(buildEffectCall(ctx, t4, effectFn))];
@@ -20131,7 +20332,7 @@ function lowerStructuredNodeForRegion(node, region, t4, ctx, declaredVars, regio
20131
20332
  }
20132
20333
  case "if": {
20133
20334
  const inNonReactiveScope = !!(ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0);
20134
- const baseShouldWrapEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx);
20335
+ const mightWrapInEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx);
20135
20336
  const lowerChild = (child, forceNonReactive) => {
20136
20337
  if (!child) return [];
20137
20338
  if (!forceNonReactive) {
@@ -20161,8 +20362,8 @@ function lowerStructuredNodeForRegion(node, region, t4, ctx, declaredVars, regio
20161
20362
  ctx.nonReactiveScopeDepth = prevDepth;
20162
20363
  }
20163
20364
  };
20164
- let consequent = lowerChild(node.consequent, baseShouldWrapEffect);
20165
- let alternate = node.alternate ? lowerChild(node.alternate, baseShouldWrapEffect) : [];
20365
+ let consequent = lowerChild(node.consequent, mightWrapInEffect);
20366
+ let alternate = node.alternate ? lowerChild(node.alternate, mightWrapInEffect) : [];
20166
20367
  if (consequent.length === 0 && alternate.length === 0) return [];
20167
20368
  const buildIfStmt = (cons, alt) => t4.ifStatement(
20168
20369
  lowerExpressionWithDeSSA(node.test, ctx),
@@ -20170,8 +20371,9 @@ function lowerStructuredNodeForRegion(node, region, t4, ctx, declaredVars, regio
20170
20371
  alt.length > 0 ? t4.blockStatement(alt) : null
20171
20372
  );
20172
20373
  let ifStmt = buildIfStmt(consequent, alternate);
20173
- const shouldWrapEffect = baseShouldWrapEffect && !statementHasEarlyExit(ifStmt, t4);
20174
- if (!shouldWrapEffect && baseShouldWrapEffect) {
20374
+ const hasEarlyExit = statementHasEarlyExit(ifStmt, t4);
20375
+ const shouldWrapEffect = mightWrapInEffect && !hasEarlyExit;
20376
+ if (!shouldWrapEffect && mightWrapInEffect && !hasEarlyExit) {
20175
20377
  consequent = lowerChild(node.consequent, false);
20176
20378
  alternate = node.alternate ? lowerChild(node.alternate, false) : [];
20177
20379
  if (consequent.length === 0 && alternate.length === 0) return [];
@@ -20633,19 +20835,6 @@ function wrapInMemo(region, t4, declaredVars, ctx, bodyStatementsOverride, outpu
20633
20835
  );
20634
20836
  ctx.memoVars?.add(name);
20635
20837
  }
20636
- if (region.hasControlFlow && getterOutputs.length > 0) {
20637
- const effectBody = t4.blockStatement(
20638
- getterOutputs.map((name) => t4.expressionStatement(t4.callExpression(t4.identifier(name), [])))
20639
- );
20640
- statements.push(
20641
- t4.expressionStatement(
20642
- buildEffectCall(ctx, t4, t4.arrowFunctionExpression([], effectBody), {
20643
- slot: ctx.inModule ? void 0 : reserveHookSlot(ctx),
20644
- forceSlot: true
20645
- })
20646
- )
20647
- );
20648
- }
20649
20838
  }
20650
20839
  return statements;
20651
20840
  }
@@ -20891,11 +21080,15 @@ function reserveHookSlot(ctx) {
20891
21080
  ctx.nextHookSlot = slot + 1;
20892
21081
  return slot;
20893
21082
  }
21083
+ function createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4) {
21084
+ ctx.trackedVars.delete(baseName2);
21085
+ ctx.memoVars?.delete(baseName2);
21086
+ return t4.variableDeclaration("let", [t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)]);
21087
+ }
20894
21088
  function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
20895
21089
  if (instr.kind === "Assign") {
20896
21090
  const ssaName = instr.target.name;
20897
21091
  const baseName2 = deSSAVarName(ssaName);
20898
- const memoMacroNames = ctx.memoMacroNames ?? /* @__PURE__ */ new Set(["$memo", "createMemo"]);
20899
21092
  const declKindRaw = instr.declarationKind;
20900
21093
  propagateHookResultAlias(baseName2, instr.value, ctx);
20901
21094
  const hookMember = resolveHookMemberValue(instr.value, ctx);
@@ -20945,12 +21138,14 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
20945
21138
  const isShadowDeclaration = !!declKind && declaredVars.has(baseName2);
20946
21139
  const treatAsTracked = !isShadowDeclaration && isTracked;
20947
21140
  const isDestructuringTemp = baseName2.startsWith("__destruct_");
20948
- const isStateCall2 = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "$state";
21141
+ const callKind = getReactiveCallKind(instr.value, ctx);
21142
+ const isStateCall2 = callKind === "signal";
20949
21143
  const inRegionMemo = ctx.inRegionMemo ?? false;
20950
21144
  const isFunctionValue = instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression";
20951
- const isAccessorReturningCall = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && (memoMacroNames.has(instr.value.callee.name) || instr.value.callee.name === "prop");
21145
+ const isAccessorReturningCall = callKind === "memo" || instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "prop";
20952
21146
  const isReactiveObjectCall = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && ["mergeProps"].includes(instr.value.callee.name);
20953
21147
  const isMemoReturningCall = isAccessorReturningCall || isReactiveObjectCall;
21148
+ const needsMutable = ctx.mutatedVars?.has(baseName2) ?? false;
20954
21149
  const lowerAssignedValue = (forceAssigned = false) => lowerExpressionWithDeSSA(instr.value, ctx, forceAssigned || isFunctionValue);
20955
21150
  const buildDerivedMemoCall = (expr) => {
20956
21151
  const slot = !ctx.inModule && inRegionMemo ? reserveHookSlot(ctx) : void 0;
@@ -20961,7 +21156,6 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
20961
21156
  }
20962
21157
  if (declKind) {
20963
21158
  const normalizedDecl = isStateCall2 || dependsOnTracked && !isDestructuringTemp ? "const" : declKind;
20964
- const needsMutable = ctx.mutatedVars?.has(baseName2) ?? false;
20965
21159
  const isExternalAlias = declKind === "const" && instr.value.kind === "Identifier" && !(ctx.scopes?.byName?.has(deSSAVarName(instr.value.name)) ?? false);
20966
21160
  const fallbackDecl = !treatAsTracked && (!dependsOnTracked || isDestructuringTemp) ? declKind === "const" && (needsMutable || isExternalAlias) ? "let" : declKind : normalizedDecl;
20967
21161
  declaredVars.add(baseName2);
@@ -20977,7 +21171,11 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
20977
21171
  }
20978
21172
  const derivedExpr = lowerAssignedValue(true);
20979
21173
  if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
20980
- return t4.variableDeclaration(normalizedDecl, [
21174
+ return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
21175
+ }
21176
+ if (needsMutable) {
21177
+ ctx.memoVars?.delete(baseName2);
21178
+ return t4.variableDeclaration("let", [
20981
21179
  t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
20982
21180
  ]);
20983
21181
  }
@@ -21004,7 +21202,11 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
21004
21202
  }
21005
21203
  const derivedExpr = lowerAssignedValue(true);
21006
21204
  if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
21007
- return t4.variableDeclaration(normalizedDecl, [
21205
+ return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
21206
+ }
21207
+ if (needsMutable) {
21208
+ ctx.memoVars?.delete(baseName2);
21209
+ return t4.variableDeclaration("let", [
21008
21210
  t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
21009
21211
  ]);
21010
21212
  }
@@ -21119,7 +21321,10 @@ Consider:
21119
21321
  if (dependsOnTracked) {
21120
21322
  const derivedExpr = lowerAssignedValue(true);
21121
21323
  if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
21122
- return t4.variableDeclaration("const", [
21324
+ return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
21325
+ }
21326
+ if (needsMutable) {
21327
+ return t4.variableDeclaration("let", [
21123
21328
  t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
21124
21329
  ]);
21125
21330
  }
@@ -21146,6 +21351,9 @@ Consider:
21146
21351
  if (dependsOnTracked) {
21147
21352
  const derivedExpr = lowerAssignedValue(true);
21148
21353
  if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
21354
+ return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
21355
+ }
21356
+ if (needsMutable) {
21149
21357
  return t4.variableDeclaration("let", [
21150
21358
  t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
21151
21359
  ]);
@@ -21191,7 +21399,8 @@ Consider:
21191
21399
  const loweredExpr = lowerExpressionWithDeSSA(instr.value, ctx);
21192
21400
  const effectBody = depReads.length > 0 ? ctx.t.blockStatement([...depReads, ctx.t.expressionStatement(loweredExpr)]) : loweredExpr;
21193
21401
  const effectFn = ctx.t.isBlockStatement(effectBody) ? t4.arrowFunctionExpression([], effectBody) : t4.arrowFunctionExpression([], effectBody);
21194
- return t4.expressionStatement(buildEffectCall(ctx, t4, effectFn));
21402
+ const slot = ctx.inModule ? void 0 : reserveHookSlot(ctx);
21403
+ return t4.expressionStatement(buildEffectCall(ctx, t4, effectFn, { slot }));
21195
21404
  }
21196
21405
  return t4.expressionStatement(lowerExpressionWithDeSSA(instr.value, ctx));
21197
21406
  }
@@ -21841,6 +22050,9 @@ function createCodegenContext(t4) {
21841
22050
  t: t4,
21842
22051
  moduleDeclaredNames: /* @__PURE__ */ new Set(),
21843
22052
  moduleRuntimeNames: /* @__PURE__ */ new Set(),
22053
+ moduleRuntimeImportMap: /* @__PURE__ */ new Map(),
22054
+ moduleRuntimeNamespaceImports: /* @__PURE__ */ new Set(),
22055
+ stateMacroNames: /* @__PURE__ */ new Set(),
21844
22056
  localDeclaredNames: /* @__PURE__ */ new Set(),
21845
22057
  helpersUsed: /* @__PURE__ */ new Set(),
21846
22058
  tempCounter: 0,
@@ -21900,9 +22112,10 @@ function withGetterCache(ctx, fn) {
21900
22112
  ctx.getterCacheEnabled = prevEnabled;
21901
22113
  return { result, cacheDeclarations };
21902
22114
  }
21903
- function collectHookReactiveVars(fn) {
22115
+ function collectHookReactiveVars(fn, ctx) {
21904
22116
  const signalVars = /* @__PURE__ */ new Set();
21905
22117
  const storeVars = /* @__PURE__ */ new Set();
22118
+ const memoVars = /* @__PURE__ */ new Set();
21906
22119
  const functionVars = /* @__PURE__ */ new Set();
21907
22120
  const mutatedVars = /* @__PURE__ */ new Set();
21908
22121
  for (const block of fn.blocks) {
@@ -21912,11 +22125,14 @@ function collectHookReactiveVars(fn) {
21912
22125
  if (instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression") {
21913
22126
  functionVars.add(target);
21914
22127
  }
21915
- if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier") {
21916
- if (instr.value.callee.name === "$state") {
22128
+ if (instr.value.kind === "CallExpression" || instr.value.kind === "OptionalCallExpression") {
22129
+ const callKind = getReactiveCallKind(instr.value, ctx);
22130
+ if (callKind === "signal") {
21917
22131
  signalVars.add(target);
21918
- } else if (instr.value.callee.name === "$store") {
22132
+ } else if (callKind === "store") {
21919
22133
  storeVars.add(target);
22134
+ } else if (callKind === "memo") {
22135
+ memoVars.add(target);
21920
22136
  }
21921
22137
  }
21922
22138
  if (!instr.declarationKind) {
@@ -21927,11 +22143,14 @@ function collectHookReactiveVars(fn) {
21927
22143
  }
21928
22144
  }
21929
22145
  }
21930
- return { signalVars, storeVars, functionVars, mutatedVars };
22146
+ return { signalVars, storeVars, memoVars, functionVars, mutatedVars };
21931
22147
  }
21932
22148
  function analyzeHookReturnInfo(fn, ctx) {
21933
22149
  if (!isHookName(fn.name)) return null;
21934
- const { signalVars, storeVars, functionVars, mutatedVars } = collectHookReactiveVars(fn);
22150
+ const { signalVars, storeVars, memoVars, functionVars, mutatedVars } = collectHookReactiveVars(
22151
+ fn,
22152
+ ctx
22153
+ );
21935
22154
  const tmpCtx = createCodegenContext(ctx.t);
21936
22155
  tmpCtx.signalVars = new Set(signalVars);
21937
22156
  tmpCtx.storeVars = new Set(storeVars);
@@ -21939,9 +22158,9 @@ function analyzeHookReturnInfo(fn, ctx) {
21939
22158
  tmpCtx.mutatedVars = new Set(mutatedVars);
21940
22159
  tmpCtx.aliasVars = /* @__PURE__ */ new Set();
21941
22160
  tmpCtx.trackedVars = /* @__PURE__ */ new Set();
21942
- tmpCtx.memoVars = /* @__PURE__ */ new Set();
22161
+ tmpCtx.memoVars = new Set(memoVars);
21943
22162
  const scopeResult = analyzeReactiveScopesWithSSA(fn);
21944
- detectDerivedCycles(fn, scopeResult);
22163
+ detectDerivedCycles(fn, scopeResult, ctx);
21945
22164
  tmpCtx.scopes = scopeResult;
21946
22165
  const regionResult = generateRegions(fn, scopeResult);
21947
22166
  tmpCtx.regions = flattenRegions(regionResult.topLevelRegions);
@@ -22083,23 +22302,32 @@ function getCachedGetterExpression(ctx, getterName, callExpr) {
22083
22302
  }
22084
22303
  return ctx.t.identifier(existingEntry);
22085
22304
  }
22086
- function getOrCreateHoistedTemplate(html, ctx) {
22305
+ function getOrCreateHoistedTemplate(html, ctx, isSVG, isMathML) {
22087
22306
  if (!ctx.inListRender || !ctx.hoistedTemplates || !ctx.hoistedTemplateStatements) {
22088
22307
  return null;
22089
22308
  }
22090
- const existing = ctx.hoistedTemplates.get(html);
22309
+ const cacheKey = isSVG ? `svg:${html}` : isMathML ? `mathml:${html}` : html;
22310
+ const existing = ctx.hoistedTemplates.get(cacheKey);
22091
22311
  if (existing) {
22092
22312
  return existing;
22093
22313
  }
22094
22314
  const { t: t4 } = ctx;
22095
22315
  ctx.helpersUsed.add("template");
22096
22316
  const tmplId = genTemp(ctx, "htmpl");
22097
- ctx.hoistedTemplates.set(html, tmplId);
22317
+ ctx.hoistedTemplates.set(cacheKey, tmplId);
22318
+ const templateArgs = [t4.stringLiteral(html)];
22319
+ if (isSVG || isMathML) {
22320
+ templateArgs.push(t4.identifier("undefined"));
22321
+ templateArgs.push(isSVG ? t4.booleanLiteral(true) : t4.identifier("undefined"));
22322
+ if (isMathML) {
22323
+ templateArgs.push(t4.booleanLiteral(true));
22324
+ }
22325
+ }
22098
22326
  ctx.hoistedTemplateStatements.push(
22099
22327
  t4.variableDeclaration("const", [
22100
22328
  t4.variableDeclarator(
22101
22329
  tmplId,
22102
- t4.callExpression(t4.identifier(RUNTIME_ALIASES.template), [t4.stringLiteral(html)])
22330
+ t4.callExpression(t4.identifier(RUNTIME_ALIASES.template), templateArgs)
22103
22331
  )
22104
22332
  ])
22105
22333
  );
@@ -22141,7 +22369,7 @@ function matchesListKeyPattern(expr, ctx) {
22141
22369
  const exprPropName = expr.property.kind === "Identifier" ? expr.property.name : String(expr.property.value);
22142
22370
  return exprPropName === keyPropName;
22143
22371
  }
22144
- function detectDerivedCycles(fn, _scopeResult) {
22372
+ function detectDerivedCycles(fn, _scopeResult, ctx) {
22145
22373
  if (debugEnabled("cycles_throw")) {
22146
22374
  throw new Error("cycle check invoked");
22147
22375
  }
@@ -22150,11 +22378,12 @@ function detectDerivedCycles(fn, _scopeResult) {
22150
22378
  for (const instr of block.instructions) {
22151
22379
  if (instr.kind !== "Assign") continue;
22152
22380
  const target = deSSAVarName(instr.target.name);
22153
- const isStateCall2 = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "$state";
22154
- const isStoreCall = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "$store";
22381
+ const callKind = getReactiveCallKind(instr.value, ctx);
22382
+ const isSignalCall = callKind === "signal";
22383
+ const isStoreCall = callKind === "store";
22155
22384
  const prev = declared.get(target);
22156
22385
  declared.set(target, {
22157
- isState: (prev?.isState ?? false) || isStateCall2,
22386
+ isSignal: (prev?.isSignal ?? false) || isSignalCall,
22158
22387
  isStore: (prev?.isStore ?? false) || isStoreCall,
22159
22388
  declaredHere: prev?.declaredHere || !!instr.declarationKind,
22160
22389
  count: (prev?.count ?? 0) + 1
@@ -22167,7 +22396,7 @@ function detectDerivedCycles(fn, _scopeResult) {
22167
22396
  if (instr.kind !== "Assign") continue;
22168
22397
  const target = deSSAVarName(instr.target.name);
22169
22398
  const declInfo = declared.get(target);
22170
- if (declInfo?.isState || !declInfo?.declaredHere) continue;
22399
+ if (declInfo?.isSignal || declInfo?.isStore || !declInfo?.declaredHere) continue;
22171
22400
  if ((declInfo.count ?? 0) !== 1) continue;
22172
22401
  const deps = graph.get(target) ?? /* @__PURE__ */ new Set();
22173
22402
  const rawDeps = /* @__PURE__ */ new Set();
@@ -22175,7 +22404,7 @@ function detectDerivedCycles(fn, _scopeResult) {
22175
22404
  for (const dep of rawDeps) {
22176
22405
  const base = deSSAVarName(dep.split(".")[0] ?? dep);
22177
22406
  const depInfo = declared.get(base);
22178
- if (depInfo && depInfo.declaredHere && !depInfo.isState && (depInfo.count ?? 0) === 1) {
22407
+ if (depInfo && depInfo.declaredHere && !depInfo.isSignal && !depInfo.isStore && (depInfo.count ?? 0) === 1) {
22179
22408
  deps.add(base);
22180
22409
  }
22181
22410
  }
@@ -22887,20 +23116,28 @@ function lowerInstruction(instr, ctx) {
22887
23116
  }
22888
23117
  }
22889
23118
  if (ctx.signalVars?.has(baseName2)) {
23119
+ ctx.currentAssignmentName = baseName2;
23120
+ const loweredValue = (() => {
23121
+ try {
23122
+ return lowerTrackedExpression(instr.value, ctx);
23123
+ } finally {
23124
+ ctx.currentAssignmentName = void 0;
23125
+ }
23126
+ })();
22890
23127
  return applyLoc(
22891
- t4.expressionStatement(
22892
- t4.callExpression(t4.identifier(baseName2), [lowerTrackedExpression(instr.value, ctx)])
22893
- )
23128
+ t4.expressionStatement(t4.callExpression(t4.identifier(baseName2), [loweredValue]))
22894
23129
  );
22895
23130
  }
23131
+ ctx.currentAssignmentName = baseName2;
23132
+ const loweredAssign = (() => {
23133
+ try {
23134
+ return lowerTrackedExpression(instr.value, ctx);
23135
+ } finally {
23136
+ ctx.currentAssignmentName = void 0;
23137
+ }
23138
+ })();
22896
23139
  return applyLoc(
22897
- t4.expressionStatement(
22898
- t4.assignmentExpression(
22899
- "=",
22900
- t4.identifier(baseName2),
22901
- lowerTrackedExpression(instr.value, ctx)
22902
- )
22903
- )
23140
+ t4.expressionStatement(t4.assignmentExpression("=", t4.identifier(baseName2), loweredAssign))
22904
23141
  );
22905
23142
  }
22906
23143
  if (instr.kind === "Expression") {
@@ -22918,16 +23155,18 @@ function lowerTerminator(block, ctx) {
22918
23155
  const applyLoc = (stmts) => stmts.map((stmt) => setNodeLoc(stmt, baseLoc));
22919
23156
  switch (block.terminator.kind) {
22920
23157
  case "Return": {
22921
- const prevRegion = ctx.currentRegion;
22922
23158
  const preserveAccessors = ctx.currentFnIsHook;
22923
- if (preserveAccessors) ctx.currentRegion = void 0;
23159
+ const prevHookFlag = ctx.currentFnIsHook;
23160
+ if (preserveAccessors) ctx.currentFnIsHook = false;
22924
23161
  ctx.inReturn = true;
22925
23162
  let retExpr = block.terminator.argument ? lowerTrackedExpression(block.terminator.argument, ctx) : null;
23163
+ ctx.inReturn = false;
23164
+ if (preserveAccessors) {
23165
+ ctx.currentFnIsHook = prevHookFlag;
23166
+ }
22926
23167
  if (preserveAccessors && retExpr) {
22927
23168
  retExpr = unwrapAccessorCalls(retExpr, ctx);
22928
23169
  }
22929
- ctx.inReturn = false;
22930
- ctx.currentRegion = prevRegion;
22931
23170
  return applyLoc([t4.returnStatement(retExpr)]);
22932
23171
  }
22933
23172
  case "Throw":
@@ -23087,17 +23326,92 @@ function collectDeclaredNames(body, t4) {
23087
23326
  }
23088
23327
  return declared;
23089
23328
  }
23090
- function collectRuntimeImportNames(body, t4) {
23091
- const runtimeModules = /* @__PURE__ */ new Set([RUNTIME_MODULE, "@fictjs/runtime", "fict"]);
23092
- const imported = /* @__PURE__ */ new Set();
23329
+ var RUNTIME_IMPORT_MODULES = /* @__PURE__ */ new Set([
23330
+ RUNTIME_MODULE,
23331
+ "@fictjs/runtime",
23332
+ "@fictjs/runtime/advanced",
23333
+ "fict",
23334
+ "fict/advanced"
23335
+ ]);
23336
+ function collectRuntimeImports(body, t4) {
23337
+ const names = /* @__PURE__ */ new Set();
23338
+ const importMap = /* @__PURE__ */ new Map();
23339
+ const namespaces = /* @__PURE__ */ new Set();
23093
23340
  for (const stmt of body) {
23094
23341
  if (!t4.isImportDeclaration(stmt)) continue;
23095
- if (!runtimeModules.has(stmt.source.value)) continue;
23342
+ if (stmt.importKind === "type") continue;
23343
+ if (!RUNTIME_IMPORT_MODULES.has(stmt.source.value)) continue;
23096
23344
  for (const spec of stmt.specifiers) {
23097
- imported.add(spec.local.name);
23345
+ if (t4.isImportSpecifier(spec) && spec.importKind === "type") {
23346
+ continue;
23347
+ }
23348
+ names.add(spec.local.name);
23349
+ if (t4.isImportSpecifier(spec)) {
23350
+ const importedName = t4.isIdentifier(spec.imported) ? spec.imported.name : spec.imported.value;
23351
+ importMap.set(spec.local.name, importedName);
23352
+ } else if (t4.isImportNamespaceSpecifier(spec) || t4.isImportDefaultSpecifier(spec)) {
23353
+ namespaces.add(spec.local.name);
23354
+ }
23098
23355
  }
23099
23356
  }
23100
- return imported;
23357
+ return { names, importMap, namespaces };
23358
+ }
23359
+ var RUNTIME_REACTIVE_CREATORS = /* @__PURE__ */ new Map([
23360
+ ["createSignal", "signal"],
23361
+ ["createStore", "store"],
23362
+ ["createMemo", "memo"]
23363
+ ]);
23364
+ function isNameShadowed(name, ctx) {
23365
+ return !!(ctx.shadowedNames?.has(name) || ctx.localDeclaredNames?.has(name));
23366
+ }
23367
+ function getRuntimeImportedKind(name, ctx) {
23368
+ if (isNameShadowed(name, ctx)) return null;
23369
+ const imported = ctx.moduleRuntimeImportMap?.get(name);
23370
+ if (!imported) return null;
23371
+ return RUNTIME_REACTIVE_CREATORS.get(imported) ?? null;
23372
+ }
23373
+ function getRuntimeMemberKind(expr, ctx) {
23374
+ if (expr.kind !== "MemberExpression" && expr.kind !== "OptionalMemberExpression") return null;
23375
+ if (expr.object.kind !== "Identifier") return null;
23376
+ const objectName = deSSAVarName(expr.object.name);
23377
+ if (isNameShadowed(objectName, ctx)) return null;
23378
+ if (!ctx.moduleRuntimeNamespaceImports?.has(objectName)) return null;
23379
+ const propName = getStaticPropName(expr.property, expr.computed);
23380
+ if (typeof propName !== "string") return null;
23381
+ return RUNTIME_REACTIVE_CREATORS.get(propName) ?? null;
23382
+ }
23383
+ function getReactiveCallKind(expr, ctx) {
23384
+ if (expr.kind !== "CallExpression" && expr.kind !== "OptionalCallExpression") return null;
23385
+ const callee = expr.callee;
23386
+ if (callee.kind === "Identifier") {
23387
+ const name = deSSAVarName(callee.name);
23388
+ if (ctx.stateMacroNames?.has(name)) return "signal";
23389
+ if (name === "$store") return "store";
23390
+ if (ctx.memoMacroNames?.has(name)) return "memo";
23391
+ return getRuntimeImportedKind(name, ctx);
23392
+ }
23393
+ return getRuntimeMemberKind(callee, ctx);
23394
+ }
23395
+ function getReactiveCallKindFromBabel(callExpr, ctx, t4) {
23396
+ const callee = callExpr.callee;
23397
+ if (t4.isIdentifier(callee)) {
23398
+ const name = callee.name;
23399
+ if (ctx.stateMacroNames?.has(name)) return "signal";
23400
+ if (name === "$store") return "store";
23401
+ if (ctx.memoMacroNames?.has(name)) return "memo";
23402
+ return getRuntimeImportedKind(name, ctx);
23403
+ }
23404
+ if (t4.isMemberExpression(callee) || t4.isOptionalMemberExpression(callee)) {
23405
+ const memberCallee = callee;
23406
+ if (!t4.isIdentifier(memberCallee.object)) return null;
23407
+ const objectName = memberCallee.object.name;
23408
+ if (isNameShadowed(objectName, ctx)) return null;
23409
+ if (!ctx.moduleRuntimeNamespaceImports?.has(objectName)) return null;
23410
+ const propName = t4.isIdentifier(memberCallee.property) ? memberCallee.property.name : t4.isStringLiteral(memberCallee.property) ? memberCallee.property.value : t4.isNumericLiteral(memberCallee.property) ? String(memberCallee.property.value) : null;
23411
+ if (!propName) return null;
23412
+ return RUNTIME_REACTIVE_CREATORS.get(propName) ?? null;
23413
+ }
23414
+ return null;
23101
23415
  }
23102
23416
  function addImportedReactiveBinding(name, kind, ctx) {
23103
23417
  const base = deSSAVarName(name);
@@ -23162,7 +23476,7 @@ function classifyReactiveExport(name, ctx) {
23162
23476
  if (ctx.memoVars?.has(base)) return "memo";
23163
23477
  return null;
23164
23478
  }
23165
- function buildModuleReactiveMetadata(body, ctx, t4, options, stateMacroNames, memoMacroNames) {
23479
+ function buildModuleReactiveMetadata(body, ctx, t4, options) {
23166
23480
  const metadata = { exports: {} };
23167
23481
  const hookExports = {};
23168
23482
  const addExport = (exportName, localName) => {
@@ -23249,13 +23563,9 @@ function buildModuleReactiveMetadata(body, ctx, t4, options, stateMacroNames, me
23249
23563
  addExport("default", decl.id.name);
23250
23564
  } else if (t4.isClassDeclaration(decl) && decl.id) {
23251
23565
  addExport("default", decl.id.name);
23252
- } else if (t4.isCallExpression(decl) && t4.isIdentifier(decl.callee)) {
23253
- const callee = decl.callee.name;
23254
- if (stateMacroNames.has(callee) || callee === "$store") {
23255
- addDefaultExportKind(callee === "$store" ? "store" : "signal");
23256
- } else if (memoMacroNames.has(callee)) {
23257
- addDefaultExportKind("memo");
23258
- }
23566
+ } else if (t4.isCallExpression(decl) || t4.isOptionalCallExpression(decl)) {
23567
+ const kind = getReactiveCallKindFromBabel(decl, ctx, t4);
23568
+ addDefaultExportKind(kind);
23259
23569
  }
23260
23570
  }
23261
23571
  }
@@ -23472,6 +23782,45 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
23472
23782
  return lowerBlocksToStatements(blocks);
23473
23783
  }
23474
23784
  };
23785
+ const lowerReactiveScopeExpression = (fnExpr) => {
23786
+ if (!fnExpr.reactiveScope) return null;
23787
+ const blocks = Array.isArray(fnExpr.body) ? fnExpr.body : [
23788
+ {
23789
+ id: 0,
23790
+ instructions: [],
23791
+ terminator: {
23792
+ kind: "Return",
23793
+ argument: fnExpr.body
23794
+ }
23795
+ }
23796
+ ];
23797
+ const fn = {
23798
+ params: fnExpr.params,
23799
+ blocks,
23800
+ meta: {
23801
+ fromExpression: true,
23802
+ isArrow: fnExpr.kind === "ArrowFunction",
23803
+ hasExpressionBody: fnExpr.kind === "ArrowFunction" && fnExpr.isExpression,
23804
+ isAsync: fnExpr.isAsync ?? false
23805
+ },
23806
+ loc: fnExpr.loc ?? null
23807
+ };
23808
+ const lowered = lowerFunctionWithRegions(fn, ctx, { forceHookContext: true });
23809
+ if (!lowered) return null;
23810
+ const params = lowered.params;
23811
+ if (fnExpr.kind === "ArrowFunction") {
23812
+ const arrow = t4.arrowFunctionExpression(params, lowered.body);
23813
+ arrow.async = lowered.async;
23814
+ return arrow;
23815
+ }
23816
+ const fnExprAst = t4.functionExpression(
23817
+ fnExpr.name ? t4.identifier(deSSAVarName(fnExpr.name)) : null,
23818
+ params,
23819
+ lowered.body
23820
+ );
23821
+ fnExprAst.async = lowered.async;
23822
+ return fnExprAst;
23823
+ };
23475
23824
  switch (expr.kind) {
23476
23825
  case "Identifier":
23477
23826
  return t4.identifier(deSSAVarName(expr.name));
@@ -23493,6 +23842,22 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
23493
23842
  case "CallExpression": {
23494
23843
  if (expr.callee.kind === "Identifier" && expr.callee.name === "$state") {
23495
23844
  const args = lowerCallArguments(expr.arguments);
23845
+ const includeDevtools = ctx.options?.dev !== false;
23846
+ if (includeDevtools) {
23847
+ const options = [];
23848
+ if (ctx.currentAssignmentName) {
23849
+ options.push(
23850
+ t4.objectProperty(t4.identifier("name"), t4.stringLiteral(ctx.currentAssignmentName))
23851
+ );
23852
+ }
23853
+ if (expr.loc) {
23854
+ const source = `${ctx.options?.filename ?? ""}:${expr.loc.start.line}:${expr.loc.start.column}`;
23855
+ options.push(t4.objectProperty(t4.identifier("devToolsSource"), t4.stringLiteral(source)));
23856
+ }
23857
+ if (options.length > 0) {
23858
+ args.push(t4.objectExpression(options));
23859
+ }
23860
+ }
23496
23861
  if (ctx.inModule) {
23497
23862
  ctx.helpersUsed.add("signal");
23498
23863
  return t4.callExpression(t4.identifier(RUNTIME_ALIASES.signal), args);
@@ -23504,6 +23869,34 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
23504
23869
  ...args
23505
23870
  ]);
23506
23871
  }
23872
+ if (expr.callee.kind === "Identifier") {
23873
+ const memoCalleeName = deSSAVarName(expr.callee.name);
23874
+ if (ctx.memoMacroNames?.has(memoCalleeName)) {
23875
+ const args = lowerCallArguments(expr.arguments);
23876
+ const includeDevtools = ctx.options?.dev !== false;
23877
+ if (includeDevtools && expr.arguments.length === 1) {
23878
+ const options = [];
23879
+ if (ctx.currentAssignmentName) {
23880
+ options.push(
23881
+ t4.objectProperty(t4.identifier("name"), t4.stringLiteral(ctx.currentAssignmentName))
23882
+ );
23883
+ }
23884
+ if (expr.loc) {
23885
+ const source = `${ctx.options?.filename ?? ""}:${expr.loc.start.line}:${expr.loc.start.column}`;
23886
+ options.push(
23887
+ t4.objectProperty(t4.identifier("devToolsSource"), t4.stringLiteral(source))
23888
+ );
23889
+ }
23890
+ if (options.length > 0) {
23891
+ args.push(t4.objectExpression(options));
23892
+ }
23893
+ }
23894
+ return t4.callExpression(
23895
+ lowerExpression(expr.callee, ctx),
23896
+ args
23897
+ );
23898
+ }
23899
+ }
23507
23900
  if (expr.callee.kind === "Identifier" && expr.callee.name === "$effect") {
23508
23901
  const args = lowerCallArguments(
23509
23902
  expr.arguments,
@@ -23682,6 +24075,8 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
23682
24075
  case "JSXElement":
23683
24076
  return lowerJSXElement(expr, ctx);
23684
24077
  case "ArrowFunction": {
24078
+ const reactiveLowered = lowerReactiveScopeExpression(expr);
24079
+ if (reactiveLowered) return reactiveLowered;
23685
24080
  const paramIds = mapParams(expr.params);
23686
24081
  const shadowed = new Set(expr.params.map((p) => deSSAVarName(p.name)));
23687
24082
  const localDeclared = collectLocalDeclaredNames(
@@ -23728,6 +24123,8 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
23728
24123
  );
23729
24124
  }
23730
24125
  case "FunctionExpression": {
24126
+ const reactiveLowered = lowerReactiveScopeExpression(expr);
24127
+ if (reactiveLowered) return reactiveLowered;
23731
24128
  const paramIds = mapParams(expr.params);
23732
24129
  const shadowed = new Set(expr.params.map((p) => deSSAVarName(p.name)));
23733
24130
  const localDeclared = collectLocalDeclaredNames(expr.params, expr.body, t4);
@@ -24080,6 +24477,18 @@ function collectExpressionDependencies(expr, deps) {
24080
24477
  deps.add(deSSAVarName(expr.name));
24081
24478
  return;
24082
24479
  }
24480
+ if (expr.kind === "ArrowFunction") {
24481
+ if (expr.isExpression && !Array.isArray(expr.body)) {
24482
+ collectExpressionDependencies(expr.body, deps);
24483
+ } else if (Array.isArray(expr.body)) {
24484
+ collectBlockDependencies(expr.body, deps);
24485
+ }
24486
+ return;
24487
+ }
24488
+ if (expr.kind === "FunctionExpression") {
24489
+ collectBlockDependencies(expr.body, deps);
24490
+ return;
24491
+ }
24083
24492
  if (expr.kind === "MemberExpression") {
24084
24493
  const path2 = getMemberDependencyPath(expr);
24085
24494
  if (path2) deps.add(path2);
@@ -24128,6 +24537,51 @@ function collectExpressionDependencies(expr, deps) {
24128
24537
  return;
24129
24538
  }
24130
24539
  }
24540
+ function collectBlockDependencies(blocks, deps) {
24541
+ for (const block of blocks) {
24542
+ for (const instr of block.instructions) {
24543
+ switch (instr.kind) {
24544
+ case "Assign":
24545
+ case "Expression":
24546
+ collectExpressionDependencies(instr.value, deps);
24547
+ break;
24548
+ case "Phi":
24549
+ for (const source of instr.sources) {
24550
+ deps.add(deSSAVarName(source.id.name));
24551
+ }
24552
+ break;
24553
+ default:
24554
+ break;
24555
+ }
24556
+ }
24557
+ const term = block.terminator;
24558
+ switch (term.kind) {
24559
+ case "Return":
24560
+ if (term.argument) collectExpressionDependencies(term.argument, deps);
24561
+ break;
24562
+ case "Throw":
24563
+ collectExpressionDependencies(term.argument, deps);
24564
+ break;
24565
+ case "Branch":
24566
+ collectExpressionDependencies(term.test, deps);
24567
+ break;
24568
+ case "Switch":
24569
+ collectExpressionDependencies(term.discriminant, deps);
24570
+ for (const c of term.cases) {
24571
+ if (c.test) collectExpressionDependencies(c.test, deps);
24572
+ }
24573
+ break;
24574
+ case "ForOf":
24575
+ collectExpressionDependencies(term.iterable, deps);
24576
+ break;
24577
+ case "ForIn":
24578
+ collectExpressionDependencies(term.object, deps);
24579
+ break;
24580
+ default:
24581
+ break;
24582
+ }
24583
+ }
24584
+ }
24131
24585
  function normalizeDependencyKey2(name) {
24132
24586
  return name.split(".").map((part) => deSSAVarName(part)).join(".");
24133
24587
  }
@@ -24304,6 +24758,9 @@ function replaceIdentifiersWithOverrides(node, overrides, t4, parentKind, parent
24304
24758
  }
24305
24759
  return;
24306
24760
  }
24761
+ const isMethodCallMember = (t4.isMemberExpression(node) || t4.isOptionalMemberExpression(node)) && !node.computed && t4.isIdentifier(node.property) && ["call", "apply", "bind"].includes(
24762
+ node.property.name
24763
+ );
24307
24764
  for (const key of Object.keys(node)) {
24308
24765
  if (key === "type" || key === "loc" || key === "start" || key === "end") continue;
24309
24766
  if (t4.isObjectProperty(node) && key === "key" && !node.computed) {
@@ -24312,6 +24769,9 @@ function replaceIdentifiersWithOverrides(node, overrides, t4, parentKind, parent
24312
24769
  if ((t4.isMemberExpression(node) || t4.isOptionalMemberExpression(node)) && key === "property" && !node.computed) {
24313
24770
  continue;
24314
24771
  }
24772
+ if (isMethodCallMember && key === "object") {
24773
+ continue;
24774
+ }
24315
24775
  const value = node[key];
24316
24776
  if (Array.isArray(value)) {
24317
24777
  for (const item of value) {
@@ -24544,7 +25004,13 @@ function normalizeHIRAttrName(name) {
24544
25004
  if (name === "htmlFor") return "for";
24545
25005
  return name;
24546
25006
  }
24547
- function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
25007
+ function resolveNamespaceContext(tagName, parentNamespace) {
25008
+ if (tagName === "svg") return "svg";
25009
+ if (tagName === "math") return "mathml";
25010
+ if (tagName === "foreignObject" && parentNamespace === "svg") return null;
25011
+ return parentNamespace;
25012
+ }
25013
+ function extractHIRStaticHtml(jsx, ctx, parentPath = [], namespace = null) {
24548
25014
  if (jsx.isComponent || typeof jsx.tagName !== "string") {
24549
25015
  return {
24550
25016
  html: "<!---->",
@@ -24558,6 +25024,7 @@ function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
24558
25024
  };
24559
25025
  }
24560
25026
  const tagName = jsx.tagName;
25027
+ const resolvedNamespace = resolveNamespaceContext(tagName, namespace);
24561
25028
  let html = `<${tagName}`;
24562
25029
  const bindings = [];
24563
25030
  for (const attr of jsx.attributes) {
@@ -24657,7 +25124,7 @@ function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
24657
25124
  }
24658
25125
  } else if (child.kind === "element") {
24659
25126
  const childPath = [...parentPath, childIndex];
24660
- const childResult = extractHIRStaticHtml(child.value, ctx, childPath);
25127
+ const childResult = extractHIRStaticHtml(child.value, ctx, childPath, resolvedNamespace);
24661
25128
  html += childResult.html;
24662
25129
  bindings.push(...childResult.bindings);
24663
25130
  childIndex++;
@@ -24668,26 +25135,42 @@ function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
24668
25135
  bindings.push({
24669
25136
  type: "text",
24670
25137
  path: [...parentPath, childIndex],
24671
- expr: child.value
25138
+ expr: child.value,
25139
+ // Track namespace for dynamic text bindings
25140
+ namespace: resolvedNamespace
24672
25141
  });
24673
25142
  } else {
24674
25143
  html += "<!---->";
24675
25144
  bindings.push({
24676
25145
  type: "child",
24677
25146
  path: [...parentPath, childIndex],
24678
- expr: child.value
25147
+ expr: child.value,
25148
+ // Track namespace for dynamic child bindings
25149
+ namespace: resolvedNamespace
24679
25150
  });
24680
25151
  }
24681
25152
  childIndex++;
24682
25153
  }
24683
25154
  }
24684
25155
  html += `</${tagName}>`;
24685
- return { html, bindings };
25156
+ const needsSVG = namespace === "svg" && tagName !== "svg";
25157
+ const needsMathML = namespace === "mathml" && tagName !== "math";
25158
+ return {
25159
+ html,
25160
+ bindings,
25161
+ isSVG: needsSVG || void 0,
25162
+ isMathML: needsMathML || void 0
25163
+ };
24686
25164
  }
24687
25165
  function lowerIntrinsicElement(jsx, ctx) {
24688
25166
  const { t: t4 } = ctx;
24689
25167
  const statements = [];
24690
- const { html, bindings } = extractHIRStaticHtml(jsx, ctx);
25168
+ const { html, bindings, isSVG, isMathML } = extractHIRStaticHtml(
25169
+ jsx,
25170
+ ctx,
25171
+ [],
25172
+ ctx.namespaceContext ?? null
25173
+ );
24691
25174
  const allDeps = /* @__PURE__ */ new Set();
24692
25175
  for (const binding of bindings) {
24693
25176
  if (binding.expr) collectExpressionDependencies(binding.expr, allDeps);
@@ -24713,7 +25196,7 @@ function lowerIntrinsicElement(jsx, ctx) {
24713
25196
  ctx.needsCtx = true;
24714
25197
  }
24715
25198
  }
24716
- const hoistedTmplId = getOrCreateHoistedTemplate(html, ctx);
25199
+ const hoistedTmplId = getOrCreateHoistedTemplate(html, ctx, isSVG, isMathML);
24717
25200
  const rootId = genTemp(ctx, "root");
24718
25201
  if (hoistedTmplId) {
24719
25202
  statements.push(
@@ -24724,11 +25207,19 @@ function lowerIntrinsicElement(jsx, ctx) {
24724
25207
  } else {
24725
25208
  ctx.helpersUsed.add("template");
24726
25209
  const tmplId = genTemp(ctx, "tmpl");
25210
+ const templateArgs = [t4.stringLiteral(html)];
25211
+ if (isSVG || isMathML) {
25212
+ templateArgs.push(t4.identifier("undefined"));
25213
+ templateArgs.push(isSVG ? t4.booleanLiteral(true) : t4.identifier("undefined"));
25214
+ if (isMathML) {
25215
+ templateArgs.push(t4.booleanLiteral(true));
25216
+ }
25217
+ }
24727
25218
  statements.push(
24728
25219
  t4.variableDeclaration("const", [
24729
25220
  t4.variableDeclarator(
24730
25221
  tmplId,
24731
- t4.callExpression(t4.identifier(RUNTIME_ALIASES.template), [t4.stringLiteral(html)])
25222
+ t4.callExpression(t4.identifier(RUNTIME_ALIASES.template), templateArgs)
24732
25223
  )
24733
25224
  ])
24734
25225
  );
@@ -24741,6 +25232,12 @@ function lowerIntrinsicElement(jsx, ctx) {
24741
25232
  const elId = rootId;
24742
25233
  const nodeCache = /* @__PURE__ */ new Map();
24743
25234
  nodeCache.set("", elId);
25235
+ const tagName = typeof jsx.tagName === "string" ? jsx.tagName : null;
25236
+ const prevNamespace = ctx.namespaceContext;
25237
+ if (tagName) {
25238
+ const elementNamespace = resolveNamespaceContext(tagName, ctx.namespaceContext ?? null);
25239
+ ctx.namespaceContext = elementNamespace;
25240
+ }
24744
25241
  const pathStatements = [];
24745
25242
  for (const binding of bindings) {
24746
25243
  resolveHIRBindingPath(binding.path, nodeCache, pathStatements, ctx);
@@ -24755,23 +25252,17 @@ function lowerIntrinsicElement(jsx, ctx) {
24755
25252
  const hirDataBinding = isDelegated && binding.expr ? extractDelegatedEventDataFromHIR(binding.expr, ctx) : null;
24756
25253
  if (hirDataBinding) {
24757
25254
  ctx.delegatedEventsUsed?.add(eventName);
24758
- const handlerExpr = lowerExpression(hirDataBinding.handler, ctx);
25255
+ const handlerExpr = hirDataBinding.handler.kind === "Identifier" ? t4.identifier(hirDataBinding.handler.name) : lowerExpression(hirDataBinding.handler, ctx);
24759
25256
  const dataExpr = lowerDomExpression(hirDataBinding.data, ctx, containingRegion, {
24760
25257
  skipHookAccessors: false,
24761
25258
  skipRegionRootOverride: true
24762
25259
  });
24763
- const dataParam = t4.identifier("__data");
24764
- const eventParam = t4.identifier("_e");
24765
- const wrappedHandler = t4.arrowFunctionExpression(
24766
- [dataParam, eventParam],
24767
- t4.callExpression(handlerExpr, [dataParam])
24768
- );
24769
25260
  statements.push(
24770
25261
  t4.expressionStatement(
24771
25262
  t4.assignmentExpression(
24772
25263
  "=",
24773
25264
  t4.memberExpression(targetId, t4.identifier(`$$${eventName}`)),
24774
- wrappedHandler
25265
+ handlerExpr
24775
25266
  )
24776
25267
  )
24777
25268
  );
@@ -24805,16 +25296,54 @@ function lowerIntrinsicElement(jsx, ctx) {
24805
25296
  if (fn.params.length > 0) return fn;
24806
25297
  return t4.functionExpression(fn.id, [eventParam], fn.body, fn.generator, fn.async);
24807
25298
  }
24808
- return t4.arrowFunctionExpression(
25299
+ if (t4.isIdentifier(fn) || t4.isMemberExpression(fn)) {
25300
+ return fn;
25301
+ }
25302
+ if (t4.isCallExpression(fn) && fn.arguments.length === 0 && (t4.isIdentifier(fn.callee) || t4.isMemberExpression(fn.callee))) {
25303
+ return fn.callee;
25304
+ }
25305
+ return t4.functionExpression(
25306
+ null,
24809
25307
  [eventParam],
24810
- t4.callExpression(fn, [eventParam])
25308
+ t4.blockStatement([
25309
+ t4.returnStatement(
25310
+ t4.callExpression(
25311
+ t4.memberExpression(fn, t4.identifier("call")),
25312
+ [t4.thisExpression(), eventParam]
25313
+ )
25314
+ )
25315
+ ])
24811
25316
  );
24812
25317
  };
24813
25318
  const handlerExpr = !isFn && shouldWrapHandler ? t4.arrowFunctionExpression([], valueExpr) : ensureHandlerParam(valueExpr);
24814
- const dataBinding = isDelegated && !shouldWrapHandler ? extractDelegatedEventData(valueExpr, t4) : null;
25319
+ let dataBinding = isDelegated && !shouldWrapHandler ? extractDelegatedEventData(valueExpr, t4) : null;
25320
+ if (dataBinding && t4.isIdentifier(dataBinding.handler)) {
25321
+ const handlerName = dataBinding.handler.name;
25322
+ if (ctx.signalVars?.has(handlerName) || ctx.memoVars?.has(handlerName) || ctx.aliasVars?.has(handlerName) || ctx.storeVars?.has(handlerName) || ctx.trackedVars.has(handlerName)) {
25323
+ dataBinding = null;
25324
+ }
25325
+ }
24815
25326
  if (isDelegated) {
24816
25327
  ctx.delegatedEventsUsed?.add(eventName);
24817
- const finalHandler = !isFn && shouldWrapHandler ? t4.arrowFunctionExpression([eventParam], t4.callExpression(valueExpr, [eventParam])) : handlerExpr;
25328
+ let handlerName = null;
25329
+ if (t4.isIdentifier(valueExpr)) {
25330
+ handlerName = valueExpr.name;
25331
+ } else if (t4.isCallExpression(valueExpr) && valueExpr.arguments.length === 0 && t4.isIdentifier(valueExpr.callee)) {
25332
+ handlerName = valueExpr.callee.name;
25333
+ }
25334
+ const handlerForCall = handlerName ? t4.identifier(handlerName) : t4.cloneNode(valueExpr, true);
25335
+ const finalHandler = !isFn && shouldWrapHandler ? t4.functionExpression(
25336
+ null,
25337
+ [eventParam],
25338
+ t4.blockStatement([
25339
+ t4.returnStatement(
25340
+ t4.callExpression(t4.memberExpression(handlerForCall, t4.identifier("call")), [
25341
+ t4.thisExpression(),
25342
+ eventParam
25343
+ ])
25344
+ )
25345
+ ])
25346
+ ) : handlerExpr;
24818
25347
  const normalizeHandler = (expr) => {
24819
25348
  if (t4.isCallExpression(expr) && (t4.isIdentifier(expr.callee) || t4.isMemberExpression(expr.callee))) {
24820
25349
  return expr.callee;
@@ -24827,19 +25356,7 @@ function lowerIntrinsicElement(jsx, ctx) {
24827
25356
  const dataForDelegate = dataBinding?.data && (t4.isArrowFunctionExpression(dataBinding.data) || t4.isFunctionExpression(dataBinding.data) ? dataBinding.data : t4.arrowFunctionExpression([], dataBinding.data));
24828
25357
  const handlerForDelegate = normalizedDataHandler ?? (dataBinding ? normalizeHandler(handlerExpr) : finalHandler);
24829
25358
  const handlerIsCallableExpr = t4.isArrowFunctionExpression(handlerForDelegate) || t4.isFunctionExpression(handlerForDelegate) || t4.isIdentifier(handlerForDelegate) || t4.isMemberExpression(handlerForDelegate);
24830
- let handlerToAssign = handlerIsCallableExpr ? handlerForDelegate : t4.arrowFunctionExpression([eventParam], handlerForDelegate);
24831
- if (dataForDelegate) {
24832
- let payloadExpr;
24833
- if (t4.isArrowFunctionExpression(dataForDelegate) && dataForDelegate.params.length === 0) {
24834
- payloadExpr = t4.isBlockStatement(dataForDelegate.body) ? t4.callExpression(t4.arrowFunctionExpression([], dataForDelegate.body), []) : dataForDelegate.body;
24835
- } else {
24836
- payloadExpr = t4.callExpression(dataForDelegate, []);
24837
- }
24838
- handlerToAssign = t4.arrowFunctionExpression(
24839
- [eventParam],
24840
- t4.callExpression(handlerForDelegate, [payloadExpr])
24841
- );
24842
- }
25359
+ const handlerToAssign = handlerIsCallableExpr ? handlerForDelegate : t4.arrowFunctionExpression([eventParam], handlerForDelegate);
24843
25360
  statements.push(
24844
25361
  t4.expressionStatement(
24845
25362
  t4.assignmentExpression(
@@ -24978,10 +25495,18 @@ function lowerIntrinsicElement(jsx, ctx) {
24978
25495
  );
24979
25496
  }
24980
25497
  } else if (binding.type === "child" && binding.expr) {
24981
- emitHIRChildBinding(targetId, binding.expr, statements, ctx, containingRegion);
25498
+ emitHIRChildBinding(
25499
+ targetId,
25500
+ binding.expr,
25501
+ statements,
25502
+ ctx,
25503
+ containingRegion,
25504
+ binding.namespace
25505
+ );
24982
25506
  }
24983
25507
  }
24984
25508
  applyRegionToContext(ctx, prevRegion ?? null);
25509
+ ctx.namespaceContext = prevNamespace;
24985
25510
  statements.push(t4.returnStatement(elId));
24986
25511
  const body = t4.blockStatement(statements);
24987
25512
  if (shouldMemo && containingRegion) {
@@ -25032,9 +25557,12 @@ function resolveHIRBindingPath(path2, cache, statements, ctx) {
25032
25557
  cache.set(key, varId);
25033
25558
  return varId;
25034
25559
  }
25035
- function emitHIRChildBinding(markerId, expr, statements, ctx, containingRegion) {
25560
+ function emitHIRChildBinding(markerId, expr, statements, ctx, containingRegion, namespace) {
25036
25561
  const { t: t4 } = ctx;
25037
25562
  const parentId = t4.memberExpression(markerId, t4.identifier("parentNode"));
25563
+ if (namespace !== void 0) {
25564
+ ctx.namespaceContext = namespace;
25565
+ }
25038
25566
  if (expr.kind === "CallExpression" && expr.callee.kind === "Identifier" && expr.callee.name === "createPortal") {
25039
25567
  ctx.helpersUsed.add("onDestroy");
25040
25568
  const portalId = genTemp(ctx, "portal");
@@ -25256,7 +25784,7 @@ function extractDelegatedEventData(expr, t4) {
25256
25784
  const bodyExpr = t4.isBlockStatement(expr.body) ? expr.body.body.length === 1 && t4.isReturnStatement(expr.body.body[0]) && expr.body.body[0].argument && t4.isExpression(expr.body.body[0].argument) ? expr.body.body[0].argument : null : expr.body;
25257
25785
  if (!bodyExpr || !t4.isCallExpression(bodyExpr)) return null;
25258
25786
  if (paramNames.some((name) => expressionUsesIdentifier(bodyExpr, name, t4))) return null;
25259
- if (!t4.isIdentifier(bodyExpr.callee) && !t4.isMemberExpression(bodyExpr.callee)) return null;
25787
+ if (!t4.isIdentifier(bodyExpr.callee)) return null;
25260
25788
  if (bodyExpr.arguments.length === 0) return null;
25261
25789
  if (bodyExpr.arguments.length > 1) return null;
25262
25790
  const dataArg = bodyExpr.arguments[0];
@@ -25282,12 +25810,16 @@ function extractDelegatedEventDataFromHIR(expr, ctx) {
25282
25810
  if (callee.kind !== "Identifier") {
25283
25811
  return null;
25284
25812
  }
25813
+ const handlerName = callee.name;
25814
+ if (ctx.signalVars?.has(handlerName) || ctx.memoVars?.has(handlerName) || ctx.aliasVars?.has(handlerName) || ctx.storeVars?.has(handlerName) || ctx.trackedVars.has(handlerName)) {
25815
+ return null;
25816
+ }
25285
25817
  if (bodyExpr.arguments.length !== 1) {
25286
25818
  return null;
25287
25819
  }
25288
25820
  if (callee.kind === "Identifier") {
25289
- const handlerName = deSSAVarName(callee.name);
25290
- const isTrackedAccessor = ctx.signalVars?.has(handlerName) || ctx.memoVars?.has(handlerName) || ctx.aliasVars?.has(handlerName);
25821
+ const handlerName2 = deSSAVarName(callee.name);
25822
+ const isTrackedAccessor = ctx.signalVars?.has(handlerName2) || ctx.memoVars?.has(handlerName2) || ctx.aliasVars?.has(handlerName2);
25291
25823
  if (isTrackedAccessor) {
25292
25824
  return null;
25293
25825
  }
@@ -25826,19 +26358,26 @@ function lowerHIRWithRegions(program, t4, options, macroAliases) {
25826
26358
  const emittedFunctionNames = /* @__PURE__ */ new Set();
25827
26359
  const originalBody = program.originalBody ?? [];
25828
26360
  ctx.moduleDeclaredNames = collectDeclaredNames(originalBody, t4);
25829
- ctx.moduleRuntimeNames = collectRuntimeImportNames(originalBody, t4);
26361
+ const runtimeImports = collectRuntimeImports(originalBody, t4);
26362
+ ctx.moduleRuntimeNames = runtimeImports.names;
26363
+ ctx.moduleRuntimeImportMap = runtimeImports.importMap;
26364
+ ctx.moduleRuntimeNamespaceImports = runtimeImports.namespaces;
25830
26365
  applyImportedReactiveMetadata(originalBody, ctx, t4, options);
25831
26366
  const stateMacroNames = /* @__PURE__ */ new Set(["$state", ...macroAliases?.state ?? []]);
25832
26367
  const memoMacroNames = new Set(macroAliases?.memo ?? ctx.memoMacroNames ?? []);
25833
26368
  if (!memoMacroNames.has("$memo")) memoMacroNames.add("$memo");
25834
26369
  if (!memoMacroNames.has("createMemo")) memoMacroNames.add("createMemo");
26370
+ ctx.stateMacroNames = stateMacroNames;
25835
26371
  ctx.memoMacroNames = memoMacroNames;
25836
26372
  for (const stmt of originalBody) {
25837
26373
  if (t4.isVariableDeclaration(stmt)) {
25838
26374
  for (const decl of stmt.declarations) {
25839
- if (t4.isIdentifier(decl.id) && decl.init && t4.isCallExpression(decl.init) && t4.isIdentifier(decl.init.callee) && (stateMacroNames.has(decl.init.callee.name) || decl.init.callee.name === "$store")) {
25840
- ctx.trackedVars.add(decl.id.name);
25841
- if (decl.init.callee.name === "$store") {
26375
+ if (t4.isIdentifier(decl.id) && decl.init && (t4.isCallExpression(decl.init) || t4.isOptionalCallExpression(decl.init))) {
26376
+ const callKind = getReactiveCallKindFromBabel(decl.init, ctx, t4);
26377
+ if (callKind === "signal") {
26378
+ ctx.trackedVars.add(decl.id.name);
26379
+ } else if (callKind === "store") {
26380
+ ctx.trackedVars.add(decl.id.name);
25842
26381
  ctx.storeVars?.add(decl.id.name);
25843
26382
  }
25844
26383
  }
@@ -26067,22 +26606,20 @@ function lowerHIRWithRegions(program, t4, options, macroAliases) {
26067
26606
  ctx.helpersUsed.add("popContext");
26068
26607
  body.push(t4.expressionStatement(t4.callExpression(t4.identifier(RUNTIME_ALIASES.popContext), [])));
26069
26608
  }
26070
- const moduleMeta = buildModuleReactiveMetadata(
26071
- originalBody,
26072
- ctx,
26073
- t4,
26074
- options,
26075
- stateMacroNames,
26076
- memoMacroNames
26077
- );
26609
+ const moduleMeta = buildModuleReactiveMetadata(originalBody, ctx, t4, options);
26078
26610
  setModuleMetadata(options?.filename, moduleMeta, options);
26079
26611
  return t4.file(t4.program(attachHelperImports(ctx, body, t4)));
26080
26612
  }
26081
26613
  function lowerTopLevelStatementBlock(statements, ctx, t4, name = "__module_segment", existingAliases) {
26082
26614
  if (statements.length === 0) return { statements: [], aliases: /* @__PURE__ */ new Set() };
26083
- const fn = convertStatementsToHIRFunction(name, statements);
26615
+ const reactiveScopes = ctx.options?.reactiveScopes;
26616
+ const fn = convertStatementsToHIRFunction(
26617
+ name,
26618
+ statements,
26619
+ reactiveScopes && reactiveScopes.length > 0 ? { reactiveScopes: new Set(reactiveScopes) } : void 0
26620
+ );
26084
26621
  const scopeResult = analyzeReactiveScopesWithSSA(fn);
26085
- detectDerivedCycles(fn, scopeResult);
26622
+ detectDerivedCycles(fn, scopeResult, ctx);
26086
26623
  ctx.scopes = scopeResult;
26087
26624
  const regionResult = generateRegions(fn, scopeResult);
26088
26625
  ctx.regions = flattenRegions(regionResult.topLevelRegions);
@@ -26094,10 +26631,12 @@ function lowerTopLevelStatementBlock(statements, ctx, t4, name = "__module_segme
26094
26631
  const functionVars = ctx.functionVars ?? /* @__PURE__ */ new Set();
26095
26632
  const signalVars = ctx.signalVars ?? /* @__PURE__ */ new Set();
26096
26633
  const storeVars = ctx.storeVars ?? /* @__PURE__ */ new Set();
26634
+ const memoVars = ctx.memoVars ?? /* @__PURE__ */ new Set();
26097
26635
  const mutatedVars = /* @__PURE__ */ new Set();
26098
26636
  ctx.functionVars = functionVars;
26099
26637
  ctx.signalVars = signalVars;
26100
26638
  ctx.storeVars = storeVars;
26639
+ ctx.memoVars = memoVars;
26101
26640
  ctx.mutatedVars = mutatedVars;
26102
26641
  for (const block of fn.blocks) {
26103
26642
  for (const instr of block.instructions) {
@@ -26106,11 +26645,14 @@ function lowerTopLevelStatementBlock(statements, ctx, t4, name = "__module_segme
26106
26645
  if (instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression") {
26107
26646
  functionVars.add(target);
26108
26647
  }
26109
- if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier") {
26110
- if (instr.value.callee.name === "$state") {
26648
+ if (instr.value.kind === "CallExpression" || instr.value.kind === "OptionalCallExpression") {
26649
+ const callKind = getReactiveCallKind(instr.value, ctx);
26650
+ if (callKind === "signal") {
26111
26651
  signalVars.add(target);
26112
- } else if (instr.value.callee.name === "$store") {
26652
+ } else if (callKind === "store") {
26113
26653
  storeVars.add(target);
26654
+ } else if (callKind === "memo") {
26655
+ memoVars.add(target);
26114
26656
  }
26115
26657
  }
26116
26658
  if (!instr.declarationKind) {
@@ -26227,7 +26769,7 @@ function transformControlFlowReturns(statements, ctx) {
26227
26769
  }
26228
26770
  return null;
26229
26771
  }
26230
- function lowerFunctionWithRegions(fn, ctx) {
26772
+ function lowerFunctionWithRegions(fn, ctx, options) {
26231
26773
  const { t: t4 } = ctx;
26232
26774
  const prevTracked = ctx.trackedVars;
26233
26775
  const prevSignalVars = ctx.signalVars;
@@ -26286,8 +26828,15 @@ function lowerFunctionWithRegions(fn, ctx) {
26286
26828
  if (instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression") {
26287
26829
  ctx.functionVars?.add(target);
26288
26830
  }
26289
- if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "$state") {
26290
- ctx.signalVars?.add(target);
26831
+ if (instr.value.kind === "CallExpression" || instr.value.kind === "OptionalCallExpression") {
26832
+ const callKind = getReactiveCallKind(instr.value, ctx);
26833
+ if (callKind === "signal") {
26834
+ ctx.signalVars?.add(target);
26835
+ } else if (callKind === "store") {
26836
+ ctx.storeVars?.add(target);
26837
+ } else if (callKind === "memo") {
26838
+ ctx.memoVars?.add(target);
26839
+ }
26291
26840
  }
26292
26841
  if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && isHookName(instr.value.callee.name)) {
26293
26842
  hookResultVars.add(target);
@@ -26296,9 +26845,6 @@ function lowerFunctionWithRegions(fn, ctx) {
26296
26845
  if (instr.value.kind === "MemberExpression" && instr.value.object.kind === "Identifier" && hookResultVars.has(deSSAVarName(instr.value.object.name))) {
26297
26846
  hookAccessorAliases.add(target);
26298
26847
  }
26299
- if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "$store") {
26300
- ctx.storeVars?.add(target);
26301
- }
26302
26848
  if (!instr.declarationKind) {
26303
26849
  ctx.mutatedVars?.add(target);
26304
26850
  }
@@ -26311,15 +26857,18 @@ function lowerFunctionWithRegions(fn, ctx) {
26311
26857
  ctx.aliasVars?.add(name);
26312
26858
  ctx.trackedVars.add(name);
26313
26859
  });
26314
- const inferredHook = isHookLikeFunction(fn);
26860
+ const inferredHook = options?.forceHookContext ? true : isHookLikeFunction(fn);
26315
26861
  const scopeResult = analyzeReactiveScopesWithSSA(fn);
26316
- detectDerivedCycles(fn, scopeResult);
26862
+ detectDerivedCycles(fn, scopeResult, ctx);
26317
26863
  ctx.scopes = scopeResult;
26318
26864
  const regionResult = generateRegions(fn, scopeResult);
26319
26865
  const prevHookFlag = ctx.currentFnIsHook;
26320
26866
  ctx.currentFnIsHook = inferredHook;
26321
26867
  const isComponent = !!(fn.name && fn.name[0] === fn.name[0]?.toUpperCase());
26322
26868
  ctx.isComponentFn = isComponent;
26869
+ if (!isComponent && !inferredHook) {
26870
+ ctx.inModule = true;
26871
+ }
26323
26872
  const rawPropsParam = fn.params.length === 1 && fn.params[0] ? deSSAVarName(fn.params[0].name) : void 0;
26324
26873
  if (isComponent && rawPropsParam) {
26325
26874
  ctx.propsParamName = rawPropsParam;
@@ -30433,18 +30982,6 @@ function isInsideConditional(path2) {
30433
30982
  (p) => p.isIfStatement?.() || p.isConditionalExpression?.() || p.isSwitchCase?.()
30434
30983
  );
30435
30984
  }
30436
- function isInsideNestedFunction(path2) {
30437
- let depth = 0;
30438
- let current = path2;
30439
- while (current) {
30440
- if (current.isFunction?.()) {
30441
- depth++;
30442
- if (depth > 1) return true;
30443
- }
30444
- current = current.parentPath;
30445
- }
30446
- return false;
30447
- }
30448
30985
  function isInsideJSX(path2) {
30449
30986
  return !!path2.findParent((p) => p.isJSXElement?.() || p.isJSXFragment?.());
30450
30987
  }
@@ -30828,6 +31365,54 @@ function createHIREntrypointVisitor(t4, options) {
30828
31365
  filename: fileName
30829
31366
  };
30830
31367
  const isHookName2 = (name) => !!name && /^use[A-Z]/.test(name);
31368
+ const reactiveScopesSet = new Set(options.reactiveScopes ?? []);
31369
+ const resolveReactiveScopeName = (callee) => {
31370
+ if (reactiveScopesSet.size === 0) return null;
31371
+ if (t4.isIdentifier(callee)) {
31372
+ return reactiveScopesSet.has(callee.name) ? callee.name : null;
31373
+ }
31374
+ if ((t4.isMemberExpression(callee) || t4.isOptionalMemberExpression(callee)) && !callee.computed && t4.isIdentifier(callee.property)) {
31375
+ return reactiveScopesSet.has(callee.property.name) ? callee.property.name : null;
31376
+ }
31377
+ return null;
31378
+ };
31379
+ const isReactiveScopeCallback = (fnPath) => {
31380
+ if (reactiveScopesSet.size === 0) return false;
31381
+ const parent = fnPath.parentPath;
31382
+ if (!parent || !(parent.isCallExpression() || parent.isOptionalCallExpression())) {
31383
+ return false;
31384
+ }
31385
+ if (parent.node.arguments[0] !== fnPath.node) return false;
31386
+ const callee = parent.node.callee;
31387
+ return !!resolveReactiveScopeName(callee);
31388
+ };
31389
+ const isReactiveScopeCallbackNode = (fnNode, parentNode) => {
31390
+ if (reactiveScopesSet.size === 0) return false;
31391
+ if (!parentNode) return false;
31392
+ if (!t4.isCallExpression(parentNode) && !t4.isOptionalCallExpression(parentNode)) {
31393
+ return false;
31394
+ }
31395
+ if (parentNode.arguments[0] !== fnNode) return false;
31396
+ return !!resolveReactiveScopeName(parentNode.callee);
31397
+ };
31398
+ const isInsideNestedFunctionWithReactiveScopes = (nodePath) => {
31399
+ let depth = 0;
31400
+ let current = nodePath;
31401
+ while (current) {
31402
+ if (current.isFunction?.()) {
31403
+ depth++;
31404
+ if (isReactiveScopeCallbackNode(
31405
+ current.node,
31406
+ current.parentPath?.node
31407
+ )) {
31408
+ return depth > 1;
31409
+ }
31410
+ if (depth > 1) return true;
31411
+ }
31412
+ current = current.parentPath;
31413
+ }
31414
+ return false;
31415
+ };
30831
31416
  const getFunctionName = (fnPath) => {
30832
31417
  return fnPath.isFunctionDeclaration() && fnPath.node.id ? fnPath.node.id.name : fnPath.isFunctionExpression() && fnPath.node.id ? fnPath.node.id.name : fnPath.parentPath.isVariableDeclarator() && t4.isIdentifier(fnPath.parentPath.node.id) && fnPath.parentPath.node.init === fnPath.node ? fnPath.parentPath.node.id.name : void 0;
30833
31418
  };
@@ -30839,7 +31424,7 @@ function createHIREntrypointVisitor(t4, options) {
30839
31424
  const name = getFunctionName(fnPath);
30840
31425
  return isHookName2(name);
30841
31426
  };
30842
- const isComponentOrHookDefinition = (fnPath) => isComponentDefinition(fnPath) || isHookDefinition(fnPath);
31427
+ const isComponentOrHookDefinition = (fnPath) => isComponentDefinition(fnPath) || isHookDefinition(fnPath) || isReactiveScopeCallback(fnPath);
30843
31428
  const isComponentLike = (fnPath) => {
30844
31429
  const name = getFunctionName(fnPath);
30845
31430
  return name && isComponentName2(name) || isHookName2(name) || functionHasJSX(fnPath) || functionUsesStateLike(fnPath, t4);
@@ -31072,7 +31657,7 @@ Signals must be created at the top level of components for stable identity.
31072
31657
  Move the $state() declaration before the loop/condition.`
31073
31658
  );
31074
31659
  }
31075
- if (isInsideNestedFunction(varPath)) {
31660
+ if (isInsideNestedFunctionWithReactiveScopes(varPath)) {
31076
31661
  throw varPath.buildCodeFrameError(
31077
31662
  `$state() cannot be declared inside nested functions.
31078
31663
 
@@ -31157,7 +31742,7 @@ Move the declaration to the top of your component.
31157
31742
  For dynamic collections, consider using $store with an array/object.`
31158
31743
  );
31159
31744
  }
31160
- if (isInsideNestedFunction(callPath)) {
31745
+ if (isInsideNestedFunctionWithReactiveScopes(callPath)) {
31161
31746
  throw callPath.buildCodeFrameError(
31162
31747
  `$state() cannot be declared inside nested functions.
31163
31748
 
@@ -31184,7 +31769,7 @@ For conditional effects, use a condition inside the effect body instead:
31184
31769
  $effect(() => { if (condition) { /* ... */ } })`
31185
31770
  );
31186
31771
  }
31187
- if (isInsideNestedFunction(callPath)) {
31772
+ if (isInsideNestedFunctionWithReactiveScopes(callPath)) {
31188
31773
  throw callPath.buildCodeFrameError(
31189
31774
  `$effect() cannot be called inside nested functions.
31190
31775
 
@@ -31218,7 +31803,7 @@ or extract the nested logic into a custom hook (useXxx).`
31218
31803
  `${calleeId}() must be called inside a component or hook (useX)`
31219
31804
  );
31220
31805
  }
31221
- if (isInsideLoop(callPath) || isInsideConditional(callPath) || isInsideNestedFunction(callPath)) {
31806
+ if (isInsideLoop(callPath) || isInsideConditional(callPath) || isInsideNestedFunctionWithReactiveScopes(callPath)) {
31222
31807
  throw callPath.buildCodeFrameError(
31223
31808
  `${calleeId}() must be called at the top level of a component or hook (no loops/conditions/nested functions)`
31224
31809
  );
@@ -31399,7 +31984,8 @@ or extract the nested logic into a custom hook (useXxx).`
31399
31984
  {
31400
31985
  dev,
31401
31986
  fileName,
31402
- onWarn: warn
31987
+ onWarn: warn,
31988
+ reactiveScopes: reactiveScopesSet
31403
31989
  }
31404
31990
  );
31405
31991
  const optimized = optionsWithWarnings.optimize ? optimizeHIR(hir, {
@@ -31432,6 +32018,7 @@ var createFictPlugin = declare(
31432
32018
  optimize: options.optimize ?? true,
31433
32019
  optimizeLevel: options.optimizeLevel ?? "safe",
31434
32020
  inlineDerivedMemos: options.inlineDerivedMemos ?? true,
32021
+ emitModuleMetadata: options.emitModuleMetadata ?? "auto",
31435
32022
  dev: options.dev ?? (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test")
31436
32023
  };
31437
32024
  return {