@angular/compiler 19.0.0-next.5 → 19.0.0-next.7

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.5
2
+ * @license Angular v19.0.0-next.7
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -2693,6 +2693,32 @@ class Identifiers {
2693
2693
  name: 'ɵɵdeferPrefetchOnViewport',
2694
2694
  moduleName: CORE,
2695
2695
  }; }
2696
+ static { this.deferHydrateWhen = { name: 'ɵɵdeferHydrateWhen', moduleName: CORE }; }
2697
+ static { this.deferHydrateNever = { name: 'ɵɵdeferHydrateNever', moduleName: CORE }; }
2698
+ static { this.deferHydrateOnIdle = {
2699
+ name: 'ɵɵdeferHydrateOnIdle',
2700
+ moduleName: CORE,
2701
+ }; }
2702
+ static { this.deferHydrateOnImmediate = {
2703
+ name: 'ɵɵdeferHydrateOnImmediate',
2704
+ moduleName: CORE,
2705
+ }; }
2706
+ static { this.deferHydrateOnTimer = {
2707
+ name: 'ɵɵdeferHydrateOnTimer',
2708
+ moduleName: CORE,
2709
+ }; }
2710
+ static { this.deferHydrateOnHover = {
2711
+ name: 'ɵɵdeferHydrateOnHover',
2712
+ moduleName: CORE,
2713
+ }; }
2714
+ static { this.deferHydrateOnInteraction = {
2715
+ name: 'ɵɵdeferHydrateOnInteraction',
2716
+ moduleName: CORE,
2717
+ }; }
2718
+ static { this.deferHydrateOnViewport = {
2719
+ name: 'ɵɵdeferHydrateOnViewport',
2720
+ moduleName: CORE,
2721
+ }; }
2696
2722
  static { this.deferEnableTimerScheduling = {
2697
2723
  name: 'ɵɵdeferEnableTimerScheduling',
2698
2724
  moduleName: CORE,
@@ -4902,49 +4928,52 @@ class Element$1 {
4902
4928
  }
4903
4929
  }
4904
4930
  class DeferredTrigger {
4905
- constructor(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan) {
4931
+ constructor(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan, hydrateSpan) {
4906
4932
  this.nameSpan = nameSpan;
4907
4933
  this.sourceSpan = sourceSpan;
4908
4934
  this.prefetchSpan = prefetchSpan;
4909
4935
  this.whenOrOnSourceSpan = whenOrOnSourceSpan;
4936
+ this.hydrateSpan = hydrateSpan;
4910
4937
  }
4911
4938
  visit(visitor) {
4912
4939
  return visitor.visitDeferredTrigger(this);
4913
4940
  }
4914
4941
  }
4915
4942
  class BoundDeferredTrigger extends DeferredTrigger {
4916
- constructor(value, sourceSpan, prefetchSpan, whenSourceSpan) {
4943
+ constructor(value, sourceSpan, prefetchSpan, whenSourceSpan, hydrateSpan) {
4917
4944
  // BoundDeferredTrigger is for 'when' triggers. These aren't really "triggers" and don't have a
4918
4945
  // nameSpan. Trigger names are the built in event triggers like hover, interaction, etc.
4919
- super(/** nameSpan */ null, sourceSpan, prefetchSpan, whenSourceSpan);
4946
+ super(/** nameSpan */ null, sourceSpan, prefetchSpan, whenSourceSpan, hydrateSpan);
4920
4947
  this.value = value;
4921
4948
  }
4922
4949
  }
4950
+ class NeverDeferredTrigger extends DeferredTrigger {
4951
+ }
4923
4952
  class IdleDeferredTrigger extends DeferredTrigger {
4924
4953
  }
4925
4954
  class ImmediateDeferredTrigger extends DeferredTrigger {
4926
4955
  }
4927
4956
  class HoverDeferredTrigger extends DeferredTrigger {
4928
- constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
4929
- super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
4957
+ constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
4958
+ super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
4930
4959
  this.reference = reference;
4931
4960
  }
4932
4961
  }
4933
4962
  class TimerDeferredTrigger extends DeferredTrigger {
4934
- constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
4935
- super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
4963
+ constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
4964
+ super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
4936
4965
  this.delay = delay;
4937
4966
  }
4938
4967
  }
4939
4968
  class InteractionDeferredTrigger extends DeferredTrigger {
4940
- constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
4941
- super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
4969
+ constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
4970
+ super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
4942
4971
  this.reference = reference;
4943
4972
  }
4944
4973
  }
4945
4974
  class ViewportDeferredTrigger extends DeferredTrigger {
4946
- constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
4947
- super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
4975
+ constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
4976
+ super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
4948
4977
  this.reference = reference;
4949
4978
  }
4950
4979
  }
@@ -4990,7 +5019,7 @@ class DeferredBlockError extends BlockNode {
4990
5019
  }
4991
5020
  }
