@angular/core 17.1.0-next.5 → 17.1.0-rc.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.
Files changed (74) hide show
  1. package/esm2022/primitives/signals/index.mjs +2 -2
  2. package/esm2022/primitives/signals/src/signal.mjs +2 -10
  3. package/esm2022/src/application/application_ref.mjs +21 -5
  4. package/esm2022/src/authoring/input.mjs +12 -5
  5. package/esm2022/src/authoring/input_signal.mjs +28 -1
  6. package/esm2022/src/authoring/input_signal_node.mjs +22 -0
  7. package/esm2022/src/authoring.mjs +1 -4
  8. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +56 -0
  9. package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
  10. package/esm2022/src/core.mjs +2 -2
  11. package/esm2022/src/core_private_export.mjs +2 -1
  12. package/esm2022/src/core_render3_private_export.mjs +2 -2
  13. package/esm2022/src/defer/dom_triggers.mjs +1 -5
  14. package/esm2022/src/di/inject_switch.mjs +2 -3
  15. package/esm2022/src/di/r3_injector.mjs +8 -6
  16. package/esm2022/src/errors.mjs +1 -1
  17. package/esm2022/src/hydration/utils.mjs +2 -2
  18. package/esm2022/src/hydration/views.mjs +2 -2
  19. package/esm2022/src/linker/view_container_ref.mjs +2 -2
  20. package/esm2022/src/metadata/directives.mjs +1 -1
  21. package/esm2022/src/render3/after_render_hooks.mjs +15 -33
  22. package/esm2022/src/render3/apply_value_input_field.mjs +16 -0
  23. package/esm2022/src/render3/collect_native_nodes.mjs +2 -3
  24. package/esm2022/src/render3/component_ref.mjs +13 -6
  25. package/esm2022/src/render3/debug/injector_profiler.mjs +1 -1
  26. package/esm2022/src/render3/definition.mjs +27 -68
  27. package/esm2022/src/render3/errors_di.mjs +4 -3
  28. package/esm2022/src/render3/features/host_directives_feature.mjs +2 -3
  29. package/esm2022/src/render3/features/inherit_definition_feature.mjs +31 -9
  30. package/esm2022/src/render3/features/input_transforms_feature.mjs +4 -5
  31. package/esm2022/src/render3/features/ng_onchanges_feature.mjs +4 -3
  32. package/esm2022/src/render3/instructions/advance.mjs +2 -2
  33. package/esm2022/src/render3/instructions/change_detection.mjs +1 -6
  34. package/esm2022/src/render3/instructions/listener.mjs +1 -1
  35. package/esm2022/src/render3/instructions/mark_view_dirty.mjs +2 -2
  36. package/esm2022/src/render3/instructions/shared.mjs +61 -58
  37. package/esm2022/src/render3/instructions/write_to_directive_input.mjs +43 -0
  38. package/esm2022/src/render3/interfaces/container.mjs +1 -6
  39. package/esm2022/src/render3/interfaces/definition.mjs +8 -2
  40. package/esm2022/src/render3/interfaces/node.mjs +1 -1
  41. package/esm2022/src/render3/jit/environment.mjs +3 -1
  42. package/esm2022/src/render3/node_manipulation.mjs +8 -8
  43. package/esm2022/src/render3/reactivity/effect.mjs +8 -6
  44. package/esm2022/src/render3/reactivity/signal.mjs +1 -1
  45. package/esm2022/src/render3/styling/style_binding_list.mjs +4 -4
  46. package/esm2022/src/render3/util/discovery_utils.mjs +37 -5
  47. package/esm2022/src/render3/util/global_utils.mjs +28 -28
  48. package/esm2022/src/render3/util/injector_discovery_utils.mjs +1 -1
  49. package/esm2022/src/render3/util/injector_utils.mjs +6 -5
  50. package/esm2022/src/render3/util/view_traversal_utils.mjs +3 -12
  51. package/esm2022/src/render3/util/view_utils.mjs +19 -15
  52. package/esm2022/src/testability/testability.mjs +3 -15
  53. package/esm2022/src/util/empty.mjs +1 -1
  54. package/esm2022/src/version.mjs +1 -1
  55. package/esm2022/testing/src/component_fixture.mjs +62 -58
  56. package/esm2022/testing/src/logger.mjs +3 -3
  57. package/fesm2022/core.mjs +527 -408
  58. package/fesm2022/core.mjs.map +1 -1
  59. package/fesm2022/primitives/signals.mjs +2 -10
  60. package/fesm2022/primitives/signals.mjs.map +1 -1
  61. package/fesm2022/rxjs-interop.mjs +1 -1
  62. package/fesm2022/testing.mjs +62 -58
  63. package/fesm2022/testing.mjs.map +1 -1
  64. package/index.d.ts +637 -230
  65. package/package.json +1 -1
  66. package/primitives/signals/index.d.ts +3 -4
  67. package/rxjs-interop/index.d.ts +1 -1
  68. package/schematics/migrations/block-template-entities/bundle.js +121 -116
  69. package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
  70. package/schematics/ng-generate/control-flow-migration/bundle.js +122 -117
  71. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  72. package/schematics/ng-generate/standalone-migration/bundle.js +414 -360
  73. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  74. package/testing/index.d.ts +6 -2
@@ -694,6 +694,12 @@ var ChangeDetectionStrategy;
694
694
  ChangeDetectionStrategy2[ChangeDetectionStrategy2["OnPush"] = 0] = "OnPush";
695
695
  ChangeDetectionStrategy2[ChangeDetectionStrategy2["Default"] = 1] = "Default";
696
696
  })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
697
+ var InputFlags;
698
+ (function(InputFlags2) {
699
+ InputFlags2[InputFlags2["None"] = 0] = "None";
700
+ InputFlags2[InputFlags2["SignalBased"] = 1] = "SignalBased";
701
+ InputFlags2[InputFlags2["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform";
702
+ })(InputFlags || (InputFlags = {}));
697
703
  var CUSTOM_ELEMENTS_SCHEMA = {
698
704
  name: "custom-elements"
699
705
  };
@@ -1172,12 +1178,13 @@ var BinaryOperator;
1172
1178
  BinaryOperator2[BinaryOperator2["Modulo"] = 8] = "Modulo";
1173
1179
  BinaryOperator2[BinaryOperator2["And"] = 9] = "And";
1174
1180
  BinaryOperator2[BinaryOperator2["Or"] = 10] = "Or";
1175
- BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 11] = "BitwiseAnd";
1176
- BinaryOperator2[BinaryOperator2["Lower"] = 12] = "Lower";
1177
- BinaryOperator2[BinaryOperator2["LowerEquals"] = 13] = "LowerEquals";
1178
- BinaryOperator2[BinaryOperator2["Bigger"] = 14] = "Bigger";
1179
- BinaryOperator2[BinaryOperator2["BiggerEquals"] = 15] = "BiggerEquals";
1180
- BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 16] = "NullishCoalesce";
1181
+ BinaryOperator2[BinaryOperator2["BitwiseOr"] = 11] = "BitwiseOr";
1182
+ BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 12] = "BitwiseAnd";
1183
+ BinaryOperator2[BinaryOperator2["Lower"] = 13] = "Lower";
1184
+ BinaryOperator2[BinaryOperator2["LowerEquals"] = 14] = "LowerEquals";
1185
+ BinaryOperator2[BinaryOperator2["Bigger"] = 15] = "Bigger";
1186
+ BinaryOperator2[BinaryOperator2["BiggerEquals"] = 16] = "BiggerEquals";
1187
+ BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 17] = "NullishCoalesce";
1181
1188
  })(BinaryOperator || (BinaryOperator = {}));
1182
1189
  function nullSafeIsEquivalent(base, other) {
1183
1190
  if (base == null || other == null) {
@@ -1250,6 +1257,9 @@ var Expression = class {
1250
1257
  and(rhs, sourceSpan) {
1251
1258
  return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
1252
1259
  }
1260
+ bitwiseOr(rhs, sourceSpan, parens = true) {
1261
+ return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens);
1262
+ }
1253
1263
  bitwiseAnd(rhs, sourceSpan, parens = true) {
1254
1264
  return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
1255
1265
  }
@@ -3054,6 +3064,12 @@ var Identifiers = _Identifiers;
3054
3064
  moduleName: CORE
3055
3065
  };
3056
3066
  })();
3067
+ (() => {
3068
+ _Identifiers.InputFlags = {
3069
+ name: "\u0275\u0275InputFlags",
3070
+ moduleName: CORE
3071
+ };
3072
+ })();
3057
3073
  (() => {
3058
3074
  _Identifiers.sanitizeHtml = { name: "\u0275\u0275sanitizeHtml", moduleName: CORE };
3059
3075
  })();
@@ -3653,6 +3669,9 @@ var AbstractEmitterVisitor = class {
3653
3669
  case BinaryOperator.And:
3654
3670
  opStr = "&&";
3655
3671
  break;
3672
+ case BinaryOperator.BitwiseOr:
3673
+ opStr = "|";
3674
+ break;
3656
3675
  case BinaryOperator.BitwiseAnd:
3657
3676
  opStr = "&";
3658
3677
  break;
@@ -5170,7 +5189,7 @@ function asLiteral(value) {
5170
5189
  }
5171
5190
  return literal(value, INFERRED_TYPE);
5172
5191
  }
5173
- function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
5192
+ function conditionallyCreateDirectiveBindingLiteral(map, forInputs) {
5174
5193
  const keys = Object.getOwnPropertyNames(map);
5175
5194
  if (keys.length === 0) {
5176
5195
  return null;
@@ -5190,12 +5209,25 @@ function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
5190
5209
  minifiedName = key;
5191
5210
  declaredName = value.classPropertyName;
5192
5211
  publicName = value.bindingPropertyName;
5193
- if (keepDeclared && (publicName !== declaredName || value.transformFunction != null)) {
5194
- const expressionKeys = [asLiteral(publicName), asLiteral(declaredName)];
5195
- if (value.transformFunction != null) {
5196
- expressionKeys.push(value.transformFunction);
5212
+ const differentDeclaringName = publicName !== declaredName;
5213
+ const hasDecoratorInputTransform = value.transformFunction !== null;
5214
+ let flags = null;
5215
+ if (value.isSignal) {
5216
+ flags = bitwiseOrInputFlagsExpr(InputFlags.SignalBased, flags);
5217
+ }
5218
+ if (hasDecoratorInputTransform) {
5219
+ flags = bitwiseOrInputFlagsExpr(InputFlags.HasDecoratorInputTransform, flags);
5220
+ }
5221
+ if (forInputs && (differentDeclaringName || hasDecoratorInputTransform || flags !== null)) {
5222
+ const flagsExpr = flags != null ? flags : importExpr(Identifiers.InputFlags).prop(InputFlags[InputFlags.None]);
5223
+ const result = [flagsExpr, asLiteral(publicName)];
5224
+ if (differentDeclaringName || hasDecoratorInputTransform) {
5225
+ result.push(asLiteral(declaredName));
5226
+ if (hasDecoratorInputTransform) {
5227
+ result.push(value.transformFunction);
5228
+ }
5197
5229
  }
5198
- expressionValue = literalArr(expressionKeys);
5230
+ expressionValue = literalArr(result);
5199
5231
  } else {
5200
5232
  expressionValue = asLiteral(publicName);
5201
5233
  }
@@ -5207,6 +5239,15 @@ function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
5207
5239
  };
5208
5240
  }));
5209
5241
  }
5242
+ function getInputFlagExpr(flag) {
5243
+ return importExpr(Identifiers.InputFlags).prop(InputFlags[flag]);
5244
+ }
5245
+ function bitwiseOrInputFlagsExpr(flag, expr) {
5246
+ if (expr === null) {
5247
+ return getInputFlagExpr(flag);
5248
+ }
5249
+ return getInputFlagExpr(flag).bitwiseOr(expr);
5250
+ }
5210
5251
  function trimTrailingNulls(parameters) {
5211
5252
  while (isNull(parameters[parameters.length - 1])) {
5212
5253
  parameters.pop();
@@ -8082,13 +8123,6 @@ var DeferTriggerKind;
8082
8123
  DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
8083
8124
  DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
8084
8125
  })(DeferTriggerKind || (DeferTriggerKind = {}));
