@angular/compiler-cli 17.1.1 → 17.2.0-next.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 (37) hide show
  1. package/bundles/{chunk-7MBQJYBK.js → chunk-455YOO3E.js} +4 -4
  2. package/bundles/{chunk-7MBQJYBK.js.map → chunk-455YOO3E.js.map} +1 -1
  3. package/bundles/{chunk-LD7OKX22.js → chunk-6RVHVK7X.js} +5 -4
  4. package/bundles/chunk-6RVHVK7X.js.map +6 -0
  5. package/bundles/{chunk-VTJUF2MM.js → chunk-SIMT2UHI.js} +2 -2
  6. package/bundles/{chunk-22WKDIPL.js → chunk-U6M6KQUQ.js} +5 -4
  7. package/bundles/chunk-U6M6KQUQ.js.map +6 -0
  8. package/bundles/{chunk-TQYIA5ZM.js → chunk-VYUC5NTT.js} +12 -6
  9. package/bundles/chunk-VYUC5NTT.js.map +6 -0
  10. package/bundles/{chunk-TNWTCE6C.js → chunk-YJ2WTOVI.js} +332 -153
  11. package/bundles/chunk-YJ2WTOVI.js.map +6 -0
  12. package/bundles/index.js +5 -5
  13. package/bundles/linker/babel/index.js +2 -2
  14. package/bundles/linker/index.js +2 -2
  15. package/bundles/private/migrations.js +2 -2
  16. package/bundles/private/tooling.js +3 -3
  17. package/bundles/src/bin/ng_xi18n.js +4 -4
  18. package/bundles/src/bin/ngc.js +4 -4
  19. package/bundles_metadata.json +1 -1
  20. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  21. package/package.json +3 -3
  22. package/src/bin/ng_xi18n.d.ts +0 -1
  23. package/src/bin/ngc.d.ts +0 -1
  24. package/src/ngtsc/annotations/common/src/util.d.ts +5 -2
  25. package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +44 -0
  26. package/src/ngtsc/annotations/directive/src/input_function.d.ts +1 -1
  27. package/src/ngtsc/annotations/directive/src/query_functions.d.ts +26 -0
  28. package/src/ngtsc/annotations/directive/src/shared.d.ts +1 -1
  29. package/src/ngtsc/diagnostics/src/error_code.d.ts +24 -7
  30. package/src/ngtsc/metadata/index.d.ts +1 -1
  31. package/src/ngtsc/metadata/src/api.d.ts +23 -3
  32. package/src/ngtsc/metadata/src/util.d.ts +2 -1
  33. package/bundles/chunk-22WKDIPL.js.map +0 -6
  34. package/bundles/chunk-LD7OKX22.js.map +0 -6
  35. package/bundles/chunk-TNWTCE6C.js.map +0 -6
  36. package/bundles/chunk-TQYIA5ZM.js.map +0 -6
  37. /package/bundles/{chunk-VTJUF2MM.js.map → chunk-SIMT2UHI.js.map} +0 -0