4992
5021
  class DeferredBlock extends BlockNode {
4993
- constructor(children, triggers, prefetchTriggers, placeholder, loading, error, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n) {
5022
+ constructor(children, triggers, prefetchTriggers, hydrateTriggers, placeholder, loading, error, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n) {
4994
5023
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
4995
5024
  this.children = children;
4996
5025
  this.placeholder = placeholder;
@@ -5000,15 +5029,19 @@ class DeferredBlock extends BlockNode {
5000
5029
  this.i18n = i18n;
5001
5030
  this.triggers = triggers;
5002
5031
  this.prefetchTriggers = prefetchTriggers;
5032
+ this.hydrateTriggers = hydrateTriggers;
5003
5033
  // We cache the keys since we know that they won't change and we
5004
5034
  // don't want to enumarate them every time we're traversing the AST.
5005
5035
  this.definedTriggers = Object.keys(triggers);
5006
5036
  this.definedPrefetchTriggers = Object.keys(prefetchTriggers);
5037
+ this.definedHydrateTriggers = Object.keys(hydrateTriggers);
5007
5038
  }
5008
5039
  visit(visitor) {
5009
5040
  return visitor.visitDeferredBlock(this);
5010
5041
  }
5011
5042
  visitAll(visitor) {
5043
+ // Visit the hydrate triggers first to match their insertion order.
5044
+ this.visitTriggers(this.definedHydrateTriggers, this.hydrateTriggers, visitor);
5012
5045
  this.visitTriggers(this.definedTriggers, this.triggers, visitor);
5013
5046
  this.visitTriggers(this.definedPrefetchTriggers, this.prefetchTriggers, visitor);
5014
5047
  visitAll$1(visitor, this.children);
@@ -8630,6 +8663,7 @@ var DeferTriggerKind;
8630
8663
  DeferTriggerKind[DeferTriggerKind["Hover"] = 3] = "Hover";
8631
8664
  DeferTriggerKind[DeferTriggerKind["Interaction"] = 4] = "Interaction";
8632
8665
  DeferTriggerKind[DeferTriggerKind["Viewport"] = 5] = "Viewport";
8666
+ DeferTriggerKind[DeferTriggerKind["Never"] = 6] = "Never";
8633
8667
  })(DeferTriggerKind || (DeferTriggerKind = {}));
8634
8668
  /**
8635
8669
  * Kinds of i18n contexts. They can be created because of root i18n blocks, or ICUs.
@@ -8944,12 +8978,12 @@ function createRepeaterOp(repeaterCreate, targetSlot, collection, sourceSpan) {
8944
8978
  ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,
8945
8979
  };
8946
8980
  }
8947
- function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
8981
+ function createDeferWhenOp(target, expr, modifier, sourceSpan) {
8948
8982
  return {
8949
8983
  kind: OpKind.DeferWhen,
8950
8984
  target,
8951
8985
  expr,
8952
- prefetch,
8986
+ modifier,
8953
8987
  sourceSpan,
8954
8988
  ...NEW_OP,
8955
8989
  ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,
@@ -10508,12 +10542,12 @@ function createDeferOp(xref, main, mainSlot, ownResolverFn, resolverFn, sourceSp
10508
10542
  numSlotsUsed: 2,
10509
10543
  };
10510
10544
  }
10511
- function createDeferOnOp(defer, trigger, prefetch, sourceSpan) {
10545
+ function createDeferOnOp(defer, trigger, modifier, sourceSpan) {
10512
10546
  return {
10513
10547
  kind: OpKind.DeferOn,
10514
10548
  defer,
10515
10549
  trigger,
10516
- prefetch,
10550
+ modifier,
10517
10551
  sourceSpan,
10518
10552
  ...NEW_OP,
10519
10553
  };
@@ -11878,6 +11912,7 @@ function resolveDeferTargetNames(job) {
11878
11912
  function resolveTrigger(deferOwnerView, op, placeholderView) {
11879
11913
  switch (op.trigger.kind) {
11880
11914
  case DeferTriggerKind.Idle:
11915
+ case DeferTriggerKind.Never:
11881
11916
  case DeferTriggerKind.Immediate:
11882
11917
  case DeferTriggerKind.Timer:
11883
11918
  return;
@@ -11937,7 +11972,9 @@ function resolveDeferTargetNames(job) {
11937
11972
  break;
11938
11973
  case OpKind.DeferOn:
11939
11974
  const deferOp = defers.get(op.defer);
11940
- resolveTrigger(unit, op, deferOp.placeholderView);
11975
+ resolveTrigger(unit, op, op.modifier === "hydrate" /* ir.DeferOpModifierKind.HYDRATE */
11976
+ ? deferOp.mainView
11977
+ : deferOp.placeholderView);
11941
11978
  break;
11942
11979
  }
11943
11980
  }