8085
- var DerivedRepeaterVarIdentity;
8086
- (function(DerivedRepeaterVarIdentity2) {
8087
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
8088
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
8089
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
8090
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
8091
- })(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
8092
8126
  var I18nContextKind;
8093
8127
  (function(I18nContextKind2) {
8094
8128
  I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
@@ -8243,10 +8277,11 @@ function createClassMapOp(xref, expression, sourceSpan) {
8243
8277
  sourceSpan
8244
8278
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
8245
8279
  }
8246
- function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
8280
+ function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
8247
8281
  return __spreadValues(__spreadValues(__spreadValues({
8248
8282
  kind: OpKind.Attribute,
8249
8283
  target,
8284
+ namespace,
8250
8285
  name,
8251
8286
  expression,
8252
8287
  securityContext,
@@ -8901,27 +8936,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
8901
8936
  }
8902
8937
  }
8903
8938
  };
8904
- var DerivedRepeaterVarExpr = class extends ExpressionBase {
8905
- constructor(xref, identity) {
8906
- super();
8907
- this.xref = xref;
8908
- this.identity = identity;
8909
- this.kind = ExpressionKind.DerivedRepeaterVar;
8910
- }
8911
- transformInternalExpressions(transform2, flags) {
8912
- }
8913
- visitExpression(visitor, context) {
8914
- }
8915
- isEquivalent(e) {
8916
- return e instanceof DerivedRepeaterVarExpr && e.identity === this.identity && e.xref === this.xref;
8917
- }
8918
- isConstant() {
8919
- return false;
8920
- }
8921
- clone() {
8922
- return new DerivedRepeaterVarExpr(this.xref, this.identity);
8923
- }
8924
- };
8925
8939
  var ConstCollectedExpr = class extends ExpressionBase {
8926
8940
  constructor(expr) {
8927
8941
  super();
@@ -9527,11 +9541,12 @@ function createProjectionOp(xref, selector, i18nPlaceholder, sourceSpan) {
9527
9541
  sourceSpan
9528
9542
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
9529
9543
  }
9530
- function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
9544
+ function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
9531
9545
  return __spreadValues({
9532
9546
  kind: OpKind.ExtractedAttribute,
9533
9547
  target,
9534
9548
  bindingKind,
9549
+ namespace,
9535
9550
  name,
9536
9551
  expression,
9537
9552
  i18nContext,
@@ -9926,6 +9941,7 @@ function extractAttributes(job) {
9926
9941
  createExtractedAttributeOp(
9927
9942
  op.target,
9928
9943
  bindingKind,
9944
+ null,
9929
9945
  op.name,
9930
9946
  null,
9931
9947
  null,
@@ -9942,6 +9958,7 @@ function extractAttributes(job) {
9942
9958
  OpList.insertBefore(createExtractedAttributeOp(
9943
9959
  op.target,
9944
9960
  BindingKind.Property,
9961
+ null,
9945
9962
  op.name,
9946
9963
  null,
9947
9964
  null,
@@ -9955,6 +9972,7 @@ function extractAttributes(job) {
9955
9972
  const extractedAttributeOp = createExtractedAttributeOp(
9956
9973
  op.target,
9957
9974
  BindingKind.Property,
9975
+ null,
9958
9976
  op.name,
9959
9977
  null,
9960
9978
  null,
@@ -9991,7 +10009,7 @@ function extractAttributeOp(unit, op, elements) {
9991
10009
  extractable && (extractable = op.isTextAttribute);
9992
10010
  }
9993
10011
  if (extractable) {
9994
- const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
10012
+ const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9995
10013
  if (unit.job.kind === CompilationJobKind.Host) {
9996
10014
  unit.create.push(extractedAttributeOp);
9997
10015
  } else {
@@ -10032,7 +10050,8 @@ function specializeBindings(job) {
10032
10050
  const target = lookupElement2(elements, op.target);
10033
10051
  target.nonBindable = true;
10034
10052
  } else {
10035
- OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
10053
+ const [namespace, name] = splitNsName(op.name);
10054
+ OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
10036
10055
  }
10037
10056
  break;
10038
10057
  case BindingKind.Property:
@@ -10172,6 +10191,7 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
10172
10191
  ["&&", BinaryOperator.And],
10173
10192
  [">", BinaryOperator.Bigger],
10174
10193
  [">=", BinaryOperator.BiggerEquals],
10194
+ ["|", BinaryOperator.BitwiseOr],
10175
10195
  ["&", BinaryOperator.BitwiseAnd],
10176
10196
  ["/", BinaryOperator.Divide],
10177
10197
  ["==", BinaryOperator.Equals],
@@ -10225,7 +10245,7 @@ function collectElementConsts(job) {
10225
10245
  if (op.kind === OpKind.ExtractedAttribute) {
10226
10246
  const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
10227
10247
  allElementAttributes.set(op.target, attributes);
10228
- attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
10248
+ attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);
10229
10249
  OpList.remove(op);
10230
10250
  }
10231
10251
  }
@@ -10313,7 +10333,7 @@ var ElementAttributes = class {
10313
10333
  nameToValue.add(name);
10314
10334
  return false;
10315
10335
  }
10316
- add(kind, name, value, trustedValueFn) {
10336
+ add(kind, name, value, namespace, trustedValueFn) {
10317
10337
  var _a2;
10318
10338
  const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
10319
10339
  if (!allowDuplicates && this.isKnown(kind, name, value)) {
@@ -10326,7 +10346,7 @@ var ElementAttributes = class {
10326
10346
  this.projectAs = value.value.toString();
10327
10347
  }
10328
10348
  const array = this.arrayFor(kind);
10329
- array.push(...getAttributeNameLiterals(name));
10349
+ array.push(...getAttributeNameLiterals(namespace, name));
10330
10350
  if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
10331
10351
  if (value === null) {
10332
10352
  throw Error("Attribute, i18n attribute, & style element attributes must have a value");
@@ -10348,15 +10368,10 @@ var ElementAttributes = class {
10348
10368
  return this.byKind.get(kind);
10349
10369
  }
10350
10370
  };
10351
- function getAttributeNameLiterals(name) {
10352
- const [attributeNamespace, attributeName] = splitNsName(name, false);
10353
- const nameLiteral = literal(attributeName);
10354
- if (attributeNamespace) {
10355
- return [
10356
- literal(0),
10357
- literal(attributeNamespace),
10358
- nameLiteral
10359
- ];
10371
+ function getAttributeNameLiterals(namespace, name) {
10372
+ const nameLiteral = literal(name);
10373
+ if (namespace) {
10374
+ return [literal(0), literal(namespace), nameLiteral];
10360
10375
  }
10361
10376
  return [nameLiteral];
10362
10377
  }
@@ -11147,7 +11162,7 @@ function parseHostStyleProperties(job) {
11147
11162
  if (op.name.startsWith(STYLE_DOT)) {
11148
11163
  op.bindingKind = BindingKind.StyleProperty;
11149
11164
  op.name = op.name.substring(STYLE_DOT.length);
11150
- if (isCssCustomProperty(op.name)) {
11165
+ if (!isCssCustomProperty(op.name)) {
11151
11166
  op.name = hyphenate(op.name);
11152
11167
  }
11153
11168
  const { property: property2, suffix } = parseProperty(op.name);
@@ -17797,13 +17812,13 @@ function parseExtractedStyles(job) {
17797
17812
  if (op.name === "style") {
17798
17813
  const parsedStyles = parse(op.expression.value);
17799
17814
  for (let i = 0; i < parsedStyles.length - 1; i += 2) {
17800
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
17815
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
17801
17816
  }
17802
17817
  OpList.remove(op);
17803
17818
  } else if (op.name === "class") {
17804
17819
  const parsedClasses = op.expression.value.trim().split(/\s+/g);
17805
17820
  for (const parsedClass of parsedClasses) {
17806
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
17821
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);
17807
17822
  }
17808
17823
  OpList.remove(op);
17809
17824
  }
@@ -18129,9 +18144,7 @@ function namespaceMath() {
18129
18144
  return call(Identifiers.namespaceMathML, [], null);
18130
18145
  }
18131
18146
  function advance(delta, sourceSpan) {
18132
- return call(Identifiers.advance, [
18133
- literal(delta)
18134
- ], sourceSpan);
18147
+ return call(Identifiers.advance, delta > 1 ? [literal(delta)] : [], sourceSpan);
18135
18148
  }
18136
18149
  function reference(slot) {
18137
18150
  return importExpr(Identifiers.reference).callFn([
@@ -18275,10 +18288,13 @@ function property(name, expression, sanitizer, sourceSpan) {
18275
18288
  }
18276
18289
  return call(Identifiers.property, args, sourceSpan);
18277
18290
  }
18278
- function attribute(name, expression, sanitizer) {
18291
+ function attribute(name, expression, sanitizer, namespace) {
18279
18292
  const args = [literal(name), expression];
18280
- if (sanitizer !== null) {
18281
- args.push(sanitizer);
18293
+ if (sanitizer !== null || namespace !== null) {
18294
+ args.push(sanitizer != null ? sanitizer : literal(null));
18295
+ }
18296
+ if (namespace !== null) {
18297
+ args.push(literal(namespace));
18282
18298
  }
18283
18299
  return call(Identifiers.attribute, args, null);
18284
18300
  }
@@ -18791,7 +18807,7 @@ function reifyUpdateOperations(_unit, ops) {
18791
18807
  if (op.expression instanceof Interpolation2) {
18792
18808
  OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));
18793
18809
  } else {
18794
- OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));
18810
+ OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
18795
18811
  }
18796
18812
  break;
18797
18813
  case OpKind.HostProperty:
@@ -18960,38 +18976,6 @@ function removeUnusedI18nAttributesOps(job) {
18960
18976
  }
18961
18977
  }
18962
18978
 
18963
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
18964
- function generateRepeaterDerivedVars(job) {
18965
- const repeaters = /* @__PURE__ */ new Map();
18966
- for (const unit of job.units) {
18967
- for (const op of unit.ops()) {
18968
- if (op.kind === OpKind.RepeaterCreate) {
18969
- repeaters.set(op.xref, op);
18970
- }
18971
- }
18972
- }
18973
- for (const unit of job.units) {
18974
- for (const op of unit.ops()) {
18975
- transformExpressionsInOp(op, (expr) => {
18976
- if (!(expr instanceof DerivedRepeaterVarExpr)) {
18977
- return expr;
18978
- }
18979
- const repeaterOp = repeaters.get(expr.xref);
18980
- switch (expr.identity) {
18981
- case DerivedRepeaterVarIdentity.First:
18982
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
18983
- case DerivedRepeaterVarIdentity.Last:
18984
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
18985
- case DerivedRepeaterVarIdentity.Even:
18986
- return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18987
- case DerivedRepeaterVarIdentity.Odd:
18988
- return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18989
- }
18990
- }, VisitorContextFlag.None);
18991
- }
18992
- }
18993
- }
18994
-
18995
18979
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
18996
18980
  function resolveContexts(job) {
18997
18981
  for (const unit of job.units) {
@@ -20098,7 +20082,6 @@ var phases = [
20098
20082
  { kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
20099
20083
  { kind: CompilationJobKind.Both, fn: deleteAnyCasts },
20100
20084
  { kind: CompilationJobKind.Both, fn: resolveDollarEvent },
20101
- { kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
20102
20085
  { kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
20103
20086
  { kind: CompilationJobKind.Both, fn: resolveNames },
20104
20087
  { kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
@@ -20449,6 +20432,9 @@ function ingestIfBlock(unit, ifBlock) {
20449
20432
  }
20450
20433
  function ingestSwitchBlock(unit, switchBlock) {
20451
20434
  var _a2;
20435
+ if (switchBlock.cases.length === 0) {
20436
+ return;
20437
+ }
20452
20438
  let firstXref = null;
20453
20439
  let firstSlotHandle = null;
20454
20440
  let conditions = [];
@@ -20593,21 +20579,37 @@ function ingestIcu(unit, icu) {
20593
20579
  function ingestForBlock(unit, forBlock) {
20594
20580
  var _a2, _b2, _c2;
20595
20581
  const repeaterView = unit.job.allocateView(unit.xref);
20596
- const createRepeaterAlias = (ident, repeaterVar) => {
20597
- repeaterView.aliases.add({
20598
- kind: SemanticVariableKind.Alias,
20599
- name: null,
20600
- identifier: ident,
20601
- expression: new DerivedRepeaterVarExpr(repeaterView.xref, repeaterVar)
20602
- });
20603
- };
20604
20582
  repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
20605
20583
  repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
20606
20584
  repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
20607
- createRepeaterAlias(forBlock.contextVariables.$first.name, DerivedRepeaterVarIdentity.First);
20608
- createRepeaterAlias(forBlock.contextVariables.$last.name, DerivedRepeaterVarIdentity.Last);
20609
- createRepeaterAlias(forBlock.contextVariables.$even.name, DerivedRepeaterVarIdentity.Even);
20610
- createRepeaterAlias(forBlock.contextVariables.$odd.name, DerivedRepeaterVarIdentity.Odd);
20585
+ const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
20586
+ const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
20587
+ repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
20588
+ repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
20589
+ repeaterView.aliases.add({
20590
+ kind: SemanticVariableKind.Alias,
20591
+ name: null,
20592
+ identifier: forBlock.contextVariables.$first.name,
20593
+ expression: new LexicalReadExpr(indexName).identical(literal(0))
20594
+ });
20595
+ repeaterView.aliases.add({
20596
+ kind: SemanticVariableKind.Alias,
20597
+ name: null,
20598
+ identifier: forBlock.contextVariables.$last.name,
20599
+ expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
20600
+ });
20601
+ repeaterView.aliases.add({
20602
+ kind: SemanticVariableKind.Alias,
20603
+ name: null,
20604
+ identifier: forBlock.contextVariables.$even.name,
20605
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
20606
+ });
20607
+ repeaterView.aliases.add({
20608
+ kind: SemanticVariableKind.Alias,
20609
+ name: null,
20610
+ identifier: forBlock.contextVariables.$odd.name,
20611
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
20612
+ });
20611
20613
  const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
20612
20614
  const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
20613
20615
  ingestNodes(repeaterView, forBlock.children);
@@ -20809,7 +20811,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
20809
20811
  }
20810
20812
  if (templateKind === TemplateKind.Structural && output.type !== 1) {
20811
20813
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
20812
- unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
20814
+ unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
20813
20815
  }
20814
20816
  }
20815
20817
  if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
@@ -20820,7 +20822,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
20820
20822
  const isTextBinding = typeof value === "string";
20821
20823
  if (templateKind === TemplateKind.Structural) {
20822
20824
  if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
20823
- return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
20825
+ return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
20824
20826
  }
20825
20827
  if (!isTextBinding && (type === 1 || type === 4)) {
20826
20828
  return null;
@@ -23679,6 +23681,9 @@ var TemplateDefinitionBuilder = class {
23679
23681
  this.updateInstructionWithAdvance(containerIndex, block.branches[0].sourceSpan, Identifiers.conditional, paramsCallback);
23680
23682
  }
23681
23683
  visitSwitchBlock(block) {
23684
+ if (block.cases.length === 0) {
23685
+ return;
23686
+ }
23682
23687
  const caseData = block.cases.map((currentCase) => {
23683
23688
  const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
23684
23689
  const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
@@ -24006,7 +24011,7 @@ var TemplateDefinitionBuilder = class {
24006
24011
  if (delta < 1) {
24007
24012
  throw new Error("advance instruction can only go forwards");
24008
24013
  }
24009
- this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
24014
+ this.instructionFn(this._updateCodeFns, span, Identifiers.advance, delta > 1 ? [literal(delta)] : []);
24010
24015
  this._currentIndex = nodeIndex;
24011
24016
  }
24012
24017
  }
@@ -26096,7 +26101,7 @@ function convertDirectiveFacadeToMetadata(facade) {
26096
26101
  bindingPropertyName: ann.alias || field,
26097
26102
  classPropertyName: field,
26098
26103
  required: ann.required || false,
26099
- isSignal: false,
26104
+ isSignal: !!ann.isSignal,
26100
26105
  transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null
26101
26106
  };
26102
26107
  } else if (isOutput(ann)) {
@@ -26450,7 +26455,7 @@ function publishFacade(global) {
26450
26455
  }
26451
26456
 
26452
26457
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
26453
- var VERSION2 = new Version("17.1.0-next.5");
26458
+ var VERSION2 = new Version("17.1.0-rc.0");
26454
26459
 
26455
26460
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
26456
26461
  var _I18N_ATTR = "i18n";
@@ -27516,7 +27521,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
27516
27521
  function compileDeclareClassMetadata(metadata) {
27517
27522
  const definitionMap = new DefinitionMap();
27518
27523
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
27519
- definitionMap.set("version", literal("17.1.0-next.5"));
27524
+ definitionMap.set("version", literal("17.1.0-rc.0"));
27520
27525
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27521
27526
  definitionMap.set("type", metadata.type);
27522
27527
  definitionMap.set("decorators", metadata.decorators);
@@ -27585,7 +27590,7 @@ function createDirectiveDefinitionMap(meta) {
27585
27590
  const definitionMap = new DefinitionMap();
27586
27591
  const minVersion = getMinimumVersionForPartialOutput(meta);
27587
27592
  definitionMap.set("minVersion", literal(minVersion));
27588
- definitionMap.set("version", literal("17.1.0-next.5"));
27593
+ definitionMap.set("version", literal("17.1.0-rc.0"));
27589
27594
  definitionMap.set("type", meta.type.value);
27590
27595
  if (meta.isStandalone) {
27591
27596
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -27623,8 +27628,8 @@ function createDirectiveDefinitionMap(meta) {
27623
27628
  }
27624
27629
  function getMinimumVersionForPartialOutput(meta) {
27625
27630
  let minVersion = "14.0.0";
27626
- const hasTransformFunctions = Object.values(meta.inputs).some((input) => input.transformFunction !== null);
27627
- if (hasTransformFunctions) {
27631
+ const hasDecoratorTransformFunctions = Object.values(meta.inputs).some((input) => input.transformFunction !== null);
27632
+ if (hasDecoratorTransformFunctions) {
27628
27633
  minVersion = "16.1.0";
27629
27634
  }
27630
27635
  if (needsNewInputPartialOutput(meta)) {
@@ -27878,7 +27883,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
27878
27883
  function compileDeclareFactoryFunction(meta) {
27879
27884
  const definitionMap = new DefinitionMap();
27880
27885
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
27881
- definitionMap.set("version", literal("17.1.0-next.5"));
27886
+ definitionMap.set("version", literal("17.1.0-rc.0"));
27882
27887
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27883
27888
  definitionMap.set("type", meta.type.value);
27884
27889
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -27901,7 +27906,7 @@ function compileDeclareInjectableFromMetadata(meta) {
27901
27906
  function createInjectableDefinitionMap(meta) {
27902
27907
  const definitionMap = new DefinitionMap();
27903
27908
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
27904
- definitionMap.set("version", literal("17.1.0-next.5"));
27909
+ definitionMap.set("version", literal("17.1.0-rc.0"));
27905
27910
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27906
27911
  definitionMap.set("type", meta.type.value);
27907
27912
  if (meta.providedIn !== void 0) {
@@ -27939,7 +27944,7 @@ function compileDeclareInjectorFromMetadata(meta) {
27939
27944
  function createInjectorDefinitionMap(meta) {
27940
27945
  const definitionMap = new DefinitionMap();
27941
27946
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
27942
- definitionMap.set("version", literal("17.1.0-next.5"));
27947
+ definitionMap.set("version", literal("17.1.0-rc.0"));
27943
27948
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27944
27949
  definitionMap.set("type", meta.type.value);
27945
27950
  definitionMap.set("providers", meta.providers);
@@ -27963,7 +27968,7 @@ function createNgModuleDefinitionMap(meta) {
27963
27968
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
27964
27969
  }
27965
27970
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
27966
- definitionMap.set("version", literal("17.1.0-next.5"));
27971
+ definitionMap.set("version", literal("17.1.0-rc.0"));
27967
27972
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27968
27973
  definitionMap.set("type", meta.type.value);
27969
27974
  if (meta.bootstrap.length > 0) {
@@ -27998,7 +28003,7 @@ function compileDeclarePipeFromMetadata(meta) {
27998
28003
  function createPipeDefinitionMap(meta) {
27999
28004
  const definitionMap = new DefinitionMap();
28000
28005
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
28001
- definitionMap.set("version", literal("17.1.0-next.5"));
28006
+ definitionMap.set("version", literal("17.1.0-rc.0"));
28002
28007
  definitionMap.set("ngImport", importExpr(Identifiers.core));
28003
28008
  definitionMap.set("type", meta.type.value);
28004
28009
  if (meta.isStandalone) {
@@ -28015,7 +28020,7 @@ function createPipeDefinitionMap(meta) {
28015
28020
  publishFacade(_global);
28016
28021
 
28017
28022
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
28018
- var VERSION3 = new Version("17.1.0-next.5");
28023
+ var VERSION3 = new Version("17.1.0-rc.0");
28019
28024
 
28020
28025
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
28021
28026
  var EmitFlags;
@@ -28152,6 +28157,9 @@ var ErrorCode;
28152
28157
  ErrorCode2[ErrorCode2["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
28153
28158
  ErrorCode2[ErrorCode2["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
28154
28159
  ErrorCode2[ErrorCode2["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
28160
+ ErrorCode2[ErrorCode2["SIGNAL_INPUT_AND_DISALLOWED_DECORATOR"] = 1050] = "SIGNAL_INPUT_AND_DISALLOWED_DECORATOR";
28161
+ ErrorCode2[ErrorCode2["SIGNAL_INPUT_AND_INPUTS_ARRAY_COLLISION"] = 1051] = "SIGNAL_INPUT_AND_INPUTS_ARRAY_COLLISION";
28162
+ ErrorCode2[ErrorCode2["INPUT_DECLARED_ON_STATIC_MEMBER"] = 1100] = "INPUT_DECLARED_ON_STATIC_MEMBER";
28155
28163
  ErrorCode2[ErrorCode2["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
28156
28164
  ErrorCode2[ErrorCode2["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
28157
28165
  ErrorCode2[ErrorCode2["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
@@ -30431,7 +30439,7 @@ var DtsMetadataReader = class {
30431
30439
  const inputs = ClassPropertyMapping.fromMappedObject(readInputsType(def.type.typeArguments[3]));
30432
30440
  const outputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[4], readStringType));
30433
30441
  const hostDirectives = def.type.typeArguments.length > 8 ? readHostDirectivesType(this.checker, def.type.typeArguments[8], ref.bestGuessOwningModule) : null;
30434
- const isSignal = def.type.typeArguments.length > 9 && ((_b2 = readBooleanType(def.type.typeArguments[9])) != null ? _b2 : false);
30442
+ const isSignal2 = def.type.typeArguments.length > 9 && ((_b2 = readBooleanType(def.type.typeArguments[9])) != null ? _b2 : false);
30435
30443
  return __spreadProps(__spreadValues({
30436
30444
  kind: MetaKind.Directive,
30437
30445
  matchSource: MatchSource.Selector,
@@ -30451,7 +30459,7 @@ var DtsMetadataReader = class {
30451
30459
  animationTriggerNames: null,
30452
30460
  ngContentSelectors,
30453
30461
  isStandalone,
30454
- isSignal,
30462
+ isSignal: isSignal2,
30455
30463
  imports: null,
30456
30464
  schemas: null,
30457
30465
  decorator: null,
@@ -33745,15 +33753,16 @@ var Context = class {
33745
33753
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager.mjs
33746
33754
  var import_typescript41 = __toESM(require("typescript"), 1);
33747
33755
  var ImportManager = class {
33748
- constructor(rewriter = new NoopImportRewriter(), prefix = "i") {
33756
+ constructor(rewriter = new NoopImportRewriter(), prefix = "i", factory9 = import_typescript41.default.factory) {
33749
33757
  this.rewriter = rewriter;
33750
33758
  this.prefix = prefix;
33759
+ this.factory = factory9;
33751
33760
  this.specifierToIdentifier = /* @__PURE__ */ new Map();
33752
33761
  this.nextIndex = 0;
33753
33762
  }
33754
33763
  generateNamespaceImport(moduleName) {
33755
33764
  if (!this.specifierToIdentifier.has(moduleName)) {
33756
- this.specifierToIdentifier.set(moduleName, import_typescript41.default.factory.createIdentifier(`${this.prefix}${this.nextIndex++}`));
33765
+ this.specifierToIdentifier.set(moduleName, this.factory.createIdentifier(`${this.prefix}${this.nextIndex++}`));
33757
33766
  }
33758
33767
  return this.specifierToIdentifier.get(moduleName);
33759
33768
  }
@@ -33788,6 +33797,7 @@ var BINARY_OPERATORS3 = /* @__PURE__ */ new Map([
33788
33797
  [BinaryOperator.Bigger, ">"],
33789
33798
  [BinaryOperator.BiggerEquals, ">="],
33790
33799
  [BinaryOperator.BitwiseAnd, "&"],
33800
+ [BinaryOperator.BitwiseOr, "|"],
33791
33801
  [BinaryOperator.Divide, "/"],
33792
33802
  [BinaryOperator.Equals, "=="],
33793
33803
  [BinaryOperator.Identical, "==="],
@@ -34334,6 +34344,7 @@ var BINARY_OPERATORS4 = {
34334
34344
  ">": import_typescript45.default.SyntaxKind.GreaterThanToken,
34335
34345
  ">=": import_typescript45.default.SyntaxKind.GreaterThanEqualsToken,
34336
34346
  "&": import_typescript45.default.SyntaxKind.AmpersandToken,
34347
+ "|": import_typescript45.default.SyntaxKind.BarToken,
34337
34348
  "/": import_typescript45.default.SyntaxKind.SlashToken,
34338
34349
  "==": import_typescript45.default.SyntaxKind.EqualsEqualsToken,
34339
34350
  "===": import_typescript45.default.SyntaxKind.EqualsEqualsEqualsToken,
@@ -34523,18 +34534,18 @@ function translateStatement(statement, imports, options = {}) {
34523
34534
 
34524
34535
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
34525
34536
  var import_typescript46 = __toESM(require("typescript"), 1);
34526
- function addImports(importManager, sf, extraStatements = []) {
34537
+ function addImports(factory9 = import_typescript46.default.factory, importManager, sf, extraStatements = []) {
34527
34538
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
34528
- const qualifier = import_typescript46.default.factory.createIdentifier(i.qualifier.text);
34529
- const importClause = import_typescript46.default.factory.createImportClause(
34539
+ const qualifier = factory9.createIdentifier(i.qualifier.text);
34540
+ const importClause = factory9.createImportClause(
34530
34541
  false,
34531
34542
  void 0,
34532
- import_typescript46.default.factory.createNamespaceImport(qualifier)
34543
+ factory9.createNamespaceImport(qualifier)
34533
34544
  );
34534
- const decl = import_typescript46.default.factory.createImportDeclaration(
34545
+ const decl = factory9.createImportDeclaration(
34535
34546
  void 0,
34536
34547
  importClause,
34537
- import_typescript46.default.factory.createStringLiteral(i.specifier)
34548
+ factory9.createStringLiteral(i.specifier)
34538
34549
  );
34539
34550
  import_typescript46.default.setOriginalNode(i.qualifier, decl);
34540
34551
  return decl;
@@ -34542,8 +34553,8 @@ function addImports(importManager, sf, extraStatements = []) {
34542
34553
  const existingImports = sf.statements.filter((stmt) => isImportStatement(stmt));
34543
34554
  const body = sf.statements.filter((stmt) => !isImportStatement(stmt));
34544
34555
  if (addedImports.length > 0) {
34545
- const fileoverviewAnchorStmt = import_typescript46.default.factory.createNotEmittedStatement(sf);
34546
- return import_typescript46.default.factory.updateSourceFile(sf, import_typescript46.default.factory.createNodeArray([
34556
+ const fileoverviewAnchorStmt = factory9.createNotEmittedStatement(sf);
34557
+ return factory9.updateSourceFile(sf, factory9.createNodeArray([
34547
34558
  fileoverviewAnchorStmt,
34548
34559
  ...existingImports,
34549
34560
  ...addedImports,
@@ -34616,7 +34627,7 @@ var DtsTransformer = class {
34616
34627
  }
34617
34628
  };
34618
34629
  sf = import_typescript47.default.visitNode(sf, visitor, import_typescript47.default.isSourceFile) || sf;
34619
- return addImports(imports, sf);
34630
+ return addImports(this.ctx.factory, imports, sf);
34620
34631
  }
34621
34632
  transformClassDeclaration(clazz, transforms, imports) {
34622
34633
  let elements = clazz.members;
@@ -34926,7 +34937,7 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
34926
34937
  annotateForClosureCompiler: isClosureCompilerEnabled
34927
34938
  }));
34928
34939
  const fileOverviewMeta = isClosureCompilerEnabled ? getFileOverviewComment(sf.statements) : null;
34929
- sf = addImports(importManager, sf, constants);
34940
+ sf = addImports(context.factory, importManager, sf, constants);
34930
34941
  if (fileOverviewMeta !== null) {
34931
34942
  setFileOverviewComment(sf, fileOverviewMeta);
34932
34943
  }
@@ -35006,7 +35017,7 @@ function tryParseInputInitializerAndOptions(member, reflector, coreModule) {
35006
35017
  if (target === null) {
35007
35018
  return null;
35008
35019
  }
35009
- if (target.text === "input" || target.text === "\u0275input") {
35020
+ if (target.text === "input") {
35010
35021
  if (!isReferenceToInputFunction(target, coreModule, reflector)) {
35011
35022
  return null;
35012
35023
  }
@@ -35037,14 +35048,46 @@ function extractPropertyTarget(node) {
35037
35048
  return null;
35038
35049
  }
35039
35050
  function isReferenceToInputFunction(target, coreModule, reflector) {
35040
- const decl = reflector.getDeclarationOfIdentifier(target);
35041
- if (decl === null || !import_typescript50.default.isVariableDeclaration(decl.node) || decl.node.name === void 0 || !import_typescript50.default.isIdentifier(decl.node.name)) {
35042
- return false;
35051
+ let targetImport = reflector.getImportOfIdentifier(target);
35052
+ if (targetImport === null) {
35053
+ if (coreModule !== void 0) {
35054
+ return false;
35055
+ }
35056
+ targetImport = { name: target.text };
35043
35057
  }
35044
- if (coreModule !== void 0 && decl.viaModule !== coreModule) {
35045
- return false;
35058
+ return targetImport.name === "input";
35059
+ }
35060
+ function parseAndValidateOptions(optionsNode) {
35061
+ if (!import_typescript50.default.isObjectLiteralExpression(optionsNode)) {
35062
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal that is statically analyzable.");
35046
35063
  }
35047
- return decl.node.name.text === "input" || decl.node.name.text === "\u0275input";
35064
+ const options = reflectObjectLiteral(optionsNode);
35065
+ let alias = void 0;
35066
+ if (options.has("alias")) {
35067
+ const aliasExpr = options.get("alias");
35068
+ if (!import_typescript50.default.isStringLiteralLike(aliasExpr)) {
35069
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, aliasExpr, "Alias needs to be a string that is statically analyzable.");
35070
+ }
35071
+ alias = aliasExpr.text;
35072
+ }
35073
+ return { alias };
35074
+ }
35075
+ function tryParseSignalInputMapping(member, reflector, coreModule) {
35076
+ var _a2;
35077
+ const signalInput = tryParseInputInitializerAndOptions(member, reflector, coreModule);
35078
+ if (signalInput === null) {
35079
+ return null;
35080
+ }
35081
+ const optionsNode = signalInput.optionsNode;
35082
+ const options = optionsNode !== void 0 ? parseAndValidateOptions(optionsNode) : null;
35083
+ const classPropertyName = member.name;
35084
+ return {
35085
+ isSignal: true,
35086
+ classPropertyName,
35087
+ bindingPropertyName: (_a2 = options == null ? void 0 : options.alias) != null ? _a2 : classPropertyName,
35088
+ required: signalInput.isRequired,
35089
+ transform: null
35090
+ };
35048
35091
  }
35049
35092
 
35050
35093
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
@@ -35057,7 +35100,7 @@ var QUERY_TYPES = /* @__PURE__ */ new Set([
35057
35100
  ]);
35058
35101
  function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector = null) {
35059
35102
  let directive;
35060
- if (decorator === null || decorator.args === null || decorator.args.length === 0) {
35103
+ if (decorator.args === null || decorator.args.length === 0) {
35061
35104
  directive = /* @__PURE__ */ new Map();
35062
35105
  } else if (decorator.args.length !== 1) {
35063
35106
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @${decorator.name} decorator`);
@@ -35074,8 +35117,8 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
35074
35117
  const members = reflector.getMembersOfClass(clazz);
35075
35118
  const decoratedElements = members.filter((member) => !member.isStatic && member.decorators !== null);
35076
35119
  const coreModule = isCore ? void 0 : "@angular/core";
35077
- const inputsFromMeta = parseInputsArray2(clazz, directive, evaluator, reflector, refEmitter);
35078
- const inputsFromFields = parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule);
35120
+ const inputsFromMeta = parseInputsArray2(clazz, directive, evaluator, reflector, refEmitter, compilationMode);
35121
+ const inputsFromFields = parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule, compilationMode, inputsFromMeta, decorator);
35079
35122
  const inputs = ClassPropertyMapping.fromMappedObject(__spreadValues(__spreadValues({}, inputsFromMeta), inputsFromFields));
35080
35123
  const outputsFromMeta = parseOutputsArray(directive, evaluator);
35081
35124
  const outputsFromFields = parseOutputFields(filterToMembersWithDecorator(decoratedElements, "Output", coreModule), evaluator);
@@ -35127,14 +35170,14 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
35127
35170
  }
35128
35171
  isStandalone = resolved;
35129
35172
  }
35130
- let isSignal = false;
35173
+ let isSignal2 = false;
35131
35174
  if (directive.has("signals")) {
35132
35175
  const expr = directive.get("signals");
35133
35176
  const resolved = evaluator.evaluate(expr);
35134
35177
  if (typeof resolved !== "boolean") {
35135
35178
  throw createValueHasWrongTypeError(expr, resolved, `signals flag must be a boolean`);
35136
35179
  }
35137
- isSignal = resolved;
35180
+ isSignal2 = resolved;
35138
35181
  }
35139
35182
  const usesInheritance = reflector.hasBaseClass(clazz);
35140
35183
  const sourceFile = clazz.getSourceFile();
@@ -35164,7 +35207,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
35164
35207
  exportAs,
35165
35208
  providers,
35166
35209
  isStandalone,
35167
- isSignal,
35210
+ isSignal: isSignal2,
35168
35211
  hostDirectives: (hostDirectives == null ? void 0 : hostDirectives.map((hostDir) => toHostDirectiveMetadata(hostDir, sourceFile, refEmitter))) || null
35169
35212
  };
35170
35213
  return {
@@ -35412,7 +35455,7 @@ function parseDecoratedFields(fields, evaluator, callback) {
35412
35455
  }
35413
35456
  }
35414
35457
  }
35415
- function parseInputsArray2(clazz, decoratorMetadata, evaluator, reflector, refEmitter) {
35458
+ function parseInputsArray2(clazz, decoratorMetadata, evaluator, reflector, refEmitter, compilationMode) {
35416
35459
  const inputsField = decoratorMetadata.get("inputs");
35417
35460
  if (inputsField === void 0) {
35418
35461
  return {};
@@ -35446,7 +35489,7 @@ function parseInputsArray2(clazz, decoratorMetadata, evaluator, reflector, refEm
35446
35489
  if (!(transformValue instanceof DynamicValue) && !(transformValue instanceof Reference2)) {
35447
35490
  throw createValueHasWrongTypeError(inputsField, transformValue, `Transform of value at position ${i} of @Directive.inputs array must be a function`);
35448
35491
  }
35449
- transform2 = parseDecoratorInputTransformFunction(clazz, name, transformValue, reflector, refEmitter);
35492
+ transform2 = parseDecoratorInputTransformFunction(clazz, name, transformValue, reflector, refEmitter, compilationMode);
35450
35493
  }
35451
35494
  inputs[name] = {
35452
35495
  classPropertyName: name,
@@ -35476,9 +35519,13 @@ function tryGetDecoratorOnMember(member, decoratorName, coreModule) {
35476
35519
  }
35477
35520
  return null;
35478
35521
  }
35479
- function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter) {
35522
+ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter, compilationMode) {
35480
35523
  const classPropertyName = member.name;
35481
35524
  const decorator = tryGetDecoratorOnMember(member, "Input", coreModule);
35525
+ const signalInputMapping = tryParseSignalInputMapping(member, reflector, coreModule);
35526
+ if (decorator !== null && signalInputMapping !== null) {
35527
+ throw new FatalDiagnosticError(ErrorCode.SIGNAL_INPUT_AND_DISALLOWED_DECORATOR, decorator.node, `Using @Input with a signal input is not allowed.`);
35528
+ }
35482
35529
  if (decorator !== null) {
35483
35530
  if (decorator.args !== null && decorator.args.length > 1) {
35484
35531
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `@${decorator.name} can have at most one argument, got ${decorator.args.length} argument(s)`);
@@ -35502,7 +35549,7 @@ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModu
35502
35549
  if (!(transformValue instanceof DynamicValue) && !(transformValue instanceof Reference2)) {
35503
35550
  throw createValueHasWrongTypeError(optionsNode, transformValue, `Input transform must be a function`);
35504
35551
  }
35505
- transform2 = parseDecoratorInputTransformFunction(clazz, classPropertyName, transformValue, reflector, refEmitter);
35552
+ transform2 = parseDecoratorInputTransformFunction(clazz, classPropertyName, transformValue, reflector, refEmitter, compilationMode);
35506
35553
  }
35507
35554
  return {
35508
35555
  isSignal: false,
@@ -35512,40 +35559,42 @@ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModu
35512
35559
  required
35513
35560
  };
35514
35561
  }
35515
- const signalInput = tryParseInputInitializerAndOptions(member, reflector, coreModule);
35516
- if (signalInput !== null) {
35517
- const optionsNode = signalInput.optionsNode;
35518
- const options = optionsNode !== void 0 ? evaluator.evaluate(optionsNode) : null;
35519
- let bindingPropertyName = classPropertyName;
35520
- if (options instanceof Map && typeof options.get("alias") === "string") {
35521
- bindingPropertyName = options.get("alias");
35522
- }
35523
- return {
35524
- isSignal: true,
35525
- classPropertyName,
35526
- bindingPropertyName,
35527
- required: signalInput.isRequired,
35528
- transform: null
35529
- };
35562
+ if (signalInputMapping !== null) {
35563
+ return signalInputMapping;
35530
35564
  }
35531
35565
  return null;
35532
35566
  }
35533
- function parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule) {
35567
+ function parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule, compilationMode, inputsFromClassDecorator, classDecorator) {
35568
+ var _a2, _b2;
35534
35569
  const inputs = {};
35535
35570
  for (const member of members) {
35536
- if (member.isStatic) {
35571
+ const classPropertyName = member.name;
35572
+ const inputMapping = tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter, compilationMode);
35573
+ if (inputMapping === null) {
35537
35574
  continue;
35538
35575
  }
35539
- const classPropertyName = member.name;
35540
- const inputMapping = tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter);
35541
- if (inputMapping !== null) {
35542
- inputs[classPropertyName] = inputMapping;
35576
+ if (member.isStatic) {
35577
+ throw new FatalDiagnosticError(ErrorCode.INPUT_DECLARED_ON_STATIC_MEMBER, (_a2 = member.node) != null ? _a2 : clazz, `Input "${member.name}" is incorrectly declared as static member of "${clazz.name.text}".`);
35578
+ }
35579
+ if (inputMapping.isSignal && inputsFromClassDecorator.hasOwnProperty(classPropertyName)) {
35580
+ throw new FatalDiagnosticError(ErrorCode.SIGNAL_INPUT_AND_INPUTS_ARRAY_COLLISION, (_b2 = member.node) != null ? _b2 : clazz, `Input "${member.name}" is also declared as non-signal in @${classDecorator.name}.`);
35543
35581
  }
35582
+ inputs[classPropertyName] = inputMapping;
35544
35583
  }
35545
35584
  return inputs;
35546
35585
  }
35547
- function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, reflector, refEmitter) {
35586
+ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, reflector, refEmitter, compilationMode) {
35548
35587
  var _a2;
35588
+ if (compilationMode === CompilationMode.LOCAL) {
35589
+ const node2 = value instanceof Reference2 ? value.getIdentityIn(clazz.getSourceFile()) : value.node;
35590
+ if (node2 === null) {
35591
+ throw createValueHasWrongTypeError(value.node, value, "Input transform function could not be referenced");
35592
+ }
35593
+ return {
35594
+ node: node2,
35595
+ type: new Reference2(import_typescript51.default.factory.createKeywordTypeNode(import_typescript51.default.SyntaxKind.UnknownKeyword))
35596
+ };
35597
+ }
35549
35598
  const definition = reflector.getDefinitionOfFunction(value.node);
35550
35599
  if (definition === null) {
35551
35600
  throw createValueHasWrongTypeError(value.node, value, "Input transform must be a function");
@@ -41343,8 +41392,8 @@ function constructTypeCtorParameter(env, meta, rawType) {
41343
41392
  const plainKeys = [];
41344
41393
  const coercedKeys = [];
41345
41394
  const signalInputKeys = [];
41346
- for (const { classPropertyName, transform: transform2, isSignal } of meta.fields.inputs) {
41347
- if (isSignal) {
41395
+ for (const { classPropertyName, transform: transform2, isSignal: isSignal2 } of meta.fields.inputs) {
41396
+ if (isSignal2) {
41348
41397
  signalInputKeys.push(import_typescript85.default.factory.createLiteralTypeNode(import_typescript85.default.factory.createStringLiteral(classPropertyName)));
41349
41398
  } else if (!meta.coercedInputFields.has(classPropertyName)) {
41350
41399
  plainKeys.push(import_typescript85.default.factory.createLiteralTypeNode(import_typescript85.default.factory.createStringLiteral(classPropertyName)));
@@ -42431,7 +42480,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
42431
42480
  for (const attr of boundAttrs) {
42432
42481
  const expr = widenBinding(translateInput(attr.attribute, this.tcb, this.scope), this.tcb);
42433
42482
  let assignment = wrapForDiagnostics(expr);
42434
- for (const { fieldName, required, transformType, isSignal } of attr.inputs) {
42483
+ for (const { fieldName, required, transformType, isSignal: isSignal2 } of attr.inputs) {
42435
42484
  let target;
42436
42485
  if (required) {
42437
42486
  seenRequiredInputs.add(fieldName);
@@ -42471,7 +42520,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
42471
42520
  }
42472
42521
  target = this.dir.stringLiteralInputFields.has(fieldName) ? import_typescript91.default.factory.createElementAccessExpression(dirId, import_typescript91.default.factory.createStringLiteral(fieldName)) : import_typescript91.default.factory.createPropertyAccessExpression(dirId, import_typescript91.default.factory.createIdentifier(fieldName));
42473
42522
  }
42474
- if (isSignal) {
42523
+ if (isSignal2) {
42475
42524
  const inputSignalBrandWriteSymbol = this.tcb.env.referenceExternalSymbol(Identifiers.InputSignalBrandWriteType.moduleName, Identifiers.InputSignalBrandWriteType.name);
42476
42525
  if (!import_typescript91.default.isIdentifier(inputSignalBrandWriteSymbol) && !import_typescript91.default.isPropertyAccessExpression(inputSignalBrandWriteSymbol)) {
42477
42526
  throw new Error(`Expected identifier or property access for reference to ${Identifiers.InputSignalBrandWriteType.name}`);
@@ -45251,10 +45300,12 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
45251
45300
  return [];
45252
45301
  }
45253
45302
  };
45303
+ function isSignal(symbol) {
45304
+ return ((symbol == null ? void 0 : symbol.escapedName) === "WritableSignal" || (symbol == null ? void 0 : symbol.escapedName) === "Signal") && symbol.parent.escapedName.includes("@angular/core");
45305
+ }
45254
45306
  function buildDiagnosticForSignal(ctx, node, component) {
45255
- var _a2, _b2;
45256
45307
  const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
45257
- if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (((_a2 = symbol.tsType.symbol) == null ? void 0 : _a2.escapedName) === "WritableSignal" || ((_b2 = symbol.tsType.symbol) == null ? void 0 : _b2.escapedName) === "Signal") && symbol.tsType.symbol.parent.escapedName.includes("@angular/core")) {
45308
+ if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (isSignal(symbol.tsType.symbol) || isSignal(symbol.tsType.aliasSymbol))) {
45258
45309
  const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
45259
45310
  const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
45260
45311
  const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
@@ -46724,9 +46775,12 @@ var import_typescript106 = __toESM(require("typescript"), 1);
46724
46775
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
46725
46776
  var import_typescript105 = __toESM(require("typescript"), 1);
46726
46777
 
46727
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/downlevel_decorators_transform/downlevel_decorators_transform.mjs
46778
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/jit_transforms/downlevel_decorators_transform.mjs
46728
46779
  var import_typescript107 = __toESM(require("typescript"), 1);
46729
46780
 
46781
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/jit_transforms/signal_inputs_metadata_transform.mjs
46782
+ var import_typescript108 = __toESM(require("typescript"), 1);
46783
+
46730
46784
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/private/tooling.mjs
46731
46785
  var GLOBAL_DEFS_FOR_TERSER = {
46732
46786
  ngDevMode: false,
@@ -46760,14 +46814,14 @@ setFileSystem(new NodeJSFileSystem());
46760
46814
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/standalone-migration/index.mjs
46761
46815
  var import_fs2 = require("fs");
46762
46816
  var import_path8 = require("path");
46763
- var import_typescript120 = __toESM(require("typescript"), 1);
46817
+ var import_typescript121 = __toESM(require("typescript"), 1);
46764
46818
 
46765
46819
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
46766
- var import_typescript109 = __toESM(require("typescript"), 1);
46820
+ var import_typescript110 = __toESM(require("typescript"), 1);
46767
46821
 
46768
46822
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
46769
46823
  var import_path4 = require("path");
46770
- var import_typescript108 = __toESM(require("typescript"), 1);
46824
+ var import_typescript109 = __toESM(require("typescript"), 1);
46771
46825
  var ImportManager2 = class {
46772
46826
  constructor(getUpdateRecorder, printer) {
46773
46827
  __publicField(this, "getUpdateRecorder");
@@ -46790,7 +46844,7 @@ var ImportManager2 = class {
46790
46844
  }
46791
46845
  for (let i = sourceFile.statements.length - 1; i >= 0; i--) {
46792
46846
  const statement = sourceFile.statements[i];
46793
- if (!import_typescript108.default.isImportDeclaration(statement) || !import_typescript108.default.isStringLiteral(statement.moduleSpecifier) || !statement.importClause) {
46847
+ if (!import_typescript109.default.isImportDeclaration(statement) || !import_typescript109.default.isStringLiteral(statement.moduleSpecifier) || !statement.importClause) {
46794
46848
  continue;
46795
46849
  }
46796
46850
  if (importStartIndex === 0) {
@@ -46802,9 +46856,9 @@ var ImportManager2 = class {
46802
46856
  }
46803
46857
  if (statement.importClause.namedBindings) {
46804
46858
  const namedBindings = statement.importClause.namedBindings;
46805
- if (import_typescript108.default.isNamespaceImport(namedBindings) && !typeImport) {
46806
- return import_typescript108.default.factory.createPropertyAccessExpression(import_typescript108.default.factory.createIdentifier(namedBindings.name.text), import_typescript108.default.factory.createIdentifier(alias || symbolName || "default"));
46807
- } else if (import_typescript108.default.isNamedImports(namedBindings) && symbolName) {
46859
+ if (import_typescript109.default.isNamespaceImport(namedBindings) && !typeImport) {
46860
+ return import_typescript109.default.factory.createPropertyAccessExpression(import_typescript109.default.factory.createIdentifier(namedBindings.name.text), import_typescript109.default.factory.createIdentifier(alias || symbolName || "default"));
46861
+ } else if (import_typescript109.default.isNamedImports(namedBindings) && symbolName) {
46808
46862
  const existingElement = namedBindings.elements.find((e) => {
46809
46863
  if (alias) {
46810
46864
  return e.propertyName && e.name.text === alias && e.propertyName.text === symbolName;
@@ -46812,12 +46866,12 @@ var ImportManager2 = class {
46812
46866
  return e.propertyName ? e.propertyName.text === symbolName : e.name.text === symbolName;
46813
46867
  });
46814
46868
  if (existingElement) {
46815
- return import_typescript108.default.factory.createIdentifier(existingElement.name.text);
46869
+ return import_typescript109.default.factory.createIdentifier(existingElement.name.text);
46816
46870
  }
46817
46871
  existingImport = statement;
46818
46872
  }
46819
46873
  } else if (statement.importClause.name && !symbolName) {
46820
- return import_typescript108.default.factory.createIdentifier(statement.importClause.name.text);
46874
+ return import_typescript109.default.factory.createIdentifier(statement.importClause.name.text);
46821
46875
  }
46822
46876
  }
46823
46877
  if (existingImport) {
@@ -46841,7 +46895,7 @@ var ImportManager2 = class {
46841
46895
  if (!importMap.has(moduleName)) {
46842
46896
  importMap.set(moduleName, []);
46843
46897
  }
46844
- importMap.get(moduleName).push(import_typescript108.default.factory.createImportSpecifier(false, propertyName, name));
46898
+ importMap.get(moduleName).push(import_typescript109.default.factory.createImportSpecifier(false, propertyName, name));
46845
46899
  } else {
46846
46900
  const importMap = this.newImports.get(sourceFile).defaultImports;
46847
46901
  identifier = this._getUniqueIdentifier(sourceFile, "defaultExport");
@@ -46855,19 +46909,19 @@ var ImportManager2 = class {
46855
46909
  const sourceFile = importDecl.getSourceFile();
46856
46910
  const recorder = this.getUpdateRecorder(sourceFile);
46857
46911
  const namedBindings = importDecl.importClause.namedBindings;
46858
- const newNamedBindings = import_typescript108.default.factory.updateNamedImports(namedBindings, namedBindings.elements.concat(expressions.map(({ propertyName, importName }) => import_typescript108.default.factory.createImportSpecifier(false, propertyName, importName))));
46859
- const newNamedBindingsText = this.printer.printNode(import_typescript108.default.EmitHint.Unspecified, newNamedBindings, sourceFile);
46912
+ const newNamedBindings = import_typescript109.default.factory.updateNamedImports(namedBindings, namedBindings.elements.concat(expressions.map(({ propertyName, importName }) => import_typescript109.default.factory.createImportSpecifier(false, propertyName, importName))));
46913
+ const newNamedBindingsText = this.printer.printNode(import_typescript109.default.EmitHint.Unspecified, newNamedBindings, sourceFile);
46860
46914
  recorder.updateExistingImport(namedBindings, newNamedBindingsText);
46861
46915
  });
46862
46916
  this.newImports.forEach(({ importStartIndex, defaultImports, namedImports }, sourceFile) => {
46863
46917
  const recorder = this.getUpdateRecorder(sourceFile);
46864
46918
  const useSingleQuotes = this._getQuoteStyle(sourceFile) === 0;
46865
46919
  defaultImports.forEach((identifier, moduleName) => {
46866
- const newImport = import_typescript108.default.factory.createImportDeclaration(void 0, import_typescript108.default.factory.createImportClause(false, identifier, void 0), import_typescript108.default.factory.createStringLiteral(moduleName, useSingleQuotes));
46920
+ const newImport = import_typescript109.default.factory.createImportDeclaration(void 0, import_typescript109.default.factory.createImportClause(false, identifier, void 0), import_typescript109.default.factory.createStringLiteral(moduleName, useSingleQuotes));
46867
46921
  recorder.addNewImport(importStartIndex, this._getNewImportText(importStartIndex, newImport, sourceFile));
46868
46922
  });
46869
46923
  namedImports.forEach((specifiers, moduleName) => {
46870
- const newImport = import_typescript108.default.factory.createImportDeclaration(void 0, import_typescript108.default.factory.createImportClause(false, void 0, import_typescript108.default.factory.createNamedImports(specifiers)), import_typescript108.default.factory.createStringLiteral(moduleName, useSingleQuotes));
46924
+ const newImport = import_typescript109.default.factory.createImportDeclaration(void 0, import_typescript109.default.factory.createImportClause(false, void 0, import_typescript109.default.factory.createNamedImports(specifiers)), import_typescript109.default.factory.createStringLiteral(moduleName, useSingleQuotes));
46871
46925
  recorder.addNewImport(importStartIndex, this._getNewImportText(importStartIndex, newImport, sourceFile));
46872
46926
  });
46873
46927
  });
@@ -46875,7 +46929,7 @@ var ImportManager2 = class {
46875
46929
  _getUniqueIdentifier(sourceFile, baseName) {
46876
46930
  if (this.isUniqueIdentifierName(sourceFile, baseName)) {
46877
46931
  this._recordUsedIdentifier(sourceFile, baseName);
46878
- return import_typescript108.default.factory.createIdentifier(baseName);
46932
+ return import_typescript109.default.factory.createIdentifier(baseName);
46879
46933
  }
46880
46934
  let name = null;
46881
46935
  let counter = 1;
@@ -46883,7 +46937,7 @@ var ImportManager2 = class {
46883
46937
  name = `${baseName}_${counter++}`;
46884
46938
  } while (!this.isUniqueIdentifierName(sourceFile, name));
46885
46939
  this._recordUsedIdentifier(sourceFile, name);
46886
- return import_typescript108.default.factory.createIdentifier(name);
46940
+ return import_typescript109.default.factory.createIdentifier(name);
46887
46941
  }
46888
46942
  isUniqueIdentifierName(sourceFile, name) {
46889
46943
  if (this.usedIdentifierNames.has(sourceFile) && this.usedIdentifierNames.get(sourceFile).indexOf(name) !== -1) {
@@ -46892,7 +46946,7 @@ var ImportManager2 = class {
46892
46946
  const nodeQueue = [sourceFile];
46893
46947
  while (nodeQueue.length) {
46894
46948
  const node = nodeQueue.shift();
46895
- if (import_typescript108.default.isIdentifier(node) && node.text === name && (!import_typescript108.default.isImportSpecifier(node.parent) || node.parent.propertyName !== node)) {
46949
+ if (import_typescript109.default.isIdentifier(node) && node.text === name && (!import_typescript109.default.isImportSpecifier(node.parent) || node.parent.propertyName !== node)) {
46896
46950
  return false;
46897
46951
  }
46898
46952
  nodeQueue.push(...node.getChildren());
@@ -46904,21 +46958,21 @@ var ImportManager2 = class {
46904
46958
  }
46905
46959
  _getEndPositionOfNode(node) {
46906
46960
  const nodeEndPos = node.getEnd();
46907
- const commentRanges = import_typescript108.default.getTrailingCommentRanges(node.getSourceFile().text, nodeEndPos);
46961
+ const commentRanges = import_typescript109.default.getTrailingCommentRanges(node.getSourceFile().text, nodeEndPos);
46908
46962
  if (!commentRanges || !commentRanges.length) {
46909
46963
  return nodeEndPos;
46910
46964
  }
46911
46965
  return commentRanges[commentRanges.length - 1].end;
46912
46966
  }
46913
46967
  _getNewImportText(importStartIndex, newImport, sourceFile) {
46914
- const text2 = this.printer.printNode(import_typescript108.default.EmitHint.Unspecified, newImport, sourceFile);
46968
+ const text2 = this.printer.printNode(import_typescript109.default.EmitHint.Unspecified, newImport, sourceFile);
46915
46969
  return importStartIndex === 0 ? `${text2}
46916
46970
  ` : `
46917
46971
  ${text2}`;
46918
46972
  }
46919
46973
  _getImportParts(sourceFile, symbolName, alias, keepSymbolName) {
46920
- const symbolIdentifier = import_typescript108.default.factory.createIdentifier(symbolName);
46921
- const aliasIdentifier = alias ? import_typescript108.default.factory.createIdentifier(alias) : null;
46974
+ const symbolIdentifier = import_typescript109.default.factory.createIdentifier(symbolName);
46975
+ const aliasIdentifier = alias ? import_typescript109.default.factory.createIdentifier(alias) : null;
46922
46976
  const generatedUniqueIdentifier = this._getUniqueIdentifier(sourceFile, alias || symbolName);
46923
46977
  const needsGeneratedUniqueName = generatedUniqueIdentifier.text !== (alias || symbolName);
46924
46978
  let propertyName;
@@ -46938,7 +46992,7 @@ ${text2}`;
46938
46992
  if (!this.quoteStyles.hasOwnProperty(sourceFile.fileName)) {
46939
46993
  let quoteStyle;
46940
46994
  for (const statement of sourceFile.statements) {
46941
- if (import_typescript108.default.isImportDeclaration(statement) && import_typescript108.default.isStringLiteralLike(statement.moduleSpecifier)) {
46995
+ if (import_typescript109.default.isImportDeclaration(statement) && import_typescript109.default.isStringLiteralLike(statement.moduleSpecifier)) {
46942
46996
  quoteStyle = statement.moduleSpecifier.getText().trim().startsWith('"') ? 1 : 0;
46943
46997
  break;
46944
46998
  }
@@ -46969,7 +47023,7 @@ var ChangeTracker = class {
46969
47023
  replaceText(sourceFile, start, removeLength, text2) {
46970
47024
  this._trackChange(sourceFile, { start, removeLength, text: text2 });
46971
47025
  }
46972
- replaceNode(oldNode, newNode, emitHint = import_typescript109.default.EmitHint.Unspecified, sourceFileWhenPrinting) {
47026
+ replaceNode(oldNode, newNode, emitHint = import_typescript110.default.EmitHint.Unspecified, sourceFileWhenPrinting) {
46973
47027
  const sourceFile = oldNode.getSourceFile();
46974
47028
  this.replaceText(sourceFile, oldNode.getStart(), oldNode.getWidth(), this._printer.printNode(emitHint, newNode, sourceFileWhenPrinting || sourceFile));
46975
47029
  }
@@ -47009,7 +47063,7 @@ function normalizePath(path4) {
47009
47063
  }
47010
47064
 
47011
47065
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
47012
- var import_core18 = require("@angular-devkit/core");
47066
+ var import_core19 = require("@angular-devkit/core");
47013
47067
  function getProjectTsConfigPaths(tree) {
47014
47068
  return __async(this, null, function* () {
47015
47069
  const buildPaths = /* @__PURE__ */ new Set();
@@ -47026,9 +47080,9 @@ function getProjectTsConfigPaths(tree) {
47026
47080
  continue;
47027
47081
  }
47028
47082
  if (name === "build") {
47029
- buildPaths.add((0, import_core18.normalize)(tsConfig));
47083
+ buildPaths.add((0, import_core19.normalize)(tsConfig));
47030
47084
  } else {
47031
- testPaths.add((0, import_core18.normalize)(tsConfig));
47085
+ testPaths.add((0, import_core19.normalize)(tsConfig));
47032
47086
  }
47033
47087
  }
47034
47088
  }
@@ -47060,7 +47114,7 @@ function createHost(tree) {
47060
47114
  if (!data) {
47061
47115
  throw new Error("File not found.");
47062
47116
  }
47063
- return import_core18.virtualFs.fileBufferToString(data);
47117
+ return import_core19.virtualFs.fileBufferToString(data);
47064
47118
  });
47065
47119
  },
47066
47120
  writeFile(path4, data) {
@@ -47083,30 +47137,30 @@ function createHost(tree) {
47083
47137
  function getWorkspace(tree) {
47084
47138
  return __async(this, null, function* () {
47085
47139
  const host = createHost(tree);
47086
- const { workspace } = yield import_core18.workspaces.readWorkspace("/", host);
47140
+ const { workspace } = yield import_core19.workspaces.readWorkspace("/", host);
47087
47141
  return workspace;
47088
47142
  });
47089
47143
  }
47090
47144
 
47091
47145
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
47092
47146
  var import_path5 = require("path");
47093
- var import_typescript111 = __toESM(require("typescript"), 1);
47147
+ var import_typescript112 = __toESM(require("typescript"), 1);
47094
47148
 
47095
47149
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
47096
47150
  var path3 = __toESM(require("path"), 1);
47097
- var import_typescript110 = __toESM(require("typescript"), 1);
47151
+ var import_typescript111 = __toESM(require("typescript"), 1);
47098
47152
  function parseTsconfigFile(tsconfigPath, basePath) {
47099
- const { config } = import_typescript110.default.readConfigFile(tsconfigPath, import_typescript110.default.sys.readFile);
47153
+ const { config } = import_typescript111.default.readConfigFile(tsconfigPath, import_typescript111.default.sys.readFile);
47100
47154
  const parseConfigHost = {
47101
- useCaseSensitiveFileNames: import_typescript110.default.sys.useCaseSensitiveFileNames,
47102
- fileExists: import_typescript110.default.sys.fileExists,
47103
- readDirectory: import_typescript110.default.sys.readDirectory,
47104
- readFile: import_typescript110.default.sys.readFile
47155
+ useCaseSensitiveFileNames: import_typescript111.default.sys.useCaseSensitiveFileNames,
47156
+ fileExists: import_typescript111.default.sys.fileExists,
47157
+ readDirectory: import_typescript111.default.sys.readDirectory,
47158
+ readFile: import_typescript111.default.sys.readFile
47105
47159
  };
47106
47160
  if (!path3.isAbsolute(basePath)) {
47107
47161
  throw Error("Unexpected relative base path has been specified.");
47108
47162
  }
47109
- return import_typescript110.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
47163
+ return import_typescript111.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
47110
47164
  }
47111
47165
 
47112
47166
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
@@ -47118,7 +47172,7 @@ function createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additi
47118
47172
  return { rootNames: parsed.fileNames.concat(additionalFiles || []), options, host };
47119
47173
  }
47120
47174
  function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
47121
- const host = import_typescript111.default.createCompilerHost(options, true);
47175
+ const host = import_typescript112.default.createCompilerHost(options, true);
47122
47176
  const defaultReadFile = host.readFile;
47123
47177
  host.readFile = (fileName) => {
47124
47178
  var _a2;
@@ -47139,24 +47193,24 @@ function canMigrateFile(basePath, sourceFile, program) {
47139
47193
  }
47140
47194
 
47141
47195
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/standalone-migration/prune-modules.mjs
47142
- var import_typescript116 = __toESM(require("typescript"), 1);
47196
+ var import_typescript117 = __toESM(require("typescript"), 1);
47143
47197
 
47144
47198
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
47145
- var import_typescript113 = __toESM(require("typescript"), 1);
47199
+ var import_typescript114 = __toESM(require("typescript"), 1);
47146
47200
 
47147
47201
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
47148
- var import_typescript112 = __toESM(require("typescript"), 1);
47202
+ var import_typescript113 = __toESM(require("typescript"), 1);
47149
47203
  function getImportOfIdentifier(typeChecker, node) {
47150
47204
  const symbol = typeChecker.getSymbolAtLocation(node);
47151
47205
  if (!symbol || symbol.declarations === void 0 || !symbol.declarations.length) {
47152
47206
  return null;
47153
47207
  }
47154
47208
  const decl = symbol.declarations[0];
47155
- if (!import_typescript112.default.isImportSpecifier(decl)) {
47209
+ if (!import_typescript113.default.isImportSpecifier(decl)) {
47156
47210
  return null;
47157
47211
  }
47158
47212
  const importDecl = decl.parent.parent.parent;
47159
- if (!import_typescript112.default.isStringLiteral(importDecl.moduleSpecifier)) {
47213
+ if (!import_typescript113.default.isStringLiteral(importDecl.moduleSpecifier)) {
47160
47214
  return null;
47161
47215
  }
47162
47216
  return {
@@ -47173,10 +47227,10 @@ function getImportSpecifiers(sourceFile, moduleName, specifierNames) {
47173
47227
  var _a2;
47174
47228
  const matches = [];
47175
47229
  for (const node of sourceFile.statements) {
47176
- if (import_typescript112.default.isImportDeclaration(node) && import_typescript112.default.isStringLiteral(node.moduleSpecifier)) {
47230
+ if (import_typescript113.default.isImportDeclaration(node) && import_typescript113.default.isStringLiteral(node.moduleSpecifier)) {
47177
47231
  const isMatch = typeof moduleName === "string" ? node.moduleSpecifier.text === moduleName : moduleName.test(node.moduleSpecifier.text);
47178
47232
  const namedBindings = (_a2 = node.importClause) == null ? void 0 : _a2.namedBindings;
47179
- if (isMatch && namedBindings && import_typescript112.default.isNamedImports(namedBindings)) {
47233
+ if (isMatch && namedBindings && import_typescript113.default.isNamedImports(namedBindings)) {
47180
47234
  for (const specifierName of specifierNames) {
47181
47235
  const match = findImportSpecifier(namedBindings.elements, specifierName);
47182
47236
  if (match) {
@@ -47197,7 +47251,7 @@ function findImportSpecifier(nodes, specifierName) {
47197
47251
 
47198
47252
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
47199
47253
  function getCallDecoratorImport(typeChecker, decorator) {
47200
- if (!import_typescript113.default.isCallExpression(decorator.expression) || !import_typescript113.default.isIdentifier(decorator.expression.expression)) {
47254
+ if (!import_typescript114.default.isCallExpression(decorator.expression) || !import_typescript114.default.isIdentifier(decorator.expression.expression)) {
47201
47255
  return null;
47202
47256
  }
47203
47257
  const identifier = decorator.expression.expression;
@@ -47215,10 +47269,10 @@ function getAngularDecorators(typeChecker, decorators) {
47215
47269
  }
47216
47270
 
47217
47271
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/nodes.mjs
47218
- var import_typescript114 = __toESM(require("typescript"), 1);
47272
+ var import_typescript115 = __toESM(require("typescript"), 1);
47219
47273
  function closestNode(node, predicate) {
47220
47274
  let current = node.parent;
47221
- while (current && !import_typescript114.default.isSourceFile(current)) {
47275
+ while (current && !import_typescript115.default.isSourceFile(current)) {
47222
47276
  if (predicate(current)) {
47223
47277
  return current;
47224
47278
  }
@@ -47229,7 +47283,7 @@ function closestNode(node, predicate) {
47229
47283
 
47230
47284
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/standalone-migration/util.mjs
47231
47285
  var import_path6 = require("path");
47232
- var import_typescript115 = __toESM(require("typescript"), 1);
47286
+ var import_typescript116 = __toESM(require("typescript"), 1);
47233
47287
  var UniqueItemTracker = class {
47234
47288
  constructor() {
47235
47289
  __publicField(this, "_nodes", /* @__PURE__ */ new Map());
@@ -47278,7 +47332,7 @@ var ReferenceResolver = class {
47278
47332
  const results = /* @__PURE__ */ new Map();
47279
47333
  for (const symbol of referencedSymbols) {
47280
47334
  for (const ref of symbol.references) {
47281
- if (!ref.isDefinition || symbol.definition.kind === import_typescript115.default.ScriptElementKind.alias) {
47335
+ if (!ref.isDefinition || symbol.definition.kind === import_typescript116.default.ScriptElementKind.alias) {
47282
47336
  if (!results.has(ref.fileName)) {
47283
47337
  results.set(ref.fileName, []);
47284
47338
  }
@@ -47302,7 +47356,7 @@ var ReferenceResolver = class {
47302
47356
  for (const file of highlights) {
47303
47357
  if (file.fileName === fileName) {
47304
47358
  for (const { textSpan: { start, length }, kind } of file.highlightSpans) {
47305
- if (kind !== import_typescript115.default.HighlightSpanKind.none) {
47359
+ if (kind !== import_typescript116.default.HighlightSpanKind.none) {
47306
47360
  results.push([start, start + length]);
47307
47361
  }
47308
47362
  }
@@ -47328,19 +47382,19 @@ var ReferenceResolver = class {
47328
47382
  rootFileNames.push(fileName);
47329
47383
  }
47330
47384
  });
47331
- this._languageService = import_typescript115.default.createLanguageService({
47385
+ this._languageService = import_typescript116.default.createLanguageService({
47332
47386
  getCompilationSettings: () => this._program.getTsProgram().getCompilerOptions(),
47333
47387
  getScriptFileNames: () => rootFileNames,
47334
47388
  getScriptVersion: () => "0",
47335
47389
  getScriptSnapshot: (path4) => {
47336
47390
  const content = this._readFile(path4);
47337
- return content ? import_typescript115.default.ScriptSnapshot.fromString(content) : void 0;
47391
+ return content ? import_typescript116.default.ScriptSnapshot.fromString(content) : void 0;
47338
47392
  },
47339
47393
  getCurrentDirectory: () => this._basePath,
47340
- getDefaultLibFileName: (options) => import_typescript115.default.getDefaultLibFilePath(options),
47394
+ getDefaultLibFileName: (options) => import_typescript116.default.getDefaultLibFilePath(options),
47341
47395
  readFile: (path4) => this._readFile(path4),
47342
47396
  fileExists: (path4) => this._host.fileExists(path4)
47343
- }, import_typescript115.default.createDocumentRegistry(), import_typescript115.default.LanguageServiceMode.PartialSemantic);
47397
+ }, import_typescript116.default.createDocumentRegistry(), import_typescript116.default.LanguageServiceMode.PartialSemantic);
47344
47398
  }
47345
47399
  return this._languageService;
47346
47400
  }
@@ -47370,10 +47424,10 @@ function offsetsToNodes(lookup, offsets, results) {
47370
47424
  }
47371
47425
  function findClassDeclaration(reference2, typeChecker) {
47372
47426
  var _a2, _b2;
47373
- return ((_b2 = (_a2 = typeChecker.getTypeAtLocation(reference2).getSymbol()) == null ? void 0 : _a2.declarations) == null ? void 0 : _b2.find(import_typescript115.default.isClassDeclaration)) || null;
47427
+ return ((_b2 = (_a2 = typeChecker.getTypeAtLocation(reference2).getSymbol()) == null ? void 0 : _a2.declarations) == null ? void 0 : _b2.find(import_typescript116.default.isClassDeclaration)) || null;
47374
47428
  }
47375
47429
  function findLiteralProperty(literal3, name) {
47376
- return literal3.properties.find((prop) => prop.name && import_typescript115.default.isIdentifier(prop.name) && prop.name.text === name);
47430
+ return literal3.properties.find((prop) => prop.name && import_typescript116.default.isIdentifier(prop.name) && prop.name.text === name);
47377
47431
  }
47378
47432
  function getRelativeImportPath(fromFile, toFile) {
47379
47433
  let path4 = (0, import_path6.relative)((0, import_path6.dirname)(fromFile), toFile).replace(/\.ts$/, "");
@@ -47394,9 +47448,9 @@ function isClassReferenceInAngularModule(node, className, moduleName, typeChecke
47394
47448
  const externalName = `@angular/${moduleName}`;
47395
47449
  const internalName = `angular2/rc/packages/${moduleName}`;
47396
47450
  return !!((_a2 = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a2.some((decl) => {
47397
- const closestClass = closestOrSelf(decl, import_typescript115.default.isClassDeclaration);
47451
+ const closestClass = closestOrSelf(decl, import_typescript116.default.isClassDeclaration);
47398
47452
  const closestClassFileName = closestClass == null ? void 0 : closestClass.getSourceFile().fileName;
47399
- if (!closestClass || !closestClassFileName || !closestClass.name || !import_typescript115.default.isIdentifier(closestClass.name) || !closestClassFileName.includes(externalName) && !closestClassFileName.includes(internalName)) {
47453
+ if (!closestClass || !closestClassFileName || !closestClass.name || !import_typescript116.default.isIdentifier(closestClass.name) || !closestClassFileName.includes(externalName) && !closestClassFileName.includes(internalName)) {
47400
47454
  return false;
47401
47455
  }
47402
47456
  return typeof className === "string" ? closestClass.name.text === className : className.test(closestClass.name.text);
@@ -47421,10 +47475,10 @@ function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, pri
47421
47475
  const nodesToRemove = /* @__PURE__ */ new Set();
47422
47476
  sourceFiles.forEach(function walk(node) {
47423
47477
  var _a2, _b2;
47424
- if (import_typescript116.default.isClassDeclaration(node) && canRemoveClass(node, typeChecker)) {
47478
+ if (import_typescript117.default.isClassDeclaration(node) && canRemoveClass(node, typeChecker)) {
47425
47479
  collectRemovalLocations(node, removalLocations, referenceResolver, program);
47426
47480
  classesToRemove.add(node);
47427
- } else if (import_typescript116.default.isExportDeclaration(node) && !node.exportClause && node.moduleSpecifier && import_typescript116.default.isStringLiteralLike(node.moduleSpecifier) && node.moduleSpecifier.text.startsWith(".")) {
47481
+ } else if (import_typescript117.default.isExportDeclaration(node) && !node.exportClause && node.moduleSpecifier && import_typescript117.default.isStringLiteralLike(node.moduleSpecifier) && node.moduleSpecifier.text.startsWith(".")) {
47428
47482
  const exportedSourceFile = (_b2 = (_a2 = typeChecker.getSymbolAtLocation(node.moduleSpecifier)) == null ? void 0 : _a2.valueDeclaration) == null ? void 0 : _b2.getSourceFile();
47429
47483
  if (exportedSourceFile) {
47430
47484
  barrelExports.track(exportedSourceFile, node);
@@ -47470,17 +47524,17 @@ function collectRemovalLocations(ngModule, removalLocations, referenceResolver,
47470
47524
  }
47471
47525
  }
47472
47526
  for (const node of nodes) {
47473
- const closestArray = closestNode(node, import_typescript116.default.isArrayLiteralExpression);
47527
+ const closestArray = closestNode(node, import_typescript117.default.isArrayLiteralExpression);
47474
47528
  if (closestArray) {
47475
47529
  removalLocations.arrays.track(closestArray, node);
47476
47530
  continue;
47477
47531
  }
47478
- const closestImport = closestNode(node, import_typescript116.default.isNamedImports);
47532
+ const closestImport = closestNode(node, import_typescript117.default.isNamedImports);
47479
47533
  if (closestImport) {
47480
47534
  removalLocations.imports.track(closestImport, node);
47481
47535
  continue;
47482
47536
  }
47483
- const closestExport = closestNode(node, import_typescript116.default.isNamedExports);
47537
+ const closestExport = closestNode(node, import_typescript117.default.isNamedExports);
47484
47538
  if (closestExport) {
47485
47539
  removalLocations.exports.track(closestExport, node);
47486
47540
  continue;
@@ -47491,24 +47545,24 @@ function collectRemovalLocations(ngModule, removalLocations, referenceResolver,
47491
47545
  function removeArrayReferences(locations, tracker) {
47492
47546
  for (const [array, toRemove] of locations.getEntries()) {
47493
47547
  const newElements = filterRemovedElements(array.elements, toRemove);
47494
- tracker.replaceNode(array, import_typescript116.default.factory.updateArrayLiteralExpression(array, import_typescript116.default.factory.createNodeArray(newElements, array.elements.hasTrailingComma)));
47548
+ tracker.replaceNode(array, import_typescript117.default.factory.updateArrayLiteralExpression(array, import_typescript117.default.factory.createNodeArray(newElements, array.elements.hasTrailingComma)));
47495
47549
  }
47496
47550
  }
47497
47551
  function removeImportReferences(locations, tracker) {
47498
47552
  for (const [namedImports, toRemove] of locations.getEntries()) {
47499
47553
  const newElements = filterRemovedElements(namedImports.elements, toRemove);
47500
47554
  if (newElements.length === 0) {
47501
- const importClause = closestNode(namedImports, import_typescript116.default.isImportClause);
47555
+ const importClause = closestNode(namedImports, import_typescript117.default.isImportClause);
47502
47556
  if (importClause && importClause.name) {
47503
- tracker.replaceNode(importClause, import_typescript116.default.factory.updateImportClause(importClause, importClause.isTypeOnly, importClause.name, void 0));
47557
+ tracker.replaceNode(importClause, import_typescript117.default.factory.updateImportClause(importClause, importClause.isTypeOnly, importClause.name, void 0));
47504
47558
  } else {
47505
- const declaration = closestNode(namedImports, import_typescript116.default.isImportDeclaration);
47559
+ const declaration = closestNode(namedImports, import_typescript117.default.isImportDeclaration);
47506
47560
  if (declaration) {
47507
47561
  tracker.removeNode(declaration);
47508
47562
  }
47509
47563
  }
47510
47564
  } else {
47511
- tracker.replaceNode(namedImports, import_typescript116.default.factory.updateNamedImports(namedImports, newElements));
47565
+ tracker.replaceNode(namedImports, import_typescript117.default.factory.updateNamedImports(namedImports, newElements));
47512
47566
  }
47513
47567
  }
47514
47568
  }
@@ -47516,22 +47570,22 @@ function removeExportReferences(locations, tracker) {
47516
47570
  for (const [namedExports, toRemove] of locations.getEntries()) {
47517
47571
  const newElements = filterRemovedElements(namedExports.elements, toRemove);
47518
47572
  if (newElements.length === 0) {
47519
- const declaration = closestNode(namedExports, import_typescript116.default.isExportDeclaration);
47573
+ const declaration = closestNode(namedExports, import_typescript117.default.isExportDeclaration);
47520
47574
  if (declaration) {
47521
47575
  tracker.removeNode(declaration);
47522
47576
  }
47523
47577
  } else {
47524
- tracker.replaceNode(namedExports, import_typescript116.default.factory.updateNamedExports(namedExports, newElements));
47578
+ tracker.replaceNode(namedExports, import_typescript117.default.factory.updateNamedExports(namedExports, newElements));
47525
47579
  }
47526
47580
  }
47527
47581
  }
47528
47582
  function canRemoveClass(node, typeChecker) {
47529
47583
  var _a2;
47530
47584
  const decorator = (_a2 = findNgModuleDecorator(node, typeChecker)) == null ? void 0 : _a2.node;
47531
- if (!decorator || !import_typescript116.default.isCallExpression(decorator.expression)) {
47585
+ if (!decorator || !import_typescript117.default.isCallExpression(decorator.expression)) {
47532
47586
  return false;
47533
47587
  }
47534
- if (decorator.expression.arguments.length > 0 && !import_typescript116.default.isObjectLiteralExpression(decorator.expression.arguments[0])) {
47588
+ if (decorator.expression.arguments.length > 0 && !import_typescript117.default.isObjectLiteralExpression(decorator.expression.arguments[0])) {
47535
47589
  return false;
47536
47590
  }
47537
47591
  if (node.members.length > 0 && node.members.some((member) => !isEmptyConstructor(member))) {
@@ -47544,7 +47598,7 @@ function canRemoveClass(node, typeChecker) {
47544
47598
  const imports = findLiteralProperty(literal3, "imports");
47545
47599
  if (imports && isNonEmptyNgModuleProperty(imports)) {
47546
47600
  for (const dep of imports.initializer.elements) {
47547
- if (!import_typescript116.default.isIdentifier(dep)) {
47601
+ if (!import_typescript117.default.isIdentifier(dep)) {
47548
47602
  return false;
47549
47603
  }
47550
47604
  const depDeclaration = findClassDeclaration(dep, typeChecker);
@@ -47562,15 +47616,15 @@ function canRemoveClass(node, typeChecker) {
47562
47616
  return true;
47563
47617
  }
47564
47618
  function isNonEmptyNgModuleProperty(node) {
47565
- return import_typescript116.default.isPropertyAssignment(node) && import_typescript116.default.isIdentifier(node.name) && import_typescript116.default.isArrayLiteralExpression(node.initializer) && node.initializer.elements.length > 0;
47619
+ return import_typescript117.default.isPropertyAssignment(node) && import_typescript117.default.isIdentifier(node.name) && import_typescript117.default.isArrayLiteralExpression(node.initializer) && node.initializer.elements.length > 0;
47566
47620
  }
47567
47621
  function canRemoveFile(sourceFile, nodesToBeRemoved) {
47568
47622
  var _a2;
47569
47623
  for (const node of sourceFile.statements) {
47570
- if (import_typescript116.default.isImportDeclaration(node) || nodesToBeRemoved.has(node)) {
47624
+ if (import_typescript117.default.isImportDeclaration(node) || nodesToBeRemoved.has(node)) {
47571
47625
  continue;
47572
47626
  }
47573
- if (import_typescript116.default.isExportDeclaration(node) || import_typescript116.default.canHaveModifiers(node) && ((_a2 = import_typescript116.default.getModifiers(node)) == null ? void 0 : _a2.some((m) => m.kind === import_typescript116.default.SyntaxKind.ExportKeyword))) {
47627
+ if (import_typescript117.default.isExportDeclaration(node) || import_typescript117.default.canHaveModifiers(node) && ((_a2 = import_typescript117.default.getModifiers(node)) == null ? void 0 : _a2.some((m) => m.kind === import_typescript117.default.SyntaxKind.ExportKeyword))) {
47574
47628
  return false;
47575
47629
  }
47576
47630
  }
@@ -47590,7 +47644,7 @@ function filterRemovedElements(elements, toRemove) {
47590
47644
  });
47591
47645
  }
47592
47646
  function isEmptyConstructor(node) {
47593
- return import_typescript116.default.isConstructorDeclaration(node) && node.parameters.length === 0 && (node.body == null || node.body.statements.length === 0);
47647
+ return import_typescript117.default.isConstructorDeclaration(node) && node.parameters.length === 0 && (node.body == null || node.body.statements.length === 0);
47594
47648
  }
47595
47649
  function addRemovalTodos(nodes, tracker) {
47596
47650
  for (const node of nodes) {
@@ -47598,19 +47652,19 @@ function addRemovalTodos(nodes, tracker) {
47598
47652
  }
47599
47653
  }
47600
47654
  function findNgModuleDecorator(node, typeChecker) {
47601
- const decorators = getAngularDecorators(typeChecker, import_typescript116.default.getDecorators(node) || []);
47655
+ const decorators = getAngularDecorators(typeChecker, import_typescript117.default.getDecorators(node) || []);
47602
47656
  return decorators.find((decorator) => decorator.name === "NgModule") || null;
47603
47657
  }
47604
47658
 
47605
47659
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.mjs
47606
47660
  var import_path7 = require("path");
47607
- var import_typescript119 = __toESM(require("typescript"), 1);
47661
+ var import_typescript120 = __toESM(require("typescript"), 1);
47608
47662
 
47609
47663
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/standalone-migration/to-standalone.mjs
47610
- var import_typescript118 = __toESM(require("typescript"), 1);
47664
+ var import_typescript119 = __toESM(require("typescript"), 1);
47611
47665
 
47612
47666
  // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/symbol.mjs
47613
- var import_typescript117 = __toESM(require("typescript"), 1);
47667
+ var import_typescript118 = __toESM(require("typescript"), 1);
47614
47668
  function isReferenceToImport(typeChecker, node, importSpecifier) {
47615
47669
  var _a2, _b2;
47616
47670
  const nodeSymbol = typeChecker.getTypeAtLocation(node).getSymbol();
@@ -47657,8 +47711,8 @@ function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker,
47657
47711
  const importsToAdd = getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, importRemapper);
47658
47712
  if (importsToAdd.length > 0) {
47659
47713
  const hasTrailingComma = importsToAdd.length > 2 && !!((_a2 = extractMetadataLiteral(directiveMeta.decorator)) == null ? void 0 : _a2.properties.hasTrailingComma);
47660
- decorator = addPropertyToAngularDecorator(decorator, import_typescript118.default.factory.createPropertyAssignment("imports", import_typescript118.default.factory.createArrayLiteralExpression(
47661
- import_typescript118.default.factory.createNodeArray(importsToAdd, hasTrailingComma),
47714
+ decorator = addPropertyToAngularDecorator(decorator, import_typescript119.default.factory.createPropertyAssignment("imports", import_typescript119.default.factory.createArrayLiteralExpression(
47715
+ import_typescript119.default.factory.createNodeArray(importsToAdd, hasTrailingComma),
47662
47716
  hasTrailingComma
47663
47717
  )));
47664
47718
  }
@@ -47690,11 +47744,11 @@ function getComponentImportExpressions(decl, allDeclarations, tracker, typeCheck
47690
47744
  const identifier = tracker.addImport(decl.getSourceFile(), importLocation.symbolName, importLocation.moduleSpecifier);
47691
47745
  imports.push(identifier);
47692
47746
  } else {
47693
- const identifier = import_typescript118.default.factory.createIdentifier(importLocation.symbolName);
47747
+ const identifier = import_typescript119.default.factory.createIdentifier(importLocation.symbolName);
47694
47748
  if (importLocation.isForwardReference) {
47695
47749
  const forwardRefExpression = tracker.addImport(decl.getSourceFile(), "forwardRef", "@angular/core");
47696
- const arrowFunction = import_typescript118.default.factory.createArrowFunction(void 0, void 0, [], void 0, void 0, identifier);
47697
- imports.push(import_typescript118.default.factory.createCallExpression(forwardRefExpression, void 0, [arrowFunction]));
47750
+ const arrowFunction = import_typescript119.default.factory.createArrowFunction(void 0, void 0, [], void 0, void 0, identifier);
47751
+ imports.push(import_typescript119.default.factory.createCallExpression(forwardRefExpression, void 0, [arrowFunction]));
47698
47752
  } else {
47699
47753
  imports.push(identifier);
47700
47754
  }
@@ -47719,11 +47773,11 @@ function moveDeclarationsToImports(literal3, allDeclarations, typeChecker, templ
47719
47773
  const declarationsToCopy = [];
47720
47774
  const properties = [];
47721
47775
  const importsProp = findLiteralProperty(literal3, "imports");
47722
- const hasAnyArrayTrailingComma = literal3.properties.some((prop) => import_typescript118.default.isPropertyAssignment(prop) && import_typescript118.default.isArrayLiteralExpression(prop.initializer) && prop.initializer.elements.hasTrailingComma);
47723
- if (import_typescript118.default.isPropertyAssignment(declarationsProp)) {
47724
- if (import_typescript118.default.isArrayLiteralExpression(declarationsProp.initializer)) {
47776
+ const hasAnyArrayTrailingComma = literal3.properties.some((prop) => import_typescript119.default.isPropertyAssignment(prop) && import_typescript119.default.isArrayLiteralExpression(prop.initializer) && prop.initializer.elements.hasTrailingComma);
47777
+ if (import_typescript119.default.isPropertyAssignment(declarationsProp)) {
47778
+ if (import_typescript119.default.isArrayLiteralExpression(declarationsProp.initializer)) {
47725
47779
  for (const el of declarationsProp.initializer.elements) {
47726
- if (import_typescript118.default.isIdentifier(el)) {
47780
+ if (import_typescript119.default.isIdentifier(el)) {
47727
47781
  const correspondingClass = findClassDeclaration(el, typeChecker);
47728
47782
  if (!correspondingClass || isStandaloneDeclaration(correspondingClass, allDeclarations, templateTypeChecker)) {
47729
47783
  declarationsToCopy.push(el);
@@ -47735,11 +47789,11 @@ function moveDeclarationsToImports(literal3, allDeclarations, typeChecker, templ
47735
47789
  }
47736
47790
  }
47737
47791
  } else {
47738
- declarationsToCopy.push(import_typescript118.default.factory.createSpreadElement(declarationsProp.initializer));
47792
+ declarationsToCopy.push(import_typescript119.default.factory.createSpreadElement(declarationsProp.initializer));
47739
47793
  }
47740
47794
  }
47741
47795
  if (!importsProp && declarationsToCopy.length > 0) {
47742
- properties.push(import_typescript118.default.factory.createPropertyAssignment("imports", import_typescript118.default.factory.createArrayLiteralExpression(import_typescript118.default.factory.createNodeArray(declarationsToCopy, hasAnyArrayTrailingComma && declarationsToCopy.length > 2))));
47796
+ properties.push(import_typescript119.default.factory.createPropertyAssignment("imports", import_typescript119.default.factory.createArrayLiteralExpression(import_typescript119.default.factory.createNodeArray(declarationsToCopy, hasAnyArrayTrailingComma && declarationsToCopy.length > 2))));
47743
47797
  }
47744
47798
  for (const prop of literal3.properties) {
47745
47799
  if (!isNamedPropertyAssignment(prop)) {
@@ -47748,49 +47802,49 @@ function moveDeclarationsToImports(literal3, allDeclarations, typeChecker, templ
47748
47802
  }
47749
47803
  if (prop === declarationsProp) {
47750
47804
  if (declarationsToPreserve.length > 0) {
47751
- const hasTrailingComma = import_typescript118.default.isArrayLiteralExpression(prop.initializer) ? prop.initializer.elements.hasTrailingComma : hasAnyArrayTrailingComma;
47752
- properties.push(import_typescript118.default.factory.updatePropertyAssignment(prop, prop.name, import_typescript118.default.factory.createArrayLiteralExpression(import_typescript118.default.factory.createNodeArray(declarationsToPreserve, hasTrailingComma && declarationsToPreserve.length > 2))));
47805
+ const hasTrailingComma = import_typescript119.default.isArrayLiteralExpression(prop.initializer) ? prop.initializer.elements.hasTrailingComma : hasAnyArrayTrailingComma;
47806
+ properties.push(import_typescript119.default.factory.updatePropertyAssignment(prop, prop.name, import_typescript119.default.factory.createArrayLiteralExpression(import_typescript119.default.factory.createNodeArray(declarationsToPreserve, hasTrailingComma && declarationsToPreserve.length > 2))));
47753
47807
  }
47754
47808
  continue;
47755
47809
  }
47756
47810
  if (prop === importsProp && declarationsToCopy.length > 0) {
47757
47811
  let initializer;
47758
- if (import_typescript118.default.isArrayLiteralExpression(prop.initializer)) {
47759
- initializer = import_typescript118.default.factory.updateArrayLiteralExpression(prop.initializer, import_typescript118.default.factory.createNodeArray([...prop.initializer.elements, ...declarationsToCopy], prop.initializer.elements.hasTrailingComma));
47812
+ if (import_typescript119.default.isArrayLiteralExpression(prop.initializer)) {
47813
+ initializer = import_typescript119.default.factory.updateArrayLiteralExpression(prop.initializer, import_typescript119.default.factory.createNodeArray([...prop.initializer.elements, ...declarationsToCopy], prop.initializer.elements.hasTrailingComma));
47760
47814
  } else {
47761
- initializer = import_typescript118.default.factory.createArrayLiteralExpression(import_typescript118.default.factory.createNodeArray(
47762
- [import_typescript118.default.factory.createSpreadElement(prop.initializer), ...declarationsToCopy],
47815
+ initializer = import_typescript119.default.factory.createArrayLiteralExpression(import_typescript119.default.factory.createNodeArray(
47816
+ [import_typescript119.default.factory.createSpreadElement(prop.initializer), ...declarationsToCopy],
47763
47817
  hasAnyArrayTrailingComma && declarationsToCopy.length > 1
47764
47818
  ));
47765
47819
  }
47766
- properties.push(import_typescript118.default.factory.updatePropertyAssignment(prop, prop.name, initializer));
47820
+ properties.push(import_typescript119.default.factory.updatePropertyAssignment(prop, prop.name, initializer));
47767
47821
  continue;
47768
47822
  }
47769
47823
  properties.push(prop);
47770
47824
  }
47771
- tracker.replaceNode(literal3, import_typescript118.default.factory.updateObjectLiteralExpression(literal3, import_typescript118.default.factory.createNodeArray(properties, literal3.properties.hasTrailingComma)), import_typescript118.default.EmitHint.Expression);
47825
+ tracker.replaceNode(literal3, import_typescript119.default.factory.updateObjectLiteralExpression(literal3, import_typescript119.default.factory.createNodeArray(properties, literal3.properties.hasTrailingComma)), import_typescript119.default.EmitHint.Expression);
47772
47826
  }
47773
47827
  function addStandaloneToDecorator(node) {
47774
- return addPropertyToAngularDecorator(node, import_typescript118.default.factory.createPropertyAssignment("standalone", import_typescript118.default.factory.createToken(import_typescript118.default.SyntaxKind.TrueKeyword)));
47828
+ return addPropertyToAngularDecorator(node, import_typescript119.default.factory.createPropertyAssignment("standalone", import_typescript119.default.factory.createToken(import_typescript119.default.SyntaxKind.TrueKeyword)));
47775
47829
  }
47776
47830
  function addPropertyToAngularDecorator(node, property2) {
47777
- if (!import_typescript118.default.isCallExpression(node.expression) || node.expression.arguments.length > 1) {
47831
+ if (!import_typescript119.default.isCallExpression(node.expression) || node.expression.arguments.length > 1) {
47778
47832
  return node;
47779
47833
  }
47780
47834
  let literalProperties;
47781
47835
  let hasTrailingComma = false;
47782
47836
  if (node.expression.arguments.length === 0) {
47783
47837
  literalProperties = [property2];
47784
- } else if (import_typescript118.default.isObjectLiteralExpression(node.expression.arguments[0])) {
47838
+ } else if (import_typescript119.default.isObjectLiteralExpression(node.expression.arguments[0])) {
47785
47839
  hasTrailingComma = node.expression.arguments[0].properties.hasTrailingComma;
47786
47840
  literalProperties = [...node.expression.arguments[0].properties, property2];
47787
47841
  } else {
47788
47842
  return node;
47789
47843
  }
47790
- return import_typescript118.default.factory.createDecorator(import_typescript118.default.factory.createCallExpression(node.expression.expression, node.expression.typeArguments, [import_typescript118.default.factory.createObjectLiteralExpression(import_typescript118.default.factory.createNodeArray(literalProperties, hasTrailingComma), literalProperties.length > 1)]));
47844
+ return import_typescript119.default.factory.createDecorator(import_typescript119.default.factory.createCallExpression(node.expression.expression, node.expression.typeArguments, [import_typescript119.default.factory.createObjectLiteralExpression(import_typescript119.default.factory.createNodeArray(literalProperties, hasTrailingComma), literalProperties.length > 1)]));
47791
47845
  }
47792
47846
  function isNamedPropertyAssignment(node) {
47793
- return import_typescript118.default.isPropertyAssignment(node) && node.name && import_typescript118.default.isIdentifier(node.name);
47847
+ return import_typescript119.default.isPropertyAssignment(node) && node.name && import_typescript119.default.isIdentifier(node.name);
47794
47848
  }
47795
47849
  function findImportLocation(target, inComponent, importMode, typeChecker) {
47796
47850
  const importLocations = typeChecker.getPotentialImportsFor(target, inComponent, importMode);
@@ -47810,14 +47864,14 @@ function findImportLocation(target, inComponent, importMode, typeChecker) {
47810
47864
  return firstSameFileImport || firstModuleImport || importLocations[0] || null;
47811
47865
  }
47812
47866
  function hasNgModuleMetadataElements(node) {
47813
- return import_typescript118.default.isPropertyAssignment(node) && (!import_typescript118.default.isArrayLiteralExpression(node.initializer) || node.initializer.elements.length > 0);
47867
+ return import_typescript119.default.isPropertyAssignment(node) && (!import_typescript119.default.isArrayLiteralExpression(node.initializer) || node.initializer.elements.length > 0);
47814
47868
  }
47815
47869
  function findNgModuleClassesToMigrate(sourceFile, typeChecker) {
47816
47870
  const modules = [];
47817
47871
  if (getImportSpecifier(sourceFile, "@angular/core", "NgModule")) {
47818
47872
  sourceFile.forEachChild(function walk(node) {
47819
- if (import_typescript118.default.isClassDeclaration(node)) {
47820
- const decorator = getAngularDecorators(typeChecker, import_typescript118.default.getDecorators(node) || []).find((current) => current.name === "NgModule");
47873
+ if (import_typescript119.default.isClassDeclaration(node)) {
47874
+ const decorator = getAngularDecorators(typeChecker, import_typescript119.default.getDecorators(node) || []).find((current) => current.name === "NgModule");
47821
47875
  const metadata = decorator ? extractMetadataLiteral(decorator.node) : null;
47822
47876
  if (metadata) {
47823
47877
  const declarations = findLiteralProperty(metadata, "declarations");
@@ -47837,8 +47891,8 @@ function findTestObjectsToMigrate(sourceFile, typeChecker) {
47837
47891
  const catalystImport = getImportSpecifier(sourceFile, /testing\/catalyst$/, "setupModule");
47838
47892
  if (testBedImport || catalystImport) {
47839
47893
  sourceFile.forEachChild(function walk(node) {
47840
- if (import_typescript118.default.isCallExpression(node) && node.arguments.length > 0 && import_typescript118.default.isObjectLiteralExpression(node.arguments[0])) {
47841
- if (testBedImport && import_typescript118.default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "configureTestingModule" && isReferenceToImport(typeChecker, node.expression.expression, testBedImport) || catalystImport && import_typescript118.default.isIdentifier(node.expression) && isReferenceToImport(typeChecker, node.expression, catalystImport)) {
47894
+ if (import_typescript119.default.isCallExpression(node) && node.arguments.length > 0 && import_typescript119.default.isObjectLiteralExpression(node.arguments[0])) {
47895
+ if (testBedImport && import_typescript119.default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "configureTestingModule" && isReferenceToImport(typeChecker, node.expression.expression, testBedImport) || catalystImport && import_typescript119.default.isIdentifier(node.expression) && isReferenceToImport(typeChecker, node.expression, catalystImport)) {
47842
47896
  testObjects.push(node.arguments[0]);
47843
47897
  }
47844
47898
  }
@@ -47853,7 +47907,7 @@ function findTemplateDependencies(decl, typeChecker) {
47853
47907
  const usedPipes = typeChecker.getUsedPipes(decl);
47854
47908
  if (usedDirectives !== null) {
47855
47909
  for (const dir of usedDirectives) {
47856
- if (import_typescript118.default.isClassDeclaration(dir.ref.node)) {
47910
+ if (import_typescript119.default.isClassDeclaration(dir.ref.node)) {
47857
47911
  results.push(dir.ref);
47858
47912
  }
47859
47913
  }
@@ -47861,7 +47915,7 @@ function findTemplateDependencies(decl, typeChecker) {
47861
47915
  if (usedPipes !== null) {
47862
47916
  const potentialPipes = typeChecker.getPotentialPipes(decl);
47863
47917
  for (const pipe2 of potentialPipes) {
47864
- if (import_typescript118.default.isClassDeclaration(pipe2.ref.node) && usedPipes.some((current) => pipe2.name === current)) {
47918
+ if (import_typescript119.default.isClassDeclaration(pipe2.ref.node) && usedPipes.some((current) => pipe2.name === current)) {
47865
47919
  results.push(pipe2.ref);
47866
47920
  }
47867
47921
  }
@@ -47875,12 +47929,12 @@ function filterNonBootstrappedDeclarations(declarations, ngModule, templateTypeC
47875
47929
  if (!bootstrapProp) {
47876
47930
  return declarations;
47877
47931
  }
47878
- if (!import_typescript118.default.isPropertyAssignment(bootstrapProp) || !import_typescript118.default.isArrayLiteralExpression(bootstrapProp.initializer)) {
47932
+ if (!import_typescript119.default.isPropertyAssignment(bootstrapProp) || !import_typescript119.default.isArrayLiteralExpression(bootstrapProp.initializer)) {
47879
47933
  return [];
47880
47934
  }
47881
47935
  const bootstrappedClasses = /* @__PURE__ */ new Set();
47882
47936
  for (const el of bootstrapProp.initializer.elements) {
47883
- const referencedClass = import_typescript118.default.isIdentifier(el) ? findClassDeclaration(el, typeChecker) : null;
47937
+ const referencedClass = import_typescript119.default.isIdentifier(el) ? findClassDeclaration(el, typeChecker) : null;
47884
47938
  if (referencedClass) {
47885
47939
  bootstrappedClasses.add(referencedClass);
47886
47940
  } else {
@@ -47891,14 +47945,14 @@ function filterNonBootstrappedDeclarations(declarations, ngModule, templateTypeC
47891
47945
  }
47892
47946
  function extractDeclarationsFromModule(ngModule, templateTypeChecker) {
47893
47947
  const metadata = templateTypeChecker.getNgModuleMetadata(ngModule);
47894
- return metadata ? metadata.declarations.filter((decl) => import_typescript118.default.isClassDeclaration(decl.node)).map((decl) => decl.node) : [];
47948
+ return metadata ? metadata.declarations.filter((decl) => import_typescript119.default.isClassDeclaration(decl.node)).map((decl) => decl.node) : [];
47895
47949
  }
47896
47950
  function migrateTestDeclarations(testObjects, declarationsOutsideOfTestFiles, tracker, templateTypeChecker, typeChecker) {
47897
47951
  var _a2;
47898
47952
  const { decorators, componentImports } = analyzeTestingModules(testObjects, typeChecker);
47899
47953
  const allDeclarations = new Set(declarationsOutsideOfTestFiles);
47900
47954
  for (const decorator of decorators) {
47901
- const closestClass = closestNode(decorator.node, import_typescript118.default.isClassDeclaration);
47955
+ const closestClass = closestNode(decorator.node, import_typescript119.default.isClassDeclaration);
47902
47956
  if (decorator.name === "Pipe" || decorator.name === "Directive") {
47903
47957
  tracker.replaceNode(decorator.node, addStandaloneToDecorator(decorator.node));
47904
47958
  if (closestClass) {
@@ -47912,8 +47966,8 @@ function migrateTestDeclarations(testObjects, declarationsOutsideOfTestFiles, tr
47912
47966
  }
47913
47967
  if (importsToAdd && importsToAdd.size > 0) {
47914
47968
  const hasTrailingComma = importsToAdd.size > 2 && !!((_a2 = extractMetadataLiteral(decorator.node)) == null ? void 0 : _a2.properties.hasTrailingComma);
47915
- const importsArray = import_typescript118.default.factory.createNodeArray(Array.from(importsToAdd), hasTrailingComma);
47916
- tracker.replaceNode(decorator.node, addPropertyToAngularDecorator(newDecorator, import_typescript118.default.factory.createPropertyAssignment("imports", import_typescript118.default.factory.createArrayLiteralExpression(importsArray))));
47969
+ const importsArray = import_typescript119.default.factory.createNodeArray(Array.from(importsToAdd), hasTrailingComma);
47970
+ tracker.replaceNode(decorator.node, addPropertyToAngularDecorator(newDecorator, import_typescript119.default.factory.createPropertyAssignment("imports", import_typescript119.default.factory.createArrayLiteralExpression(importsArray))));
47917
47971
  } else {
47918
47972
  tracker.replaceNode(decorator.node, newDecorator);
47919
47973
  }
@@ -47934,13 +47988,13 @@ function analyzeTestingModules(testObjects, typeChecker) {
47934
47988
  }
47935
47989
  const importsProp = findLiteralProperty(obj, "imports");
47936
47990
  const importElements = importsProp && hasNgModuleMetadataElements(importsProp) ? importsProp.initializer.elements.filter((el) => {
47937
- return !import_typescript118.default.isCallExpression(el) && !isClassReferenceInAngularModule(el, /^BrowserAnimationsModule|NoopAnimationsModule$/, "platform-browser/animations", typeChecker);
47991
+ return !import_typescript119.default.isCallExpression(el) && !isClassReferenceInAngularModule(el, /^BrowserAnimationsModule|NoopAnimationsModule$/, "platform-browser/animations", typeChecker);
47938
47992
  }) : null;
47939
47993
  for (const decl of declarations) {
47940
47994
  if (seenDeclarations.has(decl)) {
47941
47995
  continue;
47942
47996
  }
47943
- const [decorator] = getAngularDecorators(typeChecker, import_typescript118.default.getDecorators(decl) || []);
47997
+ const [decorator] = getAngularDecorators(typeChecker, import_typescript119.default.getDecorators(decl) || []);
47944
47998
  if (decorator) {
47945
47999
  seenDeclarations.add(decl);
47946
48000
  decorators.push(decorator);
@@ -47971,7 +48025,7 @@ function extractDeclarationsFromTestObject(obj, typeChecker) {
47971
48025
  return results;
47972
48026
  }
47973
48027
  function extractMetadataLiteral(decorator) {
47974
- return import_typescript118.default.isCallExpression(decorator.expression) && decorator.expression.arguments.length === 1 && import_typescript118.default.isObjectLiteralExpression(decorator.expression.arguments[0]) ? decorator.expression.arguments[0] : null;
48028
+ return import_typescript119.default.isCallExpression(decorator.expression) && decorator.expression.arguments.length === 1 && import_typescript119.default.isObjectLiteralExpression(decorator.expression.arguments[0]) ? decorator.expression.arguments[0] : null;
47975
48029
  }
47976
48030
  function isStandaloneDeclaration(node, declarationsInMigration, templateTypeChecker) {
47977
48031
  if (declarationsInMigration.has(node)) {
@@ -47993,7 +48047,7 @@ function toStandaloneBootstrap(program, host, basePath, rootFileNames, sourceFil
47993
48047
  const additionalProviders = hasImport(program, rootFileNames, "protractor") ? /* @__PURE__ */ new Map([["provideProtractorTestingSupport", "@angular/platform-browser"]]) : null;
47994
48048
  for (const sourceFile of sourceFiles) {
47995
48049
  sourceFile.forEachChild(function walk(node) {
47996
- if (import_typescript119.default.isCallExpression(node) && import_typescript119.default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "bootstrapModule" && isClassReferenceInAngularModule(node.expression, "PlatformRef", "core", typeChecker)) {
48050
+ if (import_typescript120.default.isCallExpression(node) && import_typescript120.default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "bootstrapModule" && isClassReferenceInAngularModule(node.expression, "PlatformRef", "core", typeChecker)) {
47997
48051
  const call2 = analyzeBootstrapCall(node, typeChecker, templateTypeChecker);
47998
48052
  if (call2) {
47999
48053
  bootstrapCalls.push(call2);
@@ -48014,24 +48068,24 @@ function toStandaloneBootstrap(program, host, basePath, rootFileNames, sourceFil
48014
48068
  return tracker.recordChanges();
48015
48069
  }
48016
48070
  function analyzeBootstrapCall(call2, typeChecker, templateTypeChecker) {
48017
- if (call2.arguments.length === 0 || !import_typescript119.default.isIdentifier(call2.arguments[0])) {
48071
+ if (call2.arguments.length === 0 || !import_typescript120.default.isIdentifier(call2.arguments[0])) {
48018
48072
  return null;
48019
48073
  }
48020
48074
  const declaration = findClassDeclaration(call2.arguments[0], typeChecker);
48021
48075
  if (!declaration) {
48022
48076
  return null;
48023
48077
  }
48024
- const decorator = getAngularDecorators(typeChecker, import_typescript119.default.getDecorators(declaration) || []).find((decorator2) => decorator2.name === "NgModule");
48025
- if (!decorator || decorator.node.expression.arguments.length === 0 || !import_typescript119.default.isObjectLiteralExpression(decorator.node.expression.arguments[0])) {
48078
+ const decorator = getAngularDecorators(typeChecker, import_typescript120.default.getDecorators(declaration) || []).find((decorator2) => decorator2.name === "NgModule");
48079
+ if (!decorator || decorator.node.expression.arguments.length === 0 || !import_typescript120.default.isObjectLiteralExpression(decorator.node.expression.arguments[0])) {
48026
48080
  return null;
48027
48081
  }
48028
48082
  const metadata = decorator.node.expression.arguments[0];
48029
48083
  const bootstrapProp = findLiteralProperty(metadata, "bootstrap");
48030
- if (!bootstrapProp || !import_typescript119.default.isPropertyAssignment(bootstrapProp) || !import_typescript119.default.isArrayLiteralExpression(bootstrapProp.initializer) || bootstrapProp.initializer.elements.length === 0 || !import_typescript119.default.isIdentifier(bootstrapProp.initializer.elements[0])) {
48084
+ if (!bootstrapProp || !import_typescript120.default.isPropertyAssignment(bootstrapProp) || !import_typescript120.default.isArrayLiteralExpression(bootstrapProp.initializer) || bootstrapProp.initializer.elements.length === 0 || !import_typescript120.default.isIdentifier(bootstrapProp.initializer.elements[0])) {
48031
48085
  return null;
48032
48086
  }
48033
48087
  const component = findClassDeclaration(bootstrapProp.initializer.elements[0], typeChecker);
48034
- if (component && component.name && import_typescript119.default.isIdentifier(component.name)) {
48088
+ if (component && component.name && import_typescript120.default.isIdentifier(component.name)) {
48035
48089
  return {
48036
48090
  module: declaration,
48037
48091
  metadata,
@@ -48053,22 +48107,22 @@ function migrateBootstrapCall(analysis, tracker, additionalProviders, referenceR
48053
48107
  let nodeLookup = null;
48054
48108
  tracker.insertText(moduleSourceFile, analysis.metadata.getStart(), "/* TODO(standalone-migration): clean up removed NgModule class manually. \n");
48055
48109
  tracker.insertText(moduleSourceFile, analysis.metadata.getEnd(), " */");
48056
- if (providers && import_typescript119.default.isPropertyAssignment(providers)) {
48110
+ if (providers && import_typescript120.default.isPropertyAssignment(providers)) {
48057
48111
  nodeLookup = nodeLookup || getNodeLookup(moduleSourceFile);
48058
- if (import_typescript119.default.isArrayLiteralExpression(providers.initializer)) {
48112
+ if (import_typescript120.default.isArrayLiteralExpression(providers.initializer)) {
48059
48113
  providersInNewCall.push(...providers.initializer.elements);
48060
48114
  } else {
48061
- providersInNewCall.push(import_typescript119.default.factory.createSpreadElement(providers.initializer));
48115
+ providersInNewCall.push(import_typescript120.default.factory.createSpreadElement(providers.initializer));
48062
48116
  }
48063
48117
  addNodesToCopy(sourceFile, providers, nodeLookup, tracker, nodesToCopy, referenceResolver);
48064
48118
  }
48065
- if (imports && import_typescript119.default.isPropertyAssignment(imports)) {
48119
+ if (imports && import_typescript120.default.isPropertyAssignment(imports)) {
48066
48120
  nodeLookup = nodeLookup || getNodeLookup(moduleSourceFile);
48067
48121
  migrateImportsForBootstrapCall(sourceFile, imports, nodeLookup, moduleImportsInNewCall, providersInNewCall, tracker, nodesToCopy, referenceResolver, typeChecker);
48068
48122
  }
48069
48123
  if (additionalProviders) {
48070
48124
  additionalProviders.forEach((moduleSpecifier, name) => {
48071
- providersInNewCall.push(import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, name, moduleSpecifier), void 0, void 0));
48125
+ providersInNewCall.push(import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, name, moduleSpecifier), void 0, void 0));
48072
48126
  });
48073
48127
  }
48074
48128
  if (nodesToCopy.size > 0) {
@@ -48078,7 +48132,7 @@ function migrateBootstrapCall(analysis, tracker, additionalProviders, referenceR
48078
48132
  if (transformedNode === node) {
48079
48133
  text2 += transformedNode.getText() + "\n";
48080
48134
  } else {
48081
- text2 += printer.printNode(import_typescript119.default.EmitHint.Unspecified, transformedNode, node.getSourceFile());
48135
+ text2 += printer.printNode(import_typescript120.default.EmitHint.Unspecified, transformedNode, node.getSourceFile());
48082
48136
  }
48083
48137
  });
48084
48138
  text2 += "\n";
@@ -48095,31 +48149,31 @@ function replaceBootstrapCallExpression(analysis, providers, modules, tracker) {
48095
48149
  const combinedProviders = [];
48096
48150
  if (modules.length > 0) {
48097
48151
  const importProvidersExpression = tracker.addImport(sourceFile, "importProvidersFrom", "@angular/core");
48098
- combinedProviders.push(import_typescript119.default.factory.createCallExpression(importProvidersExpression, [], modules));
48152
+ combinedProviders.push(import_typescript120.default.factory.createCallExpression(importProvidersExpression, [], modules));
48099
48153
  }
48100
48154
  combinedProviders.push(...providers);
48101
- const providersArray = import_typescript119.default.factory.createNodeArray(combinedProviders, analysis.metadata.properties.hasTrailingComma && combinedProviders.length > 2);
48102
- const initializer = remapDynamicImports(sourceFile.fileName, import_typescript119.default.factory.createArrayLiteralExpression(providersArray, combinedProviders.length > 1));
48103
- args.push(import_typescript119.default.factory.createObjectLiteralExpression([import_typescript119.default.factory.createPropertyAssignment("providers", initializer)], true));
48155
+ const providersArray = import_typescript120.default.factory.createNodeArray(combinedProviders, analysis.metadata.properties.hasTrailingComma && combinedProviders.length > 2);
48156
+ const initializer = remapDynamicImports(sourceFile.fileName, import_typescript120.default.factory.createArrayLiteralExpression(providersArray, combinedProviders.length > 1));
48157
+ args.push(import_typescript120.default.factory.createObjectLiteralExpression([import_typescript120.default.factory.createPropertyAssignment("providers", initializer)], true));
48104
48158
  }
48105
48159
  tracker.replaceNode(
48106
48160
  analysis.call,
48107
- import_typescript119.default.factory.createCallExpression(bootstrapExpression, [], args),
48161
+ import_typescript120.default.factory.createCallExpression(bootstrapExpression, [], args),
48108
48162
  void 0,
48109
48163
  analysis.metadata.getSourceFile()
48110
48164
  );
48111
48165
  }
48112
48166
  function migrateImportsForBootstrapCall(sourceFile, imports, nodeLookup, importsForNewCall, providersInNewCall, tracker, nodesToCopy, referenceResolver, typeChecker) {
48113
- if (!import_typescript119.default.isArrayLiteralExpression(imports.initializer)) {
48167
+ if (!import_typescript120.default.isArrayLiteralExpression(imports.initializer)) {
48114
48168
  importsForNewCall.push(imports.initializer);
48115
48169
  return;
48116
48170
  }
48117
48171
  for (const element2 of imports.initializer.elements) {
48118
- if (import_typescript119.default.isCallExpression(element2) && import_typescript119.default.isPropertyAccessExpression(element2.expression) && element2.arguments.length > 0 && element2.expression.name.text === "forRoot" && isClassReferenceInAngularModule(element2.expression.expression, "RouterModule", "router", typeChecker)) {
48172
+ if (import_typescript120.default.isCallExpression(element2) && import_typescript120.default.isPropertyAccessExpression(element2.expression) && element2.arguments.length > 0 && element2.expression.name.text === "forRoot" && isClassReferenceInAngularModule(element2.expression.expression, "RouterModule", "router", typeChecker)) {
48119
48173
  const options = element2.arguments[1];
48120
48174
  const features = options ? getRouterModuleForRootFeatures(sourceFile, options, tracker) : [];
48121
48175
  if (features !== null) {
48122
- providersInNewCall.push(import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideRouter", "@angular/router"), [], [element2.arguments[0], ...features]));
48176
+ providersInNewCall.push(import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideRouter", "@angular/router"), [], [element2.arguments[0], ...features]));
48123
48177
  addNodesToCopy(sourceFile, element2.arguments[0], nodeLookup, tracker, nodesToCopy, referenceResolver);
48124
48178
  if (options) {
48125
48179
  addNodesToCopy(sourceFile, options, nodeLookup, tracker, nodesToCopy, referenceResolver);
@@ -48127,30 +48181,30 @@ function migrateImportsForBootstrapCall(sourceFile, imports, nodeLookup, imports
48127
48181
  continue;
48128
48182
  }
48129
48183
  }
48130
- if (import_typescript119.default.isIdentifier(element2)) {
48184
+ if (import_typescript120.default.isIdentifier(element2)) {
48131
48185
  const animationsModule = "platform-browser/animations";
48132
48186
  const animationsImport = `@angular/${animationsModule}`;
48133
48187
  if (isClassReferenceInAngularModule(element2, "BrowserAnimationsModule", animationsModule, typeChecker)) {
48134
- providersInNewCall.push(import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideAnimations", animationsImport), [], []));
48188
+ providersInNewCall.push(import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideAnimations", animationsImport), [], []));
48135
48189
  continue;
48136
48190
  }
48137
48191
  if (isClassReferenceInAngularModule(element2, "NoopAnimationsModule", animationsModule, typeChecker)) {
48138
- providersInNewCall.push(import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideNoopAnimations", animationsImport), [], []));
48192
+ providersInNewCall.push(import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideNoopAnimations", animationsImport), [], []));
48139
48193
  continue;
48140
48194
  }
48141
48195
  const httpClientModule = "common/http";
48142
48196
  const httpClientImport = `@angular/${httpClientModule}`;
48143
48197
  if (isClassReferenceInAngularModule(element2, "HttpClientModule", httpClientModule, typeChecker)) {
48144
48198
  const callArgs = [
48145
- import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, "withInterceptorsFromDi", httpClientImport), [], [])
48199
+ import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, "withInterceptorsFromDi", httpClientImport), [], [])
48146
48200
  ];
48147
- providersInNewCall.push(import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideHttpClient", httpClientImport), [], callArgs));
48201
+ providersInNewCall.push(import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, "provideHttpClient", httpClientImport), [], callArgs));
48148
48202
  continue;
48149
48203
  }
48150
48204
  }
48151
- const target = import_typescript119.default.isCallExpression(element2) && import_typescript119.default.isPropertyAccessExpression(element2.expression) ? element2.expression.expression : element2;
48205
+ const target = import_typescript120.default.isCallExpression(element2) && import_typescript120.default.isPropertyAccessExpression(element2.expression) ? element2.expression.expression : element2;
48152
48206
  const classDeclaration = findClassDeclaration(target, typeChecker);
48153
- const decorators = classDeclaration ? getAngularDecorators(typeChecker, import_typescript119.default.getDecorators(classDeclaration) || []) : void 0;
48207
+ const decorators = classDeclaration ? getAngularDecorators(typeChecker, import_typescript120.default.getDecorators(classDeclaration) || []) : void 0;
48154
48208
  if (!decorators || decorators.length === 0 || decorators.every(({ name }) => name !== "Directive" && name !== "Component" && name !== "Pipe")) {
48155
48209
  importsForNewCall.push(element2);
48156
48210
  addNodesToCopy(sourceFile, element2, nodeLookup, tracker, nodesToCopy, referenceResolver);
@@ -48158,7 +48212,7 @@ function migrateImportsForBootstrapCall(sourceFile, imports, nodeLookup, imports
48158
48212
  }
48159
48213
  }
48160
48214
  function getRouterModuleForRootFeatures(sourceFile, options, tracker) {
48161
- if (!import_typescript119.default.isObjectLiteralExpression(options)) {
48215
+ if (!import_typescript120.default.isObjectLiteralExpression(options)) {
48162
48216
  return null;
48163
48217
  }
48164
48218
  const featureExpressions = [];
@@ -48166,7 +48220,7 @@ function getRouterModuleForRootFeatures(sourceFile, options, tracker) {
48166
48220
  const inMemoryScrollingOptions = [];
48167
48221
  const features = new UniqueItemTracker();
48168
48222
  for (const prop of options.properties) {
48169
- if (!import_typescript119.default.isPropertyAssignment(prop) || !import_typescript119.default.isIdentifier(prop.name) && !import_typescript119.default.isStringLiteralLike(prop.name)) {
48223
+ if (!import_typescript120.default.isPropertyAssignment(prop) || !import_typescript120.default.isIdentifier(prop.name) && !import_typescript120.default.isStringLiteralLike(prop.name)) {
48170
48224
  return null;
48171
48225
  }
48172
48226
  switch (prop.name.text) {
@@ -48174,12 +48228,12 @@ function getRouterModuleForRootFeatures(sourceFile, options, tracker) {
48174
48228
  features.track("withPreloading", prop.initializer);
48175
48229
  break;
48176
48230
  case "enableTracing":
48177
- if (prop.initializer.kind === import_typescript119.default.SyntaxKind.TrueKeyword) {
48231
+ if (prop.initializer.kind === import_typescript120.default.SyntaxKind.TrueKeyword) {
48178
48232
  features.track("withDebugTracing", null);
48179
48233
  }
48180
48234
  break;
48181
48235
  case "initialNavigation":
48182
- if (!import_typescript119.default.isStringLiteralLike(prop.initializer)) {
48236
+ if (!import_typescript120.default.isStringLiteralLike(prop.initializer)) {
48183
48237
  return null;
48184
48238
  }
48185
48239
  if (prop.initializer.text === "enabledBlocking" || prop.initializer.text === "enabled") {
@@ -48189,7 +48243,7 @@ function getRouterModuleForRootFeatures(sourceFile, options, tracker) {
48189
48243
  }
48190
48244
  break;
48191
48245
  case "useHash":
48192
- if (prop.initializer.kind === import_typescript119.default.SyntaxKind.TrueKeyword) {
48246
+ if (prop.initializer.kind === import_typescript120.default.SyntaxKind.TrueKeyword) {
48193
48247
  features.track("withHashLocation", null);
48194
48248
  }
48195
48249
  break;
@@ -48206,10 +48260,10 @@ function getRouterModuleForRootFeatures(sourceFile, options, tracker) {
48206
48260
  }
48207
48261
  }
48208
48262
  if (inMemoryScrollingOptions.length > 0) {
48209
- features.track("withInMemoryScrolling", import_typescript119.default.factory.createObjectLiteralExpression(inMemoryScrollingOptions));
48263
+ features.track("withInMemoryScrolling", import_typescript120.default.factory.createObjectLiteralExpression(inMemoryScrollingOptions));
48210
48264
  }
48211
48265
  if (configOptions.length > 0) {
48212
- features.track("withRouterConfig", import_typescript119.default.factory.createObjectLiteralExpression(configOptions));
48266
+ features.track("withRouterConfig", import_typescript120.default.factory.createObjectLiteralExpression(configOptions));
48213
48267
  }
48214
48268
  for (const [feature, featureArgs] of features.getEntries()) {
48215
48269
  const callArgs = [];
@@ -48218,25 +48272,25 @@ function getRouterModuleForRootFeatures(sourceFile, options, tracker) {
48218
48272
  callArgs.push(arg);
48219
48273
  }
48220
48274
  });
48221
- featureExpressions.push(import_typescript119.default.factory.createCallExpression(tracker.addImport(sourceFile, feature, "@angular/router"), [], callArgs));
48275
+ featureExpressions.push(import_typescript120.default.factory.createCallExpression(tracker.addImport(sourceFile, feature, "@angular/router"), [], callArgs));
48222
48276
  }
48223
48277
  return featureExpressions;
48224
48278
  }
48225
48279
  function addNodesToCopy(targetFile, rootNode, nodeLookup, tracker, nodesToCopy, referenceResolver) {
48226
48280
  const refs = findAllSameFileReferences(rootNode, nodeLookup, referenceResolver);
48227
48281
  for (const ref of refs) {
48228
- const importSpecifier = closestOrSelf(ref, import_typescript119.default.isImportSpecifier);
48229
- const importDeclaration = importSpecifier ? closestNode(importSpecifier, import_typescript119.default.isImportDeclaration) : null;
48230
- if (importDeclaration && importSpecifier && import_typescript119.default.isStringLiteralLike(importDeclaration.moduleSpecifier)) {
48282
+ const importSpecifier = closestOrSelf(ref, import_typescript120.default.isImportSpecifier);
48283
+ const importDeclaration = importSpecifier ? closestNode(importSpecifier, import_typescript120.default.isImportDeclaration) : null;
48284
+ if (importDeclaration && importSpecifier && import_typescript120.default.isStringLiteralLike(importDeclaration.moduleSpecifier)) {
48231
48285
  const moduleName = importDeclaration.moduleSpecifier.text.startsWith(".") ? remapRelativeImport(targetFile.fileName, importDeclaration.moduleSpecifier) : importDeclaration.moduleSpecifier.text;
48232
48286
  const symbolName = importSpecifier.propertyName ? importSpecifier.propertyName.text : importSpecifier.name.text;
48233
48287
  const alias = importSpecifier.propertyName ? importSpecifier.name.text : null;
48234
48288
  tracker.addImport(targetFile, symbolName, moduleName, alias);
48235
48289
  continue;
48236
48290
  }
48237
- const variableDeclaration = closestOrSelf(ref, import_typescript119.default.isVariableDeclaration);
48238
- const variableStatement = variableDeclaration ? closestNode(variableDeclaration, import_typescript119.default.isVariableStatement) : null;
48239
- if (variableDeclaration && variableStatement && import_typescript119.default.isIdentifier(variableDeclaration.name)) {
48291
+ const variableDeclaration = closestOrSelf(ref, import_typescript120.default.isVariableDeclaration);
48292
+ const variableStatement = variableDeclaration ? closestNode(variableDeclaration, import_typescript120.default.isVariableStatement) : null;
48293
+ if (variableDeclaration && variableStatement && import_typescript120.default.isIdentifier(variableDeclaration.name)) {
48240
48294
  if (isExported(variableStatement)) {
48241
48295
  tracker.addImport(targetFile, variableDeclaration.name.text, getRelativeImportPath(targetFile.fileName, ref.getSourceFile().fileName));
48242
48296
  } else {
@@ -48277,7 +48331,7 @@ function findAllSameFileReferences(rootNode, nodeLookup, referenceResolver) {
48277
48331
  if (!closestTopLevel || traversedTopLevelNodes.has(closestTopLevel)) {
48278
48332
  continue;
48279
48333
  }
48280
- if (!import_typescript119.default.isImportDeclaration(closestTopLevel) && isOutsideRange(excludeStart, excludeEnd, closestTopLevel.getStart(), closestTopLevel.getEnd())) {
48334
+ if (!import_typescript120.default.isImportDeclaration(closestTopLevel) && isOutsideRange(excludeStart, excludeEnd, closestTopLevel.getStart(), closestTopLevel.getEnd())) {
48281
48335
  traversedTopLevelNodes.add(closestTopLevel);
48282
48336
  walk(closestTopLevel);
48283
48337
  }
@@ -48298,25 +48352,25 @@ function referencesToNodeWithinSameFile(node, nodeLookup, excludeStart, excludeE
48298
48352
  function remapDynamicImports(targetFileName, rootNode) {
48299
48353
  let hasChanged = false;
48300
48354
  const transformer = (context) => {
48301
- return (sourceFile) => import_typescript119.default.visitNode(sourceFile, function walk(node) {
48302
- if (import_typescript119.default.isCallExpression(node) && node.expression.kind === import_typescript119.default.SyntaxKind.ImportKeyword && node.arguments.length > 0 && import_typescript119.default.isStringLiteralLike(node.arguments[0]) && node.arguments[0].text.startsWith(".")) {
48355
+ return (sourceFile) => import_typescript120.default.visitNode(sourceFile, function walk(node) {
48356
+ if (import_typescript120.default.isCallExpression(node) && node.expression.kind === import_typescript120.default.SyntaxKind.ImportKeyword && node.arguments.length > 0 && import_typescript120.default.isStringLiteralLike(node.arguments[0]) && node.arguments[0].text.startsWith(".")) {
48303
48357
  hasChanged = true;
48304
48358
  return context.factory.updateCallExpression(node, node.expression, node.typeArguments, [
48305
48359
  context.factory.createStringLiteral(remapRelativeImport(targetFileName, node.arguments[0])),
48306
48360
  ...node.arguments.slice(1)
48307
48361
  ]);
48308
48362
  }
48309
- return import_typescript119.default.visitEachChild(node, walk, context);
48363
+ return import_typescript120.default.visitEachChild(node, walk, context);
48310
48364
  });
48311
48365
  };
48312
- const result = import_typescript119.default.transform(rootNode, [transformer]).transformed[0];
48366
+ const result = import_typescript120.default.transform(rootNode, [transformer]).transformed[0];
48313
48367
  return hasChanged ? result : rootNode;
48314
48368
  }
48315
48369
  function isTopLevelStatement(node) {
48316
- return node.parent != null && import_typescript119.default.isSourceFile(node.parent);
48370
+ return node.parent != null && import_typescript120.default.isSourceFile(node.parent);
48317
48371
  }
48318
48372
  function isReferenceIdentifier(node) {
48319
- return import_typescript119.default.isIdentifier(node) && (!import_typescript119.default.isPropertyAssignment(node.parent) && !import_typescript119.default.isParameter(node.parent) || node.parent.name !== node);
48373
+ return import_typescript120.default.isIdentifier(node) && (!import_typescript120.default.isPropertyAssignment(node.parent) && !import_typescript120.default.isParameter(node.parent) || node.parent.name !== node);
48320
48374
  }
48321
48375
  function isOutsideRange(excludeStart, excludeEnd, start, end) {
48322
48376
  return start < excludeStart && end < excludeStart || start > excludeEnd;
@@ -48325,15 +48379,15 @@ function remapRelativeImport(targetFileName, specifier) {
48325
48379
  return getRelativeImportPath(targetFileName, (0, import_path7.join)((0, import_path7.dirname)(specifier.getSourceFile().fileName), specifier.text));
48326
48380
  }
48327
48381
  function isExported(node) {
48328
- return import_typescript119.default.canHaveModifiers(node) && node.modifiers ? node.modifiers.some((modifier) => modifier.kind === import_typescript119.default.SyntaxKind.ExportKeyword) : false;
48382
+ return import_typescript120.default.canHaveModifiers(node) && node.modifiers ? node.modifiers.some((modifier) => modifier.kind === import_typescript120.default.SyntaxKind.ExportKeyword) : false;
48329
48383
  }
48330
48384
  function isExportableDeclaration(node) {
48331
- return import_typescript119.default.isEnumDeclaration(node) || import_typescript119.default.isClassDeclaration(node) || import_typescript119.default.isFunctionDeclaration(node) || import_typescript119.default.isInterfaceDeclaration(node) || import_typescript119.default.isTypeAliasDeclaration(node);
48385
+ return import_typescript120.default.isEnumDeclaration(node) || import_typescript120.default.isClassDeclaration(node) || import_typescript120.default.isFunctionDeclaration(node) || import_typescript120.default.isInterfaceDeclaration(node) || import_typescript120.default.isTypeAliasDeclaration(node);
48332
48386
  }
48333
48387
  function getLastImportEnd(sourceFile) {
48334
48388
  let index = 0;
48335
48389
  for (const statement of sourceFile.statements) {
48336
- if (import_typescript119.default.isImportDeclaration(statement)) {
48390
+ if (import_typescript120.default.isImportDeclaration(statement)) {
48337
48391
  index = Math.max(index, statement.getEnd());
48338
48392
  } else {
48339
48393
  break;
@@ -48350,7 +48404,7 @@ function hasImport(program, rootFileNames, moduleName) {
48350
48404
  continue;
48351
48405
  }
48352
48406
  for (const statement of sourceFile.statements) {
48353
- if (import_typescript119.default.isImportDeclaration(statement) && import_typescript119.default.isStringLiteralLike(statement.moduleSpecifier) && (statement.moduleSpecifier.text === moduleName || statement.moduleSpecifier.text.startsWith(deepImportStart))) {
48407
+ if (import_typescript120.default.isImportDeclaration(statement) && import_typescript120.default.isStringLiteralLike(statement.moduleSpecifier) && (statement.moduleSpecifier.text === moduleName || statement.moduleSpecifier.text.startsWith(deepImportStart))) {
48354
48408
  return true;
48355
48409
  }
48356
48410
  }
@@ -48398,7 +48452,7 @@ function standaloneMigration(tree, tsconfigPath, basePath, pathToMigrate, schema
48398
48452
  });
48399
48453
  const referenceLookupExcludedFiles = /node_modules|\.ngtypecheck\.ts/;
48400
48454
  const program = createProgram({ rootNames, host, options, oldProgram });
48401
- const printer = import_typescript120.default.createPrinter();
48455
+ const printer = import_typescript121.default.createPrinter();
48402
48456
  if ((0, import_fs2.existsSync)(pathToMigrate) && !(0, import_fs2.statSync)(pathToMigrate).isDirectory()) {
48403
48457
  throw new import_schematics.SchematicsException(`Migration path ${pathToMigrate} has to be a directory. Cannot run the standalone migration.`);
48404
48458
  }