@angular/compiler-cli 16.2.0-next.4 → 16.2.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 (50) hide show
  1. package/bundles/chunk-3O3O4L34.js +12 -0
  2. package/bundles/chunk-3O3O4L34.js.map +6 -0
  3. package/bundles/{chunk-LYJKWJUC.js → chunk-CF2CT7RQ.js} +3 -3
  4. package/bundles/{chunk-IPC76KA7.js → chunk-G4NNAES4.js} +8 -8
  5. package/bundles/{chunk-TBUSSXUA.js → chunk-K2U2VZ7S.js} +7 -7
  6. package/bundles/{chunk-SJLWUYXS.js → chunk-NAKFMYDD.js} +5 -7
  7. package/bundles/chunk-NAKFMYDD.js.map +6 -0
  8. package/bundles/{chunk-E72KZKRK.js → chunk-NSJJNPPO.js} +97 -97
  9. package/bundles/chunk-NSJJNPPO.js.map +6 -0
  10. package/bundles/{chunk-WF3L5COT.js → chunk-OCDXYAWW.js} +774 -47
  11. package/bundles/chunk-OCDXYAWW.js.map +6 -0
  12. package/bundles/{chunk-EKTJ7622.js → chunk-OULZQUKT.js} +7 -7
  13. package/bundles/{chunk-DKWZY2MH.js → chunk-QIGPDWZI.js} +33 -31
  14. package/bundles/{chunk-DKWZY2MH.js.map → chunk-QIGPDWZI.js.map} +1 -1
  15. package/bundles/{chunk-YZ3WOD5G.js → chunk-QUGPFSIN.js} +264 -132
  16. package/bundles/chunk-QUGPFSIN.js.map +6 -0
  17. package/bundles/{chunk-GRJYX2PA.js → chunk-RHKG65UV.js} +5 -5
  18. package/bundles/{chunk-7PCPPTTO.js → chunk-URH5LEAG.js} +5 -5
  19. package/bundles/index.js +13 -13
  20. package/bundles/linker/babel/index.js +13 -13
  21. package/bundles/linker/index.js +5 -5
  22. package/bundles/ngcc/index.js +1 -1
  23. package/bundles/private/bazel.js +1 -1
  24. package/bundles/private/localize.js +3 -3
  25. package/bundles/private/migrations.js +7 -8
  26. package/bundles/private/tooling.js +4 -4
  27. package/bundles/src/bin/ng_xi18n.js +11 -11
  28. package/bundles/src/bin/ngc.js +9 -9
  29. package/bundles_metadata.json +1 -1
  30. package/package.json +2 -2
  31. package/src/ngtsc/annotations/common/src/util.d.ts +1 -1
  32. package/src/ngtsc/annotations/component/src/handler.d.ts +8 -2
  33. package/src/ngtsc/annotations/component/src/metadata.d.ts +1 -1
  34. package/src/ngtsc/imports/index.d.ts +1 -0
  35. package/src/ngtsc/imports/src/deferred_symbol_tracker.d.ts +47 -0
  36. package/src/ngtsc/reflection/src/host.d.ts +4 -0
  37. package/src/ngtsc/reflection/src/typescript.d.ts +5 -0
  38. package/src/ngtsc/transform/src/api.d.ts +1 -0
  39. package/bundles/chunk-E72KZKRK.js.map +0 -6
  40. package/bundles/chunk-NIK4FIWB.js +0 -643
  41. package/bundles/chunk-NIK4FIWB.js.map +0 -6
  42. package/bundles/chunk-SJLWUYXS.js.map +0 -6
  43. package/bundles/chunk-WF3L5COT.js.map +0 -6
  44. package/bundles/chunk-YZ3WOD5G.js.map +0 -6
  45. /package/bundles/{chunk-LYJKWJUC.js.map → chunk-CF2CT7RQ.js.map} +0 -0
  46. /package/bundles/{chunk-IPC76KA7.js.map → chunk-G4NNAES4.js.map} +0 -0
  47. /package/bundles/{chunk-TBUSSXUA.js.map → chunk-K2U2VZ7S.js.map} +0 -0
  48. /package/bundles/{chunk-EKTJ7622.js.map → chunk-OULZQUKT.js.map} +0 -0
  49. /package/bundles/{chunk-GRJYX2PA.js.map → chunk-RHKG65UV.js.map} +0 -0
  50. /package/bundles/{chunk-7PCPPTTO.js.map → chunk-URH5LEAG.js.map} +0 -0
@@ -2,48 +2,46 @@
2
2
  import {createRequire as __cjsCompatRequire} from 'module';
3
3
  const require = __cjsCompatRequire(import.meta.url);
4
4
 
5
- import {
6
- ClassMemberKind,
7
- filterToMembersWithDecorator,
8
- isNamedClassDeclaration,
9
- reflectObjectLiteral,
10
- reflectTypeEntityToDeclaration,
11
- typeNodeToValueExpr
12
- } from "./chunk-NIK4FIWB.js";
13
5
  import {
14
6
  ImportManager,
15
7
  translateExpression,
16
8
  translateStatement,
17
9
  translateType
18
- } from "./chunk-IPC76KA7.js";
10
+ } from "./chunk-G4NNAES4.js";
19
11
  import {
12
+ ClassMemberKind,
20
13
  ErrorCode,
21
14
  FatalDiagnosticError,
22
15
  ImportFlags,
23
16
  Reference,
24
17
  assertSuccessfulReferenceEmit,
25
18
  attachDefaultImportDeclaration,
19
+ filterToMembersWithDecorator,
26
20
  getDefaultImportDeclaration,
27
21
  getSourceFile,
28
22
  identifierOfNode,
29
23
  isDeclaration,
30
24
  isFromDtsFile,
25
+ isNamedClassDeclaration,
31
26
  makeDiagnostic,
32
27
  makeRelatedInformation,
33
28
  nodeDebugInfo,
34
- nodeNameForError
35
- } from "./chunk-WF3L5COT.js";
29
+ nodeNameForError,
30
+ reflectObjectLiteral,
31
+ reflectTypeEntityToDeclaration,
32
+ typeNodeToValueExpr
33
+ } from "./chunk-OCDXYAWW.js";
36
34
  import {
37
35
  PerfEvent,
38
36
  PerfPhase
39
- } from "./chunk-7PCPPTTO.js";
37
+ } from "./chunk-URH5LEAG.js";
40
38
  import {
41
39
  absoluteFrom,
42
40
  absoluteFromSourceFile,
43
41
  relative
44
- } from "./chunk-TBUSSXUA.js";
42
+ } from "./chunk-K2U2VZ7S.js";
45
43
 
46
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
44
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
47
45
  import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
48
46
  import ts from "typescript";