@@ -29,7 +29,7 @@ import {
29
29
  translateStatement,
30
30
  translateType,
31
31
  typeNodeToValueExpr
32
- } from "./chunk-22WKDIPL.js";
32
+ } from "./chunk-U6M6KQUQ.js";
33
33
  import {
34
34
  PerfEvent,
35
35
  PerfPhase
@@ -43,6 +43,7 @@ import {
43
43
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
44
44
  import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
45
45
  import ts from "typescript";
46
+ var CORE_MODULE = "@angular/core";
46
47
  function valueReferenceToExpression(valueRef) {
47
48
  if (valueRef.kind === 2) {
48
49
  return null;
@@ -73,10 +74,10 @@ function toR3Reference(origin, ref, context, refEmitter) {
73
74
  };
74
75
  }
75
76
  function isAngularCore(decorator) {
76
- return decorator.import !== null && decorator.import.from === "@angular/core";
77
+ return decorator.import !== null && decorator.import.from === CORE_MODULE;
77
78
  }
78
79
  function isAngularCoreReference(reference, symbolName) {
79
- return reference.ownedByModuleGuess === "@angular/core" && reference.debugName === symbolName;
80
+ return reference.ownedByModuleGuess === CORE_MODULE && reference.debugName === symbolName;
80
81
  }
81
82
  function findAngularDecorator(decorators, name, isCore) {
82
83
  return decorators.find((decorator) => isAngularDecorator(decorator, name, isCore));
@@ -89,6 +90,16 @@ function isAngularDecorator(decorator, name, isCore) {
89
90
  }
90
91
  return false;
91
92
  }
93
+ function getAngularDecorators(decorators, names, isCore) {
94
+ return decorators.filter((decorator) => {
95
+ var _a;
96
+ const name = isCore ? decorator.name : (_a = decorator.import) == null ? void 0 : _a.name;
97
+ if (name === void 0 || !names.includes(name)) {
98
+ return false;
99
+ }
100
+ return isCore || isAngularCore(decorator);
101
+ });
102
+ }
92
103
  function unwrapExpression(node) {
93
104
  while (ts.isAsExpression(node) || ts.isParenthesizedExpression(node)) {
94
105
  node = node.expression;
@@ -1627,6 +1638,9 @@ function hasInjectableFields(clazz, host) {
1627
1638
  const members = host.getMembersOfClass(clazz);
1628
1639
  return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
1629
1640
  }
1641
+ function isHostDirectiveMetaForGlobalMode(hostDirectiveMeta) {
1642
+ return hostDirectiveMeta.directive instanceof Reference;
1643
+ }
1630
1644
 
1631
1645
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1632
1646
  var DtsMetadataReader = class {
@@ -2058,6 +2072,9 @@ var HostDirectivesResolver = class {
2058
2072
  }
2059
2073
  walkHostDirectives(directives, results) {
2060
2074
  for (const current of directives) {
2075
+ if (!isHostDirectiveMetaForGlobalMode(current)) {
2076
+ throw new Error("Impossible state: resolving code path in local compilation mode");
2077
+ }
2061
2078
  const hostMeta = flattenInheritedDirectiveMetadata(this.metaReader, current.directive);
2062
2079
  if (hostMeta === null) {
2063
2080
  continue;
@@ -2181,6 +2198,9 @@ function getDirectiveDiagnostics(node, injectableRegistry, evaluator, reflector,
2181
2198
  function validateHostDirectives(origin, hostDirectives, metaReader) {
2182
2199
  const diagnostics = [];
2183
2200
  for (const current of hostDirectives) {
2201
+ if (!isHostDirectiveMetaForGlobalMode(current)) {
2202
+ throw new Error("Impossible state: diagnostics code path for local compilation");
2203
+ }
2184
2204
  const hostMeta = flattenInheritedDirectiveMetadata(metaReader, current.directive);
2185
2205
  if (hostMeta === null) {
2186
2206
  diagnostics.push(makeDiagnostic(ErrorCode.HOST_DIRECTIVE_INVALID, current.directive.getOriginForDiagnostics(origin), `${current.directive.debugName} must be a standalone directive to be used as a host directive`));
@@ -2199,6 +2219,9 @@ function validateHostDirectives(origin, hostDirectives, metaReader) {
2199
2219
  return diagnostics;
2200
2220
  }
2201
2221
  function validateHostDirectiveMappings(bindingType, hostDirectiveMeta, meta, origin, diagnostics, requiredBindings) {
2222
+ if (!isHostDirectiveMetaForGlobalMode(hostDirectiveMeta)) {
2223
+ throw new Error("Impossible state: diagnostics code path for local compilation");
2224
+ }
2202
2225
  const className = meta.name;
2203
2226
  const hostDirectiveMappings = bindingType === "input" ? hostDirectiveMeta.inputs : hostDirectiveMeta.outputs;
2204
2227
  const existingBindings = bindingType === "input" ? meta.inputs : meta.outputs;
@@ -2568,7 +2591,7 @@ function compileInputTransformFields(inputs) {
2568
2591
 
2569
2592
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
2570
2593
  import { compileClassDebugInfo, compileComponentClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation as ViewEncapsulation2, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
2571
- import ts25 from "typescript";
2594
+ import ts27 from "typescript";
2572
2595
 
2573
2596
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
2574
2597
  import ts10 from "typescript";
@@ -4375,12 +4398,15 @@ function nodeArrayFromDecoratorsArray(decorators) {
4375
4398
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
4376
4399
 
4377
4400
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4378
- import { createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4379
- import ts21 from "typescript";
4401
+ import { createMayBeForwardRefExpression as createMayBeForwardRefExpression2, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4402
+ import ts23 from "typescript";
4380
4403
 
4381
4404
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4405
+ import ts21 from "typescript";
4406
+
4407
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
4382
4408
  import ts20 from "typescript";
4383
- function tryParseInputInitializerAndOptions(member, reflector, coreModule) {
4409
+ function tryParseInitializerApiMember(fnNames, member, reflector, isCore) {
4384
4410
  if (member.value === null || !ts20.isCallExpression(member.value)) {
4385
4411
  return null;
4386
4412
  }
@@ -4389,25 +4415,28 @@ function tryParseInputInitializerAndOptions(member, reflector, coreModule) {
4389
4415
  if (target === null) {
4390
4416
  return null;
4391
4417
  }
4392
- if (target.text === "input") {
4393
- if (!isReferenceToInputFunction(target, coreModule, reflector)) {
4418
+ let apiName = fnNames.find((n) => n === target.text);
4419
+ if (apiName !== void 0) {
4420
+ if (!isReferenceToInitializerApiFunction(apiName, target, isCore, reflector)) {
4394
4421
  return null;
4395
4422
  }
4396
- const optionsNode2 = call.arguments[1];
4397
- return { inputCall: call, optionsNode: optionsNode2, isRequired: false };
4423
+ return { apiName, call, isRequired: false };
4398
4424
  }
4399
4425
  if (target.text !== "required" || !ts20.isPropertyAccessExpression(call.expression)) {
4400
4426
  return null;
4401
4427
  }
4402
- const inputCall = call.expression;
4403
- target = extractPropertyTarget(inputCall.expression);
4404
- if (target === null || !isReferenceToInputFunction(target, coreModule, reflector)) {
4428
+ const apiPropertyAccess = call.expression;
4429
+ target = extractPropertyTarget(apiPropertyAccess.expression);
4430
+ if (target === null) {
4431
+ return null;
4432
+ }
4433
+ apiName = fnNames.find((n) => n === target.text);
4434
+ if (apiName === void 0 || !isReferenceToInitializerApiFunction(apiName, target, isCore, reflector)) {
4405
4435
  return null;
4406
4436
  }
4407
- const optionsNode = call.arguments[0];
4408
4437
  return {
4409
- inputCall: call,
4410
- optionsNode,
4438
+ apiName,
4439
+ call,
4411
4440
  isRequired: true
4412
4441
  };
4413
4442
  }
@@ -4419,38 +4448,40 @@ function extractPropertyTarget(node) {
4419
4448
  }
4420
4449
  return null;
4421
4450
  }
4422
- function isReferenceToInputFunction(target, coreModule, reflector) {
4451
+ function isReferenceToInitializerApiFunction(functionName, target, isCore, reflector) {
4423
4452
  let targetImport = reflector.getImportOfIdentifier(target);
4424
4453
  if (targetImport === null) {
4425
- if (coreModule !== void 0) {
4454
+ if (!isCore) {
4426
4455
  return false;
4427
4456
  }
4428
- targetImport = { name: target.text };
4457
+ targetImport = { name: target.text, from: CORE_MODULE };
4429
4458
  }
4430
- return targetImport.name === "input";
4459
+ return targetImport.name === functionName && targetImport.from === CORE_MODULE;
4431
4460
  }
4461
+
4462
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4432
4463
  function parseAndValidateOptions(optionsNode) {
4433
- if (!ts20.isObjectLiteralExpression(optionsNode)) {
4464
+ if (!ts21.isObjectLiteralExpression(optionsNode)) {
4434
4465
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal that is statically analyzable.");
4435
4466
  }
4436
4467
  const options = reflectObjectLiteral(optionsNode);
4437
4468
  let alias = void 0;
4438
4469
  if (options.has("alias")) {
4439
4470
  const aliasExpr = options.get("alias");
4440
- if (!ts20.isStringLiteralLike(aliasExpr)) {
4471
+ if (!ts21.isStringLiteralLike(aliasExpr)) {
4441
4472
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, aliasExpr, "Alias needs to be a string that is statically analyzable.");
4442
4473
  }
4443
4474
  alias = aliasExpr.text;
4444
4475
  }
4445
4476
  return { alias };
4446
4477
  }
4447
- function tryParseSignalInputMapping(member, reflector, coreModule) {
4478
+ function tryParseSignalInputMapping(member, reflector, isCore) {
4448
4479
  var _a;
4449
- const signalInput = tryParseInputInitializerAndOptions(member, reflector, coreModule);
4480
+ const signalInput = tryParseInitializerApiMember(["input"], member, reflector, isCore);
4450
4481
  if (signalInput === null) {
4451
4482
  return null;
4452
4483
  }
4453
- const optionsNode = signalInput.optionsNode;
4484
+ const optionsNode = signalInput.isRequired ? signalInput.call.arguments[0] : signalInput.call.arguments[1];
4454
4485
  const options = optionsNode !== void 0 ? parseAndValidateOptions(optionsNode) : null;
4455
4486
  const classPropertyName = member.name;
4456
4487
  return {
@@ -4462,14 +4493,69 @@ function tryParseSignalInputMapping(member, reflector, coreModule) {
4462
4493
  };
4463
4494
  }
4464
4495
 
4496
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
4497
+ import { createMayBeForwardRefExpression, outputAst as o } from "@angular/compiler";
4498
+ import ts22 from "typescript";
4499
+ var queryFunctionNames = ["viewChild", "viewChildren", "contentChild", "contentChildren"];
4500
+ var defaultDescendantsValue = (type) => type !== "contentChildren";
4501
+ function tryParseSignalQueryFromInitializer(member, reflector, isCore) {
4502
+ const query = tryParseInitializerApiMember(queryFunctionNames, member, reflector, isCore);
4503
+ if (query === null) {
4504
+ return null;
4505
+ }
4506
+ const isSingleQuery = query.apiName === "viewChild" || query.apiName === "contentChild";
4507
+ const predicateNode = query.call.arguments[0];
4508
+ if (predicateNode === void 0) {
4509
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, query.call, "No locator specified.");
4510
+ }
4511
+ const optionsNode = query.call.arguments[1];
4512
+ if (optionsNode !== void 0 && !ts22.isObjectLiteralExpression(optionsNode)) {
4513
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal.");
4514
+ }
4515
+ const options = optionsNode && reflectObjectLiteral(optionsNode);
4516
+ const read = (options == null ? void 0 : options.has("read")) ? parseReadOption(options.get("read")) : null;
4517
+ const descendants = (options == null ? void 0 : options.has("descendants")) ? parseDescendantsOption(options.get("descendants")) : defaultDescendantsValue(query.apiName);
4518
+ return {
4519
+ name: query.apiName,
4520
+ call: query.call,
4521
+ metadata: {
4522
+ isSignal: true,
4523
+ propertyName: member.name,
4524
+ static: false,
4525
+ emitDistinctChangesOnly: true,
4526
+ predicate: parseLocator(predicateNode, reflector),
4527
+ first: isSingleQuery,
4528
+ read,
4529
+ descendants
4530
+ }
4531
+ };
4532
+ }
4533
+ function parseLocator(expression, reflector) {
4534
+ const unwrappedExpression = tryUnwrapForwardRef(expression, reflector);
4535
+ if (unwrappedExpression !== null) {
4536
+ expression = unwrappedExpression;
4537
+ }
4538
+ if (ts22.isStringLiteralLike(expression)) {
4539
+ return [expression.text];
4540
+ }
4541
+ return createMayBeForwardRefExpression(new o.WrappedNodeExpr(expression), unwrappedExpression !== null ? 2 : 0);
4542
+ }
4543
+ function parseReadOption(value) {
4544
+ return new o.WrappedNodeExpr(value);
4545
+ }
4546
+ function parseDescendantsOption(value) {
4547
+ if (value.kind === ts22.SyntaxKind.TrueKeyword) {
4548
+ return true;
4549
+ } else if (value.kind === ts22.SyntaxKind.FalseKeyword) {
4550
+ return false;
4551
+ }
4552
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
4553
+ }
4554
+
4465
4555
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4466
4556
  var EMPTY_OBJECT = {};
4467
- var QUERY_TYPES = /* @__PURE__ */ new Set([
4468
- "ContentChild",
4469
- "ContentChildren",
4470
- "ViewChild",
4471
- "ViewChildren"
4472
- ]);
4557
+ var queryDecoratorNames = ["ViewChild", "ViewChildren", "ContentChild", "ContentChildren"];
4558
+ var QUERY_TYPES = new Set(queryDecoratorNames);
4473
4559
  function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector = null) {
4474
4560
  let directive;
4475
4561
  if (decorator.args === null || decorator.args.length === 0) {
@@ -4478,7 +4564,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4478
4564
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @${decorator.name} decorator`);
4479
4565
  } else {
4480
4566
  const meta = unwrapExpression(decorator.args[0]);
4481
- if (!ts21.isObjectLiteralExpression(meta)) {
4567
+ if (!ts23.isObjectLiteralExpression(meta)) {
4482
4568
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `@${decorator.name} argument must be an object literal`);
4483
4569
  }
4484
4570
  directive = reflectObjectLiteral(meta);
@@ -4490,21 +4576,23 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4490
4576
  const decoratedElements = members.filter((member) => !member.isStatic && member.decorators !== null);
4491
4577
  const coreModule = isCore ? void 0 : "@angular/core";
4492
4578
  const inputsFromMeta = parseInputsArray(clazz, directive, evaluator, reflector, refEmitter, compilationMode);
4493
- const inputsFromFields = parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule, compilationMode, inputsFromMeta, decorator);
4579
+ const inputsFromFields = parseInputFields(clazz, members, evaluator, reflector, refEmitter, isCore, compilationMode, inputsFromMeta, decorator);
4494
4580
  const inputs = ClassPropertyMapping.fromMappedObject({ ...inputsFromMeta, ...inputsFromFields });
4495
4581
  const outputsFromMeta = parseOutputsArray(directive, evaluator);
4496
4582
  const outputsFromFields = parseOutputFields(filterToMembersWithDecorator(decoratedElements, "Output", coreModule), evaluator);
4497
4583
  const outputs = ClassPropertyMapping.fromMappedObject({ ...outputsFromMeta, ...outputsFromFields });
4498
- const contentChildFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ContentChild", coreModule), reflector, evaluator);
4499
- const contentChildrenFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ContentChildren", coreModule), reflector, evaluator);
4500
- const queries = [...contentChildFromFields, ...contentChildrenFromFields];
4501
- const viewChildFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ViewChild", coreModule), reflector, evaluator);
4502
- const viewChildrenFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ViewChildren", coreModule), reflector, evaluator);
4503
- const viewQueries = [...viewChildFromFields, ...viewChildrenFromFields];
4584
+ const { viewQueries, contentQueries } = parseQueriesOfClassFields(members, reflector, evaluator, isCore);
4504
4585
  if (directive.has("queries")) {
4586
+ const signalQueryFields = new Set([...viewQueries, ...contentQueries].filter((q) => q.isSignal).map((q) => q.propertyName));
4505
4587
  const queriesFromDecorator = extractQueriesFromDecorator(directive.get("queries"), reflector, evaluator, isCore);
4506
- queries.push(...queriesFromDecorator.content);
4507
- viewQueries.push(...queriesFromDecorator.view);
4588
+ const checkAndUnwrapQuery = (q) => {
4589
+ if (signalQueryFields.has(q.metadata.propertyName)) {
4590
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DECORATOR_METADATA_COLLISION, q.expr, `Query is declared multiple times. "@${decorator.name}" declares a query for the same property.`);
4591
+ }
4592
+ return q.metadata;
4593
+ };
4594
+ contentQueries.push(...queriesFromDecorator.content.map((q) => checkAndUnwrapQuery(q)));
4595
+ viewQueries.push(...queriesFromDecorator.view.map((q) => checkAndUnwrapQuery(q)));
4508
4596
  }
4509
4597
  let selector = defaultSelector;
4510
4598
  if (directive.has("selector")) {
@@ -4555,9 +4643,14 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4555
4643
  const sourceFile = clazz.getSourceFile();
4556
4644
  const type = wrapTypeReference(reflector, clazz);
4557
4645
  const rawHostDirectives = directive.get("hostDirectives") || null;
4558
- const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator);
4559
- if (hostDirectives !== null) {
4560
- referencesRegistry.add(clazz, ...hostDirectives.map((hostDir) => hostDir.directive));
4646
+ const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator, compilationMode);
4647
+ if (compilationMode !== CompilationMode.LOCAL && hostDirectives !== null) {
4648
+ referencesRegistry.add(clazz, ...hostDirectives.map((hostDir) => {
4649
+ if (!isHostDirectiveMetaForGlobalMode(hostDir)) {
4650
+ throw new Error("Impossible state");
4651
+ }
4652
+ return hostDir.directive;
4653
+ }));
4561
4654
  }
4562
4655
  const metadata = {
4563
4656
  name: clazz.name.text,
@@ -4568,7 +4661,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4568
4661
  },
4569
4662
  inputs: inputs.toJointMappedObject(toR3InputMetadata),
4570
4663
  outputs: outputs.toDirectMappedObject(),
4571
- queries,
4664
+ queries: contentQueries,
4572
4665
  viewQueries,
4573
4666
  selector,
4574
4667
  fullInheritance: false,
@@ -4592,7 +4685,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4592
4685
  rawHostDirectives
4593
4686
  };
4594
4687
  }
4595
- function extractQueryMetadata(exprNode, name, args, propertyName, reflector, evaluator) {
4688
+ function extractDecoratorQueryMetadata(exprNode, name, args, propertyName, reflector, evaluator) {
4596
4689
  if (args.length === 0) {
4597
4690
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, exprNode, `@${name} must have arguments`);
4598
4691
  }
@@ -4603,7 +4696,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4603
4696
  let isStatic = false;
4604
4697
  let predicate = null;
4605
4698
  if (arg instanceof Reference || arg instanceof DynamicValue) {
4606
- predicate = createMayBeForwardRefExpression(new WrappedNodeExpr5(node), forwardReferenceTarget !== null ? 2 : 0);
4699
+ predicate = createMayBeForwardRefExpression2(new WrappedNodeExpr5(node), forwardReferenceTarget !== null ? 2 : 0);
4607
4700
  } else if (typeof arg === "string") {
4608
4701
  predicate = [arg];
4609
4702
  } else if (isStringArrayOrDie(arg, `@${name} predicate`, node)) {
@@ -4616,7 +4709,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4616
4709
  let emitDistinctChangesOnly = emitDistinctChangesOnlyDefaultValue;
4617
4710
  if (args.length === 2) {
4618
4711
  const optionsExpr = unwrapExpression(args[1]);
4619
- if (!ts21.isObjectLiteralExpression(optionsExpr)) {
4712
+ if (!ts23.isObjectLiteralExpression(optionsExpr)) {
4620
4713
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, optionsExpr, `@${name} options must be an object literal`);
4621
4714
  }
4622
4715
  const options = reflectObjectLiteral(optionsExpr);
@@ -4650,6 +4743,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4650
4743
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, node, `@${name} has too many arguments`);
4651
4744
  }
4652
4745
  return {
4746
+ isSignal: false,
4653
4747
  propertyName,
4654
4748
  predicate,
4655
4749
  first,
@@ -4710,28 +4804,29 @@ function extractHostBindings(members, evaluator, coreModule, metadata) {
4710
4804
  return bindings;
4711
4805
  }
4712
4806
  function extractQueriesFromDecorator(queryData, reflector, evaluator, isCore) {
4713
- const content = [], view = [];
4714
- if (!ts21.isObjectLiteralExpression(queryData)) {
4807
+ const content = [];
4808
+ const view = [];
4809
+ if (!ts23.isObjectLiteralExpression(queryData)) {
4715
4810
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator queries metadata must be an object literal");
4716
4811
  }
4717
4812
  reflectObjectLiteral(queryData).forEach((queryExpr, propertyName) => {
4718
4813
  queryExpr = unwrapExpression(queryExpr);
4719
- if (!ts21.isNewExpression(queryExpr)) {
4814
+ if (!ts23.isNewExpression(queryExpr)) {
4720
4815
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4721
4816
  }
4722
- const queryType = ts21.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4723
- if (!ts21.isIdentifier(queryType)) {
4817
+ const queryType = ts23.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4818
+ if (!ts23.isIdentifier(queryType)) {
4724
4819
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4725
4820
  }
4726
4821
  const type = reflector.getImportOfIdentifier(queryType);
4727
4822
  if (type === null || !isCore && type.from !== "@angular/core" || !QUERY_TYPES.has(type.name)) {
4728
4823
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4729
4824
  }
4730
- const query = extractQueryMetadata(queryExpr, type.name, queryExpr.arguments || [], propertyName, reflector, evaluator);
4825
+ const query = extractDecoratorQueryMetadata(queryExpr, type.name, queryExpr.arguments || [], propertyName, reflector, evaluator);
4731
4826
  if (type.name.startsWith("Content")) {
4732
- content.push(query);
4827
+ content.push({ expr: queryExpr, metadata: query });
4733
4828
  } else {
4734
- view.push(query);
4829
+ view.push({ expr: queryExpr, metadata: query });
4735
4830
  }
4736
4831
  });
4737
4832
  return { content, view };
@@ -4749,7 +4844,7 @@ function parseDirectiveStyles(directive, evaluator, compilationMode) {
4749
4844
  const relatedInformation = traceDynamicValue(expression, entry);
4750
4845
  const chain = {
4751
4846
  messageText: `Unknown identifier used as styles string: ${entry.node.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using 'styleUrl')`,
4752
- category: ts21.DiagnosticCategory.Error,
4847
+ category: ts23.DiagnosticCategory.Error,
4753
4848
  code: 0
4754
4849
  };
4755
4850
  throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_IMPORTED_STYLES_STRING, expression, chain, relatedInformation);
@@ -4783,20 +4878,33 @@ function isStringArrayOrDie(value, name, node) {
4783
4878
  }
4784
4879
  return true;
4785
4880
  }
4786
- function queriesFromFields(fields, reflector, evaluator) {
4787
- return fields.map(({ member, decorators }) => {
4788
- const decorator = decorators[0];
4789
- const node = member.node || decorator.node;
4790
- if (member.decorators.some((v) => v.name === "Input")) {
4791
- throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, node, "Cannot combine @Input decorators with query decorators");
4792
- }
4793
- if (decorators.length !== 1) {
4794
- throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, node, "Cannot have multiple query decorators on the same class member");
4795
- } else if (!isPropertyTypeMember(member)) {
4796
- throw new FatalDiagnosticError(ErrorCode.DECORATOR_UNEXPECTED, node, "Query decorator must go on a property-type member");
4797
- }
4798
- return extractQueryMetadata(node, decorator.name, decorator.args || [], member.name, reflector, evaluator);
4799
- });
4881
+ function tryGetQueryFromFieldDecorator(member, reflector, evaluator, isCore) {
4882
+ var _a, _b, _c;
4883
+ const decorators = member.decorators;
4884
+ if (decorators === null) {
4885
+ return null;
4886
+ }
4887
+ const queryDecorators = getAngularDecorators(decorators, queryDecoratorNames, isCore);
4888
+ if (queryDecorators.length === 0) {
4889
+ return null;
4890
+ }
4891
+ if (queryDecorators.length !== 1) {
4892
+ throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, (_a = member.node) != null ? _a : queryDecorators[0].node, "Cannot combine multiple query decorators.");
4893
+ }
4894
+ const decorator = queryDecorators[0];
4895
+ const node = member.node || decorator.node;
4896
+ if (decorators.some((v) => v.name === "Input")) {
4897
+ throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, node, "Cannot combine @Input decorators with query decorators");
4898
+ }
4899
+ if (!isPropertyTypeMember(member)) {
4900
+ throw new FatalDiagnosticError(ErrorCode.DECORATOR_UNEXPECTED, node, "Query decorator must go on a property-type member");
4901
+ }
4902
+ const name = (_c = (_b = decorator.import) == null ? void 0 : _b.name) != null ? _c : decorator.name;
4903
+ return {
4904
+ name,
4905
+ decorator,
4906
+ metadata: extractDecoratorQueryMetadata(node, name, decorator.args || [], member.name, reflector, evaluator)
4907
+ };
4800
4908
  }
4801
4909
  function isPropertyTypeMember(member) {
4802
4910
  return member.kind === ClassMemberKind.Getter || member.kind === ClassMemberKind.Setter || member.kind === ClassMemberKind.Property;
@@ -4876,27 +4984,23 @@ function parseInputsArray(clazz, decoratorMetadata, evaluator, reflector, refEmi
4876
4984
  }
4877
4985
  return inputs;
4878
4986
  }
4879
- function tryGetDecoratorOnMember(member, decoratorName, coreModule) {
4987
+ function tryGetDecoratorOnMember(member, decoratorName, isCore) {
4880
4988
  if (member.decorators === null) {
4881
4989
  return null;
4882
4990
  }
4883
4991
  for (const decorator of member.decorators) {
4884
- if (decorator.import === null || decorator.import.name !== decoratorName) {
4885
- continue;
4886
- }
4887
- if (coreModule !== void 0 && decorator.import.from !== coreModule) {
4888
- continue;
4992
+ if (isAngularDecorator(decorator, decoratorName, isCore)) {
4993
+ return decorator;
4889
4994
  }
4890
- return decorator;
4891
4995
  }
4892
4996
  return null;
4893
4997
  }
4894
- function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter, compilationMode) {
4998
+ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, isCore, refEmitter, compilationMode) {
4895
4999
  const classPropertyName = member.name;
4896
- const decorator = tryGetDecoratorOnMember(member, "Input", coreModule);
4897
- const signalInputMapping = tryParseSignalInputMapping(member, reflector, coreModule);
5000
+ const decorator = tryGetDecoratorOnMember(member, "Input", isCore);
5001
+ const signalInputMapping = tryParseSignalInputMapping(member, reflector, isCore);
4898
5002
  if (decorator !== null && signalInputMapping !== null) {
4899
- throw new FatalDiagnosticError(ErrorCode.SIGNAL_INPUT_AND_DISALLOWED_DECORATOR, decorator.node, `Using @Input with a signal input is not allowed.`);
5003
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_WITH_DISALLOWED_DECORATOR, decorator.node, `Using @Input with a signal input is not allowed.`);
4900
5004
  }
4901
5005
  if (decorator !== null) {
4902
5006
  if (decorator.args !== null && decorator.args.length > 1) {
@@ -4936,20 +5040,20 @@ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModu
4936
5040
  }
4937
5041
  return null;
4938
5042
  }
4939
- function parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule, compilationMode, inputsFromClassDecorator, classDecorator) {
5043
+ function parseInputFields(clazz, members, evaluator, reflector, refEmitter, isCore, compilationMode, inputsFromClassDecorator, classDecorator) {
4940
5044
  var _a, _b;
4941
5045
  const inputs = {};
4942
5046
  for (const member of members) {
4943
5047
  const classPropertyName = member.name;
4944
- const inputMapping = tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter, compilationMode);
5048
+ const inputMapping = tryParseInputFieldMapping(clazz, member, evaluator, reflector, isCore, refEmitter, compilationMode);
4945
5049
  if (inputMapping === null) {
4946
5050
  continue;
4947
5051
  }
4948
5052
  if (member.isStatic) {
4949
- throw new FatalDiagnosticError(ErrorCode.INPUT_DECLARED_ON_STATIC_MEMBER, (_a = member.node) != null ? _a : clazz, `Input "${member.name}" is incorrectly declared as static member of "${clazz.name.text}".`);
5053
+ throw new FatalDiagnosticError(ErrorCode.INCORRECTLY_DECLARED_ON_STATIC_MEMBER, (_a = member.node) != null ? _a : clazz, `Input "${member.name}" is incorrectly declared as static member of "${clazz.name.text}".`);
4950
5054
  }
4951
5055
  if (inputMapping.isSignal && inputsFromClassDecorator.hasOwnProperty(classPropertyName)) {
4952
- throw new FatalDiagnosticError(ErrorCode.SIGNAL_INPUT_AND_INPUTS_ARRAY_COLLISION, (_b = member.node) != null ? _b : clazz, `Input "${member.name}" is also declared as non-signal in @${classDecorator.name}.`);
5056
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DECORATOR_METADATA_COLLISION, (_b = member.node) != null ? _b : clazz, `Input "${member.name}" is also declared as non-signal in @${classDecorator.name}.`);
4953
5057
  }
4954
5058
  inputs[classPropertyName] = inputMapping;
4955
5059
  }
@@ -4964,7 +5068,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
4964
5068
  }
4965
5069
  return {
4966
5070
  node: node2,
4967
- type: new Reference(ts21.factory.createKeywordTypeNode(ts21.SyntaxKind.UnknownKeyword))
5071
+ type: new Reference(ts23.factory.createKeywordTypeNode(ts23.SyntaxKind.UnknownKeyword))
4968
5072
  };
4969
5073
  }
4970
5074
  const definition = reflector.getDefinitionOfFunction(value.node);
@@ -4992,7 +5096,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
4992
5096
  if (!firstParam) {
4993
5097
  return {
4994
5098
  node,
4995
- type: new Reference(ts21.factory.createKeywordTypeNode(ts21.SyntaxKind.UnknownKeyword))
5099
+ type: new Reference(ts23.factory.createKeywordTypeNode(ts23.SyntaxKind.UnknownKeyword))
4996
5100
  };
4997
5101
  }
4998
5102
  if (!firstParam.type) {
@@ -5007,7 +5111,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
5007
5111
  }
5008
5112
  function assertEmittableInputType(type, contextFile, reflector, refEmitter) {
5009
5113
  (function walk(node) {
5010
- if (ts21.isTypeReferenceNode(node) && ts21.isIdentifier(node.typeName)) {
5114
+ if (ts23.isTypeReferenceNode(node) && ts23.isIdentifier(node.typeName)) {
5011
5115
  const declaration = reflector.getDeclarationOfIdentifier(node.typeName);
5012
5116
  if (declaration !== null) {
5013
5117
  if (declaration.node.getSourceFile() !== contextFile) {
@@ -5021,6 +5125,57 @@ function assertEmittableInputType(type, contextFile, reflector, refEmitter) {
5021
5125
  node.forEachChild(walk);
5022
5126
  })(type);
5023
5127
  }
5128
+ function parseQueriesOfClassFields(members, reflector, evaluator, isCore) {
5129
+ var _a;
5130
+ const viewQueries = [];
5131
+ const contentQueries = [];
5132
+ const decoratorViewChild = [];
5133
+ const decoratorViewChildren = [];
5134
+ const decoratorContentChild = [];
5135
+ const decoratorContentChildren = [];
5136
+ for (const member of members) {
5137
+ const decoratorQuery = tryGetQueryFromFieldDecorator(member, reflector, evaluator, isCore);
5138
+ const signalQuery = tryParseSignalQueryFromInitializer(member, reflector, isCore);
5139
+ if (decoratorQuery !== null && signalQuery !== null) {
5140
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_WITH_DISALLOWED_DECORATOR, decoratorQuery.decorator.node, `Using @${decoratorQuery.name} with a signal-based query is not allowed.`);
5141
+ }
5142
+ const queryNode = (_a = decoratorQuery == null ? void 0 : decoratorQuery.decorator.node) != null ? _a : signalQuery == null ? void 0 : signalQuery.call;
5143
+ if (queryNode !== void 0 && member.isStatic) {
5144
+ throw new FatalDiagnosticError(ErrorCode.INCORRECTLY_DECLARED_ON_STATIC_MEMBER, queryNode, `Query is incorrectly declared on a static class member.`);
5145
+ }
5146
+ if (decoratorQuery !== null) {
5147
+ switch (decoratorQuery.name) {
5148
+ case "ViewChild":
5149
+ decoratorViewChild.push(decoratorQuery.metadata);
5150
+ break;
5151
+ case "ViewChildren":
5152
+ decoratorViewChildren.push(decoratorQuery.metadata);
5153
+ break;
5154
+ case "ContentChild":
5155
+ decoratorContentChild.push(decoratorQuery.metadata);
5156
+ break;
5157
+ case "ContentChildren":
5158
+ decoratorContentChildren.push(decoratorQuery.metadata);
5159
+ break;
5160
+ }
5161
+ } else if (signalQuery !== null) {
5162
+ switch (signalQuery.name) {
5163
+ case "viewChild":
5164
+ case "viewChildren":
5165
+ viewQueries.push(signalQuery.metadata);
5166
+ break;
5167
+ case "contentChild":
5168
+ case "contentChildren":
5169
+ contentQueries.push(signalQuery.metadata);
5170
+ break;
5171
+ }
5172
+ }
5173
+ }
5174
+ return {
5175
+ viewQueries: [...viewQueries, ...decoratorViewChild, ...decoratorViewChildren],
5176
+ contentQueries: [...contentQueries, ...decoratorContentChild, ...decoratorContentChildren]
5177
+ };
5178
+ }
5024
5179
  function parseOutputsArray(directive, evaluator) {
5025
5180
  const metaValues = parseFieldStringArrayValue(directive, "outputs", evaluator);
5026
5181
  return metaValues ? parseMappingStringArray(metaValues) : EMPTY_OBJECT;
@@ -5067,31 +5222,45 @@ function evaluateHostExpressionBindings(hostExpr, evaluator) {
5067
5222
  }
5068
5223
  return bindings;
5069
5224
  }
5070
- function extractHostDirectives(rawHostDirectives, evaluator) {
5225
+ function extractHostDirectives(rawHostDirectives, evaluator, compilationMode) {
5071
5226
  const resolved = evaluator.evaluate(rawHostDirectives, forwardRefResolver);
5072
5227
  if (!Array.isArray(resolved)) {
5073
5228
  throw createValueHasWrongTypeError(rawHostDirectives, resolved, "hostDirectives must be an array");
5074
5229
  }
5075
5230
  return resolved.map((value) => {
5076
5231
  const hostReference = value instanceof Map ? value.get("directive") : value;
5077
- if (!(hostReference instanceof Reference)) {
5078
- throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive must be a reference");
5232
+ if (compilationMode !== CompilationMode.LOCAL) {
5233
+ if (!(hostReference instanceof Reference)) {
5234
+ throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive must be a reference");
5235
+ }
5236
+ if (!isNamedClassDeclaration(hostReference.node)) {
5237
+ throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive reference must be a class");
5238
+ }
5079
5239
  }
5080
- if (!isNamedClassDeclaration(hostReference.node)) {
5081
- throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive reference must be a class");
5240
+ let directive;
5241
+ let nameForErrors = (fieldName) => "@Directive.hostDirectives";
5242
+ if (compilationMode === CompilationMode.LOCAL && hostReference instanceof DynamicValue) {
5243
+ if (!ts23.isIdentifier(hostReference.node) && !ts23.isPropertyAccessExpression(hostReference.node)) {
5244
+ throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_HOST_DIRECTIVE_INVALID, hostReference.node, `In local compilation mode, host directive cannot be an expression`);
5245
+ }
5246
+ directive = new WrappedNodeExpr5(hostReference.node);
5247
+ } else if (hostReference instanceof Reference) {
5248
+ directive = hostReference;
5249
+ nameForErrors = (fieldName) => `@Directive.hostDirectives.${directive.node.name.text}.${fieldName}`;
5250
+ } else {
5251
+ throw new Error("Impossible state");
5082
5252
  }
5083
5253
  const meta = {
5084
- directive: hostReference,
5085
- isForwardReference: hostReference.synthetic,
5086
- inputs: parseHostDirectivesMapping("inputs", value, hostReference.node, rawHostDirectives),
5087
- outputs: parseHostDirectivesMapping("outputs", value, hostReference.node, rawHostDirectives)
5254
+ directive,
5255
+ isForwardReference: hostReference instanceof Reference && hostReference.synthetic,
5256
+ inputs: parseHostDirectivesMapping("inputs", value, nameForErrors("input"), rawHostDirectives),
5257
+ outputs: parseHostDirectivesMapping("outputs", value, nameForErrors("output"), rawHostDirectives)
5088
5258
  };
5089
5259
  return meta;
5090
5260
  });
5091
5261
  }
5092
- function parseHostDirectivesMapping(field, resolvedValue, classReference, sourceExpression) {
5262
+ function parseHostDirectivesMapping(field, resolvedValue, nameForErrors, sourceExpression) {
5093
5263
  if (resolvedValue instanceof Map && resolvedValue.has(field)) {
5094
- const nameForErrors = `@Directive.hostDirectives.${classReference.name.text}.${field}`;
5095
5264
  const rawInputs = resolvedValue.get(field);
5096
5265
  if (isStringArrayOrDie(rawInputs, nameForErrors, sourceExpression)) {
5097
5266
  return parseMappingStringArray(rawInputs);
@@ -5100,8 +5269,17 @@ function parseHostDirectivesMapping(field, resolvedValue, classReference, source
5100
5269
  return null;
5101
5270
  }
5102
5271
  function toHostDirectiveMetadata(hostDirective, context, refEmitter) {
5272
+ let directive;
5273
+ if (hostDirective.directive instanceof Reference) {
5274
+ directive = toR3Reference(hostDirective.directive.node, hostDirective.directive, context, refEmitter);
5275
+ } else {
5276
+ directive = {
5277
+ value: hostDirective.directive,
5278
+ type: hostDirective.directive
5279
+ };
5280
+ }
5103
5281
  return {
5104
- directive: toR3Reference(hostDirective.directive.node, hostDirective.directive, context, refEmitter),
5282
+ directive,
5105
5283
  isForwardReference: hostDirective.isForwardReference,
5106
5284
  inputs: hostDirective.inputs || null,
5107
5285
  outputs: hostDirective.outputs || null
@@ -5381,16 +5559,16 @@ var DirectiveDecoratorHandler = class {
5381
5559
 
5382
5560
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5383
5561
  import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
5384
- import ts23 from "typescript";
5562
+ import ts25 from "typescript";
5385
5563
 
5386
5564
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5387
- import ts22 from "typescript";
5565
+ import ts24 from "typescript";
5388
5566
  function createModuleWithProvidersResolver(reflector, isCore) {
5389
5567
  function _reflectModuleFromTypeParam(type, node) {
5390
- if (!ts22.isTypeReferenceNode(type)) {
5568
+ if (!ts24.isTypeReferenceNode(type)) {
5391
5569
  return null;
5392
5570
  }
5393
- const typeName = type && (ts22.isIdentifier(type.typeName) && type.typeName || ts22.isQualifiedName(type.typeName) && type.typeName.right) || null;
5571
+ const typeName = type && (ts24.isIdentifier(type.typeName) && type.typeName || ts24.isQualifiedName(type.typeName) && type.typeName.right) || null;
5394
5572
  if (typeName === null) {
5395
5573
  return null;
5396
5574
  }
@@ -5402,7 +5580,7 @@ function createModuleWithProvidersResolver(reflector, isCore) {
5402
5580
  return null;
5403
5581
  }
5404
5582
  if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
5405
- const parent = ts22.isMethodDeclaration(node) && ts22.isClassDeclaration(node.parent) ? node.parent : null;
5583
+ const parent = ts24.isMethodDeclaration(node) && ts24.isClassDeclaration(node.parent) ? node.parent : null;
5406
5584
  const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
5407
5585
  throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
5408
5586
  }
@@ -5410,13 +5588,13 @@ function createModuleWithProvidersResolver(reflector, isCore) {
5410
5588
  return typeNodeToValueExpr(arg);
5411
5589
  }
5412
5590
  function _reflectModuleFromLiteralType(type) {
5413
- if (!ts22.isIntersectionTypeNode(type)) {
5591
+ if (!ts24.isIntersectionTypeNode(type)) {
5414
5592
  return null;
5415
5593
  }
5416
5594
  for (const t of type.types) {
5417
- if (ts22.isTypeLiteralNode(t)) {
5595
+ if (ts24.isTypeLiteralNode(t)) {
5418
5596
  for (const m of t.members) {
5419
- const ngModuleType = ts22.isPropertySignature(m) && ts22.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
5597
+ const ngModuleType = ts24.isPropertySignature(m) && ts24.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
5420
5598
  const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
5421
5599
  if (ngModuleExpression) {
5422
5600
  return ngModuleExpression;
@@ -5560,8 +5738,8 @@ var NgModuleDecoratorHandler = class {
5560
5738
  if (decorator.args === null || decorator.args.length > 1) {
5561
5739
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @NgModule decorator`);
5562
5740
  }
5563
- const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts23.factory.createObjectLiteralExpression([]);
5564
- if (!ts23.isObjectLiteralExpression(meta)) {
5741
+ const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts25.factory.createObjectLiteralExpression([]);
5742
+ if (!ts25.isObjectLiteralExpression(meta)) {
5565
5743
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
5566
5744
  }
5567
5745
  const ngModule = reflectObjectLiteral(meta);
@@ -5621,7 +5799,7 @@ var NgModuleDecoratorHandler = class {
5621
5799
  id = new WrappedNodeExpr7(idExpr);
5622
5800
  } else {
5623
5801
  const diag = makeDiagnostic(ErrorCode.WARN_NGMODULE_ID_UNNECESSARY, idExpr, `Using 'module.id' for NgModule.id is a common anti-pattern that is ignored by the Angular compiler.`);
5624
- diag.category = ts23.DiagnosticCategory.Warning;
5802
+ diag.category = ts25.DiagnosticCategory.Warning;
5625
5803
  diagnostics.push(diag);
5626
5804
  }
5627
5805
  }
@@ -5673,16 +5851,16 @@ var NgModuleDecoratorHandler = class {
5673
5851
  }
5674
5852
  const rawProviders = ngModule.has("providers") ? ngModule.get("providers") : null;
5675
5853
  let wrappedProviders = null;
5676
- if (rawProviders !== null && (!ts23.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
5854
+ if (rawProviders !== null && (!ts25.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
5677
5855
  wrappedProviders = new WrappedNodeExpr7(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(rawProviders) : rawProviders);
5678
5856
  }
5679
5857
  const topLevelImports = [];
5680
5858
  if (this.compilationMode !== CompilationMode.LOCAL && ngModule.has("imports")) {
5681
5859
  const rawImports2 = unwrapExpression(ngModule.get("imports"));
5682
5860
  let topLevelExpressions = [];
5683
- if (ts23.isArrayLiteralExpression(rawImports2)) {
5861
+ if (ts25.isArrayLiteralExpression(rawImports2)) {
5684
5862
  for (const element of rawImports2.elements) {
5685
- if (ts23.isSpreadElement(element)) {
5863
+ if (ts25.isSpreadElement(element)) {
5686
5864
  topLevelExpressions.push(element.expression);
5687
5865
  continue;
5688
5866
  }
@@ -5714,7 +5892,7 @@ var NgModuleDecoratorHandler = class {
5714
5892
  if (exp === null) {
5715
5893
  continue;
5716
5894
  }
5717
- if (ts23.isArrayLiteralExpression(exp)) {
5895
+ if (ts25.isArrayLiteralExpression(exp)) {
5718
5896
  if (exp.elements) {
5719
5897
  injectorMetadata.imports.push(...exp.elements.map((n) => new WrappedNodeExpr7(n)));
5720
5898
  }
@@ -6013,7 +6191,7 @@ function isNgModule(node, compilation) {
6013
6191
  return !compilation.dependencies.some((dep) => dep.ref.node === node);
6014
6192
  }
6015
6193
  function isModuleIdExpression(expr) {
6016
- return ts23.isPropertyAccessExpression(expr) && ts23.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
6194
+ return ts25.isPropertyAccessExpression(expr) && ts25.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
6017
6195
  }
6018
6196
  function makeStandaloneBootstrapDiagnostic(ngModuleClass, bootstrappedClassRef, rawBootstrapExpr) {
6019
6197
  const componentClassName = bootstrappedClassRef.node.name.text;
@@ -6050,7 +6228,7 @@ function checkCustomElementSelectorForErrors(selector) {
6050
6228
 
6051
6229
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
6052
6230
  import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
6053
- import ts24 from "typescript";
6231
+ import ts26 from "typescript";
6054
6232
  function getTemplateDeclarationNodeForError(declaration) {
6055
6233
  return declaration.isInline ? declaration.expression : declaration.templateUrlExpression;
6056
6234
  }
@@ -6062,7 +6240,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
6062
6240
  let sourceMapping;
6063
6241
  let escapedString = false;
6064
6242
  let sourceMapUrl;
6065
- if (ts24.isStringLiteral(template.expression) || ts24.isNoSubstitutionTemplateLiteral(template.expression)) {
6243
+ if (ts26.isStringLiteral(template.expression) || ts26.isNoSubstitutionTemplateLiteral(template.expression)) {
6066
6244
  sourceParseRange = getTemplateRange(template.expression);
6067
6245
  sourceStr = template.expression.getSourceFile().text;
6068
6246
  templateContent = template.expression.text;
@@ -6078,7 +6256,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
6078
6256
  const relatedInformation = traceDynamicValue(template.expression, resolvedTemplate);
6079
6257
  const chain = {
6080
6258
  messageText: `Unknown identifier used as template string: ${template.expression.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using 'templateUrl')`,
6081
- category: ts24.DiagnosticCategory.Error,
6259
+ category: ts26.DiagnosticCategory.Error,
6082
6260
  code: 0
6083
6261
  };
6084
6262
  throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_IMPORTED_TEMPLATE_STRING, template.expression, chain, relatedInformation);
@@ -6247,7 +6425,7 @@ function preloadAndParseTemplate(evaluator, resourceLoader, depTracker, preanaly
6247
6425
  }
6248
6426
  function getTemplateRange(templateExpr) {
6249
6427
  const startPos = templateExpr.getStart() + 1;
6250
- const { line, character } = ts24.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
6428
+ const { line, character } = ts26.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
6251
6429
  return {
6252
6430
  startPos,
6253
6431
  startLine: line,
@@ -6280,7 +6458,7 @@ function transformDecoratorResources(dec, component, styles, template) {
6280
6458
  const metadata = new Map(component);
6281
6459
  if (metadata.has("templateUrl")) {
6282
6460
  metadata.delete("templateUrl");
6283
- metadata.set("template", ts24.factory.createStringLiteral(template.content));
6461
+ metadata.set("template", ts26.factory.createStringLiteral(template.content));
6284
6462
  }
6285
6463
  if (metadata.has("styleUrls") || metadata.has("styleUrl") || metadata.has("styles")) {
6286
6464
  metadata.delete("styles");
@@ -6289,20 +6467,20 @@ function transformDecoratorResources(dec, component, styles, template) {
6289
6467
  if (styles.length > 0) {
6290
6468
  const styleNodes = styles.reduce((result, style) => {
6291
6469
  if (style.trim().length > 0) {
6292
- result.push(ts24.factory.createStringLiteral(style));
6470
+ result.push(ts26.factory.createStringLiteral(style));
6293
6471
  }
6294
6472
  return result;
6295
6473
  }, []);
6296
6474
  if (styleNodes.length > 0) {
6297
- metadata.set("styles", ts24.factory.createArrayLiteralExpression(styleNodes));
6475
+ metadata.set("styles", ts26.factory.createArrayLiteralExpression(styleNodes));
6298
6476
  }
6299
6477
  }
6300
6478
  }
6301
6479
  const newMetadataFields = [];
6302
6480
  for (const [name, value] of metadata.entries()) {
6303
- newMetadataFields.push(ts24.factory.createPropertyAssignment(name, value));
6481
+ newMetadataFields.push(ts26.factory.createPropertyAssignment(name, value));
6304
6482
  }
6305
- return { ...dec, args: [ts24.factory.createObjectLiteralExpression(newMetadataFields)] };
6483
+ return { ...dec, args: [ts26.factory.createObjectLiteralExpression(newMetadataFields)] };
6306
6484
  }
6307
6485
  function extractComponentStyleUrls(evaluator, component) {
6308
6486
  const styleUrlsExpr = component.get("styleUrls");
@@ -6328,9 +6506,9 @@ function extractComponentStyleUrls(evaluator, component) {
6328
6506
  }
6329
6507
  function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6330
6508
  const styleUrls = [];
6331
- if (ts24.isArrayLiteralExpression(styleUrlsExpr)) {
6509
+ if (ts26.isArrayLiteralExpression(styleUrlsExpr)) {
6332
6510
  for (const styleUrlExpr of styleUrlsExpr.elements) {
6333
- if (ts24.isSpreadElement(styleUrlExpr)) {
6511
+ if (ts26.isSpreadElement(styleUrlExpr)) {
6334
6512
  styleUrls.push(...extractStyleUrlsFromExpression(evaluator, styleUrlExpr.expression));
6335
6513
  } else {
6336
6514
  const styleUrl = evaluator.evaluate(styleUrlExpr);
@@ -6362,18 +6540,18 @@ function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6362
6540
  function extractStyleResources(resourceLoader, component, containingFile) {
6363
6541
  const styles = /* @__PURE__ */ new Set();
6364
6542
  function stringLiteralElements(array) {
6365
- return array.elements.filter((e) => ts24.isStringLiteralLike(e));
6543
+ return array.elements.filter((e) => ts26.isStringLiteralLike(e));
6366
6544
  }
6367
6545
  const styleUrlExpr = component.get("styleUrl");
6368
6546
  const styleUrlsExpr = component.get("styleUrls");
6369
- if (styleUrlsExpr !== void 0 && ts24.isArrayLiteralExpression(styleUrlsExpr)) {
6547
+ if (styleUrlsExpr !== void 0 && ts26.isArrayLiteralExpression(styleUrlsExpr)) {
6370
6548
  for (const expression of stringLiteralElements(styleUrlsExpr)) {
6371
6549
  const resource = stringLiteralUrlToResource(resourceLoader, expression, containingFile);
6372
6550
  if (resource !== null) {
6373
6551
  styles.add(resource);
6374
6552
  }
6375
6553
  }
6376
- } else if (styleUrlExpr !== void 0 && ts24.isStringLiteralLike(styleUrlExpr)) {
6554
+ } else if (styleUrlExpr !== void 0 && ts26.isStringLiteralLike(styleUrlExpr)) {
6377
6555
  const resource = stringLiteralUrlToResource(resourceLoader, styleUrlExpr, containingFile);
6378
6556
  if (resource !== null) {
6379
6557
  styles.add(resource);
@@ -6381,11 +6559,11 @@ function extractStyleResources(resourceLoader, component, containingFile) {
6381
6559
  }
6382
6560
  const stylesExpr = component.get("styles");
6383
6561
  if (stylesExpr !== void 0) {
6384
- if (ts24.isArrayLiteralExpression(stylesExpr)) {
6562
+ if (ts26.isArrayLiteralExpression(stylesExpr)) {
6385
6563
  for (const expression of stringLiteralElements(stylesExpr)) {
6386
6564
  styles.add({ path: null, expression });
6387
6565
  }
6388
- } else if (ts24.isStringLiteralLike(stylesExpr)) {
6566
+ } else if (ts26.isStringLiteralLike(stylesExpr)) {
6389
6567
  styles.add({ path: null, expression: stylesExpr });
6390
6568
  }
6391
6569
  }
@@ -6937,7 +7115,7 @@ var ComponentDecoratorHandler = class {
6937
7115
  }
6938
7116
  typeCheck(ctx, node, meta) {
6939
7117
  var _a;
6940
- if (this.typeCheckScopeRegistry === null || !ts25.isClassDeclaration(node)) {
7118
+ if (this.typeCheckScopeRegistry === null || !ts27.isClassDeclaration(node)) {
6941
7119
  return;
6942
7120
  }
6943
7121
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -6960,7 +7138,7 @@ var ComponentDecoratorHandler = class {
6960
7138
  const nonRemovableImports = this.deferredSymbolTracker.getNonRemovableDeferredImports(context, node);
6961
7139
  if (nonRemovableImports.length > 0) {
6962
7140
  for (const importDecl of nonRemovableImports) {
6963
- const diagnostic = makeDiagnostic(ErrorCode.DEFERRED_DEPENDENCY_IMPORTED_EAGERLY, importDecl, `This import contains symbols used in the \`@Component.deferredImports\` array of the \`${node.name.getText()}\` component, but also some other symbols that are not in any \`@Component.deferredImports\` array. This renders all these defer imports useless as this import remains and its module is eagerly loaded. To fix this, make sure that this import contains *only* symbols that are used within \`@Component.deferredImports\` arrays.`);
7141
+ const diagnostic = makeDiagnostic(ErrorCode.DEFERRED_DEPENDENCY_IMPORTED_EAGERLY, importDecl, `This import contains symbols that are used both inside and outside of the \`@Component.deferredImports\` fields in the file. This renders all these defer imports useless as this import remains and its module is eagerly loaded. To fix this, make sure that all symbols from the import are *only* used within \`@Component.deferredImports\` arrays and there are no other references to those symbols present in this file.`);
6964
7142
  diagnostics.push(diagnostic);
6965
7143
  }
6966
7144
  return { diagnostics };
@@ -7294,12 +7472,12 @@ var ComponentDecoratorHandler = class {
7294
7472
  }
7295
7473
  collectExplicitlyDeferredSymbols(rawDeferredImports) {
7296
7474
  const deferredTypes = /* @__PURE__ */ new Map();
7297
- if (!ts25.isArrayLiteralExpression(rawDeferredImports)) {
7475
+ if (!ts27.isArrayLiteralExpression(rawDeferredImports)) {
7298
7476
  return deferredTypes;
7299
7477
  }
7300
7478
  for (const element of rawDeferredImports.elements) {
7301
7479
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
7302
- if (!ts25.isIdentifier(node)) {
7480
+ if (!ts27.isIdentifier(node)) {
7303
7481
  continue;
7304
7482
  }
7305
7483
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -7363,12 +7541,12 @@ var ComponentDecoratorHandler = class {
7363
7541
  }
7364
7542
  }
7365
7543
  registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
7366
- if (!ts25.isArrayLiteralExpression(importsExpr)) {
7544
+ if (!ts27.isArrayLiteralExpression(importsExpr)) {
7367
7545
  return;
7368
7546
  }
7369
7547
  for (const element of importsExpr.elements) {
7370
7548
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
7371
- if (!ts25.isIdentifier(node)) {
7549
+ if (!ts27.isIdentifier(node)) {
7372
7550
  continue;
7373
7551
  }
7374
7552
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -7481,8 +7659,8 @@ function validateStandaloneImports(importRefs, importExpr, metaReader, scopeRead
7481
7659
  }
7482
7660
 
7483
7661
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
7484
- import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
7485
- import ts26 from "typescript";
7662
+ import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
7663
+ import ts28 from "typescript";
7486
7664
  var InjectableDecoratorHandler = class {
7487
7665
  constructor(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, perf, includeClassMetadata, compilationMode, errorOnDuplicateProv = true) {
7488
7666
  this.reflector = reflector;
@@ -7598,19 +7776,19 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
7598
7776
  name,
7599
7777
  type,
7600
7778
  typeArgumentCount,
7601
- providedIn: createMayBeForwardRefExpression2(new LiteralExpr3(null), 0)
7779
+ providedIn: createMayBeForwardRefExpression3(new LiteralExpr3(null), 0)
7602
7780
  };
7603
7781
  } else if (decorator.args.length === 1) {
7604
7782
  const metaNode = decorator.args[0];
7605
- if (!ts26.isObjectLiteralExpression(metaNode)) {
7783
+ if (!ts28.isObjectLiteralExpression(metaNode)) {
7606
7784
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
7607
7785
  }
7608
7786
  const meta = reflectObjectLiteral(metaNode);
7609
- const providedIn = meta.has("providedIn") ? getProviderExpression(meta.get("providedIn"), reflector) : createMayBeForwardRefExpression2(new LiteralExpr3(null), 0);
7787
+ const providedIn = meta.has("providedIn") ? getProviderExpression(meta.get("providedIn"), reflector) : createMayBeForwardRefExpression3(new LiteralExpr3(null), 0);
7610
7788
  let deps = void 0;
7611
7789
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
7612
7790
  const depsExpr = meta.get("deps");
7613
- if (!ts26.isArrayLiteralExpression(depsExpr)) {
7791
+ if (!ts28.isArrayLiteralExpression(depsExpr)) {
7614
7792
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
7615
7793
  }
7616
7794
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -7634,7 +7812,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
7634
7812
  }
7635
7813
  function getProviderExpression(expression, reflector) {
7636
7814
  const forwardRefValue = tryUnwrapForwardRef(expression, reflector);
7637
- return createMayBeForwardRefExpression2(new WrappedNodeExpr9(forwardRefValue != null ? forwardRefValue : expression), forwardRefValue !== null ? 2 : 0);
7815
+ return createMayBeForwardRefExpression3(new WrappedNodeExpr9(forwardRefValue != null ? forwardRefValue : expression), forwardRefValue !== null ? 2 : 0);
7638
7816
  }
7639
7817
  function extractInjectableCtorDeps(clazz, meta, decorator, reflector, isCore, strictCtorDeps) {
7640
7818
  if (decorator.args === null) {
@@ -7695,12 +7873,12 @@ function getDep(dep, reflector) {
7695
7873
  }
7696
7874
  return true;
7697
7875
  }
7698
- if (ts26.isArrayLiteralExpression(dep)) {
7876
+ if (ts28.isArrayLiteralExpression(dep)) {
7699
7877
  dep.elements.forEach((el) => {
7700
7878
  let isDecorator = false;
7701
- if (ts26.isIdentifier(el)) {
7879
+ if (ts28.isIdentifier(el)) {
7702
7880
  isDecorator = maybeUpdateDecorator(el, reflector);
7703
- } else if (ts26.isNewExpression(el) && ts26.isIdentifier(el.expression)) {
7881
+ } else if (ts28.isNewExpression(el) && ts28.isIdentifier(el.expression)) {
7704
7882
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
7705
7883
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
7706
7884
  }
@@ -7714,7 +7892,7 @@ function getDep(dep, reflector) {
7714
7892
 
7715
7893
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7716
7894
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
7717
- import ts27 from "typescript";
7895
+ import ts29 from "typescript";
7718
7896
  var PipeSymbol = class extends SemanticSymbol {
7719
7897
  constructor(decl, name) {
7720
7898
  super(decl);
@@ -7771,7 +7949,7 @@ var PipeDecoratorHandler = class {
7771
7949
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
7772
7950
  }
7773
7951
  const meta = unwrapExpression(decorator.args[0]);
7774
- if (!ts27.isObjectLiteralExpression(meta)) {
7952
+ if (!ts29.isObjectLiteralExpression(meta)) {
7775
7953
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
7776
7954
  }
7777
7955
  const pipe = reflectObjectLiteral(meta);
@@ -7876,6 +8054,7 @@ export {
7876
8054
  forwardRefResolver,
7877
8055
  MetaKind,
7878
8056
  CompoundMetadataReader,
8057
+ isHostDirectiveMetaForGlobalMode,
7879
8058
  DtsMetadataReader,
7880
8059
  LocalMetadataRegistry,
7881
8060
  CompoundMetadataRegistry,
@@ -7921,4 +8100,4 @@ export {
7921
8100
  * Use of this source code is governed by an MIT-style license that can be
7922
8101
  * found in the LICENSE file at https://angular.io/license
7923
8102
  */
7924
- //# sourceMappingURL=chunk-TNWTCE6C.js.map
8103
+ //# sourceMappingURL=chunk-YJ2WTOVI.js.map