@@ -12358,7 +12395,10 @@ function formatValue(value) {
12358
12395
  // Self-closing tags use a special form that concatenates the start and close tag values.
12359
12396
  if (value.flags & I18nParamValueFlags.OpenTag &&
12360
12397
  value.flags & I18nParamValueFlags.CloseTag) {
12361
- return `${formatValue({ ...value, flags: value.flags & ~I18nParamValueFlags.CloseTag })}${formatValue({ ...value, flags: value.flags & ~I18nParamValueFlags.OpenTag })}`;
12398
+ return `${formatValue({
12399
+ ...value,
12400
+ flags: value.flags & ~I18nParamValueFlags.CloseTag,
12401
+ })}${formatValue({ ...value, flags: value.flags & ~I18nParamValueFlags.OpenTag })}`;
12362
12402
  }
12363
12403
  // If there are no special flags, just return the raw value.
12364
12404
  if (value.flags === I18nParamValueFlags.None) {
@@ -12753,13 +12793,17 @@ class IcuSerializerVisitor {
12753
12793
  visitTagPlaceholder(ph) {
12754
12794
  return ph.isVoid
12755
12795
  ? this.formatPh(ph.startName)
12756
- : `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;
12796
+ : `${this.formatPh(ph.startName)}${ph.children
12797
+ .map((child) => child.visit(this))
12798
+ .join('')}${this.formatPh(ph.closeName)}`;
12757
12799
  }
12758
12800
  visitPlaceholder(ph) {
12759
12801
  return this.formatPh(ph.name);
12760
12802
  }
12761
12803
  visitBlockPlaceholder(ph) {
12762
- return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;
12804
+ return `${this.formatPh(ph.startName)}${ph.children
12805
+ .map((child) => child.visit(this))
12806
+ .join('')}${this.formatPh(ph.closeName)}`;
12763
12807
  }
12764
12808
  visitIcuPlaceholder(ph, context) {
12765
12809
  return this.formatPh(ph.name);
@@ -20110,13 +20154,17 @@ class GetMsgSerializerVisitor {
20110
20154
  visitTagPlaceholder(ph) {
20111
20155
  return ph.isVoid
20112
20156
  ? this.formatPh(ph.startName)
20113
- : `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;
20157
+ : `${this.formatPh(ph.startName)}${ph.children
20158
+ .map((child) => child.visit(this))
20159
+ .join('')}${this.formatPh(ph.closeName)}`;
20114
20160
  }
20115
20161
  visitPlaceholder(ph) {
20116
20162
  return this.formatPh(ph.name);
20117
20163
  }
20118
20164
  visitBlockPlaceholder(ph) {
20119
- return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;
20165
+ return `${this.formatPh(ph.startName)}${ph.children
20166
+ .map((child) => child.visit(this))
20167
+ .join('')}${this.formatPh(ph.closeName)}`;
20120
20168
  }
20121
20169
  visitIcuPlaceholder(ph, context) {
20122
20170
  return this.formatPh(ph.name);
@@ -21671,28 +21719,68 @@ function defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeho
21671
21719
  return call(Identifiers.defer, args, sourceSpan);
21672
21720
  }
21673
21721
  const deferTriggerToR3TriggerInstructionsMap = new Map([
21674
- [DeferTriggerKind.Idle, [Identifiers.deferOnIdle, Identifiers.deferPrefetchOnIdle]],
21722
+ [
21723
+ DeferTriggerKind.Idle,
21724
+ {
21725
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferOnIdle,
21726
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferPrefetchOnIdle,
21727
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateOnIdle,
21728
+ },
21729
+ ],
21675
21730
  [
21676
21731
  DeferTriggerKind.Immediate,
21677
- [Identifiers.deferOnImmediate, Identifiers.deferPrefetchOnImmediate],
21732
+ {
21733
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferOnImmediate,
21734
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferPrefetchOnImmediate,
21735
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateOnImmediate,
21736
+ },
21737
+ ],
21738
+ [
21739
+ DeferTriggerKind.Timer,
21740
+ {
21741
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferOnTimer,
21742
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferPrefetchOnTimer,
21743
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateOnTimer,
21744
+ },
21745
+ ],
21746
+ [
21747
+ DeferTriggerKind.Hover,
21748
+ {
21749
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferOnHover,
21750
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferPrefetchOnHover,
21751
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateOnHover,
21752
+ },
21678
21753
  ],
21679
- [DeferTriggerKind.Timer, [Identifiers.deferOnTimer, Identifiers.deferPrefetchOnTimer]],
21680
- [DeferTriggerKind.Hover, [Identifiers.deferOnHover, Identifiers.deferPrefetchOnHover]],
21681
21754
  [
21682
21755
  DeferTriggerKind.Interaction,
21683
- [Identifiers.deferOnInteraction, Identifiers.deferPrefetchOnInteraction],
21756
+ {
21757
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferOnInteraction,
21758
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferPrefetchOnInteraction,
21759
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateOnInteraction,
21760
+ },
21684
21761
  ],
21685
21762
  [
21686
21763
  DeferTriggerKind.Viewport,
21687
- [Identifiers.deferOnViewport, Identifiers.deferPrefetchOnViewport],
21764
+ {
21765
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferOnViewport,
21766
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferPrefetchOnViewport,
21767
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateOnViewport,
21768
+ },
21769
+ ],
21770
+ [
21771
+ DeferTriggerKind.Never,
21772
+ {
21773
+ ["none" /* ir.DeferOpModifierKind.NONE */]: Identifiers.deferHydrateNever,
21774
+ ["prefetch" /* ir.DeferOpModifierKind.PREFETCH */]: Identifiers.deferHydrateNever,
21775
+ ["hydrate" /* ir.DeferOpModifierKind.HYDRATE */]: Identifiers.deferHydrateNever,
21776
+ },
21688
21777
  ],
21689
21778
  ]);
21690
- function deferOn(trigger, args, prefetch, sourceSpan) {
21691
- const instructions = deferTriggerToR3TriggerInstructionsMap.get(trigger);
21692
- if (instructions === undefined) {
21779
+ function deferOn(trigger, args, modifier, sourceSpan) {
21780
+ const instructionToCall = deferTriggerToR3TriggerInstructionsMap.get(trigger)?.[modifier];
21781
+ if (instructionToCall === undefined) {
21693
21782
  throw new Error(`Unable to determine instruction for trigger ${trigger}`);
21694
21783
  }
21695
- const instructionToCall = prefetch ? instructions[1] : instructions[0];
21696
21784
  return call(instructionToCall, args.map((a) => literal(a)), sourceSpan);
21697
21785
  }
21698
21786
  function projectionDef(def) {
@@ -21748,8 +21836,14 @@ function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByF
21748
21836
  function repeater(collection, sourceSpan) {
21749
21837
  return call(Identifiers.repeater, [collection], sourceSpan);
21750
21838
  }
21751
- function deferWhen(prefetch, expr, sourceSpan) {
21752
- return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);
21839
+ function deferWhen(modifier, expr, sourceSpan) {
21840
+ if (modifier === "prefetch" /* ir.DeferOpModifierKind.PREFETCH */) {
21841
+ return call(Identifiers.deferPrefetchWhen, [expr], sourceSpan);
21842
+ }
21843
+ else if (modifier === "hydrate" /* ir.DeferOpModifierKind.HYDRATE */) {
21844
+ return call(Identifiers.deferHydrateWhen, [expr], sourceSpan);
21845
+ }
21846
+ return call(Identifiers.deferWhen, [expr], sourceSpan);
21753
21847
  }
21754
21848
  function declareLet(slot, sourceSpan) {
21755
21849
  return call(Identifiers.declareLet, [literal(slot)], sourceSpan);
@@ -22238,6 +22332,7 @@ function reifyCreateOperations(unit, ops) {
22238
22332
  case OpKind.DeferOn:
22239
22333
  let args = [];
22240
22334
  switch (op.trigger.kind) {
22335
+ case DeferTriggerKind.Never:
22241
22336
  case DeferTriggerKind.Idle:
22242
22337
  case DeferTriggerKind.Immediate:
22243
22338
  break;
@@ -22247,18 +22342,24 @@ function reifyCreateOperations(unit, ops) {
22247
22342
  case DeferTriggerKind.Interaction:
22248
22343
  case DeferTriggerKind.Hover:
22249
22344
  case DeferTriggerKind.Viewport:
22250
- if (op.trigger.targetSlot?.slot == null || op.trigger.targetSlotViewSteps === null) {
22251
- throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${op.trigger.kind}`);
22345
+ // `hydrate` triggers don't support targets.
22346
+ if (op.modifier === "hydrate" /* ir.DeferOpModifierKind.HYDRATE */) {
22347
+ args = [];
22252
22348
  }
22253
- args = [op.trigger.targetSlot.slot];
22254
- if (op.trigger.targetSlotViewSteps !== 0) {
22255
- args.push(op.trigger.targetSlotViewSteps);
22349
+ else {
22350
+ if (op.trigger.targetSlot?.slot == null || op.trigger.targetSlotViewSteps === null) {
22351
+ throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${op.trigger.kind}`);
22352
+ }
22353
+ args = [op.trigger.targetSlot.slot];
22354
+ if (op.trigger.targetSlotViewSteps !== 0) {
22355
+ args.push(op.trigger.targetSlotViewSteps);
22356
+ }
22256
22357
  }
22257
22358
  break;
22258
22359
  default:
22259
22360
  throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${op.trigger.kind}`);
22260
22361
  }
22261
- OpList.replace(op, deferOn(op.trigger.kind, args, op.prefetch, op.sourceSpan));
22362
+ OpList.replace(op, deferOn(op.trigger.kind, args, op.modifier, op.sourceSpan));
22262
22363
  break;
22263
22364
  case OpKind.ProjectionDef:
22264
22365
  OpList.replace(op, projectionDef(op.def));
@@ -22416,7 +22517,7 @@ function reifyUpdateOperations(_unit, ops) {
22416
22517
  OpList.replace(op, repeater(op.collection, op.sourceSpan));
22417
22518
  break;
22418
22519
  case OpKind.DeferWhen:
22419
- OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));
22520
+ OpList.replace(op, deferWhen(op.modifier, op.expr, op.sourceSpan));
22420
22521
  break;
22421
22522
  case OpKind.StoreLet:
22422
22523
  throw new Error(`AssertionError: unexpected storeLet ${op.declaredName}`);
@@ -24199,7 +24300,7 @@ function wrapI18nIcus(job) {
24199
24300
  * Copyright Google LLC All Rights Reserved.
24200
24301
  *
24201
24302
  * Use of this source code is governed by an MIT-style license that can be
24202
- * found in the LICENSE file at https://angular.io/license
24303
+ * found in the LICENSE file at https://angular.dev/license
24203
24304
  */
24204
24305
  /**
24205
24306
  * Removes any `storeLet` calls that aren't referenced outside of the current view.
@@ -24282,7 +24383,7 @@ function generateLocalLetReferences(job) {
24282
24383
  * Copyright Google LLC All Rights Reserved.
24283
24384
  *
24284
24385
  * Use of this source code is governed by an MIT-style license that can be
24285
- * found in the LICENSE file at https://angular.io/license
24386
+ * found in the LICENSE file at https://angular.dev/license
24286
24387
  */
24287
24388
  const phases = [
24288
24389
  { kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
@@ -24809,73 +24910,81 @@ function ingestDeferBlock(unit, deferBlock) {
24809
24910
  // Configure all defer `on` conditions.
24810
24911
  // TODO: refactor prefetch triggers to use a separate op type, with a shared superclass. This will
24811
24912
  // make it easier to refactor prefetch behavior in the future.
24812
- let prefetch = false;
24813
- let deferOnOps = [];
24814
- let deferWhenOps = [];
24815
- for (const triggers of [deferBlock.triggers, deferBlock.prefetchTriggers]) {
24816
- if (triggers.idle !== undefined) {
24817
- const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, prefetch, triggers.idle.sourceSpan);
24818
- deferOnOps.push(deferOnOp);
24819
- }
24820
- if (triggers.immediate !== undefined) {
24821
- const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Immediate }, prefetch, triggers.immediate.sourceSpan);
24822
- deferOnOps.push(deferOnOp);
24823
- }
24824
- if (triggers.timer !== undefined) {
24825
- const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Timer, delay: triggers.timer.delay }, prefetch, triggers.timer.sourceSpan);
24826
- deferOnOps.push(deferOnOp);
24827
- }
24828
- if (triggers.hover !== undefined) {
24829
- const deferOnOp = createDeferOnOp(deferXref, {
24830
- kind: DeferTriggerKind.Hover,
24831
- targetName: triggers.hover.reference,
24832
- targetXref: null,
24833
- targetSlot: null,
24834
- targetView: null,
24835
- targetSlotViewSteps: null,
24836
- }, prefetch, triggers.hover.sourceSpan);
24837
- deferOnOps.push(deferOnOp);
24838
- }
24839
- if (triggers.interaction !== undefined) {
24840
- const deferOnOp = createDeferOnOp(deferXref, {
24841
- kind: DeferTriggerKind.Interaction,
24842
- targetName: triggers.interaction.reference,
24843
- targetXref: null,
24844
- targetSlot: null,
24845
- targetView: null,
24846
- targetSlotViewSteps: null,
24847
- }, prefetch, triggers.interaction.sourceSpan);
24848
- deferOnOps.push(deferOnOp);
24849
- }
24850
- if (triggers.viewport !== undefined) {
24851
- const deferOnOp = createDeferOnOp(deferXref, {
24852
- kind: DeferTriggerKind.Viewport,
24853
- targetName: triggers.viewport.reference,
24854
- targetXref: null,
24855
- targetSlot: null,
24856
- targetView: null,
24857
- targetSlotViewSteps: null,
24858
- }, prefetch, triggers.viewport.sourceSpan);
24859
- deferOnOps.push(deferOnOp);
24860
- }
24861
- if (triggers.when !== undefined) {
24862
- if (triggers.when.value instanceof Interpolation$1) {
24863
- // TemplateDefinitionBuilder supports this case, but it's very strange to me. What would it
24864
- // even mean?
24865
- throw new Error(`Unexpected interpolation in defer block when trigger`);
24866
- }
24867
- const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), prefetch, triggers.when.sourceSpan);
24868
- deferWhenOps.push(deferOnOp);
24869
- }
24870
- // If no (non-prefetching) defer triggers were provided, default to `idle`.
24871
- if (deferOnOps.length === 0 && deferWhenOps.length === 0) {
24872
- deferOnOps.push(createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, false, null));
24873
- }
24874
- prefetch = true;
24913
+ const deferOnOps = [];
24914
+ const deferWhenOps = [];
24915
+ // Ingest the hydrate triggers first since they set up all the other triggers during SSR.
24916
+ ingestDeferTriggers("hydrate" /* ir.DeferOpModifierKind.HYDRATE */, deferBlock.hydrateTriggers, deferOnOps, deferWhenOps, unit, deferXref);
24917
+ ingestDeferTriggers("none" /* ir.DeferOpModifierKind.NONE */, deferBlock.triggers, deferOnOps, deferWhenOps, unit, deferXref);
24918
+ ingestDeferTriggers("prefetch" /* ir.DeferOpModifierKind.PREFETCH */, deferBlock.prefetchTriggers, deferOnOps, deferWhenOps, unit, deferXref);
24919
+ // If no (non-prefetching or hydrating) defer triggers were provided, default to `idle`.
24920
+ const hasConcreteTrigger = deferOnOps.some((op) => op.modifier === "none" /* ir.DeferOpModifierKind.NONE */) ||
24921
+ deferWhenOps.some((op) => op.modifier === "none" /* ir.DeferOpModifierKind.NONE */);
24922
+ if (!hasConcreteTrigger) {
24923
+ deferOnOps.push(createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, "none" /* ir.DeferOpModifierKind.NONE */, null));
24875
24924
  }
24876
24925
  unit.create.push(deferOnOps);
24877
24926
  unit.update.push(deferWhenOps);
24878
24927
  }
24928
+ function ingestDeferTriggers(modifier, triggers, onOps, whenOps, unit, deferXref) {
24929
+ if (triggers.idle !== undefined) {
24930
+ const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, modifier, triggers.idle.sourceSpan);
24931
+ onOps.push(deferOnOp);
24932
+ }
24933
+ if (triggers.immediate !== undefined) {
24934
+ const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Immediate }, modifier, triggers.immediate.sourceSpan);
24935
+ onOps.push(deferOnOp);
24936
+ }
24937
+ if (triggers.timer !== undefined) {
24938
+ const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Timer, delay: triggers.timer.delay }, modifier, triggers.timer.sourceSpan);
24939
+ onOps.push(deferOnOp);
24940
+ }
24941
+ if (triggers.hover !== undefined) {
24942
+ const deferOnOp = createDeferOnOp(deferXref, {
24943
+ kind: DeferTriggerKind.Hover,
24944
+ targetName: triggers.hover.reference,
24945
+ targetXref: null,
24946
+ targetSlot: null,
24947
+ targetView: null,
24948
+ targetSlotViewSteps: null,
24949
+ }, modifier, triggers.hover.sourceSpan);
24950
+ onOps.push(deferOnOp);
24951
+ }
24952
+ if (triggers.interaction !== undefined) {
24953
+ const deferOnOp = createDeferOnOp(deferXref, {
24954
+ kind: DeferTriggerKind.Interaction,
24955
+ targetName: triggers.interaction.reference,
24956
+ targetXref: null,
24957
+ targetSlot: null,
24958
+ targetView: null,
24959
+ targetSlotViewSteps: null,
24960
+ }, modifier, triggers.interaction.sourceSpan);
24961
+ onOps.push(deferOnOp);
24962
+ }
24963
+ if (triggers.viewport !== undefined) {
24964
+ const deferOnOp = createDeferOnOp(deferXref, {
24965
+ kind: DeferTriggerKind.Viewport,
24966
+ targetName: triggers.viewport.reference,
24967
+ targetXref: null,
24968
+ targetSlot: null,
24969
+ targetView: null,
24970
+ targetSlotViewSteps: null,
24971
+ }, modifier, triggers.viewport.sourceSpan);
24972
+ onOps.push(deferOnOp);
24973
+ }
24974
+ if (triggers.never !== undefined) {
24975
+ const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Never }, modifier, triggers.never.sourceSpan);
24976
+ onOps.push(deferOnOp);
24977
+ }
24978
+ if (triggers.when !== undefined) {
24979
+ if (triggers.when.value instanceof Interpolation$1) {
24980
+ // TemplateDefinitionBuilder supports this case, but it's very strange to me. What would it
24981
+ // even mean?
24982
+ throw new Error(`Unexpected interpolation in defer block when trigger`);
24983
+ }
24984
+ const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), modifier, triggers.when.sourceSpan);
24985
+ whenOps.push(deferOnOp);
24986
+ }
24987
+ }
24879
24988
  function ingestIcu(unit, icu) {
24880
24989
  if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
24881
24990
  const xref = unit.job.allocateXrefId();
@@ -26631,12 +26740,29 @@ var OnTriggerType;
26631
26740
  OnTriggerType["IMMEDIATE"] = "immediate";
26632
26741
  OnTriggerType["HOVER"] = "hover";
26633
26742
  OnTriggerType["VIEWPORT"] = "viewport";
26743
+ OnTriggerType["NEVER"] = "never";
26634
26744
  })(OnTriggerType || (OnTriggerType = {}));
26635
26745
  /** Parses a `when` deferred trigger. */
26746
+ function parseNeverTrigger({ expression, sourceSpan }, triggers, errors) {
26747
+ const neverIndex = expression.indexOf('never');
26748
+ const neverSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(neverIndex), sourceSpan.start.moveBy(neverIndex + 'never'.length));
26749
+ const prefetchSpan = getPrefetchSpan(expression, sourceSpan);
26750
+ const hydrateSpan = getHydrateSpan(expression, sourceSpan);
26751
+ // This is here just to be safe, we shouldn't enter this function
26752
+ // in the first place if a block doesn't have the "on" keyword.
26753
+ if (neverIndex === -1) {
26754
+ errors.push(new ParseError(sourceSpan, `Could not find "never" keyword in expression`));
26755
+ }
26756
+ else {
26757
+ trackTrigger('never', triggers, errors, new NeverDeferredTrigger(neverSourceSpan, sourceSpan, prefetchSpan, null, hydrateSpan));
26758
+ }
26759
+ }
26760
+ /** Parses a `when` deferred trigger. */
26636
26761
  function parseWhenTrigger({ expression, sourceSpan }, bindingParser, triggers, errors) {
26637
26762
  const whenIndex = expression.indexOf('when');
26638
26763
  const whenSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(whenIndex), sourceSpan.start.moveBy(whenIndex + 'when'.length));
26639
26764
  const prefetchSpan = getPrefetchSpan(expression, sourceSpan);
26765
+ const hydrateSpan = getHydrateSpan(expression, sourceSpan);
26640
26766
  // This is here just to be safe, we shouldn't enter this function
26641
26767
  // in the first place if a block doesn't have the "when" keyword.
26642
26768
  if (whenIndex === -1) {
@@ -26645,7 +26771,7 @@ function parseWhenTrigger({ expression, sourceSpan }, bindingParser, triggers, e
26645
26771
  else {
26646
26772
  const start = getTriggerParametersStart(expression, whenIndex + 1);
26647
26773
  const parsed = bindingParser.parseBinding(expression.slice(start), false, sourceSpan, sourceSpan.start.offset + start);
26648
- trackTrigger('when', triggers, errors, new BoundDeferredTrigger(parsed, sourceSpan, prefetchSpan, whenSourceSpan));
26774
+ trackTrigger('when', triggers, errors, new BoundDeferredTrigger(parsed, sourceSpan, prefetchSpan, whenSourceSpan, hydrateSpan));
26649
26775
  }
26650
26776
  }
26651
26777
  /** Parses an `on` trigger */
@@ -26653,6 +26779,7 @@ function parseOnTrigger({ expression, sourceSpan }, triggers, errors, placeholde
26653
26779
  const onIndex = expression.indexOf('on');
26654
26780
  const onSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(onIndex), sourceSpan.start.moveBy(onIndex + 'on'.length));
26655
26781
  const prefetchSpan = getPrefetchSpan(expression, sourceSpan);
26782
+ const hydrateSpan = getHydrateSpan(expression, sourceSpan);
26656
26783
  // This is here just to be safe, we shouldn't enter this function
26657
26784
  // in the first place if a block doesn't have the "on" keyword.
26658
26785
  if (onIndex === -1) {
@@ -26660,7 +26787,9 @@ function parseOnTrigger({ expression, sourceSpan }, triggers, errors, placeholde
26660
26787
  }
26661
26788
  else {
26662
26789
  const start = getTriggerParametersStart(expression, onIndex + 1);
26663
- const parser = new OnTriggerParser(expression, start, sourceSpan, triggers, errors, placeholder, prefetchSpan, onSourceSpan);
26790
+ const parser = new OnTriggerParser(expression, start, sourceSpan, triggers, errors, expression.startsWith('hydrate')
26791
+ ? validateHydrateReferenceBasedTrigger
26792
+ : validatePlainReferenceBasedTrigger, placeholder, prefetchSpan, onSourceSpan, hydrateSpan);
26664
26793
  parser.parse();
26665
26794
  }
26666
26795
  }
@@ -26670,16 +26799,24 @@ function getPrefetchSpan(expression, sourceSpan) {
26670
26799
  }
26671
26800
  return new ParseSourceSpan(sourceSpan.start, sourceSpan.start.moveBy('prefetch'.length));
26672
26801
  }
26802
+ function getHydrateSpan(expression, sourceSpan) {
26803
+ if (!expression.startsWith('hydrate')) {
26804
+ return null;
26805
+ }
26806
+ return new ParseSourceSpan(sourceSpan.start, sourceSpan.start.moveBy('hydrate'.length));
26807
+ }
26673
26808
  class OnTriggerParser {
26674
- constructor(expression, start, span, triggers, errors, placeholder, prefetchSpan, onSourceSpan) {
26809
+ constructor(expression, start, span, triggers, errors, validator, placeholder, prefetchSpan, onSourceSpan, hydrateSpan) {
26675
26810
  this.expression = expression;
26676
26811
  this.start = start;
26677
26812
  this.span = span;
26678
26813
  this.triggers = triggers;
26679
26814
  this.errors = errors;
26815
+ this.validator = validator;
26680
26816
  this.placeholder = placeholder;
26681
26817
  this.prefetchSpan = prefetchSpan;
26682
26818
  this.onSourceSpan = onSourceSpan;
26819
+ this.hydrateSpan = hydrateSpan;
26683
26820
  this.index = 0;
26684
26821
  this.tokens = new Lexer().tokenize(expression.slice(start));
26685
26822
  }
@@ -26734,26 +26871,27 @@ class OnTriggerParser {
26734
26871
  const isFirstTrigger = identifier.index === 0;
26735
26872
  const onSourceSpan = isFirstTrigger ? this.onSourceSpan : null;
26736
26873
  const prefetchSourceSpan = isFirstTrigger ? this.prefetchSpan : null;
26874
+ const hydrateSourceSpan = isFirstTrigger ? this.hydrateSpan : null;
26737
26875
  const sourceSpan = new ParseSourceSpan(isFirstTrigger ? this.span.start : triggerNameStartSpan, endSpan);
26738
26876
  try {
26739
26877
  switch (identifier.toString()) {
26740
26878
  case OnTriggerType.IDLE:
26741
- this.trackTrigger('idle', createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSourceSpan, onSourceSpan));
26879
+ this.trackTrigger('idle', createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSourceSpan, onSourceSpan, hydrateSourceSpan));
26742
26880
  break;
26743
26881
  case OnTriggerType.TIMER:
26744
- this.trackTrigger('timer', createTimerTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));
26882
+ this.trackTrigger('timer', createTimerTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.hydrateSpan));
26745
26883
  break;
26746
26884
  case OnTriggerType.INTERACTION:
26747
- this.trackTrigger('interaction', createInteractionTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));
26885
+ this.trackTrigger('interaction', createInteractionTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.hydrateSpan, this.placeholder, this.validator));
26748
26886
  break;
26749
26887
  case OnTriggerType.IMMEDIATE:
26750
- this.trackTrigger('immediate', createImmediateTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));
26888
+ this.trackTrigger('immediate', createImmediateTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.hydrateSpan));
26751
26889
  break;
26752
26890
  case OnTriggerType.HOVER:
26753
- this.trackTrigger('hover', createHoverTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));
26891
+ this.trackTrigger('hover', createHoverTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.hydrateSpan, this.placeholder, this.validator));
26754
26892
  break;
26755
26893
  case OnTriggerType.VIEWPORT:
26756
- this.trackTrigger('viewport', createViewportTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));
26894
+ this.trackTrigger('viewport', createViewportTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.hydrateSpan, this.placeholder, this.validator));
26757
26895
  break;
26758
26896
  default:
26759
26897
  throw new Error(`Unrecognized trigger type "${identifier}"`);
@@ -26843,13 +26981,13 @@ function trackTrigger(name, allTriggers, errors, trigger) {
26843
26981
  allTriggers[name] = trigger;
26844
26982
  }
26845
26983
  }
26846
- function createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
26984
+ function createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
26847
26985
  if (parameters.length > 0) {
26848
26986
  throw new Error(`"${OnTriggerType.IDLE}" trigger cannot have parameters`);
26849
26987
  }
26850
- return new IdleDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
26988
+ return new IdleDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
26851
26989
  }
26852
- function createTimerTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
26990
+ function createTimerTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
26853
26991
  if (parameters.length !== 1) {
26854
26992
  throw new Error(`"${OnTriggerType.TIMER}" trigger must have exactly one parameter`);
26855
26993
  }
@@ -26857,27 +26995,33 @@ function createTimerTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSo
26857
26995
  if (delay === null) {
26858
26996
  throw new Error(`Could not parse time value of trigger "${OnTriggerType.TIMER}"`);
26859
26997
  }
26860
- return new TimerDeferredTrigger(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
26998
+ return new TimerDeferredTrigger(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
26861
26999
  }
26862
- function createImmediateTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
27000
+ function createImmediateTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
26863
27001
  if (parameters.length > 0) {
26864
27002
  throw new Error(`"${OnTriggerType.IMMEDIATE}" trigger cannot have parameters`);
26865
27003
  }
26866
- return new ImmediateDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
27004
+ return new ImmediateDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
26867
27005
  }
26868
- function createHoverTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {
26869
- validateReferenceBasedTrigger(OnTriggerType.HOVER, parameters, placeholder);
26870
- return new HoverDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
27006
+ function createHoverTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan, placeholder, validator) {
27007
+ validator(OnTriggerType.HOVER, parameters, placeholder);
27008
+ return new HoverDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
26871
27009
  }
26872
- function createInteractionTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {
26873
- validateReferenceBasedTrigger(OnTriggerType.INTERACTION, parameters, placeholder);
26874
- return new InteractionDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
27010
+ function createInteractionTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan, placeholder, validator) {
27011
+ validator(OnTriggerType.INTERACTION, parameters, placeholder);
27012
+ return new InteractionDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
26875
27013
  }
26876
- function createViewportTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {
26877
- validateReferenceBasedTrigger(OnTriggerType.VIEWPORT, parameters, placeholder);
26878
- return new ViewportDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
27014
+ function createViewportTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan, placeholder, validator) {
27015
+ validator(OnTriggerType.VIEWPORT, parameters, placeholder);
27016
+ return new ViewportDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
26879
27017
  }
26880
- function validateReferenceBasedTrigger(type, parameters, placeholder) {
27018
+ /**
27019
+ * Checks whether the structure of a non-hydrate reference-based trigger is valid.
27020
+ * @param type Type of the trigger being validated.
27021
+ * @param parameters Parameters of the trigger.
27022
+ * @param placeholder Placeholder of the defer block.
27023
+ */
27024
+ function validatePlainReferenceBasedTrigger(type, parameters, placeholder) {
26881
27025
  if (parameters.length > 1) {
26882
27026
  throw new Error(`"${type}" trigger can only have zero or one parameters`);
26883
27027
  }
@@ -26891,6 +27035,16 @@ function validateReferenceBasedTrigger(type, parameters, placeholder) {
26891
27035
  }
26892
27036
  }
26893
27037
  }
27038
+ /**
27039
+ * Checks whether the structure of a hydrate trigger is valid.
27040
+ * @param type Type of the trigger being validated.
27041
+ * @param parameters Parameters of the trigger.
27042
+ */
27043
+ function validateHydrateReferenceBasedTrigger(type, parameters) {
27044
+ if (parameters.length > 0) {
27045
+ throw new Error(`Hydration trigger "${type}" cannot have parameters`);
27046
+ }
27047
+ }
26894
27048
  /** Gets the index within an expression at which the trigger parameters start. */
26895
27049
  function getTriggerParametersStart(value, startPosition = 0) {
26896
27050
  let hasFoundSeparator = false;
@@ -26921,6 +27075,12 @@ function parseDeferredTime(value) {
26921
27075
  const PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
26922
27076
  /** Pattern to identify a `prefetch on` trigger. */
26923
27077
  const PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
27078
+ /** Pattern to identify a `hydrate when` trigger. */
27079
+ const HYDRATE_WHEN_PATTERN = /^hydrate\s+when\s/;
27080
+ /** Pattern to identify a `hydrate on` trigger. */
27081
+ const HYDRATE_ON_PATTERN = /^hydrate\s+on\s/;
27082
+ /** Pattern to identify a `hydrate never` trigger. */
27083
+ const HYDRATE_NEVER_PATTERN = /^hydrate\s+never\s*/;
26924
27084
  /** Pattern to identify a `minimum` parameter in a block. */
26925
27085
  const MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
26926
27086
  /** Pattern to identify a `after` parameter in a block. */
@@ -26940,7 +27100,7 @@ function isConnectedDeferLoopBlock(name) {
26940
27100
  function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
26941
27101
  const errors = [];
26942
27102
  const { placeholder, loading, error } = parseConnectedBlocks(connectedBlocks, errors, visitor);
26943
- const { triggers, prefetchTriggers } = parsePrimaryTriggers(ast.parameters, bindingParser, errors, placeholder);
27103
+ const { triggers, prefetchTriggers, hydrateTriggers } = parsePrimaryTriggers(ast, bindingParser, errors, placeholder);
26944
27104
  // The `defer` block has a main span encompassing all of the connected branches as well.
26945
27105
  let lastEndSourceSpan = ast.endSourceSpan;
26946
27106
  let endOfLastSourceSpan = ast.sourceSpan.end;
@@ -26950,7 +27110,7 @@ function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
26950
27110
  endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;
26951
27111
  }
26952
27112
  const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);
26953
- const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);
27113
+ const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, hydrateTriggers, placeholder, loading, error, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);
26954
27114
  return { node, errors };
26955
27115
  }
26956
27116
  function parseConnectedBlocks(connectedBlocks, errors, visitor) {
@@ -27051,10 +27211,11 @@ function parseErrorBlock(ast, visitor) {
27051
27211
  }
27052
27212
  return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
27053
27213
  }
27054
- function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
27214
+ function parsePrimaryTriggers(ast, bindingParser, errors, placeholder) {
27055
27215
  const triggers = {};
27056
27216
  const prefetchTriggers = {};
27057
- for (const param of params) {
27217
+ const hydrateTriggers = {};
27218
+ for (const param of ast.parameters) {
27058
27219
  // The lexer ignores the leading spaces so we can assume
27059
27220
  // that the expression starts with a keyword.
27060
27221
  if (WHEN_PARAMETER_PATTERN.test(param.expression)) {
@@ -27069,11 +27230,23 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
27069
27230
  else if (PREFETCH_ON_PATTERN.test(param.expression)) {
27070
27231
  parseOnTrigger(param, prefetchTriggers, errors, placeholder);
27071
27232
  }
27233
+ else if (HYDRATE_WHEN_PATTERN.test(param.expression)) {
27234
+ parseWhenTrigger(param, bindingParser, hydrateTriggers, errors);
27235
+ }
27236
+ else if (HYDRATE_ON_PATTERN.test(param.expression)) {
27237
+ parseOnTrigger(param, hydrateTriggers, errors, placeholder);
27238
+ }
27239
+ else if (HYDRATE_NEVER_PATTERN.test(param.expression)) {
27240
+ parseNeverTrigger(param, hydrateTriggers, errors);
27241
+ }
27072
27242
  else {
27073
27243
  errors.push(new ParseError(param.sourceSpan, 'Unrecognized trigger'));
27074
27244
  }
27075
27245
  }
27076
- return { triggers, prefetchTriggers };
27246
+ if (hydrateTriggers.never && Object.keys(hydrateTriggers).length > 1) {
27247
+ errors.push(new ParseError(ast.startSourceSpan, 'Cannot specify additional `hydrate` triggers if `hydrate never` is present'));
27248
+ }
27249
+ return { triggers, prefetchTriggers, hydrateTriggers };
27077
27250
  }
27078
27251
 
27079
27252
  const BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
@@ -28149,11 +28322,18 @@ function compileStyles(styles, selector, hostSelector) {
28149
28322
  * is using the `ViewEncapsulation.Emulated` mode.
28150
28323
  *
28151
28324
  * @param style The content of a CSS stylesheet.
28325
+ * @param componentIdentifier The identifier to use within the CSS rules.
28152
28326
  * @returns The encapsulated content for the style.
28153
28327
  */
28154
- function encapsulateStyle(style) {
28328
+ function encapsulateStyle(style, componentIdentifier) {
28155
28329
  const shadowCss = new ShadowCss();
28156
- return shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR);
28330
+ const selector = componentIdentifier
28331
+ ? CONTENT_ATTR.replace(COMPONENT_VARIABLE, componentIdentifier)
28332
+ : CONTENT_ATTR;
28333
+ const hostSelector = componentIdentifier
28334
+ ? HOST_ATTR.replace(COMPONENT_VARIABLE, componentIdentifier)
28335
+ : HOST_ATTR;
28336
+ return shadowCss.shimCssText(style, selector, hostSelector);
28157
28337
  }
28158
28338
  function createHostDirectivesType(meta) {
28159
28339
  if (!meta.hostDirectives?.length) {
@@ -28860,6 +29040,8 @@ class TemplateBinder extends RecursiveAstVisitor {
28860
29040
  this.ingestScopedNode(deferred);
28861
29041
  deferred.triggers.when?.value.visit(this);
28862
29042
  deferred.prefetchTriggers.when?.value.visit(this);
29043
+ deferred.hydrateTriggers.when?.value.visit(this);
29044
+ deferred.hydrateTriggers.never?.visit(this);
28863
29045
  deferred.placeholder && this.visitNode(deferred.placeholder);
28864
29046
  deferred.loading && this.visitNode(deferred.loading);
28865
29047
  deferred.error && this.visitNode(deferred.error);
@@ -29805,7 +29987,7 @@ function publishFacade(global) {
29805
29987
  * @description
29806
29988
  * Entry point for all public APIs of the compiler package.
29807
29989
  */
29808
- const VERSION = new Version('19.0.0-next.5');
29990
+ const VERSION = new Version('19.0.0-next.7');
29809
29991
 
29810
29992
  class CompilerConfig {
29811
29993
  constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {
@@ -31456,7 +31638,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
31456
31638
  function compileDeclareClassMetadata(metadata) {
31457
31639
  const definitionMap = new DefinitionMap();
31458
31640
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
31459
- definitionMap.set('version', literal('19.0.0-next.5'));
31641
+ definitionMap.set('version', literal('19.0.0-next.7'));
31460
31642
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31461
31643
  definitionMap.set('type', metadata.type);
31462
31644
  definitionMap.set('decorators', metadata.decorators);
@@ -31474,7 +31656,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
31474
31656
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
31475
31657
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
31476
31658
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
31477
- definitionMap.set('version', literal('19.0.0-next.5'));
31659
+ definitionMap.set('version', literal('19.0.0-next.7'));
31478
31660
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31479
31661
  definitionMap.set('type', metadata.type);
31480
31662
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -31569,7 +31751,7 @@ function createDirectiveDefinitionMap(meta) {
31569
31751
  const definitionMap = new DefinitionMap();
31570
31752
  const minVersion = getMinimumVersionForPartialOutput(meta);
31571
31753
  definitionMap.set('minVersion', literal(minVersion));
31572
- definitionMap.set('version', literal('19.0.0-next.5'));
31754
+ definitionMap.set('version', literal('19.0.0-next.7'));
31573
31755
  // e.g. `type: MyDirective`
31574
31756
  definitionMap.set('type', meta.type.value);
31575
31757
  if (meta.isStandalone) {
@@ -31991,7 +32173,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
31991
32173
  function compileDeclareFactoryFunction(meta) {
31992
32174
  const definitionMap = new DefinitionMap();
31993
32175
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
31994
- definitionMap.set('version', literal('19.0.0-next.5'));
32176
+ definitionMap.set('version', literal('19.0.0-next.7'));
31995
32177
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31996
32178
  definitionMap.set('type', meta.type.value);
31997
32179
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -32026,7 +32208,7 @@ function compileDeclareInjectableFromMetadata(meta) {
32026
32208
  function createInjectableDefinitionMap(meta) {
32027
32209
  const definitionMap = new DefinitionMap();
32028
32210
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
32029
- definitionMap.set('version', literal('19.0.0-next.5'));
32211
+ definitionMap.set('version', literal('19.0.0-next.7'));
32030
32212
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32031
32213
  definitionMap.set('type', meta.type.value);
32032
32214
  // Only generate providedIn property if it has a non-null value
@@ -32077,7 +32259,7 @@ function compileDeclareInjectorFromMetadata(meta) {
32077
32259
  function createInjectorDefinitionMap(meta) {
32078
32260
  const definitionMap = new DefinitionMap();
32079
32261
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
32080
- definitionMap.set('version', literal('19.0.0-next.5'));
32262
+ definitionMap.set('version', literal('19.0.0-next.7'));
32081
32263
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32082
32264
  definitionMap.set('type', meta.type.value);
32083
32265
  definitionMap.set('providers', meta.providers);
@@ -32110,7 +32292,7 @@ function createNgModuleDefinitionMap(meta) {
32110
32292
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
32111
32293
  }
32112
32294
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
32113
- definitionMap.set('version', literal('19.0.0-next.5'));
32295
+ definitionMap.set('version', literal('19.0.0-next.7'));
32114
32296
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32115
32297
  definitionMap.set('type', meta.type.value);
32116
32298
  // We only generate the keys in the metadata if the arrays contain values.
@@ -32161,7 +32343,7 @@ function compileDeclarePipeFromMetadata(meta) {
32161
32343
  function createPipeDefinitionMap(meta) {
32162
32344
  const definitionMap = new DefinitionMap();
32163
32345
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
32164
- definitionMap.set('version', literal('19.0.0-next.5'));
32346
+ definitionMap.set('version', literal('19.0.0-next.7'));
32165
32347
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32166
32348
  // e.g. `type: MyPipe`
32167
32349
  definitionMap.set('type', meta.type.value);
@@ -32194,5 +32376,5 @@ publishFacade(_global);
32194
32376
 
32195
32377
  // This file is not used to build this module. It is only used during editing
32196
32378
 
32197
- export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
32379
+ export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
32198
32380
  //# sourceMappingURL=compiler.mjs.map