49
47
  function valueReferenceToExpression(valueRef) {
@@ -234,7 +232,7 @@ function createSourceSpan(node) {
234
232
  const parseSf = new ParseSourceFile(sf.getFullText(), sf.fileName);
235
233
  return new ParseSourceSpan(new ParseLocation(parseSf, startOffset, startLine + 1, startCol + 1), new ParseLocation(parseSf, endOffset, endLine + 1, endCol + 1));
236
234
  }
237
- function compileResults(fac, def, metadataStmt, propName, additionalFields) {
235
+ function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports) {
238
236
  const statements = def.statements;
239
237
  if (metadataStmt !== null) {
240
238
  statements.push(metadataStmt);
@@ -245,7 +243,8 @@ function compileResults(fac, def, metadataStmt, propName, additionalFields) {
245
243
  name: propName,
246
244
  initializer: def.expression,
247
245
  statements: def.statements,
248
- type: def.type
246
+ type: def.type,
247
+ deferrableImports
249
248
  }
250
249
  ];
251
250
  if (additionalFields !== null) {
@@ -284,7 +283,7 @@ function isAbstractClassDeclaration(clazz) {
284
283
  return ts.canHaveModifiers(clazz) && clazz.modifiers !== void 0 ? clazz.modifiers.some((mod) => mod.kind === ts.SyntaxKind.AbstractKeyword) : false;
285
284
  }
286
285
 
287
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
286
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
288
287
  var DynamicValue = class {
289
288
  constructor(node, reason, code) {
290
289
  this.node = node;
@@ -374,10 +373,10 @@ var DynamicValue = class {
374
373
  }
375
374
  };
376
375
 
377
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
376
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
378
377
  import ts2 from "typescript";
379
378
 
380
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
379
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
381
380
  var ResolvedModule = class {
382
381
  constructor(exports, evaluate) {
383
382
  this.exports = exports;
@@ -407,7 +406,7 @@ var EnumValue = class {
407
406
  var KnownFn = class {
408
407
  };
409
408
 
410
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
409
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
411
410
  var ArraySliceBuiltinFn = class extends KnownFn {
412
411
  constructor(lhs) {
413
412
  super();
@@ -459,14 +458,14 @@ var StringConcatBuiltinFn = class extends KnownFn {
459
458
  }
460
459
  };
461
460
 
462
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
461
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
463
462
  var SyntheticValue = class {
464
463
  constructor(value) {
465
464
  this.value = value;
466
465
  }
467
466
  };
468
467
 
469
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
468
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
470
469
  function literalBinaryOp(op) {
471
470
  return { op, literal: true };
472
471
  }
@@ -1047,7 +1046,7 @@ function getOriginalKeywordKind(identifier) {
1047
1046
  return typeof ts2.identifierToKeywordKind === "function" ? ts2.identifierToKeywordKind(identifier) : identifier.originalKeywordKind;
1048
1047
  }
1049
1048
 
1050
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1049
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1051
1050
  var PartialEvaluator = class {
1052
1051
  constructor(host, checker, dependencyTracker) {
1053
1052
  this.host = host;
@@ -1067,7 +1066,7 @@ var PartialEvaluator = class {
1067
1066
  }
1068
1067
  };
1069
1068
 
1070
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1069
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1071
1070
  import ts3 from "typescript";
1072
1071
  function describeResolvedType(value, maxDepth = 1) {
1073
1072
  var _a, _b;
@@ -1197,7 +1196,7 @@ function getContainerNode(node) {
1197
1196
  return node.getSourceFile();
1198
1197
  }
1199
1198
 
1200
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1199
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1201
1200
  import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
1202
1201
  import ts4 from "typescript";
1203
1202
  function getConstructorDependencies(clazz, reflector, isCore) {
@@ -1341,10 +1340,10 @@ function createUnsuitableInjectionTokenError(clazz, error) {
1341
1340
  return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
1342
1341
  }
1343
1342
 
1344
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1343
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1345
1344
  import ts7 from "typescript";
1346
1345
 
1347
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1346
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1348
1347
  var MetaKind;
1349
1348
  (function(MetaKind2) {
1350
1349
  MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
@@ -1357,10 +1356,10 @@ var MatchSource;
1357
1356
  MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
1358
1357
  })(MatchSource || (MatchSource = {}));
1359
1358
 
1360
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1359
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1361
1360
  import ts6 from "typescript";
1362
1361
 
1363
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
1362
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
1364
1363
  var ClassPropertyMapping = class {
1365
1364
  constructor(forwardMap) {
1366
1365
  this.forwardMap = forwardMap;
@@ -1438,7 +1437,7 @@ function reverseMapFromForwardMap(forwardMap) {
1438
1437
  return reverseMap;
1439
1438
  }
1440
1439
 
1441
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
1440
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
1442
1441
  import ts5 from "typescript";
1443
1442
  function extractReferencesFromType(checker, def, bestGuessOwningModule) {
1444
1443
  if (!ts5.isTupleTypeNode(def)) {
@@ -1623,7 +1622,7 @@ function hasInjectableFields(clazz, host) {
1623
1622
  return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
1624
1623
  }
1625
1624
 
1626
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1625
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1627
1626
  var DtsMetadataReader = class {
1628
1627
  constructor(checker, reflector) {
1629
1628
  this.checker = checker;
@@ -1798,7 +1797,7 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
1798
1797
  return result.length > 0 ? result : null;
1799
1798
  }
1800
1799
 
1801
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
1800
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
1802
1801
  function flattenInheritedDirectiveMetadata(reader, dir) {
1803
1802
  const topMeta = reader.getDirectiveMetadata(dir);
1804
1803
  if (topMeta === null) {
@@ -1856,7 +1855,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
1856
1855
  };
1857
1856
  }
1858
1857
 
1859
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
1858
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
1860
1859
  var LocalMetadataRegistry = class {
1861
1860
  constructor() {
1862
1861
  this.directives = /* @__PURE__ */ new Map();
@@ -1913,7 +1912,7 @@ var CompoundMetadataRegistry = class {
1913
1912
  }
1914
1913
  };
1915
1914
 
1916
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
1915
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
1917
1916
  var ResourceRegistry = class {
1918
1917
  constructor() {
1919
1918
  this.externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
@@ -1978,7 +1977,7 @@ var ResourceRegistry = class {
1978
1977
  }
1979
1978
  };
1980
1979
 
1981
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
1980
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
1982
1981
  var ExportedProviderStatusResolver = class {
1983
1982
  constructor(metaReader) {
1984
1983
  this.metaReader = metaReader;
@@ -2022,7 +2021,7 @@ var ExportedProviderStatusResolver = class {
2022
2021
  }
2023
2022
  };
2024
2023
 
2025
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
2024
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
2026
2025
  var EMPTY_ARRAY = [];
2027
2026
  var HostDirectivesResolver = class {
2028
2027
  constructor(metaReader) {
@@ -2084,7 +2083,7 @@ function resolveOutput(bindingName) {
2084
2083
  return bindingName;
2085
2084
  }
2086
2085
 
2087
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
2086
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
2088
2087
  function makeDuplicateDeclarationError(node, data, kind) {
2089
2088
  const context = [];
2090
2089
  for (const decl of data) {
@@ -2280,7 +2279,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, kind) {
2280
2279
  return makeDiagnostic(ErrorCode.DIRECTIVE_INHERITS_UNDECORATED_CTOR, node.name, `The ${kind.toLowerCase()} ${node.name.text} inherits its constructor from ${baseClassName}, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of ${baseClassName}'s constructor. Either add a @${baseNeedsDecorator} decorator to ${baseClassName}, or add an explicit constructor to ${node.name.text}.`);
2281
2280
  }
2282
2281
 
2283
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
2282
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
2284
2283
  import ts8 from "typescript";
2285
2284
  function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
2286
2285
  let resolved = null;
@@ -2313,18 +2312,30 @@ function resolveLiteral(decorator, literalCache) {
2313
2312
  return meta;
2314
2313
  }
2315
2314
 
2316
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
2315
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
2317
2316
  import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
2318
2317
  function compileNgFactoryDefField(metadata) {
2319
2318
  const res = compileFactoryFunction(metadata);
2320
- return { name: "\u0275fac", initializer: res.expression, statements: res.statements, type: res.type };
2319
+ return {
2320
+ name: "\u0275fac",
2321
+ initializer: res.expression,
2322
+ statements: res.statements,
2323
+ type: res.type,
2324
+ deferrableImports: null
2325
+ };
2321
2326
  }
2322
2327
  function compileDeclareFactory(metadata) {
2323
2328
  const res = compileDeclareFactoryFunction(metadata);
2324
- return { name: "\u0275fac", initializer: res.expression, statements: res.statements, type: res.type };
2329
+ return {
2330
+ name: "\u0275fac",
2331
+ initializer: res.expression,
2332
+ statements: res.statements,
2333
+ type: res.type,
2334
+ deferrableImports: null
2335
+ };
2325
2336
  }
2326
2337
 
2327
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
2338
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
2328
2339
  var InjectableClassRegistry = class {
2329
2340
  constructor(host, isCore) {
2330
2341
  this.host = host;
@@ -2350,7 +2361,7 @@ var InjectableClassRegistry = class {
2350
2361
  }
2351
2362
  };
2352
2363
 
2353
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
2364
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
2354
2365
  import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
2355
2366
  import ts9 from "typescript";
2356
2367
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
@@ -2437,13 +2448,13 @@ function removeIdentifierReferences(node, name) {
2437
2448
  return result.transformed[0];
2438
2449
  }
2439
2450
 
2440
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
2451
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
2441
2452
  var NoopReferencesRegistry = class {
2442
2453
  add(source, ...references) {
2443
2454
  }
2444
2455
  };
2445
2456
 
2446
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
2457
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
2447
2458
  import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
2448
2459
  function extractSchemas(rawExpr, evaluator, context) {
2449
2460
  const schemas = [];
@@ -2473,7 +2484,7 @@ function extractSchemas(rawExpr, evaluator, context) {
2473
2484
  return schemas;
2474
2485
  }
2475
2486
 
2476
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
2487
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
2477
2488
  import { outputAst } from "@angular/compiler";
2478
2489
  function compileInputTransformFields(inputs) {
2479
2490
  const extraFields = [];
@@ -2483,18 +2494,19 @@ function compileInputTransformFields(inputs) {
2483
2494
  name: `ngAcceptInputType_${input.classPropertyName}`,
2484
2495
  type: outputAst.transplantedType(input.transform.type),
2485
2496
  statements: [],
2486
- initializer: null
2497
+ initializer: null,
2498
+ deferrableImports: null
2487
2499
  });
2488
2500
  }
2489
2501
  }
2490
2502
  return extraFields;
2491
2503
  }
2492
2504
 
2493
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
2505
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
2494
2506
  import { compileClassMetadata as compileClassMetadata3, 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, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
2495
2507
  import ts24 from "typescript";
2496
2508
 
2497
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
2509
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
2498
2510
  import ts10 from "typescript";
2499
2511
  var SemanticSymbol = class {
2500
2512
  constructor(decl) {
@@ -2510,7 +2522,7 @@ function getSymbolIdentifier(decl) {
2510
2522
  return decl.name.text;
2511
2523
  }
2512
2524
 
2513
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
2525
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
2514
2526
  import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
2515
2527
  var OpaqueSymbol = class extends SemanticSymbol {
2516
2528
  isPublicApiAffected() {
@@ -2653,10 +2665,10 @@ function getImportPath(expr) {
2653
2665
  }
2654
2666
  }
2655
2667
 
2656
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2668
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2657
2669
  import ts11 from "typescript";
2658
2670
 
2659
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
2671
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
2660
2672
  function isSymbolEqual(a, b) {
2661
2673
  if (a.decl === b.decl) {
2662
2674
  return true;
@@ -2706,7 +2718,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
2706
2718
  return true;
2707
2719
  }
2708
2720
 
2709
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2721
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2710
2722
  function extractSemanticTypeParameters(node) {
2711
2723
  if (!ts11.isClassDeclaration(node) || node.typeParameters === void 0) {
2712
2724
  return null;
@@ -2726,14 +2738,14 @@ function isTypeParameterEqual(a, b) {
2726
2738
  return a.hasGenericTypeBound === b.hasGenericTypeBound;
2727
2739
  }
2728
2740
 
2729
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
2741
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
2730
2742
  var ComponentScopeKind;
2731
2743
  (function(ComponentScopeKind2) {
2732
2744
  ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
2733
2745
  ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
2734
2746
  })(ComponentScopeKind || (ComponentScopeKind = {}));
2735
2747
 
2736
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
2748
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
2737
2749
  var CompoundComponentScopeReader = class {
2738
2750
  constructor(readers) {
2739
2751
  this.readers = readers;
@@ -2758,7 +2770,7 @@ var CompoundComponentScopeReader = class {
2758
2770
  }
2759
2771
  };
2760
2772
 
2761
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
2773
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
2762
2774
  var MetadataDtsModuleScopeResolver = class {
2763
2775
  constructor(dtsMetaReader, aliasingHost) {
2764
2776
  this.dtsMetaReader = dtsMetaReader;
@@ -2834,11 +2846,11 @@ var MetadataDtsModuleScopeResolver = class {
2834
2846
  }
2835
2847
  };
2836
2848
 
2837
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2849
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2838
2850
  import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
2839
2851
  import ts12 from "typescript";
2840
2852
 
2841
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
2853
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
2842
2854
  function getDiagnosticNode(ref, rawExpr) {
2843
2855
  return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
2844
2856
  }
@@ -2861,7 +2873,7 @@ function makeUnknownComponentImportDiagnostic(ref, rawExpr) {
2861
2873
  return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_IMPORT, getDiagnosticNode(ref, rawExpr), `Component imports must be standalone components, directives, pipes, or must be NgModules.`);
2862
2874
  }
2863
2875
 
2864
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2876
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2865
2877
  var LocalModuleScopeRegistry = class {
2866
2878
  constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
2867
2879
  this.localReader = localReader;
@@ -3200,7 +3212,7 @@ function reexportCollision(module, refA, refB) {
3200
3212
  ]);
3201
3213
  }
3202
3214
 
3203
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
3215
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
3204
3216
  import { CssSelector, SelectorMatcher } from "@angular/compiler";
3205
3217
  import ts13 from "typescript";
3206
3218
  var TypeCheckScopeRegistry = class {
@@ -3269,7 +3281,7 @@ var TypeCheckScopeRegistry = class {
3269
3281
  }
3270
3282
  };
3271
3283
 
3272
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
3284
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
3273
3285
  var CompilationMode;
3274
3286
  (function(CompilationMode2) {
3275
3287
  CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
@@ -3283,7 +3295,7 @@ var HandlerPrecedence;
3283
3295
  HandlerPrecedence2[HandlerPrecedence2["WEAK"] = 2] = "WEAK";
3284
3296
  })(HandlerPrecedence || (HandlerPrecedence = {}));
3285
3297
 
3286
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
3298
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
3287
3299
  import ts14 from "typescript";
3288
3300
  function aliasTransformFactory(exportStatements) {
3289
3301
  return () => {
@@ -3306,10 +3318,10 @@ function aliasTransformFactory(exportStatements) {
3306
3318
  };
3307
3319
  }
3308
3320
 
3309
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3321
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3310
3322
  import ts15 from "typescript";
3311
3323
 
3312
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
3324
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
3313
3325
  var TraitState;
3314
3326
  (function(TraitState2) {
3315
3327
  TraitState2[TraitState2["Pending"] = 0] = "Pending";
@@ -3366,7 +3378,7 @@ var TraitImpl = class {
3366
3378
  }
3367
3379
  };
3368
3380
 
3369
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3381
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3370
3382
  var TraitCompiler = class {
3371
3383
  constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
3372
3384
  this.handlers = handlers;
@@ -3814,10 +3826,10 @@ function containsErrors(diagnostics) {
3814
3826
  return diagnostics !== null && diagnostics.some((diag) => diag.category === ts15.DiagnosticCategory.Error);
3815
3827
  }
3816
3828
 
3817
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3829
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3818
3830
  import ts17 from "typescript";
3819
3831
 
3820
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
3832
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
3821
3833
  import ts16 from "typescript";
3822
3834
  function addImports(importManager, sf, extraStatements = []) {
3823
3835
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
@@ -3853,7 +3865,7 @@ function isImportStatement(stmt) {
3853
3865
  return ts16.isImportDeclaration(stmt) || ts16.isImportEqualsDeclaration(stmt) || ts16.isNamespaceImport(stmt);
3854
3866
  }
3855
3867
 
3856
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3868
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3857
3869
  var DtsTransformRegistry = class {
3858
3870
  constructor() {
3859
3871
  this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
@@ -4000,11 +4012,11 @@ function markForEmitAsSingleLine(node) {
4000
4012
  ts17.forEachChild(node, markForEmitAsSingleLine);
4001
4013
  }
4002
4014
 
4003
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4015
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4004
4016
  import { ConstantPool } from "@angular/compiler";
4005
4017
  import ts19 from "typescript";
4006
4018
 
4007
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
4019
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
4008
4020
  import ts18 from "typescript";
4009
4021
  function visit(node, visitor, context) {
4010
4022
  return visitor._visit(node, context);
@@ -4029,13 +4041,13 @@ var Visitor = class {
4029
4041
  }
4030
4042
  _visit(node, context) {
4031
4043
  let visitedNode = null;
4032
- node = ts18.visitEachChild(node, (child) => this._visit(child, context), context);
4044
+ node = ts18.visitEachChild(node, (child) => child && this._visit(child, context), context);
4033
4045
  if (ts18.isClassDeclaration(node)) {
4034
4046
  visitedNode = this._visitListEntryNode(node, (node2) => this.visitClassDeclaration(node2));
4035
4047
  } else {
4036
4048
  visitedNode = this.visitOtherNode(node);
4037
4049
  }
4038
- if (ts18.isBlock(visitedNode) || ts18.isSourceFile(visitedNode)) {
4050
+ if (visitedNode && (ts18.isBlock(visitedNode) || ts18.isSourceFile(visitedNode))) {
4039
4051
  visitedNode = this._maybeProcessStatements(visitedNode);
4040
4052
  }
4041
4053
  return visitedNode;
@@ -4065,7 +4077,7 @@ var Visitor = class {
4065
4077
  }
4066
4078
  };
4067
4079
 
4068
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4080
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4069
4081
  var NO_DECORATORS = /* @__PURE__ */ new Set();
4070
4082
  var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
4071
4083
  function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, perf, isCore, isClosureCompilerEnabled) {
@@ -4082,17 +4094,23 @@ var IvyCompilationVisitor = class extends Visitor {
4082
4094
  this.compilation = compilation;
4083
4095
  this.constantPool = constantPool;
4084
4096
  this.classCompilationMap = /* @__PURE__ */ new Map();
4097
+ this.deferrableImports = /* @__PURE__ */ new Set();
4085
4098
  }
4086
4099
  visitClassDeclaration(node) {
4087
4100
  const result = this.compilation.compile(node, this.constantPool);
4088
4101
  if (result !== null) {
4089
4102
  this.classCompilationMap.set(node, result);
4103
+ for (const classResult of result) {
4104
+ if (classResult.deferrableImports !== null && classResult.deferrableImports.size > 0) {
4105
+ classResult.deferrableImports.forEach((importDecl) => this.deferrableImports.add(importDecl));
4106
+ }
4107
+ }
4090
4108
  }
4091
4109
  return { node };
4092
4110
  }
4093
4111
  };
4094
4112
  var IvyTransformationVisitor = class extends Visitor {
4095
- constructor(compilation, classCompilationMap, reflector, importManager, recordWrappedNodeExpr, isClosureCompilerEnabled, isCore) {
4113
+ constructor(compilation, classCompilationMap, reflector, importManager, recordWrappedNodeExpr, isClosureCompilerEnabled, isCore, deferrableImports) {
4096
4114
  super();
4097
4115
  this.compilation = compilation;
4098
4116
  this.classCompilationMap = classCompilationMap;
@@ -4101,6 +4119,7 @@ var IvyTransformationVisitor = class extends Visitor {
4101
4119
  this.recordWrappedNodeExpr = recordWrappedNodeExpr;
4102
4120
  this.isClosureCompilerEnabled = isClosureCompilerEnabled;
4103
4121
  this.isCore = isCore;
4122
+ this.deferrableImports = deferrableImports;
4104
4123
  }
4105
4124
  visitClassDeclaration(node) {
4106
4125
  if (!this.classCompilationMap.has(node)) {
@@ -4145,6 +4164,12 @@ var IvyTransformationVisitor = class extends Visitor {
4145
4164
  );
4146
4165
  return { node, after: statements };
4147
4166
  }
4167
+ visitOtherNode(node) {
4168
+ if (ts19.isImportDeclaration(node) && this.deferrableImports.has(node)) {
4169
+ return null;
4170
+ }
4171
+ return node;
4172
+ }
4148
4173
  _angularCoreDecorators(decl) {
4149
4174
  const decorators = this.reflector.getDecoratorsOfDeclaration(decl);
4150
4175
  if (decorators === null) {
@@ -4200,7 +4225,7 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
4200
4225
  const importManager = new ImportManager(importRewriter);
4201
4226
  const compilationVisitor = new IvyCompilationVisitor(compilation, constantPool);
4202
4227
  visit(file, compilationVisitor, context);
4203
- const transformationVisitor = new IvyTransformationVisitor(compilation, compilationVisitor.classCompilationMap, reflector, importManager, recordWrappedNode, isClosureCompilerEnabled, isCore);
4228
+ const transformationVisitor = new IvyTransformationVisitor(compilation, compilationVisitor.classCompilationMap, reflector, importManager, recordWrappedNode, isClosureCompilerEnabled, isCore, compilationVisitor.deferrableImports);
4204
4229
  let sf = visit(file, transformationVisitor, context);
4205
4230
  const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts19.ScriptTarget.ES2015;
4206
4231
  const constants = constantPool.statements.map((stmt) => translateStatement(stmt, importManager, {
@@ -4276,10 +4301,10 @@ function nodeArrayFromDecoratorsArray(decorators) {
4276
4301
  return array;
4277
4302
  }
4278
4303
 
4279
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4304
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4280
4305
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4281
4306
 
4282
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4307
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4283
4308
  import { createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
4284
4309
  import ts20 from "typescript";
4285
4310
  var EMPTY_OBJECT = {};
@@ -4843,7 +4868,7 @@ function toR3InputMetadata(mapping) {
4843
4868
  };
4844
4869
  }
4845
4870
 
4846
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
4871
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
4847
4872
  var DirectiveSymbol = class extends SemanticSymbol {
4848
4873
  constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
4849
4874
  super(decl);
@@ -4923,7 +4948,7 @@ function isBaseClassEqual(current, previous) {
4923
4948
  return isSymbolEqual(current, previous);
4924
4949
  }
4925
4950
 
4926
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4951
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4927
4952
  var FIELD_DECORATORS = [
4928
4953
  "Input",
4929
4954
  "Output",
@@ -5065,21 +5090,21 @@ var DirectiveDecoratorHandler = class {
5065
5090
  const def = compileDirectiveFromMetadata(analysis.meta, pool, makeBindingParser());
5066
5091
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
5067
5092
  const classMetadata = analysis.classMetadata !== null ? compileClassMetadata(analysis.classMetadata).toStmt() : null;
5068
- return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields);
5093
+ return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields, null);
5069
5094
  }
5070
5095
  compilePartial(node, analysis, resolution) {
5071
5096
  const fac = compileDeclareFactory(toFactoryMetadata(analysis.meta, FactoryTarget.Directive));
5072
5097
  const def = compileDeclareDirectiveFromMetadata(analysis.meta);
5073
5098
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
5074
5099
  const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata(analysis.classMetadata).toStmt() : null;
5075
- return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields);
5100
+ return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields, null);
5076
5101
  }
5077
5102
  compileLocal(node, analysis, pool) {
5078
5103
  const fac = compileNgFactoryDefField(toFactoryMetadata(analysis.meta, FactoryTarget.Directive));
5079
5104
  const def = compileDirectiveFromMetadata(analysis.meta, pool, makeBindingParser());
5080
5105
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
5081
5106
  const classMetadata = analysis.classMetadata !== null ? compileClassMetadata(analysis.classMetadata).toStmt() : null;
5082
- return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields);
5107
+ return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields, null);
5083
5108
  }
5084
5109
  findClassFieldWithAngularFeatures(node) {
5085
5110
  return this.reflector.getMembersOfClass(node).find((member) => {
@@ -5094,11 +5119,11 @@ var DirectiveDecoratorHandler = class {
5094
5119
  }
5095
5120
  };
5096
5121
 
5097
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5122
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5098
5123
  import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr as FunctionExpr2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement as ReturnStatement2, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
5099
5124
  import ts22 from "typescript";
5100
5125
 
5101
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5126
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5102
5127
  import ts21 from "typescript";
5103
5128
  function createModuleWithProvidersResolver(reflector, isCore) {
5104
5129
  function _reflectModuleFromTypeParam(type, node) {
@@ -5165,7 +5190,7 @@ function isResolvedModuleWithProviders(sv) {
5165
5190
  return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
5166
5191
  }
5167
5192
 
5168
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5193
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5169
5194
  var NgModuleSymbol = class extends SemanticSymbol {
5170
5195
  constructor(decl, hasProviders) {
5171
5196
  super(decl);
@@ -5645,13 +5670,15 @@ var NgModuleDecoratorHandler = class {
5645
5670
  name: "\u0275mod",
5646
5671
  initializer: ngModuleDef.expression,
5647
5672
  statements: ngModuleDef.statements,
5648
- type: ngModuleDef.type
5673
+ type: ngModuleDef.type,
5674
+ deferrableImports: null
5649
5675
  },
5650
5676
  {
5651
5677
  name: "\u0275inj",
5652
5678
  initializer: injectorDef.expression,
5653
5679
  statements: injectorDef.statements,
5654
- type: injectorDef.type
5680
+ type: injectorDef.type,
5681
+ deferrableImports: null
5655
5682
  }
5656
5683
  ];
5657
5684
  return res;
@@ -5718,7 +5745,7 @@ function isSyntheticReference(ref) {
5718
5745
  return ref.synthetic;
5719
5746
  }
5720
5747
 
5721
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
5748
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
5722
5749
  function makeCyclicImportInfo(ref, type, cycle) {
5723
5750
  const name = ref.debugName || "(unknown)";
5724
5751
  const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
@@ -5741,7 +5768,7 @@ function checkCustomElementSelectorForErrors(selector) {
5741
5768
  return null;
5742
5769
  }
5743
5770
 
5744
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
5771
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
5745
5772
  import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
5746
5773
  import ts23 from "typescript";
5747
5774
  function getTemplateDeclarationNodeForError(declaration) {
@@ -6056,7 +6083,7 @@ function _extractTemplateStyleUrls(template) {
6056
6083
  return template.styleUrls.map((url) => ({ url, source: 1, nodeForError }));
6057
6084
  }
6058
6085
 
6059
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
6086
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
6060
6087
  var ComponentSymbol = class extends DirectiveSymbol {
6061
6088
  constructor() {
6062
6089
  super(...arguments);
@@ -6091,7 +6118,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
6091
6118
  }
6092
6119
  };
6093
6120
 
6094
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
6121
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
6095
6122
  function collectAnimationNames(value, animationTriggerNames) {
6096
6123
  if (value instanceof Map) {
6097
6124
  const name = value.get("name");
@@ -6167,10 +6194,12 @@ function isLikelyModuleWithProviders(value) {
6167
6194
  return false;
6168
6195
  }
6169
6196
 
6170
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6197
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6171
6198
  var EMPTY_ARRAY2 = [];
6199
+ var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
6200
+ var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
6172
6201
  var ComponentDecoratorHandler = class {
6173
- constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, enabledBlockTypes, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, includeClassMetadata, compilationMode) {
6202
+ constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, enabledBlockTypes, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, includeClassMetadata, compilationMode, deferredSymbolTracker) {
6174
6203
  this.reflector = reflector;
6175
6204
  this.evaluator = evaluator;
6176
6205
  this.metaRegistry = metaRegistry;
@@ -6203,6 +6232,7 @@ var ComponentDecoratorHandler = class {
6203
6232
  this.hostDirectivesResolver = hostDirectivesResolver;
6204
6233
  this.includeClassMetadata = includeClassMetadata;
6205
6234
  this.compilationMode = compilationMode;
6235
+ this.deferredSymbolTracker = deferredSymbolTracker;
6206
6236
  this.literalCache = /* @__PURE__ */ new Map();
6207
6237
  this.elementSchemaRegistry = new DomElementSchemaRegistry();
6208
6238
  this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
@@ -6564,7 +6594,9 @@ var ComponentDecoratorHandler = class {
6564
6594
  const metadata = analysis.meta;
6565
6595
  const data = {
6566
6596
  declarations: EMPTY_ARRAY2,
6567
- declarationListEmitMode: 0
6597
+ declarationListEmitMode: 0,
6598
+ deferBlocks: /* @__PURE__ */ new Map(),
6599
+ deferrableDeclToImportDecl: /* @__PURE__ */ new Map()
6568
6600
  };
6569
6601
  const diagnostics = [];
6570
6602
  const scope = this.scopeReader.getScopeForComponent(node);
@@ -6581,31 +6613,45 @@ var ComponentDecoratorHandler = class {
6581
6613
  }
6582
6614
  const binder = new R3TargetBinder(matcher);
6583
6615
  const bound = binder.bind({ template: metadata.template.nodes });
6584
- const used = /* @__PURE__ */ new Set();
6585
- for (const dir of bound.getUsedDirectives()) {
6586
- used.add(dir.ref.node);
6616
+ const deferBlocks = /* @__PURE__ */ new Map();
6617
+ for (const deferBlock of bound.getDeferBlocks()) {
6618
+ deferBlocks.set(deferBlock, binder.bind({ template: deferBlock.children }));
6619
+ }
6620
+ const eagerlyUsed = /* @__PURE__ */ new Set();
6621
+ for (const dir of bound.getEagerlyUsedDirectives()) {
6622
+ eagerlyUsed.add(dir.ref.node);
6587
6623
  }
6588
- for (const name of bound.getUsedPipes()) {
6624
+ for (const name of bound.getEagerlyUsedPipes()) {
6589
6625
  if (!pipes.has(name)) {
6590
6626
  continue;
6591
6627
  }
6592
- used.add(pipes.get(name).ref.node);
6628
+ eagerlyUsed.add(pipes.get(name).ref.node);
6593
6629
  }
6594
- const declarations = [];
6595
- const seen = /* @__PURE__ */ new Set();
6630
+ const wholeTemplateUsed = new Set(eagerlyUsed);
6631
+ for (const bound2 of deferBlocks.values()) {
6632
+ for (const dir of bound2.getEagerlyUsedDirectives()) {
6633
+ wholeTemplateUsed.add(dir.ref.node);
6634
+ }
6635
+ for (const name of bound2.getEagerlyUsedPipes()) {
6636
+ if (!pipes.has(name)) {
6637
+ continue;
6638
+ }
6639
+ wholeTemplateUsed.add(pipes.get(name).ref.node);
6640
+ }
6641
+ }
6642
+ const declarations = /* @__PURE__ */ new Map();
6596
6643
  for (const dep of dependencies) {
6597
- if (seen.has(dep.ref.node)) {
6644
+ if (declarations.has(dep.ref.node)) {
6598
6645
  continue;
6599
6646
  }
6600
- seen.add(dep.ref.node);
6601
6647
  switch (dep.kind) {
6602
6648
  case MetaKind.Directive:
6603
- if (!used.has(dep.ref.node) || dep.matchSource !== MatchSource.Selector) {
6649
+ if (!wholeTemplateUsed.has(dep.ref.node) || dep.matchSource !== MatchSource.Selector) {
6604
6650
  continue;
6605
6651
  }
6606
6652
  const dirType = this.refEmitter.emit(dep.ref, context);
6607
6653
  assertSuccessfulReferenceEmit(dirType, node.name, dep.isComponent ? "component" : "directive");
6608
- declarations.push({
6654
+ declarations.set(dep.ref.node, {
6609
6655
  kind: R3TemplateDependencyKind.Directive,
6610
6656
  ref: dep.ref,
6611
6657
  type: dirType.expression,
@@ -6618,12 +6664,12 @@ var ComponentDecoratorHandler = class {
6618
6664
  });
6619
6665
  break;
6620
6666
  case MetaKind.Pipe:
6621
- if (!used.has(dep.ref.node)) {
6667
+ if (!wholeTemplateUsed.has(dep.ref.node)) {
6622
6668
  continue;
6623
6669
  }
6624
6670
  const pipeType = this.refEmitter.emit(dep.ref, context);
6625
6671
  assertSuccessfulReferenceEmit(pipeType, node.name, "pipe");
6626
- declarations.push({
6672
+ declarations.set(dep.ref.node, {
6627
6673
  kind: R3TemplateDependencyKind.Pipe,
6628
6674
  type: pipeType.expression,
6629
6675
  name: dep.name,
@@ -6634,7 +6680,7 @@ var ComponentDecoratorHandler = class {
6634
6680
  case MetaKind.NgModule:
6635
6681
  const ngModuleType = this.refEmitter.emit(dep.ref, context);
6636
6682
  assertSuccessfulReferenceEmit(ngModuleType, node.name, "NgModule");
6637
- declarations.push({
6683
+ declarations.set(dep.ref.node, {
6638
6684
  kind: R3TemplateDependencyKind.NgModule,
6639
6685
  type: ngModuleType.expression,
6640
6686
  importedFile: ngModuleType.importedFile
@@ -6642,17 +6688,17 @@ var ComponentDecoratorHandler = class {
6642
6688
  break;
6643
6689
  }
6644
6690
  }
6645
- const isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
6646
- const isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
6647
6691
  const getSemanticReference = (decl) => this.semanticDepGraphUpdater.getSemanticReference(decl.ref.node, decl.type);
6648
6692
  if (this.semanticDepGraphUpdater !== null) {
6649
- symbol.usedDirectives = declarations.filter(isUsedDirective).map(getSemanticReference);
6650
- symbol.usedPipes = declarations.filter(isUsedPipe).map(getSemanticReference);
6693
+ symbol.usedDirectives = Array.from(declarations.values()).filter(isUsedDirective).map(getSemanticReference);
6694
+ symbol.usedPipes = Array.from(declarations.values()).filter(isUsedPipe).map(getSemanticReference);
6651
6695
  }
6696
+ const eagerDeclarations = Array.from(declarations.values()).filter((decl) => decl.kind === R3TemplateDependencyKind.NgModule || eagerlyUsed.has(decl.ref.node));
6697
+ this.resolveDeferBlocks(deferBlocks, declarations, data, analysis, eagerlyUsed);
6652
6698
  const cyclesFromDirectives = /* @__PURE__ */ new Map();
6653
6699
  const cyclesFromPipes = /* @__PURE__ */ new Map();
6654
6700
  if (!metadata.isStandalone) {
6655
- for (const usedDep of declarations) {
6701
+ for (const usedDep of eagerDeclarations) {
6656
6702
  const cycle = this._checkForCyclicImport(usedDep.importedFile, usedDep.type, context);
6657
6703
  if (cycle !== null) {
6658
6704
  switch (usedDep.kind) {
@@ -6669,16 +6715,16 @@ var ComponentDecoratorHandler = class {
6669
6715
  const standaloneImportMayBeForwardDeclared = analysis.resolvedImports !== null && analysis.resolvedImports.some((ref) => ref.synthetic);
6670
6716
  const cycleDetected = cyclesFromDirectives.size !== 0 || cyclesFromPipes.size !== 0;
6671
6717
  if (!cycleDetected) {
6672
- for (const { type, importedFile } of declarations) {
6718
+ for (const { type, importedFile } of eagerDeclarations) {
6673
6719
  this.maybeRecordSyntheticImport(importedFile, type, context);
6674
6720
  }
6675
- const declarationIsForwardDeclared = declarations.some((decl) => isExpressionForwardReference(decl.type, node.name, context));
6721
+ const declarationIsForwardDeclared = eagerDeclarations.some((decl) => isExpressionForwardReference(decl.type, node.name, context));
6676
6722
  const wrapDirectivesAndPipesInClosure = declarationIsForwardDeclared || standaloneImportMayBeForwardDeclared;
6677
- data.declarations = declarations;
6723
+ data.declarations = eagerDeclarations;
6678
6724
  data.declarationListEmitMode = wrapDirectivesAndPipesInClosure ? 1 : 0;
6679
6725
  } else {
6680
6726
  if (this.cycleHandlingStrategy === 0) {
6681
- this.scopeRegistry.setComponentRemoteScope(node, declarations.filter(isUsedDirective).map((dir) => dir.ref), declarations.filter(isUsedPipe).map((pipe) => pipe.ref));
6727
+ this.scopeRegistry.setComponentRemoteScope(node, eagerDeclarations.filter(isUsedDirective).map((dir) => dir.ref), eagerDeclarations.filter(isUsedPipe).map((pipe) => pipe.ref));
6682
6728
  symbol.isRemotelyScoped = true;
6683
6729
  if (this.semanticDepGraphUpdater !== null && scope.kind === ComponentScopeKind.NgModule && scope.ngModule !== null) {
6684
6730
  const moduleSymbol = this.semanticDepGraphUpdater.getSymbol(scope.ngModule);
@@ -6756,15 +6802,28 @@ var ComponentDecoratorHandler = class {
6756
6802
  analysis.meta.styles = styles.filter((s) => s.trim().length > 0);
6757
6803
  }
6758
6804
  compileFull(node, analysis, resolution, pool) {
6805
+ var _a;
6759
6806
  if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
6760
6807
  return [];
6761
6808
  }
6809
+ for (const [_, deferBlockDeps] of resolution.deferBlocks) {
6810
+ for (const deferBlockDep of deferBlockDeps) {
6811
+ const dep = deferBlockDep;
6812
+ const classDecl = dep.classDeclaration;
6813
+ const importDecl = (_a = resolution.deferrableDeclToImportDecl.get(classDecl)) != null ? _a : null;
6814
+ if (importDecl && this.deferredSymbolTracker.canDefer(importDecl)) {
6815
+ deferBlockDep.isDeferrable = true;
6816
+ deferBlockDep.importPath = importDecl.moduleSpecifier.text;
6817
+ }
6818
+ }
6819
+ }
6762
6820
  const meta = { ...analysis.meta, ...resolution };
6763
6821
  const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
6764
6822
  const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
6765
6823
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
6766
6824
  const classMetadata = analysis.classMetadata !== null ? compileClassMetadata3(analysis.classMetadata).toStmt() : null;
6767
- return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields);
6825
+ const deferrableImports = this.deferredSymbolTracker.getDeferrableImportDecls();
6826
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports);
6768
6827
  }
6769
6828
  compilePartial(node, analysis, resolution) {
6770
6829
  if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
@@ -6781,7 +6840,7 @@ var ComponentDecoratorHandler = class {
6781
6840
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
6782
6841
  const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
6783
6842
  const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata3(analysis.classMetadata).toStmt() : null;
6784
- return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields);
6843
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, null);
6785
6844
  }
6786
6845
  compileLocal(node, analysis, pool) {
6787
6846
  if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
@@ -6790,13 +6849,15 @@ var ComponentDecoratorHandler = class {
6790
6849
  const meta = {
6791
6850
  ...analysis.meta,
6792
6851
  declarationListEmitMode: 0,
6793
- declarations: []
6852
+ declarations: [],
6853
+ deferBlocks: /* @__PURE__ */ new Map(),
6854
+ deferrableDeclToImportDecl: /* @__PURE__ */ new Map()
6794
6855
  };
6795
6856
  const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
6796
6857
  const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
6797
6858
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
6798
6859
  const classMetadata = analysis.classMetadata !== null ? compileClassMetadata3(analysis.classMetadata).toStmt() : null;
6799
- return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields);
6860
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, null);
6800
6861
  }
6801
6862
  _checkForCyclicImport(importedFile, expr, origin) {
6802
6863
  const imported = resolveImportedFile(this.moduleResolver, importedFile, expr, origin);
@@ -6812,6 +6873,71 @@ var ComponentDecoratorHandler = class {
6812
6873
  }
6813
6874
  this.cycleAnalyzer.recordSyntheticImport(origin, imported);
6814
6875
  }
6876
+ resolveDeferBlocks(deferBlocks, deferrableDecls, resolutionData, analysisData, eagerlyUsedDecls) {
6877
+ const allDeferredDecls = /* @__PURE__ */ new Set();
6878
+ for (const [deferBlock, bound] of deferBlocks) {
6879
+ const usedDirectives = new Set(bound.getEagerlyUsedDirectives().map((d) => d.ref.node));
6880
+ const usedPipes = new Set(bound.getEagerlyUsedPipes());
6881
+ const deps = [];
6882
+ for (const decl of Array.from(deferrableDecls.values())) {
6883
+ if (decl.kind === R3TemplateDependencyKind.NgModule) {
6884
+ continue;
6885
+ }
6886
+ if (decl.kind === R3TemplateDependencyKind.Directive && !usedDirectives.has(decl.ref.node)) {
6887
+ continue;
6888
+ }
6889
+ if (decl.kind === R3TemplateDependencyKind.Pipe && !usedPipes.has(decl.name)) {
6890
+ continue;
6891
+ }
6892
+ deps.push({
6893
+ type: decl.type,
6894
+ symbolName: decl.ref.node.name.escapedText,
6895
+ isDeferrable: false,
6896
+ importPath: null,
6897
+ classDeclaration: decl.ref.node
6898
+ });
6899
+ allDeferredDecls.add(decl.ref.node);
6900
+ }
6901
+ resolutionData.deferBlocks.set(deferBlock, deps);
6902
+ }
6903
+ if (analysisData.meta.isStandalone && analysisData.rawImports !== null && ts24.isArrayLiteralExpression(analysisData.rawImports)) {
6904
+ for (const node of analysisData.rawImports.elements) {
6905
+ if (!ts24.isIdentifier(node)) {
6906
+ continue;
6907
+ }
6908
+ const imp = this.reflector.getImportOfIdentifier(node);
6909
+ if (imp === null) {
6910
+ continue;
6911
+ }
6912
+ const decl = this.reflector.getDeclarationOfIdentifier(node);
6913
+ if (decl === null) {
6914
+ continue;
6915
+ }
6916
+ if (!isNamedClassDeclaration(decl.node)) {
6917
+ continue;
6918
+ }
6919
+ if (!allDeferredDecls.has(decl.node)) {
6920
+ continue;
6921
+ }
6922
+ if (eagerlyUsedDecls.has(decl.node)) {
6923
+ continue;
6924
+ }
6925
+ const dirMeta = this.metaReader.getDirectiveMetadata(new Reference(decl.node));
6926
+ if (dirMeta !== null && !dirMeta.isStandalone) {
6927
+ continue;
6928
+ }
6929
+ const pipeMeta = this.metaReader.getPipeMetadata(new Reference(decl.node));
6930
+ if (pipeMeta !== null && !pipeMeta.isStandalone) {
6931
+ continue;
6932
+ }
6933
+ if (dirMeta === null && pipeMeta === null) {
6934
+ continue;
6935
+ }
6936
+ resolutionData.deferrableDeclToImportDecl.set(decl.node, imp.node);
6937
+ this.deferredSymbolTracker.markAsDeferrableCandidate(node, imp.node);
6938
+ }
6939
+ }
6940
+ }
6815
6941
  };
6816
6942
  function validateStandaloneImports(importRefs, importExpr, metaReader, scopeReader) {
6817
6943
  const diagnostics = [];
@@ -6839,7 +6965,7 @@ function validateStandaloneImports(importRefs, importExpr, metaReader, scopeRead
6839
6965
  return diagnostics;
6840
6966
  }
6841
6967
 
6842
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
6968
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
6843
6969
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
6844
6970
  import ts25 from "typescript";
6845
6971
  var InjectableDecoratorHandler = class {
@@ -6927,7 +7053,13 @@ var InjectableDecoratorHandler = class {
6927
7053
  }
6928
7054
  if (\u0275prov === void 0) {
6929
7055
  const res = compileInjectableFn(analysis.meta);
6930
- results.push({ name: "\u0275prov", initializer: res.expression, statements: res.statements, type: res.type });
7056
+ results.push({
7057
+ name: "\u0275prov",
7058
+ initializer: res.expression,
7059
+ statements: res.statements,
7060
+ type: res.type,
7061
+ deferrableImports: null
7062
+ });
6931
7063
  }
6932
7064
  return results;
6933
7065
  }
@@ -7058,7 +7190,7 @@ function getDep(dep, reflector) {
7058
7190
  return meta;
7059
7191
  }
7060
7192
 
7061
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7193
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7062
7194
  import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
7063
7195
  import ts26 from "typescript";
7064
7196
  var PipeSymbol = class extends SemanticSymbol {
@@ -7193,30 +7325,30 @@ var PipeDecoratorHandler = class {
7193
7325
  const fac = compileNgFactoryDefField(toFactoryMetadata(analysis.meta, FactoryTarget5.Pipe));
7194
7326
  const def = compilePipeFromMetadata(analysis.meta);
7195
7327
  const classMetadata = analysis.classMetadata !== null ? compileClassMetadata5(analysis.classMetadata).toStmt() : null;
7196
- return compileResults(fac, def, classMetadata, "\u0275pipe", null);
7328
+ return compileResults(fac, def, classMetadata, "\u0275pipe", null, null);
7197
7329
  }
7198
7330
  compilePartial(node, analysis) {
7199
7331
  const fac = compileDeclareFactory(toFactoryMetadata(analysis.meta, FactoryTarget5.Pipe));
7200
7332
  const def = compileDeclarePipeFromMetadata(analysis.meta);
7201
7333
  const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata5(analysis.classMetadata).toStmt() : null;
7202
- return compileResults(fac, def, classMetadata, "\u0275pipe", null);
7334
+ return compileResults(fac, def, classMetadata, "\u0275pipe", null, null);
7203
7335
  }
7204
7336
  compileLocal(node, analysis) {
7205
7337
  const fac = compileNgFactoryDefField(toFactoryMetadata(analysis.meta, FactoryTarget5.Pipe));
7206
7338
  const def = compilePipeFromMetadata(analysis.meta);
7207
7339
  const classMetadata = analysis.classMetadata !== null ? compileClassMetadata5(analysis.classMetadata).toStmt() : null;
7208
- return compileResults(fac, def, classMetadata, "\u0275pipe", null);
7340
+ return compileResults(fac, def, classMetadata, "\u0275pipe", null, null);
7209
7341
  }
7210
7342
  };
7211
7343
 
7212
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
7344
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
7213
7345
  var OptimizeFor;
7214
7346
  (function(OptimizeFor2) {
7215
7347
  OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
7216
7348
  OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
7217
7349
  })(OptimizeFor || (OptimizeFor = {}));
7218
7350
 
7219
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
7351
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
7220
7352
  var PotentialImportKind;
7221
7353
  (function(PotentialImportKind2) {
7222
7354
  PotentialImportKind2[PotentialImportKind2["NgModule"] = 0] = "NgModule";
@@ -7228,14 +7360,14 @@ var PotentialImportMode;
7228
7360
  PotentialImportMode2[PotentialImportMode2["ForceDirect"] = 1] = "ForceDirect";
7229
7361
  })(PotentialImportMode || (PotentialImportMode = {}));
7230
7362
 
7231
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
7363
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
7232
7364
  var CompletionKind;
7233
7365
  (function(CompletionKind2) {
7234
7366
  CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
7235
7367
  CompletionKind2[CompletionKind2["Variable"] = 1] = "Variable";
7236
7368
  })(CompletionKind || (CompletionKind = {}));
7237
7369
 
7238
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
7370
+ // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
7239
7371
  var SymbolKind;
7240
7372
  (function(SymbolKind2) {
7241
7373
  SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
@@ -7303,4 +7435,4 @@ export {
7303
7435
  * Use of this source code is governed by an MIT-style license that can be
7304
7436
  * found in the LICENSE file at https://angular.io/license
7305
7437
  */
7306
- //# sourceMappingURL=chunk-YZ3WOD5G.js.map
7438
+ //# sourceMappingURL=chunk-QUGPFSIN.js.map